Can Wish give me a contingent spell?

Question: Wish allows the user to "Duplicate any wizard or sorcerer spell of 8th level or lower, provided the spell is not of a school prohibited to you". Is this enough to give myself, say, contingent True Seeing? I'm trying to give this benefit to a caster who hypothetically knows neither Contingency nor True Seeing .
Answer: Yes, it can, and there is no reason whatsoever to think that wish would be required to supply the companion spell—that could just be cast regularly as you cast wish-as-contingency. And if you want to cast wish-as-true seeing as the companion spell, there is also no reason that should fail.
Basically, it works because everything involved says it works, and nothing says it doesn't. You need two castings of wish, but you can cast wish twice so that's not a problem.
Trying to get the final contingent true seeing result from a single casting of wish, though, that would be a "greater effect."
Comment: OK Here I agree
Answer: YES but...
Since Wish only duplicates effects of existing spells, and that Contingency would produce no effects by itself it would fall in the Greater effects category if you don't cast the companion spell yourself or have another Wish mimic the companion spell (Thanks @KRyan)
Wish states:

(...)You may try to use a wish to produce greater effects than these, but doing so is dangerous. (The wish may pervert your intent into a literal but undesirable fulfillment or only a partial fulfillment.)(...)

Sidenotes

If you want to go safe Use Magic Device might be your best option,
there's always the spell Divine Insight (up to +15 on a single
skill check) that could help you with harder UMD rolls. or Greater
heroism (+4) if you want to make it cheap depending on your class.

If you're a wizard with prohibited schools, some prestige classes
might help you but if the spell is just hard to get, you could craft a scroll with limited wish (if the DM agrees) or even Wish to craft a scroll of a rare spell so you can write it in your spellbook! see My answer and Quadratic Wizard's answer to the question:Can you craft magic items using Wish instead of the required spell?
 for more info on the mentionned method.

If you're a sorcerer perhaps Knowstones are    accessible.

Clerics also have access to domains with those spells but you would
cast Miracle instead if you were one without the right domains. Last suggestion, perhaps
Miracle (via an ally maybe?) with the very powerful request option could give it to you, might not be possible unless you're the one to
cast it, if you use UMD to do so... might as well go with
contingency scroll via UMD and True seeing scroll via UMD...

Can Wish give me a contingent spell?


Google Rich Snippet Show Time on SERP

Question: I have done Google rich snippet work on my website  As it shows all good in Google Structured tool but in Google results it does not show anything.
Please provide me information that how much time google will take to show structured data of my website on SERP ?
Answer: The time taken by Google to show rich snippet in its SERP depends on the time it takes to crawl your website once you have implemented rich snippet.
According to Google:

Once you've marked up your site's content, Google will discover it
  the next time we crawl your site (although it may take some time for
  rich snippets to appear in search results, if we do choose to display
  rich snippets for your site). If you're marking up your content for
  rich snippets, you can let us know. Google won't be able to
  individually reply to your message, but we may use the information you
  supply to improve our detection and display of marked-up content.

Google Rich Snippet Show Time on SERP


JQuery fill in of inputs in detached form (hidden filled in but others are not)

Question: On my page I have a dummy form like this:

  <form id="new_form" action="...">
     <input type="hidden" id="hidden_field" name=...>
     <input type="text" id="text_field" name=...>
     <... submit button ...>
  </form>

The inputs values are initially blank.
I need to recreate this form from time to time on my page with different values in the fields. What I do: first I detach the form container from the DOM and store it in a variable:
var dummyForm = $('#form_container').detach();

Then, when I need the form popped up I do in some function:
var newForm = dummyForm .clone()
$('#hidden_field', newForm).val(dataForHidden);
$('#text_field', newForm).val(dataForText);

And then newForm is made visible by attaching it to some element on page.
BUT when I inspect the resulting html of the inputs (or I just inspect newForm.html() in JS debugger) it looks like this:
     <input type="hidden" id="hidden_field" name=... value="xxx">
     <input type="text" id="text_field" name=...>

I.e. the value for hidden field was set, but for text field it is lost.
My questions are:
1) Is this a bug, known issue, as-designed feature, or I am doing something wrong?
2) How it can be solved?
I can think of solution to fill in the fields' values when form is already attached to DOM, but in my case this may be a problem as it is being attached to DOM by another library through some chain of callbacks.
P.S. I was able to work around this issue by doing $('#text_field', newForm).attr('value', dataForText); but still wondering why val() works for hidden fields but not for other types.
Answer: You can try using attr in jQuery
http://api.jquery.com/attr/
Comment: Thanks, that is what I thought about right now and it works, but still wondering why `val()` works for hidden fields but not for other types.


CRC hardware implementation

Question: What is  the difference between these two implementations as the feedback is in first implementation the last reg only but the second implementation last reg xored with the input bit, so, what is the difference and how can i take the output from them ?
Comment: please refer to the answer posted here: https://stackoverflow.com/questions/25415724/understanding-two-different-ways-of-implementing-crc-generation-with-lfsr
Answer: I think the first anwser didn't get the point of the question, though the shift register on the very right side in the first picture is indeed useless and just delays the calculation by one clock cycle as he said, and we can ignore it.
The most significant difference is that in the first picture the MSB decide whether to  enable other xor gates or just shift the bits to more significant bits(which is the same with our calculation steps), while in the second picture the MSB first xors with the input and use the result to decide other xor gates to function or not.
At the beginning, I did't understand the logic of the latter one until I try to calculate the polynomial \$x^3+x^2+1\$ in the latter format(xor with input) and found that this hardware implementation can directly give the mode 2 division of 1000 when you just input the digit 1 and needn't input the 0s suffix(which can save 3 clock cycle in this example). Then after understanding its function, I think it's easy for you to understand the mathematical principle of the latter implementation. And from this point, you can also come up with this idea naturally because we can get the result without the 0s suffix actually so why not design a combinational circuit to implement this logic and discard following normal human's calculation steps to solve this more efficiently?
I encountered the second format when reading the DS18B20 datasheet(actually in most applications) but there're few explanations on the Internet. Most crc principle articles just explain crc with the first format,so that I have struggled the whole afternoon. In this process, I also found an implementation of crc, an 8-bit concurrent implementation, and I think their design principle is similar. It use a more complex combinational circuit to calculate the new result directly within one clock cycle when inputing 8 less significant bits simultaneously, which I think is also beneficial for your understanding.
Answer: The first example does in fact have the input xored with the output. It's just that the input has a pipeline register which will in essence delay the output by one clock cycle. It doesn't change the polynomial or affect the calculation, and could be removed.
The key difference is the number of registers between the xor gates. It is this that sets the polynomial.
In the second case you have three between the first xor gate and the second, giving you \$x^3\$. Then you have four registers between the second xor gate and the output, giving you \$x^3 \times x^4 = x^7\$. Thus you get the polynomial of \$x^7 + x^3 + 1\$.
In the first case you have two between the first xor gate and the second, giving you \$x^2\$. Then you have 1 register between the second xor gate and the output, giving you \$x^2 \times x^1 = x^3\$. Thus you get a polynomial of \$x^3 + x^2 + 1\$.
Comment: Thanks very much but I understand how we translate the polynomial into number of xors and registers but I dont understand the difference in implementation, what is  the difference between the feedback to be the last reg only or the last reg xored with the input ??
Comment: @Arendg Did you read the first paragraph? The two implementations are the same - the feedback for both is xor'ed with the input.
Comment: how in the first implementation the feedback is xored with input  and second question how can i take the output ?
Comment: @Arendg XOR is the (+). Notice how the end of the chain (the output, on the left) loops back all the way to the right where it meets the input. You can ignore the first box on the very right hand side, that doesn't have any influence on the calculated value.
Answer: I have been comparing these two types of implementations and have also struggled to understand the second one mathematically.  It's true they both xor the output of the shift register with the input data, but in the first case it is only the output bit that determines if the polynomial is subtracted from the CRC value.  This is the straightforward case derived from polynomial division.  But in the second case, it is the output xor'd with the input bit that determines if the polynomial is subtracted.  I haven't found any reference describing why this works, but it does seem to work.

CRC hardware implementation


SIM900 and Phone Numbers

Question: How do I add a phone number to the SIM900? Can I add a phone number to the SIM900? Assuming I can, would I send the phone number through the AT Commands or the actual SIM card? I don't know how to write to a SIM card without another phone, so I am lost on how to write it standalone. The purpose of this is that I want to add my phone number to another device that uses Arduino and an SIM900 breakout. It is a project that could use that "phone" to receive calls and SMS and etc.
Comment: A phone doesn't have a number without a SIM card.
Comment: As Matt says, take the SIM out of your phone to test the SIM900. You can get SIM's for pay-as-you-go phones anywhere or get bulk SIMS from a service provider. I get them from T-Mobile for one customer. Verizon doesn't use SIMS and AT&T is impossible to deal with. T-Mobile will send a rep out to see what you need.
Comment: Yes well then how do I add the phone number to the new SIM? Do I just put it into my phone and then setup the number as before? Then once it is in do I transfer it to the SIM900?
Answer: You don't write a phone number to the SIM900.
Your cellular service provider writes the phone number, along with other account information, to a SIM card.  You connect the SIM card to the device.
You will need a separate phone number for the SIM900 - unless you want to pull the sim card out of your phone every time you want to use it.
Even if you could program a new SIM card to have exactly the same information as the one in your phone, your provider would detect that and be very unhappy with you.

SIM900 and Phone Numbers


What kinds of metals need immersion in a mikvah?

Question: Metal (and glass) utensils used for food require immersion in a mikvah. What counts as a metal for this purpose? Note that there is no universally accepted scientific definition of a metal.
Comment: [Bamidbar 31:22](http://www.mechon-mamre.org/p/pt/pt0431.htm#22)
Answer: This article by R. Avi Zakutinsky discusses which kinds of materials need immersion in a mikvah:

When describing the obligation to purify and immerse utensils that were owned and used by non-Jews the Torah mentions only six types of metals; Gold, Silver, Copper, Iron, Tin and Lead. These items need immersion on a biblical level. The poskim discuss whether metals like aluminum or steel, which were not listed explicitly in the verse, are required to be immersed and whether the obligation is biblical or rabbinic in nature. It would seem that according to the Tiferes Yisroel (Kuntres Yevakesh Daas) the obligation is biblical. The Sefer Tevilas Keilim (page 225, footnote 113) cites the oral ruling of Rav Shmuel Wosner shlit"a, that all types of metals, including aluminum and the like, are required to be immersed m'doraysa (biblical law).
Rav Moshe Feinstein zt"l (Igros Moshe Y.D. 3:22) disagrees and he feels that there is no biblical obligation to immerse any metal which was not enumerated in the verse. He explains that G-d was obviously aware of all materials that were in use and that will be in use and if He did not list it in the posuk, clearly He felt that there is no biblical obligation to immerse them in a mikvah. That being said, there is a rabbinic obligation to immerse these utensils due to it's similarities to the metals listed in the verse
Comment: I believe Rav Nachum Rabinovitch does not require the immersion of aluminum. (Seeing as steel is almost entirely iron, I'm not sure who would think it should not require immersion at a biblical level. And, notably, I believe נחושת is better translated as "bronze", rather than "copper".)


Super queen strategy with level 1 archer queen?

Question: Can a level 1 archer queen and 14 healers implement the Super Queen strategy?
Answer: I don't think you need that number of healers, because you have to strike the balance between having your archer queen combo and other troops. There are two reasons why this strategy works better with a higher level archer queen: the archer queen has more health and thus can go in and out of dangerous situations easier, and the archer queen has a high DPS so she can destroy a fair portion of a base in a fair amount of time.
A level 1 archer queen however has neither of these. What could happen if you try to compensate the lack of heal with more healers is running out of time because the archer queen has not brought enough of the base down. Plus without her ability, she's even more vulnerable, for example against high damage defensive CC troops like maxed balloons, dragons and pekkas (if you ever encounter that one) because I'm pretty sure they can knock her out pretty quickly even with healers healing her.
So all in all, yes it can be done, but I would say that you have a really low chance of success (of course, at least against a good TH9 base).
Answer: This strategy has been nerfed in the recent clash of clans update. Any number of healers past 5 or 6 on the same unit has diminishing returns; basically, don't bring much more than 7 or 8 EVER now because 15 healers now heals the same as 7 or 8 anyways because of steep deminishing returns. Plus, 7 or 8 probably doesn't do much more healing than around 5 or 6.
One more thing to add about the strategy, you can actually bring rage potions and rage the queen AND HEALERS. Healers heal faster while under rage, and this is now very important to use in this strategy since you won't be able to bring as many healers. Jump spells and/or lots of bombers are commonly used in this strategy to get the queen to go where you want her to go sooner, since time is a big part of this strategy.
Also, as a general rule, the superqueen strategy requires around a lvl 20 to start being effective at townhall 9, and this is even more true now after the update. This is a general guideline and you can go lower, it just won't be as good as other competing strategies, but it can still be fun! Once you get your queen to around 25 it actually becomes of the best farming strategies there is at TH9.
Comment: +1 for pointing out that multiple healers now incur diminishing returns.
Answer: The Super Queen strategy consists of mainly one Archer Queen and lots of healers. So yes, yes you can. Any other troops added are variations of the strategy and will still be the Super Archer Queen strategy though it is mainly used with high level Archer Queens and low-level bases.


Passport.js + Express.js forward user to original destination after authenticating

Question: I have an app that is Node + Express + Passport on the server and jQuery + Backbone.js on the client.  The client makes use of hash tags in the URL, but for some functionality it's important for the user to be logged in.
I'd like the app to be accessible via URL, e.g. http://mydomain.com/app#cone/waffle/flavor/mint/toppings/sprinkles such that:

if user is already logged in, they go to the requested URL directly without hassles
if user is not already logged in, they go to /login and then go to the requested URL

Following this SO post,
Custom returnUrl on Node.js Passport's Google strategy, I have it so that

If they are logged in already, they go directly the URL, hash tags and all
If they weren't logged, it takes them to the login page, then to the requested url, but...

It seems to strip out the hash parameters from the original URL on the redirect after login.
Is there any way to preserve the hash parameters when redirecting them to the original destination?
From this post, Getting hash parameters from request url I get the idea that the hash tags aren't available on the server, which is the whole point of using hash tags.
So I suspect it's not possible.  Maybe cache the params locally somehow and retrieve them on redirect, say to [original URL minus hastags] + #use-cached-params?
Answer: Hash parameters are browser-only, they won't go to the server. You can use this technique though for redirecting back, hash-tags and all:

GET /some/page#with/hash
logged in? then render the page
not logged in? render a page that has some JavaScript on it, say 'getHash.jade'
getHash.jade: copies the full URL, then redirects to '/login&redirect=' + originalURL
GET /login (now you can save the hash on the server and take it from there)
Answer: Here is how to capture anchor links in a bit more detail. Works across all web frameworks.
I'll use an example scenario to illustrate: let's say we need to capture a deep URL http://server.com/#/xyz requested by an unauthenticated user so that they can be redirected to that deep URL post-login.

The unauthenticated user requests http://server.com/#/xyz (everything from the '#' onwards is not sent to the server).
All the server knows is that the user wants http://server.com/ and that they are unauthenticated. Server redirects the user to a login form.
Here's the clever bit: the client is still waiting on their original request so if the server includes a hidden element in the login form with some JS that references window.location.href, it can capture the full URL of the original request complete with the anchor portion:
<form action="/login" method="post">

    Username:
    <input type="text" name="username"/>

    Password:
    <input type="password" name="password"/>

    <input class="submit-button" type="submit" value="Submit"/>

</form>

The user authenticates themself and the original URL is sent with the POST. The server can then relay the user to the original deep URL.


How do I make a solution of spinach to titrate with pottasium permanganate?

Question: My teacher said something about straining it but I didnt quite get it
Comment: Also see very similar question by OP -- [Redox titration of oxalate from spinach](https://chemistry.stackexchange.com/questions/110457/redox-titration-of-oxalate-from-spinach)
Answer: The best approach is to ask the teacher again after doing some "homework" (i.e. reading and searching). Extracting and then titrating oxalic acid/oxalate is not that easy from spinach. You will need a lot of spinach to extract a titratable amount. Oxalic acid can be extracted by boiling spinach in 0.1 M HCl. However, tons of other redox active substances will also appear in the extract. Direct titration with KMnO4 will give an extra-ordinary large percentage, which is of course erroneous. After extraction, you need to precipitate oxalic acid via some cation. After isolation of the precipitate you would need to bring back oxalic acid into solution, one can do a redox titration. In real-world nobody would use this approach but as an academic project, it could be a good exercise. Again ask your teacher if she/he is willing to go to this extent.


Winter foot warmers for toe strap users?

Question: I've used toe straps on my old Reynolds 531 bike for many years and prefer to use these over cleats. However, as I'm getting older I find my feet getting cold in the winter. Can anyone recommend some warm/waterproof overshoes that could be worn using toe straps? I've done some searching, but most foot coverings seem to be aimed at the cleaterati.
Comment: Have you tried warmer socks?
Comment: @DavidD Yes I have, and still do. However, they don't deal with wet very well
Comment: Why not warmer shoes? I assume you are using "normal" shoes? So why not a pair of waterproof approach or running shoes or (low) hiking boots or something? I'm using shoes with cleats and insulated, waterproof winter mountain bike shoes (Shimano MW7) were an eye-opener for me. How cold is your winter? Down to ~0°C I've found waterproof socks to be sufficient when using summer shoes.
Answer: Try to identify shoes that are wind-proof - I've got toe straps on my wet-day bike, and full-on gumboots are surprisingly warm and dry.
Regular shoes tend to have ventilation else the feet get a bit smelly, but this allows the cold air to enter.
Another option is regular cycling overshoes on top of your comfortable shoes, again to limit cold air and water from entering.  The Cleat hole underneath doesn't affect function too much, but excessive walking can wear them.
Finally - cold extremities tend to correlate with circulation restrictions.  You can try to warm your legs with wraps or thermal leg warmers, which in turn will help the feet benefit from increased blood flow.
Comment: In my toe strap/clip ignorance I'd imagined overshoes came with cleats attached. As there's just a hole for the cleat I should be able to use these with toe clips! Doh!
Comment: https://bicycles.stackexchange.com/users/19705/criggie I now have some wind proof, water resistant bright orange slip-on/stretch over overshoes. I've tried them out once so far and they've kept my toes warmer than before. You can also spot me a mile off! :-D


Is condensation on my seed tray an issue?

Question: I'm growing some seedlings in a tray that has a plastic lid. The sun causes moisture to condense on the lid. I was wondering: is this counter-productive, as the condensation then blocks the sun?
Answer: In my opinion, those covers are a bad idea. They create a breeding ground for fungi.
I think the idea is that they keep the soil moist while the seeds are germinating. I can see through your cover that you have plants up. I have had good luck with uncovered trays and simply keeping the soil moist during germination. (I have had fungus problems in the past when I've tried to keep them covered.)
At any rate, it's unlikely that the condensation is blocking enough sun to drop the temperature inside very far, and not below your optimum range for germination.
Comment: I think it depends where your seed tray is, if you've got it in a greenhouse, then no - don't use the cover, but if you've got them next to your desk at work, then yeah, better to keep it moist. And if you're just putting it out on your back porch only use it when the weather necessitates.
Comment: So there is no point using the lid once all the seeds have germinated?
Comment: @Dan: First, the atmosphere inside the lid will be very moist, you're inviting fungus. Second, before long the plants will be bumping into the lid and you'll have to remove it anyway. I successfully started a couple hundred plants this spring without using covers. The only problem I had was with the two flats that I had covers on because I thought it would be better to keep them more evenly moist... completely lost both flats to a fungus.
Answer: The covers help as they not only trap the water, but they also trap the heat inside which allows for better control of soil temperature.
Each species of seed has an optimal soil temperature at which the highest percentage of seeds sown will germinate in the shortest amount of time. Most seed distributors will print this temperature in the seed catalog or on the seed package.
Answer: Normally, you want to see condensation on your seed tray. It indicates there's a moist atmosphere inside, which is just what the seeds need to germinate. It doesn't block the light in any meaningful way.
I can see that you've got nice green seedlings there, so you're doing great.
Answer: In general, seed trays should be uncovered when you have full germination, or you can lift seedlings into other flats as they germinate.  An anti-fungal can be sprayed or sprinkled on the seed before planting and/or just on the soil surface.  I use ground cinnamon and have never lost a plant to fungus.  In the case of raising orchids, cinnamon should always be used.


No Exception while type casting with a null in java

Question: String x = (String) null;

Why there is no exception in this statement?
String x = null;
System.out.println(x);

It prints null. But .toString() method should throw a null pointer exception.
Comment: what exception are you talking about, compiler ?
Answer: You can cast null to any reference type without getting any exception.
The println method does not throw null pointer because it first checks whether the object is null or not. If null then it simply prints the string "null". Otherwise it will call the toString method of that object.
Adding more details: Internally print methods call String.valueOf(object) method on the input object. And in valueOf method, this check helps to avoid null pointer exception:
return (obj == null) ? "null" : obj.toString();

For rest of your confusion, calling any method on a null object should throw a null pointer exception, if not a special case.
Comment: @JunedAhsan what special cases would cause it not to throw an NPE?
Comment: @Trengot Check one mentioned in Peter answer below.
Answer: You can cast null to any reference type.  You can also call methods which handle a null as an argument, e.g. System.out.println(Object) does, but you cannot reference a null value and call a method on it.
BTW There is a tricky situation where it appears you can call static methods on null values.
Thread t = null;
t.yield(); // Calls static method Thread.yield() so this runs fine.

Comment: Wow. If asked, I would be 100% sure that it would throw an exception. A tricky case indeed.
Comment: Isn't this because compiler in bytecode "optimizes" it to `t.yield() -> Thread.yeld()`  anyway? Similar to how `final int i = 1; while (i == 1)` is optimized to `while(true)`
Comment: @Magnilex: Absolutely! this is a typical OCPJP exam trick question.
Comment: @SGal It's even better because the second optimization is AFAIK not mandatory while the first one kinda is.
Answer: This is by design. You can cast null to any reference type. Otherwise you wouldn't be able to assign it to reference variables.
Comment: thanks! this note regarding to the assigning null to reference variables is really helpful!
Comment: Makes sense. Every time null is being assigned to a reference it is being implicitly cast to that type.
Answer: Casting null values is required for following construct where a method is overloaded and if null is passed to these overloaded methods then the compiler does not know how to clear up the ambiguity hence we need to typecast null in these cases:
class A {
  public void foo(Long l) {
    // do something with l
  }
  public void foo(String s) {
    // do something with s
  }
}
new A().foo((String)null);
new A().foo((Long)null);

Otherwise you couldn't call the method you need.
Comment: In most case the casting is implicit, e.g. `String bar = null;` casts the `null` value to `String`. So far I only had to cast null explicitly in a test where a method was overloaded and I wanted to test its behavior with null input. Still, good to know, I was about to write a similar answer before I found yours.
Comment: Fun fact: `l instanceof Long` and `s instanceof String` will return `false` in these cases.
Answer: Println(Object) uses String.valueOf()
public static String valueOf(Object obj) {
    return (obj == null) ? "null" : obj.toString();
}

Print(String) does null check.
public void print(String s) {
    if (s == null) {
        s = "null";
    }
    write(s);
}

Answer: Many answers here already mention

You can cast null to any reference type

and

If the argument is null, then a string equal to "null"

I wondered where that is specified and looked it up the Java Specification:
The null reference can always be assigned or cast to any reference type (§5.2, §5.3, §5.5).
If the reference is null, it is converted to the string "null" (four ASCII characters n, u, l, l).
Answer: This language feature is convenient in this situation.
public String getName() {
  return (String) memberHashMap.get("Name");
}

If memberHashMap.get("Name") returns null, you'd still want the method above to return null without throwing an exception. No matter what the class is, null is null.
Answer: As others have written, you can cast null to everything.
Normally, you wouldn't need that, you can write:
String nullString = null;

without putting the cast there.
But there are occasions where such casts make sense:
a) if you want to make sure that a specific method is called, like:
void foo(String bar) {  ... }
void foo(Object bar) {  ... }

then it would make a difference if you type
foo((String) null) vs. foo(null)

b) if you intend to use your IDE to generate code; for example I am typically writing unit tests like:
@Test(expected=NullPointerException.class)
public testCtorWithNullWhatever() {
    new MyClassUnderTest((Whatever) null);
}

I am doing TDD; this means that the class "MyClassUnderTest" probably doesn't exist yet. By writing down that code, I can then use my IDE to first generate the new class; and to then generate a constructor accepting a "Whatever" argument "out of the box" - the IDE can figure from my test that the constructor should take exactly one argument of type Whatever.
Answer: Print:

Print an object. The string produced by the String.valueOf(Object) method is translated into bytes

ValueOf:

if the argument is null, then a string equal to "null"; otherwise, the value of obj.toString() is returned.

It wil simply return a string with value "null" when the object is null.
Answer: This is very handy when using a method that would otherwise be ambiguous. For example: JDialog has constructors with the following signatures:
JDialog(Frame, String, boolean, GraphicsConfiguration)
JDialog(Dialog, String, boolean, GraphicsConfiguration)

I need to use this constructor, because I want to set the GraphicsConfiguration, but I have no parent for this dialog, so the first argument should be null. Using
JDialog(null, String, boolean, Graphicsconfiguration)

is ambiguous, so in this case I can narrow the call by casting null to one of the supported types:
JDialog((Frame) null, String, boolean, GraphicsConfiguration)


Sent transaction from exchange to ICO (transaction failed)

Question: I sent a transaction from an exchange to an ICO and my transaction failed. Is there any way to retrieve my Eth from the ICO smart contract address? I guess somehow my transaction failed. please help if you can.
Comment: Can you edit your question and provide the transaction hash? We can't really tell you anything without providing one of those. E.g., 0x5876122bc859e97527741d20e084918d06285f22f13c0b844b7b60b9e7fd7914 is a TxHash.
Comment: If I give you my transaction hash wont you be able to access my account and take my funds??
Comment: No, a TxHash is a unique representation of the contract on the ethereum network. It allows people to audit and view what happened with the transaction.
Comment: 0xe06e113b7fdfeac9fee68aed3341d95e7f2ab947f2e0d5bab5826020ae699aaa
Answer: According to the Etherscan results of the transaction hash you posted, the transaction did indeed fail.

This means that all of the ether that you sent from the address 0x2d5bda26c47acdc5ca1388a9a6fd749b3a7ee984
 are back at that address.
You initially said that this was from an exchange, but I doubt it. You probably control this address somehow or somewhere. Most exchanges use a hot wallet that has a huge number of transactions per day and a large amount of Ether stored. This wallet has only a couple transactions, a fund for approximately 0.64 ether, and then a subsequently failed transaction.
Assuming that you have the wallet for this address, the only money you lost was the transaction fee. The rest of the money is still on the wallet.
If it was indeed an exchange held address (just an oddly small one), then contacting the exchange should get your funds returned to you. This is because they can see the history on your account with withdrawal requests, and the address they used to fund the transaction. You should be able to get it back, as long as either you hold the wallet or the exchange is ethical and has logs.
Comment: Thank you ! I have already contacted exchange support. I appreciate your help. I feel a little bit better . I will take your advice and learn how to  create a wallet that i can run on my computer. Thanks again!! You are awesome!!!!
Comment: It's a peculiar address. You need to definitely contact the exchange, because it looks like a normal wallet address to me (e.g., one you might control). Either way, that's your support situation -- a failed transaction just means the sending address gets refunded.
Comment: Thanks again i feel soo much better knowing this!!
Comment: Good luck! Ask another question if you need more help, and don't forget to mark the answers on StackExchange as "accepted" if you they answer your question.


Visual Basic Run-time error '91' when setting new Object

Question: I'm relatively new to VBA, but not to programming. I'm trying to set up a shared instance of a class, and I keep running into Run-time error 91, where it complains about the variable not being set.
<code>'A Module which acts as the singleton loader
Option Explicit
Private instance As GroceryDatabase

Public Function sharedInstance() As GroceryDatabase
    If instance Is Nothing Then
        Set instance = New GroceryDatabase 'Run-time error 91 thrown here
    End If

    Set sharedInstance = instance
End Function
</code>
Obviously the variable isn't set yet, which is why I'm assigning it a New GroceryDatabase. I've seen a lot of answers to this question that boil down to someone attempting to use a Nothing object, but I can't really understand why this is being thrown when I try to instantiate it.
Comment: Is your error at the" set instance =..."? Does your constructor for grocerydatabase work when you step through the code?
Comment: Aha, I threw a breakpoint into the constructor of GroceryDatabase, and it turns out there was a variable in there that's actually throwing the error. I'm going to answer my own question, thank you!
Comment: Another way to catch these is to set `Tools>Options>General>Break in Class Modules`
Comment: Thanks to both of you for the suggestions
Comment: @Chris glad you got it. Otherwise your posted code looks ok
Answer: The error was not specifically due to the line where the object was instantiated, but instead because of an issue in its constructor where there was in fact a variable being assigned but not Set.
This was discovered by putting a breakpoint in the constructor for GroceryDatabase. For the future, I've enabled "Break in Class Modules", found in the path Tools>Options>General. Now, the issue is immediately pinpointed when pressing the "debug" button.


How can I make a selected calendar notification behave like an alarm, that is, audible even on silent mode?

Question: I keep my phone on silent most of the time but would like audible reminders for critical calendar reminders. Short of silencing everything else manually, is there a way to acheive this?
Answer: Check out CyanogenMod. It's a custom rom that has a profiles feature built in where you can define which apps should have audible notifications.
Answer: Its somewhat tricky..
Don't go in Silent mode using stock settings. Use Quick Profiles app to silent everything except Notifications. Then, hunt down all apps which are generating audible notifications. You will found Gmail, Facebook, Astrid etc. Check settings of all those apps. Generally, they all allow users to set notification ringtone. Access this option & choose Silent ringtone for all apps except calendar. Done!


Slowing down in a electron velocity selector

Question: In an electron velocity selector, we use a positively charged plate (with a slit) to accelerate the electrons which then go through the slit and into an area with an electric and magnetic field. If that charged plate accelerates the electrons before they reach the slit, wouldn't it slow the electrons down once they have gone through the slit and, therefore, the velocity of the electrons wouldn't be constant in the area where the electric and magnetic fields are?
Answer: As explained here, there is no field outside a parallel plate capacitor with very big plates near the center. That is, there is only an electric field between both plates, and quite close to the edges of the plates.


NVidia control panel SSAO not working

Question: I am just before implementing screen space ambient occlusion in my game, but first I wanted to try enabling it from NVidia control panel only to find out that it is greyed out so that I can not enable it. With this I could enable SSAO for some other games, but not every one. I know this technique requires the depth buffer and (optionally) a normal map texture to sample information from which I already have access to given I have a deferred renderer working.
After that I actually thought to roll back to a previous version of my game which still uses forward rendering so the depth buffer is actually bound to the backbuffer which I render to from the get-go so that maybe the NVidia control panel would somehow make use of it. It was not working with forward rendering either. (I also tried FXAA in the control panel and that works - but it doesn't need any depth or normal texture)
So my question is that how can I enable this function so that it would work by enabling it in the NVidia control panel?
Answer: I've never seen an SSAO option in the NV control panel.  Does it only show up for specific games?  If so, it's probably something that NV collaborated with the developer on, perhaps integrating NV's HBAO filter into the game.
The NV driver can't just insert SSAO in any old game, because SSAO has to go in the middle of the frame, and the game's lighting shaders have to factor in the SSAO value, etc.  The driver can't magically figure out all that for any arbitrary game.  FXAA, in contrast, is just one extra pass at the end, which the driver can easily do by just hooking the Present() call.  (Even then, it's not perfect, since it blurs the game's UI.  It's better for the game to include AA itself.)
Comment: Well, it is listed as "Ambient occlusion" in the settings which I guessed is SSAO, because it looked exactly like it when I tried it with Guild Wars 2 for example or Star Wars the Old Republic.
Comment: I've just read your link and at the end it says: "As of 331.40 beta, HBAO+ is built directly into the NVIDIA Control Panel, enabling the enhancement of *hundreds* of games." So I guess it is required to contact NVidia for that specifically.

NVidia control panel SSAO not working


Short story about a ghost, possibly written in the 1960s by a woman

Question: I am a librarian hoping to help a patron.  The patron believes this science fiction/fantasy story was written in the 1960s by a housewife with four kids.  The  story might possibly be titled "Girl in a Blue Dress" and concerns a ghost, losing an overcoat or sweater, and being unable to cross water.  We have eliminated Shirley Jackson, Jack Finney, and Ray Bradbury.
Comment: I have edited out the second story as that would make it too broad, one question per question please. You can ask about the second work as a new question! It might also be worth asking your patron to look at [this guide](https://scifi.meta.stackexchange.com/a/9337/58193) to see if they can answer any of the questions and [edit] in the answers. Remember the more detail the more likely we can help.
Comment: The only hit on isfdb for [`title containing girl and blue and dress`](http://www.isfdb.org/cgi-bin/adv_search_results.cgi?USE_1=title_title&O_1=contains&TERM_1=girl&C=AND&USE_2=title_title&O_2=contains&TERM_2=blue&USE_3=title_title&O_3=contains&TERM_3=dress&USE_4=title_title&O_4=exact&TERM_4=&USE_5=title_title&O_5=exact&TERM_5=&USE_6=title_title&O_6=exact&TERM_6=&ORDERBY=title_title&ACTION=query&START=0&TYPE=Title) is "Girl in Blue Dress (1881)" a 2016 short story about a woman who is trapped in a painting.
Answer: Your patron might be thinking of In a Blue Velvet Dress, ostensibly by a lady named "Catherine Sefton," although that was actually a pen name of Martin Waddell.
Here's a cover-scan of the first edition. Looking at it might ring a bell in your patron's head. (Or not, as the case may be.)

And here's a summary from Kirkus Review:

The bookless house at 3 Mole Street seems to promise a dull holiday
for avid reader Jane Reid who's been left behind while her parents
cross the Irish Sea for a vacation in Scotland. But an obliging girl
ghost thoughtfully provides Jane with new reading material every night
-- bound volumes of the Girl's Own Paper, E. Nesbit's Five Children and It, and other favorites of a bygone generation. Jane eventually
discovers that the ghost is actually Mary Quinton, a fellow bookworm
who pined away and died in the very same house after being orphaned at
age 13, but Mary evaporates after the return of Jane's father with a
suitcase full of Jane's own books. Slight, wistfully sentimental
bedtime reading for girls like Jane who won't demand more than a shade
of a story.

But I'm not sure that this is what you and your patron are looking for. Let me list a few points to consider -- some of them encouraging; others not so much.

The title is very close to what your patron remembered. Four words out of five match, and are arranged in the same order.

The timeframe is pretty close. Published in 1973, instead of a few years earlier in the 1960s.

The story was not published as a "short story," but as its own juvenile novel. (160 pages according to ISFDB, although that seems to mean considerably less words in total than would be the case in a 160-page mass-market paperback novel aimed at an adult audience.)

There is, in fact, a ghost as a key character. (A young girl wearing a blue velvet dress and lending books to Jane.)

In a quick search through the text, hunting for the word "water," I didn't find any reference to the ghost (or anyone else) being unable to cross water.

Other searches failed to turn up a lost or stolen article of clothing as a key plot point, although there is more than one occasion when one kid or another needs to change into dry clothes after getting wet and dirty.

The book was purportedly written by a woman, although it was actually by a man. I have no idea how far that deception was taken. For instance, was there ever a bit "about the author" at the back of an edition of the book, or published somewhere else around that time, which might have led the reader to believe that the author was the mother of four children? I don't know, but it's conceivable that the answer is "Yes."

A note: In case your library doesn't have a copy gathering dust on the shelves, I discovered that In a Blue Velvet Dress is available for people to "borrow" (digitally speaking) and read for free on https://OpenLibrary.org -- so looking at the actual text would probably be the best way for your patron to determine whether anything about this book seemed suspiciously familiar.


Flash library image get blur(quality reduce?)

Question: I get quite an annoying problem when import image into flash (.png &.jpeg).

My image is a 72 dpi png file with sharpen effect , when i use [Import to stage], the image imported in the library get blurred( eye-realizable), but the image on the stage keep original quality(not blurred).I have try change library item properties ( lossless png..etc),import again but no thing different.

How can i make the library item have same quality as the image on the stage?
(when i drag library item to the stage it's still blur , except the image on the stage create by [import to stage], also tried with jpeg but nothing different)
Answer: I've got the solution for this: when you import your image, choose import to stage(dont import to lib)
the choose break apart/then convert to symbol,there you go, no more blurry image.
Answer: This can be done pretty easily by right clicking/ctrl click(mac) on the image in your Library, into Properties. Then set 'Compression' to Lossless, making sure that 'Allow smoothing' is unchecked. It should then appear exactly as the image was rendered.


20's Slang and idioms

Question: What are some of the most common idioms and phrases of speech in the 20's? Specifically what are a couple different terms for bars (I already know speakeasies)? What were taxi's and cab drivers known as? How brutal were racial slurs at the time?
Answer: I think this would be too long a question to answer.
The 20s may well be the age that slang caught on, radio was becoming popular, new forms of music brought new terms and young people were more important as a group - although I suspect that people have said this about every decade since the neolithic.
See http://local.aaca.org/bntc/slang/slang.htm for a list. You have to take the dating with a pinch of salt, some much older terms may have been first recorded in print in the 20s because of wider newspaper circulation or some much later terms could have been back dated to the 20s because they seemed to have a link with Jazz or prohibition.
See the question on nitty-gritty for examples of words that were apparently common in the 20s but not recorded in print until the 60s, especially terms used by groups that didn't own newspaper chains.
Comment: There's a longer list at [The Internet Guide to Jazz-Aged Slang](http://home.earthlink.net/~dlarkins/slang-pg.htm).
Answer: From The Internet Guide to Jazz-Aged Slang come the following copacetic words and phrases:
Places to drink:

barrell house: illegal distillery
drum: speakeasy
gin mill: a seller of hard liquor; a cheap speakeasy
joint: establishment
juice joint: a speakeasy
shine box: a bar or club for black patrons
speakeasy: a bar selling illeagal liquor

Other drinking terms:

belt: a drink of liquor
bent: drunk
bootleg: illegal liquor
busthead: homemade liquor
coffin varnish: bootleg liquor, often poisonous
dead soldier: an empty beer bottle
horse linament: bootleg liquor
jorum of skee: a drink of hard liquor
on a toot: a drinking binge
rotgut: bootleg liquor
snort: a drink of liquor
strike-me-dead: bootleg liquor
white lightning: bootleg liquor

20's Slang and idioms


Is there a Mac inventory editor for Minecraft server?

Question: I've got a minecrack inventory editor for Macs running on local maps but what about for the 'classic' server setup? There are clearly one-per-user inventory files in the server world directory but my InvEdit won't open these files, so I'm looking for a tool (ideally mac-native) that can deal with these files.
Comment: http://www.minecraftwiki.net/wiki/Programs_and_Editors contains all notable software created by the Minecraft community. You should take a look at it. If it isn't there, no such software exists or it isn't stable enough for its intended purpose.
Answer: What are you trying to do? If you want to cheat items, you can just use the /give command to generate item or block.
Comment: Didn't know I could do that sorry, thank you very much.
Answer: You can use the INVedit tool, just search on the Minecraft Forums and download any version, there's plenty of guides on how to make it work on Mac in the thread.
Alternatively (this is much easier) install the TooManyItems mod (also on the Minecraft Forums), which will allow you to get any item imaginable, in-game with a nice UI.


Derating ampacity of a wire if it is stranded?

Question: Do I need to derate a wire if it is stranded? Or will a #12 wire have the same ampacity whether or not it is stranded?  Is this affected at all by AC versus DC?
Comment: Current rating is a better term than ampacity.
Comment: "Ampacity" is the standard and accepted term as far as I can see. The national electric code says "ampacity." Electricians say "ampacity." The vendor tables say "ampacity." Why not just go with the flow?
Comment: @ElEctric - that is incorrect unless each strand is insulated and they are also woven   appropriately, known as Litz wire. Even Litz wire is not effective above a few hundred kHz to low MHz frequencies.
Comment: @LeonHeller I agree, now that you mention it. "Ampacity" to me seems like it should be the maximum current a conductor can carry before melting under specific physical conditions. "Current rating" makes more sense, since it involves safety. I don't actually want anywhere close to the maximum current in my home wiring: while copper at <1000°C might not melt, it would be Very Bad™ for my home.
Answer: Gauge is defined by cross-sectional area, not outside dimension, so the stranded #12 wire has the same per-length resistance as the solid #12 wire. Ampacity is more complicated (it depends on type of insulation, what other wires are nearby, and other details), but whether it's solid or stranded again does not matter (or at least not significantly so) for this.
AC vs DC also has no impact, unless your "stranded" wire is actually litz wire. As litz wire is very expensive and has to be specially ordered, it almost certainly is not--you would know if you had it.
Comment: @JYelton Yes, that is exactly the way in which insulation affects it. I'd consider that a fairly important consideration, if your insulation has a low tolerance for heat (some types do break down when exposed to heat over time, so it's not just melting point that matters).
Comment: Doesn't ampacity rating only consider insulation insofar as tolerable temperature rise (e.g. free air versus in a bundle)? I wouldn't think insulation affects ampacity aside from this aspect.
Comment: After considering Leon's comment on the OP question, if we define "ampacity" and "current rating" separately, then insulation shouldn't affect how much current a conductor can carry (ampacity), but it certainly affects its safe operating conditions (current rating).
Comment: @JYelton In my experience, "ampacity" and "current rating" are synonyms, and I am using them as such here. Do you think I should change my wording?
Comment: Not necessarily. I agree with you that they are synonyms. I am not sure what word is appropriate for "absolute maximum current before destruction/melting" of a conductor. But obviously this is not usually the term we care about here (maybe moreso on the physics SE). I was just overthinking, as usual.
Comment: @JYelton I think the current that will cause destruction/melting is called the "fusing current". In my experience, "ampacity" and "current rating" are used interchangeably (for better or worse) so I would recommend looking for more context in how the term is used.
Comment: Thanks @ElliotAlderson - I haven't encountered that term before.
Answer: By the term 'derate', you must mean to reduce a manufacturer's specified ratings to compensate for some aspect of its application.
The wire manufacturer's specifications will give you the current carrying capability, be it stranded wire or solid core. You do not have to derate the values in that specification - the manufacturer is giving you finished values. You just have to interpret them correctly.
Both AC and DC ratings are usually given for the max. current and voltage.
The max. current may be specified at different temperature rises, as higher current will dissipate more lost power in the cable because of its resistance and heat the wire.
The max. voltage comes from the max. breakdown voltage of the wire insulation, if it is insulated.
Comment: This is not really correct. The manufacturer doesn't tell you how much current the wire can carry. The ampacity of a wire in  a structure is determined by building codes and depends on several things including insulation temperature and whether the wire is in conduit and even conduit fill factor. There are also road vehicle ampacity tables and boat ampacity tables. But it is true that the the number of strands doesn't matter. (As far as I know).
Comment: Tony I'd perhaps consider editing or amending your answer instead of deleting it. Seeing the error (and the correction) could be pretty useful.
Comment: For example in boats, wire that goes through the engine compartment has a lower ampacity than the exact same wire outside the engine compartment, per ABYC. You could say that the apmpacity is de-rated when wire passes through engine compartment.
Comment: @mkeith, yes, I see what you mean - I've answered a different question to that asked :-) I'll delete this answer when a comment from you tells me you've read this...
Comment: @JYelton, I think writing right answers is a better legacy but I'm too busy to fix it :-)
Comment: Thanks for replying to my comment. I think it is a reasonably helpful answer. I don't know that I would delete it. Maybe you could reword it slightly or something. Anyway I definitely don't want to be discouraging! Thank you for contributing!
Answer: It will be very close to identical current rating for a stranded and a solid core cable with the same wire guage. The stranded is simply more flexible and suited for uses where it will be moved around.
IF the stranded cable was Litz wire it would have insulated strands woven in a special way making it able to carry more high frequency AC-current, as it lowers the "Skin effect". But for DC there will be no difference.
Answer: Yes, the current capability of a wire will decrease as the number of strands increases.
This short article on AlphaWire's website gives a good explanation:
http://www.alphawire.com/en/Company/Blog/2015/June/Helpful%20Tips%20for%20Cable%20Ratings
Comment: Safe current capability of a *cable* decreases with more conductors, but current capability of a *wire* would increase with more strands of a given cross-sectional area. I think you've confused "strands" with "conductors" here. AlphaWire's chart is showing a multiplier factor for number of conductors in a cable which themselves may be solid or stranded. A cable can have one or more conductors, and a conductor (wire) can have one or more strands. In a single 12 AWG stranded wire, there can be [50 or more strands](https://www.calmont.com/wp-content/uploads/calmont-eng-wire-gauge.pdf).
Answer:
Wire gauge is defined by conductor diameter.
Ampacity is defined by the max. current of wire for a specified temperature  such as;  60, 75, 90'C which depends on the electrical/thermal insulation of the wire.
Max. current rating however is usually done at 30'C

The thermal resistance rises sharply with the number of strands in the core, unlike the electrical resistance, so Ampacity is maximum for a single core.
e.g. wire with 1kV PVC insulated wire from 1 core to >=43 stranded cores
REF
<code>AWG D(mm)   D(in) area(mm2) R Cu(ohm/km)      1  3  4-6 7-24 25 - 42  >=43 cores
12   2.1    0.081   3.3     5.2              34 20   16   14    12      10 Amps

ambient temperature 31 - 40 'C: correction factor = 0.82
ambient temperature 41 - 45 'C: correction factor = 0.71
ambient temperature 45 - 50 'C: correction factor = 0.58
</code>
More graphs and details for AWG12
https://www.engineeringtoolbox.com/amps-wire-gauge-d_730.html


function keys from surface pro 3 tablet virtual keypad : how?

Question: Does anyone know how i can access the function keys whilst using the surface pro 3 without the keyboard attached, i.e. how can i pull up the function keys from the surface keypad ?
Answer: There's an option to enable the Full Keyboard Layout in Windows 8 that should get you what you want: http://www.pocketables.com/2013/02/windows-8-tip-enable-the-full-virtual-keyboard.html
Under PC Settings, go to General, and then toggle the "Make standard keyboard layout available" to On.
Answer: Addendum to @music2myear's answer: after you enable the full keyboard, that just adds it as an option to the keyboard mode switching button that's on the (right?) side of the virtual keyboard. You then need to use that button to switch to the full-layout keyboard.
I have no idea why they make it so hard to discover that the full keyboard even exists. I rarely use anything else.


Best options to store photos

Question: I am looking for a cloud based storage to store my images. I would require a decent uploader and browsing interface. It would be great if I can use that storage APIs to write my own browsing software.
Answer: Storage is easy, and there are thousands of options. What I believe is critical is what else you need beyond storage.
What kind of files..JPEG, JPEG+RAW, RAW only.
What kind of viewing... confirm image files are stored, view photos, sort/view/share photos.
What other types of files...psd, tiff, dng, library backup.

Storage only: Amazon S3, Crashplan, Mozy, Backblaze. These solutions are backup/storage services, where you can view the files online, but not photos. In otherwords, you can confirm a list of image files uploaded, but not view the images themselves. Amazon S3 has APIs, all others use their own client interfaces. These have the benefit of being able to store not only images, but also any other file type, including LR or Aperture library files, psd, tiff, dng files.
Storage and viewing. Again, thousands of solutions.  Some like Dropbox, provide real-time access and replication, others, like Smugmug, store your JPEG files for sharing and viewing, and via integrated Amazon S3, can also store your associated RAW files.
Viewing and sharing. Thousands of options again. Services such as Flickr, Picasa, 500px, focus on sharing of JPEGs only, though of course are a sort of 'backup', since these files live in the 'cloud'. Typically, bulk download can be much more troublesome than solutions in #2 above.
Comment: Another to add to the list is Secure Capsule, it's an archiving service backed by AWS S3 and glacier, you get a heap of free storage, the large plans are really affordable and we offer immediate access to thumbnails and previews.  The raw files can be restored after about 4 hours (they come off glacier) which keeps the cost really low.  Disclaimer I am the founder of Secure Capsule.
Comment: This is a good, helpful answer. Would you consider moving it to the other question this is a duplicate of?
Comment: Thanks @mattdm I added it to the duplicate question. http://photo.stackexchange.com/questions/8595/what-options-are-there-for-good-cheap-online-backup-of-photos/37704#37704
Answer: I'd say just off the top of my head to look at Dropbox.  The "Image Uploader" so to speak is as easy as dragging and dropping files in Explorer (or Finder if you're mac-oriented).
It has a [fairly] decent picture browser already for files you place in the Photos folder when you access it via. the web.
And it has a public API so you can write your own apps to upload/download/view/etc images and files you put there.
You get - I think - 2Gb free storage with the option to purchase more.
It's also completely cross platform not only for desktop OS's, but also has apps for iPhone/iPad/Blackberry/Android/Kindle Fire etc....

Best options to store photos


Convert player kill count in money [Vanilla]

Question: With /scoreboard objectives add killCount playerKillCount Kills I can make a Kill Counter, but I want to convert the kill point in a in-game vanilla currency that I created with /scoreboard objectives add Money dummy Money. How can I add money just for the killer and not for every person online on the server? I'm using scoreboards for the first time and I'm a bit confused.. The scoreboard is player-related or keeps track of every player online in a unique scoreboard?
Answer: With Scoreboard operations you can set/change the value of one players scoreboard to another player's (May be the same) score in another objective (may be the same objective). The scoreboard is univeresal, in the scoreboard there are objectives, which are sub divisions of the scoreboard. In each objective each player can have a score, the score of the player exists only in that objective and MAY be different in other objectives.
The solution: Every tick add the player's kill count to his money and reset his kill count
Setup:
/scoreboard objectives add killCount playerKillCount
/scoreboard objectives add multiplier dummy
/scoreboard objectives add money dummy

Clock(20 tick):
/scoreboard players set @a multiplier <How Much money per kill>
/execute @a ~ ~ ~ scoreboard players operation @p[r=0] killCount *= @p multiplier
/execute @a ~ ~ ~ scoreboard players operation @p[r=0] money += @p killCount
/scoreboard players set @a killCount = 0;

Set their multiplier
Multiply their killCount by the multiplier
Add their killCount(Now in terms of money) to their money
Reset their killCount
Comment: Small tip: you should not be mixing `@a` with a nested `@p`. The `@a` selector can target dead players while `@p` cannot, meaning that if the player happens to die, they will still be running the /scoreboard command while dead but will instead affect the scores of the nearest-living player to them. The fix is to use similar selectors, such as `@a` with `@a[c=1]` or `@e[type=Player]` with `@p`. The sender bias still applies, so it will work fine. Example: `/execute @a ~ ~ ~ scoreboard players operation @a[c=1] killCount *= @a[c=1] multiplier`
Comment: Should I use some kind of comparator attached to the first CB?
Comment: No comparators are needed, the setup commands you just need to run once and the clock commands you run in order on a clock.
Comment: @ModDL Concerning your edit: adding r=0 does not fix the issue with dead players. You should use `@a[c=1]`, not `@p[r=0]`. It will not help in targeting the dead player (even less so due to the use of radius, which prohibits `@a` from targeting dead players, but won't matter since `@p` can't target dead players) and the targeting flaw still occurs if a living player is within the same block space of the dead executor. It's best to completely avoid flaws with the options that are available. Sender bias *does* apply with `@a[c=1]` and the dead player will always target themselves no matter what.


Trying to determine which distribution to use for my percentage data for mixed effects model

Question: I am seeing a lot of different answers to percentage data, either beta or binomial with a logit link and not to use poison distribution because it isn't count data. My response variable is retention efficiency for different food types ((Incurrent food - excurrent food)/ incurrent food) *100. There are 5 different food types. I am looking to see if the sponges from different regions and genus differ in their consumption of the five food types. I am attaching a histogram of the data which has more values closer to 1 or 100% retention (none are actually 100%). I am wondering what distribution would be best at fitting my data which would be continuous proportion I think but the data is obviously not normal. I will probably be doing some sort of generalized linear mixed-effects model
Comment: Do you have values that are 100% and 0%? Or are all observations between those two numbers?
Comment: all are between 0 and 100, no 0% or 100%
Answer: I would use beta regression with the logit link function. I would take your data, which is in percent, and then divide by 100 to get it to proportions and between the 0 and 1 range that standard beta regression expects.
From your histogram, it looks like you're using R. The {brms} package supports mixed models with beta regression, using the family = Beta() argument. The link function for the expected value is logit and for the dispersion parameter is log, by default.
The {gamlss} package also implements this, but they employ a less common reparameterization of the beta distribution.
Comment: Thank you, I will try that package
Comment: Great! Glad to help. If that answers your question, feel free to mark it as answered to close the question out and help others. Thanks!


Which skill is more suitable for provoking someone?

Question: If a character wants to provoke some sort of reaction (be it anger, or even just breaking his self-imposed silence) by talking to another [player] character; which skill is best suited for a skill check?
Answer: For social interactions between players, I tend to discourage the use of skill checks.  This sounds like a strictly role playing situation. Instead of rolling a die, I would encourage the players to get in the heads of their PC's. Know why your character is trying to remain calm or giving the silent treatment.  If the other person can rile you up enough, then get angry and start shouting. I wouldn't want a die roll to tell me how I react to another person at the table.
That said, there are certain times where it's somewhat difficult to role play your character (for example, if your PC has a lower wisdom than you do). In these cases my group usually has the player of the low-wisdom character set their own DC and make a modified wisdom check. On a success, they keep their cool and act as they themselves would. On a failure, they do the opposite.
But, if you have your heart set on using skill checks, I would suggest that either Intimidate or Diplomacy would work.

Intimidate
You can change another's behavior with a successful check

Diplomacy
You can change the attitudes of others with a successful Diplomacy check

The established rules allow for both of these skills to be used with different chances of success.  If the player is very wise and highly resistant to fear, intimidate is probably a bad choice as they would likely win the opposed roll. Diplomacy may be your best bet since the player is indifferent or friendly to you, and the DC isn't too bad.
Comment: I agree with you (no use of social skill checks against player characters), but this question spawned from the example posted into [this other question](http://rpg.stackexchange.com/questions/8808/how-to-use-social-skills-versus-player-characters).
Comment: Also, players should never be or feel compelled to have their characters respond in a particular way because of how a check rolled, but that's not the same as saying such skills have no place in PC/PC interactions at all. The result of such a roll can still inform a player's decision, even without being binding or compulsory.
Answer: I'd turn to Intimidate here.

You can change another's behavior with
  a successful check. Your Intimidate
  check is opposed by the target's
  modified level check (1d20 + character
  level or Hit Dice + target's Wisdom
  bonus [if any] + target's modifiers on
  saves against fear). If you beat your
  target's check result, you may treat
  the target as friendly, but only for
  the purpose of actions taken while it
  remains intimidated. (That is, the
  target retains its normal attitude,
  but will chat, advise, offer limited
  help, or advocate on your behalf while
  intimidated. See the Diplomacy skill,
  above, for additional details.) The
  effect lasts as long as the target
  remains in your presence, and for
  1d6×10 minutes afterward. After this
  time, the target's default attitude
  toward you shifts to unfriendly (or,
  if normally unfriendly, to hostile).

Emphasis added. Provoking a reaction that's largely against the will of the target seems to fall under its purview, even if the means of doing so is less hostile than typical.
Comment: I second the idea of using *Intimidate* in this case. When I first read this question that was the first thing I thought of, but until I read Jadasc's highlighted parts, I wasn't sure if it was appropriate. +1!
Answer: I agree that using social skill checks for character interaction is unwise. I disagree with others about the skill checks that should be used.
The simple answer is that there is no mechanic in the Core pathfinder rules (as far as I can find) to provoke a character into attacking. Putting my DM hat on...
I would rule that Bluff is the most appropriate skill for provoking an enemy. In terms of fluff, this just makes the most sense. When you taunt, you are not trying to woo them (as with Diplomacy), and you are not trying to frighten them (as with Intimidate).
The goal is to trick them into doing something that they otherwise would not do. Think about the example of a swashbuckler, matching wits with a foe in a duel. The swashbuckler would throw witty, pointed remarks at an opponent to throw them off balance, and make them flub their attacks - I'd call that a Bluff check. I believe there is some class in 3.5 with a feature that supports this (it may even be Swashbuckler); but, I don't know the mechanics off of the top of my head. I've heard the term "called shot to his self-esteem" used.
Comment: You might be thinking of the `feint` combat action as well, since you make a bluff check in order to make the enemy flat-footed.
Comment: @Cthos: No, though I understand why you would think that.
Comment: I may have been thinking of the Knight's Challenge class ability from PHB2. It's a Will save based on 1/2lvl+Cha, though, so it doesn't help my case any.
Comment: The desired reaction is not mandatory an attack: even breaking a self-imposed silence is enough for the purpose of the question.
Comment: Oh, I guess I missed that nuance. I guess, then, the skill you use would depend on the reaction you're trying to provoke. For anger, I'd use Bluff; to break a silence, I'd use any of the three (Bluff, Diplomacy, or Intimidate).
Answer: You can force the character to break the self imposed silence by deeming the character to have said something, but you can not force the player to actually say anything in character.  It is going to be hard to convince the player not to start a new self imposed silence.  In addition interposing yourself into a feud between 2 other players is not going to work out for you.  The fact that both players are there indicates a willingness to eventually work together again.  If that did not exist then the player would simply stop coming to the games.
If you are the player trying to get the other person to talk to you read the last line above.
Comment: can you go into how you as a DM or another player would coerce a player into breaking a silence? Would it be as a skill check or some other form of cajoling?
Comment: Simple I would declare that the character has said something.  I can not force the roleplay.  I can declare it as having happened.  Being GM/Storyteller gives me those rights.  I have done this to speed things up over things that had no real consequense.  As I said above I am not getting in the middle of the squabble between players.


Why can't I have a "desired password" field on a Cognito Form?

Question: I added a field on my form to ask the customer for their desired password (the form is to register for our online access). I received an error that I may be violating the terms of service with this field. Am I not allowed to ask for passwords?
Answer: Unfortunately, due to bad people using Cognito Forms to conduct phishing attacks, we automatically block forms that collect certain types of information like passwords (I have to be a bit vague here on purpose).  However, there are two ways you can bypass this to collect passwords:

Submit a support request and ask us to review your form
Upgrade to a paid plan

Furthermore, I recommend using our data encryption feature to protect passwords, as people frequently use the same password for multiple accounts and this type of information should be protected as much as possible.


How much control do I have over my information on Stack Overflow Careers?

Question: If I complete a Stack Overflow Careers CV how much is visible to other people? For example, if I filled out my work history how much of that is available to other users? Can I choose to only reveal such information to potential employers I am interested in talking to?
Comment: That's a really important question. I don't think the UI conveys the amount of public and private information in the best way possible. A good example here would be GitHub, where every page you visit has visual indicators (colors, a lock icon, a badge) that tell you immediately if a repo is private. Maybe it's just my quirk, but I like to be *absolutely* sure what I share where...
Answer: We have a few settings that control how your CV is shown to the rest of the world. If you click the 'Settings' button in the right sidebar you'll be taken to a screen where you can control these settings:

'Make Public / Private' determines whether your CV is able to be seen by other users and whether a custom URL is associated with it.
'Block / Allow Search Engines' determines whether your CV can be indexed by search engines.
The last section controls whether your CV is visible to employers that use our Candidate Search product.

Looking for a job means that your CV will be prioritised in search results that your CV matches. Employers can send messages to you.
Not looking, but open to being contacted means that your CV will appear in search results that your CV matches. Employers can send messages to you.
Block all messages and matches means that you will not appear in results and cannot be messaged by employers.

It's worth noting that by default your visibility to other users is 'private' and that you must explicitly make your CV visible to the world. Visibility to employers is controlled by the value you picked when you created your CV:
Comment: Also Dean .. is there a way we can see what our CV looks like to a potential employer so we can better ascertain what info they have access to?
Comment: There is a button that says "Preview Public CV". That makes it sound like the information it show is public.
Comment: Thanks Dean! Can employers see your SO profile (and your questions/answers) or is that hidden by default? Also, what about your real name you have attached to your CV?
Comment: @webworm: Just browse to your public custom cv url, incognito.
Comment: just to be crystal clear, if I 'set my CV to private' && it the *employer searches* is set to either 'actively look right now' *or* 'open, but not actively looking' then the employers **can** see my CV while no else can see?
Comment: just to be crystal clear, if I 'set my CV to private' && it the *employer searches* is set to either 'actively look right now' *or* 'open, but not actively looking' then the employers **can** see my CV while no else can see? @Abhitalks this is why webworm asked his question. The answer to this question is likely yes. Hopefully Dean can confirm...
Comment: Dean, can you please confirm if I've understood you correctly or not?
Comment: @Honey my answer is a little dated because we've since moved to Developer Story rather than CVs. That said, it's still the case that you can set your story to be private, but if you [search status](https://stackoverflow.com/users/jobsearch/current) is **Actively looking** or **Open, not actively looking** then, yes, it is still visible to employers.


Replacing an equipotential surface with a conductor

Question: If i replace an equipotential surface generated by a charge distribution with a conductor (i already know that the conductor has an equipotential surface), what assures me that the original charge distribution's field is not modified by the conductor?
Comment: Have a look at uniqueness theorems.
Answer: Since the field is uniquely determined from the potential:
$$
\vec E=-\vec\nabla V
$$
there would be no difference in electric fields between the "before" and "after" situations since the equipotentials outside the conductor are the same (assuming there is no charge in the region where you locate the conductor).  Since the field is the same before and after, there effect on the charge distribution will not change.


Place to upload large image accompanying the question

Question: Assume my photography question must be accompanied by the image. The image is full-resolution, 6-7MB size. What is suggested place to upload it ?
Answer: If you need to do that, assuming JPEG, then Flickr is probably the route to go. It's not all that uncommon here to use the image upload for this site to show the basic image in a smaller size and then use a link to Flickr for a larger.
Comment: Doesn't Flickr strip out the EXIF, though?
Comment: No, that's controlled by the user, some leave it (I do) and others remove it. You can see the EXIF info for an image by clicking on the camera model in the upper right. You'll see text to the effect of "This photo was taken on April 26, 2011 using a Pentax K-5." And the Pentax K-5 will be a link to the EXIF.
Comment: But it does get taken out of the actual jpeg, right? Or did they stop that?
Comment: @mattdm - Dunno, I haven't checked. However, if the user here links to Flickr for their image in an anchor tag, rather than img tag, then no problem which was what I was suggesting.
Answer: Er.. please don't!
Use a small version (our post width here is about 630px so anything bigger than that is a waste) and provide a link to the larger version elsewhere if necessary.
Answer: DropBox works well for those cases where you want to give a link to a full sized image without it being manipulated by any photo sharing site.


geolocation.bindTo() is not defined

Question: I was following this guide. It executes normally when you visit the site but when I try to run it from my localhost it gives me the geolocation.bindTo() an error undefined. I read about it being the geolocation object is not yet created or the method executes asynchronously as far as i read here.
Here is the link:
https://openlayersbook.github.io/ch10-openlayers-goes-mobile/example-02.html
this is basically tracking the location of the user using openlayers 3 with openstreetmaps.
Answer: bindTo is depracted with ol.dom.Input. Use "propertychange" and other listeners.
Answer: Looks like bindTo was removed. Refer to this post: https://github.com/openlayers/ol3/pull/3472

geolocation.bindTo() is not defined


reduced oxygen levels is / are a problem?

Question: I'd like to know whether "is" or "are" should be used in the following on standardized tests:

Reduced oxygen levels in the river is / are a problem for aquatic life.

I'd appreciate your help.
Comment: Ask yourself this: what is the head word of the NP "reduced oxygen levels in the river?". The head controls the number of the NP.
Comment: I saw a native speaker use "is." Was that a mistake?
Answer: The noun phrase here, forming the subject of the sentence, is "reduced oxygen levels in the river". There are three nouns here that could be the head word: oxygen, level, and river.
There are several approaches to working out which it is. You could see that "oxygen" is clearly qualifying "levels", or that the phrase itself breaks into two - "reduced oxygen levels" and "in the river", and that the second is clearly modifying the first. One trick is to see which parts can be missed out and still make sense - and that knocks out "river", as "in the river" does not need to be in the sentence. It makes sense - albeit ambiguous sense - without that phrase: "reduced oxygen levels is/are a problem for aquatic life".
Next you can think about how you would rephrase it. How could you rephrase "oxygen levels"? What's another way of saying that? Well, the one that makes sense, in context, is "levels of oxygen". "Reduced levels of oxygen in the river is/are a problem for aquatic life. That tells us that "levels" is the head word. Levels is plural, so the noun phrase "reduced levels of oxygen" is plural, so the correct choice is are.
There's two reasons even a native speaker might get confused. Sometimes we intuitively understand how a noun phase is plural or not, but sometimes people just latch on to the last noun in it, especially if it's the last word in the phrase, and use the number of that. They mentally construct it, see that "river" is the last word before the verb, and thus conjugate "to be" based on a third person singular.
Another is that this could be phrased different so that it would be singular, because 'levels' is actually redundant. However, if 'levels' is present, it is the headword. If you say "reduced oxygen in the river is a problem for aquatic life", that's fine. So is "reduced oxygen levels in the river are a problem for aquatic life". The two versions can get confused in the mind of the speaker, even a native speaker, and lead to mistakes.
Answer: The levels are a problem.
Reduced and oxygen are just there to qualify to word levels, which is the real subject of the verb
An atmosphere with reduced levels of oxygen is a problem.


Can sqlcmd.exe path be configured?

Question: I want to change the location of sqlcmd.exe from its default place to my desired one. Can I place it in my project directory for example?
Comment: I have place sqlcmd.exe in C drive and its not working
Answer: You can create a .bat file which changes working directory to your desired path and then passes received arguments to sqlcmd.exe.
Answer: Try move Resources(it is in same dir where sqlcmd.exe is) folder and sqlcmd.exe together. My guess sqlcmd.exe using resources from that folder.
Answer: Fraz, I have tested the following, and it works fine:
Remove both SQLCMD.exe and SQLCMD.rll from their current folders and place them in the directory you'd like to run SQLCMD.exe from. The RLL file is, by default, found in the Tools\Binn\Resources folder of the Microsoft SQL Server Program Files folder. These are the only two files that are required for SQLCMD.exe to work, and the RLL file doesn't have to be in a Resources folder in the new location (it can be in the same directory as SQLCMD.exe).
Once you have done the above, you must add the new location to the Path Environment Variable in Windows. On Windows 7, you can access the Environment Variables dialog by navigating to Control Panel\System and Security\System, clicking on Advanced system settings, and pressing Environment Variables on the Advanced tab of the resulting dialog box. Once in that dialog, look for the Path variable, under the System variables heading; once you've found that, select it, click Edit, and add the new location of SQLCMD.exe to the end of the current value in the Variable value box, preceding it with a semicolon.
Please let me know if you would like anything explained further or you have any questions about this answer. I could help you find the Environment Variables dialog on other versions of Windows, if you'd like.

Can sqlcmd.exe path be configured?


difference between Tokenization and Segmentation

Question: What is the difference between Tokenization and Segmentation in NLP. I searched about them but I didn't really find any differences
.
Answer: Short answer: All tokenization is segmentation, but not all segmentation is tokenization.
Long Answer:
While segmentation is a more generic concept of splitting the input text, tokenization is a type of segmentation and it is carried out based on a well defined criteria.
For example - in a hypothetical scenario if all your input sentences are compound sentences of two sub-sentences, then splitting them into two independent sentences can be termed as segmentation (but not tokenization). Tokenization is a form of segmentation which is performed on the basis of a semantic criteria or using a token dictionary - e.g. a word or sub-word tokenization, mainly with an intention of assigning them token ids for downstream processing.
Comment: Breaking your text corpus into sentences is segmentation, but not tokenization. Using sub-words of a sentence for generating token ids as input to a transformer model is tokenization (hence also segmentation)
Comment: could you please give me a real world example for more clarification


Is it good to switch from c# to python?

Question: Currently I am developing in the .Net environment using C# but I want to know whether it is worth learning python. I'm thinking of learning the Django framework. What is better?
Answer: Yes, you should learn Python, but it has nothing to do with Python or C# being better.  It is really about making you a better programmer.
Learning Python will give you a whole new perspective on programmer and how problems can be solved.  It's like lifting weights, except you're building up the developer muscles in your mind.
For example, if you've only ever programmed using a statically typed language then it is hard to imagine any other way.  Learning Python will teach you that there is an alternative in the form of dynamic typing.
For a summary of Pythons benefits:
http://www.cmswire.com/cms/enterprise-20/2007s-programming-language-of-the-year-is-002221.php
Comment: Damn, yuo stole my answer :-)
Comment: In particular, Python is a dynamically typed language, with a lot of really interesting features that make python programs very compact. Learning both a strongly typed, and a dynamically typed language is a good thing for every programmer to do.  If you want another suggestion besides Python (hey I love Python!), it would be Ruby.
Answer: Personally I feel you can write good/bad code in any language. I also firmly believe in learning a new language every so often for the sake of learning itself. On those grounds I say if you have the time just go for it. Python is a great language that many others are inspired from.
Whether one framework or language is better or not depends on your definition of better. Do you want more work as a programmer? Do you want to develop business apps quickly, or do you want to compute 3D matrix transformations?
Once you've answered those questions you might find yourself taking a completely different direction, say F# if you had particular interest in the financial or scientific sector.
Answer: It can't hurt to learn Python, especially considering some of the heavy weights (Google) are really getting behind it.
As for the actual use, it all depends on the application.  Use the best tool for the job.
Answer: Never stop learning!
That said, how can you compare the two? How good is Python support in .Net? Is there C# support in Google App Engine? It really depends what your target system is. Therefore, the more languages you have the better equipped you will be to tackle different challenges.
Answer: Depends on what you will use it for. If you're making enterprise Windows forms applications, I don't think switching to Python would be a good idea.
Also, it is possible to still use Python on the .NET CLR with IronPython.
Answer: Both are useful for different purposes.  C# is a pretty good all-rounder, python's dynamic nature makes it more suitable for RAD experiences such as site building.
I don't think your career will suffer if you were competant in both.  To get going with Python consider an IDE with Python support such as Eclipse+PyDev or ActiveIDE's Komodo.  (I found a subscription to Safari Bookshelf online really invaluable too!)
Answer: What's better is inherently subjective. If you like Python's syntax - learn it. It will probably be harder to find a Python job, C# and .NET in general seem to be more popular, but this may change.
I also think it's worth to know at least one scripting language, even if your main job doesn't require it. Python is not a bad candidate.
Answer: I have been thinking about this same question myself.  I believe however there is still a lot of stuff C# can offer that I want to get good at before I job into Python.  Because Python is easier to learn it.  One advantage I have found in languages is not the language itself but the materials available to learning them.  For example let's say you could make a 3D game in JavaScript, but you would be more likely to find resources to do so in C++.  Or you could make phone apps in PHP but C# or Java would have more material out there to help you with the phone apps.  For me personally I know when I become good at programming in C# I will be able to branch off into other languages.  This is the main reason I have chosen to devote most of my time to that one language.  I also am learning a little bit of Java and C++ just practice thinking in other languages.   I think in the future however Python will become more popular because coding is becoming more popular and Python is the easiest of mainstream languages right now.

Is it good to switch from c# to python?


What is meant by functional?

Question: I've seen a few gyms now that have an area that they refer to as the functional area. What is actually meant by this?
Answer: The selling point of "functional fitness" is that it's comprised of exercises that make you more fit for everyday life. They are supposed to train natural movement patterns like squatting, pushing, pulling, twisting, and overhead so that the body is easily capable of handling these movements when the need arrises.
The idea is that people typically don't need to bench press a barbell in normal life, thus that exercise is not considered "functional".  But sometimes you may need to throw or catch something, so throwing a medicine ball against a wall is more "functional". Performing this exercise safely in a controlled environment would then prepare you for the event you need this ability in the wild.
There may be some validation to it. For example, grip strength is a good biomarker for longevity. One reason for this is because it reduces your chance of severe harm from falling which causes thousands of deaths per year. Basically if you have good grip strength, you can most likely grab something and prevent yourself from smacking your head on the floor. So based on this logic, pull-ups would be considered highly functional because they train you to grip and hold your bodyweight while also training you to pull yourself up.
As you probably have noticed, there's no set definition of what's considered "functional", and a lot of gyms and trainers have taken it upon themselves to come up with the most wild things to differentiate themselves from others. Very often this involved taking some normal exercise and making it as unstable and dangerous as possible (anything on a bosu ball for example). Other times they simply take a normal exercise and modify it to use some special equipment with the promise that it yields faster/better results.
There's no reason to believe that battle ropes or medicine balls would yield better "functional" results then standard barbells, dumbbells and kettlebells. These are tools that have their time and place, but their's no evidence to believe that using this equipment would be better. There's also no reason to believe that using traditional equipment wouldn't prepare you for everyday life. The body doesn't particularly know or care what you're moving. It just knows that for some reason you need to move it.
Train a squatting movement. Train a pulling movement. Train a pushing movement. Train a twisting movement. Train an overhead movement. Stay the hell away from bosu balls. You'll go far.
Comment: There's some basis for standard exercises/weightlifting (especially with machines) training specific muscles/movements that aren't the ones you'll actually be using, but that doesn't require specialized equipment, just occasionally making sure you can still squat down, grab something a few feet behind you with one hand, and get back up without pain.
Comment: Grip strength is a good indicator because it is generally a good indicator for fitness and strength, even for health and sleep. That is probably because the hand is so strongly represented in the motor cortex and, therefore, general neural activity in the motor cortex and conduit are well-represented by the hands.
Comment: @PhilipKlöcking Yeah and the first link talks about that. It wasn't really relevant to the question though and I needed an example of what people mean when they say "functional". I read a journal article that proposed the mechanical reason I mentioned in the answer, but I didn't want to invest a lot of time to find it.

What is meant by functional?


RSA Vulnerability when the Encrypted M is not coprime with N

Question: I have tested out with a few test cases, it seemed like the ciphertext $M^e$ of RSA is always coprime with N when e=3. Is there a reason why? What would happen if the ciphertext $M^e$ is not coprime with M when e=3?
Comment: When $(N,e)$ is a valid RSA public key with $N$ the product of two distinct secret primes $p$ and $q$, there's probability about $1/p+1/q$ that a random message $M$ is such that $M^e$ is not coprime with $N$. Since both $p$ and $q$ must be large (hundreds of decimal digits) for RSA to be secure, that probability is entirely negligible in actual use of RSA. The question is considering something that in actual use won't occur for random or pseudorandom $M$, or for $M\in[1,N)$ chosen by one not knowing (nor able to find) the factorization of $N$.
Comment: RSA is a trapdoor permutation. Does this imply you anything?
Answer: When $N = pq$ is the product of two primes, the only numbers which aren't coprime to $N$ are those that contain either $p$ or $q$ as a factor. It is certainly possible to have $M^3$ divisible by either $p$ or $q$ so your observation is not true in general. An example:
$$
M = 42\\
N = 7*13 = 91\\
M^3 \equiv 14 \pmod{91}
$$
Clearly 14 and 91 are not coprime - they both share $7$ as a factor. Computing the GCD of $c = M^3$ and $N$ thus leaks $7$ as a factor of $N$, breaking RSA.
Comment: Ok, I did not think of this. In that case, it is a severe security vulnerability, since by taking the GCD of the ciphertext(C) and N leaks p or q?
Comment: Would using OAEP on a C that is not coprime with N dissolve the issue?
Comment: @Chen: I don't get what you means by "using OAEP on C"; but using OAEP to produce the input $M$ for raw RSA encryption $M\mapsto C=M^e\bmod N$ for otherwise secure $N$ is practically certain to "dissolve the issue", if there was one. Now we can safely encipher multiples of $p$ or $q$. Again, even when not using OAEP, there is no practical issue, because choosing $M$ or $C$ in $[1,n)$ with $\gcd(C,N)\ne1$ is impossible for one not knowing (nor able to find) the factorization of $N$.
Comment: Sorry, I meant to use OAEP on M. Do you mean that to chose a M that gives $gcd(C,N)≠1$ on purpose is impossible without knowing p and q?
Comment: and why would that be impossible? Would it be still possible with a probability of success of 1/p + 1/q?
Comment: @Chen it would be no different to an attacker just guessing random factors of $N$ :)
Comment: @Chen: for practical sized $p, q$, that is, $2^{-1024}$ or smaller, $1/p + 1/q$ is effectively "impossible"


How to reply when someone says 'you deserve this'

Question: I always wonder if it is okay to reply with just a 'Thanks' when someone says 'you deserve this' or 'you have done a great job'. Can someone please advise me about whether saying 'Thanks' and leaving it at that is okay, or whether I should add something more to my response?
Answer: I use "very kind of you to say so". That accepts the compliment and turns it round so as to compliment the speaker. Warm glows of appreciation all round!
Answer: A simple 'Thanks' seems appropriate, but also on the edge of curtness. You could instead reply with 'duly appreciated' or a more specific thank you like:

Thanks for your support, I really appreciate it!
Answer: I will take this as an opportunity where I get to say :
"We ^all^ deserve to grow; only happy to make our community more empowered and actuated."


data transfer for iPad app

Question: How do I extract the data for a single app to transfer to another device running the same app? I want to move a personal wiki from an iPad 1 to an iPad 3.
Comment: What is the app in question?
Answer: You can copy any file from and to your ipad manually using a software tool like iFunBox without the need for jailbreaking.
I use iFunBox to backup save-games and app settings.
Answer: The exact answer depends somewhat on the app in question, however there are several apps available which will make your iOS device 'browse-able' from your Mac or PC.
iExplorer (Mac or PC)
http://www.macroplant.com/iexplorer/
PhoneView (Mac only)
http://www.ecamm.com/mac/phoneview/
iFunBox (Windows only)
http://i-funbox.com

data transfer for iPad app