Is this a statement (logic)?

Question: $\frac{x^2-25}{x-5}=x+5$ represents a statement, which can be true or false (if $x\neq5$).
But if $x=5$ is it still a statement? E.g. Is "undefined expression equals 10" a statement? And why?
Comment: It is a statement, a false statement.
Comment: This issue is one reason why formal versions of theories of various kinds of fields do not have a binary function symbol for division.
Comment: @vadim123 Does it mean that an equation that has one (or both) of its sides undefined is false? Or this equation just doesn't make sense? And why? I got confused.
Answer: There seem to be two different issues being run together here.
First there is a general issue about the use of variables $x$, and when their occurrence in an expression does and doesn't result in a complete statement.
(i) Usually something like
$$(x + 1)(x - 1) = x^2 - 1$$
is taken to be implicitly universally quantified, i.e. is to be read as shorthand for
$$\text{for all }x, (x + 1)(x - 1) = x^2 - 1.$$
This gives us a complete statement, which makes a determinate claim  (assuming we have fixed what the variables are supposed to be ranging over). Such a determinate claim is either true or false.
(ii) On the other hand, ripped out of context
$$x = 5$$
makes no complete claim. Such variables are like pronouns, and just as "He is a mathematician" makes no complete claim (and hence is neither true nor false) if nothing fixes who the pronoun is picking out and there is no quantifier to bind it. Free-floating occurrences of $x = 5$ make no complete claim (and hence are neither true nor false).
(iii) Of course $x = 5$ can be part of a complete claim: as in
$$\text{if }x^2 = 25, x = 5$$
which can be true -- e.g. if read with an implied universal quantifier, "for any natural number $x$".
Second There is a particular issue about "reference failure" where (unlike when leaving a pronoun of variable dangling free) the syntax may give us a complete (closed) sentence with no variables left dangling free,  but some putative referring expression in the sentence fails to refer.
For example, the term $x^2 - 25/x - 5$ in a context which fixes that $x = 5$ fails to denote a number. But the issue about reference failure cuts across issues with variables, since it equally arises with old friends like $1/0$. And it can arise with expressions like $\varphi_7(7)$ where $\varphi_7(\cdot)$ is the $7$-th partial computable function in an enumeration of the partial computable functions, which may be undefined for the argument $7$.
So, to deal with one thing at a time, how should be regard a statement like
$$\varphi_7(7) = 12$$
when the l.h.s. in fact fails to refer to a value? We certainly haven't successfully stated something true. So should we say the equation is false? Or is it neither-true-nor-false.
Some would say that the latter is the better way to go, the thought being that since $\varphi_7(7)$ is undefined, the whole equation doesn't get to the starting line for making a determinate claim, and so (rather like $x = 5$ ripped out of context) isn't up for assessment as either true or false. But there are considerations the other way. After all, the equation looks like a complete claim that we can reason with it (it feature in a reductio argument, say). And some would therefore say it is better to judge it false.
The issue gets tangled: accounts of the difference between "neither true nor false" and "false" are inevitably freighted with loadings of disputable semantic theory, and there are no quick answers to be had. It is no good asking the logicians for a quick verdict either. For there is more than one brand of free logic on the market (where a free logic allows for terms that lack denotation): some brands allow truth-value-gaps, other brands say that an empty term [an an atomic wff] makes for falsity.
Comment: So there is no quick and clear (and, maybe even, definite) answer why we consider that an equation doesn't make sense if this equation has one (or both) of its sides undefined? Right?
Comment: Careful. The issue here is usually an issue of failure of reference, not failure to make sense. Compare a term like "the present king of France"; that's a perfectly coherent bit of English, you understand its sense perfectly well, and it is *because* you understand it, know what condition someone has to satisfy for the term to correctly refer to them, that you know that in fact the term lacks a denotation. Similarly with "$\varphi_7(7)$". You can understand its sense perfectly well, if you have fixed a way of enumerating partial recursive functions. [Continued]
Comment: You can understand what would have to be the case for "$\varphi_7(7) = 12$" to express a truth. And it is because you understand "$\varphi_7(7)$" that you may be in a position to work out that it fails to denote a particular number. In short, the issue originally raised isn't about what makes sense but about failure of reference and hence(?) perhaps a resulting truth-value gap.

Is this a statement (logic)?


How to type lines of command for python?

Question: I want to encode a python command in the terminal but it executes them as I press enter to go to the next line of command. How can I prevent the terminal from executing the command until I finish typing all the command lines?
Answer: I think you can write like following lines.
<code>>>>if True:
>>>  a = 10
>>>  b = 5
>>>  c = a + b
>>>  print a, "+", b, "=", c
>>>
</code>
p.s. I think there is other way is that you define a function.
<code>>>>def testfunc():
>>>  a = 10
>>>  b = 5
>>>  c = a + b
>>>  print a, "+", b, "=", c
>>>
>>>testfunc()
</code>
Answer: It's not a bug, it's a feature :)
The "problem" that you describe is in fact what you usually want in an interactive environment, be it the Python interpreter itself, IDLE or ipython.
It you want an environment, where you can type a couple of lines and then explicitely let it interpret/execute, give the browser-based IPython Notebook a try.
Answer: You just need to insert the \ character before the break line.


Is it possible to write a plain old java program that runs on android?

Question: I see tutorials that show you how to make a real android application with activities and all that, but all I really want to do is make a java class that has a public void static main(String params[]) { System.out.println("Hello World");}   and run it with java HelloWorld on an android machine. Is that possible?
Comment: For any production scenario, such an app would be fairly useless. If you're doing this for grins, fine.
Comment: well, I guess I'm glad you approve, this is for me and my phone. I'm a programmer and I like to tinker.
Answer: There's a great app on the Android market called Terminal IDE that includes a great shell environment, vim/nano and java/javac all compiled to run natively on Android.  With this you can run "normal" Java code.
Comment: Thanks for your thanks, but you can really thank me by accepting.  Not affiliated at with with the app, just a fellow hobbyist.
Comment: well I upvoted, and had/have every intention of marking as the answer as soon as I try it and find out that it in fact is the answer. No offense or anything, but I figure that makes more sense to people who come later and ask the same question.
Comment: Well I think we learned something here. This is in fact what I was looking for but it doesn't install on my g1, so I can't use it anyway, a lesson to others as well.
Answer: Actually, if you take the time to create a very simple Activity (which Eclipse will basically generate for you when you make a new Android application, then you will be able to create and call any class or method on that class that you so desire.
In the Activity class, there will be a method called create() - you will modify it to instantiate your class and call a desired method...
<code>protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Instantiate your class or simply call its main(String[] args) method here
}
</code>
There, that wasn't so hard was it?
Good Luck!
Rodney


Derive KL divergence from Bregman divergence

Question: I know that KL divergence is a form of Bregman divergence for multinomial distributions.
Is there some derivation of KL divergence from functional Bregman divergence or some generalized Bregman divergence for general continuous distributions?
Answer: Start from the definition of the Bregman divergence,
$$D_F(P,Q)=F(P)-F(Q)-\langle F'(Q), P-Q\rangle.$$
Substitute $F(p)=\int dx\,p(x)\log p(x)$ and work it out,
$$D_F(P,Q)=\int dx\,p(x)\log p(x)-\int dx\,q(x)\log q(x)-\langle I+\log Q,P-Q\rangle$$
$$\qquad=\int dx\,p(x)\log p(x)-\int dx\,q(x)\log q(x)-\int dx\,\bigl(1+\log q(x)\bigr)\bigl(p(x)-q(x)\bigr)$$
$$\qquad=\int dx\,p(x)\log p(x)-\int dx\,p(x)\log q(x),$$
which is the definition of the Kullback-Leibler divergence
$$D_\text{KL}(P \parallel Q)=\int p(x) \log\left(\frac{p(x)}{q(x)}\right)\, dx.$$
Comment: In the paper "Clustering with Bregman Divergence", I see that Bregman divergence is defined between vectors rather than continuous functions. I just read the paper "Functional Bregman divergence" and not very familiar with this concept. I see that Functional Bregman divergence is defined between functions using Frechet derivatives. The authors only derive KL divergence between simple functions which can be written as finite linear combination of indicator functions. Do you refer to functional Bregman divergence?
Comment: this is in response to your request for the Bregman divergence for "general continuous distributions"; $D_F(P,Q)$ is a functional of the distributions $P$ and $Q$, so presume you could call it a"functional divergence".


Using a Flow Inside A Process Builder Process to Prevent Dupes

Question: I recently created a Process Builder process that identifies records coming in from one of our FormAssembly forms and steers them to the correct campaign to which they should be added. But, I am faced with the issue of duplication happening in the campaign. I know there is a way to prevent this with an auto-launched Flow but I am having trouble creating it. Has anyone done this before and if so how? Thanks in advance for any help.
Answer: What kind of duplicates are being created?
My preference with FormAssembly is to do the duplicate lookup checking within FormAssembly connector.
Do you have some more data on what is coming in and what on that data determines the campaign it should be linked to?


what is the code for drywall instaulation

Question: I have a commercial building which will have retail outlets
I know it is 2 layers of 5/8 drywall  for the ceiling  what is it  for the walls
do I have to  use 5/8 or can I go with 1/2  for the walls
Comment: You should probably call your local building inspections office. (You haven't even told us where you are.)
Comment: What type of wall are your referring to? If it is the occupancy separation walls, they are typically determined by what level of fire separation that is required. If you're meeting a fire rating, the entire wall assembly needs to be considered as a whole, which will determine what all of the components used to make that wall will be and their combined rating. If it's interior walls within one occupancy, then that is an entirely different scenario.
Answer: If the entire facility has fire sprinklers, then it doesn't matter, unless there is a "sound rating" requirement. Otherwise:
For 1-hour WALLS use 5/8" Type X (fire code) gypsum board on each side.
For 1-hour CEILINGS use 5/8" Type X (fire code) gypsum board on bottom of joists spaced up to 16" oc with fire rated assembly on top. (If it's an attic, you'll need fire rated roofing on fire rated assembly.)
For 2-hour WALLS use 2 layers 5/8" Type X (fire code) gypsum board on each side.  Stagger the joints in the gypsum board both ways (horizontal and vertical) and use approved nailing pattern (length and spacing). Also, there are requirements about extending it beyond the edge of the building too.
For 2-hour floor-ceiling assembly they are not available for wood construction (cut timber) only for steel trusses, concrete joists, etc. and fairly difficult.
Exterior walls are not required to be fire rated, only "party walls" unless you are within the setback area from the adjacent property line.
As you can see, this is very complicated and you'll probably need some professional help from a local architect. By the way, you can't do the work, unless you are a licensed contractor in your state, even though you own the building. Bummer.
Comment: I think it depends on the state for licensing requirements. I believe GA allows owner-building for business buildings. But there might be a distinction between "business use" and "commercial classification". For example, a farmer can build a store to sell fruit on his own property. (A lot of times it comes down to what you call the building on the permit paperwork.)


When a charged rod is brought close to a conducting metal of any shape, is the magnitude of charge induced on the metal same as that of on the rod?

Question: I think the question title is clear. What happens when other conducting metals are also around the rod? How could you explain intuitively?
Answer: Assuming everything is within finite distances, yes the charge will always be induced. Take an arbitrary shape and give it an arbitrary distribution. If we step back, 'far enough,' the field will kind of look like a charged particle of the total charge, $q$, of the mystery object. Now let's bring in a conductor of your (finite) choosing from far away. What happens to it? Well, it sees a charged particle, so it induces that charge. Bringing it closer and closer doesn't change the fact that there's an overall charge $q$ right there. The charge distributions are whole other story! The overall charge, it's just this.
Answer: In general, the charge induced on the conductor will not have the same magnitude as the charge on the rod.The reason is that not all field lines from the rod will end on charges on the conductor but go to infinity or to other nearby charges. The closer the rod is placed near the conductor the higher the induced charge on the conductor will be.


If I'm searching pictures to illustrate some crypto primitives? Can I ask it on th SE?

Question: For example, a good picture to illustrate ZK proofs. Should I ask on the SE? Or in the Meta-SE?
Comment: First start from here https://www.iacr.org/authors/tikz/
Comment: @kelalaka I agree, that's a great resource. But I think that we still want to have these questions; finding a good illustration there might be tricky, or it may not exist there (I'm not saying that you do not agree with me about this :) ).
Comment: @MaartenBodewes When I say start from here, maybe we should write a canonical question so that if it is threre we dupe it.
Comment: No, just the fact that a resource is in a specific location doesn't mean that the question is a dupe. There may be problems with the resource after all, or there may be a choice between specific illustrations. Just pointing to the site is not an answer either.
Comment: In fact, I was thinking more a way to illustrate the concept (i.e properties), than the algorithms itself. It's more a pedagogical question, than a resource request.
Answer: No, this is on topic on the main site, cryptography. If asking for descriptions of cryptographic primitives is OK, then I don't see how asking for graphic representations isn't.
That said, just asking for tools or other resources isn't. We're not a human Google. Basically you would have to ask how you could draw a specific algorithm and make some effort to do it yourself before that. Only ask about where you get stuck drawing the primitive.
If there are already pictures about ZK proofs around, then please explain what is missing from them.

In other words, you can ask for graphical representations and such, but you would still need to take some time for your question to be on topic.

Meta is definitely not the place to ask, as it is about how the site operates. And you can always ask in chat, but you might just get chatter or nonsense back from the other participants.
Comment: This kind of questions will have one line answer- if we don't draw here- that will decrease our site quality? This is another issue.
Comment: If we allow in the main site, what will be the tag?
Comment: Um, good one. [tag:illustration] possibly? And of course the rest of the keywords, [tag:zero-knowledge-proofs] and such.
Comment: If somebody draws something then that would be preferable. Link only answers are actually not allowed, so you'd better be sure that the license of the source material matches our site, because you'd need to copy the source material. Just describing the illustration and then linking seems like a tricky thing to do.
Comment: In fact, when I write illustrate, I was more thinking to a mem than a tikZ picture. It's more a pedagogical question than a resource request.
Comment: Ah, OK, all the more reason for it to be on topic. But do explain your own thoughts and what you already know :)
Comment: In the main SE, Maeher is considering that it's off topic. I'm a little bit lost...
Comment: I think someone deleted the post (Maybe Maeher). I suppose it closes the debate. Could I have more details about how the final decision has been made (because on this discussion, it was unclear to me)?
Answer: Asking for clipart is not good for our site. We are not designers or looking for pretty pictures. I'm okay with some Tikz questions, though, not sure about the reputation badges;

You have gold in illustrations.
You have silver in illustrations.
You have bronze in illustrations.

doesn't sound Cryptography, right?
In my opinion, in general, this is a chat issue and most of the time the OP's will have a reputation to talk there.
So, I say NO


How to maintain the order of records in Salesforce Bulk Api

Question: I am using Salesforce Bulk Push API to push all my accounts to account in salesforce. My doubt is how to map my account entity(my entityid) with salesforce entity.I have 10 batches. Will the order of salesforce id returned for accounts be same .
Answer: If you have to maintain the order of insertion then use Bulk API with concurrency mode as Serial. In that case, it will process your data in a serial manner.
For more information, refer Loading Large Data Sets with the Force.com Bulk API


Are static methods more efficient?

Question: In terms of memory and time, is it better to make a method static?
Comment: To answer your question: yes, but you shouldn't ever take that into consideration.  See LBushkin's answer.
Comment: Completely reworded the question. It sounded like you were referring to the actual process of making a method static. ;) Refactoring tools make this process faster!
Answer: Usually yes, there is no need to pass the "this" reference.  That reference is passed in the ECX register so there is no additional stack space required.  The register is already set if you make the call from an instance method of the same class, there will be no savings at all.  But it can help relieving the pressure on a x86 CPU core when the method is in another class, x86 doesn't have a lot of registers.  Seeing a measurable perf improvement would be exceedingly rare.
I do religiously mark methods of a class that don't use instance members as static.  I value the inherent contract provided by the static keyword: "this method does not mutate the object state."
Comment: +1 for the last paragraph – this is really what matters here and it makes `static` invaluable.
Comment: Logic trumps opinion any day.
Comment: I agree with this answer, especially about the object state contract. In my code, if a method can be marked static, then I will so mark it, just to make it easier to reason about the program's behavior. Of course, static (non-object) state can still be mutated, which will complicate the analysis, somewhat. I solve this by always putting locks around static state mutation. This doesn't directly help the analysis, but it does encourage me to rethink the design and get rid of the state mutation!
Comment: modern x86 cpus use register aliasing.
Comment: To me your answer is very logical, but I see a lot of people calling static a pure code smell.
Answer: You should make a method static if it does not require any state information from the class that it is part of.
If you don't care about polymorphism, you can write any method as either instance or static by just deciding whether to take class instance members and pass them to the method as arguments. What you should consider, is whether the syntax is natural, whether the code is easy to understand and meaningful, and so on.
You probably shouldn't worry about optimizing at this level, because the performance overhead of a instance vs. static method is negligible. Yes, there's some space used in the dispatch table for the type (if the method is virtual) - but it's a tiny, constant overhead. Yes, there's also a tiny overhead in invoking an instance method versus a static method - but again it's tiny.
This seems like a level of micro-optimization, that unless you have measurable, tangible evidence to believe is actually affecting program performance, you should avoid. In fact, if you do things wrong, the cost of passing in additional parameters (copying them onto the stack, etc) rather than accessing them through the hidden this reference of your type, may result in worse performance.
You are better of analyzing the semantics of the method, and making the static/instance decision on that basis.
Comment: To quote the Great Jeff Atwood - You can write Fortran in any language.
Comment: It is my understanding that the IL code that Microsoft C# generates uses the virtual dispatch (callvirt) for all instance methods whether it's virtual or not, even for sealed classes. This is to use callvirt's built-in null-checking. Otherwise, a null check would have to be coded, since the CLR has no problem calling an instance method on a null instance.
Comment: @Mathias: Yes, the static methods themselves are easy to test, but you can't override them and replace them with stubs. For example, if your static method hits the database and you are testing the class you can't override it and have it return a pre-populated collection. But these are just details really, and different test strategies would take care of that situation. I guess I'm just in the 'don't like static methods' camp.
Comment: @Jeffrey, the `callvirt` has to be used for calls across assembly boundaries because making method virtual is a non-breaking change (whereas making it virtual->non-virtual would be). Due to the fact that a method being virtual is explicit in the CLI (as opposed to implicit in the JVM), even in non-optimizing mode the JIT can determine whether to use direct or indirect dispatch. The only overhead is then the null check, which is all but free on current processors.
Comment: Yes, but theoretically, the jitter can inline non-virtual methods in certain cases. It can also do some static analysis to replace `callvirt` in cases like sealed classes, and so on. I'm not sure to what extent it actually does this, but it is possible.
Comment: I try to not make methods static just for the hell of it - mostly because I like polymorphism and it makes unit tests easier to write. If it makes good semantic to have the method be static then I do it, but I find that's actually kind of a rare case.
Comment: @Egor: it seems to me that a static method is easier to unit test, because there is no state - everything is supplied in the arguments.
Comment: To quote myself: Jeff wrote VB code till recently. To mention Fortan, you have to work with it and write a good compiler that no one with VB background did (to my knowledge). And probably never will.. It's not about Fortan anyway, it's about beating OOD to a pulp :)
Answer: If you are going to pass in the instance anyway (SomeStaticMethod(obj, "abc", 123);), then not really. You could only usefully use a static method in a scenario without polymorphism, and in such cases it is highly likely that any simple things like properties would have been inlined anyway.
Use objects "naturally" (obj.SomeMethod("abc",123);) - keep the code simple, and profile to find performance issues - it is very unlikely to be in the difference between instance and static unless you are running some very tight loops. There are some scenarios where it might matter, but they are pretty specialised.
Answer: There is little to no difference between a static method and a non-virtual instance method. The latter just has the this prointer/reference as a "hidden" argument. In the generated machine code, both kinds of calls look very similar.
A method should be static if it does not depend on/modify the object.
Virtual methods (overridable) on the other hand require the caller to look up the exact implementation in the so called vtable. In addition to preventing the compiler from inlining very small methods (simple property accessors are inlined very often) the lookup takes a couple of cycles.
Still, virtual methods are the fastest kind of dynamic dispatch available in C#/on the CLR. Much faster than delegates and reflection.
Answer: There are many questions of this sort. Are static methods faster/slower? Are virtual functions faster/slower? Is i++ faster/slower than ++i? Is for(;;) faster/slower than while(true)?
It is worthwhile getting hold of some software and tuning it. That will give you a good sense of the kinds of things that actually affect software performance, in practice.
Then you will see that the answer to questions like that is (most of the time) that it is insignificant.
If I can generalize, the things that make software slow, in my experience, are the use of lines of code that look innocent but whose time consumption can be orders of magnitude larger than what might be imagined. Since they look innocent, they cannot reliably be found by looking at the code. Examples: Repeatedly allocating, initializing, and deallocating large data structures just to make sure they exist. Internationalizing strings that don't need to be. Notification-style programming that can turn a simple setting of a property into a massive cascade of method calls throughout a large data structure. Simple O(n^2) operations that would never have been a problem except that n got large. Thinking that (a < b) takes about the same length of time whether a and b are ints or big classes. This "time multiplication by looking innocent" has a compounding effect over multiple layers of abstraction, so large software tends to be riddled with it, in my experience.
Answer: The difference is negligable in most cases, but static is more efficent.
The following steps are avoided in a static method call:

Checking that the object reference (this) is not null.
Finding the correct method on the virtual dispatch table.
Placing the object reference on the stack.
Answer: I find that many utility methods I write within a given class only need a few data members in the class, or none at all. In these cases, I tend to write those methods as (stand-alone) static methods, passing in directly the few data items that they need.
If they are particularly general and useful enough for other classes, I can make them public as well.

Are static methods more efficient?


Visualforce: apex:inputText - restrict input to numbers only

Question: How to restrict apex:inputText to take number values only?
Comment: Are you interested in doing this client-side e.g. not allowing non-numbers to be entered at all or just validating at the server-side?
Comment: Ideally I would like to do it in client-side
Answer: One way you could make this work is HTML5-ifying your Visualforce page and use <apex:input type="number" /> instead of apex:inputText.
Otherwise, you could implement some javascript validation or send it back to your controller and do the validation in Apex.

Note: To HTML5-ify your page, the easiest way is using the page
  element with the docType attribute <apex:page docType="html-5.0">.
See:
  http://blogs.developerforce.com/developer-relations/2011/12/visualforce-html5-mobile.html
Comment: ... but be aware that e.g. IE8 and IE9 (and other browser versions) don't support this - see http://caniuse.com/#feat=input-number.
Comment: I get below error when try to add attribute type = "Number"...

Error: Expected input type 'text', got 'number' for String data type .
Answer: This can be done easily with Javascript and here's an example from a project I had to do in the past.
Javascript
function inputLimiter(e,allow) {
            var AllowableCharacters = '';

            if (allow == 'Letters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';}
            if (allow == 'Numbers'){AllowableCharacters='1234567890';}
            if (allow == 'NameCharacters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.\'';}
            if (allow == 'NameCharactersAndNumbers'){AllowableCharacters='1234567890 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-\'';}
            if (allow == 'Currency'){AllowableCharacters='1234567890.';}

            var k = document.all?parseInt(e.keyCode): parseInt(e.which);
            if (k!=13 && k!=8 && k!=0){
                if ((e.ctrlKey==false) && (e.altKey==false)) {
                return (AllowableCharacters.indexOf(String.fromCharCode(k))!=-1);
                } else {
                return true;
                }
            } else {
                return true;
            }
        }

Standard Apex Tag using method:
<apex:inputField value="{!opportunity.MyCustomField}" onkeypress="return inputLimiter(event,'Numbers');" />

Answer: While the Javascript approach gives immediate feedback to the user (as well as the HTML-5 approach) and is hence a superior solution, there may be times when you want to do validation of apex:inputText on your controller.  Should you opt for that route:

Bind the apex:inputText value to a controller variable of type String.
Note that a null value as seen by the user (no data entered in field) will be seen by the VF controller variable as a String of length=0 - not a value=null (this took me the longest time to realize)
Do your validation logic in the controller, using String methods or try{cast to Decimal/Integer} catch{..}.
Issue error messages as per normal

Note that if you bind your apex:inputText value to a controller variable of type Integer or Decimal, SFDC will do the conversion for you and, if not a number, will report an error at the top of the page: Value 'abc' cannot be converted from Text to Number. But, null values in the box (that is, no data entered) will be converted by SFDC to your controller variable as 0, not null - which can create feedback confusion to the user.
Answer: It bugged me too especially that apex:input does not take decimals.
Here is a solution that consumes any  other chars than numbers and the dot ' . ' (while typing).
(I found another one with jQuery attaching the 'keyup' event to a specific class, but that one did not work for me. However the idea comes from there).

<apex:inputText value="{!aDecimalVariable}" onkeyup="decimalOnly(this);" />

Answer: One option of doing this, us by using jQuery and Digital Bush's Masked Input Plugin. In code that would look like this:
<apex:includeScript value="{!$Resource.jquery}"/>
<apex:includeScript value="{!$Resource.jMaskedInput}"/>

<apex:outputLabel for="dbl" value="Double" />
<apex:inputText id="dbl" styleClass="dbl-mask"/>

This is explained by Wes Nolte in one of his blog posts here.


Displaying dynamically generated images in a JSP document

Question: Though my question seems to be a repetition, I would like to get a clear solution for this.
I am generating charts (of type .jpg or .png) using Jfreecharts in one jsp document (storing under images/file n the same project) and i wish to display it in the other one.
Though I am able to generate the charts dynamically,I am not able to display the generated charts in the other jsp document..  It returns nothing during the first run. And display the previously generated charts during the subsequent runs.
I think it may be due to static binding done n jsp or smethg.
How to display an images created dynamically in other jsp document?
Thank you for your valuable time...
Answer: Instead of saving the chart as a file, simply write it to the response's output stream, as shown here.


Will using an uncommon Linux distribution during a demonstration increase my chances to land an interview?

Question: Does using less common Linux distributions for demonstration leaves a more professional impression? Would this increase my chances of receiving an offer for a computer related job?
Comment: This sounds like you ran into a religious zealout trying to convert you. Don't use a Linux distribution because it looks good. Use it because it serves your purpose. You'll switch to one or another from time to time, and that's perfectly fine.
Comment: OP, could you clarify if this demonstration is *part of an interview*? The dynamics are a bit different if it's part of a school project or presentation.
Answer: If I am your interviewer, I would expect your skills in the distribution which my company/team uses, even though if you have stellar skills in some rare distribution.
So, it doesn't matter if the skill or the distribution is rare, if it doesn't serve the purpose.
Answer: Don't get hung up on distributions. Anyone who truly knows his/her Linux is not limited by the differences between them.
A search on job vacancies for Debian, Ubuntu, CentOS, Red Hat, SUSE etc. may suggest some are more desirable than others. However, if you simply do a search on "Linux", you will see that the number of returned jobs is far greater.
This tells you that employers care less about distributions (for hiring) than you do.
Of course, if you just put Ubuntu and not Linux on your CV it may be inferred you only have superficial Linux expertise, even though fine engineers can and do use Ubuntu. You will also miss out on HR searches for Linux.
Comment: Exactly, don't let the tool be more than just a tool. In a recent interview, I was asked to demo a project, and they never once commented on the fact that I wasn't using Windows, they didn't even bother to inspect my code -- it's all about what you can _do_ with your tools.
Answer: Focus on core skills

I'm not going to look at what distributions you've used, I'm going to
review and ask how you've used them.

The most important thing when I'm conducting a technical interview isn't the edge cases that people understand, nor necessarily the number of languages that they know. What I care about is the fundamentals that they have and how deeply they understand them. If somebody is a whiz in the terminal then I expect they will be able to find their way around most distributions I put in front of them with a bit of google-fu and team knowledge behind them.
Show your work!
Do you remember in school how you had to show how you go to an answer not just the answer itself? This is how we guage how well somebody understands a subject. If somebody in an interview asks you how you would do something in the terminal make sure you tell them how you would do it, but also tell them why you would do it that particular way. You may not come  to the right answer in some cases but if you can demonstrate a structured reasoning process it's not going to score against you with most employers.
Learn the best practice methods for solving problems
If you're focusing on learning for a technical career then research what the recommended (or suggested) best practice is for a scenario. If you're unsure then the StackExchange network is a great place to ask these questions.
Setting up or creating something that works is important but making it in a way that others can understand without training as well as expand upon easily as needed is even better. This scenario comes from following known best practices that others are likely to recognize.
Present yourself as a Professional
The final thing I look for throughout the hiring process is professional conduct. I greatly appreciate people who can communicate well, be reliable, and meet my expectations. You can demonstrate these with a crisp, well written (and spellchecked!) resume. Also by meeting obligations an interviewer requests - be on time, dress well, provide references the same day that they're requested (where possible). All of these things give you a good advantage in the market and help you to stand out as a likely reliable employee.
Answer: Interviewers are unlikely to recognize obscure operating systems or distributions and depending on the field most won't even realise that you're running Linux. If you pointed it out I wouldn't think

Wow, this guy is running X, he must really know his stuff!

I would think:

I need someone who can think big picture, not a special snowflake who'll complain about having to use standardised tools and processes.

Additionally, if you're giving a presentation or demonstration and I actually notice or remember what flavour of OS you're running, odds are that your demonstration wasn't very interesting.
To summarise: No, a special OS won't make you a better candidate. If it will have any effect at all, it's likely to be negative.
Disclaimer: there are plenty of zealots amongst interviewers as well. This advice applies to sensible managers following sensible hiring practices. Frankly, you don't want to be part of a company where your colleagues got hired because of their choice of operating system.
Answer: There are various flavors of the Unix distro and *nix os's out there to list. I would say there are a few specific certifications within a few enterprise-level distro that I'm not sure if it applies anymore. For example being a Solaris certified admin was a big deal and probably still is.
I would just put on your resume that you are familiar with Unix systems. Technically saying you prefer "MacOS" is saying you like Linux-flavor systems but that doesn't really say you actually know any of the good stuff about Linux. I would imagine putting something like Ubuntu and all the GUI-friendly systems aren't a good idea without having some way to say you understand Linux. For example saying you like a Ubtunu distro to set up your LAMP is much better looking because it shows you know technical setups but then again with all the free VM distros out there already set up with all this might not tell a whole lot.


Image Recognition Raspberry Pi

Question: I'd like to distinguish different types of beers in my fridge using a Raspberry Pi. I saw a very good tutorial on Adafruit that utilized OpenCV for face recognition. Can these same face recognition algorithms, Eigenfaces & Fisherfaces, be used to train my raspberry pi for recognizing different types of beer cans?
Comment: They do, but beer cans vary much more in colors (or at least mine do), which leads me to believe that image recognition would be simpler than fiddling with a barcode scanner
Comment: Don't they have barcodes?
Answer: Not being an expert, I would guess that face recognition algorithms are way to specialized and heavy to do this. They will try to identify a "face" first of all - two eyes and a nose and a mouth and so on - and then try to identify them based on a set of parameters that can be detected in that face.
I think you would be a lot better off using some kind of optical character recognition (OCR) software, or simply sample the colour and draw wild conclusions from there.
Answer: Since the RPi now comes with Mathematica, we can use its image processing functionality to analyze beer labels.  The folks at Mathematica.SE have performed a similar task with Jelly jars (apparently Mathematica users are teatotalers).
I have not tried the operations above on an RPi; however assuming there are no problems with limited memory or excessive image processing time, using an RPi with this process is in principle the same.

Image Recognition Raspberry Pi


How does zero electric field look like?

Question: Imagine if we have an electric dipole inside a cube (a conductor). The net electric charge inside the cube is zero. Hence, using Gauss's law, the net electric flux coming out of the cube must be zero. This way the net electric field inside the cube should also be zero. Can somebody draw a diagram of the zero electric fields here because I am not able to imagine it?
Comment: Visualization of a fact can't be opinion-based.
Comment: Who said that a dipole produces zero field?
Comment: I'm voting to close this question because imagination is opinion-based.
Comment: What do you mean by the net electric field? Please give an expression of what needs to be plotted.
Answer: The key word in your post is net. Only the net flux must be zero, which means as much of the field must be pointing in as is pointing out of the surface. Look at this visualisation from Wikipedia

If you draw any box around this dipole, you will notice as many field lines going into the box as are coming out. That's all Gauss's law tells us.
Answer: The Gauss law in electrostatics is stated as:
$$\int_{\text{Gauss surface}}\mathbf{E} \cdot d\mathbf s = \frac{q}{\epsilon_0}$$
where $\mathbf{E}$ is the electric field, $q$ is the charge enclosed by the surface over which the integral is evaluated and $\epsilon_0$ is the permittivity of free space.
The integral $\int \mathbf{E} \cdot d\mathbf{s}$ is equal to the electric flux through the enclosing surface. In the case you describe, the cube encloses a dipole. So the net electric flux through the surface of the cube evaluates to zero according to Gauss law. But this does not imply that the electric field is zero due to the dipole. In fact, a dipole does have an electric field associated with it, which is given by
$${\mathbf E}_{\text{dipole}} = \frac{\vec{p}}{r^3}. \qquad \square$$

How does zero electric field look like?


Using Old Words

Question: An important goal in writing is to avoid plagiarism. But does this mean we have to state every idea in phrases we've never heard before?
Comment: possilble duplicate https://writing.stackexchange.com/questions/40566/i-noticed-that-several-already-existing-poems-used-the-same-highly-specific-puns?rq=1
Comment: Can you say why the choice is whether or not to state every idea in phrases we've never heard before? Might there be nuances between?
Comment: Do you not think "avoiding plagiarism" is an important goal in writing in the same way as avoiding bad grammar, or cliches, pompous nonsense or irrelevant drivel?
Comment: Can you see that to avoid plagiarism should never come into writing? How could that not be like saying "An important goal in life is to avoid everything society sees as wrong, including  plagiarism/theft/murder/rape/whatever"?
Comment: I was referring to accidental plagiarism,. That is the only kind of plagiarism that makes sense with the word "avoid". I don't understand how you misconstrued that.
Comment: Even if I meant deliberate plagiarism, the principle not to do it is not something that everyone knows just by being born. I was, in fact, along with the rest of my classmates, warned against plagiarizing in middle school. Apparently, this principle of morality, along with the rest of them, had to be taught.
Answer: No, it doesn't mean that.
A key test of whether something is public domain or not is if it appears in multiple venues without attribution.
The phrase "No fucking way!" is public domain. Most speaking language and idioms are public domain. If an author points at a copyrighted book, and says "I have that phrase in my book," all you have to do in defense is show some earlier published work that uses that phrase.
For relatively common phrases, most lawyers and judges will not even bother with such a lawsuit, it is a sure loser, a candidate for summary judgement.
If you are worried about some unusual turn of phrase, Google for it (in quotes). The NFW phrase turns up about two million times, by probably millions of authors, in cartoons, GIFs, comics, novels, whatever. If you only find one source, it is likely copyright.
To be safe, you should invent your own clever sayings.
But, unless somebody is actually talking about or quoting a copyrighted work like a novel or movie, what you hear in normal conversation is fair game.
Even then, Arnold's Terminator "I'll be back" line is too short and unoriginal to copyright, and was in common usage long before it was written in a script, even with the same ominous threat vibe.
Comment: The question asks about plagiarism, but this answer talks mostly about copyright, which are two different things.
Comment: I don't follow your logic for your suggestion about googling an unusual turn of phrase. Surely, if you google a quoted phrase, and you get no results back, it could be because the phrase has simply never been used (or recorded, at any rate)?
Comment: @RoddyoftheFrozenPeas I'll rephrase.
Answer: You can't plagiarise accidentally. But merely "using phrases [you've] never heard of before" doesn't prevent you from plagurism.
Plagiarism is the act of passing off ideas or work of some other person as your own work or ideas (source). One way to plagiarise is to copy someone's words verbatim, but you also plagiarise when you claim their ideas as your own without attribution.
If you are writing, and you aren't copying another person's work or ideas, then you aren't plagiarising.  If you are writing and you are copying another person's work or ideas, and you give them credit, then you aren't plagiarising. (For example, I used the definition of plagiarism that I found on Oxford Univ. website, but I didn't plagiarise, because I cited them.)
If you copy someone's ideas or work, but put it into your own phrases that you've never heard before, that is still plagiarism!
So don't worry that you might use the same phrase as someone else.  That isn't copying them, it's not plagiarism.
Do worry about putting in clear citations for any ideas or quotes that you take from someone else. And of course do try to have original ideas, because that makes your work unique.
Comment: Plagiarizing accidentally is certainly possible, although rare.  One can "compose" a music tune or a grammatical sentence which they mostly overheard somewhere, and honestly believe that their composition is original until meeting the true original again.  Of course, one can hardly plagiarize twenty paragraphs in a row without intent and dedication.
Comment: Unintentional plagiarism is possible - if someone isn't aware of the rules.  And there is a grey area of "influence" - which is especially possible in music.  These are edge cases.  But the general principle is that plagiarism is presenting someone else's ideas as your own, and so the OP should worry about ideas and not about phrases.

Using Old Words


How can i solve the error: iostreams currently clash with eosio::datastream?

Question: I am trying to compile some code which compiled successfully with the old compiler eosiocpp, but with the new eosio-cpp gives me: eosio.cdt/1.4.0/bin/../include/libcxx/iostream:13:2: error: "iostreams currently clash with eosio::datastream"
Answer: I just needed to remove #include<iostream>. Unfortunately, using .cdt 1.4, there are some issues with print and it is not possible to print a string variable right now.
See more details at the issue https://github.com/EOSIO/eos/issues/2984


Shapefiles of 20th Century British Railways

Question: I'm looking for shapefiles of the British railway network from any time between 1900 and 1970 (before many of the railways were closed). There are many historical GIS sites (such as GBHGIS and Vision of Britain) but none of them seem to have any railway data.
Comment: http://www.disused-stations.org.uk/ has maps showing closed railway stations and disused sections of railway. They may have shapefiles stashed away somewhere, or at least be able to point you in the right direction.
Answer: You might find Open Railway Map useful. It is mainly focused on active railways, but also includes lines that are disused (i.e. the line is closed but the infrastructure remains) or abandoned (the infrastructure is gone but the route still discernable). It would be more difficult to find the routes of lines that have been completely obliterated, or which have been re-used for other purposes (as roads, tram routes, etc.).
Open Railway Map uses data from Open Street Map (OSM), so to get the routes you'll have to extract the data from OSM. There are lots of tools for getting data from OSM, but you might want to look at this Reddit thread for suggestions specific to extracting railway data. Also check if your GIS software includes a tool for extracting OSM data, e.g. if you're using R then I recommend the osmdata package.


How do I fix the two black lines on my mesh?

Question: I pressed F to connect an edge between vertices in order to create a straight line where I could mark a crease. But The new lines created by pressing F are behaving weirdly. Here's a blend file https://drive.google.com/file/d/1l4dyZFzKD4OYRlZNAnEdIrgnLw0WsxTN/view
Answer: You have edges going across faces.

Remove the edges that go across these faces by selecting them, pressing x and selecting delete edges.

Next select the vertices that were left behind and press j key to join these vertices

The end result is quite good.
Answer: You should use Connect Vertex Path J, which split the existing face.
https://docs.blender.org/manual/en/latest/modeling/meshes/editing/vertex/connect_vertex_path.html
Instead of New Edge/Face from Vertices F, which created a new edge on top of the face.
https://docs.blender.org/manual/en/latest/modeling/meshes/editing/vertex/make_face_edge.html


Docker Quickstart Terminal fails to start VirtualBox VM in Windows 10

Question: I've tried several times to start the Docker VM via the Docker Quickstart Terminal. After deleting the default virtual machine in VirtualBox I receive the following output
Creating Machine default...
Running pre-create checks...
Creating machine...
(default) OUT | Creating VirtualBox VM...
(default) OUT | Creating SSH key...
(default) OUT | Starting VirtualBox VM...
Error creating machine: Error in driver during machine creation: exit status 1
Looks like something went wrong... Press any key to continue...

To troubleshoot further, I attempted to start the default machine in the VirtualBox GUI directly using Start > Headless Start, as suggested in other Docker issues. The startup failed and I received an error dialog box with the content:
Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).

Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND).

Result Code:

E_FAIL (0x80004005)

Component:

ConsoleWrap

Interface:

IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

Versions of related components:

VirtualBox Version 5.0.11 r104393
Docker Toolbox 1.9.1a
Windows 10 Version 1511 (OS Build 10586.14)
Answer: One of the answers to this question solved my problem. Here it is with a few edits:

I found a solution

Open Windows Network Connections
Right click on VirtualBox Host only adapter that was created
Choose properties
Check "VirtualBox NDIS6 Bridged Networking driver"
Disable and Enable the highlighted item

For me "VirtualBox NDIS6 Bridged Networking Driver" was not checked. I checked it and clicked OK to close the Properties window. After that, the Docker Quickstart Terminal was able to start the VM successfully.
Comment: Thanks! In my case, I had three VirtualBox Host only adapters in Windows Network Connections. I had to do these steps on the correct one before it worked, which took a few attempts.
Answer: The same thing happened to me. At this moment I am using Windows Home.
At least in my case, what happened was that the environment variables DOCKER_MACHINE and DOCKER_TOOLBOX_INSTALL_PATH were not created for the system.
I just had to add them and it worked.
Answer: I tried to follow @chris-hunt answer, but I didn't found the highlighted item. I realized it was due to the fact I didn't installed the VirtualBOX that comes in the Docket Tools installation. I think I was using an older version.
So I uninstalled docker tools AND  VitualBOX, both on windows Control Panel. After that, I reinstalled Docker Tools with the VirtualBOX checked, and it finally worked.


why you have to open 6 bypass valves in the J 58 engine?

Question: I've noticed that the bypass valves in J-58 are opened after M=1.6. I don't understand why and what are the differences between the J-58 and a normal turbojet that reeaches more than M=1.6.
Answer: At that point, the rearmost fan discs in the compressor stage were near their temperature limits (remember, the first stage/inlet compressor fan disc was managing air at 800 F). The bypass ducts limited the temperature rise in the final compressor stages. By that point the compression work performed by the inlet duct system and the remaining stages of the compressor were sufficient to run the afterburner.
Comment: Not only that, but compressing the air further would had heated it so much that combustion would had become inefficient.At these temperatures, chemical energy would go into molecular dissociation instead of further heating.


Enable Developer Dashboard on SharePoint Online

Question: Is the Developer Dashboard available on SharePoint Online (Office 365)? How do you enable it?
Answer: According to Nik this is not possible link to source:

Developer Dashboard is not available in SharePoint Online for
  customers. SharePoint Online doesn't have great story regarding Error
  logging and Monitoring. You can write custom framework which would log
  errors in the SharePoint list but you can't have much control over ULS
  Correlation ID. If you are getting errors in OOB configuration, only
  way to resolve issues is working with Microsoft Office 365 Support
  team and supplying Correlation ID to the support team.
Answer: Correct, it is not available in SharePoint Online. I would expect the primary reason is that it is a farm level setting. This means that if you were able to turn it on, every customer that shares your environment would also see the update.


When is the best time to install solar tubes in relation to a new roof?

Question: My roof will need to be replaced next year, perhaps a complete tear-off. I'm also considering installing one or more solar tubes. I'm thinking it would be wise to wait for a new roof before installing the tubes, but the winters in upstate NY get very dreary and we could really use the extra light soon. Any thoughts? Thanks in advance.
Comment: If you did the solar tubes before the new roof (or together with the new roof), then the roofers would be the ones flashing in the solar tubes--I'd trust roofers to do a proper flashing job more than I'd trust whoever is installing the solar tubes.
Answer: If your doing the work yourself its only your time you wasting but if your paying someone then its your money.  Flashing for solar tubes is not that bad just an oversized plumbing vent.  If your roof is in bad condition it could be a project because the shingles will break apart if they are too old a brittle. You May need to buy a bundle of shingles to replace the shingles you break.
Comment: The roof is old and I didn't think of old brittle shingles giving me problems. I plan to do the tubes myself, but not the major roofing job. This has been a very helpful answer. Thanks.


ARP-spoofing: why does the attacker constantly send ARP replys?

Question: I have understood the basic concept of how arp-spoofing works. However, I am struggling with the details.
Why does an attacker have to constantly send out spoofed arp-announcements to the network?
Is a client only accepting the first arp-announcement that arrives after the request for a certain MAC address of an IP address (meaning that the constantly sent out spoof-reply is faster than the reply with the actual MAC address) or are all clients regularly updating their caches by listening to arp-announcements on the network?
Answer: When a host sends an ARP reply without ARP request, this is a Gratuitous ARP
In your scenario, this is useful for two reasons:

If a new host connects to the network it will receive the Gratuitous ARP and it will be automatically victim of the attack
If a host doesn't send traffic, the entries in the ARP cache will be cleared. So with the Gratuitous ARP, the timeout is always reset.

And every client which receives the Gratuitous ARP will update their ARP cache.
Answer: The message sent are called a Gratuitous ARP reply which means the machine broadcasts its ARP rather than waiting for a client to ask for it. Think of it like a 'hello I'm here!'
The reason it keeps doing it is to ensure that all clients keep their ARP cache looking at the attackers MAC. Otherwise the original machine could broadcast their gratuitous ARP message 'hello I'm here!' and cause the clients to see their real MAC again.
It also continutiously sends the messages to ensure new clients see it, expiring clients get updated.


VERY bad GRE score -- subject test in English literature

Question: I desperately need help.
I am applying to PhD in English and I am applying to the top ten programs in the USA. Generally, I have very good chances, because

I am working with very well-known professors (all across the country) who are quite the stars academically so far as my specialty is concerned. The recommendation letters will be very strong. My prospective schools know my professors personally.
I am multilingual
I emailed all my prospective supervisors and I received very enthusiastic responses both from the US ans the UK.
My writing sample is very strong and I use my own translation of a passage written in Latin. (My professors confirm that my writing sample is good)

The problem: I went to the GRE test sleep-deprived and I had a terrible flu. I completely failed to see (and I know this is exceedingly stupid) that there is another side of the answer sheet until the last 15 minutes, resulting in half of the exam left blank.
Should I not apply?
Have anyone had a similar experience, but ended up receiving an offer?
Please, please help.
Comment: Then apply next year. In the mean time, train yourself to be cautious all the time.
Comment: @asef, grammatical foibles aside, the advice in the comment from gnometorule and the following one from scaaahu are probably the best that a 3rd party website can provide.
Comment: Ask your mentors (letter writers/possible supervisors). In some fields (my old one, say) the GRE was a cut-off hurdle which allowed administration to sort out some candidates which would never reach professors. Your mentors know if something similar applies to you (in which case you should probably wait for the next test), or if not, or if they can get you through by personal intervention despite a low score should the score matter.
Comment: I have removed a number of comments relating to now-corrected typos. Please keep any discussion focused on the OP's actual question.
Comment: As it stands, the questions in this question are either a poll or a too dependent on individual factors. There is no discernible request for general information we can answer here. Voting to close.
Comment: I finally voted to close because I am convinced the asker is in a unique situation - wants to get into  top 10 PhD program in English in US/UK with poor score in GRE and reluctant to admit the quality of the English wrting is below what he/she is supposed to have. (Please see the [comment](http://academia.stackexchange.com/questions/56853/very-bad-gre-score-subject-test-in-english-literature#comment132616_56856) below P.L. Clark's answer).
Comment: I know, but you could have pointed out my TYPOS and OVERSIGHTS more respectively and less sarcastically. Notice that I just thanked the others for their criticism, although scathing. You, however, seems to take delight in putting others down for whatever reason. It speaks of an extremely vacant schedule, good sire.
Comment: I'll have some suggestion for you. You have two options: apply this year or don't apply this year. If you apply this year, you know you have little hope to get into top 10. So, shoot for top 100. Or you have another option: apply for a masters degree in English. If you don't apply this year, take practice GRE exams until you are absolutely sure you won't make the same mistake. In the mean time, do research on the subject you were going to do as if you were in one of those top 10  PhD programs so that it would be much easier for you when you enter the top 10 PhD program next year.
Answer: One of the most valuable things you can get from a site like this is honest feedback from academics who do not know you personally.  Because you are applying to a PhD program in English and claim to have a very strong writing sample, I think it is absolutely appropriate and on-topic to discuss the impression your writing makes.  So I will begin with that.
From looking at the original, unedited post it is my distinct impression that you are not a native speaker of English and that you frequently do not write as a college-educated native speaker of English would.  In your rather short writing sample, I noticed the following issues:

"I am applying to PhD in English" This is not grammatically correct, as there is a missing article.  A native speaker would say something like "I am applying to a PhD program in English".
"who are quite stars academically" This looks like a grammatical error: an adverb modifying a noun.  For sure it is not a construction a native speaker would use.  If you were a foreign spy infiltrating an anglophone country, this one sentence would be the end of you.
"My writing sample is very strong and I use my own translation of a passage written in Latin." There is a missing comma.  More subtly, present tense would probably not be used by a native speaker here: instead they would use the past tense or the past perfect or say something like "In my writing sample, I use..."
"I had a terrible flue" A strange misspelling that cannot be justified as a pure typo.  (E.g. the original also contains "ans", which I didn't mention as it is clearly a true typo for "and".)  This is another mistake that might seem minor to a non-native speaker but is one that a native speaker would simply never make.  Honestly, I can picture English faculty making jokes about this kind of student writing.
"I completely failed to see (and I know this exceedingly stupid) that there is another side of the answer sheet" More tense problems: if not ungrammatical than at least non-native.
"resulting in half of the exam left blank" A native speaker would say being left blank.
"Does anyone have had a similar experience, but ended up receiving an offer?" This is a really worrisome sentence: it is not even within a few words of being grammatically correct.

I am a professor in an American mathematics department, and if I saw writing like this I would look carefully at the TOEFL and GRE verbal scores.  If they were sufficient then I would expect the student to have no serious language issues as a student of mathematics.  In an English literature department, especially one in the top ten, I expect that writing like this would really sink an application.
Back to your question: I don't know how seriously the English subject exam is taken in English literature programs.  But any program which requires this exam must take it at least somewhat seriously -- by requiring it, they are excluding applicants who would not take it, and no program would do that lightly -- so a low score has got to be a negative.  Moreover the defining feature of top ten programs is that they have their pick of the litter.  So my honest appraisal is that I expect that you will not get into a top ten program with your profile.  Now I am not in an English department so this advice must be discounted accordingly, and I hope that someone with such experience will come along and also answer your question.  (Unfortunately this site is overwhelmingly populated by STEM-type academics.)  So for instance I also don't really understand why a translation from Latin would make for an especially strong writing sample for English literature...but maybe I am missing something here.
Anyway, here is my advice:
Although I am skeptical about your chances, I think we can agree that they are much greater than if you do not apply at all.  Rationally speaking I see no reason for you not to apply.  If you get in, great, and please feel free to come back here and set me straight.  If you do not get in, then since you have already corresponded with faculty at these institutions it is likely that you can get some useful feedback for an application in a future year.
Assuming that you need to apply again, my advice is:

Give yourself your best chance to nail the GREs. I am working with some undergraduates who took the GREs just now, and they spent a lot of time taking practice exams.  If you are intimately familiar with the format of the exam, even sleep-deprived and ill you will probably not make the mistake you made.
Make sure that absolutely all of your writing would be viewed by all impartial observers as having the level of English proficiency of a university-educated native speaker of English.  For this I recommend that you get several university-educated native speakers of English to read your application.  To be blunt about it, if you are currently enrolled in a non-anglophone university, then your professors may not be qualified to vet your writing in this way.
See if you can find writing samples from current and/or recently graduated PhD students at top ten English departments in the US and/or the UK.  If your writing sample is very dissimilar in form from these, that's worrisome.  If it is similar in form and all your native language helpers think it's as good or better as the successful samples, you're in good shape.

Good luck.
(Added: It might be relevant to mention that while none of my degrees were in English language or literature, both of my parents were professors of English at two-year colleges.  So when I made a grammatical or usage mistake I would get called out for it...in, I think, approximately the same way that happens in English departments.  So I will guess that my level of sensitivity to issues like this is, while not identical to that of an English professor, probably in the right ballpark.)
Comment: Brilliant and honest answer, Pete - thank you for posting it!
Comment: Thank you for your answer. I am not trying to find excuses, but I should clarify that when I wrote this, I had just returned from the exam. Needless to say, I was devastated. I wrote my question, and then posted it without a single revision, hoping to get some help as quickly as I could. I am grateful to you for pointing out the grammatical errors, but they are  oversights (inexcusable, yes, but oversights) due to my hastiness and the fact that I was extremely sad. I greatly appreciate your answer, Dr. Clark.
Comment: This response seems a bit abusive. This question has been put on hold, but I thought it worth saying: I work with people who are considered highly bilingual (i.e. it's their job to be bilingual), and this person's writing seems fine (and even good), esp. for a *forum posting*. We should not assume that this person's academic writing is anything like what they post hastily and informally in a forum. It also seems to discredit the person's report that they have full support from their professors. It is unlikely her professors would write her letters to programs if she were not qualified.


Are there any signs that Russia intends to delay NATO's admitting Finland and Sweden by preparing for a military attack against Finland and Sweden?

Question: Are there any signs / military observations that Russia is preparing for a military attack against Finland and Sweden to delay NATO's admitting Finland and Sweden?
Comment: I'm sorry, but questions which ask us to predict future developments are off-topic here.
Comment: User is a newcomer, question is, correctly, closed.  No great need to waste your precious rep points downvoting.  Unless, of course, you want to be a welcoming community member and explain how to post better questions ;-)
Comment: Yea I agree, the question prompts too much speculation.
Comment: The question can be somewhat improved by removing the speculative part ("to delay NATO admission"). It will be still very hard to answer.
Comment: The answer to this (i.e. "reasons" for Putin's involvement in Ukraine) **_may_** be clarified by the recent history in Ukraine as seen in [this question about the situation in Ukraine during last 8 years](https://politics.stackexchange.com/questions/74135/what-does-donbass-whom-the-ukrainian-army-has-been-bombing-for-the-last-8-year) and [this 3 year old question](https://politics.stackexchange.com/questions/39989/why-has-the-us-not-been-more-assertive-in-confronting-russia-in-recent-years).
Answer: No, in fact Putin has explicitly drawn a distinction between Sweden/Finland joining NATO and Ukraine.

"We do not have such problems with Sweden and Finland, which, unfortunately, we have with Ukraine. We have no territorial issues… no disputes… we have nothing that could bother us from the point of view of Finland's or Sweden's membership in NATO.

He did however say that if NATO infrastructure is deployed in Finland and Sweden, then Russia will respond.

"Only they should plainly and clearly realize that there were no threats before, now, if military contingents and infrastructure are deployed there, we will have to respond in a mirror manner and create the same threats to the territories from which threats are created to us," he stressed.

So if Russia attacks Finland/Sweden, it won't be to "delay" NATO admitting them, it'll be because of NATO deployment in those countries.
Comment: Russia [was](https://www.bloomberg.com/news/articles/2022-02-17/russia-tells-u-s-no-ukraine-invasion-planned-tass-says#xj4y7vzkg) denying the would invade Ukraine until a few days before. In fact you posted an answer here (that you've since deleted) calling such talk "Western hysteria". Nowadays Putin's words are worth a lot less than satellite imagery.
Comment: @Fizz sure. But any other answer is still speculation. And I acknowledged that answer was wrong by deleting it. I don't see you deleting your blatant falsehoods in this answer: https://politics.stackexchange.com/a/73803
Answer: No large scale troops movements have been reported in the press (in the direction of Finland), but then with Russia still making slow progress in Ukraine, I'm not sure anyone is expecting a quick Russian blow in the north. If anything, satellite pictures show that some troops located near the border with Finland have departed possibly to reinforce the offensive in Ukraine. Some (former) officials from the Finnish defense establishment gave a similar assessment.
Some sources claimed Iskander ballistic missile batteries were seen moving towards Finland, but they turned out to be anti-ship missiles, and Finnish authorities dismissed the move as routine. According to Swedish authorities, some Russian bombers entered Swedish airspace around Gotland in March. A similar incident happened in May but involving a "spy plane". However the latter kind of actions are probably nothing more than intimidation attempts. (Finland also reported a couple of airspace violations this year, although it's more debatable if those were intended to send some kind of message or were accidental, given the transport nature of the helicopter & aircraft involved.)
The "any signs" part of the Q might be a bit speculative... especially regarding long[er]-term plans. One should remember that the densely populated area of Finland is not large (despite the otherwise lengthy border) and that e.g. in 2008 Russia managed to concentrate significant forces to strike into Georgia in approximately one week after the border incidents intensified. In that conflict, Russia also launched (surprise) amphibious operations that the Finish coast is also susceptible to, at least in theory.
It's also worth recalling, however, that Finland and Sweden are in the EU, which has a mutual defense clause of its own, albeit having been the topic of some (varying) interpretations. The UK also gave some assurances of military assistance to Finland and Sweden in a recent agreement (without getting into specifics, publicly), and so has the US (thanks to @JJJ for pointing out the latter.) The risks for Russia in terms of attracting substantial intervention/interference if it were to attack Finland and Sweden are probably thus even higher than for what happens in Ukraine, let alone what they were for the war in Georgia.
Comment: The US has provided Finland and Sweden with security guarantees as well. See for example [this Reuters article](https://www.reuters.com/world/europe/us-offers-assurances-sweden-finland-over-nato-application-2022-05-05/) and this [statement by the US president](https://www.whitehouse.gov/briefing-room/statements-releases/2022/05/18/statement-by-president-biden-on-the-applications-to-nato-by-finland-and-sweden/#:~:text=While%20their%20applications%20for%20NATO,or%20the%20threat%20of%20aggression.)
Comment: @JJJ: thanks, but those are not "security guarantees" in how that term is commonly understood (treaty). I would agree they qualify as assurances. I'll add to my ansswer.


While casting a 1 round+ spell, can you make attacks of opportunity?

Question: If your character is busy doing something as a 1 round+ action, are they able to still take advantage of AoOs?
Answer: No, you can't. Because you don't threaten enemies
Core Rulebook, Combat, Full-Round Actions, Cast a Spell (page 187) says:

You only provoke attacks of opportunity when you begin casting a spell, even though you might continue casting for at least 1 full round. While casting a spell, you don't threaten any squares around you.

Since you are casting a spell for the full duration of the round, you are not finished casting the spell until the start of your next turn (possibly longer depending on the casting time). This means that while casting a spell that takes 10 minutes (ie: Divination), you cannot make Attacks of Opportunities for 10 minutes.
Attacks of opportunities are usually provoked when an enemy does certain actions while inside your threatened area:

You threaten all squares into which you can make a melee attack, even when it is not your turn. Generally, that means everything in all squares adjacent to your space (including diagonally). An enemy that takes certain actions while in a threatened square provokes an attack of opportunity from you. If you're unarmed, you don't normally threaten any squares and thus can't make attacks of opportunity.
Answer: I would suggest the answer to be NO, because you are expected to be concentrating on your spell not looking around for someone to attack as it moves past you. You cannot really focus on the intricacies of A spell if you are moving about and attacking. Especially if that spell has a somatic component.
Simply put, you are asking to take a separate action while you are already occupied by an action that requires all of your attention.
Comment: Are there rules in the books that back this up?
Comment: I think the fact that there are concentration checks, to begin with, should back this up. THough if one wanted they could try to put for A concentration check if they wanted to get into a RAW vs RAI argument with their DM. Clearly, spell casting requires you to concentrate. That is the RAI logic of it.

But if looking at the PFSRD(since I have no books) We see under the spell entry that if anything distracts you, you need to make a concentration check. But we also see that any vigorous or violent motion also demands a check.

So a caster doing an AOO should have to make two checks. RAW
Comment: Thomas means, are there rules that back that up… and if so, could you use them in your answer as supporting evidence? You can [edit] your post to improve it at any time.
Answer: Yes (but beware of 1-minute casting time spells, and you need special threatening abilities)
Casting a spell makes you no longer threated spaces 'around you', so you'll need some other method of threatening spaces or some other method of making attacks of opportunity.  You can still threaten spaces with anything that adds threatened spaces in a special way, like the snap shot or whip mastery feats, and possibly with reach weapons depending on how you define 'around you'.  You can also make attacks of opportunity without threatening spaces with the Vicious Stomp or Misdirection Attack feats.
Regardless, your weapon will also need to not be two-handed or you'll need extra arms if your spell has somatic or material components.
What's much more complicated, however, is the question of whether or not
choosing to take an attack of opportunity while casting a spell, when you can, prevents you from casting your spell.
The relevant rules are as follows:

Casting Time
Most spells have a casting time of 1 standard action. Others take 1 round or more, while a few require only a swift action.
A spell that takes 1 round to cast is a full-round action. It comes into effect just before the beginning of your turn in the round after you began casting the spell. You then act normally after the spell is completed.
A spell that takes 1 minute to cast comes into effect just before your turn 1 minute later (and for each of those 10 rounds, you are casting a spell as a full-round action, just as noted above for 1-round casting times). These actions must be consecutive and uninterrupted, or the spell automatically fails.
When you begin a spell that takes 1 round or longer to cast, you must continue the concentration from the current round to just before your turn in the next round (at least). If you lose concentration before the casting is complete, you lose the spell.

So, these rules are weird.  First of all, the specific calling out of spells that take 1 minute to cast is very odd.  Technically this only affects those spells and makes casting them much more onerous than casting a spell with a 9 round or 11 round casting time (not that any exist.  The closest spells are Forbiddance with a 6 round casting time and potentially 2 minutes (or maybe fractional minutes) for Illusory Script, Nature's Ravages, and Ironwood on the other end), since all other spells require only a full-round action to start and then a standard action each round.
There's a couple ways this is ordinarily dealt with.  One is to extend the rules for 1-minute spells to all spells longer than a round, and the other is to completely ignore the rule and have 1 minute spells cast the same way as everybody else.
Regardless, there's a second complication here.  Originally, in the Core Rulebook, attacks of opportunity were never given an action type.  Maybe they were free actions, maybe not-an-action actions, maybe their own special type of action.  It was never defined, so it was sort of up to the GM how they wanted to handle that.
In the Melee Tactics Toolbox, however, Paizo errataed/clarified attacks of opportunity to definitely be free actions.  Paizo's errata rules are last published wins, unlike WotC's primary source rule, so even if you interpret the (re)definition as conflicting with the CRB rather than expanding on it, technically the more-recently-published Toolbox wins (2015 for the Toolbox, 2013 for the most recent 6th printing of the CRB).  That makes AoOs a free action, but that's hugely problematic for certain interpretations of the free action rules, so this also gets ignored very frequently.  This means there are four common cases which need addressing, based on the rules as written for the two sections, the most common non-RAW method of play, and their combination.
Regardless of rules interpretation, 1-round casting time spells are always okay to interupt.  This is because they only need a single full round action so there's no concern about making that action non-consecutive with other actions.  Similarly, it is always okay to take an attack of opportunity in the final round before you finish casting the spell, because you'll have taken all your full-round actions by that point.
It's also okay to take an attack of opportunity in response to an attack of opportunity that provokes which is itself taken in response to your starting to cast a spell (e.g. you start casting Forbiddance, someone with a -2 cursed sword tries to punch you in the face, you punch them in the face first).  That's because AoOs happen right before the action that provokes them, which means that opportunity attack you take goes back in time so the full-round action you took before it is now after it and everything can still be consecutive.
It's not okay to take an attack of opportunity in the middle of casting a spell, because even as a free action it makes your full-round actions non-consecutive.  You still can, if you want, but then your spell will automatically fail.  This is true unless attacks of opportunity are not-an-action actions, which, since they aren't actions, can't interrupt your full-round action sequence and make them non-consecutive or the rules for casting 1-minute spells are not extended to all other spells longer than one round and the spell you are casting does not have a casting time of exactly one minute, or the casting time rules for one minute casting time spells are ignored.
In those cases, it's always okay to take an attack of opportunity.


What should I do with the Incubus Wings in Wizardry Forsaken Land?

Question: I did manage to beat the Incubus on B6 and got the Incubus Wings. Because the Incubus is woven to the story I don't think I will ever see another one and therefore get no other wings. I also can't sell it to the material shop to get more. So, it's only a single use and I want to make the best out of it. Is a magic stone the best I can do with it?
Answer: Making a magic stone is all you can do with the Incubus Wings.  Additionally, there is no magic stone that can only be made with the Incubus Wings, so there will always be other options available to make any\all of the magic stones in the game.
Answer: The best use for them is to make new stones at the Vigger's Shop (for characters' spell-use upgrades) or even just use them, rather than bring them to the Materials Shop.
*** Important reason: Incubus Wings are one of the three unique materials in the game (the other two being Golem's Flesh and Sword Fragment).  If you play long enough, then you'll almost certainly bring every type of item to the Materials Shop, and bringing Eric those 3 unique items will finish Lydia's quest, and he'll close down the shop -- which means that any further spell stones will require painfully slow level grinding to obtain the requisite components.  When your PCs have reached max level, that level grind becomes tedious because they're not getting any more powerful, they're just hunting for material over and over.  Simply buying the components at the shop and using them to make stones at the Vigger's Shop in town is only a short trudge, and at high levels you'll have plenty of spare cash to make stones and maximize your spell casting capabilities.


Term for Bowing at the End of a Play

Question: I'm looking for the best term (or phrase) to describe the act of bowing to the crowd while onstage at the end of a play or performance.
I came by the terms "encore" and "curtain call", but I'm not sure if those truly fit in this context and if there's not a better way to describe this act.
Comment: In many plays, the whole cast is not on stage at the end of the play, so others must come on stage and bow with them. This can be staged in a number of ways. It's called a _curtain call_. Often the curtains close before the cast bows, and the bows are often arranged in stages, with multiple bows, and important actors coming in last, so as to keep the applause replenished.
Comment: I think either "bows" (play or musical performance) or "curtain call" (play only) is appropriate.  An "encore" is an added performance (eg, performing another song) in response to an audience's (presumably standing) ovation.
Answer: You are looking for "curtain call", as has been mentioned in the comments.  Also known as the "final bow", or "walkdown" it occurs at the end of a performance when all actors (or most actors) come to the stage to be applauded for their acting.
"He gave a final bow just as the curtains came down." Longman
Comment: Thank you :)
Your answer is short, straight to the point and great, but I marked tchrist's answer because his explanation covered several related points that were rather vague to me.
Answer: An encore is the wrong word: that's like having an extra musical number after the show is officially done.
Performers sometimes take their bows during the accolades accorded them at the end of their performance.  Especially when this involves bringing them out in front of drawn curtain, then it is a curtain call.  The applause is known as an ovation, and if the audience rises in unison to further signal their enthusiasm, then it is a standing ovation.
Note however that there can be many arrangements, particularly in large ensembles with a few star performers. There may be front-of-curtain bows for the leads, but a raised curtain for a chorus.
Occasionally flowers are given out to star performers during their bows; this is not a gender-specific tradition, for both male and female performers can receive them.  These are only given after a performance, never before it.
These can be simple blooms or splendid bouquets. However, they are usually given out only to a few, such as to the conductor and sometimes to the principal soloists. Different types of performance have different traditions in this regard, as explained in this New York Times article on the rules and hazards of presenting flowers.
Extremely rarely, other gifts are given out, but it is almost always flowers if any gifts are made.
Comment: "Take a curtain call" would be the normal phrase.
Comment: Thanks for the expansive answer!
Also, how would you most likely use "curtain call" in a sentence? Did the performer take a curtain call, perform a curtain call, make a curtain call?

Term for Bowing at the End of a Play


Is Shiny Xerneas possible with game restarts?

Question: I am in the room with the Xerneas tree, and I keep reopening the game to find a shiny. Is it possible to find a shiny that way? If so, than will it show Xerneas shiny in the cutscene?
Answer: No, this is not possible. Starting with Generation 5, some Pokemon are programmed such that you cannot encounter their shiny variant in the wild.
Taken directly from Bulbapedia:

Unobtainable Shiny Pokémon
  In all generations since Shiny Pokémon debuted, there are a few species that cannot be legitimately obtained Shiny. This can be caused by being impossible to obtain except through a direct event distribution, or by being programmed so that they cannot be Shiny in the wild (Generation V onward).
Generation II
  - Mew[note 1]
Generation III and on
  - Celebi
Generation IV and on
  - Arceus
  - Spiky-eared Pichu*
Generation V and on
  - Victini
  - Reshiram
  - Zekrom
  - Keldeo
  - Meloetta
Generation VI
  - Xerneas
  - Yveltal
  - Zygarde
  - Diancie


How to fill a maple leaf shape properly?

Question: I got this maple leaf shape and I want to deform it later on but I can't figure out how to properly fill it. Using the normal fill makes the triangles in the middle way too long, grid fill doesn't work at all. Filling it and then remeshing it in sculpt mode doesn't work since it just disappears as soon as I use a value under 0.1m which is way too big for it to look good and converting it into a curve and filling it doesn't work either. I didn't find any other method to fill it so I hope you can help me
Here's the Blend file:
Comment: https://www.youtube.com/shorts/sv9sa12d0yo
Answer: Make a plane this size to cover the leaf outline and subdivide it as much as you need for simulation:

While in edit mode, select leaf in outliner, so that blender is in edit mode of subdivided plane and Leaf object is highlighted with orange color:

Mesh -> Knife Project:

Invert selection Ctrl + I

X -> Edges


Does age factor in when calculating relationship on DNA match

Question: A result of 193 cm from 100 year old, matched up to a 35 yo. Does the age of the participants factor in? The sample also showed  cross match. The relationship is estimated at 2nd to 3rd cousins. Does that mean i should be able to locate a common ancestor easier?
Comment: https://dnapainter.com/tools/sharedcmv4/193
Answer: Age has no effect on the cM readings. If a person is 10 or 100, it won't result in higher or lower than expected cM values.
But an age difference does affect the possible relationships. Second and Third cousins are on average at the same age. Once removed from that means one cousin is a generation removed. Twice removed means two generations removed. With a 65 year difference, you are looking at likely a difference of 2 or 3 generations between the two.
A second cousin is expected to share the same amount as a first cousin twice removed. A third cousin is expected to share the same amount as a second cousin twice removed.
So factoring the age difference of 65 years, the estimated relationship given as 2nd to 3rd cousins should be thought of as one of:

First cousin, twice removed
First cousin, three times removed
Second cousin, twice removed
Comment: But keep in mind that generations can be way off between different branches of a family: my father-in-law was thirty years younger than his first cousin, resulting in second cousins 43 years apart in the next generation. A 65-year age difference rules out parent-child, but is only a guideline for more distant relationships.
Comment: From the Shared cM Project tool, 2C2R is a much smaller likelihood than 1C2R, 1C3R or half-1C2R.  This means that the common ancestor you're looking for is likely a grandparent of the 100 y.o. cousin, and likely your great-great-grandparent, or ggg-grandparent.  To be certain who the common ancestor is, you'd in theory need both their and your pedigrees extended that far back for all ancestral lines.  However, if you have enough shared matches between you with the same ancestors in their trees, you may be able to make an educated guess.


Can a dual Schengen/non-EU citizen enter the Schengen area with his non-EU passport?

Question: Suppose that one is a citizen of both France and Japan, and is traveling from Japan to Italy. Can she enter Italy with the Japanese passport, or must she present her the French passport at border control?
Comment: @blackbird57 It's not a duplicate. I think this question is something like, whether a holder of an EU passport is obliged to enter the Schengen zone under that passport and not under a non-EU passport.
Comment: Possible duplicate of [I have two passports/nationalities. How do I use them when I travel?](http://travel.stackexchange.com/questions/52100/i-have-two-passports-nationalities-how-do-i-use-them-when-i-travel)
Comment: It's not your question but note that French citizens can also get a much cheaper national ID card (free of charge if you never had one or can present the previous one, €25 otherwise) and enter Italy with that. Could be an option if you were thinking about using the Japanese passport to avoid the €90 passport application fee.
Comment: I'd rather say that there is absolutely no point in shooting on own feet and standing a long line to get an entry visa and having to ask question while **one could simply breeze through immigration** no-questions-asked. It takes me 5 seconds to pass the Schengen immigration control with my EU passport. Other people on the line will appreciate
Answer: There is no rule like that in the Schengen regulations so, as far as EU law is concerned, it is not mandatory to identify yourself as an EU citizen when crossing an external Schengen border. Theoretically, there could be some rules like that at the member state level (e.g. it could be mandatory to present a French passport when entering France) but that's not very common in Europe and definitely not the case for France.
However, if you present a Japanese passport, you should have a valid purpose for the trip, sufficient financial means for it, etc. and could be refused entry if you don't (which would not happen for French/EU citizens). You will also get an entry stamp.
Note that France is fine with multiple citizenships but the situations in which one could be both a citizen of Japan and of another nation are really limited. If you know a French citizen who also holds a Japanese passport, chances are that they actually lost their Japanese citizenship a long time ago or risk losing it at any time, even if they have been able to hold onto their passport and/or renew it in the meantime.
This makes the entry and exit stamps all the more important: If you are French, you don't risk any serious trouble with the French or Italian authorities but an inquisitive Japanese border guard or passport officer might notice a dangling entry stamp or a trip to the Schengen area without matching entry/exit stamps and realise you actually have another citizenship at which point you could be formally asked to choose between trying to renounce that citizenship and giving up the Japanese citizenship.
Comment: "but that's not very common in Europe": In the Netherlands, the Dutch compulsory identification law requires Dutch dual citizens to use Dutch ID, but if you're a dual citizen of another EU country and a non-EU country, you can use your non-EU passport to identify yourself. However it's not clear whether this law applies to immigration inspection, so the question is rather open even for Dutch citizens.


Configure same picklist as single/multiselect on different VF pages

Question: I am new to SF technology.Here in my requirement I have one object Advertisement__c, it has a picklist named Locality__c. This pick list is used on two custom VF pages, on one page I want to use it as single select where as on page I need to use it as multiselect and I have bound this picklist using <apex:inputfield> . Please let me know whether is it possible to customize picklist in this way ?
Answer: This is not possible in native way. but three are multiple workarounds like: create this picklist as multiselect picklist.

Now in one place display it using apex:inputfield. and another place get all value using describe and then create selectoption list and populate this field using single select.

Sample code to get picklist value modify this as per your requirement
public List<SelectOption> getCountries()
{
    List<SelectOption> options = new List<SelectOption>();
    Schema.DescribeFieldResult fieldResult =
    OfficeLocation__c.Country__c.getDescribe();
    List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
    for( Schema.PicklistEntry f : ple)
    {
        options.add(new SelectOption(f.getLabel(), f.getValue()));
    }
    return options;
}

Comment: Only the controller will not make the picklist as multiselect. Include VF code as well.


What is the centripetal acceleration for non-uniform speed?

Question: In NCERT physics page no.  122 example 6.7 there is an argument next to equation 6.12 i.e., $T_A -mg= \frac {mv_0^2}{L}$ which means that at the lowest point the centripetal force  is equal to $ \frac {mv_0^2}{L}$ which means that centripetal acceleration is $\frac {v^2}{r}$ which I think isn't true as the speed of the ball is constantly changing so we can't use the formula of $\frac {v^2}{r}$ for calculating centripetal acceleration and hence the force. I know the derivation of the formula of centripetal acceleration for uniform circular motion from Halliday Resnick and Walker and the formula is derived on the assumption that speed is constant. So I want a confirmation whether my thinking about the logic being used is wrong  is correct or not?
Comment: Try differentiating $\vec{r}=r\cos{\theta}\,\hat{x}+r\sin{\theta}\,\hat{y}$ and express the velocity and acceleration in terms of $\hat{r}$ and $\hat{\theta}$.
Comment: I did that and the acceleration I am getting is not what is stated
Comment: As Aaron shows in his answer below, $$a_c=\frac{v^2}{r}$$ is always true. The perpendicular (centripetal) component can be dealt with independently of the parallel component and only depends on how fast you move in that very instant, which doesn't have to be constant and the same in the next instant. Only if you write it as $$a=\frac{v^2}{r}$$ is it only true for uniform (constant-speed) motion.
Comment: Is the derivation of the formula of centripetal acceleration for uniform circular motion not given in NCERT? Is is given only in Halliday Resnick and Walker?
Comment: I am not able to find the formula anywhere, please help me
Answer: In polar coordinates, the acceleration vector for planar motion is given by
$$\mathbf a=(\ddot r-r\dot\theta^2)\hat r+(r\ddot\theta+2\dot r\dot\theta)\hat\theta$$
If our motion is along a circle, we have $\dot r=\ddot r=0$, so our acceleration reduces to
$$\mathbf a=-r\dot\theta^2\hat r+r\ddot\theta\hat\theta$$
The centripetal acceleration is the radial component of the acceleration
$$a_c=r\dot\theta^2$$
Using $\dot\theta=v/r$ we end up with the familiar result
$$a_c=\frac{v^2}{r}$$
Notice how we didn't assume anything about the speed $v$. This expression is valid for when $v$ is not constant. We will just have a changing centripetal acceleration, and we will also have a non-zero  tangential acceleration as $\ddot\theta=\dot v/r\neq 0$.
Answer: Assign unit vectors in radial and tangential direction and resolve them in cartesian coordinate system.Differentiate them twice and you will get the desired result.
Answer: I would try to give a rather intuitive way to approach the question.
Say the object is rotating in a circle with a tangential acceleration $a_t$. Here $a_t$ acts to change the speed of a particle in the tangential direction (say) changing it from $v_0$ to $v$. Now say at that instant the tangential acceleration ceases to exist then what can we say about the centripetal acceleration? Surely it would be $a_c = \frac {v^2}{r}$. Hence it can be stated that at any instant that the centripetal acceleration acting on an object is proportional to square of it's instantaneous velocity.
Comment: @AaronSteven Lately thinking about this I have came to the intuition stated above (in my answer) can suggest whether it is correct or not?