Please see i am not asking what is immutability,  i understand immutability but question is more how to make an immutable class when you are giving reference to a mutable object. Moreover my class failed the check with mutability detector project, hence requesting your view.  I have created a Immutable class EmpAndAddress.java and it has reference to a mutable class EmpAddress.java which is cloneable. I have followed the java rules and tried to test my class using mutability detector  but my class is failing the immutable test. Just want to check if I am missing something. In my Immutable i am always creating new Object of type EmpAddress mutable to follow the rules.   1. Mutable  EmpAddress.java  public class EmpAddress implements Cloneable{     public String empCity;     public int zipCode;       public EmpAddress(String empCity, int zipCode) {         super();         this.empCity = empCity;         this.zipCode = zipCode;     }      public String getEmpCity() {         return empCity;     }      public void setEmpCity(String empCity) {         this.empCity = empCity;     }      public int getZipCode() {         return zipCode;     }      public void setZipCode(int zipCode) {         this.zipCode = zipCode;     }      protected Object clone() throws CloneNotSupportedException {                  EmpAddress clone=(EmpAddress)super.clone();         return clone;           }  }   public final class EmpAndAddress implements Cloneable {     private final int empId;     private final String empName;        private final EmpAddress eAddr;      public EmpAndAddress(int empId,String empName,EmpAddress eAddr){         super();         this.empId = empId;         this.empName = empName;         this.eAddr = new EmpAddress(" ", -1);            }      public int getEmpId() {         return empId;     }       public String getEmpName() {         return empName;     }      public EmpAddress geteAddr() throws CloneNotSupportedException {         return (EmpAddress) eAddr.clone();     }  }

This could be the dumbest question ever asked but I think it is quite confusing for a Java newbie.    Can somebody clarify what is meant by immutable?  Why is a String immutable? What are the advantages/disadvantages of the immutable objects? Why should a mutable object such as StringBuilder be preferred over String and vice-verse?   A nice example (in Java) will be really appreciated.


In the most recent Stack Overflow Podcast, announced in this , it is claimed that the CEO talks about the future of our company and community.  The title of the blogpost is:     Podcast: A chat with our CEO about the future of our company and community   I don't mind listening to a podcast, when I have the time. Currently I don't and would like to be able to quickly glance through what is being discussed and read parts I find interesting/relevant when I have a few minutes to spare.  Is there anywhere this podcast is transcribed? I know in the past there were discussions about transcribing tools doing a decent job. It doesn't have to be an official SO transcription.

There has been some level of effort to provide written transcripts of official Stack Exchange podcasts. Transcripts for the first four Unicorn Meta Zoo podcasts were posted on , and the  received a transcript as an . Some podcasts don't seem to have transcripts at all anywhere, and for those that do, their locations are inconsistent. Externally-hosted transcripts can decay at any time.  Let's have an official process or practice to create transcripts of official podcasts. This would benefit several groups:   Users with hearing or auditory processing disabilities Users for whom English is a foreign language and that prefer reading at their own pace Users in areas where listening to a podcast is socially inappropriate and/or potentially disruptive, such as a public library, classroom, or workplace Users with low bandwidth and/or high-latency connections   As SolveIt mentioned, this would also greatly aid searchability. If I have a vague recollection that there was a podcast that happened to venture into best practices in how much unicorn sparkle dust to feed moderators after midnight, I can check it out myself with a single search rather than listening through hours of podcasts or asking the community to do so for me.


I have to dynamically call a class and a function based on variables sent from a form. is there a way to do this like $className= 'form1'; $functionName = 'function2456'; {className}->{$functionName}  Prior to this as well, I need to check if that specific function exists within that particular class. Any help please?

How can I dynamically invoke a class method in PHP? The class method is not static. It appears that   call_user_func(...)   only works with static functions?  Thanks.


Yesterday I updated my Ubuntu from 14.10 to 15.04 but sadly i had to conclude that Spotify doesn't work anymore. Today I installed 15.04 and Spotify again but nothing has changed - Spotify isn't working.  For installing Spotify I have used the instructions on this Page:    How can I fix this?  (Sorry for my bad English, but I hope, this is understandable...)

I installed the latest Ubuntu today, 15.04. Spotify has stopped working. How can it be made to work again?  The Unity bar flashes green 4 or 5 times and then stops flashing. There are no error messages. It was installed successfully and played well on 14.10 till the upgrade a few hours ago. It just does not appear on the screen.


Problem:   Make edit Realize, later, that you should have added an edit summary and did not (or that you just want to change it). Add or change edit summary. Press 'Save Edits'. Edit summary is not saved.   Possible solutions:   Make it so that edit summary changes are saved (already asked for here: ) Make it clearer when it will not be saved (and give the warning before a user goes to the trouble of typing out a new edit summary).   The way it works now a person could make new edits in order to save a new edit summary, but that should not be required as it just encourages fake edits.  For 2., all that would be needed is an pop-up alert when the user clicks on in the edit summary field without having made any new changes.  Something along the lines of "This edit summary will not be saved unless new edits to the post are made."    Here are some more details, in case this is not the way it works all of the time: I made an edit (actually a roll-back on my own post), but did not know there was a comment field for that.  About an hour later, I found out there was such a thing as an edit summary, so I hit "edit", added one for the roll-back, and pressed "save".  I happened to think I should make sure the edit summary stuck (since I really wanted to make sure the original editor got to read why I did the roll-back) and when I hit "edit" again it turned out that no, it didn't.  The edit summary was gone.

It often occurs to me to add an edit summary to a question-edit immediately after submitting the edit, especially if the changes aren't obvious (formatting etc.). So I:   Click "edit" again. Fill in the summary Click on "Save Edits".   The 'edit' (no actual change has been made to the title/body/tags)  is accepted, but the summary doesn't show up, i.e. it is silently rejected.   I don't think it should work this way because the summary has been added by the original editor within the original edit's edit-window. In fact if I remember correctly, it to used to work as expected earlier; so perhaps this is a recent change.


I came across a physics experiment video showing three balls released from a point A, going down three different kinds of ramps leading to a point B ()  Assuming no friction and a point mass for simplicity, is there an ideal curve to get it from point A to B in the shortest time (e.g. is it parabolic)?  Assuming this significant simplification, can it be proven that for any curve between A and B, the point mass should pass B at the same velocity?  I.e. a different curve will only affect the time it takes to get to B, but not the velocity?

I was at my son's high school "open house" and the physics teacher did a demo with two curtain rail tracks and two ball bearings. One track was straight and on a slight slope. The beginning and end points of the second track were the same but it was bent into a dip with a decending slope and an ascending slope. The game was to guess which ball bearing wins the race. At first blush ("the shortest distance between two points is a straight line") one might think the straight wins, but in fact the bent track wins easily (because the ball is going very fast for most of the time). His point was that nature doesn't always work that way our antediluvian brains think it should.  So my question (and I do have one) is what shape of track give the absolute shortest time? I think it's a calculus of variation problem or something. For simplicity, let's assume a) no friction b) a point mass and c) that the end point is a small delta below the start point. I played around with some MATLAB code and it seemed to give a parabola of depth about 0.4 times the distance between the start and stop point. The value of g and the mass didn't seem to matter. But I don't know if my code was right or wrong and I couldn't figure out the significance of 0.4. I Googled around for an answer but couldn't find one. Thanks for any pointers!


What were they doing differently that had led to this dramatic improvement?   I saw a sentence having the same structure as the one above. But I am not sure that this sentence is grammatically correct. I would like to know your opinions.    The "that" in the sentence seems a relative pronoun, but where is the antecedent? When I speculate what it says, the antecedent could be the "what". Is it possible?

I'm not sure about the sentence structure below:  All kinds of problems arise that smaller animals or plants do not have to cope with.  It looks like that works as a relative pronoun for all kinds of problems, but I couldn't find such usage in my dictionary or online. This sentence could be divided into  There are all kinds of problems. Smaller animals or plants do not have to cope with all kinds of problems.  But, I can't figure out where 'arise' fits. If you have any thoughts, please share them.


I've noticed that it is not only in English that the word "right" can be used both as a noun (when talking about liberty) and an adjective (when talking about direction) It's slso like that in Spanish (derechos/derecha), Portuguese (direitos/direita) and French (droit/droite) What caused this connection between the two "rights" and why?

Does anyone know of a connection, or some sort of established historical/etymological explanation why in a few languages, "the opposite of left" and "truthful claim to" are the same or seemingly related words? Do they all have a common root? Did they develop independently?  Examples:   English: right  -  right French:  droit  -  droit German:  rechts -  Recht Polish:  prawo  -  prawo Russian: право - право Portuguese: direita - direito   Maybe some people can enhance this list by adding more examples?  My question also on .


I asked  the other day and got a sufficient answer: that given $X$~$\mathsf{Poisson}(rate=\lambda_1)$ and $Y$~$\mathsf{Poisson}(rate=\lambda_2)$, $X|(X+Y=n)$~$\mathsf{Binomial}\left(n,\cfrac{\lambda_1}{\lambda_1+\lambda_2}\right)$. However, the way it was done was not using moment generating functions, and indeed I got a moment generating function for $X|(X+Y=n)$: $e^{tn}\cdot e^{\lambda_2(e^{-t}-1)}$. Knowing that a binomial's MGF looks like $(pe^t+1-p)^n$, I tried to prove the same result using the moment generating function I got, and I got close but got stuck. Here's what I did:  $\left(\cfrac{\lambda_1}{\lambda_1+\lambda_2}e^t+1-\cfrac{\lambda_1}{\lambda_1+\lambda_2}\right)^n \stackrel{?}=e^{tn}\cdot e^{\lambda_2(e^{-t}-1)}\iff n=\mathsf{log}_{\cfrac{\lambda_1}{\lambda_1+\lambda_2}\cdot(e^t-1)+1}(e^{\lambda_2(e^{-t}-1)+tn}) \\ = \cfrac{\mathsf{ln}(e^{\lambda_2(e^{-t}-1)+tn})}{\mathsf{ln}\left(\cfrac{\lambda_1}{\lambda_1+\lambda_2}(e^t-1)+1\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}\left(\cfrac{\lambda_1(e^t-1)}{\lambda_1+\lambda_2}+\cfrac{\lambda_1+\lambda_2}{\lambda_1+\lambda_2}\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}\left(\cfrac{\lambda_1e^t + \lambda_2}{\lambda_1+\lambda_2}\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}(\lambda_1e^t+\lambda_2) - \mathsf{ln}(\lambda_1+\lambda_2)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}(e^t)+\mathsf{ln}(\lambda_1+\lambda_2e^{-t}) - \mathsf{ln}(\lambda_1+\lambda_2)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{t+\mathsf{ln}(\lambda_1+\lambda_2e^{-t}) - \mathsf{ln}(\lambda_1+\lambda_2)}$  Multiplying both sides by the denominator,  $tn+n\cdot\mathsf{ln}(\lambda_1+\lambda_2e^{-t})-n\cdot\mathsf{ln}(\lambda_1+\lambda_2) = \lambda_2(e^{-t}-1)+tn \iff n\cdot\mathsf{ln}(\lambda_1+\lambda_2e^{-t})-n\cdot\mathsf{ln}(\lambda_1+\lambda_2) = \lambda_2(e^{-t}-1)$  This is where I'm stuck. I can't seem to get rid of the $\lambda_1$. Thanks for the help.

Let $X$~$\mathsf{Poisson}$$(rate=\lambda_1)$ and $Y$~$\mathsf{Poisson}$$(rate=\lambda_2)$. Let $Z=X+Y$. Find the distribution of $X|Z=n$ and name it.  Here's what I tried:  $$\begin{align}\mathsf{M_{X|X+Y=n}}(t) &\stackrel{?}{=} \mathsf{E}[e^{tX}|X+Y=n]\tag 1 \\[1ex]&= \mathsf{E}[e^{tX}|X=n-Y]\tag 2 \\[1ex]&\stackrel{?}{=} \mathsf{E}[e^{t(n-Y)}] \tag 3\\[1ex]&= \mathsf{E}[e^{tn}e^{-tY}] \tag 4\\[1ex]&\stackrel{?}{=} e^{tn}\mathsf{E}[e^{(-t)Y}]\tag 5 \\[1ex]&= e^{tn}\mathsf{M_Y}(-t)\tag 6 \\[1ex]&= e^{tn} \cdot e^{\lambda_2(e^{-t}-1)}\tag 7\end{align}$$  And this is where I am stuck. I don't see how I can work the $tn$ in with the other exponent in such a way that I have a moment generating function that I recognize as the MGF of a distribution I know. I am also uncertain about some of the steps I took to get this MGF, so I put question marks over those equals signs. Lastly, my homework does not include the information that $X$ and $Y$ are independent, but if this information is necessary to make the problem workable then I intend to assume that my instructor forgot to include it. Thanks for the help.


From a custom Winforms component that is embedded in a form, how to I get the parent/owner control?   I have an IContainer and the Site property is not null, but I have no idea how to get to the "real" parent.  (this is a followup to , atm I am trying to add a handler to the parents VisibleChanged, but that's not the first time I face this question)

I have a non-visual component which manages other visual controls.    I need to have a reference to the form that the component is operating on, but i don't know how to get it.  I am unsure of adding a constructor with the parent specified as control, as i want the component to work by just being dropped into the designer.  The other thought i had was to have a Property of parent as a control, with the default value as 'Me'  any suggestions would be great  Edit:  To clarify, this is a component, not a control, see here :


I need to keep numbers of linked-lists in an array. I have followed similar questions but confused about implementation and cannot allocate the array correctly. I debugged, found, and simplified my problem: The array is always sized as 1 instead of N. As a result, I'm getting segmentation fault when try to use nodes. Simplified code:  typedef struct Node {     int data;     struct Node *next; } node;  int main(int argc, char** argv) {     node **array;     int N = 5;     array = (node **)calloc(N,sizeof(node*));     printf("Size of array = %d", sizeof(array)/sizeof(array[0]));     return 0; }   And the output is:  Size of array = 1   Here when I use static size for array as node *array[5] the output is:  Size of array = 5   Thanks for suggestions.

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


I found this really weird bug just now... In here the question link is redirected to wrong question when you  are not logged-in, but when you log in again everything seems fine...  take a look here...  Steps:-   Visit  in logged off condition Find a question  Q:Review queue in the topbar makes a man sad when he can't act upon it [duplicate] Click on that question.. It redirects to  Now loggin again.. you are then redirected to correct question.

Duplicate questions that use different words to describe the same problem are important for people to find the content via search engines. But the user experience when an anonymous user arrives at a duplicate is less than ideal.  They have to notice the duplicate link and understand that the answer they are looking for is likely behind that link. I don't think this is all that obvious to someone without experience with an SE site.  I propose to just redirect users to the duplicate automatically if the closed duplicate has zero answers. In that case they need to follow the link to the duplicate in any case, so we might as well redirect them to it in the first place.  I could imagine this being problematic with search engines, as we would be displaying different content than what the search engines see. If that is too problematic I would suggest to show a very obvious link to the duplicate in the answers section for anonymous users.


I am planning to travel from Chicago to Delhi via London with intention of ~36 hrs in transit.  I am Indian resident, with valid US visa (until 2015).  Going by UK border agency information  I will be needing land side visa.  I have following queries:   Is it possible to get the land side visa on arrival or do I need to apply prior to leaving US?   If it is on arrival, and for some reason I am denied, will I need to wait for connecting flight within airport for that long?   What is the procedure and fees? I scanned through the UK border agency site, but could not find a procedure, and further details. It seems very scattered.   I see that one of the flight option has 48 hrs 15 min difference. Can landside visa be applied for this case?

I am traveling from the US to India via London Heathrow on November 6. I will be at LHR on 7th at 6:20 am and departing at 9:25 pm. I'm an Indian national and have a valid US visa.  Do I need a transit visa to stay airside?  I have been scared that British Airways have stopped a few people from boarding flights (no details just rumors).  Do I need a transit visa to stay landside? I want to do some sightseeing. What are the chances of getting past officials using transit without visa concession?  Real stories will help a lot to calm the butterflies in my stomach.


For a fleeting instant, Harry thought he saw a gleam of something like   triumph in Dumbledore's eyes. But next second Harry was sure he had   imagined it, for when Dumbledore had returned to his seat behind the   desk, he looked as old and weary as Harry had ever seen him.   This happens right after...      Dumbledore questions Harry about the events in the graveyard and the coming back of the Dark Lord.   Why would Dumbledore display a "gleam of triumph" in that specific moment? Is there any references in canon explaining what was going on in Dumbledore's mind?

In the Goblet of Fire, Harry is cut in the arm by Pettigrew. When Dumbledore learns it, he's extremely worried and wants to check Harry's arm.  Why?     When Harry told of Wormtail piercing his arm with the dagger, however, Sirius let out a vehement exclamation and Dumbledore stood up so quickly that Harry   started. Dumbledore walked around the desk and told Harry to stretch out his arm.   Harry showed them both the place where his robes were torn and the cut beneath   them.      "He said my blood would make him stronger than if he'd used someone else's,"   Harry told Dumbledore. "He said the protection my - my mother left in me - he'd   have it too. And he was right - he could touch me without hurting himself, he   touched my face."      For a fleeting instant, Harry thought he saw a gleam of something like triumph in   Dumbledore's eyes. But next second. Harry was sure he had imagined it, for when   Dumbledore had returned to his seat behind the desk, he looked as old and weary   as Harry had ever seen him.      "Very well," he said, sitting down again. "Voldemort has overcome that particular   barrier. Harry, continue, please.     Edit:  Plz explain this sentence specifically:     "Dumbledore walked around the desk and told Harry to stretch out his   arm."


When booting into Ubuntu 16.04 (even with no USB devices plugged in) I get confronted with the following:  [    1.931104] usb 3-7: new low-speed USB device number 4 using xhci_hcd [    7.043191] usb 3-7: device descriptor read/64, error -110 [   17.259287] usb 3-7: device descriptor read/64, error -110 [   17.475280] usb 3-7: new low-speed USB device number 5 using xhci_hcd [   22.587338] usb 3-7: device descriptor read/64, error -110 [   32.803433] usb 3-7: device descriptor read/64, error -110 [   33.019425] usb 3-7: new low-speed USB device number 6 using xhci_hcd [   33.020984] usb 3-7: Device not responding to setup address. [   33.224987] usb 3-7: Device not responding to setup address. [   33.427426] usb 3-7: device not accepting address 6, error -71 [   33.539431] usb 3-7: new low-speed USB device number 7 using xhci_hcd [   33.540989] usb 3-7: Device not responding to setup address. [   33.744991] usb 3-7: Device not responding to setup address. [   33.947431] usb 3-7: device not accepting address 7, error -71   I tried booting in a Live session as well, same problem (no USB devices connected).  I have no idea where to begin to debug because this error pops up even with no USB devices connected to the computer. Here's my lsusb output (with some USB devices connected):  $ lsusb Bus 002 Device 002: ID 8087:8001 Intel Corp.  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8009 Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 008: ID 1af3:0001   Bus 003 Device 003: ID 5986:066d Acer, Inc  Bus 003 Device 002: ID 0582:012f Roland Corp. QUAD-CAPTURE Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  $ lsusb -t /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M     |__ Port 1: Dev 2, If 1, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M     |__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M     |__ Port 1: Dev 2, If 3, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M     |__ Port 1: Dev 2, If 4, Class=Vendor Specific Class, Driver=snd-usb-audio, 480M     |__ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M     |__ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M     |__ Port 9: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M   Anything else I can provide for you guys?

I have a 16GB flash drive. I'm running Ubuntu 14.04. I can't open my flash drive and I can't see it in GParted.  After running tail -f /var/log/syslog . After inserting my flash:  USB disconnect, device number 10 Jul  3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.712166] usb 2-3: new high-speed USB device number 11 using ehci-pci Jul  3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846591] usb 2-3: New USB device found, idVendor=090c, idProduct=1000 Jul  3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846601] usb 2-3:   New USB device strings: Mfr=1, Product=2, SerialNumber=3     Jul  3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846609] usb 2-3: Product: Silicon-Power     Jul  3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846615] usb 2-3: Manufacturer: UFD 2.0     Jul  3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.846622] usb 2-3: SerialNumber: 1401208423400131     Jul  3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.847176] usb-storage 2-3:1.0: USB Mass Storage device detected     Jul  3 16:39:55 rihanna-VGN-Z56GG-B kernel: [ 3309.847309] scsi12 : usb-storage 2-3:1.0     Jul  3 16:39:55 rihanna-VGN-Z56GG-B mtp-probe: checking bus 2, device 11: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-3"     Jul  3 16:39:55 rihanna-VGN-Z56GG-B mtp-probe: bus: 2, device: 11 was not an MTP device     Jul  3 16:40:17 rihanna-VGN-Z56GG-B kernel: [ 3332.176107] usb 2-3: reset high-speed USB device number 11 using ehci-pci     Jul  3 16:40:33 rihanna-VGN-Z56GG-B kernel: [ 3347.288080] usb 2-3: device descriptor read/64, error -110     Jul  3 16:40:48 rihanna-VGN-Z56GG-B kernel: [ 3362.504081] usb 2-3: device descriptor read/64, error -110     Jul  3 16:40:48 rihanna-VGN-Z56GG-B kernel: [ 3362.720076] usb 2-3: reset high-speed USB device number 11 using ehci-pci     Jul  3 16:40:52 rihanna-VGN-Z56GG-B kernel: [ 3366.812110] usb 2-3: reset high-speed USB device number 11 using ehci-pci     Jul  3 16:41:07 rihanna-VGN-Z56GG-B kernel: [ 3381.924082] usb 2-3: device descriptor read/64, error -110     Jul  3 16:41:23 rihanna-VGN-Z56GG-B kernel: [ 3397.356093] usb 2-3: reset high-speed USB device number 11 using ehci-pci     Jul  3 16:41:38 rihanna-VGN-Z56GG-B kernel: [ 3412.468057] usb 2-3: device descriptor read/64, error -110     Jul  3 16:41:54 rihanna-VGN-Z56GG-B kernel: [ 3428.664065] usb 2-3: reset high-speed USB device number 11 using ehci-pci     Jul  3 16:42:09 rihanna-VGN-Z56GG-B kernel: [ 3443.776100] usb 2-3: device descriptor read/64, error -110     Jul  3 16:42:24 rihanna-VGN-Z56GG-B kernel: [ 3458.992085] usb 2-3: device descriptor read/64, error -110     Jul  3 16:42:25 rihanna-VGN-Z56GG-B kernel: [ 3459.208063] usb 2-3: reset high-speed USB device number 11 using ehci-pci     Jul  3 16:42:40 rihanna-VGN-Z56GG-B kernel: [ 3474.320039] usb 2-3: device descriptor read/64, error -110     Jul  3 16:42:50 rihanna-VGN-Z56GG-B kernel: [ 3484.516109] usb 2-3: reset high-speed USB device number 11 using ehci-pci     Jul  3 16:42:50 rihanna-VGN-Z56GG-B kernel: [ 3484.768108] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul  3 16:43:05 rihanna-VGN-Z56GG-B kernel: [ 3499.880081] usb 2-3: device descriptor read/64, error -110 Jul  3 16:43:20 rihanna-VGN-Z56GG-B kernel: [ 3515.096081] usb 2-3: device descriptor read/64, error -110 Jul  3 16:43:21 rihanna-VGN-Z56GG-B kernel: [ 3515.312048] usb 2-3: reset high-speed USB device number 11 using ehci-pci Jul  3 16:43:36 rihanna-VGN-Z56GG-B kernel: [ 3530.424032] usb 2-3: device descriptor read/64, error -110 Jul  3 16:43:46 rihanna-VGN-Z56GG-B kernel: [ 3540.505230] scsi 12:0:0:0: Device offlined - not ready after error recovery


I have Ubuntu 12.04 LTS, and I want to install Windows 7 (I have no interest in keeping Ubuntu on the computer). I have a Windows 7 installation DVD, but when I tell my computer to boot from the CD/DVD Drive in the BIOS, it doesn't work. It bypasses it and starts booting Ubuntu instead. I have used this Windows installation disk in the past, so I know that it works.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


The above is a line in my textbook. $G, \delta, $ and $a$ are constants, the inner integral is just   $$\int_0^{\pi/2} \cos\phi \sin\phi\, d\phi$$ Shouldn't the antiderivative of that be  $\frac{(\sin\phi)^2}{2} $ and not $ -\frac{(\cos\phi)^2}{2}$?

I've been thinking about integration lately, and I've come up with a question that I'm not sure how to address. Consider $$ \int \sin x\cos x \, \mathrm dx = - \int -\sin x \cos x \, \mathrm dx $$ I started with the integral on the left hand side, which suggests a typical $u$-substitution. Let $u=\sin x$ then $\, \mathrm du=\cos x \, \mathrm dx$. So the integral evaluates to $$ \int \sin x\cos x \, \mathrm dx = \frac{\sin^2(x)}{2} $$ But the original integral also suggests an alternate substitution. Let $u=\cos x$ and then $du=-\sin x \, dx$. So now $$ \int \sin x\cos x \, \mathrm dx =- \int -\sin x \cos x \, \mathrm dx= -\frac{\cos^2(x)}{2} $$ So now I have that the integral evaluates to two different functions. I've tried playing with some different trigonometric identities, but I haven't been able to show that this is true and I'm fairly certain I haven't had any success because the statement itself isn't true. What am I doing wrong? How do you evaluate $\int \sin x\cos x \, \mathrm  dx$?


I have Fallout3-GOTY (steam-app #22370) and wish to change the game's language from german to english. My steam-account is configured in english and steam correctly downloads the game in english. When I launch F3, the "Pre-loader" (Settings, Data-files, etc.) is in english, but the game itself is in german. (I already wiped it, restarted steam and redownloaded) From what I gathered through googling is, that I need to change the language in GFWL. Therefore I open the GFWL-overlay and browse through it all, but cannot find anything. Some options are blocked though by the fact, that I am not "connected to LIVE" and to do that I need a key, to connect the game to my LIVE-account.    Now here's the problem: Steam does not provide me with a key, but LIVE won't go on without it. Is there a way to otherwise change the in-game language or do I need that key? If so: How can I get it?  EDIT:  same question, also no solution. From what I am getting all over the web, it seems that this is intentionally impossible. Yay, great.

I have Fallout 3 GOTY on Steam and it's in German. Low-violence version doesn't bother me, but the fact that I can't change the game's language to English.   I want to play the game as it was intended to be and not with the poor German replacements of word jokes, etc. So does anybody know how to change the language to English? This could be through an English language patch or mod, or the English game files.  EDIT: There is no option in Steam to change the language.  EDIT 2: I have already tried all "legitimate" options, the only possible way would be to replace game files or apply a language patch  EDIT 3: Steam provides me only with the german low-violence gamefiles.


I have the following example. I use \lstinline{} command to provide code within latex text. However the font size seems to be small. Please if you know how to to trigger this please let me know.    SETUP:  \documentclass[bsc]{bangorcsthesis} \title{title} \author{name name} \date{\today} \degreeScheme{BSc} \supervisor{Prof. prof prof}  \bibliographySetup[compressed] \addbibresource{references.bib}  \usepackage{soul} \newcommand{\lk}[1]{\textcolor{red}{#1}} \newcommand{\mk}[1]{\textcolor{green}{#1}} \newcommand{\question}[1]{\textcolor{blue}{#1}}   \usepackage{float} \usepackage{listings} \usepackage{color} \definecolor{lightgray}{rgb}{.9,.9,.9} \definecolor{darkgray}{rgb}{.4,.4,.4} \definecolor{purple}{rgb}{0.65, 0.12, 0.82}  \lstdefinelanguage{JavaScript}{   keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},   keywordstyle=\color{blue}\bfseries,   ndkeywords={class, export, boolean, throw, implements, import, this, image, createCapture},   ndkeywordstyle=\color{darkgray}\bfseries,   identifierstyle=\color{black},   sensitive=false,   comment=[l]{//},   morecomment=[s]{/*}{*/},   commentstyle=\color{purple}\ttfamily,   stringstyle=\color{red}\ttfamily,   morestring=[b]',   morestring=[b]" }  \lstset{    language=JavaScript,    backgroundcolor=\color{lightgray},    extendedchars=true,    basicstyle=\footnotesize\ttfamily,    showstringspaces=false,    showspaces=false,    numbers=left,    numberstyle=\footnotesize,    numbersep=9pt,    tabsize=2,    breaklines=true,    showtabs=false,    captionpos=b } \renewcommand\lstlistingname{Code Snippet}  \begin{document}     ...     The layout is displayed as soon as the page loads on the user's screen. There are three main parts of the web-page's content. The first one is the original video feed (left canvas) which would be loaded frame by frame according to \lstinline{function draw()} of Processing5 library. The second part (middle of the figure) is where all the events are represented by image buttons and would be executed when mouse event listeners are called for each button individually. The third and final part, is where the 3-Dimensional environment is set (right canvas), using all the necessary WebGL libraries and self-invoking functions are called, such as \lstinline{function animate()} \& \lstinline{function render()}.     ... \end{document}

I have a java lstlisting and it is too big and does not mach a single page.  Is there any way to specify font for specific listing, not all listings in document?


Running an Ubuntu Trusty 14.04.1 LTS server at Rackspace but recently after running updates for bash, then with the reboots for the xen host vulnerability, I have the following weird issue.  Some random auth.log entries are popping up out of date sync, for example:  Oct 14 12:12:10 myserver sshd[2097]: pam_unix(sshd:session): session closed for user Oct 13 12:58:30 myserver sshd[2522]: Failed password for foo from 21.21.21.21 port 1490 ssh2 Oct 14 12:21:28 myserver sshd[3389]: Accepted password for bar from 22.22.22.22 port 61173 ssh2   I have a seperate cron.log running too, (I changed the configs for rsyslog) but have random out of date sync entries there too, for example:  Oct 14 07:11:01 myserver CRON[32099]: (root) CMD Oct 13 03:16:01 myserver CRON[32226]: (root) CMD Oct 14 07:12:01 myserver CRON[32226]: (root) CMD   EDIT TO ADD:  I've noticed that it looks like some log entries are delayed being added to the *.log by rsyslog. Some entries show the following pattern:  Oct 12 09:19:07 myserver sshd[4792]: pam_unix(sshd:auth): authentication failure; Oct 12 09:19:09 myserver sshd[4792]: Failed password for x Oct 14 12:21:32 myserver su[3484]: pam_unix(su:session): session open Oct 12 09:19:12 myserver sshd[4792]: Failed password for x from 20.20.20.20 port 2158 ssh2   The above example shows the first two entries came in on time, but the last one (12 seconds) was actually delayed by two days!  I have checked the date on the server is correct, restarted SSH processes, restarted rsyslog.  Everything else on server is running fine - Apache, sync, varnish etc etc  Any ideas on what I'm missing here?

Have you ever seen wrong order in /var/log/syslog ? I think that it causes only crontab.  Jun 28 22:20:01 alex CRON[2327]: (root) CMD (something > /dev/null) Jun 28 22:21:01 alex CRON[2700]: (root) CMD (something > /dev/null) Jun 21 03:49:01 alex CRON[2753]: (root) CMD (something > /dev/null) Jun 28 22:23:01 alex CRON[2754]: (root) CMD (something > /dev/null) Jun 27 05:08:01 alex CRON[2813]: (root) CMD (something > /dev/null) Jun 26 00:19:01 alex CRON[2816]: (root) CMD (something > /dev/null) Jun 28 22:25:01 alex CRON[2816]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi) Jun 28 22:25:01 alex CRON[2821]: (root) CMD (something > /dev/null) Jun 28 22:27:01 alex CRON[3225]: (root) CMD (something > /dev/null) Jun 28 22:28:01 alex CRON[3240]: (root) CMD (something > /dev/null) Jun 28 22:30:01 alex CRON[3290]: (root) CMD (something > /dev/null) Jun 26 12:03:01 alex CRON[3291]: message repeated 2 times: [ (root) CMD (something > /dev/null)] Jun 28 22:30:01 alex CRON[3291]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi) Jun 28 22:31:01 alex CRON[3659]: (root) CMD (something > /dev/null) Jun 28 22:32:01 alex CRON[3754]: (root) CMD (something > /dev/null) Jun 16 06:41:01 alex CRON[3846]: (root) CMD (something > /dev/null) Jun 28 22:35:58 alex cron[909]: (CRON) INFO (pidfile fd = 3) Jun 28 22:35:58 alex cron[944]: (CRON) STARTUP (fork ok) Jun 28 22:35:58 alex cron[944]: (CRON) INFO (Running @reboot jobs) Jun 28 22:36:01 alex CRON[1428]: (root) CMD (something > /dev/null) Jun 28 22:37:01 alex CRON[3050]: (root) CMD (something > /dev/null) Jun 28 22:38:01 alex CRON[3082]: (root) CMD (something > /dev/null) Jun 28 22:39:01 alex CRON[3114]: (root) CMD (something > /dev/null)   As you can see, there is bad time order between lines. It is just crontab error, or there is some problem with system clock, or something?  I am running the latest Ubuntu 14.04 kernel:  Linux alex 3.13.0-30-generic #54-Ubuntu SMP Mon Jun 9 22:45:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


Would this proof work?   Let $N$ be a nilpotent in a commutative ring and let $X$ be a unit.   Let $Y$ be an element in the ring.   Proof by contradiction:   Assume  $$Y(X+N) \neq 1$$  Then   $$YX + YN \neq 1 $$  Then  $$YXN^{n-1} \neq N^{n-1} $$  A contradiction since since $Y$ can be the inverse of $X$ and thus the equation can hold above.

I can't tell where I went wrong, am still a beginner.    Let N be a nilpotent in a commutive ring , let X be any element.   I'll will be showing X + N is a unit .   Assume Y(X+N) =1   Then YX(N^n-1) =  N^n-1   Multiplying both side by  X+N   We get X(N^n-1) =  X(N^n-1)  Thus nilpotent summed with any element gives unit.


I've searched past posts and have not seen an answer to this specifically, perhaps because it is assumed to be known so it was not stated in previous related posts.  I have a very simple single variable model with a negatively skewed dependent variable Y.  The residuals from Y = b0 + b1X are non-normal, which, by my understanding will violate regression assumptions and impact my residuals and hence inferences but should not affect the properties of unbiassedness or consistency of my estimate 'b1'.  (correct me where I am wrong)  To make correct inferences it seems the practice is to reflect and log the dependent variable as such Y* = ln(1 + max(Y) -Y) and run the following regression:  Y* = b0 + b1X.  If I am correct so far then my primary question is do we interpret b from the model above the same as a traditional log lin model:  i.e. if ln(Y) = b0 + b1x   Then b1 is interpreted as the b1*100% change in Y due to a 1 unit change in x. or exp(b1) = the change in the 'geometric' mean of Y due to a 1 unit change in x.   If this is correct, does the same interpretation apply in the reflected and transformed case?   Thank you.

I have a question regarding interpretation of regression results based on data where I have some negative values. Since the residuals were positively skewed I needed to log-transform my data, and because of negative values my log transformation looked like $\ln(Y-\min(Y)+1)$. Normally, if we have $\ln$ in both sides of the equation, then our $b$ coefficient means a percentage change of DV for 1 % change of IV. But I have big doubts whether the same is valid for such log-transformed data, where I added a constant to my DV in order to make the minimum value equal to 1. I can't also find any literature on this topic. Does anyone know for sure what would be the correct interpretation in such a situation?


I was following Blender Guru's tutorial on making a cup and I ran into this issue with the mesh. I deleted the interior faces and for some reason it still doesn't look good. I'm not sure what else would be wrong?

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


I'm currently saving for a first home down payment (in USA), but don't want to keep a large pile of money sitting in a low-yield savings account while I'm looking for the right home. I want to find a place to earn some returns but where that money isn't subject to volatility risk and still easy to liquidate when the time comes. I'd also rather not have to dip into existing 401k or IRA accounts in the process (I'm still making contributions to these while I'm saving). I'm unsure when I'll be buying a home, but possible not for another year or two, depending on various factors. I've been looking at online bond sellers like , which promises 5.0% interest (APR) and no-fee withdrawals any time. It seems low-risk, low-hassle, and obviously better than any standard bank savings account. Before I invest, I just want to know:  A) Are these types of bond sellers as secure as they purport to be?  and  B) Are there better options that I'm not considering with similar security and liquidity?

I'm a US resident and I've saved > $100k cash for a home deposit. I expect to finance a home in the next 12 months. Currently the cash is split between Bank savings account and a couple of money market accounts (like FMOXX). Are there higher yield, short term alternatives for this type of saving? Note I'm not after specific product recommendations, but general investment strategies for this type of situation.


I have a Schengen visa that has a 90 days validity and will be expiring by the 25th of February, 2015. I got an Internship and thought I could renew or extend my visa from here (Geneva) but was told that I have to go back to my country (Nigeria) for a new visa. The visa procedure takes a month and there is a conference that I would like to attend by March which means if I should go back end of this month, I may not make it to the conference due to the long application period. Is there any way possible for me to have the extension here until March?

My daughter applied at the Italian Consulate in Philadelphia, and they gave her two entries for 20 days (we thought it was for 20 days each entry). She was in Italy 12 days, then went to England for 1 week and flew to Venice to take a 10-day cruise. She couldn't make it because they said she has only 8 remaining days, but she still has a land tour already paid this week.  What can she do? Can she extend the Schengen visa for 12 more days? Right now, she is in Madrid, but next week she has to fly from Barcelona to Paris to start with the tour. What would happen if she decides to take the tour with the expired visa? She is a US permanent resident.


If $Y$ is $\text{Poisson}(λ)$ distributed, how do we obtain this confidence interval for $λ$:  $\:l=\frac14 [(\sqrt{Y}+\sqrt{Y+1}-z_{α/2} )^2-1]$    $u=\frac14 [(\sqrt{Y}+\sqrt{Y+1}+z_{α/2} )^2-1]$

If $Y$ is Poisson$(\lambda)$ distributed, how do we obtain this confidence interval for $\lambda$:  $$ \left (\frac{(\sqrt Y+\sqrt{Y + 1}-z_{(α⁄2)} )^2 - 1}{4},\  \frac{(\sqrt Y+\sqrt{Y  +1}+z_{(α⁄2)} )^2 - 1}{4} \right ) $$


Is “to” in the following examples a preposition, or does it act as part of the verb (to obtain, to sign, to complete)? Many thanks!  ▻ I finally managed to obtain a copy of the report. ▻ Both governments have agreed to sign the treaty. ▻ You're allowed half an hour to complete the test.

If you're interested in grammar, as I am, I am sure you have delved into a thought process about infinitive to, and like me, you have probably questioned what it is, or what it could be defined as. My mind always wants to place it in the Eight Parts of Speech, and I know this is foolish of me to some regard, so I stray from it, but I still wish to designate it under something that can be explain it. So, this is the motivation for this post, this question: What is the infinitive to, and why?  Here are my thoughts: There are three real possibilities, going back through the times. First, we can say that it is part of the verb that comes after it (to go, to run, etc.). This could be supported by the claim that you are not supposed to "split" infinitives ("To boldly go"), but only that.   Secondly, we could consider it a subordinator. I came across this designation most recently in my studies of modern and transformational grammar. As of right now, it is still the one I accept, especially as a result of the trend of designating more phrases as clauses. It works, except it's weird. Do we call this a unique subordinator as a result of how it operates? For example, to-infinitive clauses call for non-finite verb forms, which typically have an implied subject as a part of their clause. For example, "I want to go to the store." In the infinitive clause, "I" is the implied subject, as a understand. So, again, this works. However, things get a little weird when other subordinators come into play. For example, "I'm excited for you to win the competition." Now, if I'm right, those of you will say that "for" is a preposition here, as a result of the new-grammar stuff, but I'm going to count it as a subordinator, as defined by my own beliefs and that of a lot of other grammars. So, how do the clauses work in such a sentence? According to transformational grammar, "for you to win the competition" is defined as an ordinary clause. So, does that mean that it also contains a secondary clause within itself (the infinitive clause part)? If so, how do those two clauses work in conjunction to each other when one is so integrated? "For you to win the competition" looks to just be one clause, but if that's the case, doesn't "to" have to represent something else?  This moves us on to the third way to look at things, which is to consider "to" as auxiliary verb, a defective one at that. There are a lot of things to support this, and it even allows for the split infinitive. Furthermore, it calls for a non-finite verb form to follow, like an auxiliary. But, as I said before, it's defective in the way that is all it can function as.  As I said, I still accept to as a subordinator, but I want to be proven wrong or right. Wrong by showing evidence of it being something else, or right by showing how clauses operate when it seems to be layered up.


rida@rPC:/var/www/html$ wget https://github.com/joomla/joomla-cms/releases/download/3.4.3/Joomla_3.4.3-Stable-Full_Package.zip   Output is :   Joomla_3.4.3-Stable-Full_Package.zip: Permission denied  Cannot write to ‘Joomla_3.4.3-Stable-Full_Package.zip’ (Success).

I installed the  on my Ubuntu 11.04 (Natty Narwhal) with   sudo apt-get install lamp-server^   Now I navigate to /var/www and use   wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz   I get the following error.   --2011-08-03 13:59:00--   http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz Resolving  ftp.drupal.org... 64.50.233.100, 64.50.236.52 Connecting to  ftp.drupal.org|64.50.233.100|:80... connected. HTTP request sent,  awaiting response... 200 OK Length: 2757101 (2.6M)  [application/x-gzip] drupal-7.x-dev.tar.gz: Permission denied   Cannot write to `drupal-7.x-dev.tar.gz' (Permission denied).   How do I resolve this error?  I tried to download the same file in the downloads folder, and it went on without an issue. So it seems to be some permission error, but I'm not sure about that or how to solve it.


How to evaluate $$\lim_{x \to \infty} \dfrac {\bigg(\displaystyle\int_{0}^x e^{t^2} dt \bigg)^2} {\displaystyle\int_{0}^x e^{2t^2} dt} =\ ?$$ Can we apply  L'Hospital's rule?

I've tried to apply L'hopitals rule on this one, as this get's $\frac{\infty}{\infty}$  $$\lim_{x \rightarrow +\infty} \frac{[\int^x_0 e^{y^2}\mathrm{d}y]^2}{\int^x_0 e^{2y^2}\mathrm{d}y}$$  $\frac{\mathrm{d} }{\mathrm{d} x}[\int^x_0 e^{y^2}\mathrm{d}y]^2 = 2[\int^x_0 e^{y^2}\mathrm{d}y] * [\frac{\mathrm{d} }{\mathrm{d} x}\int^x_0 e^{y^2}\mathrm{d}y]=2(e^{x^2}-1)(e^{x^2})$ and $\frac{\mathrm{d} }{\mathrm{d} x}[\int^x_0 e^{2y^2}\mathrm{d}y]=e^{2x^2}$ so $\lim_{x \rightarrow +\infty} \frac{[\int^x_0 e^{y^2}\mathrm{d}y]^2}{\int^x_0 e^{2y^2}\mathrm{d}y} = \lim_{x \rightarrow +\infty} \frac{2(e^{x^2}-1)(e^{x^2})}{e^{2x^2}} = 2\lim_{x \rightarrow +\infty} \frac{(e^{x^2}-1)}{e^{x^2}}=2\lim_{x \rightarrow +\infty} (1-\frac{1}{e^{x^2}})=2$  But the answer is $0$, so I think I've done a mistake somewhere I can't figure out where.


I am interested to learn a concise and complete theoretical overview of the currently accepted Standard Model of particle physics. Standard Model books that I have encountered so far (like Bjorken and Drell if I recall correctly?) contain a lot of historical (and maybe outdated) stuff, like parton models, some weird form factors etc. So I wonder if there exists a modern exposition of just the currently up to date theory (with references to relevant experiments, but no attempt to delve deeper into them within the book itself)?

I know classical physics, quantum mechanics, special relativity, and basic nuclear physics. I would like to get into some particle physics.   Where can I find a good introduction? It might be useful to segment books by whether they require quantum field theory or not.


I have troubles trying to nest  verbatim environment inside my \newenvironment definition one so I can include my source code faced to its result as on the most latex books printed. I can do it in a mechanical way:   \begin{minipage}[b]{5in} \fbox{\begin{minipage}[t]{2.5in} \makebox[0mm]{gorilla gorilla}\\ \framebox[2mm][l]{gorilla gorilla}\\ \framebox[2mm][r]{gorilla gorilla}\\ \end{minipage}}\hfill \begin{minipage}[t]{2.5in} \begin{verbatim} \makebox[0mm]{gorilla gorilla}\\ \framebox[2mm][l]{gorilla gorilla}\\ \framebox[2mm][r]{gorilla gorilla}\\ \end{verbatim} \end{minipage}\mbox{} \end{minipage}     But I'm not able do it in an automatic way by means my \newenvironment:  \newenvironment{exe}[1]{\begin{minipage}{5in} \begin{minipage}{2.5in} #1 \end{minipage}\hfill  \begin{minipage}{2.5in}\begin{verbatim}#1\end{verbatim}\end{minipage}} {\end{minipage}}  \newcommand{\bex}{\begin{exe}} \newcommand{\eex}{\end{exe}}  %Inside the body: \bex{\framebox[2mm]{gorilla gorilla}\\ \framebox[2mm][l]{gorilla gorilla}\\ \framebox[2mm][r]{gorilla gorilla}\\ }\eex   The macro works if I remove \verbatim environment from the definition... I'm desperate. Anyone can help me? Thanks in advanced Best Regards!  P.S.: For any extrange reason squared brackets are missed on the \newenvironment definition.

When documenting a style file, it would be nice to be able to easily put side by side different examples of code, side-by-side with the output they produce.  What recommendations to people have to do this efficiently, and æsthetically?


I used Karabiner to map f2 to return_or_enter, so that F2 can rename files in the Finder. The configuration is "for all devices", not specific keyboards and is taken directly from Karabiner on-line configuration options "Use F2 as Rename."   This works on my external  keyboards (Apple and Microsoft), but not in the touch bar.   Apparently touch bar F2 is not being detected as such--even though Karabiner EventViewer shows its events as code 59, f2, just like the external keyboard.  Touch bar configuration is shown below.  How can I configure this correctly in Karabiner?

I've configured my touch bar to always show function keys in one program where I use those frequently (IntelliJ IDEA, code editor). Many hotkeys in IDEA are triggered using a function key together with shift, alt or control, e.g. for renaming a variable, I use Shift+F6.  With the emulated function keys, this does not work, the program acts as if I had just hit F6 without holding down the alt key.  It was no problem with the hardware function keys on my old MacBook.  Is this a known bug, or a limitation one has to live with? Or is there some way to work around it? Perhaps I'm just to stupid and missing something obvious?  This is a major pain for me as a software developer…


After upgrading to ubuntu 16.04 when I boot into ubuntu I can see a black screen asking for a username and password,when I entered all these details it shows welcome to ubuntu 16.04 and all those. But still I am not able to see the desktop. It still in the position of accept commands from me as in the terminal we used to get

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I want to select data from following tables for a Jasper report.  AA_COLUMN_NAMES     AA_PAYMENT_DETAILS   DDL + DML    CREATE TABLE SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES(     id int PRIMARY KEY NOT NULL,     name varchar(500) NOT NULL,     active bit ); INSERT INTO SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES (id, name, active) VALUES (1, 'col_1', 1); INSERT INTO SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES (id, name, active) VALUES (2, 'col_2', 1); INSERT INTO SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES (id, name, active) VALUES (3, 'col_3', 1); INSERT INTO SLPAYROLL_LIVE.dbo.AA_COLUMN_NAMES (id, name, active) VALUES (4, 'col_4', 0); CREATE TABLE SLPAYROLL_LIVE.dbo.AA_PAYMENT_DETAILS(     id int PRIMARY KEY NOT NULL,     username varchar(500),     col_1 varchar(500),     col_2 varchar(500),     col_3 varchar(500),     col_4 varchar(500) ); INSERT INTO SLPAYROLL_LIVE.dbo.AA_PAYMENT_DETAILS (id, username, col_1, col_2, col_3, col_4) VALUES (1, 'chathura', '500', '200', '300', '0'); INSERT INTO SLPAYROLL_LIVE.dbo.AA_PAYMENT_DETAILS (id, username, col_1, col_2, col_3, col_4) VALUES (2, 'gihan', '300', '100', '100', '0');   I want to select only active columns from AA_PAYMENT_DETAILS. The active column names can be get from the AA_COLUMN_NAMES table.  I have googled my question and found the following solution.    Since I want to use that query in a Jasper Report, above solution does not worked. Does anyone know a solution?

Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in?


So, I heard that all speed is relative. And that nothing can travel faster than light. Then I guess it is OK for a spaceship to leave Earth at 0.6c constant speed. And what if an other spaceship were to leave Earth at 0.6c in the opposite spacial direction. Then the relative speed between the two ships would be 1.2c, which is greater than c. How would that work out? Maybe something with time dilation?

Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)


I am wondering if it it as the title suggests, it is bad form to suggest edits that remove the main tag from the title of a question. I am banned from suggesting edits, which is fine, but the accept/reject seems to have been applied somewhat inconsistently. I thought I was doing some useful curation, but it would be good to know if this is not the cas to avoid future bans. Recent examples:  Rejected           Approved           And  rejection by the community bot I don't understand at all.  So what is the accepted etiquette? Is it ok to remove tags in titles so long as you make some other edits to the content too? I guess the problem is that some post don't require any other editing. In my examples you can see the reject/accept has been quite inconsistently applied. I'd like to know to better avoid future bans, and to make sure I am making useful contributions to the site.    Thanks.

I've seen questions edited to remove the language name from the title. Won't search engines - and folks using search engines - have an easier time finding them if these "tags" are kept as part of the title?


In this case I am not able to escape the quotes I think.   I am trying this from last one day  var obj = deals[i];  var1 = "my var" var url =  "index.html?name="+obj['a']+"&user="+var1+"+obj['a'];  var div = document.createElement('div'); div.innerHTML = '
' + '
' + '

' +  obj['a'] + '
' +  '
' +  '
' +  '
' +obj['b']+'

' + '

'+'

 '+'
';    document.getElementById('deals').appendChild(div)   How do I add the url as onclick href url to the newly created div?  OK I am rewriting this question again to convey where I am stuck exactly  var obj = deals[i];  var1 = "my var"  var url =  "index.html?name="+obj['a']+"&user="+var1+"+obj['a'];     var div = document.createElement('div'); div.innerHTML = '
' + '
' + '

' +        obj['a'] + '
' + '
' + '
' + '
'       +obj['b']+'

' + '

'+'

 '+'
';  document.getElementById('deals').appendChild(div)   I have added      onclick="location.href='+url+'     to the external div but its not working?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I'm curious as to what the distinction for 'not a real question' on Stack Overflow is. It seems like if it's about 'what are the pros and cons of something' or 'could you suggest a resource', it gets flagged as not a real question.  What the criteria for a 'real question' is and where these types of questions should be asked? Maybe this one will be closed as not being a real question?

Note:   This close reason is old and only applies to old questions that were closed prior to the closing overhaul. This has been replaced by the reasons "unclear what you're asking" for unclear questions and "too broad" for overly broad questions. Older questions that have been closed as "not a real question" will remain closed under this reason, so this question is left here for reference.   Questions used to be closed as "not a real question."     What makes a question a "real" question? What are new users expected to know about asking "real" questions? Why does SE treat questions differently from other online forums?


I've been trying to make a Minecraft shop but I only want myself accessing it, I've tried multiple variations of:  /testfor (nameofplayer) {score_ka1:1}   (ka1 is just another objective for amount of kills a player has)  Also, I don't want to replace (nameofplayer) with something like @p because it wouldn't work.

I am trying to make a command block that when powered, it will looks for a specific player in a 5 block radius of the command block. I tried   /testfor @p[r=5][name=<name of player>]   but it doesn't work.


When the language bar is in English mode, it types English characters as normal.  But when I switch to Chinese mode, it continues to type English characters, and does not let me use Chinese characters.  Is there a way to fix this?

To test 'text boxes' in an application of mine, I need the physical keyboard to output Japanese to the screen. Does anyone know how this can be done?  The application is in a Virtual Machine (VMPlayer) running Windows Server 2008 R2. VMPlayer is on a Windows 7 64 bit machine to which the keyboard is connected too.  I've already tried the set the following 'Keyboard and Languages' option in Control Panel of the Windows 7 machine but the keyboard still outputs English on screen of the Windows 7 screen. So getting this to work on the VM is still far away.


I need to highlight some parts of code containing both text and numbers using the siunitxpackage but I get an invalid-token-in-number, the token being a number!  Here's my mwe:  \documentclass{article}  \usepackage{soul} % Enables highlighting \usepackage{siunitx}  \begin{document}      %% Error:      %% siunitx error: "invalid-token-in-number" and "Invalid token '6' in numerical input."         \hl{         Dummy text to avoid SI as very first argument of hl         \SI{666}{\nm}         Dummy text just in case}   \end{document}   Thanks for your help.

Since I wanted a better readability of highlights of a would be black & white-printed document, I needed to change both the highlighting color (gray) AND the font color (white).  Depending which command you implement inside the other will compile or not: \hl{\textcolor{white}{Fail}} does not work, compiling returns Package xcolor Error: Undefined color '{white}'.  Here's the mwe:  \documentclass{article} \usepackage{xcolor} \usepackage{color} \usepackage{soul} % Enables highlighting \sethlcolor{gray}  \begin{document}      \textcolor{white}{\hl{Success}}     %% Error:     %% Package xcolor Error: Undefined color `{white}'.     \hl{\textcolor{white}{Fail}}  \end{document}   So, in the end, the problem is sorta solved but I thought you might have an answer as to what happens.


We all know that speed of light is $3\times 10^8$ $\text{ }\mathrm{ms^{-1}}$. The speed of electron inside the atom is $2.7\times 10^8$ $\text{ }\mathrm{ms^{-1}}$, which is close to speed of light. So there is a machine that can accelerate the particle. Then when the particle move very fast, the resultant velocity of electron inside the particle should exceed the speed of light right?


I'm running man in non interactive mode from bash and I'm displaying the result on the webpage. I have number of character per line calculated on a page, how can I inform the man command about number of characters per line?

I'm on FreeBSD, using a wide xterm with, say, 132 characters per line. When running  $ man man   the manual page is formatted to fit an 80 character per line terminal width. Is there a way to make the formatter (groff, grotty) use a line width I specify?  I read the manuals for man(1) and groff(1) but could not find an appropriate option. I know it can be done, since I have seen it work on some Linux distro.


My update manager on 12.04 will not find the upgrade to 13.04. I would like to know why I can't see it.

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I have registered a .buzz domain and after a week my registrar, blocked my account and changed the who-is info and name servers.   When I got in touch with them, they told me that because they cannot work with my country, I live in Iran for clarification, they have blocked me out and I should wait until the registration period ends like a full year, if I want to register it with other registrars, and they will not either let me to transfer my domain!!!  As I have found out they have parked my domain and are showing they own ads and there is also a button for getting more information about how to buy it!!!  What should I do now to get back my domain from them?! I should have some rights on that domain anew because I have registered it for the first time, and its not seems logical that they can hold my domain name just because they don't want to work with me. Please help me. I should also say that they have refunded my money but the problem is that I need my domain name not my money.

I have registered a .buzz domain and after a week my registrar, GoDaddy, blocked my account and changed the who-is info and name servers.   When I got in touch with them, they told me that because they cannot work with my country, I live in Iran for clarification, they have blocked me out and I should wait until the registration period ends like a full year, if I want to register it with other registrars, and they will not either let me to transfer my domain!!!  As I have found out they have parked my domain and are showing they own ads and there is also a button for getting more information about how to buy it!!!  What should I do now to get back my domain from those thieves?! Please help me. I should also say that they have refunded my money but the problem is that I need my domain name not my money.


I am working on an application written solely in Java which will often be using very large amount of data (at most 500 GB). The program will be saving data not currently in use in a database.   However, I want to keep as much data as possible within the application since a lot of it is reused often. In order to not get any out-of-memory errors I want to be able to check how much memory the application as a whole is using at any one moment, so that I can store it when the application approaches a predefined limit.  Something like this;  long memoryUsage = SomeClass.getCurrentMemoryUsage();

I need to check CPU and memory usage for the server in java, anyone know how it could be done?


Thanks! A very simple but great way to estimate mean curvatures@NathanReed answer. For my case, I also need an estimate of triangular mesh curvature, and I support this is what i was looking for. However, could you please show me (or any recommended literature) how is the following equation derived?  $$\frac{(n_1 - n_0).(p_1 - p_0)}{||p_1 - p_0||^2}$$

I have a mesh and in the region around each triangle, I want to compute an estimate of the principal curvature directions. I have never done this sort of thing before and  does not help a lot. Can you describe or point me to a simple algorithm that can help me compute this estimate?  Assume that I know positions and normals of all vertices.


I have a large dataset of global .nc files and I am trying to clip them to a smaller area. I have this area stored as a .shp file. I have tried using GDAL from QGIS but needs to do this by converting each variable and I must select each variable and same shape for all files one by one and with 400 files going trough each variable seems not the best idea. Also this returns .tiff files separated and not the .nc file that I am aiming for. I had this little script but its not doing what I need: import glob import subprocess import os      Shapefile = 'NHAF-250m.shp'  # Create output directory OutDir = './Clipped_Rasters/' if not os.path.exists(OutDir):     os.makedirs(OutDir)  for Image in ImageList:     print('Processing ' + Image)      OutImage = OutDir + Image.replace('.nc', '_BurnedArea_Clipped.tif') # Defines Output Image      # Clip image     subprocess.call('gdalwarp -q -cutline /Users/path/to/file/NHAF-250-vector/ -tr 0.25 0.25 -of GTiff NETCDF:'+Image+":burned_area "+OutImage, shell=True)       print('Done.' + '\n')  print('All images processed.')  I have also tried with import geopandas  import xarray import rasterio import glob  shapefile = 'NHAF-250m.shp'  def shapefile_mask(shapefile) -> np.array:            import pyproj          with fiona.open(shapefile, 'r') as src:             collection = list(src)             geometries = []             for feature in collection:                 geom = shape(feature['geometry'])                 geometries.append(geom)             mask = geometry_mask(                 geometries,                 out_shape=(1440, 720),                 transform=(1.0, 0.0, 0.0, 0.0, 1.0, 0.0),                 all_touched=True,                 invert=True)             shape_mask = xarray.DataArray(mask , dims=("lon", "lat"))             return shape_mask           ImageList = sorted(glob.glob('*.nc'))     print('number of images to process: ', len(ImageList))  shape_mask = shapefile_mask(shapefile)  file_list = sorted(glob.glob('*.nc'))  for file in file_list:     nc_file = xarray.open_dataset(file)     # Then apply the mask     masked_netcdf_file = nc_file.where(shape_mask == True, drop=True)     # store again as netcdf or do what every you want with the masked array     masked_netcdf_file.to_netcdf(OutImage)  But it is returning NaN or 0 for all values in all bands.

I have a 3-D time-series precipitation data (187 x 1800 x 3600), stored in a NetCDF file. I need to obtain the precipitation data for a shapefile. import matplotlib.pyplot as plt from netCDF4 import Dataset, num2date,  from matplotlib.pyplot import figure from datetime import datetime, date, timedelta import numpy as np import xarray as xr import pandas as pd import geopandas as gpd       MSWEP_monthly = 'D:\G3P\DATA\Models\MSWEP\MSWEP_monthly.nc4'  MSWEP_monthly = Dataset(MSWEP_monthly, 'r') Pre_MSWEP = MSWEP_monthly.variables['precipitation'][:]   MSWEP_monthly2 = xr.open_dataarray('D:\G3P\DATA\Models\MSWEP\MSWEP_monthly.nc4')  Lon_MSWEP = MSWEP_monthly2.lon Lat_MSWEP = MSWEP_monthly2.lat  Africa_Shape = gpd.read_file('D:\G3P\DATA\Shapefile\Africa_SHP\Africa.shp')    from osgeo import gdal,osr,ogr  def makeMask(lon,lat,res):     source_ds = ogr.Open(shapefile)     source_layer = source_ds.GetLayer()       # Create high res raster in memory     mem_ds = gdal.GetDriverByName('MEM').Create('', lon.size, lat.size, gdal.GDT_Byte)     mem_ds.SetGeoTransform((lon.min(), res, 0, lat.max(), 0, -res))     band = mem_ds.GetRasterBand(1)       # Rasterize shapefile to grid     gdal.RasterizeLayer(mem_ds, [1], source_layer, burn_values=[1])       # Get rasterized shapefile as numpy array     array = band.ReadAsArray()        mem_ds = None     band = None     return array  shapefile = 'D:\G3P\DATA\Shapefile\Africa_SHP\Africa.shp' source_ds = ogr.Open(shapefile)  # calculate the cellsize cellsize = Lon_MSWEP[:][1] - Lon_MSWEP[:][0]   # create the mask mask = makeMask(Lon_MSWEP,Lat_MSWEP,cellsize)  Now if I implement the following code, the precipitation data for the first day (from the time-series) can be obtained with shape of 1800x3600: precip = np.ma.masked_where(mask==0,Pre_MSWEP[0,:,:])  I tried to use a for loop to mask the precipitation data for the entire time series (time, lon, lat) over the area of interest. however, the below code gives me a 2-D data, probably for the last day. Why is that? for i in range(len(Pre_MSWEP)):     precip = np.ma.masked_where(mask==0,Pre_MSWEP[i,:,:])


I have a social app, where users can post to the school they chose on registration. Each post can have a hashtag and a school (all pointers, (hashtag is optional, school is not)).  Users see posts based on school or hashtag. Now we want to introduce a new feature, Polls. Polls are another type of post... Users will be seeing them in their feed among other posts! Besides other properties, they too have a hashtag and a school.  Right now when a user asks for posts, I'm just making a query to the Post collection, comparing only the school or hashtag field (depending on the screen they're at). So if they're on the Home screen, I'm going to have something like:     find all documents in Post, where school equals <some_value>   And if they are on the Hashtag screen, we have something like:     find all documents in Post, where hashtag equals <some_value>   Since we are going to have the new Poll collection, I'm wondering what implementation would be best... Here's what I have so far:  1st implementation  We keep the posts query as is and we add another one, pretty much the same, for the polls and we combine the results. Have in mind here, that our app fetches data with pagination, so we bring the posts 20-by-20. I'm saying this because in case we have a page and the responses of the 2 queries bring 20 documents each, we'll have to compare dates to know what the response should be... eg 16 posts and 4 polls.  2nd (and last) implementation  We create a new collection, Feed, which would combine both collections and it would look like this:  Feed  post: <Pointer to Post> poll: <Pointer to Poll> creator: <Pointer to User> // we need this for block checking or if you open your profile school: <Pointer to School> hashtag: <Pointer to Hashtag>   Every time a post or poll will be created, their triggers will create a Feed document, with all the necessary values.  I believe the second solution is the best, as it is much cleaner than the first. I also think they're pretty much the same complexity-wise.  Any ideas on which one is better? If you have any other implementation to suggest, please do so!  NOTE: All collections are indexed.


\documentclass[a4paper, 12pt]{article}  \usepackage{amsmath,latexsym, amssymb} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage{times}  \begin{document}  On différentie l'égalité: $f(a,b) = f(x,y) = f(x, \phi (x))$ par rapport à $x$:  \begin{align}     df_{(x, \phi x)} & \circ \begin{bmatrix}            \text{Id}_X \\            d\phi_x          \end{bmatrix} = 0  \Leftrightarrow \big( df_{(x,\phi(x))|X},df_{(x,\phi(x))|Y} \big) \circ \begin{bmatrix}                \text{Id}_X \\                d\phi_x              \end{bmatrix} = 0      \end{align}  \end{document}   I got this output:    Why is there "(1)" at the end of the line even though it didn't appear in the code? How to get rid of it?

After some brief searching I can't find the difference between align and align*. Google summarily ignoring the * is making it harder I think.  Can you tell me the difference between these two?  Moreover, can you tell me where you generally go for this type of information? As a relatively new user I'm still building up my resources.


Suppose $(G,\cdot)$ is a group and $H$ is a subgroup of $G$, with $|H|=|G|/2$. Is $H$ a normal subgroup of $G$? It's a theorem that's asserted without proof in a book for my Abstract Algebra class, so it's probably true, I'm just having trouble convincing myself. Lagrange's theorem tells us that there are two unique (left) cosets of $H$, and that they form a partition for $G$. The same can be said for the right cosets, so we essentially have two partitions for $G$, that each split the number of elements evenly between the two cosets. In order for $H$ to be normal we need the left and right cosets to be equal, but: (1) I fail to see how $xH \cup yH$ and $Hx \cup Hy$, with $x,y\in G$, must necessarily be the partitions of $G$. Why not $xH \cup yH$ and $Hw \cup Hz$, for $w,z\in G$? (2) Even if $xH \cup yH$ and $Hx \cup Hy$ are the two partitions, what is preventing $xH=Hy$ and $yH=Hx$, for $x\neq y$?

Please excuse the selfishness of the following question:     Let $G$ be a group and $H \le G$ such that $|G:H|=2$. Show that $H$ is normal.   Proof:  Because $|G:H|=2$, $G = H \cup aH$ for some $a \in G \setminus H$.   Let $x\in G$. Then $x \in H$ or $x \in aH$.  Suppose $x \in H$. Then $xhx^{-1} \in H$ because $H$ is a group.  Suppose $x \in aH$. Then $ahH(ah)^{-1} = ahHh^{-1}a^{-1} = a(hHh^{-1})a^{-1}$ ***1  ***1: Can I say now that $x \in H$, based on the that $hHh^{-1} \in H$ and that $aa^{-1} = e$ ?  Thank you for the time you spent reading my doubts.


How is it possible for file paths exceeding 256 characters to be created in the first place if 256 characters is the maximum length Windows can recognize?  We are running SBS 2003 and I am currently dealing with problems caused by users creating subfolders on network shares with very long descriptive names. As these names get longer over time and subsfolders are created inside them, we eventually end up with folders at the bottom of the folder hierarchy with paths exceeding the 256 character limit (some paths are now over 320 characters in total).  My question: if a file path exceeding 256 characters is too long, then how is it possible for users to create these excessively long paths in the first place without getting an error from Windows?  (Workstation OS version = Windows 7; server OS = SBS 2003)  Hopefully, once I understand how this is possible, I will be able to deal with the problem of these long paths being created more effectively in future.

What is the longest file path that Windows can handle?


I would like to estimate the standard deviation of a population. The data I have is the size and mean of each of $k$ independent uniform subsamples: $(n_1, \mu_1), (n_2, \mu_2), \ldots, (n_k, \mu_k)$. Here, the $i$'th subsample has $n_i$ elements, and those $n_i$ elements have a mean of $\mu_i$.  What is the best way to utilize all $2k$ values to produce the best estimate of the population standard deviation $\sigma$?

I have a set of measurements which is partitioned into M partitions. However, I only have the partition sizes $N_i$ and the means $\bar{x}_i$ from each partition. Because all measurements are assumed to be from the same distribution, I believe I can estimate the mean of the population, $\bar{y}$, and standard deviation of the mean, $\sigma_{mean}$: $$ N=\sum_{i=1}^M N_i $$ $$ \bar{y} = \frac{1}{N}\sum_{i=1}^MN_i\bar{x}_i $$  $$ \sigma_{mean}=\sqrt{\frac{1}{N}\sum_i N_i(\bar{x}_i-\bar{y})^2} $$  My questions:   Am I right in my assumptions, that the mean $\bar{y}$ can be computed as above?  How can I find the standard deviation for the population, given only the means?  I read that the standard deviation of the population and standard deviation of the mean is related with $$ \sigma_{mean}=\frac{\sigma}{\sqrt{n}} \mbox{[1]} $$ where $n$ is the number of samples used in the computation of $\bar{x}_i$. So is it actually as simple as just multiplying $\sigma_{mean}$ with $\sqrt{n}$ if $n$ for all means are the same?   If it's that simple, what do I do if each $\bar{x}_i$ is computed using a different number of samples?    [1]


I want to add a content to content type (ct1) which has only one field (f1) which is a reference to a paragraph (p1), said paragraph has 4 fields: 3 numeric fields (1, 2, 3) and entity reference (er1) to taxonomy vocabulary, also i am supposed to check if term exists and if term exists then add content, otherwise throw a message and do not add content at all.  I'm Drupal 8 beginner and have no idea where to start with this task. Content creation for non-referenced content types is something I already can do but I do not know how to approach this particular situation. Please link me some guides or post example code.  I do not want to pre-fill paragraphs, it is more like "after-fill" when node is already created and i want to add paragraphs to it. Currently my code looks like this, this is more like pseudo-code, draft:  if (is_file($file) && is_readable($file) && in_array($_FILES['file']['type'], $mimes)) {             $handle = fopen($file, 'r');              $node = Node::create(array(                         'type' => 'your_content_type',                         'title' => date('l jS \of F Y h:i:s A'),                         'langcode' => 'en',                         'uid' => '1',                         'status' => 1,                         'field_fields' => array(),             ));               while (($data = fgetcsv($handle, 1000, $delimiter)) !== FALSE) {  $termExists = taxonomy_term_load_multiple_by_name($field_taxonomy, 'taxonomy');                 if (isset($termExists)) {                     $new_csvLine = Paragraph::create($csvLine);                     $new_csvLine->save();                     $node->paragraph_field_referenced->appendItem($new_csvLine);                 } else {                     return print("Taxonomy term $field_taxonomy doesn't exist, import halted.");                 }             }             $node->save();   I'm working on csv import module and this is the only thing which left to me to complete. Loaded data I need to add as new node of ct1 and each line from csv needs to be a separate paragraph with 4 fields: 1, 2, 3 and er1. Now I need to somehow store this data in these fields. And yes, I need to do this all programmatically, in code. In other words: one csv import is a new node of ct1, every line of csv is new paragraph p1 and every paragraph has to store data from imported line from csv which is 4 fields.  How should I modify saving paragraphs part to make it work the way I described?   One more time about structure of all this:  content type ct1 -> field: f1, type: Entity reference revisions -> paragraph p1 -> fields: numeric 1, 2, 3; er1 type "Entity reference" (reference to taxonomy).

I want to prefill multiple paragraphs when user click on "add node" for specific content type. What would be a good way to do this ?


I have a 250GB SSD hard drive on my Mac. Last time I checked the remaining space was about a week ago when I removed Bootcamp and free'd up an extra 50GB of space. This left me with around 150GB space remaining. I've just checked today and only have 60GB free! I've also instealled 'Clean my Mac' and checked for junk files, but it only found 9GB worth. The only real folders I can think of that take up room are my Dropbox folder (which contains all of my files, at least all those that I'm aware of) and my Applications folder. Both of those folders combined only take up 50GB amount of space according to Finder. I read that the 'Library/Caches' folder can take up a lot of space there, but only found 10GB (possibly what was found my CleanMyMac) I've also emptied my trash. Also I read on another forum about running the following command in Terminal: ~ % sudo rm -r /System/Library/Caches  But I just get the following error:  rm: /System/Library/Caches: Read-only file system  I can't even think of where else to look for what could be taking up all this room?

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


I have project in PHP5 and when trying to install PHP 5 in Ubuntu 18.04 using following command  sudo add-apt-repository -y ppa:ondrej/php5-5.6 Cannot add PPA: 'ppa:~ondrej/ubuntu/php5-5.6'. ERROR: '~ondrej' user or team does not exist.   I tried to install php5 following various content but not succeed Please give me any solution or suggestion is appreciated. Thank you

I've done the following:  sudo add-apt-repository ppa:ondrej/php5-5.6 sudo apt-get update sudo apt-get upgrade sudo apt-get install php5 sudo apt-get install libapache2-mod-php5.6 sudo add-apt-repository ppa:ondrej/apache2   When I try to disable the old version of php5 with:  sudo phpdismod php5   I get the error: WARNING: Module php5 ini file doesn't exist under /etc/php/5.6/mods-available  Even if I move the ini file under this directory it gives me the same error.  I don't know what I'm missing??  In general, can someone explain to me how to get my instance to use the newly installed version, as I still seem to have both php directory trees on my instance.  php5/.. and php/5.6


Let $p$ be an odd prime with primitive root $r$. Let $\mathbb{a}$ be an integer with $gcd(\mathbb{a},p) =1$ and $ind_{r} (\mathbb{a})$ denote the index of $\mathbb{a}$ relative to $r$. Show that $\mathbb{a}$ is a quadratic residue modulo $p$ iff $ind_{r} (\mathbb{a})$ is even.  Could anyone give me a hint for solving this, please?  For the index of an integer w.r.t quadratic residue, Please follow the .

I have a problem in solving my number theory homework. My question is as follows:  Let $p$ be an odd prime. Prove that $a$ is a quadratic residue mod $p$ if and only if the $I_{g}(x)$ (index with respect to any primitive root of $p$) is even.  Please edit my writing. Thanks. Does anyone know where to start? Thank you very much for everything!


In other words, the correct answer to the question is actually NOT the simple answer that first comes to mind.   I remember coming across the word a few years back but have forgotten it since. If memory serves, the word begins with "in-". But I could very well be wrong.   Would be grateful to have your suggestions. Thanks! :)

Is there a phrase or word for a problem that appears simple but is in fact full of complexities?  A few situations come to mind:   Painting a room Breaking up with a boyfriend or girlfriend Eating a pomegranate   ... and a million more. What to call these?


I have tried to cover below class but unable to cover even single % . Unable to figure out where/what I missed, Please anyone help me Apex class: public with sharing class customSearchController {     public static list<ICIX_V1__ICIX_Product__c> getContactList(string searchKey,string productType) {         string sTempSearchKey = '%' + searchKey + '%';         //string sTempSearchKey = '%' + searchKey;         // create Product list to store search result          list<ICIX_V1__ICIX_Product__c> lstProduct = new list<ICIX_V1__ICIX_Product__c>();         // query Product records         for(ICIX_V1__ICIX_Product__c oCon : [Select id,Name,Product_Number__c,ProductType__c,Parent_Name__c From ICIX_V1__ICIX_Product__c WHERE  Product_Number__c LIKE : sTempSearchKey and ProductType__c=:productType limit 10]){             lstProduct.add(oCon);         }         return lstProduct;     } }  Test class: @isTest public class customSearchController_Test {          static testMethod void getContactListMethod() {         try{                        list<Account> acclist=new list<Account>();         Account acc=new Account();         acc.name='Hasbro Dev Stg Res 2';         acc.ICIX_V1__Status__c='Active';         acc.ICIX_V1__ICIX_ID__c='304078';         //acc.ICIX_V1__Internal__c=true;         acclist.add(acc);         insert acclist;                      string searchKey;         string productType;                  list<ICIX_V1__ICIX_Product__c> lstProduct = new list<ICIX_V1__ICIX_Product__c>();         string sTempSearchKey = '%' + searchKey + '%';                ICIX_V1__ICIX_Product__c product1=Hasbro_TestDataFactory.createProduct()[0];         product1.Product_Number__c='C6119AV10';         product1.ProductType__c='ASSORTMENT';          lstProduct.add(product1);                  ICIX_V1__ICIX_Product__c product2=Hasbro_TestDataFactory.NewProduct();         product2.Product_Number__c='C6119AV10';         product2.ProductType__c='ASSORTMENT';         lstProduct.add(product2);                  insert lstProduct;                 customSearchController.getContactList('product2.Product_Number__c','product2.ProductType__c');     }          catch(Exception e){              }     } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


If team B attempts to block a ball and team A tips the ball rather than attacks the ball but the ball does come in contact with Team B, is that considered a block contact or first contact?  I would assume that it is considered a block contacct but the referee called it a 'first contact' and team B lost the point because they tried to use 3 contacts after the ball was touched at the net.

Today in a match the setter set the ball too low for me to spike it, so I just dinked it over.  The bottom of the ball was lower than the top of the net at the point where I made contact.  When the defender made contact, again, the bottom of the ball was lower than the top of the net (the top of the ball was over the top of the net though).  I felt that this wasn't technically a block and that he shouldn't have been allowed to hit it a second time, but I wasn't sure so I just let it go.  Was this a legal block or should it have been our point when he hit it a second time in a row?  Edit:  I don't think I was clear about the part where, after I hit the ball, the ball travelled over the net onto the other team's side of the court.  The other player did not reach over the net so there is no issue there.  It's just an issue of whether or not their first contact was a block or a hit.  I believe it was not a block but I can't find a specific ruling to address it.


I want to monitor system parameters like CPU load, CPU Idle time on windows system via SNMP. Does HOST-RESOURCES-MIB can handle this?

How hard can this be? I want to get the current CPU performance from a remote Win 2k3 machine. I need to use SNMP because the machine is behind a firewall.  Assumptions:   I understand networking/can configure any kind of IP address/port forwarding/firewall/stuff. I understand SNMP - I know how to use my tool to get a value from an OID on a target machine.  I know what I want to do with the result from my SNMP request. I have enabled SNMP on the Windows Server, configured the relevant IP security/community stuff. I can already ask the Windows server standard stuff using SNMP about how many disks/network interfaces it has etc.   Question: - What OID do I used to simply ask current performance usage.  I have spent many hours asking Google - clearly asking the wrong question :S .... How hard can this be?


If $\sum_{n=1}^{\infty}\frac{a_n}{n}=a$ converges to a finite number with $a_n \geq 0$ for all $n \geq 1$ does this also imply that $$\lim_{n \to \infty}\sum_{i=1}^{n}\frac{a_i}{i+n}=0$$ I tried using $\lim_{n \to \infty}\sum_{i=1}^{n}\frac{a_i}{n}$ as a bound so that I can use comparison test but I can't prove that it converges either. How would I go about proving this statement?

I was wondering if the following is true. Suppose a series $a_n$ is greater than 0 for all positive integer n, and that $\sum \frac {a_n}n$ converges, then is $\displaystyle \lim_{m\to \infty}\sum_{n= 1}^m {a_n \over m+n} = 0$? It seems to be true because if $\sum {a_n\over n}$ converges, then that means that ${a_n\over n }\to 0$ for $n\to \infty$. This means, neglecting $n$, ${a_n \over m+n}$ will also tend to 0, and thus the summation would be equal to 0, but I don't know if this is true.


I have an exam class document, and I want it to output three fields on a page with an incomplete question as follows:  page 1 of 2    question 4 continues    please go to next page ...   and on the last page I want:  page 2 of 2   End of Exam   with the code below, I get:  page 1 of 2   please go to next page ...   and  page 2 of 2   End of Exam   How do I chage it to print the middle field? I have browsed for help without success, Help will be appreciated. The code is below  \footrule \lfoot{\footnotesize Page \thepage\ of \numpages} \cfoot{\newcommand{\continues}{\ifincomplete {\footnotesize Question \IncompleteQuestion\ continues \hfill Please go to next page\ldots} {}}} \rfoot{\iflastpage{End of Exam.}{\footnotesize Please go to next page\ldots}}

The code below works by printing "page x of y" on each page on the left, and go to next page on the right (or end of Exam for the last page). What I cannot get it to do is to write question xx continues as a central footer. Since I was not able to paste this code as a reply to comments/suggestions on my earlier post here , This is a repeat of that post.  \documentclass[addpoints,10pt,fleqn]{exam} \RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace} \usepackage{setspace}% http://ctan.org/pkg/setspace \RequirePackage{tikz, pgflibraryplotmarks} \usepackage{lipsum}% http://ctan.org/pkg/lipsum \usepackage[margin=1in]{geometry} \usepackage{enumerate,mdwlist} \usepackage{mathtools}  % for 'bmatrix*' environment \usepackage{paralist}   % for 'inparaenum' environment\newcommand{\dist}{\displaystyle} \usepackage{enumitem} \usepackage[normalem]{ulem} \usepackage{geometry} \geometry{ a4paper, total={210mm,297mm}, left=20mm, right=15mm, top=20mm, bottom=15mm,} \singlespacing \pagestyle{headandfoot} \runningheadrule \runningheader{Linear Algebra-MAT 2200} {Tutorial shhet 7, Page \thepage\ of \numpages} {June, 2015}  \begin{document} \raggedright \begin{center} \bf{Linear Algebra} \end{center} Handout 2 \hfill{May, 2015}\\ \flushright Tutorial Sheet 7 \noindent\makebox[\linewidth]{\rule{\textwidth}{1pt}} \pagestyle{headandfoot} \footrule \lfoot{\footnotesize Page \thepage\ of \numpages} \cfoot{\newcommand{\continues}{\ifincomplete {\footnotesize Question \IncompleteQuestion\ continues \hfill Please go to next page\ldots}{}}} \rfoot{\iflastpage{End of Tutorial Sheet 7.}{\footnotesize Please go to next page\ldots}} \begin{questions} \begingroup\onehalfspacing \question Given the vectors \\ \begin{inparaenum}[a)] \item (2, -1, 1) and (1, 2, 1) \\ \item (2, 1, -3) and (1, 1, 1) \\ \item (2, -1, 2) and (1, -1, 2) \\ \end{inparaenum} \break  Find \\ \begin{inparaenum}[i)] \item Which of the pairs of vectors are perpendicular \\ \item A vector perpendicular to both of the given vectors \\ \end{inparaenum} \endgroup \end{questions} \end{document}


MY Apple ID has changed, as in the original one was closed and now have a new one, and I cannot sign out of some devices because it is asking for the password for the account that is now closed. How do I get around this?  Thanks.

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


Empty interface:  interface IError { }   and inherited more than one classes:  class A : IError {    //To do }  class B : IError {    //To do }

I am looking at nServiceBus and came over this interface  namespace NServiceBus {     public interface IMessage     {     } }   What is the use of an empty interface?


Whenever I try editing a file such as test.java with gedit it always gives me this error.  Unable to init server: Could not connect: Connection refused  (gedit:2652): Gtk-WARNING **: 08:19:10.568: cannot open display:   I have looked at other cases when gedit does not open the display but I am not skilled enough to understand what exactly people are doing since it isn't exactly the same error.  What can I do to fix this?

I am using Ubuntu 14.04 LTS, and for installing Hadoop I created hadoop user as hduser. When I try to open ~/.bashrc using gedit am getting an error as follows,  hduser@arul-java ~ $ gedit ~/.bashrc  (gedit:9254): Gtk-WARNING **: cannot open display:  hduser@arul-java ~ $    How to solve it ?


Background We have a motivational poster in our office that says:  None of us is as smart as all of us.   I think that it's grammatically incorrect, and here is my reasoning:  All of the tigers have spots. All of us are here. None of us are dead yet.  The three examples all sound correct when using the plural "are", rather than "is". Question Unfortunately, some of my coworkers disagree with me. They believe that the quote is correct when it uses the word "is". So my question is this: Is the motivational quote grammatically correct or should it say "all"?

In my grammar book (English Grammar, HarperCollins Publishers), I read that none is occasionally treated as plural, but it is usually regarded as singular. Can you give me an example of sentence where none is used as plural pronoun?


$\prod_{n=2}^{\infty} \left(1- \dfrac1 {n^2}\right)= ?$   Attempt:   Simplified it to $\dfrac{(n-1)(n+1)}{n^2}$ , and then wrote some terms to observe the cancelllation pattern, but that didn't help, how to solve it then?

Evaluate the infinite product $$\lim_{ n\rightarrow\infty }\prod_{k=2}^{n}\left ( 1-\frac{1}{k^2} \right ).$$  I can't see anything in this limit , so help me please.


I would like to prevent an mdframed box to split.   I know it could sound absurd, since mdframed is designed to allow splitting but if it could be done, I would be interested in modifying mdframed so that I can decide whenever I want to split or not.  Does anyone has a clue on this?

I use the following custom environment emailHeader and  (credits belong to ).  \definecolor{emailHeaderBackground}{RGB}{225,225,225} \usepackage[framemethod=tikz]{mdframed} \newmdenv[   skipabove=0em,   skipbelow=1em,   hidealllines=true,   backgroundcolor=emailHeaderBackground,   roundcorner=3pt]   {emailHeader}   In the document ...  \begin{emailHeader}   \emailFrom[John Doe]{john.doe@stackexchange.com}   \emailSubject{Re: Please do break apart}   \emailDate{Wed, 22 Aug 2012 12:23:18 +0200}   \emailTo[Jane Doe]{jone.doe@stackexchange.com}   \begin{emailsCc}     \email[Barack Obama]{barack.obama@whitehouse.gov}     \email[Michelle Robinson]{michelle.robinson@whitehouse.gov}   \end{emailsCc} \end{emailHeader}   The output looks like this ...    I use the environment several hundred times in the document. Sometimes it happens that the email header is at the end or beginning of a page. Then, it breaks into separate lines. As you can see the environment is not a verbatim environment for which I found settings to avoid the page break.    Question:  How can I prevent a pagebreak for the above environment? I want the command to be added to the environment definition. I do not want to edit all the places where I use the set of commands.


I'm running Debian testing and can't get a simple cron to run a symlinked PHP script.  I've a php script in a subdirectory in my home folder /home/foobar/dir/script.php (which starts with the following shebang #!/usr/bin/env php).  I've created a symlink which points to it:  sudo ln -s ~/dir/script.php /usr/local/bin/whatever ls -la /usr/local/bin lrwxrwxrwx 1 root staff 24 Feb 27 17:46 whatever -> /home/foobar/dir/script.php*   And added the following rule to my crontab (execute whatever every minute):  crontab -e * * * * * whatever   But it doesn't work, I get the following error:  cat /var/mail/foobar ... /bin/sh: 1: whatever: not found   While pointing to the script without using the symlink works:  crontab -e * * * * * /home/foobar/dir/script.php   Any idea?

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.