I want to run 5 functions in parallel and all these functions will return result from SQL.  I planned to use pcntl_fork(); but didn't knew how to assign values to those variables.
Is there a realistic way of implementing a multi-threaded model in PHP whether truly, or just simulating it. Some time back it was suggested that you could force the operating system to load another instance of the PHP executable and handle other simultaneous processes.  The problem with this is that when the PHP code finished executing the PHP instance remains in memory because there is no way to kill it from within PHP.  So if you are simulating several threads you can imagine whats going to happen.  So I am still looking for a way multi-threading can be done or simulated effectively from within PHP. Any ideas?
If $X$ and $Y$ are sets, their cartesian product $X\times Y$ is a set. In ZFC set theory, every element object is a set. We know or feel that if $X$ and $Y$ are sets, their cartesian product $X\times Y$ is a set.  My question is: Why if $X$ and $Y$ are sets, their cartesian product $X\times Y$ is a set? Can anyone help me out with this,    This is from a custom object " Quotation", The look up field " Main Driver" is a look up to Personal account object. The below fields are as well exists in the personal account. I need whatever value would be choosen in the main driver, automatically the below values will get pop up.  I amm trying to write a trigger for this, but just got stuck, Error showing as,      Error: Compile Error: Variable does not exist: Account.Age__c at line   7 column 17   How can i define the Account variable in the Quotation object trigger ?  trigger MainDriverRelatedFields on Quotation__c (before insert,before update) {      for(Quotation__c obj : Trigger.new){          if(obj.Main_Driver__c!=null) {              obj.AgeMainD__c=Account.Age__c;              obj.GenderMainD__c=Account.Contact_Individual_Gender__c;          }      }  } Why $¬¬\bot \not\in PROP$? I'm reading Dalen's Logic and Structure.  He gives the definition of the set $PROP$:     Definition $\bf2.1.2$ The set $PROP$ of propositions is the smallest set $X$ with the properties       $\begin{array}{rl} \rm(i)&amp;p_i\in X(i\in N),\bot\in X,\\ \rm(ii)&amp;\varphi,\psi\in X\Rightarrow(\varphi\wedge\psi),(\varphi\vee\psi),(\varphi\to\psi),(\varphi\leftrightarrow\psi)\in X,\\ \rm(iii)&amp;\varphi\in X\Rightarrow(\neg\varphi)\in X.\\ \end{array}$   Then there are some examples:        And he says that $¬¬\bot \not\in PROP$, but I don't understand it. Isn't $¬¬  \bot=\bot$ due to the property of double negation? Considering this is true, $\bot\in PROP$. Of course, in this question, I'm pressuposing some kind of evaluation, that $¬¬ \bot$ becomes $\bot$ due to the law of the double negation, but perhaps it should be hold in an unevaluated form.  Ex:. $1+1=2$ because we presupose the $1$ merges with $1$ and then becomes two. If the merge (evaluation) does not happen, then I guess:  $$1+1=1+1$$ $$2=2$$ $$2\neq 1+1$$ $$1+1\neq 2$$  Perhaps it's something like that, I took the idea from Mathematica. Sometimes it does treats things as different in the absence of full evaluation. Add a downvote option in the VLQ review There are many answers that are well-formed and well-formatted but are simply plain wrong or misleading. When reviewing, I often have a hard time deciding which action to take, as:   Looks Good: is OK per se but I would never say "good" (would work if the wording was changed slightly), Edit: The question is formatted well and editing it to be right would go against the intent of the author, Recommend deletion: this looks like the most reasonable choice, but I wouldn't flag it if I were browsing the site in normal mode, Not sure: I am quite sure what is wrong but I end up clicking this because the other three options do not seem fitting.   My proposal is to add a fifth option - Downvote that would make it easier to choose in case of such answers. Reference request: convergence for periodic Markov chains Consider an irreducible but possibly periodic Markov chain on a finite state space with transition matrix $P$. We know there exists a unique stationary distribution $\pi$. If the Markov chain were aperiodic, we would have $P^n_{ij} \to \pi(j)$ as $n \to \infty$. This fails if the chain is periodic, but we have convergence of the Cesaro averages: $$\frac{1}{n}\sum_{k=1}^n P^k_{ij} \to \pi(j) \text{ as } n \to \infty.$$ Can anyone point me to a reference that states this fact? Every reference I've seen only considers convergence for aperiodic chains, or "fixes" periodicity by considering a lazy version of the chain. Alternatively, is there a simple way to obtain this result using the result for aperiodic chains? How to create and design hoops net and attach ot to a hoop? How exactly do I install Minecraft Mods and what is Forge? I'm having a really, really hard time figuring out how to install mods on Minecraft. I've looked everywhere I can think of for help but the information is almost always outdated or unhelpful.  I've seen on several sites about the use of something called Forge. The Mod I want to use requires 1.6.4 Forge and I have both Forge and the Mod folders sitting in my downloads folder.  I haven't installed any kind of mods for any game prior to this and I have little clue to the technical side of Minecraft, so please keep this in mind when you give me an answer please!  Things that might help you figure out how to help me:   I want to play this mod  and am using the 1.6.4 Forge given on a link that website gives Given that $a$~$\mathcal{N}(\mu, \Sigma)$ and $\mu$~$\mathcal{N}(0, \sigma^2 I)$, Is $p(a|\Sigma, \sigma)=\int p(a|\mu, \Sigma)p(\mu|\sigma)d\mu$ again a Normal distribution? And how to estimate the mean and variance respectively? Thanks a lot! Many SE sites (like math.SE) have a problem with mixed content, which causes display bugs in recent browsers. This is particularly evident with math.SE (because of the huge use of MathJax) and with chat sections.  Will this be fixed?  How to reproduce  Visit  or   What happens  Mixed content is blocked, output is missing pieces of code (MathJax):    This picture also includes my main Firefox addons (top right), it relevant. It shows missing styles:    The white on the left is my tab list. Make CMD-Delete a keyboard shortcut in Apple Mail to move a message to the archive? Grammatical number agreement in a complex phrase using singular "they" another question, I used the following phrase:     Your reader is [...], but they are a busy person.   I have two difficulties here:   In the first phrase, a reader, being singular noun, certainly implies is; In the second phrase, they, being a plural pronoun (regardless that it refers a single person), still requires are, but are implies the plural for busy persons which sounds awkward (a reader &lrarr; persons);   Obviously, if I used "...but he is a busy person", everything works fine, but I'm trying to use a gender-agnostic form.  What is the proper number agreement here? The difference between an analogy and a metaphor? Many a time I've asked what the difference is between an analogy and a metaphor. I've asked it to my teacher, on internet sites, to my parents, so on and so forth. I got a different answer every time, and I never fully grasped what the difference is, so what is the difference? Gave up waiting for root device on Ubuntu At some point, the filesystem on my digital audio player has become read-only. I cannot copy files into it or remove files on it.  Are there some possible reasons for the player's file system to change permissions in this way?  I tried using chmod:  $ sudo chmod a+rw SGTL\ MSCN/  chmod: changing permissions of `SGTL MSCN/': Read-only file system   SGTL MSCN is the mount point of the digital audio player.  What else can I try to make it writeable? Reading data from a relational database into a LaTeX table I'm using Tex Live 2009 on Debian squeeze. I can upgrade if I really, really  have to, but I'd rather not. I was wondering if it would be possible to do the following.  Given some data in a (relational) database, can I extract it and automatically format it in a LaTeX table, so one would not need to manually recreate the LaTeX table if the data changes? Could one do such a thing with Lua? One would normally use a suitable language database adaptor for this, and I see Lua has . I'd like to use PostgreSQL. I'm currently using version 8.4.  Solutions not involving Lua are also fine. Just to be clear, I don't know anything about Lua and my knowledge of LaTeX programming is also extremely skimpy. I'm looking for a recipe which I can adapt if necessary. While this is not really important for my current use case, it seems like a useful general technique if possible. Why is there not a simpler way to calculate the standard deviation? Steps of getting standard deviation. :        Work out the average (mean value) of your set of numbers   Work out the difference between each number and the mean   Square the differences   Add up the square of all the differences   Divide this by one less than the number of numbers in your set -   this is called the variance   Take the square root of the variance and you've got the standard   deviation      Am I missing out something, or why do we need to square the differences in step 3?  Why not simply do a Abs (multiply all negative numbers by -1) in step 3?  Also, my second question is why do we need to divide by one less than the number of numbers in the set in step 5? why not simply divide by the number of numbers? How to extract the boundary of a raster image? In a ring $(A,+, \cdot)$ if $aba = a$ then $bab = b$ and all non zero elements in $A$ are invertible. Sugar daddy wants my online banking login info to make deposits — is it a scam? Someone is offering to pay me in a sort of sugar daddy/sugar baby arrangement. They want to make online deposits to me, and they're asking me for my online banking username and password. Is that information alone enough for them to be able to take my money out of my account, or am I safe? Floating sidebar can get too long and obscure footer Sometimes, when you create a question which returns a lot of similar questions, it makes the height of the floating "Similiar Questions" box too big to fit on the page. As a result, it blocks some of the footer on the right hand side. It's actually doing it as I type this question.  I think a max height based on the view port - footerHeight should fix it.