understanding the documentation of the standard evaluation sequence: own values

Question: I am finding it a bit challenging to deduce the standard evaluation sequence from its documentation, and I suspect I am failing to understand how some terms are being used.  Take the documentation at
https://reference.wolfram.com/language/tutorial/Evaluation.html
What part of this can be interpreted as saying that own values will always be applied before down values?  (I'm assuming both that this is true and that it's in there somewhere ...)
Answer: The documentation section cited describes the steps to evaluate an expression like h[e1, e2...].
The second step is:

Evaluate the head h of the expression.

This is a recursive step where the head itself is evaluated.  Most of the time, the head of a function call is a symbol.  When a symbol is evaluated, it is replaced by its own-value (if any).  The cited documentation does not mention how symbols are evaluated.
It is not until we get to the eleventh step that we find:

Use any applicable transformation rules that you have defined for
  h[f[e1,e2,…],…] or for h[…][…].

This step refers to the use of user-defined down-values (h[...]) or sub-values (h[...][...]) of h.
Incidentally, I think that the somewhat confusing appearance of f[e1,e2...] in this step is a typo, a copy-and-paste error from the preceding two steps which define the action of up-values (user-defined and built-in).  The mistake is not repeated in the next step which refers to built-in down-values simply by h[e1,e2,...].
The evaluation sequence is described in more detail in Chapter 7 of Power Programming with Mathematica by David B. Wagner.  It is freely available to StackExchangers via (16485).
When Do Own-Values and Down-Values Conflict?
Most of the time, there is no conflict between own-values and down-values.  For example, consider this simple function definition and its invocation:
ClearAll[f]

f[x_] := x + 1

f[1]
(* 2 *)

When the head of f[1] is evaluated in step two, it means that f is evaluated.  Most of the time, symbols that are used as functions do not have any own-values, so they self-evaluate.  Such symbols are said to be "inert".  In the present case, f is inert.  As a result, when evaluation gets down to the eleventh step the down-value of f is used to produce the final result.
Now let's consider are less conventional case where f has both a down-value and an own-value:
ClearAll[f, g]

f[x_] := x + 1

f = g;

f[1]
(* g[1] *)

Now, when the head f is evaluated its own-value comes into play.  f evaluates to g which means that evaluation effectively restarts with the expression g[1].  This is noted where the documentation states:

Every time the expression changes, the Wolfram Language effectively
  starts the evaluation sequence over again.

g is inert, so the expression remains unchanged in the restarted second step.  Once we get down to the eleventh step we find that the down-value of f does not come into play.  Why?  Because the head of the expression is now g.  g has no down-value so the expression as a whole is inert.
In this way we see that in some sense the own-value of f "shadows" the down-value of f.
The head of an expression need not be a symbol.  It could be a function call in its own right.  This introduces a similar sequence of events where a down-value of f can shadow a sub-value:
ClearAll[f, g]

(* establish a sub-value on f *)
f[x_][y_] := {x, y}

f[1][2]
(* {1, 2} *)

(* establish a down-value on f *)
f[x_] := g[x]

f[1][2]
(* g[1][2] *)

Again I emphasize that non-inert heads are not the norm.  But they can be a very powerful tool and are used extensively (consider, for example, f = Interpolation[{1, 2, 3, 2, 3, 1, 3}]).  On the other hand, it would be a very specialized context indeed where one purposely establishes own-values, down-values and/or sub-values simultaneously on the same symbol.  Such a circumstance is more likely to occur by error rather than by design (but I won't rule it out completely -- such is the power of symbolic computation).
Comment: I had guessed this would be the spot, but I'm still not sure exactly what "Evaluate the head `h` of the expression" means and in particular why this means "apply the own-values rules".  Are these synonymous?  In general, I think using the word "evaluate" to define the word "evaluate" is not particularly helpful.
And if "the somewhat confusing appearance of `f[e1,e2...]` is indeed a typo, that also helps me understand this page.
Comment: The word "evaluation" is repeated in step two on purpose: it is a recursive step.  The cited documentation is really just an outline and glosses over many details.  In particular, it is silent about symbol evaluation.  A symbol's own-value comes into play when that symbol itself is evaluated.  I have added a new section that tries to spell out the interaction between own-values and down-values in more detail:  _When Do Own-Values and Down-Values Conflict?_  The Wagner book contains much more detail than the _Mathematica_ documentation itself.


Trigger a reminder if activity has not been recorded in x amount of time

Question: Is there a way to have CiviCRM send me a scheduled reminder for any contact for whom I have not recorded an activity for in 3 weeks or more? So that if 3 weeks go by and I have not recorded an activity for Contact A, I would get an email notifying me of that.
Or is there a way to build a report showing all the people who haven't had an activity recorded for in 3+ weeks?
Answer: This isn't a current capability, though it's one I've thought about writing on multiple occasions.  Unfortunately, my clients have never deemed it something worth the time it would take.
To handle this, I think it would be best to create a custom search that searched for the latest activity.  For other use cases, searching only for activities of a particular type is helpful, but it sounds like you don't need that.
Once you have a custom search, you can create a smart group based on it.  You can then run reports and/or generate scheduled reminders limited to this group.
Answer: I think CiviRules can help you here, although you would have to develop your own condition. Luckily that would be pretty straightforward, check the CiviRules developer documentation


Elementary Tweaks not working anymore in Hera?

Question: I just updated my ElementaryOS from Juno to Hera. When I open System Settings and try to open Tweaks. This closes the entire System Settings window and does not open the Tweaks window.
Comment: My elementary-tweaks is installed but when I click on it, settings window closed. How to solve that!
Answer: You have to update elementary-tweaks package also in order to work with Hera. When the update to Hera was released, elementary tweaks behave like you explain, but after a while it was updated also and now it works as before, only slingshot options for raws and columns are missing, because it was removed from the OS, only 5x3 grid is presented at the moment. Execute sudo apt update && sudo apt upgrade into terminal.
Another possibillity is that you have set something before the update which is not supported now. I can advice you to remove all you settings made by elementary-tweaks by purging and reinstalling it. In order to do that, execute
sudo apt purge elemetnary-tweaks

if you do not have purge installed, you can do this by sudo apt install purge. After purging install it again:
sudo apt install elementary-tweaks

Comment: I have tried to update with sudo apt && sudo apt upgrade. Still not working. I tried sudo apt install element-tweaks --reinstall, it still doesn't work. Can you tell me how to run elementary tweaks via terminal?
Comment: hmm.. it is strange. I do not know an option to run it from terminal, sorry. Probably you are using the same source, but to double-check - do you isntall it using this repository - https://github.com/elementary-tweaks/elementary-tweaks#installation ?
Comment: Yes, i'm suing that repo. I can't find anything in google about how to run tweaks on terminal. That's weird. I thought everything can run on terminal to check the error.
Comment: Probably there is a terminal command, but I never see it also. I can recommend you to check out the issues into the github link I posted above, probably there will be something that can help you. This is a fork of the original repository of elementary tweaks and you can post an issue there. Another option you may try is to purge (remove elementary tweaks with all options) `sudo apt purge elementary-tweaks` and install it again - you **will loose your current settings** made by the elementary tweaks, but I believe there is the problem, something not supported now is set there.


Which gear should I use to climb a steep hill?

Question: I have a 1999 Toyota Corolla, which has a D, 2, and L gear.  I also have a steep driveway to climb everyday.  Which of these gears is most appropriate for going up steep inclines?
Answer: Assuming that you have no faults with your transmission, it doesn't matter - an automatic transmission will automatically switch down  gear as and when it needs to. All the '2' gear does is not let you go over 2nd gear - which if you were heading downhill could make your engine over-rev...generally not recommended.
So D should be just fine.
Comment: It doesn't matter if it is a 4 cylinder or 6 cylinder engine?
Comment: No. Automatic transmissions are designed to use the most appropriate gear where possible. It doesn't matter what type of engine you have.
Answer: If you're carrying a high load, L is best.
The gears work as follows:
D = use whichever gear the computer decides/ Useful for everyday driving.
2 = use first or second, depending on speed. Useful when carrying high loads at low speeds.
L = stay in the lowest gear. Best for carrying high loads up steep inclines.


Composition of weak one way function is not a strong one way function

Question: Given $f(x)$, a weak one-way permutation, how to prove that $f^T(x)$ is not a strong one-way function? Here $f^T$ denotes
$T$ times self composition of $f$ and $T$ is a polynomial in input length.
Answer: Obviously, composing $T$-times a weak OWP can give a strong OWF: simply consider the case where $f$ is already a strong OWP (hence in particular a weak OWP). Now, what you want is to show that it is not necessarily the case; i.e., you want a function $f$ which is a weak OWP, but such that $f^T$ is not a strong OWF (i.e., an example where security does not "amplify through composition").
I'll give you such a candidate; I let you prove that it satisfies what you want, that is a quite simple exercise. Let $g: I \mapsto I$ be an arbitrary (strong or weak) OWP, and let $J$ be some arbitrary set such that $|J| = |I|$, and $I$ is disjoint from $J$. Consider the following function $f$:
$f:I \cup J \mapsto I \cup J$ is defined as follows: $f(x) = g(x)$ if $x \in I$, and $f(x) = x$ if $x\in J$.
Claim: $f$ is a permutation (that's quite obvious), and also a weak-OWP (you should be able to check that easily). Yet, $f^T$ is still a weak-OWP, but not a strong OWF. Can you see why?
(if you're stuck in the analysis, just ask for more hints in the comment section)
Comment: I am interested in the situation where $f$ is a weak OWF and not a strong OWF.
In that case, $f^T$ will not be a strong OWF. But I don't know how to prove it.
Comment: In my example, $f$ is obviously a weak one way function and not a strong one. Can you see why? Remember that a OWF is related to the hardness of inverting it on a random input of its domain. What happens if you take a random input in the domain of $f^T$? How often is it easy to invert? I can give you the full solution if you can't work it out, or just give you hints if you prefer, it's not so hard
Answer: How do you define weak vs strong? We need to consider some kind of additional construction. By definition, a permutation is invertible. You may mean how distinguishable it is from a random permutation.
For a well constructed one, like Keccak-$f$, the inverse may be significantly more expensive to calculate. In any case, applying Keccak-$f$ 24 times is secure IF we only give $r$ bits of data after applying this (giving us claims for (1600 - r)/2-bit security). If we were to get access to the whole state, then it is obviously not secure.
As an important note though, since you are talking about applying the exact same permutation $T$ times, then you can't have different round constants. Thus, if you want a "strong" result, the initial permutation can't be completely vulnerable to rotational attacks. But this is a fairly low bar, since you can achieve this by including even a single "wide" add operation across your domain, and then $T$ linear in the length of $x$ is sufficient to address this. Of course, there are many different types of attacks. For example, you can't have a construction vulnerable to slide attacks, for which the number of rounds may become irrelevant (this is similar to a permutation which doesn't add anything against rotation attacks).
Comment: From a strong one-way function, I mean that the success probability of inverting $f$ is at most negligible.
From a weak one-way function, I mean that the failure probability of inverting $f$ is at least noticeable.
Comment: So I think what you're talking about is some kind of oracle here (i.e., $f$ is not known with certainty by the attacker). Basically, $f$ is to be selected from some known set of permutations, $S$, such that given access to a black-box implementation of $f$, the attacker has a relatively high chance of inverting it. However, by iterating over $f$, the attacker then has a relatively low chance of inverting it. Thus, $S$ must be large (so $f^T$ is strong), but have structure (so $f$ is weak).
Answer: So, the question is are we after $n$-bit security (where $n=|x|$)? If the answer is yes (that this is strong), then the statement is correct.
For slide attacks; one indeed remains "vulnerable". Thus, indeed we won't be able to have better security than the birthday bound (i.e., for $n$-bits, $\frac{n}{2}$ security in terms of number of plaintext, cipher-text pairs).
Otherwise, if one is ok with this $\frac{n}{2}$ bound, then it is quite likely that one can achieve this. For example, consider defining $f = f_K$ using a reduced-round block cipher for some random $K$, such that $f$ itself is weak. $f^T$ may be strong.
A "silly" example of this could be to consider the Keccak permutation, where we need a fixed round constant. The fact that different rounds have different constants are supposed to provide protection against rotational and slide attacks. Rotational attacks can be dealt with by doing a $b$-wide addition to a random offset $O$. In this case, from a security perspective we need at least $b$ additions for the "strong" permutation (i.e., $T \geq b$ is necessary).
Comment: I'm not sure that answers/has any relation with the question. Unless I misunderstood it, OP asks whether for a weak OWP $f$, it does necessarily hold that $f^T$ is a strong OWF. I do not see how any of you considerations (with concrete attacks and the like) have anything to do with this purely theoretical question, where we do not care about concrete attacks, but only about (the existence or inexistence of) a polytime reduction between two primitives.


iTunes Podcast Rejected by Apple

Question: I am trying to submit a podcast to iTunes for the first time, and thought everything was going well, but I just got a rejection email:

Dear podcast owner,
The podcast located at the URL shown below has been blocked or removed from the iTunes directory as a result of technical problems with the feed.
Name: In His Word
  Feed URL: http://joshburnett.org/podcast/rss_source.rss
If you wish to reactivate your podcast in the iTunes directory, please troubleshoot your feed and check the functionality of each episode. To test your podcast, start iTunes, select Subscribe to Podcast from the Advanced menu, and enter your feed URL in the dialog box. If you can successfully subscribe to your podcast and listen to each of the episodes, you can reactivate your podcast by resubmitting the feed using the Submit a Podcast page, https://phobos.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast.
For more information on troubleshooting feed problems and controlling the appearance of your podcast on iTunes, please see the podcast FAQ at http://www.apple.com/itunes/podcasts/faq.html and technical specification at http://www.apple.com/itunes/podcasts/techspecs.html.
Sincerely,
The iTunes Store Team

I tried the test submission through Advanced>Subscribe to Podcast. It takes a few seconds to load and then it is subscribed on my iTunes. I click "GET" and the podcast downloads. But then it won't play. When I double click it, it just downloads again (and keeps doing that). I'm not sure what I'm doing wrong. I've looked at other podcasts RSS files, and tried to make sure mine has everything I need. Any thoughts?
Here is the feed url
My directory looks like this:

root/

podcast/

audio/

podcast1.mp3

index.php
podcast1400.mp3
rss_source.rss

Update: I finally narrowed it down (I think). Everything seemed correct, but I finally tried a couple different MP3 files and submitted the podcast and it worked. So, I'm wondering if the audio file my client gave me has issues. When I go to "Get Info" for other MP3 files, it shows things like "Audio Channels", "Total Bit Rate", and stuff like that. The MP3 file I am using doesn't really show anything. All I know is it says it's "Kind: MP3 audio" and "64865838 bytes". Any thoughts? I know pretty much nothing about audio, I'm a web developer. I can provide the audio file if anyone wants to download it and check it out.
Comment: Could you post your mp3 file it sounds like its not coded well (no pun intended)
Comment: @Akshat "encoded".
Comment: Not only posting your MP3, but what information on what/how you're recording and exporting it?
Answer: Okay, after a long period of troubleshooting, I determined it was the MP3 file that was having issues. After importing it into GarageBand and exporting it from there, it finally worked! I received the MP3 file from the client. He is a preacher and they recorded it at the church. Then he uploaded it to Google Drive and I downloaded it from there. It sounds like it was not encoded correctly, but I am not an audio expert.

iTunes Podcast Rejected by Apple


Audacity: How can I blend my vocals within the music?

Question: I've been using Audacity for a few weeks but I can't figure out how to blend my vocals within the music. My voice is hard to hear when the music is playing, even when adjusting the volumes. Sometimes I can hear my voice at the beginning of the song, but for example if it hits the chorus, and the music gets louder, then my vocals is too low. So basically I'm asking how to blend my vocals perfectly within the music so that both the music and vocals are being heard. Thank you.
Answer: If there is an imbalance of volume along the timeline between the different tracks you are trying to mix, you can use Audacity's Envelope Tool to automate the volume fader behavior of each track along the song.
Audacity's fader automation is not as powerful as that of the major DAWs in the market (e.g. as far as I know it does not allow real time automation recording, just manual editing of the each envelope). But with a bit of patience you can set the relative volumes of each track at each moment in the song with great precision.
Answer: You might try some EQ, a 3-5db boost at around 4khz on the vocal. At the same time you might try cutting that (or other) frequencies in the music. This helps the t,k,s sounds in the vocal cut through which are important for comprehension of language.
Try compression on your vocal track to even out the dynamics. This will help the vocal "sit" better against the music instead of the volume of the voice dipping below and spiking out above the music on a random basis.
If you're not sure about compressors, just get on youtube. :)
Then it's just trial and error. Being heavy handed with these things is the sign of an amateur, so be careful.


Speed of a tennis ball to tennis serving training feedback videos?

Question: My friend suggest me non-interlacing progressive mode to my Sony Nex-3N with low shutter speed and a lot of light and one camera photographing the player and one camera photographing the ball. Is there any ready made device to get the speed of tennis ball without manually calculating it from the pictures?
Answer: Traditionally, the speed of the tennis ball is measured with radars based on Doppler effect where the difference in pulses reveal the speed. This device costs about 100EUR and it is bulky to carry around besides a camera. So trying to get the speed in other ways:

Programmatically in Mathematica? Thread here.
Which features required in a camera? Photographing thread here and the easiest solution seems to be the large ISO (more noise) and small shutter speed.

Comparisons of shots

What is the fastest recorded smash shot in tennis?
Answer: If you goal is to have measurements comparable to the professionals then you need to find a tool that is measuring the speed of the ball right after the racket hits the ball.
There are multiple tools commonly found in online tennis stores, but almost all of them measure the speed of the ball close to the net, which makes it not comparable to the "official" measurements of the pros.
It depends what exactly you hope to achieve with that measurement.
Is it for fun or to quantify progress or do you want to compare yourself to the professionals? I ask this, because this is a topic that was discussed endlessly in tennis forums I've been quite active in.


How would you differentiate a dismiss icon from a delete icon?

Question: I currently have two icons I am using for list items in an application. Accept, represented by a check mark, and reject, represented by and X mark. I need to add a third icon for dismiss. Dismiss or cancel are commonly represented by and X mark as well. The context of the app and colors make it clear what the first two buttons do. Any ideas for the dismiss button?
Answer: I have worked with similar sets that included Delete, Cancel and Dismiss, but in my case the Dismiss button was rather an Undo action ("Dismiss all changes").
Undo is much easier to represent, so if this is the sort of thing you would expect the button to do, you could go with something like:

Now, if your dismiss goes more in the direction of "Ignore and open next" or similar, perhaps you could perhaps use something that shows the act of moving to a different element for the icon:

In any case, I would try not to think about the action itself, but about the sort of effect it produces instead.
Alternatively, you can use the X for dismiss, and use something else for Delete, like a in:

Whatever you choose, make sure you reinforce the action with some text or a tooltip explaining what each one does.
Comment: Thanks for your feedback. My dismiss icon just removes the item from an alert list. The user stays on the list and the item is not really deleted except from display on this list.
Comment: @rdellara Maybe a "minus" symbol? Since a cross could be easily confused for a delete button. A minus makes sense in a list.
Comment: This was what I came up with, but it just doesn't look right. I am in the process of trying a thumbs up, thumbs down for accept and reject and using the x for dismiss.


My site has crashed .. anyone have some info?

Question: I booked a domain name for my website from a hosting provider .I gave the domain name , along with ftp details to a freelancer to develop the site in wordpress . the freelancer developped and he got full payment , and the site and site was working fine ,etc ..
  From that time , I did not change the admin logging as well as ftp details , this means that such info is still known to the freelancer ..
  A week ago , I found that some links in my site was not working .. I sent him a mail about this , and he said that he will fix it if i give him ftp details . and I did so , next I found that the entire site is gone . then he sent me a mail , without I asked him , and he he said that there have been someone who got access to my server , and he removed all files of my site and he installed drupal instead .and that he can rebuild the site in one day , by charging a full fee of 250 usd again ..
  Can anyone know what I can do in this situation , to find who did such act , could it be the host provider or that freelancer ,, and if there is a possibility to have my site back top the server ..
 I will appreciate any info on this..
Regards ,
Thanks
Comment: It sounds to me like the freelancer is scamming you. Unfortunately, if you didn't back up the site, there really isn't any way to restore it, unless the host you go through provides a back up service that was in place prior to the files being deleted. As far as what you can do from here, if you don't own the equipment that it was hosted on, you really don't have any options other than to rebuild the site.
Answer: hey first, go and change your ftp username and password and all other passwords like the domain admin ones and the hosting account ones. then delete any existing databases. and then check for backups if any available on your server. if its there, take it down but don't install it cause the freelancer will again have access to your wordpress admin. install wordpress on your hosting. go to wordpress.org to know more about how to install and to download. then if you have backups, import your themes and plugins. and if you don't have and cannot make the site on your own, please don't go back to that same freelancer. cause again he'll do this. find someone else, more reliable, it'll be good if he's your friend or something. then make a new ftp account on your hosting, and give those credentials to him not your admin ones. copy whatever he makes to a new folder and afterwards download it for backups. it'll be best if you can make the site on your own. please dont trust anyone with your site, cause thats one of your main identities. but first change your passwords.
Answer: also, when you change your password, check if you saved passwords in ftp client (ie. total commander, or filezilla). some of the trojan/viruses can steal passwords, and made a mess.
it's not ok to say that freelancer is the one that made that damage.
Answer: The freelancer is scamming you. Agree with him and ask him to put the site back on, then change your ftp info etc and stop communicating with the freelancer. (If necessary pay him 50% of the money to get him to install the site again).
Answer: Essentially, change all of your passwords, and see if your host has backups that you can use. If not, you're a bit out of luck; the freelancer is scamming you. Make sure to create an FTP account that isn't admin account, and limit its access to only places where you need editing, then give the account credentials to a trustworthy person. Get someone else to remake the website, if you are seriously out of luck without backups.


Sending funds via routing number from bank

Question: Is it possible to send funds from a bitcoin account via routing number to a trading account?
Answer: Not without an intermediary. Banks deal with traditional currencies like Euros or US Dollars, whereas Bitcoin is completely based on transactions involving bitcoins.
The only reason bitcoins have a value denominated in USD or Euros is that there are people willing to buy them for that value. Other than that bitcoins and traditional currencies are completely detached from each other.
So either your bank accepts bitcoins and allows you to trade them or, more likely, you'll have to find someone who buys bitcoins and then you transfer the money you received in exchange to your bank account.


IGMP v3 multicasted television through router with IGMP v2

Question: we can connect to internet using LAN cable at out student's dormatory. We can watch multicasted television on our computers using VLC media player. Everything works fine this way.
I decided to buy wireless router and connect my laptop to network without wires. I took special care looking for router which supports multicast. It wasn't easy to find cheap router for home usage which supports multicast. (ZyXEL company recommended me ZyXEL NBG-417N.) I bought it.
This router supports IGMP v1 and v2. Network administrator told me that they use multicast with IGMP v3 but the netowork should reply to IGMP v2 requests too.
I am a programmer which want to see some TV - not a network specialist. So I don't know how to use these informations.
I've just checked that multicast is allowed in settings of my router. I started VLC media player the same way like without router and the TV doesn't play.
What should I try? How to solve this problem? Please give me at least idea what should I look for.
Should I maybe tell the VLC media player to use the older version of protocol? Or should I set something in my router? then what?
Thanks in advance
Answer: First, try wired, not wireless. I've heard it's common for wireless routers to rate-limit multicast (not that I have personal experience with that). In any case, multicast performance over wireless is generally awful.


What happens to a research agreement when we go to war in Civ 5?

Question: I formed a research agreement with an AI in Civ 5, and when it was about halfway done he attacked me.  Is that money just gone for both of us, or can we resume it somehow once I've taught him a lesson?
Answer: Investments into Research Agreements, if broken, are lost. This is why you should never go to war with your research partners if you can help it -- since you both lose.
Answer: The money you each put into the agreement is lost.  This is not necessarily a bad thing - if you can trick someone into a research agreement before going to war, they will lose that money, which they could have used on defending themselves.
According to Wikipedia, the higher-level computer opponents will sometimes use this strategy.
Comment: I just Googled "Research Agreement" "War" and this was the first post that came up. This was my first ever game and Montezuma tricked me into spending all my gold to form a research agreement when he had 5 spearman directly outside my capital. I had no option but to accept incase it annoyed him. Two turns after he decalred war. And all the gold was gone. I then couldn't fast build a horseman to defend and lost. This was on easy difficulty so I can confirm this tactic isn't even used on higher difficulty games. It was my first time playing.
Comment: @Dave it was a bug in the first (unpatched) version of the game, it's fixed now.
Comment: I had a research agreement get broken from me starting an attach, but got the "free" tech anyway.  I think I was only a few turns from the end of it.
Comment: @BlueRaja, Don't use a research agreement if you are going to break it. Offer the opponent GPT and goods for his treasury gold. The GPT and goods will be returned once you declare war. You'll be at least 500 richer instead of 500 poorer.
Answer: GPT as BlueRaja mentioned is a good exploit for sure. Open borders also is a good trade or pretty much anything that pays out over multiple turns including your excess strategic resources. You'd think it would be a horrible idea to arm the enemy at your gates but once they declare war on you 1 of 2 things will happen:
Let's say you trade iron for gold to Montezuma just before he declares war on you...
1) He already had more reserve iron than swordsman/catapults/etc. on the field, meaning the excess iron you gave him provided no benefit, but he has now financed your defenses/fun budget.
2) Montezuma was actually able to increase his max number of (iron) units via the trade, but now that your supply of iron is cut off Montezuma will have a shortage of iron resulting in all of his swordsmen/catapults/etc. receiving a combat penalty until he is able to get back in the black. Also, he has now financed your defenses/fun budget.
Comment: This is a good discussion of trading, but what does it have to do with research agreements, as asked in the original question? (Each answer here should directly address the question. Welcome to Arquade, and check out the [faq].)


spaceship collision and dying

Question: I have a spaceship on the left side on the screen that can move up and down. Enemy spaceships move from the right side of the screen to the left. The goal is to shoot as many spaceships as you can.
Because the player ship can move up and down, I have set up collisions so that they can't go above or below the window bounds, this is handled in the following code.
public void playerWCollision()
{
    if(y < 0)
    {
        y = 0;
    }
    else if(y+height > Main.WINDOW_HEIGHT)
    {
        y = Main.WINDOW_HEIGHT - height;
    }
}

Now if the player spaceship crashes into an enemy spaceship, I want my player ship to fall down, like so.
public void hit()
{
    // these are player positions. so if player crashes into
    // an enemy spaceship then add to x, y position
    // so player spaceship will go forward and down, forward and down, etc..
    x += dx;
    y += dx;
}

But the problem I have is that the player ship will stop at the bottom due to this collision detection check else if(y + height > Main.WINDOW_HEIGHT).
So if the player gets hit there is no way it will go below the screen.
I want the player to stay within the bounds of the window unless he is hit, in which case he should be able to go below the screen.
Answer: Add a boolean value like shipIsAlive on your ship class and set it to false when the ship gets hit and then change your else if to:
else if(y+height > Main.WINDOW_HEIGHT && shipIsAlive)

spaceship collision and dying


What is ping, and why is it important?

Question: I've seen the term used in many online games but I'm not sure what it means.
What does 'ping' mean? Is it better to have high or low ping?
Comment: [Ping is a duck](http://www.amazon.com/review/R2VDKZ4X1F992Q/ref=cm_cr_dp_title?ie=UTF8&ASIN=0448421658&nodeID=283155&store=books)
Comment: Ping is important because it is essential for a Pong.
Answer: Ping is the amount of milliseconds it takes a packet of information to reach the server from you and back. Basically it's a measurement of connection speed, and it influences lag quite a lot.
According to pingtest.net:

[Ping] tells how long it
  takes a "packet" of data to travel
  from your computer to a server on the
  Internet and back. Whenever you
  experience delayed responses in
  Internet applications - this would be
  due to a higher than desired ping.
  Similar to packet loss, lower is
  better when it comes to ping. A result
  below 100 ms should be expected from
  any decent broadband connection.
Comment: It comes from the sonar ping that submarines use to find other vessels in the ocean
Comment: Also, ping is not `connection speed`. It is rather connection latency. Sure you could get a 100bit/s connection that can have a ping of 1ms, but it won't be of much use if to transfer all the data needed for a single "action" takes 100kbytes. Both latency and actual bandwidth is important in determining how good a connection actually is.
Comment: @Earlz That's correct, however in practice few people suffer from not having enough bandwidth, it's latency that's often lacking.  For a game once you have "enough" bandwidth, any additional doesn't help, but better latency almost always helps (up until the point where the human eye is unable to discern anyway)  Also most games have some sort of predictive client that helps mitigate latency somewhat, but it's not perfect. (Yeah, I realize this is a necrocomment :p)
Comment: A ping is the time taken by a round trip so yes, twice.  You should probably edit your answer because technically your statement is not correct.
Comment: Basically, you care about ping because it is twice the amount of time your action take to reach the server... approximately.
Answer: Ping is the measure of latency (lag) from your computer to the server and back to your computer. A ping is sent to a server (which contains a packet of information 32 bits long, those are a combination of 32 0's and 1's) and then the server sends that back.

The time taken for the information to get from your computer, to the server and back to your computer is the amount of latency that you have. Lower ping is better than higher ping because it means that you will send information and receive the server's response back quicker. If you have a high ping (>500ms) it means that it is taking over half a second to get to the server and back. This means you will notice that there are jitters and jumps and a term called "rubber banding" during online gameplay.
A high ping (or latency) can therefore influence the outcome of an online game.
It's worth noting that there are many things that can influence your ping and that is:

Distance from server. For example, if you live in the US and you try to connect to a server in the EU then the ping will be higher than if you tried to connect to a US server close to you (this is taking into account that both the EU/US is evenly matched in terms of speed, etc).
Your internet connection. For example, if you have a 56k modem the ping will take longer to come back to you than if you have a decent broadband connection.
The amount of hops. This is, the route and servers the ping has to take to reach the destination and back. The further away from you in the World it is the more hops you have to go through.

Some other things to consider when looking at ping:

How many of the pings actually made it to the target site? If the pings don't reliably arrive, there might be packet loss due to an unreliable internet connection between your computer and the destination. This unreliability could be at any point in the internet connection, so the next step is to do a traceroute and see where the problems occur.
What is the average and standard deviation of the pings? If the ping is a low 20ms, but has wildly variable results of over 100ms, that can be much worse than a constant 80ms ping to the target site.
Answer: Ping is a measure of how is your connection to the server (in a multiplayer online game).
Obviously a low value is better and you should prefer that server, a high ping may even get you kicked (it wouldn't be possible to play anyway as you'd see things that already happened for everybody else, making it hard to, for example, hit an enemy that's no longer where you see him).
See this wikipedia article

In multiplayer online video games, ping refers to the network latency between a player's computer (client), and either the game server or another client (i.e. peer). This could be reported quantitatively as an average time in milliseconds, or qualitatively as low ping or high ping. The latter usage is common among players of first-person shooter and real-time strategy games. Having a low ping is always desirable because lower latency provides smoother gameplay by allowing faster updates of game data.
Ping is often conflated with lag. One may "lag out" due to unacceptably high ping. Servers will often disconnect a client if the ping is too high and it poses a detriment to others' gameplay. Similarly, client software will often mandate disconnection if the ping is too high. A high ping does not cause lag; rather, a high ping value is the result of lag.
  Rather than using the traditional ICMP echo request and reply packets to determine ping times, game programmers often instead build their own latency detection into existing game packets (usually based on the UDP protocol).
Some factors that might affect ping include: network protocol engineering, Internet connection speed, the quality of a user's Internet service provider and the configuration of firewalls. Ping is also affected by geographical location. For instance, if someone is in India, playing on a server located in the United States, the distance between the two is greater than it would be for players located within the US, and therefore it takes longer for data to be transmitted. However, the amount of packet-switching and network hardware in between the two computers is often more significant. For instance, wireless network interface cards must modulate digital signals into radio signals, which is often more costly than the time it takes an electrical signal to traverse a typical span of cable.
Answer: Ping represents "latency" between your PC and the server; i.e. how many milliseconds will pass between you clicking the mouse (or something), the server receiving the instruction, and your PC then receiving the result.
A lower ping is generally more desirable, but note that a higher ping is only really an issue for time-critical instructions, such as for fast-twitch FPS-type games. The maximum practical ping in this case is around 300ms (or about a third of a second). Any higher, and you will appear to "stutter" to the other players (and you will see them doing the same thing). Many FPS game servers are set to disconnect high-ping players automatically.
Answer: Short answer is: Time that i takes to send event to server and get response, the lower the better.
A bit longer answer is:
The other term is also latency - connection speed has two parts badnwidth (amount of data you can transfer within given period of time) and latency (time for given amount of data to travel). Ping is latency of small amount of data.
Unit of latency is time - specificly milliseconds.
In fact latency is corret term for what ping is now used. Ping is small program on all platforms (Win/linux/mac) that lets you messure latency over TCP/IP network.
It uses specificly ICMP protocol, and is originaly used to test connection. It sends small amount of data and waits for response. result of pingis the time that was taken to send and receive data.
Your game doesn't use ping [program], it messures latency in it's way. (for example it sends your movement and waits for response) - you need to have latency less than 120ms to be able to play FPS. The lower the better. In game the lower latency/ping the faster the response is.
In comparsion if you are downloading a large chunk of data, you don't care for the latency, you only care for bandwidth.
The term ping comes from echolocation - if you have ever seen a movie wth submarines yoou should know how echolocation works - you make low sound like 'ping' and listen for echo of it.
Answer: Ping calculates the round-trip time of the data packet's route from its source to the destination and back, and determines whether any packets were lost during the trip. Lower ping time is better.
If you have a high ping time, your interenet speed is low. So you can't play any game on the internet. You can check whether your ping is high or not using Who is XY.com. I hope it will be helpful for you.

What is ping, and why is it important?


android ubuntu one sync changes back

Question: Can i sync changes from my Android to U1 and therefore back to my pc.
I am hoping to sync my keepass database between my pc and phone.  If I subscribe to a site through my phone, I'd like to have those changes back to my pc from my phone.
Answer: I'm the lead developer of Ubuntu One Files. And I also wish to use keepassx with it one day :)
Yes, more full-feature sync engine will come, I can't give any dates yet, though.

android ubuntu one sync changes back


Why does my belly stick out so much when I am relaxed but have a six pack when I am flexing?

Question: .
I need help on figuring this out! Please
Comment: Second picture looks a bit like you've got some anterior pelvic tilt going on. Should be plenty of info out there on the web about it
Comment: Yes, anterior pelvic tilt can make your abs look bloated when relaxed. Ask your doctor if you have it. If you don't  have anterior pelvic tilt you are fine and healthy
Comment: See also https://fitness.stackexchange.com/questions/37432/relaxed-belly-no-abs-show
Comment: Would that have much to do with my belly?
Comment: Ignore those comments, you very clearly have anterior pelvic tilt. It comes from an imbalance in muscle activity. Your pelvis is tilted backward because of this making your abdominals stick out. Look into this, 1 google image search will give you your exact posture problem.
Answer: When you relax, all the fat is falling down to your lower belly, and stretching the skin out and away from abdominal muscles.
When you flex, the fat gets spread out over a larger surface area, showing the outline of what lies underneath.
This situation is true for a lot of people.
If you want your abs to show while relaxing, you need to lose some of that fat. But just so it's said; this is only beneficial from a vanity standpoint. From a health perspective, there is very little reason to desire a constantly visible sixpack.
As a sidenote, it's worth pointing out that you may have an anterior pelvic tilt, judging by your second picture. Is that something you're aware of?
Comment: Nothing wrong with elaborating. To answer your question, @RyleeMcNeeley, feeling bloated doesn't mean you *are* bloated. You should experiment with your diet a little bit. The first thing that comes to mind is the tuna. While a great source of protein, it also tends to contain a lot of mercury, which can offset some of the body's natural processes. You don't mention how much tuna you eat, but I would consider replacing it with salmon.
Comment: @RyleeMcNeeley - As a sidenote, it's worth pointing out that you may have an anterior pelvic tilt, judging by your second picture. Is that something you're aware of?
Comment: Yeah but is there something wrong? I feel bloated constantly. I eat healthy like tuna, peanut butter, fish, chicken, Greek yogurt, veggies. I don't need a visible 6 pack when i am relaxed but it sticks out so much and I want it to flatten a little bit. I do a large variety of body weight exercises every day and I try and do a HIIT exercise every night but it's difficult to always do that.
Comment: @ryleemcneely how does anything in your comment relate to the problem? Just because someone told you those things are healthy and you work out a lot the universe doesn't grant you 3 wishes and a flat belly. We are human and we have flaws. If you don't earn money with your body you should maybe think ahead a bit. 50- 60 more years to live, better get a more healthy approach to fitness and set smarter goals than being scary-thin
Comment: It relates to the problem because I am trying to figure out if I am missing that key component. I am doing a lot to achieve MY goal but needed some input that would help. Everybody has their OWN goals, So you should rethink what you just said.
Answer: Hope you still can read this. This is absolutely not normal. I have had this issue for three years. During these years I was trying to fix it, but I couldn't. Because of the bloating, I wasn't able to eat any food, I stopped two semesters from college, and quit my job. It started with bloating then hemorrhoids then finally gas and fecal incontinence. ONLY LAST WEEK (7 days ago) I figured out the solution to this problem. It was tight  hip flexors which will cause the abdominal stuff to stick out. You need to release your psoas and decompress your lumbar spine. Also strengthen your glutes and your actual abs! (Cause a lot of times we depend on psoas "lower back" during abs excersises). This is my experience and many has benefited from this. I just wish that more people will stop suffering from IBS and bloating.
Comment: Also, train your upper back (muscles just beside the upper spine). the more muscled your upper back is the flatter your stomach will be.


Is there a way to read Tor bundle's session cookies?

Question: Both local storage and the built in cookie viewer don't show anything. Reading document.cookie from the console only shows some of them (missing cookies with HttpOnly set). Is there a way to read all of current site's cookies in Tor?
Comment: I might be wrong, but I think that this is a feature/annoyance not just of Tor Browser but of Firefox in general when one is using private tabs. I frequently find in Firefox that I want to clear the cookies from a particular tab but when I try to look at what cookies there are, none show up. The only solution I have found in Firefox generally, is to close the browser and re-open it. In Tor Browser, I have found that using the Tor button to request a new circuit for the particular site will also solve the problem and clear the session cookies.
Comment: Thanks for the input - my problem was reading them tho. Wanted to grab the session cookie to test some scripts against .onion sites (or something like that, don't remember the specifics anymore).
Comment: This won't help you (!) but I just found a relevant bug report for Firefox, although the developers say that it is not a bug but a deliberate strategy: https://bugzilla.mozilla.org/show_bug.cgi?id=823941
Answer: It's a little cumbersome but technically works:
In the developer tab when you select a request you can view the cookies which were sent with it (including HttpOnly cookies).


Why is a separate repeater required for digital modes? Why can't an analog repeater be used for digital modes?

Question: Regardless of the mode: digital or analog, the radios always transmit sinusoidal EM waves. So wouldn't a regular analog repeater be able to rebroadcast that EM signal regardless of its encoding?
Comment: Welcome to ham.stackexchange.com!
Answer: There is a kind of repeater that can repeat any kind of transmission: it's called a linear translator. It's technically equivalent to an SSB receiver linked to an SSB transmitter. It works for any mode because SSB is simply a shift in frequency. Other than the change in frequency, the baseband and RF signals are linearly related. This is also why an SSB tranciever can be used to implement any digital mode, like PSK-31, FT8, and so on. The only requirement is the SSB radio's bandwidth needs to be wide enough to accommodate the mode.
This linear relationship does not exist for FM. For FM, only the phase of the input is relevant, and so as part of the demodulation process information about amplitude is lost. This means an analog FM repeater can't repeat any mode: it can only repeat modes that don't rely on changes in amplitude.
Theoretically this means an FM repeater could be used for some but not all digital modes. In FM demodulation, higher deviation in the RF signal relates to higher amplitude in the baseband signal. If the repeater includes any kind of AGC this will result in the input and output RF signals differing in deviation. Some digital modulations rely on the deviation to be some precise value, and so this further reduces the set of possible digital modulations that an analog repeater can repeat.
Besides AGC, an analog repeater might have additional filtering which distorts the digital modulation in ways that prevent demodulating it.
Finally, even for modulations that can still pass successfully through this repeater, there are significant technical advantages to using a purpose-engineered digital repeater. An analog repeater, with no knowledge of the modulation or coding of the signal, can only repeat exactly what it received, noise included. A digital repeater however can demodulate and decode the signal to recover the original digital message, then re-encode and re-modulate it, re-transmitting an equivalent signal with no noise. This significantly extends the useful range of the repeater.
Comment: Holy heck, what an answer.  Bravo.
Answer: Part of what makes a repeater valuable is it filters out "invalid" or weak signals.  This makes them efficient in power use as it's not transmitting all the time.  This makes them valuable to the users as they aren't hearing noise all the time through their radios.
What makes the signal "valid" is having sufficient power, at the correct kind of modulation, and often with other factors like a PL tone.  Once it is considered "valid" then it repeats the incoming signal on its outbound channel.
There are repeaters made to repeat digital and analog signals, they are still transmitting a phone mode but with the "valid" signal being FM or a specific digital phone mode.  Depending on how the repeater is configured it can then transmit the same signal it receives or convert the audio to FM for backward compatibility with those that have not yet upgraded to digital radios.
A digital signal can be sent through an analog repeater but it must be done in a way that is compatible with the analog systems it uses.  A series of DTMF tones is a simple example of digital information sent by an analog repeater.
A linear translator can retransmit an analog or digital signal, as pointed out by W8II in another answer, but this comes with costs.  A linear translator will retransmit the noise with the signal.  An analog repeater will do this as well to some extent but the noise is not retransmitted constantly and the inherent filtering of demodulating and remodulating filters some noise.  A digital repeater will cut out more of the noise because of this same demodulation and remodulation.  Without that filtering the increased range benefits of a repeater will be diminished.
Linear translators are still used and considered superior in many applications from a repeater precisely because it doesn't try to demodulate.  This means it will work with any kind of modulation so long as it fits within the frequency, power, and other limits of the translator.
Comment: Interesting fact: Many satellites are linear translators - so-called "bent pipes"


Windows installer does not boot on windows xp

Question: i have installed Windows installer wubi.exe but does not boot, how to dual-boot? how to initialize ubuntu, i did it on windows xp
Answer: Try mounting the iso file in a usb disk in windows using rufus http://rufus.akeo.ie/ this will create a mountable usb disk. Restart your computer with usb stick plugged in, it will automatically take it to ubuntu installation.
Answer: Are you saying you ran Wubi on Windows XP, followed all the steps in the setup, choose reboot at the end, and then your PC didn't boot into Ubuntu after that?
If so you might need to change the Boot settings. In Windows, Right-Click "My Computer", click Properties-->Advanced Tab-->Startup and Recovery-->Settings. From here you can change the default OS to Boot from and also add a Wait period for you to select an Alternative OS during boot.
Answer: Adan's solution might work, but this answer is better. Reinstall. Something obviously went wrong so just add/remove programs uninstall Ubuntu and install again. Ubuntu in the Wubi install is treated like an App. If you just installed it and it failed use my answer. If you have data that you love on there then uses Adan's answer.


Is the letter "c" always silent in words which have the letters "sc"?

Question: In words which have the letters "sc" is the letter "c" always silent? (for example: Fascinate)
Comment: Here's a list of some words that have a silent "**c**" in them: abscess, ascend, ascent, conscience, conscious, crescent, descend, descent, disciple, fascinate, fluorescent, incandescent, isosceles, luminescent, miscellaneous, muscle, obscene, resuscitate, scenario, scene, scent, scissors
Answer: "sc" is pronounced as "s" before letters Y, I and E in the beginning or middle of a word, or at the end of a word followed by E:

scene, descent, scythe, science, convalesce...

In most other cases it is pronounced as sk:

scanner, scope, scratch, scream, scum...

There are exceptions where "sc" is pronounced as "sh":

Crescendo, fascist, conscious...
Comment: @Tonny - Even among native speakers, "scythe" is likely a word many might have never heard spoken aloud, only read, as it's not a common item anymore and there would be few conversations involving a scythe.  Regardless, the 'c' is indeed silent.
Comment: @Tonny: Merriam-Webster agrees with SovereignSun: https://www.merriam-webster.com/dictionary/scythe
Comment: Maybe I'm a sceptic, but I don't believe this answer is always true.
Comment: Funny you mention scythe, I have NEVER heard it pronounced as sythe, but always like skythe. Could be that I have heard this particular word only in in-game chat (Diablo3) were this is a popular weapon so people talk about it. And most people I play with are non-native speakers. Except for the Aussies I hang out with, but whether their English is exemplary in this case I'm not sure....
Comment: Note that **c** alone also is (often) pronounced as **s** when it occurs immediately before **e**, **i**, or **y**: cede, cider, and cyan, but cat, cot, cut, clear, and cream.
Comment: I don't know whether my pronunciation is typical or not but out of your "sh" examples conscious is the only one I pronounced with a "sh". Crescendo and fascist are both pronounced with a "s". My accent and language is Australian English in case that makes a difference.
Comment: @Peter Maybe in some way you are right.
Comment: Interesting, @Potato44. My experience is almost the opposite; _crescendo_ and _fascist_ always have a "sh" and the middle of _conscious_ is neither "s" nor "sh" but "ch" instead.
Answer: No, "sc" does not always correspond to /s/.
As SovereignSun mentions, usually this pronunciation only shows up in the combinations "sce", "sci" and "scy". A somewhat common exception to this in British English is the word "sceptic", which is pronounced with /sk/. The prounciation /ʃ/ shows up in a few words where "sc" is followed by "i" or "e". Sometimes this is due to palatalization in English, and sometimes it is due to influence from Italian.
In the combinations "sca", "sco" and "scu", we usually have /sk/.
The combination "scr" is usually pronounced /skr/.
The combination "scl" is rare. It occurs at the start of some words from Greek like "sclera", "sclerosis", that are pronounced with /skl/ in educated speech (there many be other pronunciations in uneducated speech). The word "muscle" is pronounced with /sl̩/.
The combination "sch" is very variable and may be pronounced as /sk/, /ʃ/, /stʃ/, or even /s/ depending on various factors. Related ELU question: What effect do neighboring vowel-letters have on the pronunciation of the letters "sc" in a word?
Answer: No, it is not always silent. "Scar" rhymes with "car, pronounced "kar."
English orthography is a mess. Virtually any rule you care to make will have exceptions. One reason for the frequency of exceptions is that English is happy to accept words from other languages, which have their own rules of orthography.
Comment: "'Scar' rhymes with 'car'" This would be true even if the c were silent (or pronounced as any other consonant). I don't think "rhyme" is the word you're looking for here.
Comment: I think eyeballfrog's point was that "sar" would also rhyme with "kar"? So, saying that it rhymes doesn't tell you anything about the initial "sc" pronunciation, it only tells you about the vowel and the ending.
Comment: English indeed does have a lot of loan words.
Comment: It's fundamentally the same as the rule in Spanish, which is usually regarded as having one of the simplest orthographies ever. One of its biggest irregularities is that C and G do one thing before I and E, and another before A, O, and U :)
Comment: @eyeballfrog You're correct. Saying that "scar" and "car" rhyme means nothing if you do not know how to pronounce "car." Among native English speaker, "car" is pronounced "kar." So you are strictly correct that my answer is insufficient for those who have not yet learned how to pronounce "car" properly in English. Thank you. I shall edit my answer to clarify how "car" is pronounced in standard English. (Yes, "rhyme" was exactly what I meant, but it was a poor choice without elaboration because it assumeds that readers know how car" is normally pronounced in English.)
Comment: 'The last three letters of scar are pronounced the same as *kar*' makes more sense. Not only rhymes, but sounds identical. Does that mean they still rhyme?


Are there situations where a time signature is unknown?

Question: My understanding is that a time signature like 4/4 time is known because certain beats are emphasized, for example: ONE, two, three, four. But let's say someone created a song with tempo alone (ie just used a metronome) and didn't emphasize any beats. Then can a song's time signature be simply unknown and cannot be categorized into 3/4, 4/4, 2/4 etc?
Comment: People have been doing this for a thousand years (literally!) already. Listen to some plainchant (Gregorian chant) on YouTube. It has a regular pulse, but no time signature.
Comment: It's very common in rock music too. The most famous example is ``Master of Puppets``, where the verse ends with a completely non-signatured phrase, somewhere between 5/8 and 6/8, but the missing roughly-32nd note is not by design - and that would be nigh on impossible to count anyway.
Comment: A propensity for pattern recognition is one of the things that makes us human, as is an opposing thumb- so handy when that soap gets away, @Richard. With or without time signatures, we'll always go hunting for patterns. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4141622/
Comment: Try tapping your foot along  to any Ozric Tentacles piece. I do it for fun sometimes... It's a bit like trying to pick up soap you've dropped in the bath..
Comment: @AreelXocha How funny that I got a notice for your message, even though it was for a different Richard! But yes: pattern recognition is a huge part of being a human and of being a musician!
Comment: And good it is to know that one can enjoy metric and saponic elusiveness in the comfort of a bathtub.
Answer: It can happen when the groupings of note change per measure and don't stress any exact metric pattern. While not common, it can happen and the most famous example of this is in the 3rd movement of Quartet for the End of Time.

As you can see the tempo is defined, but the meter is not.  The eighth note gets the tempo markings, but it's not technically the beat because there is none. Listening to it should give you an idea how it flows. The most interesting thing to me is how the bar line is kept not because of the metric hierarchy, but to show accents in place of it.
Comment: Another example is Pan from Britten's Six Metamorphoses after Ovid: https://www.youtube.com/watch?v=hLxWE_7XiWk  It's written without a time signature and the measure lines are used as phrase markings
Comment: Video link is dead.
Answer: Indeed, some songs' time signatures cannot be neatly categorized into 3/4, 4/4, 2/4, 9/8, 5/4, etc.
Songs in free time aren't notated with any time signatures at all. Satie was pretty fond of writing such pieces.
Songs in mixed meter are notated with time signatures, but they change time signatures as necessary (and sometimes pretty often). Perhaps covertly the most famous mixed-meter song is "The 12 Days of Christmas". Other mixed-meter songs that stick out in my mind include Stravinsky's "The Rite of Spring" and Dream Theater's "Ytse Jam".
Comment: I can't believe I never noticed the meter of *The 12 Days of Christmas* before!
Answer: Would you count music without even tempo? Lots of Penderecki has just minutes and seconds of elapsed time marked off. There's no meter or tempo. And there are lots of vertical dotted lines to show where the different changes in the music line up between instruments.
Also the theme to The Terminator is based on a loop that doesn't really fit in a time signature or meter.
Comment: Great point. Philosophical question: in Penderecki, is the BPM then 60?
Comment: @Richard I would say there are no beats in the first place, so there's no meaning to the idea of "beats per minute". Another way to look at it is BPM would be 0.
Answer: One genre where a time signature is completely alien is plainchant:

This even applies where "chant" is written out on five lines:

English has time-based stresses, so the notes are compressed in some cases (like "God" in "Let God arise") so that the stresses in the words come as they would be spoken. The stressed syllable "rise" is as long as the three notes on "God a-", in order that the next stressed syllable, "let" falls at the right time. But that would be extremely complex to notate in the normal way, so a different convention is followed.

Images: Sanctus from Mass XVIII, my origination; Introit for Sunday 17 by Robert Rice in his collection St Michael Antiphons.
Comment: I'm curious; how did you typeset the *Sanctus*?
Comment: @Richard I'd like to say it's terribly complicated and needs specialist software costing thousands, but in fact t's a font. And it's free. http://www.saintmeinrad.edu/the-monastery/liturgical-music/downloads/fonts-and-documentation/
Comment: Interesting, thanks. i didn't know if it was LilyPond or a font used in another program.
Answer: To add to Andrew Leach's answer, another historical example of music without time signatures is the French prélude non-mesuré for harpsichord or lute, which was in vogue during the mid=to-late 17th, early 18th century. Composers of such pieces didn't even notate rhythms, leaving those up to the performer. (Although of course certain implicit stylistic conventions would have been assumed known to any competent harpsichordist or lutenist.)
An example of an unmeasured prelude with sound and notation.
Comment: this seems to not have a constant tempo either


Variable has already been used before and assigned a value

Question: I' am making a bot for my assignment which uses proxy to browse websites. I have field called "Browse" which lets me browse for the proxy file and reads into an array and shows the total number of proxy from the counter. I' am stuck here in the following. The following are the code that am currently using. Please help

Variable proxyArray has already been used before and assigned a value. A null
  reference exception could result at runtime.

Code
Private Sub browserProxy_Click(sender As Object, e As EventArgs) Handles browserProxy.Click
        Dim myStream As Stream = Nothing
        Dim selectedFile As String
        Dim openFileDialog1 As New OpenFileDialog()
        Dim proxyArray() As String
        Dim totalProxy As Integer

        openFileDialog1.InitialDirectory = "C:\"
        openFileDialog1.Filter = "Text File (*.txt)|*.txt"
        openFileDialog1.FilterIndex = 1
        openFileDialog1.RestoreDirectory = False

        If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
            selectedFile = String.Format(openFileDialog1.FileName)
            Dim objreader As New System.IO.StreamReader(selectedFile)
            i = 0
            Do While Not objreader.EndOfStream
                proxyArray(i) = objreader.ReadLine
                i += 1
            Loop
            totalProxy = i
            objreader.Close()
        End If
    End Sub

This pops up during runtime.
Answer: The compiler is right, you have declared the variable proxyArray but you never initialize it. This is an initialized array with 10 strings that are Nothing
:
Dim proxyArray(9) As String

But since the number of items is unknown you should use a List(Of String) anyway. It is resizable whereas an array has a fixed size.
Dim proxList As New List(Of String)
'...'
     proxList.Add(objreader.ReadLine)

If you need an array you can use proxList.ToArray() at the end.
Answer: Either use a List(Of String), or ReDim Preserve proxyArray(i + 1) each time.


Does anybody have more information about this inventor?

Question: Does anybody have more information about the inventor for patent application US20120276518?
Answer: Not sure if you are impressed with this application's specific contributions or the general field of 3d printing of organic structures.
Regarding this particular document - the file history of this application titled  Method and Device for Perfusing Tissue by ExVivo Attachment to a Living Organism says the inventor, John Archie Gillis, is from Halifax Canada.
The application looks like it was done without professional help, to its detriment in my opinion. I have no idea if that is reflective at all about the quality of the science. At this point it is an application that has not yet been examined on its merits (as of Feb. 2013).
Answer: See this link to find other inventions from the same guy.
http://worldwide.espacenet.com/searchResults?compact=false&ST=advanced&IN=Archie+Gillis&locale=fr_EP&DB=EPODOC
Answer: This is one of my inventions (I am Archie)
In my preferred embodiment of the method the patient himself or herself will function as the bioreactor for the development of a neo-organ.  If the patient in need of the organ is not healthy enough, than a healthy human would perhaps volunteer or accept payment to build a donor organ and said patient would function as a bioreactor for someone in need.   I would liken it to someone donating their kidney, but with much less to lose.  The volunteer would need to be a match and the process may be a little risky at first, but over time and with lots of testing I'm sure that we could make it a very safe procedure.
Essentially we would harvest the cells from the person functioning as a bioreactor and then cultivate the cells (and perhaps preserve them) for when we decide to begin the process of fabrication.  This would eliminate all of the immunogenicity issues during the fabrication process.  Once the organ was completed it would be detached from the person functioning as the bioreactor and it would be implanted into the patient that needs the donor organ.  This patient would still require immunosuppressant medication, but they would at least have found the organ that they need.
I'm not sure of the ethical implications of hiring a human to be a bioreactor for a number of weeks or months, but it seems less invasive and somewhat less ethically controversial than asking someone to donate a functional kidney.  There may be some people that would welcome the opportunity to help another human or in some instances earn money for their stay in a medical facility to save a persons (or loved ones) life.


Should I use the real name or attempt to describe?

Question: I'm writing a story in a fantasy setting, where there are characters who dress with ancient Egyptian type clothing - such as haram pant and usekh collars.
Since the story is a fantasy and not set in the real historical Egypt, should I call them by their proper names?
I can't find a comfortable way to describe such particular dress pieces without it seeming forced or unnatural.
Comment: Hello! I took the liberty to edit your question and tags to make it clearer, I hope this helps. Welcome to SE!
Comment: If he wore a jacket-like clothing item, or pants; would you call it a "jacket" or "pants"? Do you, for the rest of characters' clothing? :)
Comment: Highly related: [How to refer to clothes without modern words ? (e.g: t-shirt)](https://writers.stackexchange.com/questions/25956/how-to-refer-to-clothes-without-modern-words-e-g-t-shirt/25984#25984).  Ironically, they also were using an ancient Egyptian setting!
Answer: I would call them by their proper names. Normally in a story, you should describe the dress when it matters in the story, the pants or the collar get in the way of the character wearing this garb doing something.
Alternatively, another character unfamiliar with the dress can describe what he sees (or the narrator of the story can describe how he sees it).
Finally, if the unusual clothing never matters in the story: No character cares about it, likes it or dislikes it, infers anything from it and nobody is influenced by it, and the clothing itself never has an impact on the story or anybody in it, then it doesn't matter what you call it. In my stories, the clothing would not even be mentioned if it absolutely doesn't matter.
But if somebody likes it or thinks it looks cool or wishes they had it, then from that person's POV the clothing can be described, along with what they like about it.
The only exception I can think of would be screenplay or play writing, in which case it is a costume choice and should be referred to by its correct name and needs no description. The opposite is true for a novel: Don't put JUST correct names in, with no description. Do not expect readers to look it up, and it is your job to get the reader to see what you see.
Comment: I think a lot of it depends on the narrator of the story. If the narrator has never been to Earth, they may not come up with the same names as we have. I think description is more important in this context. Now if the narrator has had experience in ancient Egypt or researched Earth at some point, then yes using the proper names sounds the way to go.
Comment: @BugFolk With that reasoning, if the narrator has never been to Earth, how can they come up with _any_ word that we would understand?
Comment: @BugFolk I'm with Amadeus' last few sentences. Don't make me look it up. Give at least a rudamentary description. I can look it up if I'm curious and want to learn more, but don't make me look it up to understand the story.
Comment: @Muschkopp They likely wouldn't but you have a point. Balance. Usekh collars isn't just a generic neck piece, but something very specific to a particular culture. A reader who knows what one is may expect the culture in the book to be more familiar with Ancient Egypt. Those who don't may have to pause to do quick research to figure out what they mean.
Comment: Either way as soon as a reader makes the connection Usekh collars = Ancient Egypt. haram pant = Egypt/ Middle East. They are going to make comparisons based on what they know vs. the book. If the book is just using the clothing but not the culture or the location, the reader may get whiplash wondering, "wait I thought this was set in Ancient Egypt or a desert, not a snowy tundra on planet A."
Comment: @ Michael Kjörling agreed.
Answer: In my humble opinion, there's nothing wrong in principle with using the name for Egyptian clothing or the clothing of any other culture. This has nothing to do with whether the characters or narrator in your story would be familiar with ancient Egypt. It has to do with the fact that your story is, presumably, written in English.
If I was writing a story set 5000 years in the future involving people who had never heard of Earth, I would not hesitate for a moment to say that a character was wearing "pants" or "a hat". I would similarly have no hesitation saying that someone was wearing breeches or a turban or carrying a sword or living in an adobe hut. Yes, characters in the story probably don't speak English and wouldn't know these words. But the story is written in English, so I assume everything is supposed to be translated anyway.
The only thing that would make me reluctant to say that a character was wearing, for example, a "usekh collar" is that I would not be sure that my readers would know what it was. I don't, and I think I'm a reasonably well-educated person. I think many readers would have to look it up, or more likely, would not bother and just skim over it and thus miss whatever significance it is supposed to have in your story.
Ditto to the point made by several others that you should only bring up what the characters are wearing if it's relevant to the story. If you want to make a point that these people are from another culture and the hero cannot help but notice their unusual dress, then certainly mention it. Or if it's relevant -- the heroine cannot run fast in her voluminous Victorian skirts or the hero uses his tie as a rope or whatever -- cool. But avoid excessive descriptions that just bog the story down. Like, "And suddenly, an assassin leaped out and attacked him. The assassin was wearing brown pants and a blue shirt. The pants were slightly worn around the knees but otherwise in good condition. The shirt had white buttons, but one button was missing on the left cuff ..."
Comment: Good answer. The excessive description of the assassin's clothes made me laugh!
Comment: @storbror Unlike the character focuses on details all the time, to the point of being crippling — sort of a Sherlock Holmes who can't ever stop observing even the tiniest detail about everything. Although then the description becomes a character-development detail rather than a clothing-description detail.
Comment: @storbror oops, that should have been "unless," not "unlike." my bad! :) Yes, I meant that you could use that excessive detailing to show that the character can't ever turn off his/her observing, even in a crisis. In that situation, *what* the character is observing is almost irrelevant. You're showing that the character can't stop making note of every tiny detail about everything. You wouldn't want to have that kind of obsessive detail in a scene for no reason — Jay is using it to demonstrate that it slows down the flow of the scene.
Comment: @LaurenIpsum In a Sherlock Holmes story, all these tiny details always turn out to be relevant to the plot. Holmes notices that the hat is of a style that was popular 10 years ago but has gone out of fashion, and this proves to be a crucial clue in solving the crime. But yes, the fact that a character obsesses over tiny details of how people dress could be an important point in character development. And of course how people dress can be relevant: it says something about a man that he always wears a suit and tie even when others around him are wearing blue jeans and T-shirts, etc.
Comment: wow, @LaurenIpsum at first I read your comment as "storbror, unlike the character, focuses on detail all the time, to the point of...  sort of a Sherlock...", which I took as a (weird, to some) compliment for a split second before I realized that you, of course, haven't read any of my work. I suppose you mean that this sort of excessive description is more useful in showing(/developing) character than it is in the flow of a scene or a story?
Comment: Yes, exactly. Holmes picking out all the wee details says something about *Holmes,* so it becomes relevant to the story. If you don't have a character like that, then that level of description is irrelevant and slows down the pacing.
Answer: Edit to clarify
Apparently a lot of people in the comments were confused about what I meant, thinking you couldn't use any words at all to describe things, because words originated here on Earth. That's not what I meant. However, because I did not explain my standing fully, I will do so below. I have removed the original answer.

One of the attractions of fantasy worlds is that they are different from our own. Some readers read fantasy for that very reason. That's why you want to avoid breaking that reality and bringing them back to the real world (and likely the real world problems they were trying to escape from in the first place). With me so far?
There are a few things that can break the fantasy-reality. One of the most common is referring to objects that do not or should not exist in the fantasy setting.
If you are relating a tale about elves, dwarves, a dark lord, and a familiar quest to destroy a powerful artifact, you do not want to describe elves as wielding shotguns, or dwarves as possessing kevlar. Unless your story is urban-fantasy, steampunk, or something similar. For the sake of clarity, we will ignore that possibility for now, and assume that the theoretical story in question is high fantasy.
Note: Because some people are still reading too much into this, I have to say that it should not be assumed I am saying elves cannot carry shotguns. Remember that I am using a High Fantasy Setting as an example. Elves generally use bows, swords, and/or magic in High Fantasy. If the shotguns reference just isn't working for you, replace the word with 'mathematical calculators'. The effect should be the same.
Why don't you want shotgun-carrying elves? Because - unless shotguns are inherently part of your fantasy-world - they are a tie back to the present times, the real world, and anything your reader might have been trying to escape.
What if you do, in fact, have elves carrying 'staffs' that are, in effect, shotguns? This is, I believe, what the OP is asking about (he has people wearing Egyptian clothing when no Egypt has ever been present). At that point you describe the 'staff', give it a different name, and carry on with your story. It's fine if the reader deduces the staffs are in fact shotguns. In fact, that's a good thing, because then they'll be able to relate to the appearance of a shotgun, rather than having to rely on your description. As long as you never actually call it a shotgun, the fantasy-reality remains unbroken.
What I am not saying: Does this extend to everything? Should you, for example, never call something a hat, simply because we have hats here in the real world? That's not what I'm saying.
If you have an object - a specific object - which strongly correlates to something not present in your fantasy-reality - be that a person, place, thing, or idea - do not use its proper name. Here are some examples of things you should describe and invent different names for (assuming you are dealing with a high-fantasy setting):

Elvis Presley's hair style. Unless Elvis can travel between worlds in your book, you will be better off describing this and hoping the reader catches the hints.
A helicopter. Helicopters imply a modern level of technology, a technology that is likely not present in your fantasy setting. If you have a flying machine that operates by spinning a blade through the air very, very fast, fine. But don't call it a helicopter, even if that's essentially what it is.
The Sahara Desert. Tempted as you may be to describe something as 'Sahara-like' to show how hot it is, don't do it. Unless you actually have a Sahara Desert in your novel. Describe the heat.

Here are a few things which you should use the proper names for:

A hat. Hats are largely universal. They are not tied to any particular person, place, time, thing, or idea. If your wizard has a hat, say he has a hat.
The ocean. The ocean has always been there. Unless your world has no ocean or the characters have never seen it, you don't need to describe exactly what it is. Just call it an ocean.
Seals (or other animals). Some fantasy settings remove a lot of the familiar animals. Some don't. Unless your world specifically doesn't have such creatures, there's no reason you can't use them to describe something. Like hats and the ocean, they are not tied to any specific time or place.

So to answer the OP's question directly: should you call Ancient Egyptian clothing by its proper name in a world with no Ancient Egypt? Absolutely not. Why? Because doing so will pull the reader (at least to some extent) out of the fantasy-reality. Am I saying you can't describe clothing as shoes, hats, pants, shirts, robes, sandals, trousers, skirts, gloves, or boots? Absolutely not. If an article of clothing has a specific tie to something only found in the real world, don't call it by that name. Otherwise, you are likely fine.
Now if your fantasy-reality essentially is Ancient Egypt, you have a little leeway, because readers are expecting the garments that go with that civilization. I still wouldn't use the proper name right away. I would describe it, and then name it. If you really wanted to, you could use the proper name then. But don't use it to describe the clothing. Use it to name the clothing. Worst case scenario is that the reader thinks you can't come up with different names. Best case scenario is that you spark an online debate as to whether or not your setting actually is Ancient Egypt, and book sales soar.
Note: Make sure the description of the clothing is relevant. Amadeus has a good point here. If you don't need to describe the clothing, don't describe it. Especially if it's holding you back from writing the actual story.

Those in the comments continue to read words into this answer which are either not here, preposterous in nature, or just pure trolling. Therefore, I will create a disclaimer below, which I will add to as more comments roll in. Since nothing seems to be stopping that inevitable action.
This answer does not say, suggest, or otherwise imply:

That you should not use words to describe things, because words originate on Earth.
That elves/dwarves cannot/should not use shotguns (why people think this is even a relevant comment I do not know).
That I have no evidence for what I am saying. The answer is built around a logical argument which supports my claims. You are welcome to disagree with it, not to act like it isn't there.
That American and/or European culture is universal and all other cultures are somehow unfamiliar or strange. This answer does not support that view, and comes nowhere remotely close to even suggesting it. If you can find exact lines supporting this view, I will gladly change them.
Answer: Another edit to clarify: It's not the use of real world words that is the problem but how specific you get when describing.
Usekh collars = Ancient Egypt.
harem pant = Egypt/ Middle East. (I believe most people think those locations first in mind.)
If you're describing something so specific that readers have to do their own research to figure out what it means, it creates a couple problems.

It stops the flow of events for the readers not familiar. They have to put the book down or open another tab to research. They might get pulled into the research and forget to return to the book.
Those who do know what those words mean will have an expectation based on what they know. They may expect the in book culture or the author to be familiar with Ancient Egypt and use that as a template for understanding your story.

Either way as soon as a reader makes the connection Usekh collars = Ancient Egypt. haram pant = Egypt/ Middle East. They are going to make comparisons based on what they know vs. the book.
If the book is just using the clothing but not the culture or the location, the reader may get whiplash wondering, "Wait I thought this was set in Ancient Egypt or a desert, and I expected this response to happen based on what I know about Egyption culture, not to have it used this way and the location to not be on a snowy tundra on planet A.
That's why I go back to the questions of why you are picking these items for your story, their meaning and the culture you are working on. That way you can help make it less problematic if the reader knows right away this culture is very different in spite of using/ wearing items common or specific to both cultures.

Unless your narrator or one of the characters in your story world is familiar with ancient Egypt and their culture, I believe it would be better to come up with a description. You may be able to pull off a comparison if the narrator has experience/ knowledge of ancient Egypt.
Also, I agree with others, the very specific use of names stand out. I had to do a quick google search to make sure I had the right visual in mind for what you were describing. Even if you go with the Ancient Egyption name for your characters' clothing, you'd still need to describe it.
Also it may help to understand what the significance of the clothing is, why its being shown in the story. Is it for ceremonial purposes, formal wear, or something else? Is it important to the plot?
Answer: I'd be careful with it either way. Remember, if you are writing, that means that the only picture your reader is getting, is the information you give. The means you need to be aware of the communication 'packages' you send through words.
Let me show you what I mean.

Tralacktep grabbed his anchorac and slung it over his shoulder. The weight comforted him as he walked through the prand and out into the zarak.

What the heck did I just describe? Sure, from the PoV character, who is a warrior raised in this alien civilization, and would therefore understand it perfectly. But your readers are likely here on Earth, and might not appreciate all too much whatever they just read. But. If you put it like this?

Tralacktep grabbed his studded club and slung it over his shoulder. The weight comforted him as he walked through the temple arch and into the courtyard.

By using words your audience would understand, words that resonate with them, you are far more likely to paint a picture they can understand. Using the alien's tongue is only useful if you can first establish what those words mean, but that means you expect your readers to remember all that; good luck with that.
So, if set in Ancient Egypt, who but Egyptologists could appreciate the 'proper' name for their pants, or their shirts, or their jewellery? Unless your target audience is those same Egyptologists, you'd better figure out a way to keep everyone on the same page.
One way to do it would be to show a young child being dressed by his/her mother. The child could be complaining, "But momma! I don't wanna wear a haram! Can't I just go play?" If the only thing she's helping him with is his pants, you thereby establish the pants' name: haram. Otherwise, 'haram pants' works.
As an aside. I work on a lot of Anime Fanfiction, so I write in predominantly Japanese settings and in their culture--often in Edo Period Japan. Now, that means talking about female fashion (my MCs are typically female). So talking a lot about kimono, styles of kimono, and accessories thereof. Like the obi (if you know nothing about kimono, you have no idea what that is) or zori (ditto). So how to address it?

She stood as still as she could, allowing her handmaid to wrap the obi belt around her, as tight as possible. She hated how constricting her formal kimono were, but mother would never approve of her looking anything but her best with the daimyo hosting them this evening. The DAIMYO!
Granted, he was but a regional lord, a lesser noble compared to the Mikado. Still! This could well prove her ticket up in the world! Best to obey her mother, just to be sure. She wouldn't steer her own daughter wrong!

You still follow the scene, whether you understand what the obi is. Even if you don't know what a 'daimyo' is or 'the Mikado', you can understand in context that they are important people. And given, "Granted, he was but a regional lord, a lesser noble compared to the Mikado." It becomes more obvious that they refer to nobility, important people, people this woman clearly desires to impress.
Work it in through context. It should help.
Answer: What do you want?

Do you want readers to think that they are in some kind of alternative fantasy ancient Egypt? Then call those clothes "haram" and "usekh".
Do you want readers to think that they are in a world completely unrelated to any historic period on Earth? Then
a. describe the clothing or
b. use non-culture-specific terms (such as "pants" or "collar") or
c. make up your own clothing terminology

But beware.
If you choose (1) because, as your question implies, you think that Egyptian clothing names make it more clear to the reader what kind of clothing you refer to and you won't have to describe the clothing if you use them, I must disappoint you. I have no idea what "haram pants" or "usekh collars" look like, and I suspect that the average Westerner doesn't know either. So even if you used those terms you would have to describe the clothing anyway (if their style and look was important to you). Using those terms brings no advantage (because most readers aren't familiar with them), so you might want to stop obsessing about them.


How can I make a macro for rage in Roll20?

Question: So I'm playing using Roll20, and I just took a level in barbarian. I want to save my DM time and set up a macro for rage myself, problem is I have literally not a clue how macros work and the 3.5e character sheet hurts my brain before I even start looking at code. How can I make a macro in Roll20 (unless anyone have a pre-buildt macro by chance)? We use the action bar.
Comment: You might find it easier to maintain 2 character sheets, rage and non-rage, rather than trying to build a macro.
Comment: Also, Welcome to RPG.SE! Take the [tour] if you haven't already, and check out the [help] or ask us here in the comments (use @ to ping someone) if you need more guidance. Good Luck and Happy Gaming!
Comment: To clarify, are you looking for modifications to your attack and will save macros to prompt for whether you're raging (i.e. something that can be done with pure macros) or are you looking to toggle a "rage mode" on your character sheet via a macro (which would require API backing)?
Comment: Hey @voidsta it looks like you have accidentally created multiple accounts and that is why you are unable to comment here (I converted your answer into a comment for you though!). To solve this issue [go here](https://rpg.stackexchange.com/help/merging-accounts) and follow those instructions to merge your accounts back together.
Comment: @Craig Meier
Whichever you think would be easier, as I've said I have no idea how macros work so I'm looking to keep it simple. (I also cant comment or spell apparently)
Answer: For the purposes of this answer, I'm going to assume you're at a level where your rage gives you +4 Str/Con and +2 Will. Changing 4's and 2's to 6's and 3's or 8's and 4's is left as an exercise to the reader.
API Script
If your GM has a sufficiently high subscription level to enable the API and are willing to add the ChatSetAttr script, then it would probably be easiest to set up a pair of macros to enter and exit a rage state:
!modattr --sel --str-tmp|4 --con-tmp|4 --willtempmod|2

will increase your temporary Str and Con bonuses on your character sheet by 4 and your temporary Will bonus by 2 (assuming you're using the default D&D 3.5 character sheet; if not, you'll have to change the attribute names to whatever it uses) if you execute it with your token selected.
!modattr --sel --str-tmp|-4 --con-tmp|-4 --willtempmod|-2

will decrease those stats by the same amount. If you don't use the temporary bonus attributes for any other purpose, you could use the !setattr command instead of !modattr and use 0 instead of negative numbers for coming out of rage, which will ensure that you don't accidentally stack multiple additions and/or subtractions by clicking the button more than once.
If you don't like having to select your token to make it work, you could get your character sheet's ID by typing @{Character Name|character_id} (just type in their full name in place of "Character Name") into chat, then instead of --sel in the commands above, use --charid character_id (or whatever ID get in chat in place of the "character_id"). Putting that all together might look like:
!setattr --charid -Lkld7K_dltcChzLXbID --str-tmp|0 --con-tmp|0 --willtempmod|0

Macros
If the API isn't an option, you'll have to either modify the macros on your character sheet or write your own. There are a couple of reasonable ways to handle something like rage:
Token Bar
If you have one of the bubbles that pops up above your token available, you can use that as a toggle for rage and adjust your macros to include that. If you're using the default character sheet, you can accomplish this by modifying the text in the "Attack Calc", "Damage Calc", and "Crit Calc" fields under the weapon for attacks and the fields under "Show Save Macros" for Fort and Will saves.
In "Attack Calc", there will be a formula for computing your to-hit bonus. Find the part that says @{weapon1stat}[Ability] and change it to (@{weapon1stat}+@{selected|bar3}*2)[Ability]. This will add 2 to your to-hit whenever the third bar is set to 1, leaving your to-hit unmodified if the bar is set to 0. Unfortunately, this will require you to have a token selected, with a 1 or 0 in its third bar (the red one on the left). If no token is selected, you'll get an error about "No attribute was found" and if the bar is empty or not a number the whole calculation will come up 0.
You can make similar changes to the "Damage Calc" and "Crit Calc" fields, replacing @{weapon1damagestat}[Weapon Dmg Ability] with (@{weapon1damagestat}+@{selected|bar3}*2)[Weapon Dmg Ability] (or *3 if you're two-handing). Similarly, the 1d20 + [[ @{fortitude} ]] in the Fort macro can become 1d20 + [[ @{fortitude}+@{selected|bar3}*2 ]], and the same applies to the Will macro.
Prompts
One of the reasons I don't use the attack macros built into the standard character sheet is that they pop up way too many dialog boxes asking me to input stuff I usually don't need to input. But if you're okay with one more dialog box standing between you and cleaving that annoying goblin in half, you can do away with the need to have a token selected. This works much the way the token bar option works, except that instead of adding @{selected|bar3} you'll add something like ?{How angry are you?|Just my baseline level of angry.,0|I hate everything with the white-hot passion of a thousand burning suns!,1}.
More completely, the selection version of the prompt syntax works like ?{Prompt|First Option|Second Option|Third Option...}, where each option can either be just a value or Description,Value. So you could just as easily do something boring like ?{Rage|0|1}.
Character Abilities
As I mentioned above, I don't like all the dialog boxes in the default macros, so I tend to write my own as abilities on the "Attributes & Abilities" tab. The downside is that these can require some manual maintenance on certain level-ups, but the upside is that you get more control over the balance you're comfortable with between few macros which have lots of prompts to handle everything or lots of macros with few (or ideally no) prompts.
While a full tutorial on the macro/roll syntax is beyond the scope of this answer, a good place to start would be to copy the "Full Attack Macro" field into a new ability, substitute in the contents of the "Attack Calc" field wherever it says @{weapon1attackcalc}, and trim out whatever you don't want. If that's overwhelming, maybe just hard-code the numbers for now (i.e. replace @{weapon1attackcalc} with 1d20+7) and find the balance you like between upfront complexity and long-term maintenance hassle.
When you get it looking like you want, you can copy that to a new token action, and modify it to add +2 to hit and damage (or whatever numbers are appropriate for your character). Don't forget to check the "Show as Token Action" box for both so they show up when you select your token.
For further reading, at the bottom of the character sheet there's a section (collapsed by default) called "Roll Templates". This gives some example macros using the templates defined by the character sheet and a bit of documentation on how they work.
Comment: I would move the API script to the bottom of the answer because to does not sound like OP is interested in that much of a scripting solution.
Comment: I suggest putting the token action at the top, followed by macros, and the scripting at the end since a lot of people don't have "paid" subscription levels in Roll20. By the way, I did a token for my brother's barbarian when he rages and he's used it exclusively.