I upgraded from Snow Lion to Mavericks and just found out that I can't sync my address book and calendar between my iMac and iPhone (3GS) using iTunes. I'm not using iCloud and not willing to use it either. All my data files (from Mail etc.) are also "upgraded" to Mavericks. Is it possible to reinstall Snow Lion and use Time Machine to place all date files back or am I going to be in trouble here?  Added: I meant Mountain Lion (in stead of Snow Lion -- sorry ;-))

I installed the developer preview of OS X Mavericks, & too many things broke. I can't stay on it & need to roll back to Mountain Lion. Any ways of doing that? Please help!  I originally installed Mountain Lion & Mavericks through the Mac App Store.


We see Rainbows many times, but we always see them Horizontally or from Sideways. Why can't we see it from under it?/From the point where it starts or ends(end points)? I also want to stress on that, I am asking on viewing part and not about the formation, reason, causes of a rainbow.

A  is formed when a raindrop refracts light, but why then does the whole sky not become a huge rainbow when it rains? Would the light not be dispersed into ordinary white light? What causes it to look as if each end is nearly touching the ground?


The spell text makes no mention of any effect that would be perceived by the target, so unless there is another rule that would come into play, I suspect that a player could use True Strike without their target noticing.

Some spells have somatic and vocal components, that's well known.  How loud must a wizard talk? How obvious/wide should his gestures be?  Some spells that would be awesome would be fairly limited if you need to shout them (ex: mage hand, range 30ft).


I messed up by followed certain guideline to install LAMP for wordpress development and now i'm confused for what I have done.  So now i want to remove everything and start again.   Can u guys show me where can I learn to uninstall LAMP in ubuntu 16.04? Lots of tutorial teach to install but less about uninstall   BTW I'm still new to linux

I'd like to start over with my webserver and I'd like to reinstall all the LAMP packages, how do I do that?


i need to upload images with md5/uniqid name.   PHP:   $filenamekey = md5(uniqid($_FILES["myfile"]["name"], true));   move_uploaded_file($_FILES["myfile"]["tmp_name"],$output_dir.$filenamekey);   This move image into folder with md5 name but upload files without any image extension/type. how can I fix this?  Pic?

This is a question you can read everywhere on the web with various answers:  $ext = end(explode('.', $filename)); $ext = substr(strrchr($filename, '.'), 1); $ext = substr($filename, strrpos($filename, '.') + 1); $ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename);  $exts = split("[/\\.]", $filename); $n    = count($exts)-1; $ext  = $exts[$n];   etc.  However, there is always "the best way" and it should be on Stack Overflow.


I just formatted my laptop and got rid of Windows 7. Yay ;-)  Either way, Wine is version 1.3.28 here, and I need it to update (there are some bugfixes) for my game so I need a more recent version. This is the version I got from the Ubuntu software manager. How do I get a more recent version or Wine version 1.4?  I've already added the repo into my repository, but still no updates.  Thanks in advance.

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


This may sound very unlikely to the other question.  I have two hour range.  $start = 18:00; $end = 2:00;  the result 8 hours.   sample two.  $start = 17:30; $end = 2:00;   result 7.5 Hours.   How can I get this on PHP code.

How to calculate minute difference between two date-times in PHP?


Suppose I have a binomial expansion of the form: $$ (2+\sqrt{3})^n $$ Why is it that as $n$ approaches $\infty$ that the value of the expansion becomes closer and closer to being an integer?

Using 5000-digit precision in PARI/GP, I discovered that the fractional part of $(\sqrt{2}+\sqrt{3})^{2008}$ is extremely small, less than $10^{-999}$.  Is there a simple explanation for this fact ?  This looks like a Pisot number issue (similar questions have already been studied on MSE, see for example ), but it’s a more complicated situation.   Related :


Let $X_1,\ldots,X_n$ be i.i.d random variables with $u=EX_1$ and $\sigma^2=Var(X_1)<\infty$. Show that $\frac{2}{n(n+1)}\sum_{i=1}^n iX_i\rightarrow _p u$.   My solution: Put $X_{(n)}=max\{X_1,X_2,\cdots,X_n\}$. Thus,  $$\frac{2}{n(n+1)}\sum_{i=1}^n iX_i\leq \frac{2}{n(n+1)}\sum_{i=1}^n i X_{(n)}=\frac{1}{n}\sum_{i=1}^n X_{(n)}.$$  Since $$P(|\frac{1}{n}\sum_{i=1}^n X_{(n)}-u|>\epsilon)\leq \frac{E(|\frac{1}{n}\sum_{i=1}^n X_{(n)}-u|^2)}{\epsilon^2}=\frac{Var(X_{(n)})}{n\epsilon^2}=\frac{\sigma^2}{n\epsilon^2}<\infty,$$  we have $$P(|\frac{2}{n(n+1)}\sum_{i=1}^n iX_i-u|>\epsilon)\leq P(|\frac{1}{n}\sum_{i=1}^n X_{(n)}-u|>\epsilon)\rightarrow 0$$ as $n\rightarrow \infty$.  Therefore, $$\frac{2}{n(n+1)}\sum_{i=1}^n iX_i\rightarrow _p u.$$  Proof edit:  $ P(|\frac{2}{n(n+1)}\sum_{i=1}^n iX_i-u|>\epsilon)\leq\frac{E(|\frac{2}{n(n+1)}\sum_{i=1}^n iX_i-u|^2)}{\epsilon^2}=\frac{4\sum_{i=1}^n E(iX_i-iu)^2}{{n^2(n+1)^2}\epsilon^2}=\frac{4\sum_{i=1}^n i^2 E(X_i-u)^2}{{n^2(n+1)^2}\epsilon^2}=\frac{4*\frac{n(n+1)(2n+1)}{6}*\sigma^2}{{n^2(n+1)^2}\epsilon^2}\rightarrow 0$ as $n\rightarrow \infty$  thus  $$\frac{2}{n(n+1)}\sum_{i=1}^n iX_i\rightarrow _p u.$$  I‘m not sure if this proof works. Can anyone give some suggestions?

I'm trying to understand my teacher's solution to this problem:     Let $X_1,X_2,...$ sequence of iid random variables with expected value   $\mu$. Define $Y_n = \frac{2}{n(n+1)} \sum_{j=1}^{n} jX_j$. Prove that   $Y_n \to_\mathbb{P} \mu$.   His solution:  Let $\sigma^2 = \rm{Var}(X_i)$.  $E(Y_n) = \frac{2}{n(n+1)} \sum_{j=1}^{n} jE(X_n) = \mu$.  $\displaystyle\rm{Var}(Y_n) = \frac{4}{n^2(n+1)^2} \sum_{j=1}^{n} j^2 \rm{Var}(X_n) = \frac{4\sigma^2}{n^2(n+1)^2}\bigg(\frac{n(n+1)(2n+1)}{6}\bigg) = \frac{2\sigma^2}{3}\bigg(\frac{2n+1}{n(n+1)}\bigg) \leq \frac{2\sigma^2}{3}\bigg(\frac{2}{3}\bigg) = \sigma^2 ,\forall n$  Then it follows by Tchebychev's Weak Law of Large Numbers.  My doubt is in the last step. Isn't  Tchebychev's WLLN only true for uncorrelated random variables? In this case, $\mathbb{E}(Y_n Y_m) \neq \mu^2$, since they aren't independent, so $\rm{Cov}(Y_n,Y_m) \neq 0$, right?  Thanks.  Edit: As u/clarinetist noted, there's a problem in this exercise, since the WLLN states the convergence of the arithmetic mean of random variables, whose expected value isn't $\mu$.


Which one is the best mode for taking pictures: manual, auto, or portrait? Or if any other mode is better, please state what it is.

On the top of most cameras is a selector knob which will allow you to select different modes. These range depending on the camera, my camera (Nikon D5100) has several choices.   I have been told conflicting things about which mode to use. From my understanding most DSLRs have M (Manual) S (Shutter Priority) A (Aperture Priority) P (Program Mode) and possibly Auto mode.  Some models (specifically entry level) have other modes some of which could be Night, Macro, Landscape, Portrait, etc.   I have been told by one person to use all available modes the camera has to offer as I learn more about photography.  While another person said only use M, S, A, P modes and avoid all the rest while you learn.  Which of the statements is generally more correct?  A few notes: I have every intention and am currently attempting to learn as much as possible about the camera and how to capture great photos but I am a beginner. I shoot in RAW most of the time. And I want to capture the best possible shot with the camera (not have to process it in post extensively to get the best shot).


When people come to a new place, they need to respect the customs of locals      When people come to a new place, they need to respect the customs of the locals      When people come to a new place, they need to respect the customs of the local   Since I have mentioned the place where the "locals" live, should I use article "the" here?  Another question, should I use the local instead of the locals? And if so, is there any big difference in meaning?

"You know, every time we take rebels, whether it’s in Iraq or anywhere else, we’re arming people. And you know what happens? They end up being worse than the people.”     What does the definite article imply here exactly? Why is it "the people" and not just "people"?


How do you copy and paste inside the terminal?   I've tried with Ctrl+C and Ctrl+V; neither works, they just insert ^C or ^V into the prompt. What am I doing wrong?

When trying to copy and paste from the terminal, it doesn't work. I can't use Ctrl + C to copy, and when I select the text with the mouse and right click, no option to copy or cut appears. I installed Ubuntu 12.04 for the first time a few days ago and maybe it is missing something. Copy and paste does work in LibreOffice.


Stackoverflow has very good Contributors,Developers and Tech Experts as a members Why It doesn't allow me to ask a question to recommend or compare the tools,technology from the Experts available in the stack overflow.  In my case MonkeyTalk and Calabash both are a new technology in mobile automation testing. Since I am a newbie to testing how can I get suggestions from Experts apart from stackoverflow(I asked this question after spending so many hours in google but didn't get anything)   Stackoverflow put me on hold for this question  How can I get to know this answers from stack group.

I just stumbled across this when trying to .  I'd argue a site like Stack Overflow is absolutely the best place for these kinds of questions, somewhere where people can give their opinions and experiences for other people to easily and quickly see at a glance, and view the best rated ones.  When searching that exact question on Google, the sites I came up with were just blogs, the opinion of a single person. Personally I'd value the opinion of an entire community, especially this community, much higher than that.


Say I know the linear factors of polynomials A and B.  For instance, if they were cubic I could express them as A(x) = (ax + b)(cx + d)(ex + f) and B(x) = (gx + h)(ix + j)(kx + l).  Are there any circumstances under which I can take advantage of knowing these original factors if I want to compute the linear factors of the polynomial A + B?

I am writing a piece of software and I'm trying to avoid root finding polynomials for efficiency purposes. I have two polynomials with complex coefficients, where the roots of both polynomials are known. In fact, the internal representation I use just stores the complex roots and a complex scaling factor, not the polynomial coefficients themselves, although it's trivial to compute these. Essentially, my goal is to sum the two polynomials and express the result in the same internal representation which I use for the addends. The mathematical challenge here is then to find the roots of the sum (and the scaling factor, which is trivial). As I've mentioned, I would very much like to find a way to do this more efficiently than just finding the coefficients of the sum and computing the roots from there - although I will resort to this method as a last resort if what I'm asking for isn't possible.  EDIT: I am putting a bounty on this question, so I want to clarify my standard for a good answer. A good answer will either:   Explain or overview an algorithm which accomplishes my task, preferably with references to relevant papers with more information. Give an explanation for why the task is infeasible, possibly with references or suggestions for another angle of attack, but this is not necessary.


I tried to let $x=2k+1$ but it ended up proving $k^2+k=2y$ for some $k$ and $y$. What is the correct solution?

I am trying to show that if $n$ is an odd natural number, then $8$ divides $n^{2}-1.$ I was able to prove that because I know that if $n$ is an odd natural number, then $n^{2}$ can be written as $8k+1$ for some $k\in \mathbb{N}.$ I would like to show this question by using the Euclidian division. Then I wrote $n^{2}-1=8k+r$, where $0\leq r  < 8.$ When $r=2$ we get $n^{2}-1=8k+2.$ Since $n$ is odd, then $n^{2}-1$ is even and I got stuck. Is there way to fix that?


I made homemade custard and refrigerated it right away.  (It contains soy milk, eggs, sugar-free maple syrup, and vanilla.  No cornstarch, flour, or preservatives.)  How long will it keep in the refrigerator?

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


How many stack exchange sites are there and why is reputation not universal. It sucks having to earn reputation for every separate site. it is really annoying actually. It makes zero logical sense honestly.  Can anyone give a good logical explanation of this?

Why can't there be (or is there?) a way to gain credence from one's reputation on one site to be able to do something on another (SE vs. SO)?  As someone who has long consumed StackExchange, StackOverflow, SuperUser, but only within the past few years posted questions or answers, I am confused and frustrated by the whole reputation thing.  I understand why reputation exists, but it is frustrating to want to upvote, comment, answer, or whatever, and be told you are not allowed because you don't have sufficient reputation.  If I had some new original questions I needed to ask, then I could gain reputation, but "the system" seems to think I am unworthy or clueless to be able to contribute or assess.  Finally I had enough rep (small by most standards) to be able to vote, and maybe even comment(?) on StackOverflow, based on technical questions.  But when I went to Stack Exchange for a question on OS X stuff, I have to start over with 1 rep.  Seems a bit like a slap in the face, particularly since (so far as I know) some questions could appear either place.  Yes, I have ready folks talking about exchanging bounty and how it is more difficult to earn rep on SE than SO, and I don't claim to know all about bounty and the ins and outs of types of rep.  But I do know that I feel as if I have to start over in each meeting place for technical questions, and it is a disincentive (for me) to be involved.  I realize not all (maybe nobody) will agree with my sentiment, but since I only have 1 rep, I guess folks' downvotes won't hurt me, right?


I have a problem .I can't access to my disk see the message below :  Error mounting /dev/sda7 at /media/marwen/SEHLI: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda7" "/media/marwen/SEHLI"' exited with non-zero exit status 13: $MFTMirr does not match $MFT (record 0). Failed to mount '/dev/sda7': Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details.

I replaced a buggy Windows Vista installation with Ubuntu. All works fine except that the main HD where I had all my files are now inaccessible. Here is the error message I get:   Error mounting: mount exited with exit code 13: ntfs_attr_pread_i: ntfs_pread failed: Input/output error Failed to read NTFS $Bitmap: Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details   Is it necessarily a hardware problem? If not, is there a way to repair the HD from Ubuntu?


Let's say two users (U1, U2) each have a private key they keep to themselves, and each broadcast a corresponding public key to the world.  Let's then say that U1 wants to send a signed encrypted message to U2. I understand the idea that U1 wants to encrypt the message using his own private key, so that U2 can have proof that the message indeed came from U1 (since if U1's public key can decrypt a msg, it must've been encrypted by U1), and also U2's public key, so that only U2 can decrypt the message using his private key.  What I'm not completely clear on are the differences between first encrypting with U1's private key and then U2's public key, or in the opposiste order.  The way I see it, in the first possible order (U1 private, then U2 public),  nothing can be gleaned from the doubly encrypted message by observers, even if they have both U1 and U2's public keys.   If U1 were to doubly encrypt the message in the opposite order (using U2's public key first and then U1's private key), the only difference would be that observers would be able to break the layer of U1's encryption (using his public key) and see that he sent a message (but not to whom, or at least not from decrypting that first layer). Nothing more could be observed because the decrypted message (using U1's public key) would just reveal another layer of encryption that only U2's private key could decrypt.  Is that correct? Does order matter other than that?

Frequently, we want to send messages that are (a) encrypted, so passive attackers can't discover the plaintext of the message, and (b) signed with a private-key digital signature, so active attackers can't make Alice think that a message came from Bob when it didn't. Is it better to (a) generate the digital signature from the (hashed) plaintext, and then encrypt a file containing both the plaintext message and the digital signature? Or is it better to (b) encrypt the message first, and then generate a digital signature from the (hashed) encrypted file? Or (c) combine encryption and public-key digital signatures in some other way? A closely related earlier question (  ) seems to focus on symmetric-key MAC authentication. As , Do the same issues with (symmetric-key) MAC-then-encrypt apply to (public-key) sign-then-encrypt?


I have a class that update users on success but whenever our release team is doing a deployment on the org this action still retrieves success but doesn't make the update.   Is there a way I can check via apex code if org is on deployment so I can display an error message for users?

Is it possible to query deployment status->Deployment details start time and end time?


I didn't use cycles render a long time and got a problem. If I use dark environment lighting, blender doesn't render it smooth. Maybe it happens because I'm using denoising, I don't really know. So here is how it looks:  And the whole render look like this:  Gray spots mess up all render. I tried to search how to remove them, but still didn't find anything.

Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.


I am considering to switch from Win to Linux. However, due to my previous experience sometimes it just does not work as expected. I bought Latitude E5570 (128 Gb SSD, intel i5, 8Gb RAM) with Win 7 preinstalled. Which Linux distro is the most compatible one with this Laptop configuration?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


If the next line is b, I want to add it to the AA line.  This is my file:  AA   b   b   AA   b   AA   b   b   b   Desired output:  AA b b   AA b   AA b b b   The below is the code I am trying.  paste -s -d" " file.txt | awk '{for(i=1;i<=NF;i++){if(i > 1 && $i == "AA")????}}'   I printed several line in one line and tried to run for loop to the last field and go down to the next line if $i is AA. But I do not know what to do after the 'if' statement.  Can anyone help me?

I have a file like this: 1 22 1 4 $3 3 5556 $33 $233 $1 5  I want to move all the lines starting with $ to the previous line by replacing the newline characters with a space. My result should look something like: 1 22 1 4 $3 3 5556 $33 $233 $1 5  How can I do it using sed or grep or awk?


Can an iPhone 5's camera good enough to take a picture where the quality is decent on a 16x20 photo

What size images do I need for common print sizes, such as wallet size, 8x10, and 16x20?  Is there a general formula?  How could that size change if, for example, a 16x20 was printed on canvas rather than photopaper?


How can I create a string in the format "hh.mm" from a given TimeSpan object?  The opposite of what is wanted in . I've got a valid TimeSpan object and want to parse it into a string of the given format. Two digits for he hours, a dot and two digits for the minutes.  I tried using it with the format string "hh.mm" like I would've done it with an DateTime object. This did not work.  TimeSpan.FromMinutes(120).ToString("hh.mm")   This throws a System.FormatException.

What is the recommended way of formatting TimeSpan objects into  a string with a custom format?


I found this question on this very site and was curious on how to solve it using D'Alembert's Principle Here's the link to OP(  .I already know how to do it by balancing the torque about toppling point so please don't post the latter as an answer . My attempt was to displace the upper sphere by $d\theta$ which gives its virtual displacement as  $-rd{\theta}cos(\theta) \hat{j}$(notice we are only interested in the y component becuz the only component of the applied force which is gravity in this case is the y component in the dot product the other components vanish) similarly the cylinder is also displaced $+r'd{\phi}cos(\phi) \hat{j}$ where r' is the distance from the point of toppling of the center of mass. $$r'cos(\phi)=H/2=r(1+sin(\theta))$$ $$r'sin(\phi)=R=r(1+cos(\theta))$$ and $$tan(\phi)=H/2R$$ the equation coming from D'Alemberts principle is $mgrcos(\theta)d\theta=Mgr'cos(\phi)\phi$ I tried solving this but couldn't arrive at the right answer. Any help would be appreciated! [NOTE-I asked this question yesterday and couldn't get an answer and out of the fear that the previous question would get lost in the torrential flow of question I have reposted please tolerate this once,as soon as I get an answer on either of the posts I will delete the other]

I found this question on this very site and was curious on how to solve it using D'Alembert's Principle  .I already know how to do it by balancing the torque about toppling point so please don't post the latter as an answer . My attempt was to displace the upper sphere by $d\theta$ which gives its virtual displacement as  $rd{\theta}cos(\theta)$j(notice we are only interested in the y component becuz the only component of the applied force which is gravity in this case is the y component in the dot product the other components vanish) similarly the cylinder is also displaced $r'd{\phi}cos(\phi)$ where r' is the distance from the point of toppling of the center of mass. $r'cos(\phi)=H/2=r(1+sin(\theta))$ ,$r'sin(\phi)=R=r(1+cos(\theta))$ and $tan(\phi)=H/2R$ the equation coming from D'Alemberts principle is $mgrcos(\theta)d\theta=Mgr'cos(\phi)\phi$ I tried solving this but couldn't arrive at the right answer. Any help would be appreciated!


I'm new here and got a question. We are currently programming a litte MP3 Player as a practical training at University but currently I'm not the best programmer (starts some months ago).  I used Scanner and got Problem:  java.lang.NullPointerException     at java.io.StringReader.<init>(StringReader.java:50)     at java.util.Scanner.<init>(Scanner.java:702)     at PlayList.loadFromM3U(PlayList.java:89)     at PlayList.<init>(PlayList.java:19)     at PlayListTest.testSaveAndLoadM3U(PlayListTest.java:202)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Collections; import java.util.LinkedList; import java.util.Scanner;  public class PlayList<T> extends LinkedList<AudioFile> {      private boolean tp_playMode;     private int tp_PlayPosition;      public PlayList() {         super();     }      public PlayList(String pathname){         super();         this.loadFromM3U(pathname);     }      public int getCurrent() {         return tp_PlayPosition;     }      public void setCurrent(int tp_PlayPosition) {          this.tp_PlayPosition = tp_PlayPosition;     }      public AudioFile getCurrentAudioFile() {         try {             return this.get(getCurrent());         } catch (Exception e) {             return null;         }     }      public void changeCurrent(){         int listLength = this.size() - 1;         if (getCurrent() >= listLength){             if (tp_playMode){                 Collections.shuffle(this);             }             tp_PlayPosition = 0;         }         else{             tp_PlayPosition++;         }     }      public void setRandomOrder(boolean order) {         if (order){             Collections.shuffle(this);         }         this.tp_playMode = order;     }      public void saveAsM3U(String pathname){         FileWriter writer = null;         try {             String newLine = "\n";             writer = new FileWriter(pathname);             writer.write("My best Songs TP" + newLine + newLine);             for (AudioFile file : this) {                 if (file instanceof TaggedFile){                     writer.write(((TaggedFile)file).getPathname() + newLine);                     break;                 }                 if (file instanceof WavFile){                     writer.write(((WavFile)file).getPathname() + newLine);                     break;                 }             }         } catch (IOException e) {             throw new RuntimeException();         } finally {             try {                 writer.close();             } catch (IOException e) {                 e.printStackTrace();             }         }     }      public void loadFromM3U(String pathname){         this.clear();         Scanner scan = null;         String line;         try {             scan = new Scanner(new File(pathname));             while (scan.hasNextLine()){                 line = scan.nextLine().trim();                 if (!line.isEmpty() && !line.startsWith("#")){                     try{                     this.add(AudioFileFactory.getInstance(line));                 } catch (Exception e) {                         e.printStackTrace();                     }                  }             }         } catch (IOException e) {             throw new RuntimeException();         } finally {             try {                 scan.close();             } catch (Exception e) {                 e.printStackTrace();             }         }     }   }   Can someone help me ? It would be great. :)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I’ve done 2 testing on 40 users using 2 Mobile App for each one I’ve got the time that each user has spent on them T-Test’s result is: t=0.48448,df=76.638,p-value=0.6294 Hyp-Alt: true difference in means is not equal to 0 95% confidence interval:  -5.443252 8.943252 mean(a):13.95 mean(b): 12.20

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


After I scan via clamav/clamtk, I found 1 possible threat that I cannot remove/quarantine.  How to remove virus? Or Is this false positive?  /usr/lib/ruby/1.9.1/rdoc/generator/template/darkfish/js/thickbox-compressed.js  PUA.Script.Packed-1

I recently installed Ubuntu 12.10. I use Clamav and have scanned my system regularly for infections. Today it picked up a potential threat  /usr/lib/ruby/1.9.1/rdoc/generator/template/darkfish/js/thickbox-compressed.js. Ubuntu is my only operating system installed. Clamav was not able to delete or quarantine the file. Should i be concerned or is this a false positive? I have scanned the same file multiple times and it picks it up as a threat each time. Also i tried googling the issue before posting and found no information.  A point I forgot to mention, clamav picks it up as PUA.script.packed-1


I've been learning about the Fourier transform, and when you apply to derivatives.  All of the notes I've read seem to imply that if $$\lim_{x\to\infty}f(x)=0,$$ then $$\lim_{x\to\infty}\frac{df}{dx}(x)=0.$$ Under what conditions can it be true? It holds for obvious functions like $e^{-x}$ and $\frac{1}{x}$.

Physicist here. I am puzzled by a question: looking at a continuous function $g :\mathbb{R} \rightarrow \mathbb{R}$ that goes to zero at infinity, I am interested in the behavior of its derivative $\beta = g'$. Precisely, does it go to zero too? By writing on paper it looks like: $$ \beta(+ \infty)=\text{lim}_{x\rightarrow \infty}\text{lim}_{h\rightarrow 0} \frac{g(x+h)-g(x)}{h}$$ And if I can invert the two limits, I get what I expect: $\beta(+\infty)=0$, so I was curious about the hypothesis behind this permutation. Is the requirement of continuity enough? Thanks.


I know how a basic string-format works, but I can't figure out what lies behind the part, {:,}. It is supposed to print a number like 1000000 thus 1,000,000. How does it do it. I don't understand what the column nor comma means.  number = 250000 rounded_score = round(number, -1) score_str = "{:,}".format(rounded_score)

I want to do something like String.Format("[{0}, {1}, {2}]", 1, 2, 3) which returns:  [1, 2, 3]   How do I do this in Python?


Why are many variable probability distribution described by a Tensor product? I am asking this question because i came to know that wavefunction $\psi(x,y)$ is a tensor product of two copies of $\psi(x)$. Can anyone help me understand this? Please refer the following question

My text introduces multi-quibt quantum states with the example of a state that can be "factored" into two (non-entangled) substates. It then goes on to suggest that it should be obvious1 that the joint state of two (non-entangled) substates should be the tensor product of the substates: that is, for example, that given a first qubit $$\left|a\right\rangle = \alpha_1\left|0\right\rangle+\alpha_2\left|1\right\rangle$$ and a second qubit $$\left|b\right\rangle = \beta_1\left|0\right\rangle+\beta_2\left|1\right\rangle$$ any non-entangled joint two-qubit state of $\left|a\right\rangle$ and $\left|b\right\rangle$ will be $$\left|a\right\rangle\otimes\left|b\right\rangle = \alpha_1 \beta_1\left|00\right\rangle+\alpha_1\beta_2\left|01\right\rangle+\alpha_2\beta_1\left|10\right\rangle+\alpha_2\beta_2\left|11\right\rangle$$ but it isn't clear to me why this should be the case. It seems to me there is some implicit understanding or interpretation of the coefficients $\alpha_i$ and $\beta_i$ that is used to arrive at this conclusion. It's clear enough why this should be true in a classical case, where the coefficients represent (where normalized, relative) abundance, so that the result follows from simple combinatorics. But what accounts for the assertion that this is true for a quantum system, in which (at least in my text, up to this point) coefficients only have this correspondence by analogy (and a perplexing analogy at that, since they can be complex and negative)? Should it be obvious that independent quantum states are composed by taking the tensor product, or is some additional observation or definition (e.g. of the nature of the coefficients of quantum states) required?  1:  (bottom of p. 18) "so the state of the two qubits must be the product" (emphasis added).


In $\mathbb{R} ^3$, $v$ is a fixed vector and $\alpha:I\rightarrow \mathbb{R}$ is a regular curve. We have: $\alpha'(t)$ is orthogonal to $v$ for all $t\in I$ and $\alpha (t_0)$ is orthogonal to $v$. How can I show that $\alpha(t)$ is orthogonal to $v$ for all $t\in I$?

Let $\alpha:I\to\Bbb R^3$ be a parameterized curve and let $v\in \Bbb R^3$ be a fixed vector. Assume that $\alpha'(t)$ is orthogonal to $v$ for all $t\in I$, and that $\alpha(0)$ is also orthogonal to $v$. Prove that $\alpha(t)$ is orthogonal to $v,\forall t\in I$.   I have been having trouble solving this problem, and I have written it in math as follows:  $$v_1x'(t)+v_2y'(t)+v_3z'(t)=0=v_1x(0)+v_2y(0)+v_3z(0)$$  and using this I want:  $$v_1x(t)+v_2y(t)+v_3z(t)=0$$  Can I have a hint please?


I have a machine that came with 12.04 LTS pre-installed. After working seamlessly, it sat unused for a bit and now will not boot properly. I've searched for fixes, but none has worked. I'd like to just do a "clean install" of 12.04.3.  I have created a bootable DVD. Once I'm in the boot menu and boot from the DVD, is there anything else I need to do? Will the installer "overwrite" what is already installed or do I need to remove the old OS first? I won't end up with two partitions, one with the old broken OS and one with the newly installed one, will I?  Please use as simple as language as possible when answering.

I want to reinstall Ubuntu keeping my data intact. I have 160 GB hardrive (sata or pata I don't know but it's slim and made in China) with a 40 GB ext3 partition, a 4GB swap memory and 3 other partition with a FAT32 file system. I have around 4GB space on my drive where Linux is installed.  I'd like to keep the data intact, especially the Downloads folder, desktop, and /var/www; And I no longer have access to any other machines or external storage devices.


$\sum a_{n}^{2}$ converges $\Rightarrow\sum \frac{a_{n}}{n}$ converges.  any hints?

Let $a_1,a_2,a_3,\ldots$ be reals. Prove that if $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$.   For this I have shown the case for when $ a_n^{2} \le\frac {|a_n|}{n}$ $\Rightarrow$ $ |a_n|\le\frac {1}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le \frac{1}{n^{2}}$ and we know that $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges and hence $\sum_{n=1}^{\infty}\frac {a_n}{n}$ converges by the comparison test. Now considering $ a_n^{2} \ge\frac {|a_n|}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le a_n^{2}$ $\rightarrow$ combining the two cases for any n we have: $\frac {|a_n|}{n}\le\frac{1}{n^{2}}+a_n^{2}$ Hence using the comparion test again we know that $\sum_{n=1}^{\infty} a_n^{2}$ converges and $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges hence the sum converges so we can conclude that $\sum_{n=1}^{\infty} \frac {a_n}{n}$ is absoluetly convergent $\Rightarrow$ convergent.  Not to sure if this is correct, any help would be much appreciated, many thanks.


I wonder why CPU vendors stopped producing CPU with frequencies above 3.0 - 3.6 Ghz and switched to using multi-core CPUs?  What was the reason behind this step? Was there a physical constraint or the new approach came up being more feasible?

Recently, I have heard that AMD has released the new Vishera series of FX processors which run at 5 GHZ. My question is whether there is any upper bound of clock rate of a processor? That is can we keep increaing the clock rate for ever? What electrical problems will we face at higher clock rates?


I am on python 3.5 and want to find the matched words from a file. The word I am giving is awesome and the very first word in the .txt file is also awesome. Then why addedWord is not equal to word? Can some one give me the reason?  myWords.txt  awesome shiny awesome clumsy   Code for matching  addedWord = "awesome"         with open("myWords.txt" , 'r') as openfile:                 for word in openfile:                     if addedWord is word:                         print ("Match")   I also tried as :   d = word.replace("\n", "").rstrip()  a = addedWord.replace("\n", "").rstrip()       if a is d:           print ("Matched :" +word)   I also tried to get the class of variables by typeOf(addedWord) and typeOf(word) Both are from 'str' class but are not equal. Is any wrong here?

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


I need help in black body radiation. I know quantitative equations of black body radiation. what I need to know is what is happening inside a black body at atomic level. What I mean is, if light photons is colliding with electrons, then electron is going to the next energy level and then, when come back to the original level it emits the energy. From black body theory we know that if we heat up a black-body with infrared light up to 5000k it will emit all short of visible light. That is colliding by low energy photon we get high energy photon. Doesn't it disobeys the rule that a photon's energy is completely taken by an electron while jumping to high energy level and given off totally when coming back. Then how more low energy photon can produce high energy photon? please explain.

By conservation of energy, the solid is left in a lower energy state following emission of a photon.  Clearly absorption and emission balance at thermal equilibrium, however, thermodynamic equilibrium is a statement of the mean behaviour of the system, not a statement that the internal energy is constant on arbitrarily short timescales.  The energy has to come from somewhere during emission, and go somewhere during absorption.  Energy in a solid can be stored as kinetic and potential energy of electrons and nuclei, either individually or in collective modes such as phonons and plasmons.  In thermal equilibrium energy will be stored more or less in various forms depending on the temperature and material.  However, even if most of the thermal energy in a particular solid at temperature $T$ is stored in the form of phonons, it could be that phonons primarily interact with light indirectly via electrons, e.g. a phonon excites an electron in a phonon-electron interaction, which can interact with light via the EM field.  Given that light is an EM field, it makes sense to me that it is emitted and absorbed by charged particles.  The electron-photon interaction is probably dominant for visible and ultraviolet light, given that metals are opaque, while semiconductors and insulators are transparent to (visible and UV) light with energy lower than their bandgap. However, once you get into energies in the IR and below, or X-rays and above, other mechanisms apparently take over.  For example, on the high-energy end of the spectrum I've heard that gamma rays can interact directly with nuclear degrees of freedom, which is reasonable considering that gamma rays are emitted during a lot of nuclear reactions.  A review of  might give clues to important light-matter interactions over a broad range of wavelengths.  Whether all of the these processes are involved in blackbody emission is a somewhat different question.  What physical processes mediate energy transfer during blackbody emission, and in which energy ranges are the various processes dominant?


How can I install Visual Studio?    I'd prefer to use it in Wine or PlayOnLinux if possible.

Can .exe and .msi files (Windows software) be installed in Ubuntu?


Krivine in his book (Lambda-calculus: Types and Models) introduces the grammar of lambda-terms and then abbreviations to denote them. The grammar itself is not ambiguous:  Lambda-terms are obtained by applying, a finite number of times, the following rules :   any variable x is a λ-term ; whenever t and u are λ-terms, then so is (t)u ; whenever t is a λ-term and x is a variable, then λx t is a λ-term.   Then: "the term $(...(((t)u_1)u_2)...)u_k$ will also be written "$(t)u_1 u_2 ...u_k$". But let us consider the two following different $\lambda$-terms:   $v_1 = ((x)\lambda y. (y)z)w$  $v_2 = (x)\lambda y. ((y)z)w$   ($w, x, y, z$ are variables) and now it seems that I have two ways to interpret the notation $(x)\lambda y. (y)z w$:   either $t = x$, $k = 2$, $u_1 =\lambda y. (y)z$ and $u_2 = w$ or $t = x$, $k= 1$ and $u_1 = \lambda y. ((y)z)w$   It seems that the notation "$(t)u_1 u_2 ...u_k$" is ambiguous. Which rule am I violating in my interpretation?

I saw some people uses Krivine's notation for function application when presenting the syntax for the $\lambda$-calculus.  For example, the $\lambda$-term $\lambda f . \lambda x . \lambda y . f\ x\ y$ (with the normal convention that function application associates to the left, so it actually means $\lambda f . \lambda x . \lambda y . ((f\ x)\ y)$) is written $\lambda f . \lambda x . \lambda y . (f)\ x\ y$ (with a similar convention that it actually means $\lambda f . \lambda x . \lambda y . ((f)\ x)\ y$).  I do not see the point of having another pair of parentheses around the innermost $f$.  Why do people use Krivine's notation instead of the usual one?


I bought 2 Nintendo 64 games off the Internet and I want to know if I have to buy an adapter for my French n64.  So, is it possible to play American games on a French Nintendo 64?

Back in Europe I have a N64 console. As I am currently living in Japan, I find myself tempted to buy some old N64 games in Japanese. However, the articles about the N64's region locking usually assume Japanese games on an American console...  My question thus is: Can you play a Japanese N64 Game on a European console?


I want to know from where i can get all the drivers for Ubuntu 14.10 for my lenovo G580 laptop. Is there any link for getting drivers for ubuntu ?

Is there a package of Ubuntu drivers as driver pack solution? I tried to search for it, but I did not find it. If there is, how can I easily get it?


Hi i am trying to update the ubuntu 16.04 it's showing the following error   W: The repository 'http://ppa.launchpad.net/n-muench/programs-ppa/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://ppa.launchpad.net/n-muench/programs-ppa/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   i cant install filezilla without fix this error. i have tried all the solution but it's give's me the same error please help me to fix this error.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I always thought that "sudo" just starts another login-process, specifically using "root" as a username and asking for the Password to login. After running some program, it ends and logs out (or: keeps the open session for some time and then quits it). No idea where I heard that from, but that seemed reasonable to me.   But now I discovered this sudoers-option:  ALL    ALL = (root) NOPASSWD: /my/command   This allows me to run any program from any user as a root without asking for any password. This left me wondering:  How does that work? How does a program gain user-rights? Does sudo need a server (running as root as daemon or so) and connects to that server, sends it what should be executed and that server executes it with root-rights?   How about other users?  Is there any good and simple explanation how this works?

How does sudo work internally? How is it possible that it can become root without having the root password, unlike su? What syscalls, etc. are involved in the process? Is it not a gaping security hole in Linux (e.g. why couldn't I compile a heavily-patched sudo that just did whatever regular sudo did, but didn't ask for the unprivileged user's password)?  I have read . I have also read  but despite the title, they mainly deal with the differences between su and sudo.


We are currently facing a Japanese keyword hack issue on our website (). The issue is faced on 25-11-2019 when we got the mail that shows someone is the new google search console property owner. After, Our almost all URLs converted into the Japanese language. We had resolve website recovery from the developer, submit a new sitemap and manually fetched pages from the Google search console.  Our traffic went down for 2 days and after recovery, traffic comes back. Even when we type the name of our company then it does not show on the listing but after recover, it has displayed and the traffic is back.  The problem is that there is 70-80 URLs are present on the google search index now which is not available on our website database. Some of that is below.       We had removed that URLs from the search console and resubmit the sitemap. Also used URL parameter tools and exclude parameter "?/", "nost" on 29-11-2019, 5-12-2019 but the issue remains there.  The main issue is website traffic is back but the spam URLs are still shown on the google index and also new spam pages are generated and indexed on google. Most of the traffic from that spam URLs are from japan.  What we can do? Please give the solution so that we can remove that URLs from the search index and maintain the visibility of our site. We think that this issue is also faced by other sites and this solution may helpful for them.

A few months ago our website got hacked, similar to what seems to be described in the following -   We fixed the original part of it, by clearing the website itself so we no longer display Japanese hoodie sale pages. I have also run a Wordfence scan which has come up saying the website is clean.  Currently, the issue we are having is that multiple 3rd party domains are still continuously generating links to our domain on their site and Google is indexing them e.g.   justaccounts.com/bumper23075 justaccounts.com/miraculously_G7nOG7nrnO. justaccounts.com/iterate_JeIEbNG0.   (I got these links by going to site:justaccounts.com)  All of these generated links are throwing 404 errors because the path now does not exist. This is causing us to have an extremely high bounce rate as most of our traffic now comes from Japan and surrounding countries to these dead links, and are immediately leaving because the page doesn't exist. This is, in turn, causing us to drop in search rankings massively.  Do you have any suggestions on how I can properly tackle this issue and have it sorted once and for all? Stopping these 3rd party link generations and having our domain show as clean and only displaying URL's submitted in our sitemap?  The steps have been followed to remove the 'This site may be hacked' message and I have also run a 'Wordfence' scan which is showing that the site itself is clean and secured, so the main issue is the 3rd party generated links.  Any help on this subject would be greatly appreciated as it is becoming a serious issue in terms of us utilizing our website properly.


Can anyone help me? Tried several times, but didn't get a solution.

How do I solve this?  Prove that $3$ divides $14^{2n} -1$ for all $n = 0,\,1,\,2,\,3,\,\ldots$  My calculations are:     Let $n=1$ then $3|14^{2*1}-1 \implies 3|196-1 \implies 3|195$ which is true      Now $n = k$ and assume $3|14^{2k}-1$      let $n = k + 1$      $3|14^{2(k+1)}-1 \implies 3|14^2*14^{k+1}-1$      and $3|14^2-1$ so $3|14^2*14^{k+1}-1$      which makes $3 | 14^{2n}$ true.   I tried starting with $n = 0$ as it's the smallest base but I couldn't get it to work.


I've been working through a textbook and noticed that if a function intersects with its inverse function it's always on the line y = x. Why is this?

If I have a function, the inverse function, by definition will be a reflection of the original function in the line $y=x$, so if I wanted to find the point of intersection, instead of solving it with equating both of the functions to equaling each other, could I assume that the point of intersection, between the two functions, will always be at the point $y=x$? This would enable me to solve problems much easier, instead of having to solve quartic equations, for example.


I will be glad if you help me to find the answer to this question. Which is right?      My brother was born on Monday, November 18th, 1986 at 12 o'clock in Pavlodar    or:      My brother was born in Pavlodar at 12 o'clock on Monday, November 18th, 1986?    Also might you suggest any other options?

tells us that the order should be place–manner–time. However,  tells that it should be manner–Place–Time. Which one is correct?   I have one sentence in two different orders:   No child should grow up in poverty in America in the 21st century. No child should grow up in America in poverty in the 21st century.


I am not a professional programer. I am still learning, so my code is a little basic right now.  Scanner UserInput = new Scanner(System.in); String UserChoose = UserInput.next(); if (UserChoose=="Quit"){   I have deduced that there is something missing in the if statement, but I cannot figure out what. Can someone please tell me what I am missing? I have been searching online for an hour with no luck.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


[20:55:44] [Client thread/INFO]: Setting user: MCAnimate.KDZ [20:55:46] [Client thread/INFO]: LWJGL Version: 2.9.4 [20:55:46] [Client thread/ERROR]: Couldn't set pixel format org.lwjgl.LWJGLException: Pixel format not accelerated     at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method) ~[lwjgl-2.9.4-nightly-20150209.jar:?]     at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52) ~[lwjgl-2.9.4-nightly-20150209.jar:?]     at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:247) ~[lwjgl-2.9.4-nightly-20150209.jar:?]     at org.lwjgl.opengl.Display.createWindow(Display.java:306) ~[lwjgl-2.9.4-nightly-20150209.jar:?]     at org.lwjgl.opengl.Display.create(Display.java:848) ~[lwjgl-2.9.4-nightly-20150209.jar:?]     at org.lwjgl.opengl.Display.create(Display.java:757) ~[lwjgl-2.9.4-nightly-20150209.jar:?]     at bcx.ap(SourceFile:585) [1.10.jar:?]     at bcx.an(SourceFile:434) [1.10.jar:?]     at bcx.a(SourceFile:381) [1.10.jar:?]     at net.minecraft.client.main.Main.main(SourceFile:124) [1.10.jar:?] ---- Minecraft Crash Report ---- // Why is it breaking :(  Time: 6/17/16 8:55 PM Description: Initializing game  org.lwjgl.LWJGLException: Pixel format not accelerated     at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)     at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)     at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:247)     at org.lwjgl.opengl.Display.createWindow(Display.java:306)     at org.lwjgl.opengl.Display.create(Display.java:848)     at org.lwjgl.opengl.Display.create(Display.java:757)     at org.lwjgl.opengl.Display.create(Display.java:739)     at bcx.ap(SourceFile:598)     at bcx.an(SourceFile:434)     at bcx.a(SourceFile:381)     at net.minecraft.client.main.Main.main(SourceFile:124)   A detailed walkthrough of the error, its code path and all known details is as follows: ---------------------------------------------------------------------------------------  -- Head -- Thread: Client thread Stacktrace:     at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)     at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)     at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:247)     at org.lwjgl.opengl.Display.createWindow(Display.java:306)     at org.lwjgl.opengl.Display.create(Display.java:848)     at org.lwjgl.opengl.Display.create(Display.java:757)     at org.lwjgl.opengl.Display.create(Display.java:739)     at bcx.ap(SourceFile:598)     at bcx.an(SourceFile:434)  -- Initialization -- Details: Stacktrace:     at bcx.a(SourceFile:381)     at net.minecraft.client.main.Main.main(SourceFile:124)  -- System Details -- Details:     Minecraft Version: 1.10     Operating System: Windows 10 (x86) version 10.0     Java Version: 1.8.0_91, Oracle Corporation     Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation     Memory: 79884784 bytes (76 MB) / 149696512 bytes (142 MB) up to 523501568 bytes (499 MB)     JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     Launched Version: 1.10     LWJGL: 2.9.4     OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.     GL Caps:      Using VBOs: Yes     Is Modded: Probably not. Jar signature remains and client brand is untouched.     Type: Client (map_client.txt)     Resource Packs:      Current Language: ~~ERROR~~ NullPointerException: null     Profiler Position: N/A (disabled)     CPU: <unknown> #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Family\AppData\Roaming\.minecraft\crash-reports\crash-2016-06-17_20.55.47-client.txt Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

Similar to  on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved.


The following DreamHost wiki explains how to transparently redirect your root directory to a subdirectory..    The recommended code is..   RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} !^/blog/ RewriteCond %{HTTP_HOST} ^(www\.)?domain\.  RewriteRule ^(.*)$ /blog/$1 [L]   However, the recommended code only works on the www subdomain and restricts access to all root directories other than blog.  Here are my specific questions..   How can I modify the code so it works with any subdomain (any.domain.com) and also works with no subdomain (domain.com)? How can I make domain.com redirect to domain.com/blog while still allowing access to domain.com/any-other-directory ?     UPDATE: This question has been incorrectly marked as duplicate. The suggested post does not answer this specific implementation question about this specific hosting provider. I don't have the reputation points yet to add this to the suggested post, so if someone adds my question to the suggested post then I'll remove this question. Thanks.

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Link Name=ShareFolder Icon=/usr/share/icons/DPL/NetworkShare.png Name[en_US]=ShareFolder URL=smb://servername/sharefolder   This is my .desktop file which has a URL. How do I execute this desktop shortcut in the terminal? If i double click it works perfectly, but I need to execute this in terminal.  I tried . That didn't work for me either but it does if its an "application" shortcut. I'm trying here to execute "link" .desktop file, where you define in the type section (Type=Link) and (URL=smb://servername/sharefolder)

From what I can gather, .desktop files are shortcuts that allow application's settings to be customized. For instance, I have lots of them in my /usr/share/applications/ folder.   If I open that folder in nautilus, I can run these applications just by double clicking its associated file, e.g. double-clicking firefox.desktop runs Firefox. However, I can't find a way to do the same thing via terminal.   If I do gnome-open foo.desktop it simply opens foo.desktop as a text file. If I make it executable and then run it in bash it simply fails (which is expected, it's clearly not bash script). EDIT: Doing exec /fullpath/foo.desktop gives me a Permission denied message, even if I change ownership to myself. If I make executable and do the same command, the terminal tab I'm using simply closes (I'm guessing it crashes). Finally, if I do sudo exec /fullpath/foo.desktop, I get an error reporting sudo: exec: command not found.  That's my question, how can I run a foo.desktop file from the terminal?


I believe this is a bug?  Question-in-question:   User-related:

On a whim the other day, I changed my meta name from Lord Torgamus to Popular Demand.  I just noticed that the old name has "stuck" to the author tag of ; everywhere else on meta, my new name displays as expected.  Is this a feature?  Is it a bug?  Mostly I'm just curious, as I can't think of a strong reason in favor of keeping this behavior or a strong reason for changing it.  A question somewhat like this has been raised before as , but the previous poster implied that the issue had something to do with migration, which my situation shows is not the case.


I have simple PHP test API for my database. It queries MySQL DB and returns JSON. Problem is, some values are in Cyrillic and all I get is a question marks. My PHP code is like this:  <?php mysql_connect ( "localhost", "root", "" ); mysql_select_db ( "uni_database" ); $q = mysql_query ( "SELECT * FROM `students`" ); while ( $e = mysql_fetch_assoc ( $q ) )     $output [] = $e; print  (json_encode( $output ) ); mysql_close ();  ?>   Does anyone know how to encode values from DB to UTF8?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I have been using Stack Overflow for a few months now. Yesterday, after I logged out from the Stack Overflow site, I again clicked on the Log In link, then the "Login with Stack Exchange" image, and I was able to Log in with out entering the my user credentials.  It needs to be told that I had not clicked on the "Remember my Password" option. And this has happened while using . Finally I cleared the browser cache and problem was gone.

The cookies for subdomain, 'openid.stackexchange.com' are not, as claimed, actually removed from the browser upon logging out of stackexchange.com, but they should be.  Applies to: * stackexchange.com, date: January 8, 2012  Desired result:   Upon logging out of Stack Exchange, Stack Exchange OpenID local credentials stored 'in your browser' (or stored anywhere on the user's computer) should actually be deleted, as promised. For example, Stack Exchange OpenID browser cookies actually should be deleted. Logging in again should require explicitly entering one's credentials again. This might be email address and password. It is misleading to claim that (all relevant) 'local credentials in your browser' are deleted, since anyone else sitting down at the same computer can merely click the login links and immediately be accepted as the same, previous user! (See procedure to duplicate, below.)   Procedure to duplicate the problem in FireFox:  Versions (Menu-Help-Troubleshooting Information-Application Basics-User Agent): * Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1   Start FireFox. In Firefox's cookies manager (Menu-Tools-Options-Privacy), click the button, 'Exceptions', enter stackexchange.com and stackoverflow.com, and each time, click the button, 'Allow for Session'. Click the button, 'Close'. Click the button, 'Show Cookies'. Type, 'Stack', select stackexchange.com and stackoverflow.com if they are there, and each time, click the button, 'Remove Cookies'. Close Firefox. Start Firefox. Close webmail notifier windows. Log out of Gmail. Wait ten seconds. Click the back button on the browser to make sure one is not still logged in to Gmail. Open a tab for,  . In , if you have it, allow the domains, 'stackexchange.com' and, 'sstatic.net' and refresh. Click the link at the top, 'login'. On the resulting page, click the box, 'Log in with Stack Exchange.' Enter one's Gmail email address and Stack Exchange password, which results in a successful Stack Exchange login. Click the link at the top, 'logout'. The resulting web page has an orange button labeled, 'logout', above which is presented the text, 'Clicking Log Out will clear all local credentials in your browser.' Click the orange button labeled, 'logout'.   One might think that one has completely logged out safely from Stack Exchange, with no possibility of simply clicking back in. But, not true!   Now the page has the link at the top, 'login'. However, the Firefox Cookie Manager still shows cookies under domains, 'stackexchange.com' and 'openid.stackexchange.com'. Click the link at the top, 'login'. On the resulting page, again click the box, 'Log in with Stack Exchange.' See the login unexpectedly succeed, without entering any email address or Stack Exchange password!


Let's say I have a problem with my wireless connection. What commands should I run to share their output with a tech-savvy friend or an online support community?  For example:   How can I tell if my wireless card is recognised? How can I get information on which wireless networks are within range? How can I tell if I am connected to a wireless, but not the Internet?     I'm asking this question because I'm seeing many questions about problems with wireless connections, without many details, like . It would be useful if I could point to this question so that the asker can improve their question with more information. I'm hoping for a comprehensive answer with all the details, or with links to other generic questions for brevity.

On this site I see hundreds if not a thousand questions being asked about issues with a Wireless LAN adapter not being detected/recognized by Ubuntu. Some mainstream adapters appear to be utterly broken in Linux support, while others just require some simple steps to get it to work.  The options to get it to work appear to be infinitely huge and I have no clue where to get started!  What is considered 'best practice'? What order of things to try is most efficient in terms of time, effort and imposes minimal risk to my Ubuntu installation? Please help me save time and guide me what to do, step by step.


The latest stable kernel (4.15) is supposed to fix some issues with my t300 chi Bluetooth touchpad keyboard. But my current version is 4.13.0-36-generic. I tried using UKUU but this doesn't seem to provide the option I want to try. Help would be appreciated to install this version if it is possible. Thanks.

Currently I'm running Linux-3.0 and I want to update it to Linux-3.3.1 the latest stable kernel release as mentioned at . Can I update to 3.3.1 in Ubuntu without any risk of crashes? I'm updating my kernel regularly as provided by the Update Manager..Currently I have Linux-3.0.0.17..Can I update?  NOTE:  The latest kernel version any user is supposed to use in Ubuntu is updated automatically via the Update Manager, so no action is normally required by user regarding kernel upgrades. What the question author is referring to is mainline kernel, see:


$T$ is an operator on $R^4$. And $T^3 + 3T^2 =4I$. Let $S= T^4 +3T^3 -4I$. Is $S$ invertible?  After a little calculation I found that $x(x+12)^2$ is an annihilating polynomial of $S$. Now the minimal polynomial divides the annihilating polynomial. Now if the minimal polynomial has zero root , then $0$ is an eigenvalue, thus $S$ isn't one-one, hence not invertible. But if $12$ is the only eigenvalue of $S$, then what? I can't go further.

Let $T,S$ be linear transformations, $T:\mathbb R^4 \rightarrow \mathbb R^4$, such that $T^3+3T^2=4I, S=T^4+3T^3-4I$. Then S is:   one-one but not onto onto but not one one invertible non-invertible   (One or more correct options)  My attempt: $S=T^4+3T^3-4I=T(T^3+3T^2)-4I=T(4I)-4I=4T-4I$  How do I go about proving or disproving my options?   My thoughts on options # 1. and 2.: I'm guessing $S$ is one-one if $Ker(S)=\theta$ is one way to go, but how do I obtain the kernel when I don't know what the transformation is? $Ker(S)=\theta$ if $T=I$, which does satisfy $T^3+3T^2=4I$. But so can other $T$s.   My thoughts on options # 3. and 4.: $S$ is invertible if $det(S)\neq0$, which is possible $det(T-I)\neq0$, i.e. $T\neq I$. How do I show that?  Please help!


If $ f $ is a continuous function and $ f ( a + b ) = f ( a ) + f ( b ) $, how do I prove that $ f ( x ) = m x $ for any $ x $ in real numbers, where $ m = f ( 1 ) $? I know that I have to start by showing $ f ( x ) = m x $ for any rational $ x $ and then extend that to any real number with continuity. However, I do not know how to go about it.

The  asks about functions $f \colon \mathbb R \to \mathbb R$ such that $$f(x+y)=f(x)+f(y).$$ It is a very well-known functional equation, which appears in various areas of mathematics ranging from exercises in freshman classes to constructing useful counterexamples for some advanced questions. Solutions of this equation are often called . Also a few other equations related to this equation are often studied. (Equations which can be easily transformed to Cauchy functional equation or can be solved by using similar methods.) Is there some overview of basic facts about Cauchy equation and related functional equations - preferably available online?


I have an appendix for a thesis with more than 100 images. The problem I have is that the generated index for those images glues the numbers with the caption.  Here is an image of what is happening:   However, for images below 100, everything seems to be fine:   I am using a template from my university, which I present here:      How can I fix this problem?

I have many images in a part of my document, now the list of figures numbers collide with its respective image caption as seen below. There would be enough space to move the text a bit more to the right... is there any way to reconfigure the LOF?


My daughter is traveling to Spain from the US. She wants to stay longer than 90 days. She holds passports for both Ireland and the US. Which passport should she use to book her flight? It appears that she needs to use her Irish passport for the flight but her US passport for leaving and entering the US.

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


As the question says, what exactly is the function of the !== operator? (Exclaimation, Equals, Equals).  Yes there are two equal signs. I found it .   function endsWith(str, suffix) {      return str.indexOf(suffix, str.length - suffix.length) !== -1;   }    Is it a typo? I doubt it. It is an old post and with so many upvotes, it should surely have been corrected one day or the other.  Or is it a valid operator? If so, what does it do?

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


Has someone ever garthered all the different fields in maths (single variable function analisis, multivariable analisis, complex number analisis, number theory, graphs, succesions, etc) and made a (vague at least) map of what is needed to know what or at least what are the names of all the different things and concepts that are known to mathmaticians?  I would like to know at least the names of the stuff that i am still ignorant about so that i can look up a book or something about it and read it up.

This question is motivated by a little anecdote. I was at home teaching some secondary school math to a relative. At some relax time, he glanced at a book I had over the table - it was some text about analytical number theory that I had recently bought, second hand- and I  explained him that that was an area of mathematics quite arcane to me, that I'd like to learn something about it in some future, but I had little hopes...   He looked puzzled for a moment, and then asked me: "But, wait a moment... You don't know all the mathematics?"  This happened months ago, and I'm still laughing. But also (and here comes the question) I'm still thinking about how to make some picture of this issue: the big extension of "the land of mathematics", in diverseness and ranges of depth - and the small regions that one has explored.  I was specifically looking for some kind of bidimensional (planar?) chart, perhaps with the most basic/known math kwowledge in the center, and with the main math areas as regions, placed according to its mutual relations or some kind of taxonomy.   (I guess this should go in community wiki)


In   #include <unistd.h> int execve(const char * pathname , char *const  argv [], char *const  envp []);   argv [0] of execve corresponds to argv[0] in the main function of the new program, and is thus typically the same as  the basename component of the pathname argument.  Is it a requirement that we should always follow?  When a program file can be invoked by different values of argv[0], does that rule/convention mean that when I invoke a program file and want argv[0] of its main() to have a specific value,  I have to create a symlink to the program file named after the value of argv[0], and invoke the program by the symlink? Or not necessarily? For example,  says     Bash runs in POSIX mode when argv[0] is sh. It runs as a login shell when argv[0] begins with -.   Does that mean that    to invoke bash in POSIX mode, I have to create a symlink /path/to/sh to /bin/bash and invoke bash by execve("/path/to/sh", argv, ...) with argv[0] pointing to string "sh"? Is this way preferrable over execve("/bin/bash", argv, ...) where argv[1] points to string "--posix" and argv[0] doesn't matter? to invoke bash as a login shell, I have to create a symlink /path/to/- to /bin/bash and invoke bash by execve("/path/to/-", argv, ...) with argv[0] pointing to string "-"? Is this way preferable over execve("/bin/bash", argv, ...) where argv[1] points to string "--login" and argv[0] doesn't matter?   When is it useful that argv [0] of execve  is not the same as the basename component of the pathname argument?

Typical Unix/Linux programs accept the command line inputs as an argument count (int argc) and an argument vector (char *argv[]). The first element of argv is the program name - followed by the actual arguments.   Why is the program name passed to the executable as an argument? Are there any examples of programs using their own name (maybe some kind of exec situation)?


I am reading S. Roman's book "Field Theory". In chapter $1$ I found the following exercise  Let $F^*$ be the multiplicative group of all nonzero elements of a field $F$. We have seen that if G is a finite subgroup of $F^*$, then G is cyclic. Prove that if $F$ is an infinite field then no infinite subgroup  $G$ of $F^*$ is cyclic.  I think that the question is wrong; for instance, if $F = \mathbb{Q}$, then the set $G = \{ 2^n : n \in \mathbb{Z}\}$ is an infinite cyclic subgroup of $\mathbb{Q}^*$  am I right or am I misunderstanding something?

I am stuck with the proof of below expression;  "If F is an infinite field, then no infinite subgroup of F* (the multiplicative group of F) is cyclic."  anyone can help?


Following Ramond, 1.5 Field Theory, it is mentioned that the classical Lagrangian density in (workable for HEP) QFT  theories has to be Real, otherwise total probability is not conserved. Can someone give an example or elucidate more? How it is related to the non-unitarity of the S-matrix? A non real action implies a non unitarity of the S-matrix?

The hermiticity of operators of observables, e.g. the Hamiltonian, in QM is usually justified by saying that the eigenvalues must be real valued.   I know that the Lagrangian is just a Legendre transformation of the Hamiltonian and so is also hermitian.  I am wondering if there is some other reason that the Lagrangian must be hermitian in QFT, this also made me question, why is it necessary that the action be real? am I missing some other underlying principle here?


What is this linguistic perception phenomenon called?     Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.     Is there a technical/academic term for it?

I read this sometime ago,     Aoccdrnig to a rscheearch at   Cmabridge uinervtisy, it deosn't mttaer   in waht oredr the ltteers in a wrod   are, the olny iprmoetnt tihng is taht   frist and lsat ltteer is at the rghit   pclae. The rset can be a toatl mses   and you can sitll raed it wouthit   porbelm. Tihs is bcuseae we do not   raed ervey lteter by it slef but the   wrod as a wlohe.   I'm guessing that the Cambridge research probably doesn't exist, but is it true that we can normally understand a sentence whose letters are scrambled in this way?


How to create a webform node with multi lingual language like french,spanish in drupal 6. so that when i hit the url it should display in particular language? webform localization is not supporting in drupal6. is there any other way around to do this. pls help?

I have a default Node for English, which will be translated when user logs in based on the user locale. Beside I need to create a separate node for ja(Japanese) like (mydomain.com/node/7).  I created a node(nid=7) by changing the 'Language neutral' to 'Japanese' language. when I hit the node it not gets translated to Japanese.  Is there any way to get it translated?


I know it's a frequently asked question, but I don't manage to find a solution.  I have a new Asus laptop (Asus S551LB-CJ003H) on Windows 8.1, and a Logitech Mouse M125. The problem is : when I type on my keyboard, the mouse left click is disabled. And, worse, it still lasts one second after the end of typing.  I have tried to go to Mouse and Keyboard properties in the Control panel, but I didn't find the option to disable this behavior. My mouse driver is up to date. And I haven't the possibility to downgrade it.  Finally, the problem also occurs for my touchpad. (but this is less annoying)

The problem is present in the whole system not only in games: desktop, chrome, games, everywhere. When I press any "input key" on a keyboard for example in desktop I can't select the file by left mouse button OR by tapping the touchpad for about one second(right button works immediately). Later on the LMB works well. There is NO delay, button is just deactivated for a second. In games that means that when I run I cannot shoot for example. When I switched LMB and RMB functions in windows control panel still the LMB is getting disabled and RMB works fine. By "input key" I mean letter or a number, keys like Alt, CapsLock, Ctrl does not affect touchpad. I do not remember that problem when I used Windows 7. USB mouse works like it should.  The problem existed when I was using Elantech touchpad driver and after I uninstalled it and used Windows 8.1 generic driver.  EDIT I installed the Elantech drivers and set values to 0 at every disable... key. But the problem is still present.  EDIT 2  THE LAPTOP IS Acer V3-571G  I have turned off disabling function in touchpad but it did not fix it. I know that touchpad is NOT broken down.   Turned on the animated touchpad icon of elantech drivers and put it on the task bar(on a picture) When I type the letter and press the LMB the dynamic icon displays the click but it is ignored.


We have been using New Relic to monitor our server load but it aggregates all of the CPUs into one measure. Is there a good tool that is similar but will show individual CPU load?

For a more comprehensive list of monitoring tools and their features, check out .   As the question states, what are the most commonly used tools used for this task and what are their strengths and weaknesses?


I am writing a simple program in C++ that asks a user to enter an operation they want to perform on collection of elements (vector). In here I'm using the switch statements in order to recognize the operation key the user entered. In my case 'm' or 'M' I am getting an error error C2360: initialization of 'sum' is skipped by 'case' label. The error disappears when I wrap the case with curly braces. As I know it is not obligatory to wrap each case body with curly braces so I am wondering why am I getting such an error when the body of this case is without curly braces. Any idea? #include <iostream> #include <vector> using namespace std;  int main() {     vector <int> vec{};     char choice{};      do     {         cout << "\nP - Print numbers in list" << endl;         cout << "A - Add a number to the list" << endl;         cout << "M - Display mean of the numbers" << endl;         cout << "S - Display the smallest number in the list" << endl;         cout << "L - Display the largest number in the list" << endl;         cout << "Q - Quit" << endl;          cout << "Enter your choice: ";         cin >> choice;         cout << "\nYour choice: " << choice << endl;          switch (choice)         {         case 'p':         case 'P':                      if (vec.size() == 0)             {                 cout << "[] - empty list" << endl;             }             else             {                 cout << "[ ";                 for (auto i : vec)                 {                     cout << i << " ";                 }                 cout << "]" << endl;             }             break;                   case 'a':         case 'A':                      int num;             cout << "\nEnter a number: ";             cin >> num;             vec.push_back(num);             cout << num << " added to the list" << endl;             break;                   case 'm':         case 'M':                      double average;             double sum{};             for (auto i : vec)             {                 sum += i;             }             average = sum / vec.size();             cout << "\Average is: " << average << endl;             break;                   case 's':         case 'S':                      int min_val = vec[0];              for (int i = 0; i < vec.size(); i++)             {                 if (min_val > vec[i])                     min_val = vec[i];             }              cout << "MIN is: " << min_val << endl;             break;             }               } while (choice != 'q' && choice != 'Q'); }

I've always wondered this - why can't you declare variables after a case label in a switch statement?  In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:  switch (val)   {   case VAL:     // This won't work   int newVal = 42;     break; case ANOTHER_VAL:     ...   break; }     The above gives me the following error (MSC):     initialization of 'newVal' is skipped by 'case' label   This seems to be a limitation in other languages too.  Why is this such a problem?


In my simple database, it contains text of like, example, soldiers.  Name:Rank:Gender:Age:Years of Service  Tom Corporal:Recruit:Male:19:2 Nicole Sergeant:Corporal:Female:30:10 Daniel Recruit:Sergeant:Male:40:19   And my script goes like this:  echo "Enter name: " read name  echo "Enter rank: " read rank  echo "Enter gender: " read gender  echo "Enter age: " read age  echo "Enter Years of service: " read years  grep $name database.txt   If I enter "Corporal" into name, the output will show  Tom Corporal:Recruit:Male:19:2 Nicole Sergeant:Corporal:Female:30:10   because the string matches under the section name and rank. How do i use delimiter : to categories the search, so if i enter my conditions under rank, it will search just the rank category and not everything else.   Thanks in advance.  And do up my question instead of down voting.

Lets say I'm doing a database for fruits. Using a text file for it, inside contains, in this format,  (Fruit:Quantity:Cost) Apple:10:1 Orange:20:2 Pears:10:3 Banana:20:4  10 Apples at $1 each. 20 Oranges at $2 each. 10 Pears at $3 each. 20 Bananas at $4 each.   My simple script goes like this:  echo "Enter fruit to find" read fruit  echo "Enter quantity to find" read count  echo "Enter cost to find" read cost  grep $fruit FruitDB.txt     It will display the fruits in the database.  But how do i use grep and cut together to find just by the quantity or the cost. In the quantity count area, let's say i enter 20, it will display the Oranges and Banana. Or when i enter count and cost, it will display just those that meet the conditions.


I am trying to create a metadata table on one database providing information about the tables on a database.  The goal is to show example data (top 10) for the each row in a table within a single column on the metadata table.   Example:    Data Source  on SQL Server "Source System"  ╔════╦═══════════════════╗ ║ ID ║   Name            ║ ╠════╬═══════════════════╣ ║ 1  ║  John             ║ ║ 2  ║  Jane             ║ ║ 3  ║  Joe              ║ ║ 4  ║  Jimmy            ║ ╚════╩═══════════════════╝     Metadata Table on SQL Server "Metadata"  ╔═══════╦═════════════════════════╗ ║ Col   ║         Example         ║ ╠═══════╬═════════════════════════╣ ║ ID    ║  1, 2, 3, 4             ║ ║ Name  ║  John, Jane, Joe, Jimmy ║ ╚═══════╩═════════════════════════╝   Any suggestions?  Pivot seems to move the rows to columns where as I need many rows to just one column.

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


I'm working on a rather tough question (well, at least for myself):     Show that no commutative group of composite (or infinite) order is simple.   Any ideas on how I should approach this? All I know is that groups that contain no proper normal subgroups are simple groups. How can I use this to generalize it to any commutative group? Any hints/suggestions are welcome, since that is all I am able to come up with, at the moment at least.

Just wanted some feedback to ensure I did not make any mistakes with this proof. Thanks!  Since $G$ is abelian, every subgroup is normal. Since $G$ is simple, the only subgroups of $G$ are $1$ and $G$, and $|G| > 1$, so for some $x\in G$ we have $x\neq 1$ and $\langle x\rangle\leq G$, so $\langle x\rangle = G$. Suppose $x$ has either infinite order or even order. Then $\langle x^2\rangle \leq G$ but $\langle x^2\rangle \neq \langle x \rangle$, a contradiction. So $x$, and therefore $G$, has odd order, and by Feit-Thompson, $G\cong Z_p$ for some prime $p$.  Edit: Thanks, I see that Feit-Thompson is too much.  Since $G$ is abelian, every subgroup is normal. Since $G$ is simple, the only subgroups of $G$ are $1$ and $G$, and $|G| > 1$, so for some $x\in G$ we have $x\neq 1$ and $\langle x\rangle\leq G$, so $\langle x\rangle = G$. Suppose $x$ has infinite order. Then $\langle x^2\rangle \leq G$ but $\langle x^2\rangle \neq \langle x \rangle$, a contradiction. So $x$, and therefore $G$, has finite order. Suppose $x$ has composite order $n$ so for some $p > 1$ that divides $n$, $\langle x^p \rangle$ is a proper non-trivial subgroup of $G$, so $G$ is not simple. So $G$ is a cyclic group of prime order.


I use ubuntu 16.04. My Vim doesn't have Python support. The thing is that I installed vim, vim-gnome, vim-nox, I surfed net for hours and tried to build vim from source, I deleted some stuff like vim-tiny and ubuntu-minimal, whatever I did - nothing worked.  Can anyone help me to get that Python support for Vim?

Although Ubuntu 16.04 release notes mention that:  The default VIM package has been built against python3 instead of python2.  Yet after I installed vim with the following command:  sudo apt-get install vim   And checked:  vim --version   It showed:  -python -python3   Is it a bug? How do I get vim with Python support?


Maybe this question seems easy, but is there a strategy or a property to look for when demostrating a space is non-metrizable? Because a part from the fact that I can't find a metric generating the space, I cannot seem to find a way to prove that such does not exist.

Suppose I am asked to show that some topology is not metrizable. What I have to prove exactly for that ?


I'm a linux user, and I only use Windows when I have to. Hence I just wrote a bunch of files from Linux to a NTFS drive to read them in Windows 8.1 64bit. While most of the files work, one file can't be read by any application. I've noticed that this particulary file has a lenghty filename, so I tried renaming it to a shorter one, which fails from both the GUI and the command line ("filename too long").  I've already figured out that surprisingly there are still filename limits in Windows (aren't we in 2017?). But how can I access the contents of that file, if I can't even rename it to a shorter filename? I'd expect that to work. Is it possible to disable the filename limit for e.g. one reboot so that I can rename that file? I haven't access to my linux right now and there should be an easier way than creating a linux thumb drive for renaming a file, shouldn't it?  Any ideas are very appreciated, thanks in advance!

I have copied some data from my Linux machine to my external hard disk. When I want to read some files on my Windows machine, I can't open it. I get the below error  The specified path does not exist   On the other hand I can't rename or copy the same file, with error  The file name you specified is not valid or too long   I have tried to use rename function in command prompt (with and without quotation marks):  rename "Long Name of The File.pdf" "short.pdf"   but I get this error (I don't know why?):  The syntax of the command is incorrect   Can you please help me?


I have old site in asp.net and i want to redirect the pages into new wordpress site,  Old domain :  New One : manakjewels/tradeshow.htm  How to do this, please explain me step by step. That will be really helpful.

How do i redirect a url to domain .  eg.  -->  How do i redirect a non-www to www WITHOUT a slash at end ?   eg  --->


I had some trouble with logout button, so i use confirm(); with on click event on jQuery. I use if statement for confirm that the user is click Ok or Cancle  Button script :
Logout
    Script that working :  $("#logout-btn").on("click", function() {     var acc = confirm("Are you sure want Logout?");     if (acc == true) {         window.location.href = "logout.php";     }else{      } });   Script that isn't working :  $("#logout-btn").on("click", function() {     var acc = confirm("Are you sure want Logout?");     if (acc == true) {         window.location.href = "../logout.php";     } else {      } });   The different between script just different folder but the second script when i click Cancel it still logout, What is the problem??

I have some HTML and jQuery that slides a div up and down to show or hide` it when a link is clicked:

     YOU CLICK THIS TO SHOW/HIDE

CONTENT TO SHOW/HIDE

   $('div.toggle').hide(); $('ul.product-info li a').click(function(event){   $(this).next('div').slideToggle(200); }   My question is: How do I use preventDefault() to stop the link acting as a link and adding "#" to the end of my URL & jumping to the top of the page?  I can't figure out the right syntax, I just keep getting an error saying      preventDefault() is not a function.


I am using Lubuntu 14.10, QGIS 2.6, and Ubuntu GIS(unstable). QGIS was used to use GDAL 1.10, and can import ERDAS ecw format. But after GDAL upgraded to 1.11, QGIS couldn't import ecw images. How to solve this problem?

I try unsuccessfully to install the ECW support (mainly to use ECW file in QGIS 2.2). We attempt to follow and adapt the howto provided by .  My first supprise was the repository ubuntugis-unstable is unavailable for trusty and the repository  doesn't have libgdal-ecw-src package. Finally in desperation we add ubuntugis-unstable for the raring distribution in source.list.  And apply the following commands   chmod +x ERDAS-ECW_JPEG_2000_SDK-5.1.1.bin ./ERDAS-ECW_JPEG_2000_SDK-5.1.1.bin # Select option desktop read only sudo cp -r ERDAS-ECW_JPEG_2000_SDK-5.1.1 /usr/local/ sudo ln -s /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.1.1/Desktop_Read-Only/lib/x86/release/libNCSEcw.so /usr/local/lib/libNCSEcw.so sudo ldconfig sudo apt-get install libgdal-ecw-src sudo gdal-ecw-build /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.1.1/Desktop_Read-Only   The ECW format seems to be installed  gdalinfo --formats | grep -i ecw   ECW (rw+): ERDAS Compressed Wavelets (SDK 5.1)   JP2ECW (rw+v): ERDAS JPEG2000 (SDK 5.1)   But .... Gis crash when a ECW raster file is open with the following message :   QGIS died on signal 4Abandon (core dumped)   If anyone have an idea


when I start up my computer I get the message "the volume "boot" has only 0 bytes disk space".  When I go into my boot file I have files in there that are empty.  I have opened them with firefox and office and both are empty.  Is it safe to delete those files?  There are vmlinuz. files and initred.img and system.map file names.

Every time I install a new Linux kernel, it gets left in the grub_config, making the boot menu longer each time.    I know I can manually search through the installed packages and remove them.  Does Ubuntu provide any easier way to clean them up or keep them from showing in the boot list?


This problem is from "An Introduction to Number Theory" by Ivan Niven. Define a to be a cubic residue if $x^3 \equiv a \mod p$ has solutions. Prove that if $p=3k+2 ,$ then every number that is in reduced residue system is a cubic residue. And if $p=3k+1$, only one-third of the reduced residues are cubic residues.I did find a solution . But, I've not covered the portion in the book after section 2.5(self-study). I attempted the question in the following way and would appreciate any hints to reach to conclusion:  As $B=\{1,2,\dots ,p-1\}$ is a reduced residue system, it should be enough to prove that $i^3 \equiv j^3\mod p \Rightarrow i\equiv j\mod p$. So, one part of it boils down to  If $p=3k+2$, then show that $p \nmid i^2+j^2+ij $, if $i\neq j \wedge i,j \in B$. I have no idea how to use the $p=3k+2$ part for proving this.

If $p$ is congruent to $2 \pmod 3$, how can I prove that all $a$, $1 \le a \le p-1$ are cubic residues $\mod p$?  Here's what I've done:  $1^3$ congruent to $1 \pmod p$ thus, 1 is a cubic residue, Also $(p-1)^3=(p-1) \pmod p$ implies  $$(p-1)^3 - (p-1) = (p-1)[(p-1)^2 -1] = (p-1)(p^2 -2p) = p(p-1)(p-2) $$ implies $$p|(p-1)^3 -(p-1)$$ Thus  $p-1$ is a cubic residue $\mod p$. Now I don't know how to show for $1\lt a \lt p-1$ are all cubic residues when $p$ is congruent to $2\pmod 3$.


I made a string into .trim(). I wanted to try and reverse it, but I can't seem to do it.  For example,   String a = "    apple     ";   I did, a = a.trim(); such that:  assert(a == "apple");   I want to be able to get back to the original padded text.  assert( a == "    apple     ");

Is there some easy way to pad Strings in Java?  Seems like something that should be in some StringUtil-like API, but I can't find anything that does this.


public void setAns() {          if("TF".equals(queType)){            ans.add("True");            ans.add("False");         }         else if("MC".equals(queType)){             System.out.println("Enter choice 1 of 4");              String ch1 = StdIn.readLine();             ans.add(ch1);             System.out.println("Enter choice 2 of 4");             String ch2 = StdIn.readLine();             ans.add(ch2);             System.out.println("Enter choice 3 of 4");             String ch3 = StdIn.readLine();             ans.add(ch3);             System.out.println("Enter choice 4 of 4");             String ch4 = StdIn.readLine();             ans.add(ch4);          }         else if("L5".equals(queType)){             ans.add("1");             ans.add("2");             ans.add("3");             ans.add("4");             ans.add("5");         }     }   ans is an Arraylist . I am trying to add the user's input which is String. When i run it it prints the first message but has an error when i enter the value for "ch1". It basically doesn't read it and it prompts me for a null pointer exception

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I would like to run Photoshop Elements 14 on my Ubuntu 15.10 laptop.  Has anyone had success in this? I am olllddd Windows user (1985) and have finally saw the light.  New to ubuntu, but you can teach 'old dog' new tricks. Any one have some help? Thanks, Jim941

Can .exe and .msi files (Windows software) be installed in Ubuntu?


In every beta site, we usually see the Site Stats side bar in the right hand side, at the end of side bar there is link for more stats in Stack Exchange site. For an example: In  when hover the link it shows the URL as , click on that it will redirect to Stack Exchange All sites page.  But what is the use of the #health at end of the URL, it is expected to highlight the Health beta in the All sites page? or some other purpose?

Each beta site has such box in the right sidebar of the homepage:    Expected behavior when clicking "stack exchange" is the list of sites displayed and auto scrolled to the relevant site, or if grid view then the relevant site will auto expand itself. Observed behavior: it's just showing the list of sites and that's it. The link raw URL is something like http://stackexchange.com/sites?expand=true#movies so it looks like it used to work before and got broken at some point. (no named anchors anymore)


I know that on cutting a spring into n equal pieces, spring constant becomes n times.  But I have no idea why this happens.   Please clarify the reasons

I've always been taught that the spring constant $k$ is a constant — that is, for a given spring, $k$ will always be the same, regardless of what you do to the spring.   My friend's physics professor gave a practice problem in which a spring of length $L$ was cut into four parts of length $L/4$. He claimed that the spring constant in each of the new springs cut from the old spring ($k_\text{new}$) was therefore equal to $k_\text{orig}/4$.   Is this true? Every person I've asked seems to think that this is false, and that $k$ will be the same even if you cut the spring into parts. Is there a good explanation of whether $k$ will be the same after cutting the spring or not? It seems like if it's an inherent property of the spring it shouldn't change, so if it does, why?