I have a driver license issued in my country (Egypt), can I use it in California? I'm staying with a J-1 visa. My name is written in English but the expiration date is in Arabic numerals.
I'm planning to attend a Californian university as a visiting scholar (not paid by the university) on a J-1 visa, for a total of four weeks; a colleague of mine will do the same, but for 12 weeks. I've been told (personally, ie. no citable sources) that, if you're staying on a J-1, you're effectively a California resident for the time you're there, and, therefore, need a Californian driver's license.  I've read up on this and found  that states:     If you are a visitor in California over 18 and have a valid driver   license from your home state or country, you may drive in this state   without getting a California driver license as long as your home state   license remains valid.      If you become a California resident, you must get a California driver   license within 10 days. Residency is established by voting in a   California election, paying resident tuition, filing for a homeowner's   property tax exemption, or any other privilege or benefit not   ordinarily extended to nonresidents.   I'm not planning to vote in any elections, nor will I own a home there, but I'm not sure what would constitute "privileges or benefits not ordinarily extended to nonresidents".  Do we need to get driver's licenses in California, or can we use our foreign licenses? How about day trips to Arizona or Nevada?  Note: this seems to be related to , but my question is specifically about staying there on a J-1.
Unloading classes in java? I have a custom class loader so that a desktop application can dynamically start loading classes from an AppServer I need to talk to. We did this since the amount of jars that are required to do this are ridiculous (if we wanted to ship them). We also have version problems if we don't load the classes dynamically at run time from the AppServer library.  Now, I just hit a problem where I need to talk to two different AppServers and found that depending on whose classes I load first I might break badly... Is there any way to force the unloading of the class without actually killing the JVM?  Hope this makes sense Save entire process for continuation after reboot I developed an algorithm for a fairly hard problem in mathematics which is likely to need several months to finish. As I have limited resources only, I started this on my Ubuntu 12.04 (x86) laptop. Now I want to install some updates and actually restart the laptop (the "please reboot" message is just annoying).  Is there a way to save an entire process including its allocated memory for continuation beyond a reboot?  Here is some information about the process you might need. Please feel free to ask for further information if needed.   I called the process in a terminal with the command "./binary &gt; ./somefile &amp;" or "time ./binary > ./somefile &amp;", I cannot really remember. It's printing some debug information to std::cerr (not very often). It's currently using roughly 600.0 kiB and even though this will increase, it's unlikely to increase rapidly. the process runs with normal priority the kernel is 3.2.0-26-generic-pae, the cpu is an AMD, the operating system is Ubuntu 12.04 x86. it runs since 9 days and 14 hours (so too long to cancel it ;-) ) It  to disable internet search results in start menu searches before the Windows 10 Creators Update, but I've just clean installed a new Windows 10 Pro image and that setting is gone. Is there some way to disable it through editing the registry/etc? I am trying to draw a partial box around one or more words within a paragraph--that is, a rectangle with one or more sides missing. I have read the documentation for the fancybox package and it doesn't seem to be able to do what I want. I was able to produce thus ugly hack:    That's just a vertical bar | followed by a word with \overline and \uline. The trick is to connect the vertical and horizontal lines so that you have a rectangle missing just one side.  Is there an easy, general way to do this, perhaps with Tikz? I don't know enough about that package to be able to do this myself, but I'm wondering if there might be other solutions too. How do I protect Python code from being read by users? I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile and) remove the code that checks the license file. Another aspect is that my employer does not want the code to be read by our customers, fearing that the code may be stolen or at least the &quot;novel ideas&quot;. Is there a good way to handle this problem? Hiding and redirecting extensions on my webpage Unknown apps/processes with number only are shown in data usage A mysterious app named &quot;10102&quot; shows up in my data usage. It bears only the standard Android app icon (the Bugdroid logo with a cube on its torso). From what the graph tells me, it has used 36 megabytes of data in the background and zero on the foreground. I think I haven't uninstalled anything for months. Is it malware? I haven't sideloaded anything and only authorized my laptop as a USB debugger. If it's malware, how do I remove it? I have no idea how to find its package name and 10102 isn't in the list of downloaded apps in settings. I'm running stock &amp; never-been-rooted Android 4.4.4 on Nexus 4. Prove that $\frac{a_1^2}{a_1+a_2}+\frac{a_2^2}{a_2+a_3}+ \cdots \frac{a_n^2}{a_n+a_1} \geq \frac12$ Let $a_1, a_2, a_3, \dots , a_n$ be positive real numbers whose sum is $1$. Prove that $$\frac{a_1^2}{a_1+a_2}+\frac{a_2^2}{a_2+a_3}+ \ldots +\frac{a_n^2}{a_n+a_1} \geq \frac12\,.$$  I thought maybe the Cauchy and QM inequalities would be helpful. But I can't see how to apply it. Another thought (might be unhelpful) is that the sum of the denominators on the left hand side is $2$ (the denominator on the right hand side). I would really appreciate any hints. Is there any (even the most subtle) difference between the meaning (or connotation) of that is and i.e.?  I used to be convinced that they were synonyms, until an editor of a scientific journal changed all occurrences of i.e. into that is. I'm writing a shell script for Linux, using Bash, to translate any video-file into a MP4. For that, I'm using avconv with libvorbis for audio.   Inside my script, I have a question for the user :   read -p "- Audio Quality [scale from -2 to 10] ? "     if [ -n "$REPLY" ] ; then     ABITRATE="-aq $REPLY"     fi   My "ABITRATE" string goes into the final avconv command-line.  But I would like to give the user the opportunity to answer that question with a value in Kb (Kilobit), and translate it into the scale that libvorbis uses. The "scale from -2 to 10" is this :   Quality Kbit/s  Normalization -----------------------------  -2      ~32        y  -1      ~48        y   0      ~64        y   1      ~80        y   2      ~96        y   3     ~112        y   4     ~128        n   5     ~160        n   6     ~192        n   7     ~224        n   8     ~256        n   9     ~320        n  10     ~500        n   I would like to know how to check if my $REPLY is in a range of number. For example, I would like my script to do something like this :   if [ $REPLY is a number between 1 and 32 ] ; then   REPLY="-2" elif [ $REPLY is a number between 33 and 48 ] ; then   REPLY="-1" fi   Is this possible (I'm willing to say 'yes of course, shouldn't be hard' but I don't know the syntax to use) ? VirtualBox error kernel headers I'm with Ubuntu 15.04 and I'm trying to create an emulator (genymotion), but when run virtualbox, i got the error:     Stopping VirtualBox kernel modules ...done.   Uninstalling old VirtualBox DKMS kernel modules ...done.   Trying to register the VirtualBox kernel modules using DKMSError! Your kernel headers for kernel 3.16.0-30-generic cannot be found.   Please install the linux-headers-3.16.0-30-generic package,   or use the --kernelsourcedir option to tell DKMS where it's located    ...failed!     (Failed, trying without DKMS)   Recompiling VirtualBox kernel modules ...failed!     (Look at /var/log/vbox-install.log to find out what went wrong)   I performed   uname -a   And the result is:     Linux douglas 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:06:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux   Someone help me?Already I uninstalled and installed again. I'm embarking on a journey to create a conference abstract book using XeTeX and got stuck within five minutes:        The missing 'g' in 'somethin' influences the line height of the following line. How can I correct this?  At the end I want to be able to include the abstracts and corresponding information through our online registration system, so this should be a global setting.  My MWE:  \documentclass[10pt, a5paper]{article} \usepackage{fontspec}  %% GEOMETRY \usepackage[left=2cm, right=1.5cm]{geometry} % to change the page dimensions  \newenvironment{AbsHead} {     \fontsize{16}{22}\headfont\noindent }% {     \vspace{0.5 cm} }  \newenvironment{AbsAuthors} {     \fontsize{12}{14}\authorfont\noindent }% {    \vspace{0.5 cm} }  \begin{document}  ￼￼￼￼\setmainfont{Minion Pro} \newfontfamily\authorfont{Helvetica Neue Light} \newfontfamily\headfont{Helvetica Neue Condensed Bold}  \begin{AbsHead}The XIAP  something something something somethin somethin somethin somethin somethin somethin somethin something something\end{AbsHead}   \begin{AbsAuthors}Somebody Someone\end{AbsAuthors}   \noindent Purpose: Lorem ipsum \end{document} How to deal with duplicate answers posted long after first answer(s) I've been seeing this for a while now, especially on the  tag.  A user will ask a question (usually very simple, and mostly a duplicate of older questions. But that's for another day).  The user will get one or more answers that successfully answer the question. A little bit later, usually around 5-10 minutes but can be more, another user or users will come along (mostly low rep users) and post the exact same solution, sometimes changing the wording a bit, but sometimes being lifted word for word from the other answer(s).  This is slightly different from the Fastest gun in the west problem. I have nothing against answers posted in very quick succession that solve the problem. The ones I'm talking about are answers posted long after the first correct solution, that say the same thing.  A good example of this is available . All three answers say the same thing. One offers code + explanation (first answer), the second one (three minutes later) offers only code and the third one (a full eighteen minutes later) offers only a text answer.  How should answers like this be dealt with? They are adding nothing of value to the community, as the problem has already been answered. The person posting the answer could not have run into the "The other and I posted the answer so close to each other we didn't know about duplicates until after posting" problem, as there is an eighteen minute gap.   is another example. 'Possible duplicate' comment not appearing for questions with deleted comments containing the link I posted a comment to a duplicate question on . But I decided to delete it. Afterwards I voted as duplicate and thought a comment would be generated like     possible duplicate of ...   But it didn't. My guess is that the duplicate-comment won't be generated if a comment exists with that link, even if deleted. Distribution of a ratio of uniforms: What is wrong? Suppose that  $X$ and $Y$ are two i.i.d. uniform random variables on the interval $[0,1]$  Let $Z=X/Y$, I am finding the cdf of $Z$, i.e. $ \Pr(Z\leq z) $.  Now, I came up with two ways of doing this. One produces a correct answer consistent with the pdf here: , the other does not. Why is the second method wrong?  First Method  $\newcommand{\rd}{\mathrm{d}} \Pr(Z\leq z) = \Pr(X/Y\leq z) = \Pr(X\leq zY) = \int^{1}_{0}\int^{\min(1,zy)}_{0} \rd x \rd y = \int^{1}_{0}\min(1,zy)\ \rd y$ $  = \left\{      \begin{array}{lr}        \int^{1/z}_{0}zy\ \rd y + \int^{1}_{1/z} \rd y&amp; : z &gt; 1\\        \int^{1}_{0}zy\ \rd y &amp; : z \leq 1      \end{array}    \right. $ $  = \left\{      \begin{array}{lr}        1 - \frac{1}{2z} &amp; : z &gt; 1\\        \frac{z}{2} &amp; : z \leq 1      \end{array}    \right. $  This appears correct.  Second Method  $\Pr(X/Y\leq z) = \Pr(X \leq zY\ |\ zY \geq 1)\Pr(zY \geq 1) + \Pr(X \leq zY\ |\ zY &lt; 1)\Pr(zY &lt; 1) $ by total probability  $ = \Pr(X \leq zY\ |\ zY \geq 1)\Pr(Y \geq 1/z) + \Pr(X \leq zY\ |\ zY &lt; 1)\Pr(Y &lt; 1/z)$  Taking $z&gt;1$ yields $ (1)(1-\frac{1}{z}) + (\int^{1/z}_{0}\int^{zy}_{0} \rd x \rd y)(\frac{1}{z}) = 1-\frac{1}{z} + (\int^{1/z}_{0}zy\ \rd y)(\frac{1}{z}) = 1-\frac{1}{z} + \frac{1}{2z^{2}}$  This is already different. Why is this wrong?  Thanks! I was solving a few problems from a textbook and I came across this one:     Find the tangent lines to the graph of $x^2+4y^2 = 36$ that go through   the point $P=(12,3)$   I could find the tangency points $$ but my solution was completely messy (I had four equations that I had to go back-and-forth with.  Is there an elegant/simple solution to that?  Tangency points:  $$P_1 = (0,3)$$ $$P_2 = \left( \frac{24}{5} , 3-\frac{24}{5} \right)$$ I have a WordPress install on a dedicated server with decent memory (upwards of 8GB).  The WordPress install includes many plugins - 50 active plugins. Most important to note is the  plugin to make WordPress multilingual. The theme is .  The stack is LAMP - CentOS 6.3, Apache 2.4.4, Percona MySQL, PHP-FPM.  I have been quite stupid, and didn't set up a test or staging server.  Everything was running fine till I updated to WordPress 3.8, and also updated several plugins at the same time.  I didn't pay attention at the time, but all my widgets got messed up, and so did any sort of navigation etc.  I enabled error_log for a bit, i.e.  ini_set('log_errors',TRUE); ini_set('error_reporting', E_ALL); ini_set('error_log', dirname(__FILE__) . '/error_log.txt');   This resulted in an immense file - basically the error_log grows by about a GB every 4 minutes or so.  The primary error I found in the error log was database server disconnect, better known as      MySQL server has gone away   The first priority was to patch the problem. So I installed  plugin. This mostly, though not completely solved the issue. Many of the widgets came back.  However, the special (non-English) characters are all messed up (converted to question marks). I tried to fix this by opening wp-mysql-ping.php and commenting out   if ( !DB_CHARSET &amp;&amp; version_compare(mysql_get_server_info($this-&gt;dbh), '4.1.0', '&gt;='))                                     {                                         $this-&gt;query("SET NAMES '" . DB_CHARSET . "'");                                     }   Didn't help.  Besides, the plugin is not a permanent or complete solution. So leaving the site in this messed up state, I started working on other possibilities:  As suggested at , I edited my.cnf to add  wait_timeout = 60   Didn't help.  Also added caching to my.cnf  query_cache_type = 1 query_cache_limit = 8M query_cache_size = 512M   Didn't help.  (and yes, I restarted mysql every time I edited my.cnf)  Also tried the method : In wp-db.php before  $this-&gt;select( $this-&gt;dbname, $this-&gt;dbh );   I added  $this-&gt;query("set session wait_timeout=600" );   Didn't help.  I'm at my wit's end. Please help! Missing SOAP action header Im trying to get the session ID of another user in the same org by sending the following request by using the data from my enterprise wsdl and its an developer edition.  &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com"&gt;    &lt;soapenv:Header&gt;       &lt;urn:organizationId&gt;xxxxxxx&lt;/urn:organizationId&gt;    &lt;/soapenv:Header&gt;    &lt;soapenv:Body&gt;       &lt;urn:login&gt;          &lt;urn:username&gt;xxxxxxxxx&lt;/urn:username&gt;          &lt;urn:password&gt;xxxxxxxxx&lt;/urn:password&gt;       &lt;/urn:login&gt;    &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt;   But when i send this request i get      Missing SOAP ACTION header  but in my wsdl i dont have the action ,its blank    how to overcome this problem ?I got totaly struck over here since there is no action though its asking for action header.Following method handles the http request.   public string   processrrequest(string ep,string message,string method) {      HttpRequest req = new HttpRequest();     req.setEndpoint(ep);     req.setMethod(method);     req.setHeader('Content-Type', 'text/xml');     req.setHeader('SOAPAction','');     req.setBody(message);     system.debug('Request::'+req.getbody());     Http http = new Http();     HttpResponse res =http.send(req);     //Dom.Document doc  = res.getbodyDocument();     system.debug('Response::'+res.getbody());     system.debug('Response2::'+res.getStatus());     Dom.Document doc= new Dom.Document();     doc=res.getBodyDocument();     system.debug('doc::'+doc);     return 'hai'; } Pass values from parent to child component on click lightning I have this below code where i am trying to first search an account name and on hit button it displays the result set.  On the button click i am also loading an child component which is displaying the id of the record.  I need the child component should get displayed once i click on the record.  How can i achieve this -   Parent Component -   &lt;aura:component controller="SimpleAccountController"&gt;     &lt;aura:attribute name="account" type="account[]"/&gt;     &lt;ui:outputText aura:id="outName" value="" class="text"/&gt;     &lt;ui:inputText aura:id="name" label="Enter Name:" placeholder="Your Name" /&gt;     &lt;ui:button aura:id="button" buttonTitle="Click to see what you put into the field" class="button" label="Click me" press="{!c.getInput}"/&gt;     &lt;aura:iteration var="acc" items="{!v.account}"&gt;             &lt;a onclick="{!c.accountselected}" data-recId="{!acc.Id}"&gt;         &lt;p&gt;{!acc.Name} : {!acc.Type} : {!acc.Industry} : {!acc.Rating}&lt;/p&gt;             &lt;/a&gt;         &lt;c:HelloWorkdChildCmp selectedaccount="{!acc.Id}" /&gt;     &lt;/aura:iteration&gt; &lt;/aura:component&gt;   COntroller -   ({     getInput : function(cmp, evt) {         var myName = cmp.find("name").get("v.value");         var myText = cmp.find("outName");         var greet = "Hi, " + myName;         myText.set("v.value", greet);         var action = cmp.get("c.seaAcc");         action.setParams({ "s" : myName });         action.setCallback(this, function(response) {             var state = response.getState();             if (state === "SUCCESS") {                 cmp.set("v.account", response.getReturnValue());                 //alert("From server: " + response.getReturnValue());             }         });         $A.enqueueAction(action);     },      accountselected : function(cmp, evt) {        console.log(evt.currentTarget.getAttribute("data-recId")) ;     }  })   Child component -   &lt;aura:component &gt;     &lt;aura:attribute name="selectedaccount" type="String"/&gt;     &lt;div&gt;Id: {!v.selectedaccount}&lt;/div&gt; &lt;/aura:component&gt; I was granted a visa to Australia few months ago. I’d like to travel to Australia in few days. However, I’ve just renewed my passport and I don’t have enough time to inform them about my passport renewal. Can I travel to Australia by carrying both my old and my new passports?