I installed Ubuntu 14 a day ago, overwriting my Windows. Now I want to switch Ubuntu back to Windows 8 using a product key that I have in an email.   How do you do this? So far I have had no luck.

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


I have this following query and I want to display the results where masini > 2 but when I run the query it says that 'masini' is not an existing column but it's the name of a custom column I defined on the first row. I am new to MySQL.. can anyone point me in the right direction? This is my query:  SELECT pers.serie_buletin AS persoana, COUNT(prop.serie_buletin) AS masini  FROM persoana pers  JOIN proprietate prop ON pers.id_persoana = prop.serie_buletin WHERE masini > 2 GROUP BY persoana ;   I defined the column on this line, in this part "COUNT(prop.serie_buletin) AS masini" but it says "Error Code: 1054. Unknown column 'masini' in 'where clause'". What am I missing?

I have a simple query:  SELECT u_name AS user_name FROM users WHERE user_name = "john";   I get Unknown Column 'user_name' in where clause.  Can I not refer to 'user_name' in other parts of the statement even after select 'u_name as user_name'?


In the books, it's established that Voldemort is seen as the greatest dark wizard of all time (well, at least the greatest until now) by the wizarding world.  Given the hints and facts about Grindelwald in the books, I was always a bit confused and now, after the films, I'm even more surprised by this. The common knowledge about both, in the timeframe of the books, includes facts that suggest Grindelwald being the greater dark wizard:   Grindelwald managed to rule (at least in eastern Europe) for quite some time, Voldemort never ruled even the UK in the first war and only ruled for some months in the second. Grindelwald had his own concentration camp (Nurmengard). Voldemort used Azkaban for a similar purpose, but that's in the last book, well after his reputation was already established. Grindelwald's followers must have been numerous, given that he managed to rule parts of Europe and have his own concentration camp. You need quite a few people to run a country (or a prison). Voldemort's followers, for the most part, were his few Death Eaters and some outcasts like werewolfs. He is not portrayed as the charismatic leader people rally to (he is portrayed like this during his school time, but this couldn't have any impact on his reputation, because most wizards won't ever know that Tom Riddle and Voldemort are the same person).  Grindelwald was a seer, and a very powerful one - he accurately predicted events 18 years in the future. Only Trelawney managed to do something similar, in her prophecy about Harry and Voldemort, albeit in a less precise manner. As far as we know, this branch of magic was simply off-limits to Voldemort. Voldemort was brought down for the first time because of his own miscalculations, whereas Grindelwald was beaten in a duel. Grindelwald had to be stopped by someone, while all that Voldemort needed to fall was his own ignorance.    Please keep in mind that I'm not asking who actually is the greater dark wizard. My question is purely about how the common opinion on that matter came to be. Therefore, all informations that are not known to wizardkind at large aren't important (that, for example, is why I'm not mentioning Voldemort having Horcruxes or Grindelwald mastering the Elder Wand - nearly nobody knows about this, so it's not important for the public opinion).

At the height of their powers, Grindelwald commanded the entire European continent save Britain, whereas Voldemort affected mostly just Britain. Since the population of the whole European continent is higher than Britain's, that means Grindelwald likely had more followers than Voldemort.  Why is Grindelwald considered second darkest wizard and not Voldemort?


In the  it says:  Depending on who deleted your post, you may or may not be able to undelete it. If it was deleted by [...] from review (without three trusted users voting to delete): you can undelete it, but doing so will alert moderators  However, a moderator has just informed me that it does not work like this. If any of the reviewers was a trusted user and they used their delete instead of the recommend deletion then the author of the answer can't undelete the answer by themselves. To undelete it would require two more trusted users's votes. To make it clear there are 3 possible scenarios:  Review ends with 3 delete votes by trusted users. Review ends with 4/6 recommend deletion votes and none of them was cast by a trusted user. Review ends with a mix of 1 or 2 delete votes and recommend deletion votes.  My understanding based on the excerpt above is that only in the first case the OP cannot undelete it themselves. In the remaining two situations the answer can be undeleted by the author, but such action would raise a moderator flag. When can the author of the answer undelete a post deleted via review and has it always been like this?

In the last few days, I've come across four instances where a non-answer was left by a new user, that answer was deleted by the system after six Recommend Deletion votes in the review queues, then the poster promptly reversed that deletion with a single vote.   In each case, the answer had piled up quite a few "not an answer" or "very low quality" flags, which were all cleared the instant the answer was deleted by the system. However, the poster was able to single-handedly override all that when they undeleted their non-answer with a single vote. This required others to go and re-flag the answer and for a moderator to step in and delete it so that they couldn't restore the answer.  This seems like a bad design. A user should not be able to by themselves overturn deletion of their answers that were removed by a community vote in review.  I propose that answers deleted via five Recommend Deletion votes from the review queues require the normal three undelete votes that posts deleted using regular community delete votes do. This would prevent users from bringing back their non-answers after the flags on them had been cleared, potentially allowing non-answers to come back and clutter up the site.


I don't know if there's some standard symbol to represent the Power Set in Latex. According to  there are some possibilities:     I think the first one would be the most appropriate because the second one is used for probability, the third one represents positive numbers, the forth one is the symbol for Weirstrass's elliptic functions, and the last one is used for structures and sigma-algebras. The problem is I think this first "p" is ugly, at least to my taste. I wish there was some alternative to it, for example I really love the symbol that Suppes and Halmos use in their books:    Does this symbol exist in any package?  Note: It would be nice if Weirstrass's symbol existed in form of uppercase letter, this would be a good alternative I think.

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I'm a programmer and I have made a video playing platform. But I'm not sure about hardware requirements for such a system. I think this platform will have some 10000 customer in the beginning. I do not know how to calculate but let's take these 10000 people will spend at least one hour watching videos there. What are server requirements for such a platform or how to calculate these specifications?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


As a temporary workaround for , which  is limited to libarchive, I would like to finder another program capable of decompressing RAR files, preferably this would be a problem in one of the standard repositories. Any suggestions?  I am running Ubuntu GNOME 16.04 with GNOME 3.20.

I have received an .rar which I wish to unpack as it contains something rather important to me that I need to really have now. However even though I can view the contents of the .rar archive in the Archive Manager, I am unable to extract it due to this error:    The archive should contain two folders within it, each though contain at least 10 audio files as well as a PDF file each (I don't know what the contents exactly should be except for there should be audio files in there, and the content I have described is what I can see from the Archive Manager's view). So the only thing I am left with except the error is one of the folders and one of the audio files, but it says it has 0 bytes in it.  So how exactly do I fix this problem? I am running Ubuntu GNOME 16.04.1 with GNOME 3.20.  Information Update:  In reply to a comment requesting the output from the dpkg -l unrar unrar-free command:  Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name           Version      Architecture Description +++-==============-============-============-================================= un  unrar          <none>       <none>       (no description available) dpkg-query: no packages found matching unrar-free


It was shown in a local TV show that larger the brain, larger the intelligence of that organism.   Does that mean if more number of neurons present in the brain canit helps in improving the intelligence of that organism?

Thanks for looking. First off, I am not a biologist, just a curious layman, so I apologize in advance if this isn't a "good" question.  Please don't downvote me into oblivion. I read today that the human brain has about 100 billion neurons and that got me wondering: is that number pretty standard for everyone or does someone like say, Einstein, have many more neurons than this daft poster. Question Is there a correlation between total neuron count and intelligence, or does intelligence depend more on the way neurons are used--or some other factor like previous experience--rather than their total count? Can this question be answered? There are two very valid points-of-view posted as answers below, but it sounds like we simply don't have a solid answer to this question at this point in time, so I hesitate to select a "correct" answer.


I need to send texts to my kids while they are away from Wi-Fi. I pay for a text message service through my carrier, but can't force my phone to send a text message instead of an iMessage with iOS 10.  So are all our iPhones incapable of sending text messages to people without data plans now?

I just updated to iOS 10 and I want to send an SMS instead of an iMessage to a friend. In iOS 9 I could continuously touch an old message and press send as a text message (or something like that). Now in iOS 10 I don't see anything relevant.


Looking at some old code of mine, I see that out of clumsiness I defined a destructor like so :  ~ResourceManager(void);   This not only compiles, but works as expected. I changed it of course to   ~ResourceManager();   but was I too quick to refactor? Is the first version correct and good C++ style?   EDIT  Since the question was closed and won't get any chance for proper disambiguation, I should put the related quote from the standard that answers this question, when destructors are put in perspective  12.4 Destructors        A special declarator syntax using an optional function-specifier (7.1.2) followed by ˜ followed by the destructor’s class name followed by an empty parameter list is used to declare the destructor in a class definition. In such a declaration, the ˜ followed by the destructor’s class name can be enclosed in optional parentheses; such parentheses are ignored. A typedef-name shall not be used as the class-name following the ∼ in the declarator for a destructor declaration.      So the standard mandates an empty parameter list. Maybe backwards compatibility with C  practices for free functions (where f(void) is the way to declare an empty parameter list) took destructors along with them in implementations, but it certainly doesn't seem to be valid C++.

Consider these two function definitions:  void foo() { }  void foo(void) { }   Is there any difference between these two? If not, why is the void argument there? Aesthetic reasons?


If the object completely settle down at the bottom of the vessel than also it experience buoyant force?

Let's say a 10N cube (in air, on Earth) rests flat on a scale at the bottom of a tank of water, and the scale reads 8N, so there is 2N of buoyant force on the cube.  How does the buoyant force manifest itself on the cube?  I assume the force is normal to the surface of the scale, but if there isn't any water under the cube, how does the water push up on the cube?


The rate of flow of electrons is known as current. When we switch on a light bulb, then it lights immediately. If drift velocity of electrons is so small--at least on the supply on 220V (supply of my home)--then why does the light bulb light up so quickly?

Drift velocity (explained to me as how fast the electrons are moving) is really slow. My book says the electrons move at around 10 mm/ s.  If electrons move so slowly how do circuits work so fast? If you make a basic circuit with just a light bulb, the bulb lights up almost immediately after you connect the wire to the positive terminal.


This command is being run in Minecraft 1.12:  /summon falling_block ~ ~1 ~ {Block:repeating_command_block,Data:1,TileEntityData:{TrackOutput:0b,Command:execute @a ~ ~ ~ execute @e[type=ender_pearl,r=5,c=1] ~ ~ ~ teleport @p ~ ~ ~},Time:1,Passengers:[{id:falling_block,Block:chain_command_block,Data:1,TileEntityData:{TrackOutput:0b,Command:execute @a ~ ~ ~ kill @e[type=ender_pearl,rm=1,r=5]},Time:1}]}  The command block returns with:  Data tag parsing failed: Expected '}' but got '@' at: ...a:      {TrackOutput:0b,Command:execute @<--[HERE]   What is wrong with this?

I am trying to lock some boxes in a map of mine, and I used this command:   /blockdata 10 4 9 {Lock:Elyiana's Mage Key}   At first it worked, but then when I logged back on the next day it gave me this error message:    Data tag parsing failed: Expected '}' but ''' at: {Lock:Elyiana'<--[HERE]     I don't know why it doesn't like the apostrophe in the key's name. I would change it, but it already worked and locked some other items. My version is 1.12, does anyone have an answer to my problem?


I have first installed Windows 7 ultimate, then I installed Ubuntu 12.04 through WUBI. Then after few days I have upgraded it to 14.04 and the whole upgradate process finished smoothly without any error.   Then the laptop was restarted and then it can't mount the directories. It displays the message like:  mount: mounting /dev/loop0 on /root failed: Invalid argument mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /proc on /roo/proct failed: No such file or directory` `Target filesystem doesn't have requested /sbin/init. No init found. Try passing init= bootarg.  BusyBox v1.21.1 (Ubuntu 1:1.21.0-1ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs)   How should I proceed?

I have Ubuntu 12.04 installed like an app on windows 8.1 (Ubuntu 12.04 allow to be installed like an app in Windows 8.1 and it can be removed when you don't need it any more from Control Panel). Usually, to chose what os to boot when you start the laptop, you can choose between windows 8.1 and Ubuntu after windows logo appeared at start up and that was ok until I made this upgrade. Now when I try to choose Ubuntu the laptop try to boot it but, after that full colored screen is showed the screen go black and this messages appear:  mount: mounting /dev/loop0/ on /root failed : Invalid argument mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /proc on /root/proc failed: No such file or directory Target filesystem doesn' t have requested /sbin/init No init found. Try passing init = bootarg.  BusyBox v1.21.1 (Ubuntu 1:1:21.0-1ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in commands  (initramfs) _   I don' t know what to do after this screen appears. Please help !


Might be a silly question. But here it is: Say we have all the factors of a number, 84 for example. Those numbers would be 1,2,3,4,6,7,12,14,21,28,42,84. Is it possible for there to be a number that would evenly divide one of the factors of 84, without being able to evenly divide 84 itself? For the number 84 it doesn't seem to be possible, but does there exist a number where that is possible?

As the title says, if a number is divisible by a number, is it always divisible by that number's factors?  An example being that $100$ is divisible by $20$, it is also divisible by $10, 5, 4, 2$ as well?  Does this always apply?


What program can be used to output the definition of some macros or some environments provided by a particular package without having to read all the package file. A program that output only the needed definition.  example: how to check the definition of the TheSolution environment provided by the exam class

Say I want to redefine the itemize environment, or make a modified version of it. I want to know how it is currently defined. Where do I find this information? If it's some particular package command, I can just look at the .sty file for that package, but if it's something more basic, I don't know where to look...  Is there a reference manual of where all this stuff is explained? Or is there a file in the depths of my texmf tree I should poke around in?


(I have asked  in the math site, but think it might be more relevant here) I have been following the online MIT statistics course, and one course was about some fundamental distributions.()  I read it a couple of times and did a lot of search online, but I still find it hard to fully grasp the idea of how to match different distributions to different real life scenarios.   For example, "Suppose we have a tape measure with markings at each millimeter. If we measure (to the nearest marking) the length of items that are roughly a meter long, the rounding error will uniformly distributed between -0.5 and 0.5 millimeters." I just cannot wrap my head around how it was determined that uniform distribution matches this case.  I'm wondering if there are some books/articles that give detailed and intuitive explanation of distributions and their real life applications?

I am a grad student developing an interest for statistics. I like the material over-all, but I sometimes have a hard time thinking about applications to real life. Specifically, my question is about commonly used statistical distributions (normal - beta- gamma etc.). I guess for some cases I get the particular properties that make the distribution quite nice - memoryless property of exponential for example. But for many other cases, I don't have an intuition about both the importance and application areas of the common distributions that we see in textbooks.   There are probably a lot of good sources addressing my concerns, I would be glad if you could share those. I would be a lot more motivated into the material if I could associate it with real-life examples.


How many squares of side length $x$ can fit in a circle of diameter $n\cdot x$, where $n$ is any positive number, such that none of the squares overlap the perimeter of the circle and all of the squares are aligned in a grid (i.e. no zig-zagging of edges)? For example:  This is for a project I'm doing using Excel, so it'd be ideal to have a formula, versus an infinite series or a c++ function. Thanks! [Edit]:  Some folks have suggested  but I think that only works when the circle is very large (relative to the squares).  For example, a circle of 3x gives a result of 0.4, when clearly (from the image above) you can fit 4 squares inside.

I am reading a book on computer architecture. The author discusses how processor chips are made from wafers. Dies (the heart of the chip, that does calculations) are cut from circular wafer plates.  Because dies are square (or rectangular I should say), and the wafer is a circle, not all of the area of the wafer is used for dies.    To calculate how many dies can go into a single wafer, the author uses this equation:  $$\text{Dies per wafer}=\frac{\pi\times(\text{Wafer diameter}/2)^2}{\text{Die area}}-\frac{\pi\times\text{Wafer diameter}}{\sqrt{2\times\text{Die area}}}.$$  The second part of the equation compensates for the problem of squares in a circle. I am interested in the derivation of the second part. Can you help me out?


I want to build a file compression using Huffman. When I run the program compress and decompress the file it's OK. I close the program. After closing the program I open the program again. Then I only call the compression file which stores the bit sequence to decompress. But then it shows the null pointer exception. How can I solve it?? Below This are the compression and decompression code.  I save the compression bit into a byte array. This works fine. but the problem arises when I only compress the file and close the program. Then if I want to decompress the file by calling the compression file by running the program again it shows me the null pointer exception. the exception is: Exception in thread "main" java.lang.NullPointerException at compress.Decode.decode(Decode.java:25) at compress.MainClasss.main(MainClasss.java:133)  C:\Users\Tech Land\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1 public class MainClasss {  public static void main(String[] args) throws IOException {     String s = "";     String test = "";     String decodee = "";        Scanner scan = new Scanner(System.in);        while(true){          System.out.println("pls write the file name");     //   String binaryString ="";       String name = scan.next();            try {          test = new String(Files.readAllBytes(Paths.get("C://Users//Tech Land//Desktop//" + name))); //first read the java file as a string     } //first read the java file as a string     catch (IOException e) {          e.printStackTrace();     }               String de = scan.next();     if (de.equals("com")) {         Encode ob = new Encode();         s = ob.encode(test);         BitSet bitset = new BitSet(s.length());          int bitcounter = 0;         for (Character c : s.toCharArray()) {             if (c.equals('1')) {                 bitset.set(bitcounter);             }             bitcounter++;         }          FileOutputStream t = new FileOutputStream("C://Users//Tech Land//Desktop//" + name, false);         t.write(bitset.toByteArray());         System.out.println("file successfully compressed");          }           } else if (de.equals("dcom")) {         try {              decodee = new String(Files.readAllBytes(Paths.get("C://Users//Tech Land//Desktop//" + name))); //first read the java file as a string         } //first read the java file as a string         catch (IOException e) {              e.printStackTrace();         }          String binaryString = "";         File file = new File("C://Users//Tech Land//Desktop//" + name);         FileInputStream fin = null;         try {             // create FileInputStream object             fin = new FileInputStream(file);              byte fileContent[] = new byte[(int) file.length()];              fin.read(fileContent);                        for (int i = 0; i <= BitSet.valueOf(fileContent).length(); i++) {                 if (BitSet.valueOf(fileContent).get(i)) {                     binaryString += "1";                 } else {                     binaryString += "0";                 }             }             //System.out.println("");             // System.out.println(""+fileContent.length);              System.out.println("" + binaryString);         } catch (Exception e) {             e.printStackTrace();         }          Decode ddecode=new Decode();         String k=ddecode.decode(binaryString);           FileWriter fw = new FileWriter("C://Users//Tech Land//Desktop//" + name, false);              System.out.println("");           for (int j = 0; j < k.length(); j++) {               fw.write(k.charAt(j));          }           System.out.println("successful");           fw.close();            }               }  }

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?


In  I have outlined how I ended up with a few dozen directories that have a dollar sign in their filename.  I tried to get rid of these with the command:  find . -type d -name "*\$*" -exec rm -rf {} \;   which gave an error message for each directory. But the directories and their content were gone never the less.  So I retried things in /tmp:  mkdir "\$adir" find . -type d -name "*\$*" -exec rm -rf {} \;   and again got an error  find: ./$adir: No such file or directory   How could the files be removed without such a warning?

I need to delete all compiled data:   directories called build, directories called obj, *.so files.   I wrote a command   find \( -name build -o -name obj -o -name *.so \) -exec rm -rf {} \;   that goes through all the directories recursively and deletes all I need.  Why do I have such an output at the end? Maybe I should write a different command.  find: `./3/obj': No such file or directory find: `./3/build': No such file or directory find: `./1/obj': No such file or directory find: `./1/build': No such file or directory find: `./2/obj': No such file or directory find: `./2/build': No such file or directory


If I want to create a document in Ubuntu Desktop (using the mouse right button), I can't find this option.  However when I open Desktop through File Manager, I can find the option again!  Is there any explanation for this? Is it a bug? If possible, how to fix it?

In Ubuntu 20.04, on the desktop, there is a number of actions I wish I could do, such as, by order of importance :  use keyboard shortcuts such as select all, copy / paste. use drag & drop with icons deactivate the "mouse over" highlight, and restrict the clicking area to only the icon, not the surrounding square  To put it simply, I'd like to have the exact same features as offered by the desktop of Ubuntu 18.04 (probably related to a specific version of GNOME, and not Ubuntu itself). Am I missing something obvious here? I actually see no reason why those actions are removed or deactivated on the desktop, since they all work in any Nautilus window.


I edited the profile preferences for my terminal like its background image, text color etc. Now I dont know how to revert back the changes to the basic default terminal preferences which comes in ubuntu. Please Help.

I fooled around with the colors and stuff, in the terminal, and now want to go back to the maroon and white default config of the the terminal. What files do I have to delete?


Should a singleton in Java use static variables or member variables? Are there any advantages to either?

What real (i.e. practical) difference exists between a static class and a singleton pattern?  Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?


I have a problem with malicious ads on my mobile website, which redirects the user to app store. Mainly on the android browser and Safari for iOS.  Is there a way to block redirects for e.g. using javascript ? Maybe some event with preventDefault() function ?

Some websites have code to "break out" of IFRAME enclosures, meaning that if a page A is loaded as an IFRAME inside an parent page P some Javascript in A redirects the outer window to A.  Typically this Javascript looks something like this:  <script type="text/javascript">   if (top.location.href != self.location.href)      top.location.href = self.location.href; </script>   My question is: As the author of the parent page P and not being the author of the inner page A, how can I prevent A from doing this break-out?  P.S. It seems to me like it ought to be a cross-site security violation, but it isn't.


In David J. Griffiths's Introduction to Electrodynamics, the author gave the following problem in an exercise.     Sketch the vector function    $$ \vec{v} ~=~  \frac{\hat{r}}{r^2}, $$    and compute its divergence, where    $$\hat{r}~:=~ \frac{\vec{r}}{r} , \qquad r~:=~|\vec{r}|.$$    The answer may surprise you. Can you explain it?   I found the divergence of this function as       $$      \frac{1}{x^2+y^2+z^2}   $$  Please tell me what is the surprising thing here.

I just started in Griffith's Introduction to electrodynamics and I stumbled upon the divergence of $\frac{ \hat r}{r^2} \equiv \frac{{\bf r}}{r^3}$, now from the book, Griffiths says:  Now what is the paradox, exactly? Ignoring any physical intuition behind this (point charge at the origin) how are we supposed to believe that the source of $\vec v$ is concentrated at the origin mathematically? Or are we forced to believe that because there was a contradiction with the divergence theorem? Also how would the situation differ if $\vec v$ was the same vector function but not for a point charge? Or is it impossible?


There is  on MSE which shows that for $n \ge 1$, $$ \sum_{k = 0}^{n}{4n \choose 4k} = {1 \over 4}\left[\left(-1\right)^{n}\, 2^{2n + 1} + 16^{n}\right] $$  I wonder if there is a more combinatorial proof for this?

Let $S$ be a set of size $n$.  There is an easy way to count the number of subsets with an even number of elements.  Algebraically, it comes from the fact that  $\displaystyle \sum_{k=0}^{n} {n \choose k} = (1 + 1)^n$  while  $\displaystyle \sum_{k=0}^{n} (-1)^k {n \choose k} = (1 - 1)^n$.  It follows that   $\displaystyle \sum_{k=0}^{n/2} {n \choose 2k} = 2^{n-1}$.    A direct combinatorial proof is as follows: fix an element $s \in S$.  If a given subset has $s$ in it, add it in; otherwise, take it out.  This defines a bijection between the number of subsets with an even number of elements and the number of subsets with an odd number of elements.  The analogous formulas for the subsets with a number of elements divisible by $3$ or $4$ are more complicated, and divide into cases depending on the residue of $n \bmod 6$ and $n \bmod 8$, respectively.  The algebraic derivations of these formulas are as follows (with $\omega$ a primitive third root of unity):  observe that  $\displaystyle \sum_{k=0}^{n} \omega^k {n \choose k} = (1 + \omega)^n = (-\omega^2)^n$  while  $\displaystyle \sum_{k=0}^{n} \omega^{2k} {n \choose k} = (1 + \omega^2)^n = (-\omega)^n$  and that $1 + \omega^k + \omega^{2k} = 0$ if $k$ is not divisible by $3$ and equals $3$ otherwise.  (This is a special case of the discrete Fourier transform.)  It follows that  $\displaystyle \sum_{k=0}^{n/3} {n \choose 3k} = \frac{2^n + (-\omega)^n + (-\omega)^{2n}}{3}.$  $-\omega$ and $-\omega^2$ are sixth roots of unity, so this formula splits into six cases (or maybe three).  Similar observations about fourth roots of unity show that  $\displaystyle \sum_{k=0}^{n/4} {n \choose 4k} = \frac{2^n + (1+i)^n + (1-i)^n}{4}$  where $1+i = \sqrt{2} e^{ \frac{\pi i}{4} }$ is a scalar multiple of an eighth root of unity, so this formula splits into eight cases (or maybe four).    Question:  Does anyone know a direct combinatorial proof of these identities?


my sound indicator in the panel suddenly disappeared. My sound works perfectly accept that I have to run the following script to enable my built-in JBL sound in good quality. I don't if it has anything to do with it (and would be another question how to solve this issue, but it works for me) I have to run this once when reboot/login to my system to get the sound to work in good quality. Sound settings are all right. The only thing is that the indicator in the panel is missing. How can I get it back?  So here is the script I run everytime I start my system:  #!/bin/bash  pulseaudio -k sudo modprobe -r snd-hda-intel sudo modprobe snd-hda-intel model=asus-model4 pulseaudio --start   I am using ubuntu 14.04 with unity.

The sound icon from the top menu bar is missing. It does however appear on the login screen and the guest account. I can still adjust my volume using keyboard keys but I liked the sound icon because it let me control Rhythmbox.  I noticed there are a lot of questions about this issue but all of the answers say to run $gnome-sound-applet & which does not seem to work. Does anybody know how I can fix this?  Edit: running "gsettings reset com.canonical.indicator.sound visible" fixed the problem


Are there any software tools (or websites) that support creating tactical combat maps as well as actively running them for combat? I'm looking to do away with paper and battle-mats. Here are my requirements:   Can create floor plans with tiles. Can put (or draw) objects to that tiles. It doesn't necessarily have to be real object models (3d). It would be sufficient enough if you can draw lines/squares/circles etc.  Can add (put, draw) PCs and NPCs to that tiles and move them.   I'm going  use it for my GURPS games. I want to keep track of my players and NPCs movements with software. I don't want to bother using real paper. It could be more practical to use software for that.

As the younger members of our group get older, they are going off to college or {gasp} getting on with their lives.  We still game but are finding it harder to get together as distances increase. Since they all have computers and are tech savvy, what software is available for virtual table top play?    Being a webmaster and database administrator I have access to all the technology I could possibly need.  So be sure to include system requirements.  I just need to know what my options are.  One thing I need to add.  Some of the players will still be at the physical table and 1 or 2 will be remote.  This means I need to accommodate both types in each game session.  Also having the ability to do Non-D&D is a plus as our group plays many different systems.  For me there is only one answer.  I can try each of the systems since I'm webmaster/DBA  and have that kind of a setup, but I will in the end choose one.  (There Can Be Only One!) As a service to the group I will give a full 'review' of what I did to evaluate and what/why I choose a particular solution.  I think that in the end the fantastic answers here will help others regardless of what I do. Isn't that the best thing?


Show that if  $a|b \  \  then\ \  2^a-1|2^b-1$ I've seen this assertion in the proof of another problem but the author hadn't given any reason: [Original problem containing this assertion][1]   [1]:     . Seemingly simple,I have no idea how to progress in solving this problem!!

I don't know how to explain or how to prove the following statement  If $n=ab$ and $a,b \in \mathbb{N}$ then $2^a-1 \mid 2^n-1$.  Any ideas? Perhaps an induction?  Thanks in advance.


How would I filter the output (Console.WriteLine(statusCollection...) to only show results if s.Service_name equals "cloud_networking" in the past 24hrs (s.Begin date is formatted like this 2018-05-19T04:39:59Z  class Program {     private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);      //public static void Main()     public static void Main(string[] args)     {         using (var webClient = new WebClient())         {              String rawJSON = webClient.DownloadString("https://status.cloud.google.com/incidents.json");             List<Status> statusCollection = JsonConvert.DeserializeObject<List<Status>>(rawJSON);             Console.WriteLine(statusCollection.Count + "Last Run:" + DateTime.Now.ToString("MM/dd/yyyy h:mm tt"));             //Console.WriteLine(statusCollection.Count + " items");              Console.WriteLine(string.Join("\n", statusCollection.Select(s => string.Format("{0} {1} ({2}) {3} - {4} - {5} updates",                                                    s.Begin, s.Number, s.Severity, s.Service_name, s.External_desc, s.Updates.Count))));             log.Info(DateTime.Now.ToString("\n MM/dd/yyyy h:mm tt"));         }     } }  public class Status {     public string Begin { get; set; }     public string Created { get; set; }     public string End { get; set; }     public string External_desc { get; set; }     public string Modified { get; set; }     [JsonProperty("most-recent-update")]     public MRUpdateContainer Most_recent_update { get; set; }     public int Number { get; set; }     public bool Public { get; set; }     public string Service_key { get; set; }     public string Service_name { get; set; }     public string Severity { get; set; }     public List<Update> Updates { get; set; }     public string Uri { get; set; } }  public class MRUpdateContainer {     public string Created { get; set; }     public string Modified { get; set; }     public string Text { get; set; }     public string When { get; set; } } public class Update {     public string Created { get; set; }     public string Modified { get; set; }     public string Text { get; set; }     public string When { get; set; } }

I am looking for a very fast way to filter down a collection in C#.  I am currently using generic List<object> collections, but am open to using other structures if they perform better.  Currently, I am just creating a new List<object> and looping thru the original list.  If the filtering criteria matches, I put a copy into the new list.  Is there a better way to do this?  Is there a way to filter in place so there is no temporary list required?


I just returned from watching the movie, and I'm not sure if I heard this wrongly since everything was going on for the first time to me and I was busy absorbing everything in the movie as it happened:      When Finn defected and escaped with Poe, Kylo Ren requested for information on him, whether he is a defective trooper or something. The reply was that, if I remembered correctly, nothing is wrong with him on record, that he had just returned from conditioning, and this is a first-time offence.   Looking back at the movie, who/what are the First Order stormtroopers composed of?      One theory I had in my head is that he is a clone, especially since early in the movie - around or before the time of the scene mentioned in the last spoiler tag, I seemed to have heard the mention of a clone program (or could have misheard it). Some elements that seem reminiscent of it is Finn having been called FN-2187 all his life - like a birth number - and this mention of conditioning. I am reminded of concepts that exist in the EU such as the use of multiple clone templates, and flash memory training that has been used to condition troopers, including Darth Vader's own apprentices partly to instil loyalty. Some may perhaps argue the First Order to be unable to afford clones, but hey they can afford a superlaser the size of a planet instead of a moon...   I may have heard wrong in the movie, however, especially since      When Finn confessed to Rey that he is a stormtrooper, he mentioned how he has never known his own parents. This may suggest he is birth-born, but then again that could have been a clone grappling with his own identity, or some plot device of a clone being deceived into believing what he is actually not.   Regardless of whether my own theory is correct, it seems clear that the stormtroopers of the First Order are different from the stormtroopers of Palpatine's Empire - they aren't simple trained conscripts, but something more. What is this more:      Are they clones, babies seized from birth to be trained and indoctrinated - a practice somewhat similar to what Republic-era Jedi do - or something else?

In The Force Awakens, we see a rogue stormtrooper. This could be explained as a "glitch in the code" and many may have passed it by, but then he says something about being taken away from his family - which is a bit odd, if they were a clone, unless they were given fake families which I highly doubt. This made me wonder if the Empire have stopped using the clones for their storm troopers, and if this is the case, why?


I regularly use time to find out how long a process takes. Is there an equivalent command for memory? The usual ways to find out how much memory a process takes (ps,/proc/meminfo, etc.) work fine for a long-running process, but I don't know of anything that works like time does, for a command run from the command line. I'm imaging something like "size", except that includes the stack and heap:  % mem python myscript.py    text    data    heap  3135006  570928  115528

time is a brilliant command if you want to figure out how much CPU time a given command takes.  I am looking for something similar that can measure the max RAM usage of the program and any children. Preferably it should distinguish between allocated memory that was used and unused. Maybe it could even give the median memory usage (so the memory usage you should expect when running for a long time).  So I would like to do:  rammeassure my_program my_args   and get output similar to:  Max memory allocated: 10233303 Bytes Max memory used: 7233303 Bytes Median memory allocation: 5233303 Bytes   I have looked at memusg  but I regard that as somewhat a hack.


I want to convert a timestamp from mysql to format as time().  IF i have this date:  2015-06-05 08:53:30   I wants to convert to something like: 1433491545  I have to use the method date() ?  I cant found a solution.

How do I get timestamp from e.g. 22-09-2008?


The  used to sort users by reputation in the given timeframe both when listing all users and when searching specific user names. This allowed us to find the user with the highest reputation and a specific name, or search for specific high reputation users when we knew their name but not their user ID.  Now, it only appears to sort users by reputation when a search term is not entered, otherwise it is sorted by user ID.  Results without search term:   Results with search term:   We can see from the results in  that it used to work as intended (although the image is old I remember it functioning far more recently):    This appears to affect all sites.

Some username search results are not correctly sorted by highest reputation on Stack Overflow. Steps to reproduce:  Visit   In the Users Search Box enter the following username for example; RobC  The list of users returned is currently as follows:  Note:  User RobC listed in sixth position from the top, i.e. the one at the bottom in the screenshot above, has a weekly reputation increase of 88. The first five listed users all have a weekly reputation of 0.    Expected Result:  Users with a higher reputation to be listed above/before users with a lower reputation.  Given the scenario provided in the aforementioned section, I expect user RobC who is currently listed in sixth position from the top, i.e. the one at the bottom in the screenshot above, who has the highest weekly reputation increase of 88 to be listed at the top.   Additional Info  Regardless of whether the Reputation is sorted by either; week, month, quarter, year, or all - the list returns in the incorrect sort order.  Other examples of usernames (randomly chosen and at time of writing) that also show the incorrect sort order are; Peter, and Sarah. However many usernames do seem to return correctly sorted.  This incorrect sorting started to occur approx 3-4+ weeks ago.


I have a model about blender,there is a object （name's car_AudiA8） with multi-material，I want to copy a new object from the object ("car_AudiA8"),then change new object's color and old object's color is not affected,my method is :  obj = bpy.data.objects["car_AudiA8"] mesh = obj.data new_obj = bpy.data.objects.new("car_AudiA8", mesh) bpy.context.scene.objects.link(new_obj) bpy.ops.object.make_single_user(object = True, obdata = True, material=True,texture = True ) for slot in bpy.data.objects[new_obj.name].material_slots:     if (slot.name.startswith("carpaint.Black")):         bpy.data.materials[slot.name].diffuse_color = (1,0,0)  but when the method doesn't work,I don't know reason. when render the object , car's color doesn't change.

How can I define the different properties of an Cycles/Eevee material? Such things as glossy, glass, diffuse, RGB-color, emissive via python scripting?


How can I read ESRI polygon/polyline shapefile in R environment using rgdal or other library? can I get a syntax for it?

I need to open a shapefile from ArcMap in R to use it for further geostatistical analysis. I've converted it into ASCII text file, but in R it is recognized as data.frame. Coordinates function doesn't work as soon as x and y are recognized as non-numeric.   Could you help to deal with it?


Iam writing my thesis in r markdown and want to change the line spacing to 18 pt. But i cant find a solution for it. I only found the setting for onehalf spacing or 1.5 spacing but no for exactly some arbitrary pt.

This is my code  \documentclass[12pt,a4paper]{book}  \renewcommand{\baselinestretch}{1.5}  \begin{document} \include{Chapter1} \end{document}   I have please a question:   I would change the line spacing (1.5 --> 1.0) of a page inside the document and not the entire document and the size of the words, how can I do please?


My question is:      Find an equation for the plane that contains the point $(1, -1, 2)$ and the line $x=t, y=t+1, z=-3+2t$.   Can someone please give me a step-by-step explanation on how to do this? I have tried many ways, but none of them work.

Find the general form equation of a plane that contains the point $(2, -2, 1)$ and passes through a line $(x, y, z) = (1, 2, -3) + t(2, -3, 2)$.  I managed to use the fact that it contains a given point to write the equation of the plane as $A(x-2) + B(y+2) + C(z-1) = 0$ but got stuck there.


I have an Android mobile with a 5MP camera. Is there any way to save raw images (similar to Canon CR2, Nikon NEF, etc.) from my Android device?

I have a Samsung Galaxy S4. Is there a way in Android or an app that can take ? I.e. have the raw camera data to process in a program like Photoshop. I am using Android 4.2.2.


I have been chasing an error for a long time. I have finally tracked it down to this: a = 3*np.arange(0.5,1.6,0.1) b = 3*np.array([0.5,1,1.5])  for c in a:    print(c in b)  I would expect 3 of the elements of a to appear in b but when I execute the code above I only get that one of them is in b. Is anyone able to explain whats going on here?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


The maximum capacity of a battery during usage can vary from manufacturer's specifications due to factors like temperatures and battery health. Because of that i want to estimate the real maximum capacity (in kWh) of a battery using the percentage of the battery's remaining capacity (in %) and the current power consumption (in kW).  I will get the above mentioned measurements in real time, in a time interval of every second, i.e., in a time series. During data recording, i will never see a full battery charge cycle but instead the battery will be between ~95% and ~35% percent.  In my data exploration, i cumulated the current power consumption, visualized it together with the battery percentage and noticed that they share a linear dependency, as you can see in figure 1.  Figure 1: progression of battery capacity percentage and cumulated power consumption   My approach of holding measurements in a bin for every 2% lost battery capacity and performing on that bin a linear regression to predict the cumulated power consumption at zero percent battery capacity is giving me rather unstable results. (see figure 2)  Figure 2: estimated capacity of every two percent battery capacity    Is there a way to get the results in a more stable (less varying) state? Or is there even a more exact way to estimate the current maximum capacity of the battery using a different method?

I want to estimate the current maximum capacity (in kWh) having the current power consumption (in kWh) and the state of charge of the battery (in %) available in a time series.   I do not have a full battery charge circle recorded but only a snippet with the state of charge going from ~95% to ~35% in a 1 second data recording interval.  At first, i cumulated the current power consumption and noticed that the progression between cumulated power consumption and state of charge was almost the same (see figure 1 and 2).   progression of state of charge vs. cumulated power consumption   So i tried to use a linear regression model to predict two values of cumulated power consumption at 0% and 100% state of charge. In my assumption the delta of these two leaves me with the current maximum capacity of the battery.  Ideally i want to monitor the capacity during the data recording. Which means i only have data of a few percent of state of charge. In figure 3 and 4 you can see my attempt of trying to create a linear regression model for every 2% state of charge. As you can see in the right plot, the estimated capacity has a very high variance.  LEFT: regression lines (green) of every 2% state of charge; RIGHT: estimated capacity of every 2% state of charge   Since i am not an expert in neither the matter of regression nor batteries/physics, my questions are:   Is there a much simple or more exact way (or both) to estimate the current maximum capacity of the battery? If yes, is there a good way to estimate an sufficiently exact capacity with an even smaller snippet in an ongoing process, lets say every 2% state of charge? (maybe using a characteristic curve of the discharge process)


I personally believe in determinism and understand the basics of quantum mechanics, but don't see how any of it disproves that the universe is deterministic. Electrons cannot move change momentum or direction of momentum without an outside force, so its position cannot be changed without an outside force either. And if it does change, this should be predictable by the amount of energy and by the angle of the outside force. I don't think that a probability wave function shows randomness either. There should be reasons that electrons are more likely to exist at certain positions on a wave regardless of randomness.

I've heard this pop up in a discussion with my physicist/engineer roommates, but didn't care to ask at the time.  Now I'm mighty curious about it.   doesn't really seem to say much on this issue.  From what I understand about the Uncertainty Principle, it says that there are certain properties of electrons and stuff that cannot be measured, and are therefore uncertain.  Then Wikipedia (under ) states that Sir Arthur Eddington says that the Uncertainty Principle isn't really so because we can't measure these properties, but because turns out nature is indeterministic.  At least that's what I took from those paragraphs.  Even without my biased wording, it sounds more like an assertion than evidence.  I've also read a few things about how other scientific conventions perceive the issue, like how a ball on the peak of a perfect mound might randomly roll down in any direction, and I'm still unconvinced.  My belief of determinism is generally that if you knew every single variable that existed as a factor at the very beginning and birth of the universe, you could correctly determine all properties of any individual particle at any point in time.  Could anyone provide some more background about this?  Especially regarding quantum mechanics?


Do people read literature in Harry Potter? Fiction books are rarely mentioned in the series, and none of the characters seem to read novels. We understand that a majority of teenage students aren’t prone to pick up Chaucer just for the fun of it, but you would think a bookworm like Hermione would occasionally peruse Dickens, especially since other forms of entertainment, such as television and computers, aren’t common in the magical world.

I remember in , a wizard was reading A Brief History of Time by the author Stephen Hawking.   Why should a wizard read something like this? And was there any specific reason as to why this book only was chosen?


A friend told me that the golden ratio constant $\varphi$, i.e., $\dfrac{1+\sqrt{5}}{2}$, is 'the most irrational number,' does anyone know if this is true and if so can it be proven? Thank you!

I have heard  called the most irrational number. Numbers are either irrational or not though, one cannot be more "irrational" in the sense of a number that can not be represented as a ratio of integers. What is meant by most irrational? Define what we mean by saying one number is more irrational than another, and then prove that there is no $x$ such that $x$ is more irrational than $\varphi$.  Note: I have heard about defining irrationality by how well the number can be approximated by rational ones, but that would need to formalized.


I have an ArrayList with Student Objects (Name, Mark in Math, Mark in Physics). How can I sort the ArrayList and edit with first highest number/s, then second highest then third and so on. For example I have the object value below:  ArrayList<> allStudents = new ArrayList(); allStudents.add(new Student("A", 80, 94) ); allStudents.add(new Student("B", 98, 91) ); allStudents.add(new Student("F", 70, 84) ); allStudents.add(new Student("C", 98, 92) ); allStudents.add(new Student("H", 99, 93) );   I will look for the student with highest number, I got H. I edit the object like: "H", 97, 90 and save it back to that ArraList. Again I look for 2nd highest but here I have students "B" and "C", I can see they same number in math but in Physics C has highest number so I will edit "C", 96, 90 and save it back to the ArrayList and so on. Here which student already edited, I will not fetch them for edit and save thr and so on. IF someone please help me! Thanks in advance

Assume you have some objects which have several fields they can be compared by:  public class Person {      private String firstName;     private String lastName;     private String age;      /* Constructors */      /* Methods */  }   So in this example, when you ask if:  a.compareTo(b) > 0   you might be asking if a's last name comes before b's, or if a is older than b, etc...  What is the cleanest way to enable multiple comparison between these kinds of objects without adding unnecessary clutter or overhead?   java.lang.Comparable interface allows comparison by one field only Adding numerous compare methods (i.e. compareByFirstName(), compareByAge(), etc...) is cluttered in my opinion.   So what is the best way to go about this?


Dummit and Foote, 7.4.33(a): Let $R$ be the ring of all continuous functions $[0,1] \to \mathbb{R}$ and let $M_c$ be the kernel of evaluation at $c \in [0,1]$, i.e. all $f$ such that $f(c) = 0$. Show that if $M$ is a maximal ideal in $R$ then $M = M_c$ for some $c$.    I am aware of proofs that use the compactness of $[0,1]$; however I have been told that a simpler proof exists using only the isomorphism theorems for rings along with basic facts about ideals. I have tried on my own to prove it this way but still have no success; is it possible?  (My attempts go something like: since $M$ is maximal, the quotient ring $R/M$ is a field. Then it would be nice to use the fact that $R/M$ has no zero divisors, but I can't quite make it work. Alternatively, consider $M \cap M_c$.)

Let $S$ be the ring of all continuous functions from $[0,1]$ to $\mathbb R$. How to prove that all maximal ideals of $S$ have the form $M_{x_0}=\{f\in S \mid f(x_0)=0\}$?   Thanks in advance.


What can be done with a scanned passport image if given to the wrong people? Should I get a new passport?  I submitted my information to a third party non government company to do my e-visa however, on the official e-visa website it said that particular website was scam.

In one of the questions on this site, it was suggested the use of  to save a backup copy of your passport, in case you need to proof who you are if your original document is lost.   I like the idea, but what if someone gets access to your Dropbox folders and is able to acquire the copy of your passport.  The same goes for when you leave a copy of your passport at a hotel receptions desk. Once someone has the info printed on that copy, would that make it easier to steal your identity?


Most of the apps that I currently need aren't working, even after restarting several times and trying many online suggestions. It started when I tried upgrading from Ubuntu 18.10 to 19.04. I opened the software updater and it gave me an error about my python3 file being corrupted or something similar. I found a guide on how to fix this and i ran the following command: sudo ln -sf /usr/bin/python2.7 /usr/bin/python but I realized that was for a different version of python(after I ran it). When I tried to open the software updater again, it wouldn't open. I looked up solutions to start this from terminal or other places, but found that the terminal didn't open either. I don't know what's happening, and I'm too much of a linux noob to fix it, so I'm asking on here.

I am a new Ubuntu user running Ubuntu 13.04.  I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.  Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.


I need to overload basic operators to work with primitive types:  Frac - Common fraction class; Frac(a,b) = a/b. This is overload of operator >  template<typename t> bool Frac::operator > (const t &right) { if((long double)right)     return ((long double)right < this->toLongDouble()); else     cout << "Error!"; }   in main:  cout << ((Frac(1,2) > 2.5));   I have error:   Error: undefined reference to `bool Frac::operator><double>(double const&)'

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I saw a question on Quora recently which asked about the grammar of the following sentence:  “The British think ravens good luck”  Interestingly, most answers weren't familiar with this structure but one person explained it as ellipsis (‘the British think ravens are good luck’). I wonder what everyone thinks of this answer. Is it ellipsis or is it perhaps an archaic usage or maybe linked to a French grammatical structure popular in past times?

What is the grammar behind the construction "I think it strange/necessary that ...", and when can and cannot this apparent omission of the copula be used? Do we always need the "that" clause?  Also, this seems to be only allowed when the object is a pronoun (it in the above example). That is, we don't say "I think this method strange", correct?


The photos in my iPad is synced from iPhoto in my mac, so they are not in the camera roll. But unfortunately I formatted my drive so the iPhoto library in my mac is gone. Now all the photo is in my iPad, but it seems no convenient way to get them out. I hope I can keep all the file name correct.

My iPhone was linked to my main computer and it has all my photos stored on it, but not in the camera roll. Since my husband blew the main computer up, my precious photos appear to be in limbo. It does not appear that I can import them anywhere. I could email all them one by one but that seems a little low tech. iTunes tells me that if I upgrade iOS I will lose my photos that are not in the camera roll. Also, the same would seem to be true if I deauthorize my main (now usless) PC. Any help would be greatly appreciated.


Trying to install Ubuntu OS on a new hard drive. Can it be done from my sd card?

Is it possible to download Ubuntu 12.04 to an SD card and then use that to install or to boot directly from it, rather than using a USB stick?  The plan is to install Ubuntu on an old Toshiba Portege M200 laptop, which does not have a CD drive.


I accidently stepped on a block which triggered infinite slowness 5 and I cant get rid of it. Milk doesn't work,   /effect @p 2 0 or /effect @p clear    doesn't work either.  How can I get rid of this? I tried shutting down Minecraft but it was still no good. It's really bugging me since I'm trying to create an adventure map. Any help? Also if you can help but need to know how this happened, here's the command:  /execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 15 effect @a slowness 1000000 5   [Edit] I've found that if I keep activating a command block with the command:     /effect player(BruhTemmieLlama2) 2 0   The potion effect would disappear for a second.  [Edit2] I found a temporary solution.  If I spammed a lever attached to a command block with the command a few lines up, the effect would go away. So I turned the command block purple by turning on options "Repeat" and  "Always Active" and the effect would disappear. But if i removed the command from the command block, the effect would come back. I'd still like to know a way to permantly be rid of these effects. Thx pals!

I've placed a command block making it day all the time. I want to turn it off, but I've lost it. What's the quickest way to find it?


What is the Difference in the age of Earth's equator region when compared to the age at the pole regions. The Earth spins, so time is ticking slower at the equator.

While answering the question  it occurred to me that time would run more slowly at the equator than at the North Pole, because the surface of the Earth is moving at about 464 m/s compared to the North Pole. The difference should be given by:  $$ \frac{1}{\gamma} \approx 1 - \frac{1}{2}\frac{v^2}{c^2} $$  and at $v = 464\ \mathrm{m/s}$ we get:  $$ \frac{1}{\gamma} \approx 1 - 1.2 \times 10^{-12} $$  This is a tiny difference – about 4 days over the 13.7 billion year lifetime of the universe – but  the accuracy of current atomic clocks is about $1$ part in $10^{14}$, so the difference should be measurable. However, I have never heard of any measurements of the difference. Is there a flaw in my reasoning or have I simply not been reading the right journals?


Hello  So, I have some JS code that creates HTML elements dynamically. More precisely, it creates div elements that also have some other things inside them.  Each of these div elements has an img element inside them. How can I achieve such effect, that when the img element is clicked in a certain div element, that exact div element is deleted?  This is my code which creates elements dynamically:    function addQuestion(question){     var s = "

"+"
"+noTag(question)+"
"+"

";      var div = document.createElement('div');     div.innerHTML = s;     document.getElementById("div_questions").appendChild(div); }     Currently it does not create the img element. But the idea is that in each of these div elements it also creates an img element which, when clicked, deletes that and only that div element.  How can I achieve this?

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


After cooking kielbasa and sauerkraut an hour in a 300 degree oven, I left it sitting on the kitchen counter for five hours. Is it safe to eat?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


Let $p_0,p_1,p_2,...$ be real numbers in $(0,1)$. I am trying to prove that  $\prod\limits_{k = 0}^\infty  {(1 - {p_k})}  = 0$ if and only if the series  $\sum\limits_{k = 0}^\infty  {{p_k}} $ diverges.  By taking logarithms in the product we have  $\log \left( {\prod\limits_{k = 0}^\infty  {(1 - {p_k})} } \right) = \sum\limits_{k = 0}^\infty  {\log \left( {1 - {p_k}} \right)} $  and the latter series should diverge to $-\infty$ if the product were to be $0$.  Equivalently, $\sum\limits_{k = 0}^\infty  {\left( { - \log \left( {1 - {p_k}} \right)} \right)} $ should diverge to $+\infty$ and the conclusion may follow by approximating $-\log(1-p_k)$ by $p_k$ near $0$.  Any help on how to write this last step formally? How can we prove that $\sum\limits_{k = 0}^\infty  {\left( { - \log \left( {1 - {p_k}} \right)} \right)} = +\infty$ if and only if  $\sum\limits_{k = 0}^\infty  {{p_k}} = +\infty$ ?

Let $A_n$ be independent events with $P(A_n) \neq 1$. Show that $\prod_{n=1}^{\infty} (1- P(A_n))=0$ iff $\sum P(A_n) = \infty$  It kind of looks obvious but I really have no idea how to prove it. Can someone give me help?


I'm new to Blender, I just started learning a couple days ago. I have one question about the preview. My Blender seems to not displaying anything in Material Preview mode, even though I edited the objects' material. As you can see in the second picture, the first picture you can clearly see the objects in Solid mode. Is it that something is wrong with Blender or did I edit something I'm not supposed to ? I'm using Blender 2.83 as well as 2.91 Sorry for my bad English :).

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


Why did they make characters like Gendry to have blonde beard when he has black hair?   Or Daenerys to have black eyebrows, when she has silver hair.

On the show, why does Daenerys Targaryen have dark eyebrows? Isn't her platinum/gold/silvery hair supposed to be her hair all over? ... this couldn't possibly by an effects gaffe that the showrunners argued with Emilia Clark about - could it?


I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Question:  We need to prove the following inequality :-     $$\displaystyle \sum_{cyclic} \frac{x^4}{8x^3 + 5y^3} \geq \frac{x+y+z}{13} \ \ \ \ \ \ \ \ \ \ \ x,y,z \in \mathbb{R}^+ $$   As we know by AM-GM that,   $$\displaystyle  \frac{x+y+z}{13} \geq \frac{3(xyz)^\frac{1}{3} }{13} $$  Can we say it is similar to prove  this  $$\displaystyle    \sum_{cyclic} \frac{x^4}{8x^3 + 5y^3} \geq \frac{3(xyz)^\frac{1}{3} }{13}$$  instead of the original equation.  Because then,  SOLUTION  $\displaystyle \sum_{cyclic} \frac{x^4}{8x^3 + 5y^3} \geq \frac{x+y+z}{13}  \geq \frac{3(xyz)^\frac{1}{3} }{13}$  So We can say  $$\displaystyle \   \     \   \sum_{cyclic} \frac{x^4}{8x^3 + 5y^3} \times 13(x^3 + y^3 +z^3)   \geq  (x^2 + y^2 + z^2)^2  \  \   \       \  $$    By Cauchy-Schwarz Inequality  more precisely Titu's Lemma  Also we can see that $\displaystyle  \          \  (x^2 + y^2 + z^2)^2  \geq 9(xyz)^\frac{4}{3} $  This will result in      $$\displaystyle \sum_{cyclic} (\frac{x^4}{8x^3 + 5y^3}) \times (x^3 + y^3 + z^3) \geq 3(xyz) \frac{3(xyz)^\frac{1}{3} }{13}$$   Now we can tell $\displaystyle  {(x^3 + y^3 + z^3)} \geq {3(xyz)} \ \ \ $ (always true) i.e it is equivalent to say that $\displaystyle \sum_{cyclic} (\frac{x^4}{8x^3 + 5y^3}) \geq \frac{3(xyz)^\frac{1}{3} }{13} .$  Am I correct ?

$x,y,z >0$, prove   $$\frac{x^4}{8x^3+5y^3}+\frac{y^4}{8y^3+5z^3}+\frac{z^4}{8z^3+5x^3} \geqslant \frac{x+y+z}{13}$$   Note: Often Stack Exchange asked to show some work before answering the question. This inequality was used as a proposal problem for National TST of an Asian country a few years back. However, upon receiving the official solution, the committee decided to drop this problem immediately. They don't believe that any students can solve this problem in 3 hour time frame.   Update 1: In this forum, somebody said  that BW is the only solution for this problem, which to the best of my knowledge is wrong. This problem is listed as "coffin problems" in my country. The official solution is very elementary and elegant.   Update 2: Although there are some solutions (or partial solution) based on numerical method, I am more interested in the approach with "pencil and papers." I think the approach by  in  may help.    Update 3: Michael has tried to apply Peter Scholze's method but not found the solution yet.  Update 4: Symbolic expanding with computer is employed and verify the inequality. However, detail solution that not involved computer has not been found. Whoever can solve this inequality using high school math knowledge will be considered as the "King of Inequality".


I'm currently playing as a Lizardfolk Warlock (Dungeons & Dragons 5E) and my character started with two daggers. Is there anyway to simultaneously attack with them while in combat? If I were to dual-wield them, how should I proceed?

We have a Barbarian on our team that very much likes to switch up his weapons; he goes from a Dwarven Hammer, to a pair of Hand-Axes, to occasionally just going bare-fisted. No issues there, he's fairly adept with all 3.  However, I have only just recently picked up on the way that he rolls his attacks for the two Hand-Axes: He rolls the first attack, adds his modifiers etc. Then he rolls the second attack, this time without modifiers, which is all well and good. But I'm not sure if this action uses his bonus action or not, or is considered a separate action (though, being a level 4 Barbarian, he only has one action per turn), or is merely part of the same action.  If we have a look at the Two-Weapon Fighting feature from the Fighter's fighting styles:     Two-Weapon Fighting   When you engage in two-weapon fighting, you can add your ability modifier to the damage of the second attack. (PHB5e p.72)   Similarly, the Dual Wielder feat also uses the Two-Weapon Fighting feat:     Dual Wielder   You master fighting with two weapons, gaining the following benefits:      ...         You can use two-weapon fighting even when the one-handed melee weapons you are wielding aren’t light. (PHB5e p.164, emphasis mine)      So; yes, this gives a bonus to the second weapon attack, but having asked a  to clarify which action this secondary weapon attack belongs to, it was determined that this uses your bonus action;     [...] the second attack requires a bonus action   So after that long winded explanation, here is the question: Without any additional feats, can you wield and use two weapons at once, and if so, how many actions does it require to make a full attack with both weapons in a turn?


I have a Intel Wifi AX200 as far as I can tell. I have seen more topics about this but I'm not really sure what to do.  On this page:   There are the following steps:   To install firmware:  1. Copy the files into the distribution-specific firmware directory, /lib/firmware. 2. If the directory doesn't work, refer to your distribution documentation. 3. If you configure the kernel yourself, make sure firmware loading is enabled.    Does this mean I have to put it in /lib64/firmware since I have a 64bit OS?  Also how do I know if the directory works or not? Is it just a single reboot?  The adapter is working on windows, is there any risk of breaking that (I have dual boot)?  I also readed somewhere that after kernel 5 is installed that it should be supported natively. So I prefer that over drivers.  I'm using ubuntu 18.04.03, a folder /lib64 already exists but there is no firmware folder in there. /lib/firmware does exist.

Please note that this question is specific to Intel WiFi adapters.  My laptop is an HP ENVY with an Intel AX201 Wifi Adapter. I've dualbooted Ubuntu with Windows.  AX201 WiFi adapter is not supported by latest Ubuntu 18.04 version, because Ubuntu 18.04 comes with Linux Kernel 5.0, whereas support for AX201 comes built-in in Linux Kernel 5.2+. Canonical claims that Ubuntu 18.04 will get Linux Kernel 5.3 sometime next year. However, I wont be able to wait that long.  I tried downloading and installing Kernel 5.2.14, but I cant go beyond Grub: I get the error:     error: you need to load the kernel first.   Other option is to download the Intel Backport Driver, which I tried. That didn't seem to work either. As per the tutorials, I've restarted frequently, but that didnt work either.  Also I'm not quite sure if Intel IWLWIFI Backport driver supports AX201 in the first place.  WiFi works while I'm booted in Windows.  What should I do?  Thanks in advance!  UPDATE  I tried out @Pilot6's answer, and it worked. Thanks!  I have one last question: I've read that if you upgrade the Kernel beyond what Ubuntu 18.4 supports, its kinda unsafe (which I read as prone to system crashes).  I dont want system crashes because I have only one partition (root) for Ubuntu, and any crash would likely mean all my data is lost. One method forward would be to split my Ubuntu partition into root and home.  So if I want to access WiFi on my device safely without risking any crashes, what should I do?  My understanding of Ubuntu and Linux may be wrong as they are built on forum answers only. Please correct me if Im wrong anywhere.


I have been an avid (casual) player of hearthstone since its initial release. While I have played my share of games, I have never bothered to delve deeper into the mechanics of the game.  After watching several hearthstone videos on youtube, I came across the term "order of play". It seems to be somewhat related to the order of which abilities like deathrattle are triggered being determined by the order in which the minions were summoned.   Take for example a situation where a Dreadsteed is pit against am Unstable Ghoul. Supposing the unstable ghoul is left with one health and it was played first, if you were to use Whirlwind as a warrior, would Dreadsteed die once or twice?  I am certain that there are better examples than this but I can't seem to think of one as of right now. Perhaps you can provide an example in your answer.

I was using  and my opponent has a . I attacked Sylvanas, fearing that the Deathrattle will take control of one Hyena. I feel lucky, because it did not happen.  I want to know if there are some general rules of effect precedence.   Has Blizzard published something about this?  Are there articles teaching about precedence?   Please note, I want guidance about effect precedence in general, not just about Deathrattle.


I´m having problems with a JQuery on click event over a dynamically created element.  The code created dynamically is this:

        <button class="close" type="button">x</button>             Ya esta suscrito a nuestras listas de envío, sus datos han sido actualizados.

   And I´m trying yo change the height of a container (class bloqFormulario) when the client click on the close button.  I have tried these options:  (function($){     $(".close").click(function() {         $(".bloqFormulario").height(200);        }); })(jQuery);    (function($){     $(".message_area").on("click", "button", function() {         $(".bloqFormulario").height(200);     }); })(jQuery);   But I have no result.  Can you help me?  Thanks a lot.

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


OK, I'm using headless Ubuntu 18.04 LTS on a Dell PowerEdge T710 Server, I have already configured postfix to use my gmail account as a relay, for things like sending emails using php, for things like forum account verification etc etc, now, here's the dilemma, unless I frequently access my server, I have no idea when updates are available, with exception to the livepatch service, is there a way for Ubuntu to send me emails using postfix to notify me when updates are available?  Being that I have auto checking on my email account.

There's obviously a way to check to see when an update is a security update. I often get greeted by a motd that says "there are N security updates."  What I'd like to do is have my server email me a list of what packages need updating for security reasons.   To take it a step further, the email would link to the applicable security notification from Ubuntu.  Basically, each server is somewhat unique. I've received several emails on the security mailing list for packages I do not have install on any/all servers. So I'd like each individual server to tell me what it needs. That way I can apply updates in a timely manner, while avoiding restarting services like Apache that would cause users to have some downtime.  How could I do this?


I am trying to understand the similarities and differences between the minimal polynomial and characteristic polynomial of Matrices.   When are the minimal polynomial and characteristic polynomial the same When are they different What conditions (eigenvalues/eigenvectors/...) would imply 1 or 2 Please tell me anything else about these two polynomials that is essential in comparing them.

Assume that we are working over a complex space $W$ of dimension $n$. When would an operator on this space have the same characteristic and minimal polynomial?    I think the easy case is when the operator has $n$ distinct eigenvalues, but what about if it is diagonalizable? Is that sufficient, or can there be cases (with repeated eigvals) when char poly doesn't equal min poly? What are the general conditions when the equality holds? Is it possible to define them without use of determinant? (I am working by Axler and he doesn't like it.)  Thanks.


string[] columns   I want to delete the item on an index specified by a variable of type int.  How do I do this ?  I tried  columns.RemoveAt(MY_INT_HERE);   But apparently this does not works.

I have an array of Foo objects. How do I remove the second element of the array?  I need something similar to RemoveAt() but for a regular array.


I am trying to populate a unique identifier field "STD_ID" using arcpy.da.UpdateCursor.  The identifier would be an iterative 1,2,3 and would reset the iteration based on region ID in which the polygon is located "RBSB_ID2"  My problem is I can't figure out how to reference the next row to restart the iteration. I updated the for loop to include cursor.next(), the error is now that I never started the iteration.   #call stands layer and define variables  stands = "F:/ArcGIS/Data/ForestPlanning.gdb/NYC_Stands" rbsb_std = ('RBSB_ID2', 'STD_ID')  #define iteration. iteration = 0  #create cursor for Stand IDs using arcpy.da.UpdateCursor  with arcpy.da.UpdateCursor(stands, rbsb_std) as cursor: for row in cursor:     try:         next_row = cursor.next()      except StopIteration:         next_row = row      if row[0] != next_row[0]:         row[1] = 1     else:         row[1] = iteration + 1         iteration = iteration + 1     cursor.updateRow(row)   Any ideas on how to fix this?      I just edited the code to reflect toslunds original answer.     In response to the desired output ... assume   RBSB_ID2 = [100023, 100023, 100023, 100144, 100144, 1000144, 1000144, 1001512, 1001512]  #The output for 'STD_ID' would be:   STD_ID = [1, 2, 3, 1, 2, 3, 4, 1, 2]  #The next step would be to convert to STD_ID to a string & later convert to something like   #[001, 002, 003, 001 ...] and then later concatenate with the RBSB_ID to  #create a unique id for each row that links RBSB_ID2 with STD_ID.    #RBSB_STD_ID = [100023001, 100023002, 100023003, 100144001, ...]

I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.  I assume it would be an alteration of this:  rec=0 def autoIncrement():  global rec  pStart = 1   pInterval = 1   if (rec == 0):    rec = pStart   else:    rec = rec + pInterval   return rec


$$2^n \ge n^3  \ \forall n\ge 1$$ My effort:  Check the base case: $P(1): 2\ge1 \ \text{(true)}$ supposing that $P(n) \Rightarrow  P(n+1):$ $2^{n+1} \ge (n+1)^3$ I'll try the induction step: $$2^{n+1} = 2^n \cdot 2 \ge 2n^3 = n^3 \cdot 2 \ge n^3 \cdot \frac{1}{(n+1)^3}$$ I'm not sure about the last step, but in any case, I can't find any way to get to $(n+1)^3$ and prove the induction step.  How can I do?


$x_1(t)=3\cos(2t+\pi/2)$ and $x_2(t)=4\cos(2t)$ given. What is the result of $x(t)=x_1(t)+x_2(t)$? When I do the calculations, I get the result as below. $$x(t)=x_1(t)+x_2(t)=3\cos(2t+\pi/2)+x_2(t)=4\cos(2t)$$ $$x(t)=3\left[\cos(2t)\cos(\pi/2)-\sin(2t)\sin(\pi/2)\right]+4\cos(2t)$$ $$x(t)=-3\sin(2t)+4\cos(2t)$$ I wonder If I can simply the result in $x(t)=A\cos(\omega t + \phi)$ form.

I don't understand this. These identities are given in the online notes for MIT's 18.01 calculus class. It's related to taking the sum of two trig functions and transforming them into a single trig function. I can use the formulas to do this, but I am having trouble finding anything on the internet to use a proof for my understanding.  Thanks for any responses!  EDITED (added after the first answer):  Sorry, the identity goes like this:  $A\sin{k(x-c)}=a\sin{kx}+b\cos{kx}$ ,  with the relationships  $a=A\cos{kc}$ , $b=-A\sin{kc}$ , $A=\sqrt{a^2+b^2}$ , and $\tan{kc}=-b/a$


I am a begginer in javascript, so i just need theoretical explanation.  What's mean ; behind } and why I must put it there? When i work in PHP I don't need to put ;  after function {} like in this case.   var orangeCost = function(price) {     var quantity = 5;     console.log(quantity * price); }; orangeCost(5);   I just want to know is this code good or not because I can't get a desired result  in this case:   var orangeCost = function(price) {     var quantity = 5;     console.log(quantity * price); } orangeCost(5);

In many situations, JavaScript parsers will insert semicolons for you if you leave them out. My question is, do you leave them out?  If you're unfamiliar with the rules, there's a description of semicolon insertion on the . Here's the key point:     If the first through the nth tokens of a JavaScript program form are grammatically valid but the first through the n+1st tokens are not and there is a line break between the nth tokens and the n+1st tokens, then the parser tries to parse the program again after inserting a virtual semicolon token between the nth and the n+1st tokens.   That description may be incomplete, because it doesn't explain @Dreas's example. Anybody have a link to the complete rules, or see why the example gets a semicolon? (I tried it in JScript.NET.)   is related, but only talks about a specific scenario.


was put on hold seemingly less than 1 hour after being first published. Less than 1 hour after that I updated to address one of two complaints (2nd was never applicable) yet am still 1 'reopen' vote short of having the Q actually re-opened. None of the 4 people who voted to put it on hold opined after my revisions. With the above as setup, a request and a comment:   comment: seems like there should be a way to prompt (read: nag) those voting to close a question to provide timely feedback on revisions. IMO power to prevent someone else's participation should be weighted down with responsibility for follow-up when corrective action was taken. At the very least, the down-voters should be required to explain why the revisions are insufficient (in free-verse, not just 'pick a checkbox' - that may or may not apply) request: could I please get another 'reopen' vote on my question (or an applicable, lucid explanation as to why it is still not merited)?   Thanks

I asked  on the website. It was closed as being off-topic. The off-topic message says If this question can be reworded to fit the rules in the help center, please edit your question or leave a comment. all of which I had done approximately 2 hours before the question was closed.  So I would like to know how do I ask the users who cast the vote to close the question after I had commented about the validity of the question about where else should I comment in order to fulfill the criterion regarding commenting in order to explain the question?


I have read online, that one can show that  $\sum_{n=1}^{\infty}n = -\frac{1}{12}$.   But isn't this a Riemann Series of the form $\sum_{n=1}^{\infty} \frac{1}{n^p}$, where $p=-1$.   And if so, can't you prove that  $ \lim_{N \to \infty} \int^N \frac{1}{x^{-1}} = \lim_{N \to \infty} \frac{x^2}{2} = \infty$,  thus, by the integral test for convergence, the series diverges? Where is my mistake?

$\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer?


I've been wondering why the ubuntu's version of chromium is still on 25 -- from lucid up until  raring -- while the current stable version is 28. The only reason I use chromium is to use the web apps integration.  PS : I have tried to use the web apps integration on another version of chromium -- not google chrome -- which is 28 then it seems that some features I use was lost while using other version than 25.  EDIT: Sorry I forgot to tell you I use the 13.04 version and also the development branch 13.10. My question was : Why does ubuntu doesn't update the package in the repository to the current stable version?

Is there an easier way to install Chromium than what is described ?  Furthermore, is there an easier way to stay up to date with current Chromium releases rather than having to re-build Chromium each release? (a script which automatically grabs and installs the latest build possibly?).  Related:


I was reading a book on compressive sensing wherein they mentioned that in the limit, the zero'th norm of a vector is the number of non-zero elements in that vector. That is,  $$\lim_{p\rightarrow 0} ||x||_p = ||x||_0 = | \text{supp}(x) |$$  where $\text{supp}(x)$ is the number of non-zero elements in $x$.  I could not prove this. Any help would be greatly appreciated.

On $\mathbb{R}^n$ and $p\ge 1$ the $p$-norm is defined as $$\|x\|_p=\left ( \sum _{j=1} ^n |x_j| ^p \right ) ^{1/p}$$ and there is the $\infty$-norm which is $\|x\|_\infty=\max _j |x_j|$. It's called the $\infty$ norm because it is the limit of $\|\cdot\|_p$ for $p\to \infty$.  Now we can use the definition above for $p<1$ as well and define a $p$-"norm" for these $p$. The triangle inequality is not satisfied, but I will use the term "norm" nonetheless. For $p\to 0$ the limit of $\|x\|_p$ is obviously $\infty$ if there are at least two nonzero entries in $x$, but if we use the following modified definition $$\|x\|_p=\left ( \frac{1}{n} \sum _{j=1} ^n |x_j| ^p \right ) ^{1/p}$$ then this should have a limit for $p\to 0$, which should be called 0-norm. What is this limit?


The date that is receive is in the format 'Wed Jan 01 02:00:00 IST 2020'.  If I use hibernate, it automatically converts this format into '2020-01-01 02:00:00' but for this case I have to use native query.  Is it possible in SQL SERVER 2012 to save the date 'Wed Jan 01 02:00:00 IST 2020' as the format '2020-01-01 02:00:00'?

I want to convert a string like this:  '10/15/2008 10:06:32 PM'   into the equivalent DATETIME value in Sql Server.  In Oracle, I would say this:  TO_DATE('10/15/2008 10:06:32 PM','MM/DD/YYYY HH:MI:SS AM')    implies that I must parse the string into one of the , and then convert using one of those codes.  That seems ludicrous for such a mundane operation.  Is there an easier way?


I have a python script  $ cat ~/script.py import sys from lxml import etree from lxml.html import parse doc = parse(sys.argv[1]) title = doc.find('//title') title.text = span2.text.strip() print etree.tostring(doc)   I can run the script on an individual file by issuing something like  $ python script.py foo.html > new-foo.html   My problem is that I have a directory ~/webpage that contains hundreds of .html files scattered throughout sub-directories. I would like to run ~/script.py on all of these html files. How can I do this?  I'm aware that I can list all the .html files under ~/webpage/ by issuing   $ find ~/webpage/ -name "*.html"   but I'm not quite sure how to use this list to run my script on them.

I want to run the command   python quast.py -o quast contigs.fasta   but I want to do this for multiple contigs.fasta files in multiple directories.  I'm running OSX.


In the book The Hobbit, Tolkien never says what the trolls look like. So by the way they talk and what is said about them, what do they look like?

Bear with me, while the question seems sort of ridiculous because the movie of Jackson and fantasy-role playing games presented them in detail, in fact the original Tolkien does not describe their features.  Orcs are ugly and are a bit smaller than humans, but apart from that there is very scarce information about their appearance or even if their members are looking alike or very different in stature and looks. We know that the Uruk-hai were stronger and bigger than the cave orcs and some specific orcs like Grishnakh are mentioned for their long arms, but essentially that was it.  The troll in Moria had a toeless foot and a skin which looks like a net over skin, but apart from very strong and very big there is not much information about trolls either.  So had Tolkien a specific image in mind or did he deliberately left it open to give the reader their own suggestion ? Are there drawings or descriptions outside LOTR from Tolkien ?


How can I make a bash script run only at shutdown?  I have searched for it and keep coming up empty handed. I would be fine with either a link or an explanation to how to do it.

I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I can add the line of code to the "logoff/shutdown" file or if I need to reference it in another script.


The problem states as,  Prove the sequence $$S_n= \Bigl(\frac{1}{n}\Bigr)^n+\Bigl(\frac{2}{n}\Bigr)^n+ \cdots \Bigl(\frac{n}{n}\Bigr)^n$$ converges to $\frac{e}{e-1}$.  A simple (possibly wrong) solution:  We can  also write the sequence as $$S_n=\Bigl(\frac{n}{n}\Bigr)^n+ \Bigl(\frac{n-1}{n}\Bigr)^n+\Bigl(\frac{n-2}{n}\Bigr)^n+ \cdots +\Bigl(\frac{2}{n}\Bigr)^n+\Bigl(\frac{1}{n}\Bigr)^n$$   Where we just rearranged the terms of the sequence. Since the series $\lim \limits_{n \to \infty} S_n$ is absolutely convergent, the rearrangement will not affect the value of the limit.  Now by passing the limit to $S_n$ $$\lim \limits_{n \to \infty}S_n=\lim \limits_{n \to \infty}\Bigl(\frac{n}{n}\Bigr)^n+ \lim \limits_{n \to \infty}\Bigl(\frac{n-1}{n}\Bigr)^n+\lim \limits_{n \to \infty}\Bigl(\frac{n-2}{n}\Bigr)^n+ \cdots $$ or, $$\lim \limits_{n \to \infty}S_n=1+e^{-1}+e^{-2}+\cdots$$ or, $$\lim \limits_{n \to \infty}S_n= \frac{e}{e-1}$$  Why I'm considering it wrong:  I know the basic limit theorem $\lim(X_1+X_2)=\lim X_1+\lim X_2$ and by mathematical induction, the theorem is true for sum of any finite number of $X_n$'s. However, the theorem does not hold good if $n \to \infty$. For example, let us take a sequence $$a_n= \frac{1}{n^2}+\frac{2}{n^2}+\cdots \frac{n}{n^2}$$  Where $\lim\limits_{n \to \infty}a_n=\frac{1}{2}$, although if we take limit term by term in the summand (i.e expression of $a_n$), we would get $\lim\limits_{n \to \infty}a_n=0$.  Now coming back to our original sequence of concern, it is fairly easy to show that$\lim\limits_{n \to \infty}S_n \leq \frac{e}{e-1}$, since the function $f(x)=\Bigl(1-\frac{k}{x} \Bigr)^x$ is monotonically increasing $\forall x \geq 1$ and $\forall k \in \Bbb N$.  Now we got somehow to show $\lim\limits_{n \to \infty}S_n \geq \frac{e}{e-1}$, in order to use the squeeze theorem to get the desired result.  However, I'm unable to make any significant progress to find the same. So my questions are,  i) How to show $\lim\limits_{n \to \infty}S_n \geq \frac{e}{e-1}$  or what can be some alternate method to find the desired limit of the sequence?  ii) Moreover, are there any general results when $\lim(X_1+X_2+ \cdots) = \lim X_1+ \lim X_2+ \cdots$ holds even when the number of terms in the summand are infinity?

I can show that the following limit exists but I am having difficulties to find it. It is $$\lim_{n\to \infty} \sum_{k=1}^n \frac{k^n}{n^n}$$ Can someone please help me?


I have this fiddle    when  clicked in IE gets a dotted border around the li in IE but does not happen in Firefox..Is there a way we can get that in firefox.

                Content

                      People

                      Test

I can make Firefox not display the ugly dotted focus outlines on links with this:  a:focus {      outline: none;  }   But how can I do this for <button> tags as well? When I do this:  button:focus {      outline: none;  }   the buttons still have the dotted focus outline when I click on them.  (and yes, I know this is a usability issue, but I would like to provide my own focus hints which are appropriate to the design instead of ugly grey dots)


I use this command kill @e[type=!Player] to kill everything except for players, but does anyone know how to make it not kill tamed wolves/dogs as well as players?

I've asked this question towards a developer for Minecraft and I thought I'd ask here too since they might not see the question.  How do I select all but two types of entities in Minecraft?  For example, something like: /say @e[type=![Player,Item],r=50] (to clarify I also tried type=Item,Player, type=Item,type=Player etc)  Should select any entity that does not match players or items, so things like Creepers, Ghasts, XPOrbs, PrimedTNT and so on within a radius of 50 blocks and print them to the chat.  Instead it ignores one of the flags, and works with the other instead.


I've been doodling around with some numbers and I think this is true, however I have not been able to prove it yet. I'd like to know if you have a suggestion or a counterexample for this. Thanks!

Suppose that $m,n \in \mathbb{N}$. Using the fundamental theorem of arithmetic it is easy to show that there exist $c,d \in \mathbb{N}$ such that $(c,d) = 1$, $cd = (m,n)$ and $(\frac{m}{c},\frac{n}{d}) = 1$.   Is there any quick way to prove this without using the prime factorizations of $m$ and $n$, i.e. only the basic properties of the gcd, lcm, etc.?


An electric circuit is considered a closed circuit if there are two wires connecting to a load, namely live wire and neutral wire. Therefore someone would get electrocuted by touching live wire or neutral wire. However some technicians said that it's safe to touch neutral wire because it contains no electricity, is it true?

If the neutral wire carries current, why do many people believe that it's safe? I've heard "You can touch the neutral wire/bar in the breaker box and not get shocked. Only the hot can hurt you." If the circuit is complete and current is flowing, can't you receive a shock?


In The Chamber of Secrets, Percy - a Gryffindor prefect - docks 5 points from Harry, Ron and Hermione for lurking in a girls' bathroom. In The Order of the Phoenix, however, Draco states that prefects cannot in fact dock points from students:     I know prefects can’t dock points, Weasel King. But members of the Inquisitorial Squad –   I'm just a bit confused. Is this just sloppy writing or did the rules change?

In Harry Potter and the Chamber of Secrets, Percy argues with Ron when he catches Ron and Harry in a corridor at night, and tells him, "Five points from Gryffindor." However, in Order of the Phoenix, it states that members of the Inquisitorial Squad, "unlike prefects," can take points from the houses.  Was Percy bluffing? Or is this just a small inconsistency in the books? I prefer to think that Percy just wanted to pretend, since he loved the feeling of power and authority, but I don't know of any other explanation.