Determining the ability modifier to use based on the attack type

Question: What's the rule (and where is it in the books) that defines which ability's modifier applies to basic attacks for melee and ranged weapons?
Comment: please read [our FAQ](http://rpg.stackexchange.com/faq).  RPG.SE is for expert Q&A on RPGs - not for asking people to post a whole rulebook for you piece by piece.  All your questions would not be questions if you owned and had read the 4e rulebook.  Please do so, and then ask specific questions on items that are still confusing after you've done some basic thinking about them.
Answer: Per page 216 in the D&D 4ed Players Handbook if you are making a melee attack you use the strength ability modifier. If it is a ranged attack use your dexterity modifier.


Bootcamp not asking for USB

Question: I bought a new Macbook and i'm trying to install windows on this computer with bootcamp (i added windows to my other macs too without problem) but this app won't gives me the option to choose the usb drive where he downloads the drivers and boot files... why is the first 1 - 2 step gone ? This way if the windows install starts it tells me there is a problem because no boot file is there... why i can't choose the usb ? did apple updated something ? :/ can't find any solutions... any idea ? Thank you
Answer: Please have a look at this article: http://www.idownloadblog.com/2015/10/01/el-capitan-boot-camp-windows-changes/
Just follow the next steps and windows should install without using a USB drive.
Comment: ah thats meh... the article says that with this way the windows still installs without probem but why i get always a missing boot error :/... maybe i need the latest windows iso ?... i'll try with the latest original iso, Thanks for the info
Answer: I recently had a similar problem. Apparently, BootCamp Assistant doesn't require a USB-stick anymore. In my case I used Brigadier – a neat little tool that will identify and download the correct Bootcamp drivers for you.
Concerning your boot problem, I am not sure what is going on. Did you check that your image file is working and that your version of Windows is supported on your Mac?
Comment: Thanks everyone, i finally installed windows on my mac without usb... i was very confused last week i had to connect an usb and now not, but i need to use the latest windows which will start boot. Thank for the tips

Bootcamp not asking for USB


What's a good vegetarian substitute for Worcestershire sauce?

Question: The only thing I really miss since I started the whole rampant vegetarian thing is the taste of Worcester sauce in all sorts of dishes.
Is there a way to get close to the flavour without doing anything rude to any anchovies?
Answer: I have found a few recipes on the web:

Vegan Worcestershire sauce
Vegetarian oyster sauce

There are also a few hard to find ready-made vegan Worcestershire sauces on the market, such as Annie's.
When I read these recipes (which I have never made) I can tell that their flavor profile is missing some key aromas present in the original Worcestershire sauce. As strange as it may sound these sauces could use some of the aromas found in Parmigiano-Reggiano and in broccoli.  Whichever recipe works out, someone should write a blog post on this topic.
Comment: I suggested the Parmigiano because it shares aromas with anchovies and fish sauce, but I have no idea how to make it liquid.  I'm very curious how it works out. Please let us know.
Comment: +1: agreed completely!  I'm a not-terribly-strict vegetarian, so I keep the vegan Worcestershire at home but often have the real thing when eating out, and there is definitely a difference along the lines you describe.  Agreed that an investigation into replicating this would be fascinating.  On the other hand, in some recipes that call for it, I think the veggie one actually works better — often it's just the salty-fruity-sweetness that's really wanted, not the anchovy aromas.
Comment: I'm going to try both of these.
On the other hand, I'm also going to see if I can get Henderson's Relish shipped to me somehow.

I'll post results, but it might be a few weeks.
Answer: I had to do the same last year when I was making an egg-mayonaise salad, and found out too late we didn't have any Worcestershire sauce anymore.
What worked nicely for me was combining HP brown sauce (bought while on holiday in the UK) with a smoke-flavoured barbecue sauce. It was two teaspoons of one (probably HP, but I'm not sure anymore) and one of the other.
While the mixture itself seemed to resemble Worcestershire sauce only approximately, there wasn't any way to make out the difference in the finished dish. I did ask people who knew the recipe if they thought it was any different than usual, and nobody did.

Both ingredients say "suitable for vegetarians" on the bottle, so I guess this should do...
Answer: If you can find it, Henderson's Relish is an excellent vegetarian substitute.

Sadly it is only well-known in a small area around Sheffield where it is made, and it is difficult to find it once you get some distance away.
Comment: +1 Thanks for this ... something I need to buy when I'm passing through Sheffield next year ...
Answer: If there is a Trader Joe's near you, I've found a vegetarian Worcestershire sauce there and it has been pretty good.
Also a quick Google search finds a few other options.
Answer: I use miso as a substitute.  It adds some of the same type of depth that worcestershire sauce adds.
Answer: You could try experimenting with vinegar, sugar and tamarind, you should get a close approximation.
Answer: as the anchovies contain umami, maybe you could try miso mixed with vegan 'Parmesan' cheese as an alternative.  I've not tried this, I'm just making an off-the-top of my head suggestion.
Comment: Parmesan? Strange, but I'd try it.
Answer: Try Hoisin sauce mixed with Soy sauce and a bit of vinegar.  That'll get you close.
Answer: you can try to make the original recipe without any fish sauce added, and even replace that perhaps with pommegrenate paste or something similar
Answer: Marmite or Vegemite with a splash of lemon juice or soy sauce with lemon juice is also a good replacement. Marmite is my favorite replacement so far but you only require a small amount dissolved in some hot water.
Answer: One of the best substitutes I've found is Mushroom Catsup.
Don't be fooled by the name, it is a thin, brown sauce with plenty of savory flavor, not really similar to the thick tomato stuff we are familiar with.  Given the relative historical timing, it may be that Worcestershire sauce was a substitute for mushroom catsup in traditional cooking. I've tried several commercial vegetarian Worcestershire sauce versions - including cornet bay, bourbon barrel, and Annie's, and while they're all great I still prefer mushroom catsup.
The recipe I've used can be found here
https://savoringthepast.net/2012/08/01/did-george-washington-use-ketchup/, or bottles of the Geo Wakins brand can be purchased through the site's store or on amazon.
Answer: There are quite a few vegan Worcestershire sauces on the market already. I've used both Annie's and The Wizard's lately, and both are adequate (I think I prefer the latter; it has a more traditional flavor).
Answer: You can get Vegetarian Oyster sauce which doesn't replicate the full Worcestershire sauce experience but does give some of it.
Comment: I have had Oyster sauce that is assured to be completely vegetarian. It wasn't easy to find and I have no idea what is used as a substitute.


Possessive of a possessive

Question: There is a sign at my work that says "Join the fight for Alzheimer's first survivor" and I am wondering about the use of "Alzheimer's" here. They are not reffering to a survivor of Alzheimer, they are referring to a survivor of Alzheimer's disease and using Alzheimer's as a short form of the disease. What would the possessive form of Alzheimer's be? I don't think it should be Alzheimer's's but i also don't think that it is correct as is. When searching for "double possessive" rules I can only find articles saying to avoid phrases like "St Paul's Cathedral's arches" is the only correct form to rearrange the syntax to be "Join the fight for the first survivor of Alzheimer's?"
Comment: totally agree, just could not find this. I'm fine with question being closed as duplicate
Answer: Alzheimer's is correct. There is no double possessive in the English language. You can chain possessives (as in your example St Paul's Cathedral's arches). You can also shorten noun phrases (Alzheimer's disease routinely gets shortened to Alzheimer's).
Comment: I agree with your answer, but suggest you add a link (e.g Wikipedia)
Comment: Misnomer or not, the **double possessive** does exist in English, exemplified in strings such as _a friend of mine/John's_.

Possessive of a possessive


Can Amazon Cognito be a substitute for the Login-With-Amazon SDK?

Question: I have an ios app working with Cognito for authentication. As I delved further into what amazon had to offer, I had come across Amazon's Alexa Voice Service and the Alexa Skills Kit. Going through the documentation from Amazon, it was mentioned that I have to use the Login-With-Amazon SDK for the purpose of authentication, upon which I will have access to Alexa Voice Services. I really need to know if there is a workaround to this. I am allowing unauthenticated access from my app, after checking if the username and password is already registered in my dynamoDB table. Do I still have to use the Login-With-Amazon SDK? Can I get Alexa working without it?
Answer: The user has to login to their Amazon account using the Login With Amazon SDK (LWA) regardless of whether they're using the Alexa Voice Service (AVS) for a device authorized via a mobile app, a website, or calling the REST API directly, you'll need an access token from LWA. A good overview of the auth flow is in the Getting Started Guide. So you will not be able to allow unauthenticated (i.e. anonymous) users to call the AVS. Cognito has a documented way to integrate LWA alongside your existing unauthenticated code, but your users will have to login with Amazon before you can leverage AVS.
An explanation about why this is required clarified by an Amazonian in this thread with the statement:

For AVS, we need the user's permission to access THEIR account data. That means you'll need to get an access token via the LWA SDK.
Answer: You can add Amazon as a provider for the Cognito identity Pool, then you can make it work with Amazon accounts.
Comment: I dont want it to work via amazon accounts. I want to be able to access Alexa Voice Services without logging in to amazon, since I have authentication already being taken of by amazon Cognito.
Answer: It's worth noting that the Alexa Voice Service is intended to be consumed by Alexa devices, not mobile apps. For example, echosim.io consumes the voice service.
If you still want to add Alexa-style skills to your iOS app, I'd suggest checking out Amazon Lex (through AWS), which has become available since your original question. You can create voice or text chatbots that leverage Alexa technology and your users can login with Cognito.


Historical Examples of Child Exchange between cultures or nations

Question: Are there historical examples of a noble or other representative of a nation-state exchanging his own child or other children from his nation-state with those of an enemy, in order to solidify a friendship or peace treaty between those nations?
Comment: So... exchanging hostages? That was quite a common practice.
Comment: @Desiree Actually, the lines between those things were often quite blurred. For instance, [Tokugawa Ieyasu](http://en.wikipedia.org/wiki/Tokugawa_Ieyasu) was sent to the Imagawa Clan as a token of allegiance (hostage), where he was fostered by [Imagawa Yoshimoto](http://en.wikipedia.org/wiki/Imagawa_Yoshimoto) (ward) after whom he was named **Moto**nobu, and upon majority was married to Yoshimoto's newphew's daughter.
Comment: Would daughters married off to solidify relations count?
Comment: I am most interested in children who were taken in as wards, not hostages or married into a family.
Answer: The Romans would accept and raise the highborn of allied tribes, hoping to Romanize their future leaders and cement their political and military relationships. Maroboduus was a ward of Augustus. Later, as king of the Marcomanni, he organized a confederation of tribes to defend against Rome.
This was also the case with the Germanic Cherusci tribe, which was for some time considered an ally of Rome. The Cheruscan chieftain Arminius was raised in Rome, though it seems difficult to tell from the record exactly what his status was (hostage? ward?). In any case, Arminius was introduced to Roman culture and military practices. He received citizenship and command of auxiliary forces that fought for Rome. He seemed Romanized enough that he was trusted by the general Publius Quinctilius Varus on an expedition into Germania. This was a mistake, albeit a very quotable mistake.
Comment: This might be very helpful. Can you point me to a source for this example?
Comment: @Desiree: Tacitus is the best-known primary source, I believe. Adrian Murdoch's "Rome's Greatest Defeat" discusses theories about Arminius' childhood. He was definitely a Germanic elite who served in the Roman Army before betraying Rome. His exact status as a child in Rome can't be proven, but ward or hostage are popular theories that are consistent with practices at the time. (Maroboduus is a better documented case, but Arminius is of greater general interest.) As Semaphore hints in his comment, a ward in good times is a hostage in bad times, so the distinction is blurry.


Computing all possible partial sum-function of a given set of numbers

Question: Let there be $N$ positive numbers given as $\lambda_1\geq\dots\geq\lambda_N$. Now I am interested in the following numbers given as $$\alpha_i=\exp(\frac{\lambda_i}{\lambda})$$ for some positive constant $\lambda$. Define the function $\mathcal{S}(..)$ which takes a subset of these numbers (let me call me them as a sequence) and calculate their products. For example$$\mathcal{S}(\alpha_1,\alpha_2)=\alpha_1\alpha_2$$Also note that $$S(\alpha_1,\alpha_2,\alpha_3)=S(\alpha_1,\alpha_2)S(\alpha_3)$$Also $$\mathcal{S}(\alpha_1,\alpha_3,\alpha_4)={\mathcal{S}(\alpha_1,\alpha_2,\alpha_3,\alpha_4) \over \mathcal{S}(\alpha_2)}$$ and so on. For given $K$ and $N$, we have $NC_K$ possible subsequences of $\alpha_i$'s. Is there a really efficient way of computing $\mathcal{S}(.)$ for all such sequences.
Answer: There are ${N \choose K}$ subsequences of length $K$, so outputting $\mathcal{S}(\cdot)$ for all of them will certainly require an output of length at least ${N \choose K}$.  Thus, the running time has to be at least ${N \choose K}$.  Beware that this is potentially exponential in $N$, depending on the value of $K$, so for some choices of $N,K$ there is no hope for an efficient algorithm to compute all those values.
You can list all those values in approximately ${N \choose K}$ time.  Take any algorithm for enumerating all $K$-size subsets of $\{1,2,\dots,N\}$; then it is easy to turn it into an algorithm to do what you want, by keeping track of the product associated with each subset.  Note that when you add an element to a subset, with a single multiplication you can update the product (compute the product of the new subset, based on the product of the old subset multiplied by the new element that was added).
Comment: Do you think algorithms like binary indexed tree which compute partial sums can be helpful here?


Logarithms of matrices in the disk-algebra

Question: It is easy to see that within the disk algebra $A(D)$
  $$\Delta(z):= \begin{pmatrix} 1&0\\z&1 \end{pmatrix}\; \begin{pmatrix} 1&1\\0&1 \end{pmatrix}=
 \begin{pmatrix} 1&1\\z&1+z
 \end{pmatrix} $$
 is a product of two exponential matrices.  Is $\Delta(z)$ itself an exponential matrix of a holomorphic matrix $M(z)$ ?
 I don't think so, but could not come up with a proof. Is there a general method to deal with these questions?
Comment: See again my answer, the upper-left entries lacked the correct sign.
Answer: It seems that $\Delta(z)$ is the exponential of an holomorphic $M(z)$. Using the eigenvalues and eigenvectors of $\Delta$, I find
$$M(z)=\frac\mu{\sqrt{z(z+4)}}\begin{pmatrix} -z & 2 \\ 2z & z \end{pmatrix},$$
where $\mu$ is the solution of
$$\sinh\mu=\frac12\sqrt{z(z+4)}.$$
Because $\sinh^{-1}$ is an odd holomorphic function, the quotient $\frac\mu{\sqrt{z(z+4)}}$ can be chosen holomorphic, at least in a domain where
$$\left|\frac14z(z+4)\right|<1,$$
because the convergence radius of the power series
$$\sinh^{-1} x=x-\frac1{2\cdot3}x^3+\frac{1\cdot3}{2\cdot4\cdot5}x^5+\frac{1\cdot3\cdot5}{2\cdot4\cdot6\cdot7}x^7+\cdots$$
equals $1$. To have a positive answer to the question, we need to prove that $\sinh^{-1}$ extends holomorphically to a slightly larger domain, containing the image of $D$ under the multi-valued map
$$z\mapsto\frac12\sqrt{z(z+4)}\,.$$
A good news is that this image does not reach the singularities $\pm i$ of the series above.
Answer: To address the part of the question about a general method - seems like the Baker-Campbell-Hausdorff formula can give something tractable in this case. Denoting $e=\left(\begin{smallmatrix}0&1\\0&0\end{smallmatrix}\right)$ and $zf=\left(\begin{smallmatrix}0&0\\z&0\end{smallmatrix}\right)$ (so that $\Delta=\operatorname{Exp}(e).\operatorname{Exp}(zf)$), one has
$$
zh:=[e,zf]=z(e.f-f.e)=\left(\begin{smallmatrix}z&0\\0&-z\end{smallmatrix}\right)
$$
so that the whole Lie algebra generated by $e$ and $zf$ comes out the vector space spanned by $e_n=(2z)^{n-1}e$, $f_n=2^{n-1}z^nf$, $h_n=2^{n-1}z^nh$, $n=1,2,...$, with brackets
$$
[e_m,e_n]=[f_m,f_n]=[h_m,h_n]=0,
$$
$$
[h_m,e_n]=2e_{m+n},
$$
$$
[h_m,f_n]=-2f_{m+n}
$$
and
$$
[e_m,f_n]=h_{m+n-1}.
$$
In other words the Lie algebra is (almost all of the) $\mathfrak{sl}_2[z]$, its exponential map must be well studied by physicists.
In fact if I am not mistaken the BCH formula gives in this case
\begin{multline*}
\Delta=\operatorname{Exp}\left(e_1+f_1-\frac12h_1-\frac1{12}(e_2+f_2-\frac12h_2)+\frac1{120}(e_3+f_3-\frac12h_3)+...\right.\\\left....+(-1)^{n-1}\frac{(n-1)!}{4^{n-1}(2n-1)!!}(e_n+f_n-\frac12h_n)+...\right),
\end{multline*}
and since
$$
e_n+f_n-\frac12h_n=\frac{(2z)^{n-1}}2\begin{pmatrix}-z&2\\2z&z\end{pmatrix},
$$
we get
$$
M(z)=\frac12\sum_{n=1}^\infty(-1)^{n-1}\frac{(n-1)!}{(2 n-1)\text{!!}}\left(\frac z2\right)^{n-1}\begin{pmatrix}-z&2\\2z&z\end{pmatrix}
$$
which (I think) boils down to the same $M(z)$ as in another answer.
Answer: $\Delta(z)$ does not have a nonpositive real  eigenvalue for $|z| < 4$, so the principal branch of the logarithm is defined and analytic on a neighbourhood of its spectrum, and thus the holomorphic functional calculus produces the desired analytic logarithm $M(z)$ for $|z| < 4$.


How can I implement session variables in J2ME?

Question: Is it possible to use session in J2me? I am trying to develop a Blackberry application. I want to get some text from a class(page) and use in another class(page). May be something like the we do in app.net as:
Class1
{
    session("myVariable") = Textbox.Text;
}

//a new class
Class2
{
    TextBox2.Text = session("myVariable").toString();
}

I will really appreciate for any type of help.
Comment: Hi! please don't post comments as answer. and upvote/accept if answer is helpful. :) thanks!
Answer: You can have a third class where you store such 'global' variables. You can make these variables public and static; though this can lead to tightly coupled code.
public class GlobalVariables
{
    public static string MyVariable = "empty";
}

Then you can do...
GlobalVariables.MyVariable = Textbox.Text;

...and...
TextBox2.Text = GlobalVariables.MyVariable;

...anywhere in your code. While this would tend to be frowned upon in usual circumstances it can be useful when trying to write minimal, fast code to run on limited devices.
Another tip is to have a reset-method in GlobalVariables to reset all the static values back to their defaults in case the user wants to reset the app from within the app. Also, if this is the only place you will store all your per-session variables you can add RMS save and load methods in here to keep it all in one place.
Again, it's not the best way of doing things... but it is simple.
Comment: No problem. Click the tick to the left on the best answer you get :)
Answer: When I first saw your question I thought it was going to be about HTTP sessions, but it looks like you're just after a way of storing state in your application.
There are a number of ways to do this.  Some things to consider:

Do you need to persist the session data (or perhaps some of it) between runs of your application?
Is the set of session variables fixed, or can it vary?
Are all variables 'stringy' or are some numeric?

A simple implementation might be an instance of Hashtable in a class with public static methods to get and set variables by calling the Hashtable put() and get() methods.


Azure ML-Training Model on Voice

Question: Is it possible to train a Azure model on Voice?
I am working on a call center use case where in , when a customer calls in with a complaint based on the description the ML model should be able to predict & classify the Customer Complaint
Actually I was able to train "two class boosted decision tree" model, on text based complaints using feature hashing technique, but specifically looking to train the model on Voice
Guidance, examples & references would help
Incase OOB feature wouldn't exist in MLS, open to hear about workarounds as well
Thanks
Hi, Thanks for the response. This is the core idea
Call center would have data Comprising of Label Customer Complaint and Feature Issue description
Sample "Customer Complaint" would be Billing issue or Internet speed
Sample description would be "Hey i was paying $x but the price went up by $y, can you apply some promotion to being my monthly bill down by $z"
the webservice will take Voice input Issue Description & should product either voice/text output Customer complaint
We would want to train ML model with the data and deploy as web service. THis way when the consumer calls with an issue, they need not dial options 1,2,3 rather the model is able to route them to appropriate queue
(1) How do I convert text data to Voice in Azure MLS?
(2) How do i apply , train & Score model in Voice
(3) How to make the webservice accept Voice input to produce the scored label/value as webservice output
Comment: Can you please add more details about the input data and classes that you want to predict and classify.
Answer: You can benefit from the Video Indexer, and speech services for call center, also from the speech to text and text to speech.
This github sample will help you to build a NLP that can classify a given question into a category.
You can clone this git into a Notebook VM in AML Workspace and run 'bert-stack-overflow/1-Training/AzureServiceClassifier_Training.ipynb' to build a model.

Azure ML-Training Model on Voice


How to create a new contentversion(pdf) using the existing contentversion(word) version data

Question: I want to generate the pdf file using word document. I was trying to create the new contentversion(pdf) using the existing contentversion(word) versiondata. However, the pdf is not opening after creating it. Could anyone throw some light on this.
Answer: You won't be able to do this in Salesforce. You would need software capable of transforming the Word data into PDF data, which are two entirely different, and incompatible, formats. This can't be done in Apex, and probably can't easily be done in JavaScript, either, in case you were tempted to write a client-based conversion software.
Comment: Thank you for confirming @sfdxfox. I realized that it is not possible with apex and includes lot of code and not easy in javascript :(


what is the difference between lex and yacc

Question: I have worked with lex for executing some code whenever some regular expression is found,
Can Yacc do something more than that? If yes, then what?
Comment: possible duplicate of [What is the difference between Flex/Lex and Yacc/Bison?](http://stackoverflow.com/questions/623503/what-is-the-difference-between-flex-lex-and-yacc-bison)
Answer: Yes, YACC is a parser, Lex is a lexical analyzer. They are typically used together: you Lex the string input, and YACC the tokenized input provided by Lex.
Now, a regular expression can only represent regular languages. One of the constraints of a regular language is the lack of "memory". You cannot define the rules for acceptance further down the string based on what has come before.
This is mostly clearly seen in the case of parenthesis. A regular language can't match nested parenthesis to the correct level. Or any other such structure. The grammars of (most) computer languages can and do, and, because of that, they can't be be parsed with a Lexer or a regular expression. That's where YACC comes in.
One can reverse the question as well. If YACC can do more, why not use it for the lexical analysis? Well, it so happens that you can verify the validity of a regular expression very efficiently, which is not the case of general grammars -- not to the same level. Still, YACC can do basic lexical analysis, if the lexical rules of the language are simple enough.
Comment: another, probably more important reason why yacc is not usually used for lexical analysis is because that is really pretty cumbersome.  For instance a production rule to recognize a floating point number in Lex regular expressions is 1 line, about 15 characters.  The equivalent Yacc rule would be about 10 lines, maybe 150 characters.
Answer: lex is a lexical analyzer. It splits text up into tokens. Its power is roughly equivalent to regular expression matching. yacc is a parser generator. It takes a sequence of tokens (say, from lex) and interprets them as series of statements. Its power is roughly equivalent to context free grammars.
A typical application of lex and yacc is for implementing programming languages. lex tokenizes the input, breaking it up into keywords, constants, punctuation, etc. yacc then implements the actual computer language; recognizing a for statement, for instance, or a function definition.
In a practical sense, you often use lex to process input text into chunks. Then you use yacc to string those chunks together and process them into some larger meaning.
Comment: You mean "It takes a sequence of tokens (say, from **lex**) and..." don't you?
Answer: lex is for tokenizing input.  That is, separating out your input into the lowest-level objects that your grammar defines.  For example, you use lex to identify keywords, identifiers, strings, comments, whitespace, and so on.
yacc is for parsing your grammar.  A grammar is a description of your language, typically defined in EBNF or some other context-free grammar.  Once you describe your grammar to yacc, you can use it to run the actions of your tool when elements of the language are recognized.  This might be, for example, constructing syntax trees for expression solving, defining scope objects, recording variable defintions, and so forth.
They are complimentary products.
Answer: lex and yacc are normally used together.  This is how you usually construct an application using both:

Input Stream (characters) -> Lex (tokens) -> Yacc (Abstract Syntax Tree) -> Your Applcation

More generally, what Lex will do is read a source file, from the beginning, and try to match a number of regular expressions (lex has its own, special syntax for this, which is a bit different from perl or sed regular expressions), and will then invoke another program with each token it recognizes.  Tokens may either just be a plain enumerated value, like for a key word or operator, or it might have some metadata attached, like for a literal value.
Lex is usually (though not neccesarily) used to invoke Yacc.  Yacc uses a LALR parser algorithm, which roughly speaking, works by pushing each token onto a stack.  If the stack has a sequence of tokens that it recognizes, it will pop all of the tokens, perform an action, and push another token back on the stack.
The proper vocabulary for what Yacc works on is actually terminals and non-terminals.  A terminal is a token that it got from the invoking program (usually Lex), and a non-terminal is the result of matching a sequence on its stack.
Usually the actions taken by each Yacc rule are either to evaluate the result of a calculation that the rule corresponds with, or to produce an intermediate representation, like a syntax tree, for another application layer to process.
Yacc, like lex, can be used separate from the other.  For instance, you could use Yacc by passing it individual characters from the source text, and use Yacc rules to recognize each kind of token.  However Yacc is not designed to be very easy to use that way, and so the resulting lexer will be much more complex than an equivalent lexer in Lex.  A more typical use would be to make a hand-coded lexer for reasons of either performance or because you need a smarter lexer.  A common example of the second case is as used in C-like languages that have to know about previous uses of identifiers to know if they are used to describe types or variables.
Answer: Lex is a tool for building lexical analyzers, that can do some rather stupid lexical stuff (like finding keywords). Yacc is a parser generator, that can create parsers for real computer languages. Its analysis is normally based upon the output of lex (which is a stream of tokens) and from this can create your parse-tree of the programming language -- something that is more than lex does.
Traditionally, compiler builders distinguish between lexical and syntactical analysis -- which are two important steps in a compiler (further ones to follow eg. code creation, optimization).


Is heat a form of energy or mode of transferring energy like work?

Question: I have found somewhere that energy can be transferred by two modes, i.e., work and heat.  Moreover there are many differences between heat and energy; like energy is a state function and heat is not.  Considering all these, is heat a really a form of energy?
Comment: Consider the units of Heat and Work.  They are both _joules_ ($J$).  That means they are both expressions of energy.
Comment: *Heat* is a word used to describe a certain kind of *transfer* of energy between two systems.  It is energy, but it is *not* the energy content of a system.
Answer: "[E]nergy can be transferred by two mode i.e. Work and heat."
That's the classification we use in Thermodynamics, when considering how a system can gain or lose internal energy, U. Thus
<code> gain in *U* = Net heat into system – Net work done by system.
</code>
U is a function of state. The evidence is as follows. If we insulate the system (to stop heat entering or leaving) and take the system from one state, $S_1$, to another $S_2$, we find we always have to do the same amount of work, whether we do it mechanically, electrically or whatever.
Now what about heat? We find that even if we do no work on a system we can change its internal energy by putting it in contact with something at a different temperature from its own. If we believe in the conservation of energy (and I do, fervently) then there must be energy entering (or leaving) the system. This – that is energy in transit by virtue of a temperature difference – we call heat.
Neither heat nor work are functions of the body's state; they are energies in transit, and we can vary the proportions of heat and work by which we effect a given change in U.
Maybe I haven't paid enough attention to your distinction between energy and a means of transporting energy. I suspect that it's not a very useful one. For example, how would you test by experiment which interpretation is correct, or does either interpretation lead to a contradiction? On the other hand we do like to be clear about our concepts… A couple of further thoughts: (1) heat as a mode of transport of energy certainly doesn't seem much like a bus transporting its passengers; it's more like the passengers themselves. I mean that passengers are people in transit by vehicle, just as heat is energy in transit by conduction, convection or radiation. (2) In the UK many Physics teachers have been persuaded that one shouldn't use the term heat at all, but should instead talk of energy transferred by heating. ['Energy transferred by heating' is rather a mouthful; can't we think of a word for it? (Joke)]
Comment: I've added a paragraph since first posting.


Voltage across an inductor contradicts Lenz's law?

Question: Imagine a simple circuit consisting of an alternating current source connected to an inductor. Assume they are connected in the following fashion: AC source - terminal A - Inductor - terminal B - AC source. When the current flows from terminal A towards terminal B and is increasing, the inductor should generate electromagnetic force that opposes the increase in current (according to Lenz's law), that is terminal B should become positive with respect to terminal A. But simulation shows the opposite is true. Terminal A becomes positive with respect to terminal B. Why?
Answer:
the inductor should generate electromagnetic force that opposes the
  increase in current (according to Lenz's law)

To be sure, it's electromotive force (emf) here and not electromagnetic force.

But simulation shows the opposite is true. Terminal A becomes positive
  with respect to terminal B. Why?

The voltage across the inductor is the opposite sign of the emf
$$v_L = L \frac{di}{dt} = -\mathcal E $$
and the circuit simulator gives the voltage across.
To see that this must be so, consider connecting an inductor across a voltage source; the voltage across the inductor equals the voltage across the source.
Since the inductor is (usually) a coiled conductor, there is (effectively) no resistance to limit the current through the conductor.  How then can there not be an arbitrarily large (effectively infinite) current through the conductor?
The only way for there not to be an arbitrarily large current is for there to be an emf that precisely opposes the applied voltage.
And, since the emf is proportional to the rate of change of current, the current must be changing at a particular rate in order for the generated emf to precisely oppose the applied voltage.
Comment: @Armadillomon, the first part is correct and the second part is correct if we ignore non-ideal aspects of physical inductors.  The crucial point to remember is that, in a *good* conductor, the electric field inside effectively vanishes.  Thus, free charge within the conductor will redistribute in such a way that the *conservative* electric field from the charge distribution effectively cancels the non-conservative electric field (induced by the changing magnetic field threading the inductor) within the conductor.  So, there are *two* contributions, two different 'things'.
Comment: So the voltage measured across an inductor and the emf generated by this inductor are two different things and they are always equal in magnitude so they cancel each other?
Comment: @Armadillomon Correct statement would be " the voltage measured across an inductor, voltage applied across inductor and the emf generated by this inductor are three different things and; voltage applied and emf induced by inductor are always equal in magnitude so they cancel each other in an ideal case.


Lock screen - password incorrect

Question: I have upgraded Ubuntu to 12.04 and now I have a problem in logging in after locking the screen: it says the password is incorrect even though I provide the valid password. I found a temporary solution by switching users and logging in again with the same user.
Comment: I'd report a bug if anybody can reproduce it. If you can reproduce it, drop a comment...
Comment: Having the same issue... on Ubuntu Mate 18.04... oddly this only occurred on my laptop after a clean install... I have installed other machines, including my desktop and there I've never had the issue... strange! I'll try the suggestion flagged as "accepted answer".
Answer: I had the same issue.  It is likely the ownership is wrong for /etc/shadow (See section "gnome-screensaver authentication failure with incorrect /etc/shadow permissions" of this page).
You need to sudo chown root:shadow /etc/shadow then sudo chmod u=r,g=r /etc/shadow See this bug report.
The interesting question is "Why ownership changed?". Because I don't remember changing it.
Comment: Thanks it worked for me! For some unknown reason, the group ownership was "root" instead of "shadow" for /etc/shadow on my laptop. Resetting the group ownership to "shadow" solved the issue :-)
Answer: I could resolve this issue with the following permission changes:
sudo chown root:shadow /etc/gshadow
sudo chown root:shadow /etc/gshadow-
sudo chown root:shadow /etc/shadow
sudo chown root:shadow /etc/shadow-

Found here: http://ubuntuforums.org/showthread.php?t=1006366
Comment: Albeit less informative as the answer above, this is also a correct answer, thanks! ;-)
Answer: Had this problem on Ubuntu 16.04. Found the solution in http://ubuntuforums.org/showthread.php?t=1006366 (linked in fret's answer):
chmod 2755 /sbin/unix_chkpwd

In my case, unix_chkpwd had lost its setgid bit when I copied my entire filesystem to a new machine using tar.
Answer: I am using Ubuntu 14.04 and I had the same issue
By mistake I ran a chown on the root filesystem (Yikes!) and since then I started having the issue described here.
I ran the command given in oshobov's answer, but that did not work for me, but using my own account instead of root made it work.
sudo chown your-username:shadow /etc/shadow

Comment: `/etc/shadow` must not be owned by any other account than root!

Lock screen - password incorrect


How to prioritise features for mobile devices?

Question: When you build a mobile client application for enterprise software, how do you decide feature/ function priority from a UX standpoint?
Comment: This depends on the purpose of the app
Answer: To be honest, your question isn't 100% clear - are you after some of the ways that an organisation can seek feedback from users to determine their requirements? For example, using evaluation processes such as focus groups and surveys.
Or, do you mean that the organisation knows what it wants and what you're trying to determine is how to implement those features in the most user-friendly way possible?
That distinction may not seem like much, but I have seen organisations roll out software based on the functions they thought were important from a corporate perspective, only to discover after spending millions that it wasn't capable of performing some of the basic functions their staff actually needed to do on a daily basis.
As a start, below is some reading that may be useful:

The Best Ways to Prioritize Products and Features
First Things First: Prioritizing Requirements
7 Strategies to Choose the Best Features for Your Product

Another interesting read is Tony Heap's take on how to prioritise requirements.
Hopefully you find the above resources useful. Feel free to post a comment if you needed something a little different.
Comment: Yes, the organisation knows what it wants, and their priorities are clear as well. However, I believe the list of features would be prioritised differently based on a UX standpoint. Your UXmatters link seems the most relevant here. Thanks mate.
Answer: Building a mobile version of possibly complicated enterprise software requires very clear understanding of the main value that users derive from your product. It's about knowing what to push away to the second plan, and this is not an easy task.
I'd recommend to take a step back and not to think about features for a moment. List user needs across different personas. For each persona / need mark if the fulfilment of the need is the reason why that persona pays for the product, or is it a nice-to-have. You should be very restrictive here. The idea is to identify few core needs that drive value for most of your personas. Once you have these, list and discuss features for the core needs. Try to sketch out the simplest possible user flows that would achieve these needs. This should help your with prioritisation.
It's easier said than done. The difficult part is to keep the user needs on the right level, not too specific and not too general. Takes a bit of practice.
Another thing I'd suggest is to think about behaviours that you want to drive in your product. In the ideal situation, what would you like the users to do? What should they do most frequently? What should they do occasionally? Think also of data and make sure that most dynamic and interesting data makes it to the front.
When determining core needs it helps to keep your customers in the loop and look into objective product usage data that you gather through, for example, Google Analytics. This can help you validate your progress.
Hope this helps
Answer: One way to do it is through user research. You can start by measuring customer emotional reaction to individual features by presenting them in a way that makes sense to them, like making them imagine real scenarios of use.
There is a systematic way to identify which features will bring value to users and which ones won't. This helps you prioritize development, design and time resources to meet the deadlines your budget requires. There is a great article on it: https://uxmag.com/articles/leveraging-the-kano-model-for-optimal-results
My team has been using an app that automates that very same lengthy process to guide our decision making:www.featur.me
Hope you find this useful. I'd be happy to assist you further.
Answer: To understand which features should be prioritised I'd look your users goals, specific to the mobile environment.

Define your user(s) in some way, ideally a persona - pain points, goals, realistic description - extensio is a great tool for this.
Try empathy mapping, put yourself in the users shoes - with their goals in mind and try to accomplish their tasks with that mindset. This is a really eye opening practice and will bring up issues you would not have otherwise thought of. More about empathy mapping here: http://www.copyblogger.com/empathy-maps/
With the output of the previous tasks in mind, develop some prototypes and usability test them. This can be done in various ways, you could use something like UX Pin to develop, share and usability test your protoypes in, or Invision to add functionality to photoshop mockups - OR just use paper, sketch it up and run some usability tests through it. You don't need much to usability test or to create prototypes, so use whatever is efficient for you.
Running a usability test on a design will blow your mind. Here's a test script you can use if you're running the test in person - which to me will give you the most insight into how your users interact with the product.
Document the UX decisions you make and demonstrate why they have value, you could link certain features to a usability test case or something you learned during empathy mapping or prototyping.
People will not use something that takes a lot of effort, they'll just move onto the next product. If your product is hard to use, it'll be pushed to the side.
Answer: Personally I think that features or functions should not be prioritized from UX stand-point.
Features or functions should always be prioritized based on Need and its importance (read 'Value'). Once this is set, then you define the user experience for that feature.
It is extremely important to not get confused with prioritizing the features and User experience. Your feature 'Roadmap' should not be driven by User experience. It should be driven by User Need, Risks, Cost-Value, Delivery, Complexity, Market Demand, etc but definitely not User Experience first.
If you have a feature that provides best user experience in the market but is not required by the user. Then that feature will have no or little takers.
However having a feature that is sorely needed by the user but provide basic or mediocre user experience; You might still find users interested in the feature.
There are multiple requirement prioritization techniques in the market. You can start with this: https://en.wikipedia.org/wiki/Requirement_prioritization
Comment: My understanding of the question:
I have multiple features which i want to prioritize. How would i prioritize them based on UX standpoint
AND this is how i perceive the solution:
If I want to decide priority of a feature among multiple features I will not use UX as a key parameter. Prioritizing feature is a requirement level process. Yes, UX does play a part in it, but not in deciding the priority of features.
Priority of feature is a business level scenario, like something a Product Owner or Business Analyst would do. Once features are prioritize, Then you consider UX as a parameter.
Comment: UX is part of the requirements process too. Needs & competitive analysis is all part of that, which is in the realm of UX, as it affects the end user. One does not have to have "UX" in their job title to be part of that process.
Comment: Why do you not consider user needs and value to the user part of the overall UX process? Those are kind of the base to the whole UCD process. You seem to be implying that "UX" is a single point along the whole develop process, instead of all encompassing (which it is).
Comment: I totally agree with you. But lets take an example, Facebook has features like 'Sharing a post' and 'Commenting on a post'. On what parameters would you decide the priority of the feature. Which feature would you take first for implementation/delivery; or how would you decide if both features are needed to be taken in-parallel execution?


What can be put in 'Full HTML' node/fields?

Question: The obvious answer to this question is HTML code of course, but my deeper question is, is this an HTML body content-like HTML? I suppose I can't put HTML header content-like HTML? Correct? I mean I can't put META tags for example.
Answer: You technically can use <meta> tags, since they will not be stripped out of the content that you place into a textfield that uses the default "full HTML" input filter. However, this content will be output in the  of the HTML document, which means using <meta> tags here will cause invalid HTML and most likely be ineffectual.
If you are looking for a way to customize the <meta> tags used on your Drupal site, there are many modules available to help with this. The Meta Tags module is the most popular, but that project's page also lists some other meta tag-related modules.
Answer: Drupal themes are broken down into regions, where content and other blocks are displayed. Therefore, you can add any HTML that would be valid inside whatever container your content region is wrapped in (typically a
). So the  tag would work if you're supporting HTML5, but  won't work as you'd expect, because you're putting it in the  of your document.
If you want to edit markup outside of that region, or even modify regions, have a look at the breakdown of core templates.
If you're looking to edit <meta> tags specifically, have a look at the Meta tags module.
Answer: When the full HTML is set as input format, what entered is not filtered in any way; this means that you could also enter tags that are not normally supported where you are adding them, such as <meta> tags that would appear inside the  tag, or miss a closing tag, such as in
This is wrong
.
If you want to avoid both those problems, you could use the filtered input format, and add all the tags you are sure your users need, leaving out tags such as <meta>, which should not be added in the  tag.
It would also avoid there aren't tags left open, which would cause layout/formatting problems, when the users leave open tags. In fact, the code used to filter the entered HTML, in that case, is the following one.
  $allowed_tags = preg_split('/\s+|<|>/', $filter->settings['allowed_html'], -1, PREG_SPLIT_NO_EMPTY);
  $text = filter_xss($text, $allowed_tags);

  if ($filter->settings['filter_html_nofollow']) {
    $html_dom = filter_dom_load($text);
    $links = $html_dom->getElementsByTagName('a');
    foreach ($links as $link) {
      $link->setAttribute('rel', 'nofollow');
    }
    $text = filter_dom_serialize($html_dom);
  }


"The purpose of" versus "the purpose for" — which one is proper?

Question: Is there even a difference between the two?
Answer: My thought is that "purpose of" refers to an intended function of an item. "Purpose for" refers to how an item will be used, regardless of that use's relation to the item's intended function.
Hmm. I'm not describing that well. How about this:
The "purpose of" a shoe is protecting your feet. A possible "purpose for" a shoe is to smash bugs.
So "purpose of" describes a property or capacity of a shoe, where "purpose for" describes what might be done with a shoe.
Answer: This is an interesting topic. To add to bikeboy389's response: the purpose of something is the reason it exists. The purpose behind something is the reason in the mind of whoever was responsible for it. My intuition is that a purpose for something is more likely to be a use or reason associated with it after the fact, or subject to debate.
Found via Google:

Providing Students With a Purpose for Reading

i.e., giving students a purpose/reason to read; and

following God's purpose for our lives

i.e., an individual/agent (God) has designated a purpose for something. (The purpose of our lives would frame it as inherent rather than designated, I think. *God's purpose of/behind our lives would be ill-formed, but the purpose of God for our lives is OK in the right context.)
(There are also contexts in which you can use the construction purpose to a thing, e.g. He embraced religion in the hope that it would reveal the purpose to our lives. This feels fixed or archaic compared to the other options.)
You'd say a/the cause of something to refer to its cause. Having (just) cause for an action, though, is a different construction: it means you have sufficient grounds/justification to perform that action, esp. in a legal sense: The judge's flawed instructions are cause for an appeal.
On the other hand, I don't think reason works in the same way: e.g. a/the reason for getting up early and a/the reason to get up early are fine, but *reason of getting up early sounds wrong to me. You could also say the reason for/behind the decision. Words behaving similarly to reason: rationale and motivation.
Answer: For me, it feels right to use of when purpose is the subject of a sentence or a clause:

The purpose of a hack saw is to cut
  through small pieces of metal.

And, also for me, it feels right to use for when purpose is the object of the sentence or clause

This is an odd-looking tool, but I'm
  sure we can find a purpose for it.

EDIT: On the other hand, it just occurred to me that it would also be fine to say:

This is an odd-looking tool we found
  at the dig site. I wonder if we'll
  ever figure out the purpose of it.
Comment: I'm still thinking of an answer for this one. I agree it's a matter of feel --- one of those things I never really think about. In your last example, though, I'd certainly prefer "its purpose" rather than "purpose of it"!
Comment: @Jimi Oke: Let's take "it" out of the equation: "I wonder if we'll ever figure out the purpose of this tool." Same construction. We could say "this tool's purpose" but we wouldn't have to. What if I said: "I wonder if I'll ever figure out the purpose of my time here on earth." I think it would sound very awkward to say "my time here on earth's purpose."
Comment: Of course, "it" is preferred in the situations you mentioned. I was only specifically referring to the third of your three examples. Consider, for instance, "What is the purpose of it?" This is a question that could possibly arise from an unpopular suggestion or in reaction to some instruction or course of action. I would wholeheartedly go for this as much as, or even rather than, "What its purpose?" It's also interesting how "its purpose" and "purpose of it" can connote slightly different meanings.
Answer: When you use "purpose of", the reader is expecting an abstract rationale.  When you use "purpose for", the reader is expecting a more concrete example. Compare:
<code>"The purpose of this website is to educate."
</code>
The abstract idea is "to educate".
<code>"The purpose for this website is to get people talking about English."
</code>
Concrete: "get people talking". Saying "purpose of this website is to get people talking" in the last example wouldn't sound quite right, although it would still be grammatically correct.
Answer: It seems this does rely heavily on the user's ear. I don't see any answers that fully resolve the issue.
I'd like to clarify that I have the sense that "purpose for" is favored in academic expression (jargon, virtually) related to education.
I attempted to involve the definition of the prepositions in resolving this, but gave up before I reached any firm conclusion. Here however, are some (limited) definitions from Merriam-Webster online:
of:
2 a —used as a function word to indicate origin or derivation:
a man of noble birth;
b —used as a function word to indicate the cause, motive, or reason:
died of flu;
c :by:
plays of Shakespeare;
d :on the part of:
very kind of you;
e :occurring in:
a fish of the western Atlantic.
for:
1 a —used as a function word to indicate purpose:
a grant for studying medicine;
b —used as a function word to indicate an intended goal:
left for home,
acted for the best;
c —used as a function word to indicate the object or recipient of a perception, desire, or activity:
now for a good rest,
run for your life,
an eye for a bargain.
Does the function of "for" to "indicate purpose" make it redundant - or illogical - to pair with "purpose"?
Does the function of "of" to "indicate the cause, motive, or reason" give it clear precedence?
Or does the function of "for" to "indicate an intended goal" provide a valid distinction - and support the "website" examples distinguishing abstract from concrete expectations?
If anyone can sharpen the focus based on this, I'd be very interested in seeing the scholarship or reasoning.
Answer: The purpose OF something [describes the author's or inventor's reasons why the object was created. A description OF its purpose (reason for being)].
Ex: The purpose of the Constitution is to form a more perfect union.
The purpose for something [describes the user's reasons for using the thing for its intended or unintended use. A description for its use. (reason for use)]
Ex: The purpose for the Constitution is to enable the Courts to keep the federal Government in check.
That is why OF and FOR are interchangeable whenever the description of its Reason for Being and the description for its Reason for use are the same. And explains why an author uses his or her "ear" when, in context, the thing's reason for being differs from its reason for use.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Is it possible to be conscious without feeling emotions?

Question: Is emotion a necessary component of consciousness? Or is it possible for some conscious entity, like maybe an artificial intelligence, to not feel any emotions? I would also like to know what philosophers have said about that topic.
Comment: Emotion is extremely hard to analyze cognitively psychologically since it belongs to the non-cognitive although it seems very objective and analyzable in some natural non-concealed cases. For example even the feeling of love has four types per the famous anti-naturalist C. S. Lewis, ie, *affect/storage, philia, eros, and charity (agape)*...
Comment: You might want to look into the philosophy of "affect", which is what emotions are made out of. I think of emotion as biographically salient affects. HTH
Comment: Here is a relevant answer: 'Can emotions be logical? And can logic and emotion co-exist?' https://philosophy.stackexchange.com/questions/91990/can-emotions-be-logical-and-can-logic-and-emotion-co-exist/91992#91992

Purposes, and values, have to *push* us, that's the nature of an emotional reaction.  An AGI could aim to achieve it's programmed task, but to take up it's own tasks it would have to come to *care* about some objective. I'd say this could absolutely be simulated, but would involve situational intelligence like Kahneman presents in his book 'Thinking Fast & Slow'
Comment: @GeoffreyThomas MarkAndrews curiousdannii: How is this off topic? This is a well established area of philosophical discussion, relating for instance to the Is-Ought distinction.
Comment: CriglCragl: Question re-opened. On further reflexion, and in the light of your comment, I think the question should stand. Please accept my apologies. Best - Geoffrey
Comment: There is a good book called, "How Emotions Are Made".
Answer: Emotion is a necessary component of consciousness, as the name indicates, consciousness means human mind being conscious or having more complex understanding of and interaction with surroundings. For example, an ant does not know or not conscious about why it rains or what exists beyond the horizon, whereas human mind due to its higher intelligence is more conscious and can have extremely complex interactions. In other words, the more intelligent you are (in biological sense) the more conscious you can be. So the question arises which came first consciousness or intelligence. Evolutionary biologists have concluded that complicated and dynamic interactions were one of the most important reasons for human intelligence. So that means emotions, interactions and intelligence, consciousness augment each other. That is the reason we humans are more consciousness, due to we having higher emotional intelligence. So emotions are never a hindrance to being conscious.
Comment: Yes. I think of emotion as a shorthand or summary response to a lot of unconscious processing. The alternative is to somehow hold all of the related details in awareness, which is impossible.
Comment: There is an idea in psychology that I can't quite remember, but it says that complex experiences cause us to integrate more of our memory and abilities together, for example martial arts or dance. But yes, reading something challenging, listening to complex music and so on cause some growth.
Comment: Yes this is a new perspective to me regarding emotions. Can we take interactions (for ex: reading a book, listening to music, reading philosophy, discussions etc.) that enriches your philosophical outlook as dialectical process through which we gain higher consciousness?


Are there published testimonies from individuals who had a Christophany in which Jesus explicitly affirmed or denied his deity?

Question: Christophanies (a.k.a. encounters with Jesus) are supernatural experiences which are entirely within the realm of possibility according to Scripture. Three clear examples are Paul's (Acts 9:3-6), Ananias's (Acts 9:10-16) and Stephen's (Acts 7:54-56). In light of this, I was wondering if there are any published extra-biblical testimonies about Christophanies, in which Jesus explicitly stated his divine status. Has anyone ever published a testimony of their encounter with Christ, in which Jesus explicitly affirmed or denied his deity?
Comment: I haven't looked deeper into it, but the Wikipedia entry for Christophany mentions a few such testimonies. Could be a starting point to see what, if anything, was said about Jesus' divine status.
Comment: You might start with [Julian of Norwich](https://www.bl.uk/collection-items/the-short-text-of-julian-of-norwichs-revelations-of-divine-love#)
Comment: Perhaps you should change your subject from 'from Christians who' to 'from people who', since your answer includes 2 people who were not Christians at the time of their christophanies?
Comment: @OneGodtheFather - excellent point. Question edited as suggested. Technically they are Christians now though, but at the exact moment of their encounters they were not. Good catch.
Answer: After spending some time searching, I found two testimonies from ex-Muslims who had life-changing christophanies. Let their testimonies speak for themselves:

A former Iranian hezbollah member shares about his encounter with Jesus Christ.

[...] So, how is it ... who is this God that says "I forgive you"? And I feel forgiven today. And I asked him 'Who are you, that you forgive me and I feel forgiven today?'. And he says 'I am the way, the truth and the life'. The moment I heard those words I knew it was of great importance, but I had absolutely no idea what that meant. I still had no clue who this God is. So I asked him 'What is your name?'. 'Jesus Christ, the living God' he answered [...]

Muslim Jihadist Accepted ''Jesus is God'' testimony amazing

[...] Now I fell on my knees and I put my hands to the heavens immediately as I heard the voice, and I cried out with every fiber within me: 'God, the Father of Abraham! If you are real, would you speak to me?! God, the Father of Abraham! If you are real, I want to know you!' Well, God, the Father of Abraham came to the room and he filled the room with his glory, and his name was Yahweh, the Lord is one, and in his hands, he has holes in his hands, he has holes in his feet, his name is Jesus. I said to him 'Who are you, my lord? Who are you?' He said 'I am that I am'. I said 'I'm a simple man, with a simple mind. What's that supposed to mean?' He said 'I'm the alpha, I'm the omega, I'm the beginning, I'm the end, I'm everything that is in between. I have known you before I form the foundation of the earth. I have loved you before I formed you in your mother's womb. Rise up, rise up, come on. You are my warrior, you are not their warrior'. I said to him 'my lord, my lord, I will live and die for you'. He said 'Do not die for me. I died for you that you may live' [...]
Answer: Members of The Church of Jesus Christ of Latter-day Saints believe that God called Joseph Smith as a prophet in modern times, restored the fullness of the Gospel of Jesus Christ through him, and that God the Father and Jesus Christ appeared to him on multiple occasions as part of this process.
I'll cite two specific examples of revelations Joseph Smith indicated he received from God, which have direct bearing on the OP's question.
1. December 7, 1830 - Fayette, New York:
As recorded in Doctrine & Covenants 35:

1 Listen to the voice of the Lord your God, even Alpha and Omega, the
beginning and the end, whose course is one eternal round, the same
today as yesterday, and forever.
2 I am Jesus Christ, the Son of God, who was crucified for the sins of
the world, even as many as will believe on my name, that they may
become the sons of God, even one in me as I am one in the Father, as
the Father is one in me, that we may be one.

Here the speaker identifies Himself by several titles, including God, Alpha and Omega, Jesus Christ, and the Son of God.
2. April 3, 1836 - Kirtland, Ohio:
As recorded in Doctrine & Covenants 110:

2 We saw the Lord standing upon the breastwork of the pulpit, before
us; and under his feet was a paved work of pure gold, in color like
amber.
3 His eyes were as a flame of fire; the hair of his head was white
like the pure snow; his countenance shone above the brightness of the
sun; and his voice was as the sound of the rushing of great waters,
even the voice of Jehovah, saying:
4 I am the first and the last; I am he who liveth, I am he who was
slain; I am your advocate with the Father.

(Note on the "we" in this passage - this vision was beheld by Joseph Smith and Oliver Cowdery)
Here Jehovah is identified as the first and the last and the one who was slain. Note the comparable language to that found in Revelation chapter 1.
--
More than a dozen comparable examples could be cited, many of which are found in the Doctrine & Covenants.

Disambiguation:

Latter-day Saints believe that Jesus was known pre-mortally as Jehovah, and that He is a separate Being from God the Father.
We believe in the Deity of God the Father and we believe in the Deity of His Son, Jesus Christ. Those who wish to discuss the implications for monotheism may find it fruitful to ask a separate question.

Disclaimer: my comments are the product of my own study and do not constitute official statements by The Church of Jesus Christ of Latter-day Saints


Grout floor then tile walls?

Question: I've already got the shower floor tiled (4'x8'- half in 2x2 on shower pan and the other half 1'x2' tile).  Im using epoxi grout on the floor, and regular grout of the same color on the walls.  Should i grout the floor first, then tile the walls?  (walls ar 9' high)
Comment: Hello, and welcome to Home Improvement. If you found the answer good, you can click the checkmark to "accept" it. And, you should probably [take our tour](//diy.stackexchange.com/tour) so you'll know how best to participate here.
Answer: I would work from the top down, leaving the floor for the end to prevent damage to the floor grout.
It should not be a problem standing and working on the ungrouted floor, just make sure the thin-set is cured. Cover it with cardboard or some old carpet or something.
Comment: I want to stress covering the floor, maybe even with 1/4" plywood. Dropping  any tools or tile pieces  on ungrouted tile can crack them very easy, especially  on the corners.
Comment: +1 on what Jimmy Fix-it said. Work from the top down.  Walls first, then the floor.  And I would do what Jack said & put something down over the already installed floor tiles.  Besides the possibility of damage, a tile could be knocked loose if it's not locked in by the adjoining tiles & grout.
Comment: I agree with both Jimmie & jack + @stevesh click on there up arrow and that gives them the + recognition. It can also help the op decide on if it is a good answer, lots of upvotes can help someone that is not sure what to try.

Grout floor then tile walls?


I want to start playing Poker, where do I start?

Question: Sorry I'm new asking questions, how can I start playing poker from 0?
Let me explain, I tried to investigate how to play but there are many names of plays and different types of games,
my question in particular is, where do I start?
Which is better to investigate first?
What are the bases?
Comment: I'm going to throw out a maybe not agreed upon opinion, but I'd really recommend not learning to play by playing! If you're starting fresh you have an amazing opportunity to learn the right way. Books, coaching & tutorials. I'll put an answer later or tomorrow providing more depth, but for now just wanted to comment.
Comment: @Grinch91 I think this is uncorrectly taged. I have maden an edition but I don't have reputation to do it with no aproval by a rep user.
Comment: Watch videos, read a beginners book. You can play at low tables for a few pennies. The problem of playing with no money is people play crazy and you don't learn anything.
Answer: Many of the online poker sites have play money games. Great place to start where you can just get the very basic game play, you know how the action goes, and what happens when. There you will also start to pick up how to play the game and start honing a skill set.
Alternatively just go play in a casino, that is the way we all used to learn the game. The basics, are actually quite simple and you will find you will pick it up very quickly. You will find the players are very nice and helpful with beginners, at least until you win a pot or two from them than they might get a little snarky.
Poker is a game that takes minutes to learn, and a lifetime to master. There are books available for beginners, there is a small almost pamphlet type of book that has been around for decades that can usually be found in casino gift shops or online at amazon. There is also "Poker for dummies, although it is a bit dated in some respects like with online poker advice, but it does cover the basics nicely.
As far as the type of poker game you will be playing, it will be No limit Texas Hold-em. 95% of all poker out there is Texas Hold-em. Almost all the beginner and advanced books, articles and forum posts are about Texas Hold-em. The other games, do not even worry about them for the time being. If you like poker and gain some experience you will know when it is right to start broadening your poker horizons.
You never know how it is going to go. I have a friend whom sat down in a game for the first time in 1994, and won $800 with no experience. Within a year she had won a six figure first place in a tournament. She has made her living playing ever since. (Although now retired).
Good luck Vanessa.
Answer: You start first and foremost understanding you must have rules and those rules are never to be broken. Fully 100% of the current population of planet earth fails this concrete fact.
Having said that, you must understand money management. The money you have is the ONLY known quantity you have. The rest is all about deciphering the ambiguities of incomplete information. When you figure that out, get some chips and find a chair. Your education begins. Or not...


AddFieldToFilter And inside OR condition

Question: I want to achieve the following query in magento custom model.
<code>select * form calendar where date >='2015-04-13' AND start_date <='2015-04-14' AND (is_available != 1 or  (is_available == 1 and rooms_avil<=0))
</code>
How to achieve this in magento with AddFieldToFilter ? Not AddAttributeToFilter.
Answer: Method addAttributeToFilter is used for module whose model supports EAV structure like: catalog/category, catalog/product etc.
We generally use addFieldToFitler for custom module (whose model doesn't support EAV structure)
Answering on your question: how to create

condition OR (condition AND condition)

I think you can't do it using addFieldToFilter. So my advice is:
<code>->getSelect()->where( /* put here all of your conditions */)
</code>


Transversality is generic

Question: Let $M$ and $N$ be submanifolds of $\mathbb R^n$. I am trying to prove that for almost every $x\in \mathbb R^n$, $M+x$ and $N$ intersect transversely. Intuitively, transversality is a "generic" condition, so if we slightly change $x$, we can make the intersection transverse. However, I do not know how to make this intuition precise. Can anyone explain?
Comment: Transversality requires that the tangent spaces of the submanifolds  at the intersection point span the tangent space of the ambient space $\mathbb R^n$. Is this the case for two generic linear subspaces of $\mathbb R^n$ of appropriate dimension?
Comment: Are you allowed to quote Sard's theorem?  Try to define a smooth map on $\mathbb{R}^n$ which is critical at exactly those $x$ for which $M+x$ is not transverse to $N$.
Comment: Can you give me a little more detail on how to do this?
Comment: @user15464 I have turned my hint into an answer-hint with more detail.
Answer: Let's define a map which is critical exactly when $M+x$ is not transverse to $N$.  Then you can throw Sard's theorem at the problem and conclude that the non-transverse points have measure zero.
Define $f:M\times\mathbb{R}^n\to\mathbb{R}^n$ by $(m,x)\mapsto m + x$.  Define $B = f^{-1}(N)$.  Now let $g$ be the projection of $B$ onto the $\mathbb{R}^n$ coordinate.
The idea here is to fix $N$ and let $f$ capture the motion of $M$ through $\mathbb{R}^n$.  The preimage of $N$ under $f$, what we're calling $B$, we can think of as a family of sets $(M+x)\cap N\subset M$ parametrized by $\mathbb{R}^n$.  You want to verify that for almost every $x$, $(M+x)\pitchfork N$, i.e., at each point $p$ of intersection $(M+x)\cap N$, $T_pM + T_pN = T_p\mathbb{R}^n$.
I'll let you take it from here, unless you'd like me to finish the problem.  The gist of what's left is relating the surjectivity of $dg$ to the transveraslity of $M$ and $N$.
Comment: Can you finish the proof? I appear to be running into a problem since the argument requires that $B$ be a submanifold of $M\times\mathbb R^n$, and for this to be the case I believe we need some sort of transversality hypothesis to begin with.
Comment: @user15464 I'll try to find time to finish it off from my notes (it's a problem in Guillemin/Pollack).

Transversality is generic


Why is it interesting to study "quantum quench" at a critical point?

Question: In the presentation, "Quantum Quenches in Extended Systems",  by S. Sotiriadis, P. Calabrese and J. Cardy, it was pointed out that quatum quench through a critical point remains an open problem. Why is it interesting to study quantum quenches along the critical point(s)? In doing so, what are the insights that you're going to get?
Comment: They did not copy/paste several times the same slide using PowerPoint! As you can see from the equations, they used LaTeX to prepare their presentation and this is the way the PDF is rendered with LaTeX.
Comment: @Nat, they're not my instructors. This discussion is presented during "The Capri Spring School on Transport in Nanostructures." And they've made this presentation accessible to the general public. Regarding your comment on the use of PowerPoints's animations, Christophe is right; this presentation is made using LaTex Beamer.
Comment: @Nat, when you render the PDF as a slideshow, your problem will be solved. This is actually an animation in beamer using <+->.
Comment: Awesome, thanks for explaining!  I'm used to using `*.pptx`'s for slideshows and `*.pdf`'s only for print-outs of them; neat that they're using the PDF viewer as a slideshow app.
Answer: The dynamics of a system quenched through a critical point are strongly affected by the critical physics. We can therefore learn about critical physics by looking at such systems. For example, it's possible to measure equilibrium critical exponents by varying the speed of the quench. Moreover, critical quench dynamics is very interesting because there is the possibility to observe universal non-equilibrium dynamics. For example, in the case of a sudden quench, original non-equilibrium critical exponents can be measured in the relaxation to equilibrium.
As a rule of thumb, anything 'critical' is interesting. This is because critical systems are strongly correlated and display emergent properties such as universality. You can't guess the collective behaviour by looking at single particles. Universality is not only fascinating, it is also really useful. Once you have identified your universality class, you can use a toy model for calculations and get accurate experimentally measurable predictions.
The most famous example is the Kibble-Zurek mechanism. There the system is dragged adiabatically (at first) to a critical point. As the critical point is approached, the correlation time of the system diverges and the quench stops being adiabatic. Then, the system does not thermalise completely and retains a finite correlation length. The slower you quench, the larger the correlation length. It turns out that there is a simple scaling relation between the correlation length and the quench speed which is universal and contains the equilibrium critical exponents. Take a look at the link for more details.


My dog is bleeding day and night

Question: My dog has been bleeding day and night, and was wondering what could be causing this? She seems to be bleeding from her private part of her body. My dog is and red nose pit bull (female). She is very happy and loving dog and didn very energetic too. She's a 2 year old dog which is 14 in dog years. I'm just not sure what to do. The bleeds aren't that bad but just enough to raise aren good bit of concern.
Comment: Take her to the vet. This could be from a number of things, and it needs to be checked out by a professional ASAP.
Comment: Is the bleeding coming from the vaginal or rectal area?
Answer: First - if your dog is bleeding when she shouldn't, or if you are in doubt - take her to the vet. If, for whatever reason, you can't take her to the vet, phone your vet. NOW.
Your dog is a young female. It is possible that she is in heat; first part of the female reproductive cycle in dogs.
If this is the case and you should verify with your vet that it is only that!!! then you will want to keep her inside, unless you intend to have a litter of puppies. It may sound great to have puppies but unless you can provide them with a good home, which is hard, you shouldn't.
As for the "dog years is 7 times human years", this isn't really correct. It's an oversimplification, dog ages don't really map to human ages linearly.
Answer: When in doubt, always call a vet.
Your female my be in estrus. In larger dogs, the first estrus occurs at 18 - 24 months of age (earlier for small dogs).

In many cases, a bloody vaginal discharge will be the first thing that a pet owner will observe when their dog comes into heat. In some cases, the discharge will not be apparent until several days after estrus has begun. The amount of discharge varies with the individual dog; some dogs have only a tiny amount of discharge while others have heavy bleeding.

When my dogs come into heat, one of them consistently cleans up after herself, so I never see any blood. The second one isn't nearly as conscientious; I will know because I see drops of bright red blood scattered where she's been - not a lot - but definitely noticeable. After a few days, the blood becomes watery and much less noticeable.
Dogs can become pregnant on their very first estrus cycle; you need to keep her away from other dogs for at least two weeks.
A vet can easily tell if this is the cause of her bleeding by doing a vaginal swab and looking at the cells under a microscope. It doesn't cost much, and is always the right thing to do when you aren't sure what's going on, if the bleeding is heavier than in previous cycles (it sounds like this might be your dog's first cycle), or if she's bleeding out of cycle.
Estrus Cycles in Dogs
How to Tell If Your Dog's In Heat
Canine Estrous Cycle
Answer: Your female dog is probably in heat! Unless you want a litter of puppies you might want to keep your female puppy inside. Yeah I know puppies might sound all nice and cute but trust me there are a lot to take care of. So if you don't have a big house there's some space to provide them especially if they're pit bulls and if you don't have a lot of food or water especially water then you might want to keep your dog inside like I said so yeah I just thought this would be helpful. As us humans know it by a period.

My dog is bleeding day and night


how many different numbers are there with 3 digits and that add up to 19?

Question: Hi I can't figure out if there is a fast way to calculate how many different numbers are there  with N(3) digits that add up to M(19) allowing leading 0 (if they add up to 15, 069 is a proper combination). It is obvious that with 3 we are constrained to 27(999). Is there a shorter path, which I can use? I saw some connection with the pascal triangle but it seems to be kinda rigid.
Comment: This sounds like the number of non-negative integral solutions to the equation $a+b+c=19$ where $a$, $b$, and $c$ $\in\{1,2,...,9\}$.
Comment: Don't worry about $0$.  No sum of three digits that includes $0$ adds up to $19$.
Comment: Yes but  if you have 15  069 will be proper
Answer: You're looking for the number of solutions to the equation $x_1+x_2+x_3=19$ in integers $x_1,x_2,x_3$ satisfying the inequalities $0\le x_k\le 9$ for $k=1,2,3$. Without the upper limit of $9$ this is a standard stars-and-bars problem, whose answer
$$\binom{19+3-1}{3-1}=\binom{21}2\;;\tag{1}$$
the general formula and a pretty clear derivation are given at the link. However, this counts solutions like $1+10+8$ in which some variable exceeds the limit of $9$. Let $y_1=x_1-10$, $y_2=x_2$, and $y_3=x_3$; then a solution $x_1+x_2+x_3=19$ in which $x_1>9$ corresponds to a solution to $y_1+y_2+y_3=9$. There are
$$\binom{9+3-1}{3-1}=\binom{11}2$$
such solutions. Similarly, there are $\binom{11}2$ solutions to $x_1+x_2+x_3=19$ in which $x_2>9$ and $\binom{11}2$ in which $x_3>9$. Removing these from the preliminary count $(1)$ leaves a total of
$$\binom{21}2-3\binom{11}2=210-3\cdot55=45$$
three-digit integers of the desired type. No further corrections are needed, since the equation $x_1+x_2+x_3=19$ has no solutions in non-negative integers in which more than one variable exceeds $9$.
Comment: Well done! This is so thorough and helpful! Thank you :)
Comment: @Ross: You're welcome!
Answer: Dynamic programming (or call it recursion if you like, since no optimization is involved).
Let $f[i,j]$ be the number of $i$-digit numbers whose digits sum to $j$.
Then $f[i,j]=\sum_{p=0}^{\min(9,j)}f[i-1,j-p]$ ($p$ is the digit at position $i$), with some simple boundary conditions.
This results in an algorithm of $\mathcal{O}(NM)$.
Applying to your problem, that is to make a table of 3*19 (with many zeros) and fill it with the formula.
The algorithm is good for larger cases. 3 digits are just too few to see the power of the algorithm.


Check the difference between two Environments?

Question: We have moved our data from Dev environment to production. And later we made few changes in Dev. How can we know the differences that are made in dev which do not exist in production?
Comment: One option if you dont use  version control is View Setup Audit Trails
Answer: I would recommend using Gearset, a tool we use in our org all the time (I am not a Gearset employee nor contractor). There's a free trial
Gearset can compare any two orgs or orgs to source control. You can compare based on metadata API type (i.e. custom object, apex class, report, etc.). The comparisons come back in a nice difference viewer.
Gearset is of course much more than just org compare as it is a devops tool for Salesforce - CI, deployment, unit test, data deploy, etc.
Comment: +1 for Gearset!
Answer: Try something like this:
Don't know if it helps but it will allow you to compare 2 orgs.
It will take sometime before getting the output. :)


Maximal entanglement and overall pure state

Question: Alice's quantum system $\rho$ lives in Hilbert space $H^A$. Bob's quantum system $\sigma$ lives in Hilbert space $H^B$. Say, I can represent the their overall state as a pure state $\psi$ that lives in $H^A\bigotimes H^B $. Does this imply that Alice and Bob's quantum states are maximally entangled with each other? My line of reasoning was that Alice and Bob's states cannot be correlated/entangled with any other quantum state. Otherwise, you could not write the overall state as a pure state. This is strikingly similar to the principle of monogamy of (maximal) entanglement. Any sense here in saying their states must be maximally entangled?
Answer: No. Alice's and Bob's state could, for instance, be equally well in a product state.
Comment: Yes. (Nor their joint state.)
Comment: Is the statement that if the overall state is a pure state, then neither Alice's nor Bob's state can have any correlations/etanglement with any other state?


Mount dropbox as network drive in Linux

Question: I am selectively syncing my dropbox folder now to accomodate a limited capacity on my SSD. Is it possible instead to mount my dropbox as a network drive and NOT sync anything whatsoever, yet still allowing me easy access to ALL the files in the dropbox-cloud?
Answer: Fuse Filesystem 4 Dropbox might be just the thing that you are looking for. Note though that I have never used this product and do not know of the reliability of it.
Answer: This is an upcoming feature (currently vaporware) from Dropbox. The feature has publicly been dubbed "Project Infinite". I am not sure how it will work in Macintosh or Linux. For Windows, remote files will have a cloud icon overlay on the file and not take up any space on the local drive.
Below is a screenshot of Project Infinite context menu option. I presume anything not already synced locally can be made local on a specific file basis.

Mount dropbox as network drive in Linux


Prove ¬∃x ∀y (E(x, y) ↔ ¬E(y, y)) given no premises

Question:
The only way I could think of to do this problem is reductio, but since the two biconditional terms are not contradictory, I am pretty stuck.
Comment: Are you allowed to use the law of excluded middle?
Comment: I think you perform existential and universal elimination on your reductio premise and reach a contradiction
Answer: Smells like Russell's Paradox ...
Anyway, yes, you totally had the right idea: proof by contradiction!  And the two conditionals will contradict as long as you instantiate them with the same constant a:
Answer: E(x,y) <-> ¬ E(y,y) is clearly false if x and y are the same, because then the statement becomes E(x,x) <-> ¬ E(x,x).
Whatever we choose for x, E(x,y) <-> ¬ E(y,y) is not true for all y, because it is not true for y = x.
Comment: This is only correct in classical logics; see the discussion under my answer.
Answer: Here is a proof using the law of excluded middle. After eliminating the existential quantifier to get x, apply the universal quantification on x itself to get E(x,x) ↔ ¬E(x,x). This is false if E(x,x) is true or false.

In Coq:
<code>Variable P : Prop -> Prop -> Prop.
Axiom LEM : forall p, p \/ ~p.

Goal ~exists x, forall y, (P x y -> ~P y y) /\ (~P y y -> P x y).
intro.
elim H.
intros.
assert (P x x \/ ~P x x) by apply LEM.
elim H1; intro.
apply H0 with x; assumption.
apply H0 with x; apply H0; assumption.
Qed.
</code>
Comment: I was assuming OP was working in a classical system. Since most intro logic books assume such a system it seems likely, but you're right that it wouldn't be an intuitionistically valid proof.
Comment: It is unclear whether "no premises" means no law of excluded middle. If yes, I'll remove this.
Comment: Since you can prove LEM from no premises, you could always begin with that proof and satisfy the terms of the question.
Comment: @Dennis LEM does not hold in intuitionistic logic.


Can ISO 7816 (EMV) based smart card handle interrupts?

Question: ISO 7816 smartcards are typically used in EMV transactions. I know that the card can perform arbitrary actions before sending a response to the terminal in a typical EMV transaction (e.g. signing dynamic data to generate SDAD). However, is it possible that the card perform a certain action while waiting for a command APDU from the terminal? That is the command APDU serves as an interrupt that is handled when it reaches the card, the card will stop what it was doing and service this command by sending a response.
Is this possible?
Comment: I'm not sure, this is the best choice of SO sites for the question.
Answer: Contact card can. Contact card can even tell terminal to wait and call it again after some seconds and then it can do this indefinitely (21:01).
EMV Book 1, 18.104.22.168.1 Procedure Byte

The procedure byte indicates to the TTL (Terminal Transport Layer) what action it shall take next. Procedure Byte Value 60, the TTL shall provide additional work waiting time.

ICC can instruct terminal to wait by using this byte. The time is calculated as an elementary time unit (etu). A linear relationship exists between the etu on the I/O line and CLK frequency (f). etu cannot be used by ICC to count seconds. It sets duration of I/O line for transmission and reception mode as explained in EMV Book 1, 7 Physical Transportation of Characters and it's follow-up subsections.

During the transaction process, data is passed bi-directionally between the terminal and the ICC over the I/O line in an asynchronous half duplex manner. A clock signal is provided to the ICC by the terminal, and this shall be used to control the timing of this exchange.

I put forward your question to @Steven Murdoch (the researcher behind vulnerabilities in chip and PIN) to know if the reverse happens.

I don't think so, but I'm not aware of situations where it is necessary for the card to wait for the terminal. It's the terminal which is driving the exchange, so the card just waits for the terminal to do the next thing.

I think that something like that could be done but it might be unreliable if the terminal is not specifically designed to support this use case. Normally once terminals have completed their transaction, they turn off the clock so the card won't be able to do further processing.
Comment: Thank you very much for your answer.
Answer: Theoretical possibilities aside: A typical smart card will do nothing before starting to receive a command APDU and after having sent the response APDU. Chances are, it even is in sleep mode to reduce power consumption (due to pressure on SIM cards by mobile phone manufacturers).
Signals on I/O port may trigger interrupts, but this is the wake-up type of interrupt and not the type "stop what you are doing right now to handle this".
Comment: Does the terminal/phone provide the clocking to the chip all the time or only till a response is received?


What's the difference between amid and among?

Question: Even if I can see why either should or should not be used in a particular sentence, I do not understand the actual difference between amid and among.
Can anybody tell me how these two words differ?
Comment: Checking the dictionary defintions for both words shows multiple meanings, including one where they are synonyms.
Answer: Among and amid are two prepositions with similar meanings but different usage.
Among means "in the midst of", "surrounded by", "by or through the aggregate of", "in the number or class of", etc. (MW).
Amid means "in or into the middle of", "surrounded by", "during", "with the accompaniment of", or "against the background of" (MW).
The two prepositions, however, are used with different types of nouns.
Among is used with plural, countable nouns, like dogs, tables, or books.

I like The Cat in the Hat, among other books.
He is a genius among men.
There were several roses among the flowers I gave her.

Amid is used with uncountable or mass nouns, like rain, happiness, or darkness.

The treetops were visible amid the darkness.

They prospered amid a time of peace.

They continued to work, amid concerns that their efforts were misplaced.

Differencebetween.com provides a very clear explanation of the difference in usage, and offers an extensive selection of sample sentences.
Lexico offers a good review of countable vs uncountable nouns.
While the guidelines for usage are fairly straightforward, the distinction, like so many things in language, is not 100% writ in stone. This is because the two words are somewhat synonymous. The fact that many nouns (like "truth") can be used in both countable and uncountable forms can also complicate the choice.
As an illustration of the difficulty of drawing an absolute distinction, one of the sample sentences provided by Cambridge includes the words "The town sits amid gentle hills". It would be difficult to argue that among wouldn't work here just as well.
Comment: Very good caveat. Your 3rd reference gives the example 'There was [a] black pigeon amid a flock of white pigeons', 'flock' being claimed to be uncountable. No. A collective noun, yes. That apart,  'There was a black pigeon among a score of white pigeons' (compound numeral substitute [or is it used loosely, in which case quantifier?] usage) probably encourages the notionally 'correct' 'There was black pigeon among a flock of white pigeons'. I'd probably use 'in the midst of' here. // As you say, though many cases are straightforward, there is 'difficulty [in] drawing an absolute distinction'.

What’s the difference between amid and among?


Calculation of PDF of derived multivariate random variables?

Question: Let we have $X$, $N$ dimensional vector of independent random variables. If we multiply this vector by some matrix $V$ with size $r\times N$, with property $V*V'=I$, where $I$ is identity matrix, and ' is transpose operation, we get set of $r$ independent random variables collected in vector $Y$.
If $X$ variables are with Gaussian distribution, how can we find PDF of derived elements of vector $Y$? Is it still Gaussian?
Answer: Recall that every affine function of a normal vector is normal, and that every vector with independent normal entries is normal.
In your case, the vector $X$ has independent normal entries hence $Y=VX$ is normal, with mean $E(Y)=VE(X)$ and covariance matrix $V\Sigma V'$, where $\Sigma$ is the diagonal matrix with diagonal entries the variances of the random variables $X_k$. There is no reason to expect that the random variables $Y_j$ are independent.
Comment: But, if you want to find covariance matrix. $E(YY')=E(VX(VX)')=E(VXX'V')=E(VIV')=E(VV')=I$. They are uncorrelated, you said that their mutual distribution is normal, it means that they are independent. Maybe, i forgot to mention that they are independent with same variance.
Comment: No, E(XX') is a multiple of identity only when the X_k are centered and independent *and with the same variance*. Assuming only that they are centered and independent one gets E(YY')=VΣV', where Σ is a diagonal matrix, as explained in the answer.
Comment: Yes, you are right. In the first post I forgot to write "they are independent with same variance", what I wrote in previous comment. Thank you very much.


Why does 16bit DOS program not print to network share

Question: I have a DOS application(running on Terminal Services, Win Server 2008 Standard 6.06002 SP2). I need to print to my shared printer on my computer. net use lpt2: \\mycomputer\myprn. When I "copy file.txt lpt2", it works flawlessly. When my application prints, it shows printer is not found. The DOS application points to lpt2 and using hppcl. I was able to print to my own printer when the DOS application resided on my machine(Win7x32). Any clues?
Comment: This question is certainly improperly tagged... No MS DOS 6.22 app will run on Win7!
Answer: Dude, I'm sorry.  Been there, done that.
Does the printer show up when you do a net use?
I was able to get the horrible 16 bit DOS program in the student lab to print with net use lpt2 \\servername\printer.  I've also gotten a horrible program that didn't accept jetdirect/TCPIP printer ports but did accept network shares to print by sharing the printer as \\127.0.0.1\printername$ and printing to that.  In other words:  Make sure that the printer actually shows up with net use, make sure that the local printer is shared (to your local user only, unless you really want to share it beyond the scope of your horrible 16 bit program, and if you name it with a $ it will be hidden), and use \\127.0.0.1 as the server if you have to.
Good luck!
Comment: Yes, printer shows up in "net use". My next step is to create a TCPIP printer pointing to a network printer, share, and test. Will see how that works.
Answer: Too many people confuse a "character" or "console" mode application for "DOS".
If you have a "DOS" application running on Server 2008R2, what you probably have is a 32 bit character application.
Had it been a 16 bit DOS application you would not be able to run it on Server2008R2 which is 64 bit and the only thing it knows what to do with 16 bit applications is throw an error.
Now if this application is attempting to use 16 bit printing routines, the bad news is that it won't work, at least not while the application is running on Server 2008R2.
Comment: I may have been wrong about the OS Version. It is 32bit Server 2008 Standard 6.06002 SP2
Comment: How about "copy file.txt \\mycomputer\myprn"? There is a good chance you'll get an error that will point you to the right direction towards a solution.
Answer: I actually have a similar setup because of certain manufacturing software...
The usual culprit is that the applications expects the printer to be on the local computer's list. The other culprit is that the application expects the printer to be a very specific name or else it won't find it. Without knowing the software it's hard to say exactly what the problem is, but I would start by adding the shared printer to your TS server and naming it exactly how it is on your local machine - then try printing using the lpt port setup.
Comment: I know the problem is definitely the application because I can "copy file.txt lpt2" and it prints. I don't know enough about the application or how it knows there is no printer at that port. The application is smart enough to allow me to change hppcl to generic text or even to save the file to disk, so it is a good program; just the environment has changed.
Answer: I can suggest an alternative that we use for printing from a widely-used 16-bit DOS program at my company: A.N.D. Technologies free DOSPrint application has worked perfectly for us over the last ten years. While closed source, it's only 63KB, runs as a system-wide service or per-user tray app, redirects the LPT stream from the DOS subsystem to any Windows print queue including shared printers, and has a liberal license ("free for general use without restriction"). Check their Downloads/Free Software link.
Another option — if you have any programming experience — is to write your own trivial LPT-to-whatever redirector. In .NET, you'll use P/Invoke calls to QueryDosDevice and DefineDosDevice to redirect an LPT from any DOS app to a file or named pipe:
<DllImport("kernel.dll", CharSet:=CharSet.Unicode, entrypoint:="DefineDosDeviceW")>
Public Shared Function DefineDosDevice(ByVal dwFlags As UInt32, ByVal lpDeviceName As String, ByVal lpTargetPath As String) As Boolean
End Function