I found a great solution at .  I used the example:  exec > >(tee $somelog) 2>&1   ...and managed to get everything to tee great. Now, how to I turn it off again?

I use :  exec >script.log 2>&1   in my script to redirect all output to a file. At the end of the script I would like to print a message to the screen. How do I stop the redirection?


I want to define a command that defined other commands. A similar problem was considered in . However, I couldn't figure out how to adapt that solution to my needs because I need the functions that I dynamically define to be able to take arguments. Consider the following example. I want to be able to use \definecommand to dynamically define both \greetp and \greete. My attempt at a solution is given below, but commented out (I used question marks where I wasn't sure what to do). I would also like my dynamically defined commands to be able to take optional arguments if possible.  \documentclass{article}  \newcommand{\greetp}[1]{hello, #1.} \newcommand{\greete}[1]{Hello, #1!}  %\newcommand{\definecommand}[2] %{ %    \expandafter\def\csname#1p\endcsname{#2, ?.} %    \expandafter\def\csname#1e\endcsname{#2, ?!} %} %\definecommand{greet}{Hello}  \begin{document}  \greetp{world} \greete{world}  \end{document}

I've seen sometimes that people use a double pound sign (##) when defining/using arguments.  What is the difference between the normal argument, #1, and the double sign one, ##1? Are there any restrictions for its use? Can you list the good practices, if any, for this type of arguments.


If we use a way to control the complexity of our regression model by adding a penalty terms to the error: $\hat{E} = E + \lambda \Omega$ and use as regularization term omega for example a penalty for large weights $\Omega = \frac{||w||^2}{2}$ with $w$ being the vector of weight, why do we need to normalize our data before?

Hey guys I found one or two papers which use ridge regression (for basketball data). I was always told to standardize my variables if I ran a ridge regression, but I was simply told to do this because ridge was scale variant (ridge regression wasn't really part of our course, so our lecturer skimmed through it).  These papers I read didn't standardize their variables, which I found a bit surprising. They also ended up with large values of lambda (around the 2000-4000 level) via cross-validation, and I was told that this is due to not standardizing the variables.  How exactly does leaving the variable(s) unstandardised lead to high lambda values and also, what are the consequences of not standardizing the variables in general? Is it really such a big deal?  Any help is much appreciated.


I created an island with clouds hanging in the sky somewhere behind the island and a camera that approaches the island and moves around it, before moving away from it. When my camera begins approaching the island, the clouds are  not visible. When the camera is right in front of the island, the clouds are all visible. And when the camera moves away from the island, the clouds dissapear again. What is going on there? I think, it has something to do with the depth of my world or the depth of what the camera can see. Thanks for help!

I have created a simple model here   When rendering it the end of it is cut off   How can I get the camera to render a longer distance?


I'm exporting MOVs from Flash, then converting them to mp4 with Handbrake. The video will scale to the screen size, but I would prefer it to scale down, rather than scale up. So, what are the maximum/optimum/best pixel width and height of a MOV/mp4 for iphones? Or, to take it a step back in the process, what are the pixel dimensions I should set for my Flash document (which is then exported to MOV at 1:1)? PS: I know iphone screen sizes have changed with each new iphone, and screen sizes come in . But hopefully in the end there's max X-px x Y-px. (, but no answers)

I'm exporting MOVs from Flash, then converting them to mp4 with Handbrake. The video will scale to the screen size, but I would prefer it to scale down, rather than  scale up.   So, what are the optimum pixel width and height of a MOV/mp4 for iPhones? By "optimum", I mean the maximum needed to display 1:1 on the highest definition iPhone screen.   I know iPhone screen sizes have changed with each new iPhone, and screen sizes come in . But hopefully in the end there's max X-px x Y-px.


I tend to think of the Coppersmith card in Dominion: Intrigue as pretty much a dud of a card. Anybody have any useful tips as to how to play this card properly?

I've been playing Dominion with the base + Intrigue sets for a while now, and one of the cards that I have trouble wrapping my mind around is the Coppersmith.  In theory, it seems like a great card - it allows you to make all of your Coppers into Silvers, and in some cases - even Gold. However, I have yet to build a deck during a game that manages to use it effectively. Usually, in order to pull one or two of those with a nice amount of coppers, I need to create a deck that relies heavily on +cards/+actions chains, and the Coppersmith only begins to affect the game too late for it to be of any use.  So... how can this card be effectively used?


The rule of the game is as follows: The player rolls a fair six-sided dice repetitively until the game is over. After each roll, if the cumulative sum of all the rolls so far is a square number (1, 4, 9...), then the game is over, and the player gets nothing. If the cumulative sum of all the rolls is NOT a square number, the player can choose to either stop rolling and get paid the current cumulative sum amount of dollars; or she can choose to continue the game and roll again. For example, let's say Alice plays this game and rolls a "2". It's not a square number. Alice chooses to continue the game. She rolls a "6" this time. Now the cumulative sum is 8. She can choose to keep rolling, or she can end the game and keep 8$ as her winning. Let's say she chooses to roll again and rolls a "1", then the cumulative sum becomes 9, a square number. The game ends and she gets no money. My question is: what is the optimal strategy for this game, and what is the expectation of winnings if you play the optimal strategy? Or in other words, if you charge a ticket price to play this game, it should be at least how much? My thoughts: let $E_k$ denote your expected payoff if the current cumulative sum is $k$. $E_k=0  $ if $k=n^2$ where $n=1,2,...$ The ticket price would be $E_0=\frac{1}{6}(E_1+E_2+E_3+E_4+E_5+E_6)=\frac{1}{6}(E_2+E_3+E_5+E_6)$ And we have $E_2=max(2,\frac{1}{6}\sum^{i=6}_{i=1}E_{2+i}), E_3=max(3,\frac{1}{6}\sum^{i=6}_{i=1}E_{3+i}),...$ etc. To me this looks like a dynamic programming problem, but I cannot find a termination point. At what cumulative sum should I stop rolling? Let's say $N$ is a large integer, then for any cumulative sum $s$ where $(N-1)^2<s<N^2-6$, we would absolutely choose to roll again. But if we get cumulative sum $N^2-6\leq s<N^2$, do we also choose to roll gain? For example, $s=N^2-1$, how do I know if $E_s=max(s,\frac{1}{6}\sum^{i=6}_{i=1}E_{s+i})=s>\frac{1}{6}\sum^{i=6}_{i=1}E_{s+i}?$

Suppose we keep tossing a fair dice until we want to stop, at which point the game ends and our score is the cumulative sum, or until the cumulative sum is a perfect square, in which case we lose and end up with a score of $0$.   We can set up a Markov-style recurrence. Define $f(k)$ to be the expected value of the game if the current cumulative sum is $k$. Clearly, $f(k)$ is $0$ if $k$ is a perfect square. In addition, $f(k)=\text{max}\{k,\sum_{i=1}^6 f(k+i)\}$.   How can we solve such a recurrence to find a good estimate/bounds of the expected score ($f(0)$) and the optimal strategy? Can these methods be extended to a game where we lose if the cumulative sum is an even number, or a perfect cube?


I am using windows 10 and i am trying to install adobe xd software.recently i upgraded my system ram to 2 gb to 4gb just to install this software.  after upgrading the system to 4gb, i am able to see only 2.75 gb in installed memory and because of this i am unable to install Adobe xd software.   any idea how can i utilize the full ram of 4gb so that it shows 4gb ram and so that i can install the software.

In my Intel Core i5 2.80 GHz CPU , DH55HC series Intel mother board machine installed with windows 7 64 bit  machine, when I right click my computer and see system properties I see that "Installed Memory(RAM): 4 GB(1.93 usable)".I have 2 x 2 GB DDR 3 RAM modules.  I have verified, * Two of RAM modules are working * Two of RAM slots in mother board are working   What are the cause(s) for this might be to look next ie: what settings in BIOS etc ?


I've looked at some online financial planners (e.g. Personal Capital) and it looks like all of them charge based on a percentage of the portfolio being managed.  I am looking for a site to help create a financial plan, but I would be fine with implementing it myself.  Does anyone know of one that is purely fee-based?

I've been managing my own expenses pretty meticulously for the past 4-5 years since being out of college and on my own. Because of this, I feel I have more of a clue about finances than the average 28-year-old.  I use  to manage pretty much all of my accounts, though I realize this is just a quick and easy personal finance solution. Plus, there's no personally customized advice on how I invest or set up my monthly budget.  These are the reasons I think I may want to find a good financial advisor. However, I don't know what I don't know. That is, there could be a long list of things I should be doing with my money to plan for retirement or just for general financial wellbeing.  Are these the functions of a financial advisor? What can I expect if I sit down to meet with one? Most importantly, how much would I be paying for this advice and is it worth it?


My array contains duplicate values ...  i tried using array_unique function but its not working..  Code below...     while($rowTable = mysql_fetch_array($resultTable)) {  $selQuery = "SELECT * FROM dump_hotelamenities WHERE HotelCode='$rowTable[HotelCode]' LIMIT 5"; $resultQuery = mysql_query($selQuery);  while($row=mysql_fetch_array($resultQuery)) {     echo "
 Hotel Code : " .$row['HotelCode'];     //$info = array();     $info=(str_replace('YES','',$row['PAmenities']));     $info_new=array();     $info_new =array_unique(explode(';',$info));      echo "
 Hotel Features : " ;      print_r ($info_new);      echo "
";   } }    OUTPUT:   Array ( [0] => Small pets allowed under 5 kg [1] => Small pets allowed under 5 kg [2] => Large pets allowed over 5 kg [3] => Large pets allowed over 5 kg [4] => Wheelchair-accessible [5] => Wheelchair-accessible [6] => Car park [7] => Car park [8] => Garage [9] => Garage [10] => Mobile phone coverage [11] => Wired Internet [12] => Wi-fi [13] => Transfer service [14] => Secure parking [15] => Room service [16] => Laundry service [17] => Hotel safe [18] => Cloakroom [19] => Lift access [20] => Newspaper stand [21] => Supermarket [22] => Bicycle storage [23] => Sun terrace [24] => Gym [25] => Newspapers [26] => Restaurant [27] => Non-smoking area [28] => Photocopier [29] => Sun loungers [30] => Children& [31] => apos [32] => s play area [33] => TV lounge [34] => Sauna [35] => Massage [36] => Spa treatments [37] => Year of construction - 2008 [38] => Number of floors main building - 10 [39] => Apartments - 25 [40] => Studios - 1 [41] => Connecting rooms [42] => Connecting rooms [43] => Apartment complex [44] => Nearest Bus / Metro Stop - 25000 m [45] => Ski slopes - 2000 m )

How can I remove duplicate values from an array in PHP?


I need to find the flaw in the following proof:  $a,b\in\mathbb{R}$\ $\left\{ 0 \right\} $ such that $a=b$  1) Multiplying both sides by $a$ yields the equality: $a^2=ab$  2) Subtracting $b^2$ from both sides yields the equality $a^2-b^2=ab-b^2$  3) Then, $a^2-b^2=ab-b^2\Rightarrow (a-b)(a+b)=b(a-b)$  4) Then, dividing both sides of $(a-b)(a+b)=b(a-b)$ by $(a-b)$ yields: $a+b=b$  5) Substituting $a=b$ yields $2b=b$  5) Therefore, $2=1$    My thoughts and ideas on this:  It seems to me that step $5$ has an error. It should be that $a+b=b\Rightarrow a=0$. However, we initially said that $a,b$ cannot be $0$.

I have a "proof" that has an error in it and my goal is to figure out what this error is. The proof:  If $x = y$, then  $$ \begin{eqnarray} x^2 &=& xy \nonumber \\ x^2 - y^2 &=& xy - y^2 \nonumber \\ (x + y)(x - y) &=& y(x-y) \nonumber \\ x + y &=& y \nonumber \\ 2y &=& y \nonumber \\ 2 &=& 1 \end{eqnarray} $$    My best guess is that the error starts with the line $2y = y$. If we accept that $x + y = y$ is true, then   $$ \begin{eqnarray} x + y &=& y \\ x &=& y - y \\ x &=& y = 0 \end{eqnarray} $$  Did I find the error? If not, am I close?


I am trying to cast anonymous type with the same property to an interface, but it's coming up with an error:  Unable to cast object of type '<>f__AnonymousType104`1[System.Int32]' to type 'IHasFiles'.   public interface IHasFiles  {     int FileMasterId { get; }  }   var entity = new { FileMasterId = fileMasterId }.CastOrDefault<IHasFiles>();  // This is the line where I get the error

Is it possible to have an anonymous type implement an interface?  I've got a piece of code that I would like to work, but don't know how to do this.  I've had a couple of answers that either say no, or create a class that implements the interface construct new instances of that. This isn't really ideal, but I'm wondering if there is a mechanism to create a thin dynamic class on top of an interface which would make this simple.  public interface DummyInterface {     string A { get; }     string B { get; } }  public class DummySource {     public string A { get; set; }     public string C { get; set; }     public string D { get; set; } }  public class Test {     public void WillThisWork()     {         var source = new DummySource[0];         var values = from value in source                      select new                      {                          A = value.A,                          B = value.C + "_" + value.D                      };          DoSomethingWithDummyInterface(values);      }      public void DoSomethingWithDummyInterface(IEnumerable<DummyInterface> values)     {         foreach (var value in values)         {             Console.WriteLine("A = '{0}', B = '{1}'", value.A, value.B);         }     } }   I've found an article  that describes one approach. Is this the best way of doing this?


Sometimes I just looking for a piece of ore and hear one of my teammates say 'Imperial ship above!", and, a few minutes later, that ship will drop a few soldiers on my face.  Is there anything to do to 'dodge' that encounter? It feels like there would be a way to hide from imperial troops?

Whenever I am traveling on foot, imperial ships will fly by and drop down troops for me to fight. In a normal situation, this is no big deal and I will fight or flee to continue with my travels.  However this will also occur when I am doing a quest that requires me to locate and pick up items. This is an inconvenience as I cannot pick up items while in combat and I have to kill them before I can continue.  Is there a way I can "hide" and allow the ships to by pass my location?


According Google Webmaster Tools, my site, www.yomkippurshoes.com is being indexed.   However, when I try to find it in results (e.g. type site:yomkippurshoes.com in Google), I don't see it in the results. This isn't an SEO issue as I'm not concerned about the ranking (yet).  I'm just not sure why it isn't being shown in the results at all.   , Google will  not show the results if the site is down. However, mine isn't down.  Any thoughts on the disparity?

What are the best ways to improve a site's position in the Google search results?


So I've asked 5 questions each with a positive score (and well-received, I guess) on 5 separate days. The badge indicator says that the task is complete (5/5), but I haven't been awarded that badge. Here's my profile:   After clicking on the badge, it says that I still need a "positive question record". I don't have any recently deleted or closed questions and I can't seem to remember any questions that have been closed or deleted in the past year.  It turns out , but there's no way for me to see it directly in the badge progress tracker, which is filled up entirely, giving the impression that the task is complete. You can only find out now that the task isn't complete by clicking on the badge progress tracker. I'm aware of  visible, but can we also have a better indication in the progress tracker that the task hasn't been completed yet?

I was wondering about a question similar to  (for another site), where my "stats" are currently "10/5" (instead of "13/5"). The answer from "Shadow Wizard" links to , which links to yet another "". This last answer has some details about the actual calculation (like the "10" in my case), which is like so:  A positive question record means you don't have too many closed, downvoted or deleted questions, overall. The formula is (total questions - negative questions - closed - deleted)/total questions >= 0.5. Questions that have been downvoted and closed and deleted count three times in this calculation!  Somewhere I also read that these deleted questions seem to count for 3. But the OPer of a deleted question cannot see deleted questions anymore after a while (X days) either. So that seems to make it impossible to actually "verify" your own score (the "7" part), and also how many more "good questions" will be needed. In my case, I'm aware (remember) that there has been at least 1 question deleted. So I assume in my case the "7" must become at least "8" (I don't have negative or closed questions), though I doubt that will be sufficient. Also because I have 2 more questions with a zero votes balance (which makes me wonder also how accurate the "total questions" in the above quote really is ...). My suggestion: think of a way to somehow clarify (visualize) the formula quoted above. Or as a variation at least provide some way to find out the exact number of you questions that were ever deleted (not just the recently deleted ones). Or maybe some other type of indication to indicate "how much more good questions are needed to ever receive the "Curious" badge. Update: I recently learned about adding deleted:yes to a query. With that, these are some more stats about my questions (using "12345" to represent my user id from the site where this question is about):  user:12345 is:q - results in 14 (not deleted) questions, 11 of them have a positive (> 0) voting balance, none of these 14 are closed.  user:12345 is:q deleted:yes - results in 7 (deleted) questions, with this Status / Voting balance for each of them:       Question id Status Voting Balance     1 Closed +4   2 Duplicate +2   3 Migrated 0   4 Duplicate 0   5 Duplicate 0   6 Closed -1   7 Closed -4     So with that extra info, and as per the "Questions that have been downvoted and closed and deleted count three times in this calculation!" I think (guess) in my case the 2 deleted questions with negative voting balance corresponds to -(2*3)=-6 ... So that the "stats" in my case will have to become something equivalent to "(11-6)/5" = "5/5" ... Just guessing, and fingers crossed to see what will happen if I ever post a new question on that site that does not get downvoted+deleted (assuming all other votes for my existing questions don't change in the meantime).


I am trying to find the eigen values of a skew symmetric matrix. So let $A$ be a skew symmetric matrix so $A^T$ = -$A$ Let $\lambda$ be  an eigen value of $A$. So there exists a non-zero $x$ such that $Ax$ = $\lambda$$x$ So $(Ax)^T$ = ($\lambda$$x$)$^T$ or $x^TA^T$ = $\lambda$$x$$^T$ or $x^TA^T$$x$ = $\lambda$$x$$^T$$x$ or $x^T(-A)$$x$ = $\lambda$$x$$^T$$x$ or $-x^T\lambda x$ = $\lambda$$x$$^Tx$ or $\lambda$ =  -$\lambda$ (since $x$ is non-zero) or $\lambda$ = $0$ I am not able to understand what is wrong in this. Help, please!

Given a real, skew-symmetric matrix $\mathbf{A}\in\mathbb{R}^{m\times m}$, and a nonzero vector $X\in\mathbb{R}^{m}$, classify the scalar $\lambda$ (real, complex, imaginary, etc.) in the eigenvalue equation $$ \mathbf{A}X = \lambda X $$  The matrix $\mathbf{A}$ is skew symmetric if $\mathbf{A}^{T}=-\mathbf{A}$.  My try : I am new to matrices , so can not get a idea how to deal with it , Any hint will help


I have ESP32 with several modules attached which require 1A 3.3V. I am planning to use 5V 3A power supply which then step down to 3.3V with AMS1117.  How large capacitor need to stabilize AMS1117 input? Is there any capacitor need to stabilize the output?  Because my electronic engineering knowledge is very limited, I am planning to use 4700uf on AMS1117 input and 470uf on the output. Maybe "bigger is better". Is this correct?   Thanks.

I have an application in which an RFID reader demands 200 mA of current when it attempts to read an RFID tag. For some reason the current switcher power supply either can't supply enough current or can't supply a clean enough voltage and I end up with a poor performance on the reader.   I want to use a standard LM7805CT regulator in place of the switcher, but how large of a capacitor should I use? The datasheet suggests 0.1 uF, but I'm not sure that is large enough since the reader gets turned on and off a lot.  I am regulating down from a 24 V battery (it is pushing the limit of that particular regulator, but I will add active heatskinking to it).


I don't really understand where from they took those parts. Usually trailers contain main scenes from the film to convince fans to go to the cinema. But Infinity War trailer contains scenes, that film didn't contain. They fight in the woods, Bruce turns into the real Hulk and Wakanda is left a long way behind. Why did they include parts that were not in the film?

I had seen all the trailers of  before its release. In one of those trailers Uncle Ben (Martin Sheen) says to Peter,       Do you have any idea what you really are?   This seems to imply that Uncle Ben knows about Peter's identity. This would have been a huge spoiler. But when I saw the movie, there was no such scene.   Do the filmmakers discuss such spoilers with some of the audiences and see if they like it and then change it accordingly? Or was this scene cut for other reasons?


I am a co-author of a retracted paper. It is very unfortunate for me. I just provided technical assistance in the experiment but the 1st author did some scientific misconduct and as a result, the article has been withdrawn by the corresponding author. I want to know how it is going to impact my career. I just helped with the experiment designing and completely unaware of the scientific misconduct by the 1st author and now I am suffering. Please suggest what to do. I want to stay in the same field of research. Hence, is it possible that my abilities will be judged by this retracted article?

Many years ago, when I was very new to the world of scientific paper publishing, I was a co-author to a paper that was subsequently retracted after an investigation of the findings. This was before I did my PhD (was a Master's student in a different field that I am currently in).  To explain, my role in the data collection and analysis was quite specific, and in the investigation it was deemed that my part of the work was verifiable and sound. In hindsight, I have long realised that I should have taken on a more active role in proof-reading the article as a whole, cross checking the findings and being more active in the article writing process. For that, I have always taken responsibility - so, even though I do not have anything to do with the lead author anymore - I am not blaming anyone.  Since then, I have been co-author and first author of over a dozen more papers - many are published without difficulty (we check, cross-check and check everything again nowadays).  But, the question remains, in terms of applying for postdocs, funding, grants and the like - how damaging is it to have been a co-author of a retracted paper?


I wish to hide the grub menu, but with the right settings in /etc/default/grub, the grub menu is still displayed at boot. I run sudo update-grub after each edited. Bellow my grub file:  cat /etc/default/grub GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=2 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""   With the following settings, I still have the menu display while it should not:  GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=0   Same issue with:  GRUB_HIDDEN_TIMEOUT=5 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_TIMEOUT=0   In fact, I have the same effect that the following:  #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10   Using Ubuntu 18.04 LTS with dual-boot windows. Ubuntu is the default entry in grub. I edit the file with sudo nano /etc/default/grub then I run sudo update-grub with success. Could you help me to really hide the grub menu please?  Edit: Following the answer from abu_bua, the issue was solved with add GRUB_DISABLE_OS_PROBER=true here my new grub file:  GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_TIMEOUT=0 GRUB_DISABLE_OS_PROBER=true GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

I tried to update my grub config file to timeout to 0 value, so OS starts quickly. I modified /etc/default/grub configuration file on my Ubuntu 18.04 and then ran:  sudo update-grub   and it didn't work. I also ran:  sudo grub-mkconfig sudo update-grub   but they didn't work.  I searched a lot on the web to solve this issue, but all guides say to run the update-grub command to update grub by /etc/default/grub config file. I don't know if is Ubuntu 18.04 that handles grub files in a different way, but I cannot update my grub with my parameters.  This is my /etc/default/grub file:  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"


As you may know, Google came out with the new Android 6.0 but it is not available in my country right now. I was wondering if I bought an Android 5.0 device from the store, would I be able to upgrade to Android 6.0 manually in the future?

I never dealt with Android devices before so I'm completely newbie at it, please comment if something is too simple.  Say I purchase , that has got Android Froyo 2.2 installed in it.  If there is a new version of Android released tomorrow or next month, will I be able to update it (like I will be able to update my iPod Touch 4 to iOS 5)?


In preparing academic articles that require quotations from reputable Journals and books I am faced with a round-about retrieval process. First I take a screenshot then print that then scan it and then OCR it into my article document.   Is there a simpler way?  I have an iMac, MS Office and a Canon scanner with My Image Garden.

Is there any tools to copy text from video's or images?


I am trying to prove the following statement:  If $f(z)$ is entire, show that the family formed by all the functions $f(kz)$ with constant k is normal in the annulus $r_1 < |z|<r_2$ If and only if $f$ Is a polynomial.  I have been trying to write, unsuccessfully, a concise proof of this fact just using Arzela-Ascoli, Montel’s theorem, Marty’s theorem or results in this line.  Thank you for your help.

Suppose that $f : \mathbb{C} \to \mathbb{C}$ is entire. Let $\Omega = \{ z : \frac{1}{2} < |z| < 2\}$. Furthermore, suppose that $ \mathcal{F} = \{f(kz) : k \in \mathbb{C}\}$ is a normal family of analytic functions defined on $\Omega$; the family $\mathcal{F}$ is normal on $\Omega$ iff each sequence from $\mathcal{F}$ has a subsequence converging uniformly on compact subsets of $\Omega$. Prove that $f$ is a polynomial.  I'm studying for my qualifying exam in complex analysis, and this question appears on an old exam. Usually, when I want to show that some entire $f$ is a polynomial, I just try to show that there exists some $N$ so that $f^{(k)}(0) = 0$, all $k \ge N$, but I'm having trouble getting that strategy to work here. I've been looking at the sequence $f(\frac{z}{n})$ trying to make something work, but have not had any success.   I would prefer to receive a hint or two, and then I'll try to post my own solution. Thanks in advance!


I am having a little issue.  When I use JSON path to extract a value from a DTO like so:  public String recipientEmail() {     String email = validatableResponse.extract().jsonPath().get("email[0]").toString();     return email; }   If that DTO contains a value like:  email: "test@gmail.com"   It works fine and outputs this value. However, if the value is null like so:  email: null   Then it gives me a NullPointerException. How can I fix this and be able to retrieve the null?  Thanks.

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?


edit: the linked one doesn't solve this particular case, since in my case there is a nested type.  Lets imagine the situation is like this:  //foo.hpp //include guards  template <typename T> class foo {     class bar; };   The code for bar is too big, so I'd like (not really me, but it doesn't matter) to another file.   So, the current situation is this:  //foo.hpp #include <bar.hpp> //include guards  template <typename T> class foo {      class bar; };  //bar.hpp #include <foo.hpp> //include guards      template <typename T> class foo::bar {     //... }   This is certainly circular dependency. But the thing is that compiler (clang and gcc) accepts it.   Should I fix it or there is nothing to fix? If it is an error, how should I fix it? Should I just dump everything into one file and call it a day?  In reality, that bar is an iterator, which I wouldn't want to make standalone.  There are include guards there, so I guess that is what prevents it from being included many times, but still the circular dependency makes me worried.

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


I'm sure some (if not most) have seen this by now and since I'm fairly new to real deep mathematical explorations I'm stumped as to why this would be true.   For class I was asked to cut out an 8" x 8" square and then asked to cut the square into 2 right triangles each of base height 3" and base 8" and two trapezoids each of base1 3" and base2 5" with height 5".   I was then asked to rearrange the shapes to make an 5" x 13" rectangle and sure enough the pieces fit snuggly. Now 5" x 13" will not give us the same area that we initially had. Measuring the pieces separately one would get that each trapezoid has an area of 20 inches squared and each triangle has an area of 12 inches squared.    Any explanations please, thank you!

how is this possible? I know there is some trick, should someone please explain?!


Player A attacks with two creatures. Player B plays the instant card  on a creature and blocks two attacking creatures. Player A then plays the instant .  Are those two creatures blocked or not?

Suppose Player 1 has a Dragon on the table and  in hand, while Player 2 has two Spiders on the table.  Player 1 chooses to attack with the Dragon and Player 2 chooses to block with one of the Spiders.  Before combat damage is to be dealt, Player 1 uses Unsummon on the blocking Spider.    Does Player 2 take any life damage from the attacking Dragon?


I have written this code. All right for the figure. The question is about the references to the subfigures.  \begin{figure*}[!t] \normalsize     \begin{subfigure}[b]{0.48\textwidth}         \includegraphics[width=\textwidth]{img/sigma-v} \label{fig:Pv-sigma}         \caption{$P(v)$ trend to the vary of pole $p$.}         \label{fig:sigma}     \end{subfigure}%     ~     \begin{subfigure}[b]{0.48\textwidth}         \includegraphics[width=\textwidth]{img/gamma-v} \label{fig:Pv-gamma}         \caption{$\gamma(v)$ trend to the vary of pole $p$.}         \label{fig:gamma}     \end{subfigure} \vspace*{-2em} \caption{Trend of model $P(v) = \hat{q} v^\gamma$ to the vary of pole $p$ and speed $v$.}\label{fig:Pv} \vspace*{-8pt} \hrulefill \vspace*{-8pt} \end{figure*}  The results is in Fig.~\ref{fig:Pv-sigma}, Fig.~\ref{fig:Pv-gamma} e Fig.~\ref{fig:Pv}.   I obtain:    There is a way for refereeing directly the figure and subfigures without refer only figure and add, by hand, a, b, c...?  NOTE I use this packages:  \documentclass[conference,a4paper]{IEEEtran} \usepackage{spconf,amsmath,graphicx,cite} \usepackage{epstopdf,epsfig,mathtools,caption,subcaption,amsfonts}   MISTAKES I have used a double label (as you can see in the answer).  So, the problem is not in cross-references, but in this part of code:          \includegraphics[width=\textwidth]{img/sigma-v} %\label{fig:Pv-sigma}         \caption{$P(v)$ trend to the vary of pole $p$.}         \label{fig:sigma}   Where the code remarked solve the problem.

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I am trying to run the following in cron to back up a server every morning at 4am:  0 4 * * * dump -0uan -f - / | gzip -2 | ssh -c blowfish user@server dd of=/backups/`hostname`_`date '+%m-%d-%Y_%k%M%S'`.dump.gz   Running the command on it's own from the shell works fine. Usually when this happens the problem is due to paths, so I tried adding full paths in cron:  0 4 * * * /sbin/dump -0uan -f - / | /usr/bin/gzip -2 | /usr/bin/ssh -c blowfish user@server /bin/dd of=/backups/`hostname`_`date '+%m-%d-%Y_%k%M%S'`.dump.gz   and still no luck. I checked the system log and saw this:  /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file   The same error occurs with and without paths specified. Should be a pretty simple command. Is cron executing this differently than it is written?

The following command works from prompt but not from crontab.   grep abc  /var/log/messages | grep "`date '+%B %d'`" | mail -s"abc log of `hostname`" shantanu.oak+`hostname`@gmail.com   I need to add it to daily cron.


I have a formula   $$\sqrt{t_{i + 1} - t_i }\epsilon_{ij}$$   But when rendered, it looks a little unclear since the epsilon is not adequately separated from the square root.  I'm reluctant to reorder the terms in any way. What I'm after is some way of putting a short vertical line after the square root symbol (say 1/4 height attached to the horizontal bar) which is a common thing to do.  Does anyone know how?

I found a cool trick in the  which allows the square root sign to be altered such that it "closes" over its contents. Here's an example:  ("closed" root on the left, normal one on the right) The way they do this is as follows: % New definition of square root: % it renames \sqrt as \oldsqrt \let\oldsqrt\sqrt % it defines the new \sqrt in terms of the old one \def\sqrt{\mathpalette\DHLhksqrt} \def\DHLhksqrt#1#2{% \setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0 \advance\dimen0-0.2\ht0 \setbox2=\hbox{\vrule height\ht0 depth -\dimen0}% {\box0\lower0.4pt\box2}} The cool thing is that (as far as I've tested it) this works regardless of the math font and with pdftex as well as xetex. However what is not possible is mulitple roots, such as \sqrt[3]{a}. Those produce incorrect output when this "trick" is being used. So my question is, is somebody able to tweak this code so that it works for multiple roots as well?


How to integrate   $$\int{xe^{x}\sin{x}}~dx$$  I tried taking $v=xe^{x}$ and using integration by parts, but that became lengthy and didn't work.

How to find integral of: $$\int xe^x\sin(x)$$ I know it should be repeated integration by parts, but i do not know how many times i should do this and when to stop.


I have a simple array with bank holidays:  var bank_holidays = ['06/04/2012','09/04/2012','07/05/2012','04/06/2012','05/06/2012','27/08/2012','25/12/2012','26/12/2012','01/01/2013','29/03/2013','01/04/2013','06/05/2013','27/05/2013'];   I want to do a simple check to see if certain dates exist as part of that array, I have tried:  if('06/04/2012' in bank_holidays) { alert('LOL'); } if(bank_holidays['06/04/2012'] !== undefined) { alert 'LOL'; }   And a few other solutions with no joy, I have also tried replacing all of the forwarded slashes with a simple 'x' in case that was causing issues.  Any recommendations would be much appreciated, thank you!  (edit) Here's a jsFiddle -

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I need to autostart my c# click-once winform application, but such that when autostarted that it is still ApplicationDeployment.IsNetworkDeployed = true.   Currently i autostart my app using:   RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);  if (!IsStartupItem())                 // Add the value in the registry so that the application runs at startup                 rkApp.SetValue("myApp", Application.ExecutablePath.ToString());   But when application is started i get ApplicationDeployment.IsNetworkDeployed = false

How can I make a Click-once deployed app run a startup?  The best option I found by searching was to set the Publisher on the app to Startup, so the Start menu shortcut would be placed in the Startup folder, but that seems like a huge hack and I would like there to be a Start menu icon people can find.  What options do I have?


On mobile chat, there's no indication if your post exceeds the maximum message size. I figure this is a bug. Could it be fixed?  Compare the two images of mobile chat below:      There's no visual difference. These were taken with my PC in mobile mode, but the results are the same on a phone. If the message is too long, the send button simply won't work. I found this out this morning and had no idea why my message wasn't sending. Bad reception? Was something broken?  The Desktop chat doesn't leave you guessing.      That second one is the exact same message I entered into mobile chat. There's a visible warning, and even the send button gets disabled!

In the mobile theme on Android 2.3.5, comments that do not meet the minimum length will fail to post but no feedback message is displayed to the user.  The submit button changes to its active state, but nothing else happens.


I am using Python-3.3.2. How can I use range()to achieve float type of step? Assume my code is:  for x in range(1.5,20,0.25):     print(x)

Is there a way to step between 0 and 1 by 0.1?   I thought I could do it like the following, but it failed:  for i in range(0, 1, 0.1):     print i   Instead, it says that the step argument cannot be zero, which I did not expect.


I'm 26 and a double masters student in transportation planning and engineering. I have received 50k in settlement money; I don’t know what’s the best course of action with this money. Im looking at 56,000 in student loans at 6% APR over 10 years. I graduate in two years, then, upon finding a job, I expect a minimum starting salary of 50k. I earn a small stipend from an internship, about 800 a month. I pay 550 in rent. Should I invest or should I try to reduce the loan? Should I save it all and worry about it when I graduate? Should I buy a condo and rent it to other students?

I am about to receive a considerable(for me, anyway) amount of money- about $100k- and really have no idea what to do with it to make it grow even larger.  Of course I want to pay off credit card debt($6k), and student loans($40k). I would also like to set aside an 'Emergency Fund,' donate to one or two causes I support, and travel(not extravagently, just see everything this world has to offer).  What do I do with the rest, say about $40k? I'm a freelancer, so some sort of financial security is important to me. Also, I'm VERY interested in safe(is there such a thing?) ways to make this small wealth grow into larger sums.  ETA: I am young, just graduated college. I have no desires to ever own a home, or any other large, time and money consuming item. And it's not that I want to necessarily do anything with the money. I just want it to grow so that I can stabilize and brighten my future, I just don't know how to do that.


Rakan and Xayah have the ability to recall together where one starts recall and the other can join in. Will the 2nd champ who joins in at the last second get recalled to base instantly, or does the recall refresh?

Two  have been announced in LoL.  They have an ability that makes them be able to recall together.                                  What are the limits to this ability? Can the 'non-recaller' jump in at the last second and get some kind of instant recall?  Can somebody with the setup to get on PBE test it and tell us what are the limitations of this ability?


I have a string: http:\/\/example\.com  I try to regex this to be: http://example.com  I've used preg_replace('/\(\)/', '', $string) but it is not working.  Could you help me, please?

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


In Hindi, the word फेंकना (fenkna) describe an act of boasting in a way that  is obviously untrue and ridiculous. It might be me bragging about swimming twenty miles few years ago. If you know me, and the fact that I lack any athletic experience, it would be easy to infer that the claim is plain absurd.  The word literally means "to throw", but its use that way is quite popular.   The closest word that comes to mind is "bullshiting", but I wanted to know if there's a more formal one to describe this action.

This is a single word, idiom, phrase, expression request - so basically I'll take anything that fits the bill.  Basically I'm trying to translate the Chinese word 吹牛 - which dictionaries will tell you mean to brag & to boast - but it actually also refers to things that are usually all untruths and lies.  I thought, originally, that one of these would work: he's just bragging (i.e.: it's not, actually, true) - but Google only says:     brag      braɡ/      verb      ?verb: brag; 3rd person present: brags; past tense: bragged; past participle: bragged; gerund or present participle: bragging         say something in a boastful manner.   "he bragged that he was sure of victory"         noun      noun: brag; plural noun: brags         a boastful statement.      and     boast1      bəʊst/      verb      verb: boast; 3rd person present: boasts; past tense: boasted; past participle: boasted; gerund or present participle: boasting         talk with excessive pride and self-satisfaction about one's achievements, possessions, or abilities.      "she boasted about her many conquests"      synonyms:  brag, crow, swagger, swank, gloat, show off, blow one's own trumpet, sing one's own praises, congratulate oneself, pat oneself on the back; More      exaggerate, overstate;   preen oneself, give oneself airs;   informaltalk big, blow hard, lay it on thick, shoot one's mouth off;   informalskite, big-note oneself   "his mother had been boasting about how wonderful he was to all her friends"   antonyms:   deprecate, belittle   (of a person, place, or thing) possess (a feature that is a source of pride).   "the hotel boasts high standards of comfort"         noun      noun: boast; plural noun: boasts         an act of talking with excessive pride and self-satisfaction.      "I said I would win and it wasn't an idle boast"      Not really seeing anything talking about lies.   Anything about bragging or boasting that involves lies?


I have no problems scaling text between 0in to ~19.5 inches, but above that, Illustrator moves the text box down and left (no scaling occurs). The larger my scale attempt, the further the text box is moved. For example, if I try to scale the text to 100in, it moves much further than attempting 20in. I've tried different fonts, numbers, letters, etc. and have the same issue. I'm not leaving the canvas or anything like that, there's plenty of room on the artboard. Shapes scale just fine, so converting to outlines is my current work-around. This makes editing the text a huge hassle, though, so I'd like to get this resolved. Googling around only brought up similar, but ultimately irrelevant, issues.  This problem occurred when I opened a file from another person. I feel like my settings got changed in the process, and I have no idea how to change it back. I'd like to avoid reinstalling, as I have lots of settings, addons, etc. that are exactly how I need them. I hope it's something small that I'm just overlooking, any help would be great!

For some reason and for many years there's a limit for font size in Illustrator. It is 1296 points max, so you can't go bigger without converting type to outlines first. Converting to outlines means you will not be able to edit type parameters and text it-self. Don't know how about you, but this makes me sad in non-destructive editing era.  What's your workaround?


In Lord of the Rings The Two Towers Aragorn, Gimli and Legolas rests at night beside the forest of Fangorn. There they sees an old man in white. Afterwards their horses also left them. Gimli then suspects that it is Saruman.   So who was he? I don't remember clearly but I think that Gandalf denied that it was him. Is it made clear anywhere who he is?

When Aragorn, Gimli and Legolas find the dead bodies of the orcs that they had pursued to the edge of Fangorn, they see an old man robed in white:     Suddenly Gimli looked up, and there just on the edge of the fire-light   stood an old bent man, leaning on a staff, and wrapped in a great   cloak; his wide-brimmed hat was pulled down over his eyes. Gimli   sprang up, too amazed for the moment to cry out, thought at once the   thought flashed into his mind that Saruman had caught them   It is implied in the book (though never verified AFAIK) that this was Saruman, particularly since Gandalf confirms that it was not him     "You certainly did not see me," answered Gandalf, "therefore I must   guess that you saw Saruman."   So if it was indeed Saruman, why would he travel all the way to Fangorn alone? Orthanc to Fangorn is not a short journey and he also had the Palantir at his disposal so what is the purpose of his being there (assuming that it is indeed Saruman).


Instances are objects created from classes. Classes are objects too, but created from metaclasses. Functions are objects, methods are objects, files are objects, everything in Python is an object.   So metaclasses are also objects?If so, what class do metaclasses belong to?

In Python, what are metaclasses and what do we use them for?


I want to install Ubuntu 12.04 alongside Windows 8 on a Dell Inspiron SE  The installer says I currently have no detected operating systems.  Is it ok to go ahead with the install using the "something else" option and putting Ubuntu on a partition or will it wreck my Windows 8?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I am on Ubuntu 16.04 and I want to search files for let’s say “if” and I want to the output until “endif”. The file could look like this  if …   SOME CODE endif   I can do this with grep -A9 if my_file | grep -B9 endif.  This doesn’t works if the “if” clause is larger than 9 and if several “if” clauses are in the same file and if the first grep command contains several “if” clauses. The option -m1 in the second grep doesn’t help. Nested “if” clauses can be ignored. Has somebody an idea, maybe not with grep?  Difference to    The question asks for a solution with grep which is answered already in the question: grep -A9 if my_file | grep -B9 endif. The solution doesn’t work in my case but would work in the case of the other question. The proposed grep solutions of the other question don’t work (with Ubuntu?): grep: ein nicht geschütztes ^ oder $ wird mit -Pz nicht unterstützt. which is something like grep: a not protected ^ or $ is not supported with -Pz. I use the following:  root:/tmp# cat file Some text begin Some text goes here.   end Some more text  root:/tmp# grep -Pzo "^begin\$(.|\n)*^end$" file grep: ein nicht geschütztes ^ oder $ wird mit -Pz nicht unterstützt  The proposed solutions search only for pattern which start at the beginning of the line if I interpret the proposed solution correctly. Even if I remove ^ the command doesn't work.

To be precise  Some text begin Some text goes here. end Some more text   and I want to extract entire block that starts from "begin" till "end".  with awk we can do like awk '/begin/,/end/' text.  How to do with grep?


When I search for software in the Ubuntu Software Center, how do I know whether or not software is trustworthy to download?  On Windows, I came to be careful about downloading just anything because it might be packaged with adware, or possibly even malicious code.  For example, I found the Metadata Anonymization Tool () in the software centre.

I read in the news about all the malware that is infecting Android OS. The malware is in Google's App Store and people are unknowingly downloading and installing it.  As I understand, Ubuntu's Main repository is safe for me to download from (I won't be infected with malware from doing so) because Canonical engineers review the software. But what about other repos, most notably the Universe repository? Does the Universe repo receive any sort of review to protect from malware? Is it advisable to avoid the Universe repo for fear of unknowingly downloading malware from it?  I've read PPAs are particularly dangerous because they are not reviewed. I'm assuming it is perfectly safe to use the Google Chrome PPA however.  So if I use nothing but the Main & Universe repositories and Google Chrome PPA, will I be protected from unknowingly downloading malware?   If Ubuntu does gain hundreds of millions of users like Mark Shuttleworth predicts, won't Ubuntu PPAs become the malware problem for Ubuntu like Google's App Store is today for Android?


I have 2 strings here:  line= ['ABDFDSFGSGA', '32\n'] line= ['NBMVA\n']   How do I remove \n from the end of these strings. I've tried rstrip() and strip() but I am still unable to remove the \n from the string. Can I have help removing it?

What is the Python equivalent of Perl's chomp function, which removes the last character of a string if it is a newline?


What is the difference between connecting database using PDO or mysqli_connect, etc?   What are the pros and cons of each approach? Which one is the preferred approach?  Here are my examples:  First the PDO approach.  <?php  $username = 'root'; $password = ''; $connection = new PDO( 'mysql:host=localhost;dbname=pacificsky', $username, $password );  ?>   and here is the mysqli_connect.   $db = mysqli_connect('localhost','root','','pacificsky');

In our place we're split between using mysqli and PDO for stuff like prepared statements and transaction support. Some projects use one, some the other. There is little realistic likelihood of us ever moving to another RDBMS.  I prefer PDO for the single reason that it allows named parameters for prepared statements, and as far as I am aware mysqli does not.  Are there any other pros and cons to choosing one over the other as a standard as we consolidate our projects to use just one approach?


I have a variable which holds a letter. In order to have a concrete example let's assume it is 'A'.  I have a while loop which on certain conditions will change that variable to the next letter ('B' in this case).  I would like to know how to achieve that in python:  Pseudocode: char = 'A' next_char = 'A' + 1   Python: letter = 'A' next_letter = 'A' + 1 # This fails with error TypeError: can only concatenate str (not "int") to str

How do I get the  value of a character as an int in ?


Which of the following two forms is correct? (And if there's no agreement about that, which one is more common?)     a (optional) parameter   an (optional) parameter   The problem is that the choice between "a" and "an" is based on the spoken form of the phrase ("does the next word start with a vowel sound?"), but there is no spoken equivalent to parentheses.  I.e. I can say either:     a parameter   Or:     an optional parameter   But I can't pronounce parentheses.

When a/an precedes a parenthetical aside (sometimes seen in informal/conversational writing), should the vowel rule depend on the first word in parentheses, or the next word in the "regular" flow of the sentence?     I need a (memorable) idiom (preceding an m word; use a)   or     I need an (memorable) idiom (preceding an i word; use an)


Suppose that $f:R\rightarrow R $ is continuous and does have an inverse function. How can I prove that $f^{-1}$ is also continuous?

Theorem. Let $f\colon I \to J$, where $I$ is an interval and $J$ is the image $f(I)$, be a function such that:   $f$ is strictly increasing on $I$. $f$ is continuous on $I$.   Then $J$ is an interval, and $f$ has an inverse function $f^{-1}\colon J\to I$ such that:   $f^{-1}$ is strictly increasing on $J$. $f^{-1}$ is continuous on $J$.   I need to prove only that $f^{-1}$ is continuous on $J$.  Proof. Let $y\in J$, and (for simplicity) assume that $y$ is not an end-point of $J$. Then $y=f(x)$, for some $x\in I$, and we want to prove that $$y_n\to y\implies f^{-1}(y_n)\to f^{-1}(y)=x.$$ Thus we want to deduce that for each $\varepsilon>0$, there is some number $X$ such that $$x-\varepsilon<f^{-1}(y_n)<x+\varepsilon\qquad \forall n>X\qquad(1).$$ Since $f$ is strictly increasing, we know that $$f(x-\varepsilon)<f(x)<f(x+\varepsilon).$$ also, since $y_n\to y=f(x)$, there is some number $X$ such that $$f(x-\varepsilon)<y_n<f(x+\varepsilon), \qquad\forall n>X.$$ Then, applying the strictly increasing function $f^{-1}$ to these inequalities, we obtain (1).  Edit  I don't understand why, since $y_n\to y=f(x)$, there is some number $X$ such that  $$f(x-\varepsilon)<y_n<f(x+\varepsilon), \qquad\forall n>X.$$ I would have written the last line as follows: $$f(x)-\varepsilon<y_n<f(x)+\varepsilon, \qquad\forall n>X.$$ Applying the $f^{-1}$ to my last line, which I think it's correct, I obtain $$f^{-1}[f(x)-\varepsilon]<f^{-1}[y_n]<f^{-1}[f(x)+\varepsilon], \qquad\forall n>X.$$ which is not (1).  What am I misunderstanding? Why the author of this proof wrote that last line and not my version?  Thank you.


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?


I GM a campaign for a newbie party. For now everything is fine: they roleplay well, they don't solve their problems with violence, etc.  In their scenario, they came from a relatively small city sealed off from the world for a long period of time — one day the seal just vanished and their adventure began. The city was attacked by enormous, highly organised ants, and the City Council sent various parties, including one made up of the player characters, to search for allies. I imagine being cut off from the world for so long, the player characters would be a bit interested in what the outside has to offer them.  They're curious and ask questions about local lore. For example, they met a tribe of evolved ape druids who used the tactic of fleeing and hiding to survive these ants (not ideal allies for fighting, but good for scouts), befriended them, asked them to be allies, and upon learning of their tactics they just carried on with the search. They hunted with them though, exchanged presents, participated in rituals, formed blood bonds and so on, which went really well. They asked about gods, way of life, and so on.  However, the problem is they aren't asking the right questions. They didn't ask about the ants, or about other tribes, and so are missing out on information about those things. I fear them repeating this and continuing to miss out on this information.  (I've spoken to one player: it seems they forgot they came from an isolated community, so next session I'll remind them of this, and explain the standard mind-set of a normal citizen of the City. I'll repeat this on the beginning of every session until they understand -- they are really forgetful and don't write anything down.)  How can I get my players to ask the right questions to find out this information, so they don't miss out altogether?  (Note this is separate to , given they're not having trouble asking questions altogether)

I have recently noticed that my players don't really try to find out much about the world and story beyond the direct "what do we see?"  I want to have them interact more with their environment and actually explore the reasons behind things without me leading them by the nose. "Why are these monsters working together?"  "What are the villains trying to accomplish?" How do I get my players to be curious and ask those questions that start the gears of imagination like Who, What, Where, When, Why, and How?   These kinds of questions can really bring a world to life and add SO much depth to a story but they just don't ask and if I tell them without them asking the game drags on and they begin to feel like I'm monologuing.


I am noticing this behaviour since today only. When I post a new comment, the browser window is scrolled down to the comment I just added. Previously, this scroll-down behaviour was reset once the animation for new comment fade effect was finished.  The same happens when I click on show more comments button.  Is this a ninja feature being incorporated? If so, it is very annoying.

There's new behavior on SO, MSO, and here on MSE that is extremely jarring: When you type a comment and press Enter, the page is scrolled so the comment is at the very top, e.g.:  I'm writing a comment:    And when I press Enter:    I've replicated it in Chrome and Firefox (both on Linux). This is new, it didn't do this yesterday.  There seem to be other scenarios where interacting with comments makes the page jump unpleasantly as well. What I've found so far *(please add to this list if you find new ones):   Posting a comment Clicking the link to show comments when they aren't showing (e.g., someone comments when you're looking at something, and you want to see it)   Could we restore the old behavior of not scrolling if not necessary, please?


i would like to install Ubuntu in my new Nexus-7 Tab, can you please help me with complete installation procedure?

Is it possible to run Ubuntu 12.04 or 12.10 on a Google Nexus Tablet? Would it be able to run Unity and/or Gnome Shell? or would it have to run a lighter desktop environment?


Prove that for any finite sequence of decimal digits, there exists an $n$ such that the decimal expansion of $2^𝑛$ begins with these digits.  I want to solve this by circle rotations, I found some hints that say that $log_{10} 2$ is an irrational number so the rotation in $S^1$ by this angle implies that every point has a dense orbit, but Im not able to understand why you need the angle of rotation equals to $log_{10} 2$ to conclude for a fixed sequence of finite numbers there exist a $n$ such that the first digits of $2^n$ are this sequence. I need some help to understand the problem and why the hint is useful (despite that $log_{10} 2$ is irrational) Thanks

I heard from a video that there is a theorem that proves that exists a power of two wghose leading or last digits can be any sequence of digits for example your telephone number. Can anyone point me to this theorem please?


In Visul Studio's Object Browser, we can see that many namespaces such as System, System.Collections, System.IO have are located in a single assembly mscorlib.dll.  I'm wondering how they are separated in multiple assemblies in:  C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework   I mean, we have all these namespaces as an individual DLL (e.g. System.Collections.dll) and we also have mscorlib.dll too.

Why did MS originally make the decision to maintain these two separate core libs? Maybe they had some scalability issue in mind, but nowadays I never see an application, of any type, that doesn't need both. Does anyone have any inside information on this? It's not really important, but been on my mind for years.  PS. I know what's in the two libs, I know the difference - I'm a big fan of  :) Just wondering what practical use the separation of the two has.


I’m searching for an elementary proof that $\bigl(1 + \frac{1}{n}\bigr)^n$ is monotonically increasing for $n = 1, 2, \dots$. The only proofs I can think of use calculus (taking the derivative) or the binomial theorem.  Maybe it is an illusion, but since it seems so obvious from the analogy of bonds that making the compounding interval smaller will increase the the sum of the loan payment, there has to be a rigorous yet elementary argument along these lines?

Show that $U_n:=\left(1+\dfrac{1}{n}\right)^n$, $n\in\Bbb N$, defines a monotonically increasing sequence.   I must show that $U_{n+1}-U_n\geq0$, i.e. $$\left(1+\dfrac{1}{n+1}\right)^{n+1}-\left(1+\dfrac{1}{n}\right)^n\geq0.$$  I am trying to go ahead of this step.


I have a long range wired application (over 5 meters).  I have tried using a wire extender, But the computer is not able to detect my device(a USB camera).  I tried using a USB 2.0 Hub. The computer can detect it, but it is too slow for real time use of the camera.  I also tried to use a USB 3.0 HUB, assuming that I would get faster speed, but my computer is not able to detect it with the USB 3.0 Hub connected.  How can I solve this issue?  EDIT: I think I need to mention the following information based on answers and comments:-   The range is about 5-6 meters. I have connected and used wires of non-uniform thickness throughout the length.   I have the following concerns:-   I have tried using USB 2.0 cable in the USB 3.0 hub. So I do not know if the Hub is amplifying the signals for a 3 meter range (as a USB 3.0 application would require) or for a 5 meter range ( as for a USB 2.0 application ). The Hub is backward compatible. So I think ideally it should solve my issue, but I cannot understand why it isnt

I'm planning to use USB port for an application(from a device to a PC) but the distance between the device and the PC will be around 15m. The recommended maximum USB cable length is 5m.  How can I buffer the data without loosing any information, safely? Would a USB hub work?


what is a singleton class ? why they have been created? and what is the impact of them on the consistency? .I am running into some confusions while doing meta-programming in Ruby

Is the singleton class in Ruby a class in and of itself? Is it the reason why all objects belong to "class?" The concept is fuzzy, but I believe it has something to do with why I can define a class method at all (class foo; def foo.bar ...).  What is the singleton class in Ruby?


We'd like to know if it is possible to have a group account to answer questions specific to some technologies. The group can have many members and anyone of them can answer questions.  At the end we'd like to know how many questions are answered by individuals and their reputation points.  I don't want reputation as a group. Individuals will work for their own reputation.  The only thing I want that somehow the group of people be seen as coming from one technology background (grouped under one hashTag) and people can see them as part of a technology/organization group and a way to add/remove people from the group by an admin.  Individual profiles remain as they are.

I recently saw a question about a problem (or possible bug) with some product on Stack Overflow. At first, I wanted to suggest that the asker post his question to that product's support forum.  When searching for the URL of that forum, I noticed that the product developer closed its support forums and now advises users to post all their questions on Stack Overflow instead.  Is this within the intended use cases of Stack Overflow, or is this abuse?


I'm newbie at java and have no idea how to repair my simple code. I need to create a person, using another class, in this case, "PersonBuilder".  The problem is, that I've got NullPointerException :X      Exception in thread "main" java.lang.NullPointerException       at RevStr$PersonBuilder.withAge(RevStr.java:64)       at RevStr.main(RevStr.java:75)   There is class Person  public class Person{ private String name; private String surname; private int age; private String pesel;  // ** AKCESOR I MUTATOR ** // public void setName(String name){     this.name = name; } public void setSurname(String surname){     this.surname = surname; } public void setAge(int age){     this.age = age; } public void setPesel(String pesel){     this.pesel = pesel; }  public String getName(){     return this.name; } public String getSurname(){     return this.surname; } public int getAge(){     return this.age; } public String getPesel(){     return this.pesel; }   }  and PersonBuilder      public static class PersonBuilder{     private Person p;      public Person build(){     return p;     }  public PersonBuilder withName(String name){     p.setName(name);     return this; } public PersonBuilder withSurname(String surname){     p.setSurname(surname);     return this;  } public PersonBuilder withAge(int age){     p.setAge(age);     return this; } public PersonBuilder withPesel(String pesel){     p.setPesel(pesel);     return this; } }   Main method  public static void main(String[] args) { Person p = new PersonBuilder().withAge(25).withName("A").withSurname("B").withPesel("11224").build(); System.out.println(p); }   I assume that the problem could be repaired quickly and simply, but I can't see the solution right now :X

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?


Today, I came across , in which the same user has answered twice for the same question.  As answers are editable, shouldn't this be disallowed?  If someone has multiple solutions to the same question, should they be provided in the same answer?  If multiple answers are allowed, what should be done if the some part of a user's multiple answers are identical?

I have been member of SO for 4 months. I have a question regarding some functionality. Whenever I give an answer to a question, there is functionality given Add Another Answer. I can comment on my answer at any time and also able to edit answer. Then   Why this functionality given on SO to add another answer?  When should I add another answer?  Why there is requirement of multiple answers? What is limit of adding answers to single question?


I'm aware there are many posts regarding this topic, yet I haven't found an answer to this specific question there.  Say we have a Lagrangian $$\mathcal{L(q,\dot q, \ddot q, t)}$$ We know that adding a total time derivative of some $F(q,t)$ to a "standard Lagrangian" - one that doesn't depend on $\ddot q$, doesn't change the actual motion, but what about this instance? Can we add a more general function - one that depends on $\dot q$ for example and still get the same motion?

The other day, I was listening to  on the Lagrangian for a charged particle in an electromagnetic field, and at one point in the video, the lecturer mentions that we can add any total time derivative of a function $f(q, t)$ to the Lagrangian without altering its equations of motion.   This is nothing new to me, and I understand it fully, but shortly afterwards (approximately two minutes after the linked starting point), he goes on to say that you can, in fact, add a total time derivative of a function $f(q, \dot{q}, t)$, given certain conditions. This definitely surprised me, and I would love to know more about it, but the lecturer quickly moves on, so my question is as follows: under what conditions can one add the total time derivative of a function which depends on the particle's generalized velocities in addition to its generalized coordinates and time without affecting the particle's equations of motion?


I installed the cool Windows Terminal from the Microsoft Store but I tire of clicking from the Windows Start menu to get to it. It is well known that you may more simply key "WindowsKey+r" and there enter "cmd" to launch and enter a persistent command line terminal. What is the command, however, to launch Windows Terminal, per se, in lieu of the long-time standby "cmd" or even "pwsh"?

I use shortcut  +R to run Windows Terminal [wt], but I cannot run it as Admin, which causes problems when I install something via choco.   To open it as Admin, I have to:  Press  > Right-click Terminal > More > Run as Admin  > ◀ > ENTER Some solutions say to use the following, but it can only open powershell, not wt:  +X > A > ◀ > ENTER While  say to use the following, but it also doesn't work:  +R > SHIFT+CTRL+ENTER   How do I open Windows Terminal as Admin via a command?


A ethernet (Lan server) connection makes the WiFi disable automatically in windows 8.1. By switching on the WiFi manually let only WiFi to run for few moments and the WiFi goes off again. How can I fix this?

This is a Dell Latitude E6430. There is a setting in the bios to control this behavior and I have DISABLED it but it still happens. I am also running the latest bios.  When I plug in a network cable the wifi adapter becomes disabled. I need it to stay enabled. What else could be making this happen?  EDIT: The reason I need to do this is because with NETSH WLAN commands you can create a wifi hotspot by sharing the internet connection on the wired adapter and broadcasting a ssid on the virtual wifi nic. I do this all the time but it's not working on this laptop. I'm wondering if it's a network security thing where I am. I'm going to try from my hotel tonight and report back.


Let's imagine a guy who claims to possess a machine that can each time produce a completely random series of 0/1 digits (e.g. $1,0,0,1,1,0,1,1,1,...$). And each time after he generates one, you can keep asking him for the $n$-th digit and he will tell you accordingly.  Then how do you check if his series is really completely random?  If we only check whether the $n$-th digit is evenly distributed, then he can cheat using:     $0,0,0,0,...$   $1,1,1,1,...$   $0,0,0,0,...$   $1,1,1,1,...$   $...$   If we check whether any given sequence is distributed evenly, then he can cheat using:     $(0,)(1,)(0,0,)(0,1,)(1,0,)(1,1,)(0,0,0,)(0,0,1,)...$   $(1,)(0,)(1,1,)(1,0,)(0,1,)(0,0,)(1,1,1,)(1,1,0,)...$   $...$   I may give other possible checking processes but as far as I can list, each of them has flaws that can be cheated with a prepared regular series.  How do we check if a series is really random? Or is randomness a philosophical concept that can not be easily defined in Mathematics?

Is there a reasonable statistic test one can do to standard random number generators (say, one of those that come built in in Python libs) which shows they are not really random?  (By reasonable I mean to exclude silly things like «generate a looong list and see that it is periodic»)  Later: Notice I am looking for a test that fails on standard generators.


I am a beginner in Java and I'm currently facing a problem that I'm not sure how to qualify. I'm trying to do a login in my app. Here's part of my code:           PreparedStatement statement = connect.prepareStatement("SELECT `userName`,`password` FROM `member` ");          //creating a variable to execute query         ResultSet result = statement.executeQuery();          //while (result.next()) {          if (result.next()) {              if  (result.getString("userName") != getUserNameTextField()) {                 System.out.print("DB " + result.getString("userName") + " TF " + getUserNameTextField() + "\n");                 System.out.print("Incorrect username");                 //break;             } else if ...... }   There are no compiler errors, the project is built and run successfully in Eclipse. I was initially only testing if both username and password match, then successful login; else unsuccessful login. Since I was receiving the unsuccessful login output, I then tried to determine if it was the username or password that was incorrect. The output pointed out that it was the username, and since I couldn't figure out what I was doing wrong, I decided to print both the username retrieved from my DB and the one I entered in the textfield. The result of the print statement in the console in Eclipse is as follows:  DB Smith TF Smith  Incorrect username  The username retrieved from my DB is Smith and the one entered in the textfield is also Smith, and there are no errors in Eclipse, so now I'm even more confused.   I was using  while (result.next()){...login validation code..} first; after some research, I also tried if (result.next()) { do {..login validation code..} while (result.next()} - but everything I tried results in the same output in Eclipse.   I have a vague impression that I should be using the while (result.next()) itself and that this problem may have to do with the Java memory model (heap and stack), but I'm not sure. Can anyone point me in the right direction? Thanks.

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


Sound waves in opposite phases will cancel each other out.  Is it theoretically possible to create a device which will record the sound and output sound in opposite phase which will result in silencing someone.

I saw youtube videos that claimed to do this, although I'm quite certain the videos just excluded sound and lied.  However, I am wondering if the physics of this is actually possible - to create a completely negative sound wave that cancels the sound out to a flat line i.e. complete silence.  p.s. I am not referring to white noise, which prevents the sound from being heard by overriding it with a different sound (white noise). Rather, I am referring to making a sound be completely silent by generating the inverse, opposite, or "negative" sound wave.


The code runs fine but I created a new page object for a new page to test but I am getting this null pointer exception. Here are the two class I believe I am having issues with. public class LoggedInPageSteps {     WebDriver driver;        private Logger logger = Logger.getLogger(HomePage.class);     LoggedInPage loggedInPage;      @Then ("^I check the my account info tag$")     public void verifyLoggedInPage() {         logger.info("Inside loggedinpagesteps verifyloggedin function.");         logger.info(loggedInPage.getAcctInfoTag());         loggedInPage.checkLoggedIn();         //Commons.check(loggedInPage.getAcctInfoTag().equals("My Account Information"), driver,          "Title doesnt match");          }  and public class LoggedInPage {      @FindBy(tagName = "h1")     WebElement acctInfoTag;      WebDriver driver;     //LoggedInPage loggedInPage;      private Logger logger = Logger.getLogger(LoginPage.class);       public LoggedInPage(WebDriver driver) {         this.driver = driver;          PageFactory.initElements(driver, this);     }      public String getAcctInfoTag() {         logger.info("insdie LoggedInPage funcrion getAccountInfoTag().");         return Commons.getElementText(driver, acctInfoTag, 5);     }      public void checkLoggedIn() {         logger.info("Inside LoggedInPage inside function CheckLoggedIn.");         logger.info(Commons.getElementText(driver, acctInfoTag, 5));         Commons.check(Commons.getElementText(driver, acctInfoTag, 5).equals("My Account          Information"), driver, "Not on logged in page.");     }  }  Is it a webdriver issue? I am new to automation testing so forgive  me if it was a simple mistake.


I want to take a snapshot of desktop screen in java. How can i do this.  This is similar to pressing print screen and paste data in ms-paint, and then save file in .png or .jpg format.

Simple as the title states: Can you use only Java commands to take a screenshot and save it?  Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard?


If Tom Riddle would have successfully come back, and Ginny died, would Voldemort in Albania see himself as a threat? Would the Tom Riddle part want to finish off the "ugly and weak" part of himself? Or would he try to merge with the other part of his soul? There are other questions like this, but what I'm asking is if the two parts of the soul would compete for power or see the other as a threat or weakness? The main part of Voldemort was weak at this point, and the Tom Riddle part would be at full strength. What do you guys think?  I'm not asking if there would be two Voldemort's. So I don't think this is a duplicate.

As teenager Tom Riddle is speaking to Harry Potter in the Chamber of Secrets, both he and Harry are refering to the real Voldemort in the third person. If Tom Riddle had succeeded in sucking all the life energy out of Ginny and had come back alive, wouldn't that have meant there were two Voldemorts in the world? The wraith one which had lived in Quirrell, and the newly constituted one?  This Tom Riddle clearly doesn't have the memories of the wraith version.   As a bonus: If they both existed, would they have competed against each other?


We know that localized rings contains inverse of  elements at which we localized our ring. I want to know why do we need to invert elements to study local behavior? I would be grateful if someone help me understand this. I know this may be very basic thing, but I am really confused.

In the context of commutative algebra, localization at a prime ideal was inspired by ideas of algebraic geometry. Some author said that it just like "take a small neighborhood". But what does this exactly mean?


On some beta sites, the "top questions list" on the home page is completely gone, both when logged in and logged out. This appears to have started happening in the last several minutes.  :    :

SE is really acting up today, sometimes it doesn't show any questions in the questions tab in the sites.  I first noticed the problems when I opened my questions tab, and this shows up:        All I did was change the name of the question, and now meta stackoverflow thinks it's two questions.  Well the thing is, MSO actually created it as a new question!  Why?


I'll be honest here. Although this is a serious question, what made me wonder about it is this comic from Wumo:   This question is not specific to monkeys. It applies to animals that live with or sufficiently close to human dwellings and would be able to observe our habits daily. I'm not referring to training animals. Even among animals that have an opposable thumb like ours but different , the use of . Chimps have been known to re-use tools and even  is documented. Whales have been hypothesized to have high intelligence (although ) due to  containing . But I couldn't find any info on whether whales use tools (Dolphins are said to  though).    On considering if mirror neurons were helping chimps copy each other and use tools, I found that the very existence of .    So if a chimp can use simple tools, what prevents them from looking at us and imitating our use of something as simple as using a plastic bag or a crude tray to carry a bunch of fruits? Is there a gradation of complexity of tool use that various brains can process? A reason that no matter what happens, a chimp would not be able to imitate our use of tools? Could this be compared to how aged people are unable to learn how to use a smartphone or computer no matter how many times it is explained to them (or even how young people )? Perhaps the ability is related to an animal's capability to form new neural connections of a certain type?  Training an animal like  is different from what I'm asking.  Some examples of primates trying to carry many fruits.

If a trait would be advantageous to an organism then why hasn't it evolved yet?  Conversely, if a trait is not advantageous or mildly disadvantageous, why does it exist?  In other words why does evolution not make the organism more "perfect"?    This is a general question that would be applicable for any kind of trait. Please keep the answers precise and scientific.   Read this meta post for more information:


First of all: I am a non-statistician who's currently trying to dive deeper into the topic of Data Science, so this question might sound really naive. So, I was wondering about the major distinction aspects between Machine Learning and Statistics / Statistical Modeling. Although there exist many aspects, in which both disciplines appear to differ, many sources mentioned that its corresponding purpose as main aspect: While Statistics majorily aims to make inferences about relationships between variables, machine learning rather aims to achieve a high accuracy for future predictions. While this is still easy to comprehend, I am getting confused if this is not just two sides of the same coin. Isn't a high accuracy of a model regarding future predictions an indicator for its generalization ability? What is statistics doing that machine learning doesn't, that makes its output still more inferentiable although accuracy is noticeably lower?  I highly appreciate your support!

Last year, I read a blog post from  entitled  that discussed some of the differences between the two fields.  :  Simon Blomberg:      From R's fortunes   package: To paraphrase provocatively,   'machine learning is statistics minus   any checking of models and   assumptions'.   -- Brian D. Ripley (about the difference between machine learning   and statistics) useR! 2004, Vienna   (May 2004) :-) Season's Greetings!   Andrew Gelman:     In that case, maybe we should get rid   of checking of models and assumptions   more often. Then maybe we'd be able to   solve some of the problems that the   machine learning people can solve but   we can't!   There was also the  by Leo Breiman in 2001 which argued that statisticians rely too heavily on data modeling, and that machine learning techniques are making progress by instead relying on the predictive accuracy of models.  Has the statistics field changed over the last decade in response to these critiques?  Do the two cultures still exist or has statistics grown to embrace machine learning techniques such as neural networks and support vector machines?


Update: I know that a static method can't be abstract, and I know why, and it's not a question like 'Whether it's possible?' or 'why it's not possible?', I just want to know if there's any way to get what I want.  Well, if you heard about @classmethod in python, you can skip the rest.  And here's what I want: In some cases, some methods are just functions, what I only need is its functionality. However, in Java, you have to put everything in a class, so I have to wrap these function in a class and set them static. The thing is, for classes like this one, I don't, and I shouldn't need any of its instance. And in the mean time, I want some hierarchy for classes like this. The hierarchy here works like some 'control': I can control sub-classes for what you should do, aka what method/function you should have.     As we all known, we can't declare a static abstract method in a class.  However, there can be situations when you only need the method rather than an instance, and you need the method to be abstract and implement it in sub-classes.  Some guys pointed out that , but is there any possible solution for this?

The question is in Java why can't I define an abstract static method? for example  abstract class foo {     abstract void bar( ); // <-- this is ok     abstract static void bar2(); //<-- this isn't why? }


I think it only makes sense that if you get a notification for say, a comment on your answer. When reading it (by clicking the "show all comments" link, or by replying to it), it should clear the notification automatically.  For notifications on answers for your questions, leaving a comment, editing, voting or accepting should all clear the notification.

The StackExchange™ MultiCollider SuperDropdown™ says I've got replies, but I've already viewed those.


I have recently dual booted to ubuntu 13.10 with windows 8. I have windows 8 before having ubuntu, I had to do a boot-repair so I can choose which to load, it all went fine, no problem.  But then again I decided to upgrade to windows 8.1, I thought I can just install it, then just use a live usb, to do a boot-repair again, but it gave me this error   Kernel panic - not syncing: VFS: Unable to mount root (0,0)   What should I do?

Upon trying to upgrade from 10.10 to 11.04 all seemed to go well until the restart. This error message is what comes up:  Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)   How do we fix that?


I need to select just two digits from decimal values in SQL Server  16.987490   --> 16.98 8.0189918   -->  8.01 34.5566901  --> 34.55

I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding.  For example:  declare @value decimal(18,2)  set @value = 123.456   This will automatically round @value to be 123.46, which is good in most cases.  However, for this project, I don't need that.  Is there a simple way to truncate the decimals I don't need?  I know I can use the left() function and convert back to a decimal.  Are there any other ways?


What is the easiest way to include 1 using Math.random function?  Since the default is number between inclusive 1 and exclusive 0.  I am going to use my the rand function a lot of times in my code that is why i need an even probability of getting numbers between 0 and 1 [0,1] , inclusive 0 and inclusive 1.  Thanks!   Edit:  Sorry, big mistake. Exclusive 1, inclusive 0.

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


Good Morning! trying to start a script on multiple servers w/ nohup and keep it running in the back ground.  The command (provided by my vendor) runs as expected when inputting directly on each server (the python script scrapes the log file and sends relevant info to another server via UDP):    nohup tail -f /log/log.log | python /test/deliver.py > /dev/null 2>&1 &    However, when placing into for loop to reach many servers, I must press Ctrl-C between each server to keep the loop going.  Please assist if possible:  for i in `cat /etc/hosts`; do ssh $i nohup tail -f /log/log.log | python /test/deliver.py > /dev/null 2>&1 &; done    Solution (Thank you all for the help):  ssh -f user@host "cd /whereever; nohup ./whatever > /dev/null 2>&1 &"   Had to use the -f in combination with double quotes as described here:

This is a follow-on question to the  question.  If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return?  When I try to just include the ampersand (&) at the end of the command it just hangs.  The exact form of the command looks like this: ssh user@target "cd /some/directory; program-to-execute &"  Any ideas?  One thing to note is that logins to the target machine always produce a text banner and I have SSH keys set up so no password is required.


I am trying to import a file with a list of latitude and longitude coordinates.  In Visual C#, and using GMAP.NET, a marker is placed for every coordinate pair.  I want multiple files to be able to be uploaded, and for the user to be able to select the color of the marker for that specific file. I have a combobox with a few options included, however when I try to set the color of the marker to the text in the textbox, it can't "implicitly convert type string to GMarkerGoogleType". Is there a way to make this conversion?  Here is the relevant code:  private void btn_KMLFile_Click(object sender, EventArgs e)     {         DialogResult result = openFileDialog4.ShowDialog();         if (result == DialogResult.OK)         {             string filename = openFileDialog4.FileName;             string[] lines = System.IO.File.ReadAllLines(filename);             foreach (string line in lines)             {                 GMarkerGoogleType MarkerColor = cbo_MarkerType.Text;  //How can I convert this string to a GMarkerGoogleType?                 string[] Data_Array = line.Split(',');                 Double londecimal = Convert.ToDouble(Data_Array[0]);                 Double latdecimal = Convert.ToDouble(Data_Array[1]);                 var marker3 = new GMarkerGoogle(new PointLatLng(latdecimal, londecimal), MarkerColor);                 marker3.IsVisible = true;                 gMapOverlay.Markers.Add(marker3);                  gmap.Update();               }         }     }   EDIT: This question is not a duplicate, the question can be rephrased as what type is a GMarkerGoogleType?

What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse("Active");  but that isn't a valid code.


My model is pinching and creating artifacts in certain areas. Any ideas?

I've only been 3D modelling for a few days now, so this may just be a newbie mistake:  However, because this model is for use in a game I am trying to stay away from proximity loops for performance reasons. Instead, I have used edge creases to maintain the structure of the model. It has led to certain vertices not being affected by the subsurf modifier, causing undesirable lighting at high subsurf levels.  Manually moving each point in a bit seems kind of sloppy but I'm not too sure what the best way to go about this is.  If any more information is needed I'll give what I can, thanks in advance :)


Let the domain $O=\mathbb{C}-(-\infty,0)$, the point $z_0 \in O$ and the circle $\gamma=C(0,r<|z_0|)$ in the positive direction. Compute $\int_C \frac{\log z}{z-z_0} dz$.   So far we didn't see the Residue theorem, so we cannot use this result to do the question. Instead he proposed to us to use the Cauchy formula, but I really don't know how it is possible. Do I have to use the primitive of $\log z$,i.e. $\log' z = \frac{1}{z}$? Is anyone could help me at this point.

Let the domain $O=\mathbb{C}-(-\infty,0)$, the point $z_0 \in O$ and the circle $\gamma=C(0,r<|z_0|)$ in the positive direction. Compute $\int_C \frac{\log z}{z-z_0} dz$.   How do I solve the problem with the Cauchy theorem knowing that the point $z_0$ is outside the interior of $\gamma$? Do I have to use the primitive of $\log z$, i.e. $\log' z = \frac{1}{z}$?  Thank you to bear in mind that I have not yet seen the Residue theorem.


Im trying to use the package TikZ by inserting \usepackage{TikZ} into my preamble on TexStudio however it keeps coming up with the error that TikZ.sty is not found.  I have MiKTeX and have checked the console to see that it is allowing for missing packages although i am not sure what link should be in the gap for where the packages are downloaded?  Does anyone know why my TikZ package would not be working?  Thanks

I use Texstudio and Miktex on Win 7 as a portable version.  Today i updated my miktex-packages and everything worked fine except the "\usepackage{tikz}" command.  I made a fresh reinstall with the newest versions of miktex and texstudio, opened my latex-document and compiled it. Miktex installed all missing packages on-the-fly except pgf/tikz, wich gave an error instead. I installed it manually in the package manager but texstudio still says "File "tikz.sty" not found".  Unfortunately I have to use the portable version, because I don't have any admin rights. The last time I worked on that document, everything worked fine.  Any ideas?


I am trying to install Open MPI. I downloaded the archive and extracted the folder to /home/. I cded there and entered ./configure --prefix="/opt/openmpi" and got this error:  ./configure: line 4840: config.log: Permission denied ./configure: line 4850: config.log: Permission denied   I tried the following:   ls -l configure which gives -rwxrwxr-x 1 root root ... configure df -h .. I'm on /dev/sda6 grep '\s/home/\s.*noexec' /proc/mounts yields no results Prepend the command with sh   I try to avoid using sudo to install this. What can I do?

I installed python 3.6.1 from python.org and extracted the file. Then I did:    cd Desktop cd Python-3.6.1 ./configure   But then I got an error:   ./configure: line 2328 config.log: Permission denied ./configure: line 2338 config.log: Permission denied   What can I do to fix this?


Show that the measure of a rectangle is zero if and only if the inside is empty.  Could you give me some hints what I could do??

Let $I$ be a special rectangle in $\mathbb{R}^n$, and denote $\lambda(A)$ the measure of $A$. Prove that the following conditions are equivalent:  a) $\lambda(I)=0$  b) $I^{\circ}=\emptyset$ (i.e., the interior of $I$ is empty)  c) $I$ is contained in an affine subspace of $\mathbb{R}^n$ having dimension smaller than $n$. (An affine subspace is any set of the form $\{x_0+x|x\in E\}$, where $x_0\in\mathbb{R}^n$ is fixed and $E$ is a subspace of the vector space $\mathbb{R}^n$. Its dimension is equal to the dimension of $E$.)  The implication $a\implies b$ isn't too bad (using the definition if $I=[a_1,b_1]\times...\times[a_n,b_n]$ then $\lambda(I)=(b_1-a_2)...(b_n-a_n)$. So we conclude $a_i=b_i$ for some $i$. And since $I^{\circ}$ is open, there can't be anything contained in it). I also see how c) makes sense (at least intuitively), but not sure how to show it formally.  Thank you.