I do not know any details or anything, but it seems like this very interesting conjecture doesn't have a name or something, I could not search it. Does anyone know more about this problem?  For those who didn't watch the video, here is the conjecture.  "For large enough $N$, there exists some permutation of $\{1,2,...,N\}$ such that for every pair of adjacent number, the sum is always square."    My guess is that they discovered this problem themselves, but it's sure interesting!  I'm asking if this problem has a name, or was noted by a mathematical organization or by a journal, or mathematician. It seems like since there is OEIS dedicated to such possible N there must be some recognition of this problem.


In most of my document the referencing of figure doesn't work. I am not sure what I am doing wrong I have tried ~\ref and \ref but I just get ??  \begin{figure}[h!] \label{fig:tcshock} \centering \includegraphics[width=120mm]{./Plots/TCM_Credit.png} \captionof{figure}{Total Claim Mean before and after spread shock} \end{figure}  \clearpage  From the figure ~\ref{fig:tcshock}   Libraries are as follows:  \RequirePackage[final]{graphicx} \documentclass[final]{article} %changed draft -> final once the version is final \usepackage{MRMCDocumentation} %\usepackage{QRCDocumentation} %\usepackage{QRCDocumentation_Anna}              %% use my own version \usepackage{amsmath,amsfonts} \usepackage{rotating} \usepackage[pdfpagelayout=SinglePage,bookmarks,hyperindex]{hyperref}  % Piotr's additional changes ---------------------------------- \usepackage{ifdraft} \usepackage{lineno}  % for line numbering during review \usepackage{ifthen} % for conditional statements \usepackage[obeyDraft,colorinlistoftodos]{todonotes} \usepackage{physics} % for nice derivatives symbols \usepackage{xspace} % for the symbols spacing \usepackage{colortbl} % filling the tables cells \usepackage{fancyvrb} % framed verbatim environment (for PALs quoting) %-----------------------------------------------------------------  % Anna's additional packages %------------------------------ \usepackage{bbm}        % for statistics symbols \usepackage{amssymb}  %%%% ---- FMB ---  %%%%%%%%%%%%% \usepackage{color} \definecolor{forestgreen}{rgb}{0.0, 0.27, 0.13} %\usepackage{tablefootnote} \usepackage{paralist} \usepackage{booktabs} \ifdraft{\usepackage{draftwatermark}} %\usepackage{natbib} %\usepackage{showlabels}  % Sameer Packages \usepackage{array} \usepackage{arydshln} \usepackage{color} \usepackage{longtable} \usepackage{caption} \usepackage{subcaption} \usepackage[titletoc,toc,page]{appendix} \usepackage{geometry} \usepackage{ragged2e} \usepackage{booktabs, makecell, tabularx} \renewcommand\theadfont{\bfseries} \renewcommand\theadgape{} \newcolumntype{L}{>{\RaggedRight}X}  \usepackage{enumitem} \usepackage{etoolbox} \AtBeginEnvironment{table}{% \setlist[enumerate]{nosep, % <-- list setup used in all tables                      topsep = 0pt,                      partopsep = 0pt,                      wide,                      label=\alph*),                      before = \vspace{-0.6\baselineskip},                      }                         } %\usepackage[titletoc,title]{appendix}   %Karl   %%% ------------------------ Anna's commands ---------------------------------------------------- %%% ---------------------------------------------------------------------------------------------- \usepackage[bookmarks,hyperindex,hyperindex]{hyperref}

\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'm trying calculate this expression $$ \sum_{i=0}^n \binom{n}{i} p^i (1-p)^{n-i} c^i $$  where $c$ is a constant. And this expression is the same as $E[c^X]$ with $X \sim Binom(n, p)$. I wonder if anyone could give some hint. Thank you!  EDIT: This question is solved by a simple application of the binomial theorem.

Using the definition of the binomial distribution, I obtain that: $$\Psi (t) = (pe^t+q)^n $$ I then compute $\Psi ' = npe^t(pe^t+q)^{n-1}$  I then evaluated this at $\Psi'(0)$ and got $\Psi'(0)=np(p+q)^{n-1}$  and so $E[X]$ which I know is $np$.   How do I then differentiate $\Psi'(t)$ again, the $n-1$ is throwing me off?


I have image file of Windows XP installation and I need to know how to create a  bootable USB drive with it so I can install Windows XP?  I am currently using a Linux operating system.

Possible Duplicate:          Is possible to install Windows XP from a USB ? I found many articles after searching Google, but they all talk about different approaches to do the task.   Since I didn't install XP from a pen drive before, I don't know which of those approaches are right or not.  If you've ever installed Windows XP from a USB drive, how did you do it? I'm looking for a technique that really worked for you, not something that you've read and haven't tried before.


I want to pseudo-randomly create a list with 48 entries -- 24 zeros and 24 ones -- where neither zero nor one repeats more than twice in a row. For example:  [1,1,0,1,0,0,1,1,0,1,0,...]  import random l = list() for i in range(48):     if len(l) < 2:         l.append(random.choice([0,1]))     else:         if l[i-1] == l[i-2]:             if l[i-1] == 0:                 l.append(1)             else:                 l.append(0)         else:             l.append(random.choice([0,1]))   I have the above code, but it sometimes returns an uneven count of 1s or 0s. All possible solutions should have the same chance of coming up.

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


I'm getting the following error:  java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.sebastian.codivatemanager.User.getName()' on a null object reference at com.sebastian.codivatemanager.FriendAdapter.getView(FriendAdapter.java:57)   on this class:  public class FriendAdapter extends BaseAdapter {  private Context mContext; private User[] mUsers;  public FriendAdapter(Context context, User[] users) {     mContext = context;     mUsers = users; }  @Override public int getCount() {     return mUsers.length; }  @Override public Object getItem(int position) {     return mUsers[position]; }  @Override public long getItemId(int position) {     return 0; }  @Override public View getView(int position, View convertView, ViewGroup parent) {     ViewHolder holder;      if(convertView == null) {         //brand new         convertView = LayoutInflater.from(mContext).inflate(R.layout.user_overview, null);         holder = new ViewHolder();         holder.nameLabel = (TextView) convertView.findViewById(R.id.textViewName);         holder.levelLabel = (TextView) convertView.findViewById(R.id.textViewLevel);          convertView.setTag(holder);     }     else {         holder = (ViewHolder) convertView.getTag();     }      User user = mUsers[position];      holder.nameLabel.setText(user.getName());     holder.levelLabel.setText(user.getLevel() + "");      return convertView; }  private static class ViewHolder {     TextView nameLabel;     TextView levelLabel; } }   The line pointed out is:  holder.nameLabel.setText(user.getName());   I'm trying to display a list using the list adapter "FriendAdapter". This list comes from an array called "mUsers" which is carried over from the class it's included in:              User[] mUsers = new User[array.length() + 1];          for(int n = 0; n < array.length(); n++) {             JSONObject obj = array.getJSONObject(n);             Log.i("Friends", obj.toString());             mUsers[n] = new User();             mUsers[n].setName(obj.getString("name"));             mUsers[n].setLevel(obj.getDouble("level"));         }          FriendAdapter adapter = new FriendAdapter(this, mUsers);         setListAdapter(adapter);

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?


We say obtain a Software Statement Assertion but when it is abbreviated as SSA, we say an SSA.   Can someone explain why?

99% of the time, I'm clear on when I should use "a" versus "an." There's one case, though, where people & references I respect disagree.  Which of the following would you precede with "a" or "an," and why?   FAQ FUBAR SCUBA   [Note: I've read the questions  and , but the rules given there don't necessarily apply here.]    [Edited to add]  Here's a shorter (and hopefully clearer) version of the question…  In written English, which is correct (and why): "a FAQ" or "an FAQ"?  Some references with differing opinions:   an: the  and  a: the Microsoft Manual of Style for Tech Publications, 3e either: the  and


I'd pay for personal, not snarky, but honest feedback. I don't really want to post all the specifics online- I would like to keep it confidential.   Is there a place online that you could recommend where I can keep this info private? Or a person, who I can pay for advice like this? I know others have asked abot low gpa + grad-school, however one story does not fit all. I am asking for a person to talk to about my situation and is knowledgeable of the graduate admissions process.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


In below code I am filling a map m with elements from another container vv. I am using a pointer to the current element in the map and that element/object is being further manipulated. struct obj_t { vector<int> w1, w2, w3, ... };  map<int, obj_t> m; vector<vector<int> vv;  for (vector<int> &v : vv) {      obj_t *p = &m[v[0]]; // create entry at key = v[0] if none existed     p->w1.push_back(v[1]);     p->w2.push_back(v[2]);      // many fields w3, w4, ... so using pointer may be "efficient" }  Question: Is this pointer access safe? Is the element inside m that is being manipulated, guaranteed to retain its address through each access inside the loop? And from one iteration to another? (although not required in this example). I understand that you should normally not use pointers to elements in containers, since these may be moved around by other parts of the "program" / "runtime". But I guess that inside a tight context like this, where no other manipulation of the map m takes place, this kind of pointer access is guaranteed to be safe. Is that correct? The suspicion that it might not be like that would come from something like this where some_large_allocation() may cause memory objects to be relocated by the operating system: for (vector<int> &v : vv) {      obj_t *p = &m[v[0]]; // creates entry at key = v[0] if none existed.     p->w1.push_back(v[1]);     // some_large_allocation() // can force elements of m to be relocated?     p->w2.push_back(v[2]); // *illegal* m and/or the element pointed to was moved     ... }  UPDATE (written here, since marked as dupe, closed for answers) To this question, , the accepted answer states:  std::list, std::set, and std::map guarantee that the iterators (including simple pointers) will not be invalidated when a new element is added or even removed.

std::map<std::string, std::string> myMap;  std::map<std::string, std::string>::iterator i = m_myMap.find(some_key_string); if(i == m_imagesMap.end())     return NULL;  string *p = &i->first;   Is the last line valid?  I want to store this pointer p somewhere else, will it be valid for the whole program life?  But what will happen if I add some more elements to this map (with other unique keys) or remove some other keys, won’t it reallocate this string (key-value pair), so the p will become invalid?


If the Emperor's hands were amputated, would he still be able to shoot lightning?  What about if his arms were completely removed?  Note: I am looking for a canon-based answer.

In all the canons of Star Wars, there has not been one instance of a Force-user projecting Force lightning from their feet. Why? Is it implausible?


So I need to find the formula to pull a column out of one page of my Google Docs spreadsheet and insert it into a separate workbook.  Here are some more details: all rows from column C (part number) from sheet 2, workbook 1 and insert it into sheet 1 of workbook 2 (under column C "part number").

I have a monthly spreadsheet that relies on figures from the previous month. I'd like to import these values dynamically rather than cutting and pasting them. Is this possible? How do I do it?


If $ x^2=3x-1$ then find the value of $(x^6+1)/x^3$ I used the quadratic but it became too complicated

If $x^2-3x-1=0$ then find the value of $(x^6+1)/x^3$ I tried to solve the quadratic but it became too complicated any way of doing this without a calculator


This always struck me as odd in the Deathly Hallows. Yes, Voldemort was wrong in the end thinking that one becomes the master by killing the previous owner. But even acting according to his own theory, he seems to be rather illogical and inconsistent.   This all boils down to his decision to kill Severus Snape (spoilers) in order to, in his mind, become the master of the Elder Wand. So he basically thought Snape was the master because he killed Dumbledore, and by killing Snape he himself would become the new master. But according to his logic, wouldn't every single previous master had to been killed by the next one?   So in order for Dumbledore to become the master, he should have had killed Grindelwald. But Voldemort was perfectly aware that he didn't, Grindelwald was still alive when Dumbledore died. Wouldn't this raise a question in Voldemort's head, that if Dumbledore really were a master of the Elder Wand, shouldn't there be another way to become one? And even more so, even Girndelwald didn't kill the previous master, Gregorovitch.   Then what he thought he was going to benefit from killing Snape? Because, according to his own logic, that one becomes the master of the Elder Wand by killing the previous master, neither Snape, Dumbledore, nor Grindelwald were ever its masters. According to his own logic, Voldemort should have been the master at the moment he killed Gregorovitch himself, yes?  Voldemort doesn't seem to be that stupid to make this kind of logical mistake but this all makes me think that he would have needed a bit of help from Professor Quirrell to get them past the potion riddle during their pursuit of the Philosopher's Stone.

We know that Voldemort knew that Grindelwald was not killed by Dumbledore, as he himself killed Grindelwald.   We also know that Voldemort knew that Dumbledore was the last person to wield the Elder Wand with its full allegiance because he killed Snape in an attempt to inherit that allegiance from him, who he assumed inherited it from Dumbledore.   Now Voldemort is no idiot.   Following this chain of logic, based off of what he knew, he must have realized that Dumbledore didn't gain the wand's allegiance through murder as he never killed Grindelwald, so why did he feel the need to kill Snape in order to win the wands allegiance for himself?   Surely he must have known that disarming him would have been enough. Was he so blinded by his desire for the wand that he was willing to try anything? Or was he so pressed for time that he didn't fully consider the matter?   I can't imagine the latter to be true as Voldemort himself said to Snape before killing him that he considered the matter for a long time, but that, of course, could be a lie.   Or perhaps he decided that what with Snape no longer being a competent spy after being outed that he had outlived his purpose and would be more valuable dead as a result of this last ditch effort to gain the wands true power.  I'm just answering my own question at this point, but I'd like to put it to you all. Is there something I am missing here? Is there any word from JKR that can clear up this seeming lapse in Voldemorts judgement?


Sure enough a lot of work is done on the , which steadily approaches a total of a first million all-time reviews. But unfortunately, the queue still seems to grow at a rate of approximately 1k additional close votes every four days (crude average over the last week, but ). Sure enough there are mechanisms to assist reviewers to more or less efficiently crawl that queue, e.g. by filtering tags, but apparently this is not enough, so     What further measures can be taken to decrease the close votes queue without compromising it?   Is reviewing still too tedious and improvements in the queue could help? Or do we need more reviewers? How many of those who can do actually review the close votes queue regularly? (And how is a virtual badge supposed to motivate them into spending their precious time?)

Today, the size of the close-votes queue is 55k questions and growing. Is that a problem?   Which action could be taken to clean it up? It seems to be growing faster than Stack Overflow members are capable to handle it.


I'm creating a web map of a university campus.   I have the map functioning, but I don't want to be able to pan off of the basemap, into whitespace.   Do you know of a function that will auto-pan the extent back to the basemap?

Currently I am using ArcGIS JS API ver 3.3/3.5 in my application.  I want to restrict the basemap for US only .For example one can use default navigation features like zoom in, zoom out for the US Country only.  Trying following things:   I have set the US extent code in my application but when I zoom out then I can see the whole world map I want to restrict it to certain extent only Going through this question:  Restricting the streets basemap using this question, but unable to restrict the map:  I am using  sample map in my application.


how can insert variable to a prepared PDO statement? I don't know which column will be modified. the code is (throws error):   private function deleteData($column, $id)   {     $stmt = $this->db->prepare('UPDATE table SET $column = "" WHERE id = ?'); // $column variable has 1 out of 4 values, and it changes dynamically      $stmt->bind_param('i', $id);     $stmt->execute();   }  Error:  Fatal error: Uncaught mysqli_sql_exception: Unknown column '$column' in 'field list' in  as I understood from the topic linked the only option is to make a switch? switch ($column) {     case 'column1':        $stmt = $this->db->prepare('UPDATE table SET column1 = "" WHERE id = ?');     break;     case 'column2':        $stmt = $this->db->prepare('UPDATE table SET column2 = "" WHERE id = ?');     break;     and so on...

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I know this is not the right place to ask this but couldn't find a better one. Can anyone suggest me a good book to learn the Photoshop cs5 from basics to pro ?

What is a good Photoshop book for photographers? I am interested in not too basic techniques (which I can more or less figure out by myself), which on the other hand give good results, without the need to be an expert pro.


I just bought an Intel NUC running Windows 10 and it comes with a WiFi adapter as well as a wired Ethernet port.  I’m using my router to assign IP addresses based upon a device’s MAC address so they always get the same IP. I plan on using the Ethernet port, but every now and then I might move the machine to a location that doesn’t have a jack available.  I’d like to be able to use the WiFi, but still be able to use the IP address assigned to the wired port.  So if I have the following:   Wired Ethernet 172.16.68.67 WiFi Adapter   172.16.68.68   I’d like to always be able to use 172.16.68.67 as long as either the Ethernet is plugged in and/or the WiFi is connected.  Or even better, use 172.16.68.69 and the OS forwards traffic to 67 if it is connected, 68 if it is not.   One caveat is that I need to expose this adapter to HyperV so my virtual machines can use this adapter for connectivity.

I have read similar questions in the past (i.e.  and ), however they don't address my question adequately.  I am attempting to understand if I can use 2 separate wireless cards on my Desktop PC to connect to the same wireless router at the same time, specifically as so:   WiFi Adapter 1 using 5Ghz 802.11ac to Router WiFi Adapter 2 using 2.4Ghz 802.11n to Router (same router)   Currently I have them set to 2 different SSIDs, although that certainly can be changed if needed.  To be clear, I want to use both networks to boost speeds, that's the intent here.


I have made five classes (as shown below). When I run my code it gives me "NullPointerException"  First class  public class PasPosition {        boolean lessThanThirty;       boolean ThirtyToFifty;       boolean FiftyToHundred;       public PasPosition(boolean value1, boolean value2, boolean value3)      {         lessThanThirty = value1;         ThirtyToFifty = value2;         FiftyToHundred = value3;      }  }   Second Class    public class CssPosition {      boolean lessThanThirty;     boolean ThirtyToFifty;     boolean FiftyToHundred;     public CssPosition(boolean value1,boolean value2, boolean value3)     {         lessThanThirty = value1;         ThirtyToFifty = value2;         FiftyToHundred = value3;    }  }   Third class    public class SiteData {       PasPosition pas;      CssPosition css;     }   last class    public class Test {      SiteData[] sitedata = new SiteData[2];      public void test()     {          for(int i=0;i<sitedata.length;i++)         {             System.out.println(sitedata[i].css.FiftyToHundred);             System.out.println(sitedata[i].css.ThirtyToFifty);             System.out.println(sitedata[i].css.lessThanThirty);             System.out.println();         }     }    }

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


i want to install git on my ubuntu i use this command in terminal  sudo apt-get install git   but it's take error:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  git : Depends: liberror-perl but it is not installable E: Unable to correct problems, you have held broken packages.

I can use my mobile broadband to access Internet with Firefox but when I want to install any package from terminal or make 'apt-get update' command I got the following error:  got 'NODATA' (does the network require authentication?)   apt-get update output:  Get:1 extras.ubuntu.com trusty InRelease [213 B] 98% [1 InRelease gpgv 213 B] [Connecting to archive.ubuntu.com] Splitting up /var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_trusty_InRelease into data Ign extras.ubuntu.com trusty InRelease E: GPG error: extras.ubuntu.com trusty InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)    output of `cat /var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_trusty_InRelease  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>404</title> <meta http-equiv="Cache-Control" content="no-cache"/> </head> <body> <p> Not Found </p> </body> </html>   output of wget:  wget -O - http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease  --2014-06-01 09:23:35--  http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease Resolving extras.ubuntu.com (extras.ubuntu.com)... 91.189.92.152 Connecting to extras.ubuntu.com (extras.ubuntu.com)|91.189.92.152|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 213 [text/html] Saving to: ‘STDOUT’   0% [                                       ] 0           --.-K/s              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>404</title> <meta http-equiv="Cache-Control" content="no-cache"/> </head> <body> <p> Not Found  </p> </body> </html>


I read this in the past 3 years, but I'm sure it was in an old (1950s most likely) pulp magazine that I read once I discovered that the Internet Archive had hundreds of them.  The story concerns either explorers or tourists.  (I think I may be conflating 2 stories.)  At least there are 2 or more characters, 1 being more experienced than the other(s).  They land on a planet where some/many of the species incorporate silica (glass) in their structure.  One character is attracted to a field of low plants whose chiming is very pleasant, maybe even hypnotic.  The more experienced one stops him/her just before he/she walks into the plants, pointing out the razor-sharp edges of the plants and the bones scattered among them.  There may have been an illustration accompanying the story.

I read a short story, can’t remember if it was part of a larger narrative or just on its own.  It was about a crew that was taking a bunch of space tourists to a planet that had plants with seeds in glass-like structures that make certain sounds. The main character in this story feels connected to this planet because there’s a Valley of Sound, where there’s a large number of these glass plants that make all sounds imaginable.  People can almost pick out a loved one’s voice for instance. I absolutely love this concept but can’t for the life of me remember what the story/book was called!


I enjoy using Pidgin on Ubuntu 14.04LTS, but recently my XMPP with Google Apps stopped working (Google claims my sign in was from "an app that doesn't meet modern security standards").  Before trying the latest Google Hangouts plugin, I'd like to get the latest version of Pidgin.  There don't seem to be any up-to-date packages/repositories out there. Would anyone be interested in providing one? I'm willing to bounty this.  Thanks!

I've been trying to add Google Hangouts to Pidgin but it's not working.


When installing 'gnome-tweaks' and changing the theme to 'Adwaita-dark' some colors remain from the original 'Ambiance' theme:    Is there a way to change this?

I've installed the GNOME Shell in Ubuntu 12.04 and I want to change the "Shell Theme", But it doesn't allow me to do that.  The alert says something like: "The GNOME-Shell extension is not activated", and I want to install it with the console, But it returns me an error.  How can I solve this problem?


I have a dual boot system in my laptop (windows 8 and ubuntu). I have decided to delete ubuntu and only use windows 8 in the system (I'm planning only to use ubuntu from usb boot). I tried to delete ubuntu partition from windows 8 and it wasn't ended up pretty good, I couldn't boot up to my windows 8 anymore. I've found that I need to uninstall GRUB first. I also found that I'll need a windows 8 recovery disk or bootable usb  to uninstalling GRUB but the problem is I can't boot up to my windows 8 bootable usb either (and I don't have any luck using recovery disk, mine is broken). How do I uninstalling GRUB then? Please help.

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


So I understand Alternating current like a battery, in which the Poles are constantly changed out, so the circuit stays completed, but the electrons change directions. But how can then in an AC plug one wire (neutral) always be 0V? The electrons always move from positive to negative right? If I´d be right the neutral wire had to be "+" 25/30 times a second, but that can't be possible if neutral alsways is at 0V.  Please explain, so an electronics noob could unterstand it :D

In domestic electrical circuits, there are 3 wires - live, earth and neutral. What is the difference between the live and neutral wires?  As there is AC supply, it means that there are no fixed positive and negative terminals. Current rapidly switches direction. Does that not mean that both the live and neutral wires carry the same amount of current, alternatively? Why is the neutral wire called 'neutral'?


If I download a Debian .deb package because it is not available through apt, I will usually try to install it using the command sudo dpkg -i package.deb. However dpkg, whilst being excellent at it's job, has one fatal flaw - it doesn't resolve dependencies. So if I have a package foo-1.0.0.deb which depends on packages bar-0.1.0 and baz-1.2.3, then bar and baz will not be installed, meaning I then must run sudo apt-get install bar baz to make foo work.  How, using one command, can I install a Debian package file and resolve it's dependencies?

I have a deb package for installation.  Shall I install by dpkg -i my.deb, or by apt?  Will both handle the software dependency problem well?  If by apt, how can I install from the deb by apt?


suppose, I want to search for a text in some papers in pdf format and whenever I will find the text in any of those files, I want to print the title and writer's name of the paper.Normally We can search a keyword in a list of pdf files using the following command :  for file in *pdf; do  pdftotext "$file" - | grep keyword done   what additional things will I have to add to get the desired result?

Normally, we can search a keyword in a list of pdf files using the following command:  for file in *pdf; do  pdftotext "$file" - | grep keyword done   Now, from the search result, If I want to find the title name along with the authors/writers of the file manually, without using pdfinfo command, what will I have to do?


Is it possible to create multiline anonymous function in Matlab?  There are no appropriate examples , but also no direct denials. In web discussions I found some derisions of askers as if it silly wish. Nowadays, when most languages introducing lambda expressions with multiline capability this looks strange.

I'd like to do something like this:  >> foo = @() functionCall1() functionCall2()   So that when I said:  >> foo()   It would execute functionCall1() and then execute functionCall2().  (I feel that I need something like the )  EDIT:  functionCall1 and functionCall2 are not necessarily functions that return values.


I get different spacing results when I define a \hspace directly or as a macro.  Directly:  \documentclass{article}  \title{Title} \author{Daniel Domingues \hspace{0.2cm}$\diamond$\hspace{0.2cm} Ricardo Cruz \hspace{0.2cm}$\diamond$\hspace{0.2cm} Rui d'Orey}  \begin{document} \maketitle \end{document}     As a macro:  \documentclass{article}  \def\whatever{\hspace{0.2cm}$\diamond$\hspace{0.2cm}}  \title{Title} \author{Daniel Domingues \whatever Ricardo Cruz \whatever Rui d'Orey}  \begin{document} \maketitle \end{document}     It looks better when I use \hspace directly without the macro. Why is that?

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


I am trying to loop through a file to run commands remotely via SSH but its only sending the first command and stopping.  while read a b c; do ssh root@$remoteserverip "/usr/bin/mysql -e \"grant all privileges on $a.* to $b@'localhost' identified by '$c';\""  ; done < /dbusers.txt   MySQL logging shows:  Connect   root@localhost as anonymous on Query     select @@version_comment limit 1 Query     grant all privileges on db1.* to dbu1@'localhost' identified by 'passwd' Quit   and that's it.  Example contents of /dbusers.txt  db1 dbu1 passwd db2 dbu2 passwd db3 dbu3 passwd   If I use echo in front of ssh then it prints out all lines.

I have a file servers.txt, with list of servers:  server1.mydomain.com server2.mydomain.com server3.mydomain.com   when I read the file line by line with while and echo each line, all works as expected. All lines are printed.  $ while read HOST ; do echo $HOST ; done < servers.txt server1.mydomain.com server2.mydomain.com server3.mydomain.com   However, when I want to ssh to all servers and execute a command, suddenly my while loop stops working:  $ while read HOST ; do ssh $HOST "uname -a" ; done < servers.txt Linux server1 2.6.30.4-1 #1 SMP Wed Aug 12 19:55:12 EDT 2009 i686 GNU/Linux   This only connects to the first server in the list, not to all of them. I don't understand what is happening here. Can somebody please explain?  This is even stranger, since using for loop works fine:  $ for HOST in $(cat servers.txt ) ; do ssh $HOST "uname -a" ; done Linux server1 2.6.30.4-1 #1 SMP Wed Aug 12 19:55:12 EDT 2009 i686 GNU/Linux Linux server2 2.6.30.4-1 #1 SMP Wed Aug 12 19:55:12 EDT 2009 i686 GNU/Linux Linux server3 2.6.30.4-1 #1 SMP Wed Aug 12 19:55:12 EDT 2009 i686 GNU/Linux   It must be something specific to ssh, because other commands work fine, such as ping:  $ while read HOST ; do ping -c 1 $HOST ; done < servers.txt


Just what the subject said.   Wife just got a new iPhone 5c iOS 7. I had pulled all the goodies off her old android (now my new android) and wanted to dump the pics and stuff back onto her new phone.  Alas, no joy.   iphone prompts 'Trust this Compter?' I select to trust, and it just pops back up again, looping endlessly.   Ubuntu 12.04LTS

My iPhone 4S won't connect to my computer when running Ubuntu 13.04. The "Trust this computer" prompt just endlessly pops up. Without actually connecting.  Any ideas? Maybe this is just going to be it with iOS 7.


So you're not supposed to start questions with "Hello guys" or end them with a signature, right? Well, here's an idea: Detect common cases of this and warn the user that this is unwanted cruft.  So, if your question starts with:   hello hi hey etc.   ...or ends with:   username (likely an indicator of trying to manually sign) thanks in advance ()   ...then a box pops up that says:     Your question starts with "hello". This is considered unnecessary; please remove it.   ...or:     Your question ends with your username. You do not need to "sign" your questions; please remove it.   ...and so on. It shouldn't be blocking, just informational.

I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like:     --User   Should these items be removed during the editing of the post by an editor?


In griffiths,   Why was the lowest chosen like that while in the ladder analogy, the lower energies are like $a_-^n\psi$? That is, why didnt he chose the lowest rung to be  $$a_-^n\psi$$

In textbooks, the ladder operators are always defined," and shown to 'raise' the state of a system, but they are never actually derived.  Does one find them simply by trial and error? Or is there a more systematic method/approach to obtain them?


Sorry for my trivial question but I am curious to know how many \documentclass exist. I use generally, article, standalone, book, report, beamer, but I see in many question also other \documentclass like \documentclass[runningheads]{llncs} or other forms.  I did not find a complete list of all existing \documentclass and what are their function. Is there a complete collection where I can understand the significance and the output?

Some of the available classes of documents in LaTeX are well known and widely used, such as the  and beamer classes, while others are not so well known, such as the  class.   I found  (edit: transcribed)     article for articles in scientific journals, presentations, short reports, program documentation, invitations, ...   proc a class for proceedings based on the article class.   minimal is as small as it can get. It only sets a page size and a base font. It is mainly used for debugging purposes.   report for longer reports containing several chapters, small books, thesis, ...   book for real books   slides for slides. The class uses big sans serif letters.   memoir for changing sensibly the output of the document. It is based on the book class, but you can create any kind of document with it    letter  For writing letters.   beamer  For writing presentations (see ).   which lists the main classes and is a good starting point, but the description is too short and still leaves one wondering when it would be more suitable to choose one class over the other and what the characteristics of each class is. Furthermore, the list is not exhaustive I think, given that I know at least one more document class that is not there (the standalone class, as I mentioned).  So my question is: what are the available classes of documents in LaTeX, and could you provide a brief description of the class and the situations where it would be recommended?   Please give only one class per answer.


The numerator is the sum of increasing AP being multiplied--> 1 3 5 7 and the denominator is multiple of 5 increasing with each term. Unable to understand how to approach this question.

How to find infinite sum How to find infinite sum $$1+\dfrac13+\dfrac{1\cdot3}{3\cdot6}+\dfrac{1\cdot3\cdot5}{3\cdot6\cdot9}+\dfrac{1\cdot3\cdot5\cdot7}{3\cdot6\cdot9\cdot12}+\dots? $$   I can see that 3 cancels out after 1/3, but what next? I can't go further.


Help - my 7 year old has built a world in minecraft and has gone through a nether portal and cannot find her world again? I'm no gamer that's for sure and I simply can't help her she is distraught - Is there anyway we can get her back from where she is stuck?

I've gone into the Nether and seemed to have lost my portal out of it, I also can't die in lava or by mobs attacking me, I'm appear to be invincible and can't die.  This is Single Player by the way.  Why is this happening?


In looking at other questions/answers here on MSE, $[\mathbb{R}:\mathbb{Q}]$ is infinite, but they didn't specify whether it was a countable infinity or uncountable infinity. I would guess uncountable since even a union of countably infinite many copies of a countable set like $\mathbb{Q}$ is still countably infinite, and the irrationals $\mathbb{R} - \mathbb{Q}$ are uncountable, but I'm not sure if a set-theoretic argument like that would transfer over to a statement about field extensions. Thanks for any advice.

It would seem that one way of proving this would be to show the existence of non-algebraic numbers. Is there a simpler way to show this?


I have the minimal document here: \documentclass{article} \usepackage{unicode-math} \usepackage{listings}  \setmainfont{Stix} \setmathfont{Latin Modern Math} \setmonofont{Fira Mono}  \begin{document} this is λ lambda $$\int_0^\infty λ\lambda$$ \begin{lstlisting} # some random pseudocode using unicode def function(λ):      αδ = βθ  def function( λ):      pass \end{lstlisting} \end{document}  producing with lualatex:  Look at how the unicode characters are rendered in the listing, but not in the right place.

Please, do you know if there's any possibility how to use the listings package together with XeLaTeX? I have to use XelaTeX and therefore I have UTF-8 encoded files. This is not compatible with listings which allows one-byte encoding. (I know there is listingsutf8 package, but it converts files from UTF-8 which I don't need.)  The listings package works somehow, bu I only can use English letters. I've fond some solution like a list of special characters (  ) but it seems it works only for some letters. It there anything that would support UTF-8 in listing 'naturally'?


Give a example of 2$\times$2 matrix A such that A has one independent eigenvector while $A^2$ has two independent eigenvectors.  I do found a explaination here.   And I followed it to make X as $\pmatrix{0&1\\1&0}$ and get the A as $\pmatrix{0&0\\1&0}$. Not really sure whether I am right.  Yeah, I checked that post and my problem is I still don't know how to get the A. Because it says x should be nonsingular so I tried $\pmatrix{0&1\\1&0}$ but it seems it's wrong..

Give an example of $2\times2$ matrix $A$ such that $A$ has one independent eigenvector while $A^{2}$ has two independent eigenvectors.  I would like to know a systematic answer of how to get this. My guess was that any matrix that has 1 independent eigenvector will have the same number of independent eigenvector for the squared matrix. I have tried random selections but obviously couldn't come up with one. What's more useful will be to get the intuition behind this problem.


How do you fix the shellshock bash vulnerability on Debian Squeeze? (I originally posted just the answer but that got modded, go figure), so now I'll post the answer below...

I can not update  on a Debian 6.0 (Squeeze) server to get rid of the discovered vulnerability:  bash --version GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)  apt-get update apt-get install bash Reading package lists... Done Building dependency tree Reading state information... Done bash is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.   Can I use Squeeze-LTS for this server just to update Bash? After one week I will be on another server, so I will not make any other updates.  uname -m x86_64  lsb_release -a No LSB modules are available. Distributor ID: Debian Description:    Debian GNU/Linux 6.0.5 (squeeze) Release:        6.0.5 Codename:       squeeze


If user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I have domain example.com and its mx properly configured. I have also an A entry intranet.example.com which points to my CMS. What I want is to have emails of the form user@intranet.example.com and I have to use a separate mail server than the one used for the example.com mail handling. My question is:  1.Should I just add an MX entry for in the example.com dns zone file like this:   intranet      IN      MX      10      intranet-mailer.example.com   or create a whole separate intranet.example.com delegated subdomain, and put the MX there?  2.Is it safe to do both? 3.What about SPF in each case?  Thanks.

Let's say I have a domain that I run a web application on, for example cranketywidgets.com, and I'm using  for handling email for people working on that domain, for example, support@ cranketywidgets.com, jane@cranketywidgets.com, joe@cranketywidgets.com and so on.  Google's own mail services aren't always the best for sending automated reminder emails, comment notifications and so on, so the current solution I plan to pursue is to create a separate subdomain called mailer.cranketywidgets.com, run a mail server off it, and create a few accounts specifically for sending these kinds of emails.  What should the MX records and A records look like here for this?  I'm somewhat confused by the fact that MX records can be names, but that they must eventually resolve to an A record. What should the records look like here?  cranketywidgets.com - A record to actual server like 10.24.233.214  cranketywidgets.com - MX records for Google's email applications  mailer.cranketywidgets.com - MX name pointing to server's IP address  I would greatly appeciate some help on this - the answer seems like it'll be obvious, but email spam is a difficult problem to solve.


How to stack two things, up and down, in an equal size in the summation $\sum$? Here are my failed attempts: 1. $$ \sum_{ \overset{A \in \{1,3,5,...\}  ,}{B \in \{2,4,6,...\} }} $$   2. $$ \sum_{ \underset{B \in \{2,4,6,...\} }{A \in \{1,3,5,...\}  ,}} $$   The {A \in {1,3,5,...}  ,} and {B \in {2,4,6,...} } should be in the equal and good looking manners. Please advice. Many thanks!

I have the following equation, where there is a lot of stuff under the sum symbol:  \begin{equation} d(\vec{x},\vec{y})=   \sum_{Z_{xy}\in\vec{Z}_{xy},\forall x\in\vec{x},\forall y\in\vec{y}}      f(Z_{xy}) \end{equation}   In the resulting document, I find it kind of hard to read. Is there a way to write the equation to make the result more readable, e.g. putting the stuff under the sum symbol on different lines?


for j in * .* ; do      cp $j ../$name-S$i.gid/${j%%. * }$i.${j#*.} done   Could someone tell me what this for loop does?  What do *, % and # mean?  ($name is a path of a directory in which there are -S1.gid ... -Sn.gid directory)

I'm quite confused about the following regular expressions I found in a shell script:  ${0##*/} ${0%/*}   How do they work?


How does it handle the same base code for all sites? How does SE deploys an upgrade through all its sites?

I'm looking for some insight into how Stack Overflow releases are deployed and managed.   What software/tooling is used? What time are releases generally performed? How many and what steps are involved?   I'm assuming it's not too stringent given the light team working on the codebase. But considering the high rate of change, I could see some kind of tooling and automation becoming increasingly relevant, so I'm curious to learn what kind of decisions are being made to deal with the changes in scale and feature set over time.  Is this information available somewhere?


Why this code:  result_list = [[]]*14 result_list[3].append('sdfda') print(result_list)   is output:  [['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda'], ['sdfda']]   but i expect:  [[], [], [], ['sdfda'], [], [], [], [], [], [], [], [], [], []]   I want to insert elements by index...but this example of code insert the element in all list of list

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 am currently writing a RESTFUL web service program. I am expecting to receive input for either one or two input (depending on my returnValue result). I have a difficulty to assign the value to 2 dimension array.   I have tried the above code an I encountered : java.lang.NullPointerException  Any idea on how to assign the MethodName and MethodStatus into 2 dimension array?  Expected output forMethodSet should be ([1][1]),([2][1]).  The AdaptiveAuthService.adaptiveAuth should be called each time new 2 dimension array are presented.  WebService input:  {"methodSet": [{"num":1,"methodName": 1, "methodStatus": "1"},  {"num":2,"methodName": 2, "methodStatus": "1"}]}   AdaptiveRESTFUL:  @POST @Path("/post") @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.APPLICATION_JSON) public int adaptiveAuth(String objDataLog) throws SQLException{   JSONObject obj = new JSONObject(objDataLog);  JSONArray arr=(JSONArray)obj.get("methodSet");   //to get how many method been send to TE     if (arr != null) {         JSONObject objMethod;         String Num;         for (Object o : arr) {             objMethod = (JSONObject) o;             Num = String.valueOf(objMethod.get("num"));             resultNum = Integer.parseInt(Num);             logWriter("resultNum:     "+resultNum);         }      }  //declaration of 2 dimension array MethodClass[][] methodSet = new MethodClass[resultNum][resultNum];  //to get value for MethodName, MethodStatus  if (arr != null) {         JSONObject objMethod1;         String MethodName, MethodStatus;         for (Object o1 : arr) {             objMethod1 = (JSONObject) o1;             MethodName = String.valueOf(objMethod1.get("methodName"));             MethodStatus = String.valueOf(objMethod1.get("methodStatus"));              int resultMethodName = Integer.parseInt(MethodName);                 int resultMethodStatus = Integer.parseInt(MethodStatus);             logWriter("MethodName:    "+resultMethodName);             logWriter("MethodStatus:  "+resultMethodStatus);              for (int i = 1; i < methodSet.length; i++){                     for (int j = 1; j < methodSet[i].length; j++) {                         methodSet[i][j] = new MethodClass();                         methodSet[i][j].setmethodName(resultMethodName);                         methodSet[i][j].setmethodStatus(resultMethodStatus);                     }               //calling function to do calculation                     returnValue = AdaptiveAuthService.adaptiveAuth(methodSet);//returning null pointer exception             }         }     }      AdaptiveAuthService code:  public static int adaptiveAuth(MethodClass[][] methodSet)throws SQLException {      int aAC = methodSet[0].length;     int authMethod = methodSet[0][aAC - 1].getmethodName(); //returning nullpointer exception   If you have any idea or way to solve the problem, please suggest and let me know.

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?


They in this sentence refers to:     "worked leather cowboy boots studded with silver conches".   What does the phrase in the topic mean? The boots could sell for 6 times as much now because of the silver?  EDIT: I don't seem to have enough to comment on the commentators below, so I will ask my follow-up here.  Does this mean the last part of the sentence     "...if they went for a quarter"   only serves to clarify the unit mentioned in the beginning (in this case, money) and not about any cost (a quarter)?

I have heard this pattern used before in American English:  She's 6 feet tall if she's an inch. It was a gallon of blood if it was a drop. The baby was 10 pounds if it was an ounce.  I assume that it means something like, "She is 6 feet tall, which is very tall." But this to me is such a bizarre and illogical way of conveying the message that it's distracting, and I cannot get myself to say it even if it comes to me. Anyone know the origin of this, or can breathe some reasoning into this phrase to justify its appreciation?


Shouldn't the current passing through a resistor be lesser than that which passes through a circuit? My understanding is that since Current = Charges/Time. If there exists a resistance to the flow of charges, then that must mean the charges slow down, meaning that more time is required to pass through a point. So, the current should then decrease. But, since this opposition to the flow of charges doesn't exist in the ENTIRE circuit, it should really only decrease the current in the resistor, right? Am I confusing the resistance of the resistor with the resistance of the wire? Any help will be appreciated! Thanks a bunch for lending me some of your time :D


I'm lost as to how I can support a seemingly legacy bug with Ubuntu.  I'll admit that I'm still rather new to Ubuntu but I'm running 14.04 and after logging into my username I'm presented with a blank desktop.    Issue is that when trying to enter TTY I just get a black screen.  I have no way to get to a terminal to do some of the fixes I've found on the forums.  Is there a way I can just boot into terminal?  I've tried pressing shift while booting after BIOS but it still just boots into the OS.  What's weird is that at the login screen, Unity is running but after logging in, it crashes.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I program A LOT and I want to switch to Ubuntu 18.04, the only thing stopping is that I don't have a good IDE. Currently I have a dualboot with Ubuntu 18.04 and Windows 10, on Ubuntu, I currently run CodeBlocks, it does its job, but it's far from Visual Studio... I need A IDE with:   Runtime Code checking(where it puts a red line under it if it thinks it is incorrect, like VS)(MANDATORY). A way to have multiple projects in the same window, so I can use CMake to generate a solution(whatever it's called for other IDE's) and have multiple projects in there, so I can easily see what code files belong to what project. Preferably a UI as close to VS as possible. A way to have CMake generate a project for it.(MANDATORY) C++ support is MANDATORY!   What would match these requirments best? Especially 1, 4 and 5 is important.  Thanks!

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. See  for more information.   This is a community wiki for IDEs available on Ubuntu. Please post one IDE per answer (including more than just a screenshot or a link, please at least put a short description).  In your answer, tell us what the IDE is for (which language(s) or if it is RAD capable).


Assuming:   That I have an ideal straw (a very long pipe) from the ocean to space; That the straw (pipe) is ideal (will not break); That i can pump all the air from the pipe creating vacuum inside the tube; That i can pump all the water from inside the tube till I reach the end of the straw;   Would I be able to drain all the oceans' water to space?

If a pipe extended from just above the ocean floor to outside the atmosphere, would water be sucked up it by the vacuum beyond the atmosphere? If a hole was made in the pipe, above sea level, how would that affect the flow of water? Would it stop it completely?


How can I change default screenshots folder?  I tried to use dconf-editor:     org -> gnome -> gnome-screenshot   At auto-save-directory I typed the desired directory in the following format:  file:///home/user/Desktop/   I tried all format actually, but couldn't find.  Is there anybody who knows how can I change my default directory?

Are there any sort of configuration options for specifying the default save location for gnome-screenshot, or is this hard-coded into the source code? It used to be ~/Desktop, which seems to have changed to ~/Pictures (in 12.04). The only possible solution I've seen is about  (as it includes time stamp information now instead of simply 'Screenshot#'), but that solution doesn't really seem ideal to me. Also,  post suggested that the last save location is remembered the next time you take a screenshot, but in my experience, this doesn't seem to be the case. And in any case, following on from that, that entry in gconf-editor doesn't even seem to accurately reflect the last location, so more than likely an entry related to an older version of gnome-screenshot. Table of contents:


I have an ArcGIS JS API application where I have an "origin" combo box that must be populated for request type, in the following series of combo boxes I would like for a value to be chosen based on the 1st value.  If I have an e-waste item chosen in my request type box, I would like for the second series of boxes to contain an e-waste product before the request can be submitted. This holds true for the other request type values and the following series.  My initial code which does not allow a request to be submitted unless a value is chosen in the request type box is;   function ValicateRequestData() { if (dijit.byId("cbRequestType").getValue() == "") {     ShowSpanErrorMessage("spanServiceErrorMessage", messages.getElementsByTagName("spanErrorMsgType")[0].childNodes[0].nodeValue);     return false; }  if (dijit.byId("cbRequestType").getValue() == "") {     ShowSpanErrorMessage("spanServiceErrorMessage", messages.getElementsByTagName("spanErrorMsgType")[0].childNodes[0].nodeValue);     return false; }   The above box populates with items such as bulky items, e-waste, etc.  I would then like a second box "cbMFEWASTE" to have  a value required if e-waste is chosen in the above box before a request is submitted...  my application is based on the ArcGIS Public Info Center JS API App

I have an ArcGIS JavaScript API Web App that uses multiple combo boxes.  I would like to create an if-else conditional statement between two fields in my feature layer.  If one field is chosen in combo box one is 1  then combo box three should automatically populate to 3.    Below is my validate function for my request type.    function changeonevent() {   (dijit.byId("cbRequestType").on('change'), changeonevent (MFValue) {     if (MFValue == 'Electronic Waste') {    dijit.byID("cbMFSubType"). set ('value', 'Copy Machine');     } else if MFValue == '...'{    dijit.by.ID('cbMFSubType').set('value', 'Printer');     }


I just found out that the company I work for offers 401K Roth. I am thinking of switching to 401K Roth soon. Right now I only have traditional retirement fund and no Roth. I think I have been contributing enough for my retirement but it is not diversified enough, eg traditional vs roth.  So far I have been contributing to Traditional 401K up to the yearly max amount of $18.5K.   I am aware of the tax consequences and I understand how each 401K affects taxes now and during withdrawal. I am interested in knowing other factors I am not aware of, for example mandatory withdrawal at about 70 years (for traditional 401K). Is this true for Roth 401K as well.   Is there anything else that I need to consider in making this decision?

I just graduated, and I'm starting a new job soon. My employer has pretty good policy for matching 401(k) contributions, so I want to invest as much as possible, especially during this first year.  My question is: should I invest in a traditional 401(k), a Roth 401(k), or some combination of the two? On the one hand, tax rates may be much higher when I retire, and I might be in a higher tax bracket, so a Roth 401(k) would be good. On the other hand, I might be in a lower tax bracket when I retire, so a traditional 401(k) might be better. It's hard to know where I will stand in 30 years.  Is this the same trade-off as with a traditional / Roth IRA, or is there any other tax difference I should know about?


In the RotK movie, Gandalf and Merry light up the beacons of Gondor. These beacons have been built atop each peak of the White Mountains. Mysteriously, when one beacon is lit another also becomes lit as if by magic. What's the underlying technology here? How do these beacons work?

Following this image I found online:    Do the beacon lighters really live on top of the mountains?  It seems really cold on top of some of these mountains and there are no villages or whatsoever.


I'm in a relatively basic Physics class in university, and was reading the section in my textbook about The Principle of Relativity.  It says:     Einstein's Theory of Relativity ... added the conjecture that the speed of a beam of light must be the same as measured by observers in different frames of reference in uniform motion with respect to each other.   I'd like to start off and say I certainly don't doubt that. People much more familiar with relativistic physics take this as fact so I see no reason to pretend I've found a loophole in the fabric of reality.  I'm just wondering... how? How can I be moving at 0.9c relative to the Cosmic Microwave Background (which my textbook says is the most reliable inertial reference frame) and watch light go past me, in the same direction, at 1.0c? Doesn't that mean the light is moving at 1.9c relative to the CMB?  Further, the textbook says that, in the case of two or more observers traveling at different speeds, the observers will see that the light has a different color. Is that evidence of a Doppler effect? Doesn't that imply that to see different colors observers would have to be observing the light moving at different velocities than each other?  I've just been puzzling about this for a while now. I'm hoping someone more learned than me can chime in and help clear things up, because so far the best explanation I can think of is localized time dilation changing just how long a "second" is in order to ensure that the photons always move at c, but that just seems like such a convenient answer.

I was told that the Galilean relative velocity rule does not apply to the speed of light. No matter how fast two objects are moving, the speed of light will remain same for both of them.   How and why is this possible?   Also, why can't anything travel faster than light?


If gravity is really the bending of space/time causing objects with mass to experience acceleration, is there a similar physical meaning to 'charge' besides 'a property of matter which causes it to experience a force when placed in an electric field.'  What exactly is charge?

Baryons have charges that are the result of a polynomial calculation of their building blocks (quarks)'s fractional charges. But what gives these quarks electric charges? What interactions do they have with photons? And what about leptons, like muons and electrons? How do they get their -1 charge? And then, how do positrons and anti-muons get +1 charge? Same goes for quarks: how does up-antiquarks get -2/3 charge? Or I may want to formulate my question this way:  How does any elementary particle interact with the EM-Force to get an electric charge?


I'm looking for a way so that I can get big numbers.  I want to calculate 38^n for n>4000   So is there any way to do this?  Kindly help me.

What is the easiest way to handle huge numbers in C? I need to store values in the Area 1000^900, or in more human readable form 10^2700. Does anybody know of an easy way to do that? Any help would really be appreciated!


So I’ve been doing some research & realised that they done the double slit experiment with large molecules and the molecule behaved as a wave , so does this mean that all matter is really just a wave that becomes concentrated energy when observed ? Is the mind what is holding the physical world together ? If we are not looking is the universe just an ocean of information ? If we are waves then waves of what kind ? Everything in the universe is electromagnetic so does this not imply that we are made of electromagnetic waves capable of moving at light speed ? Brain waves are definitely electromagnetic so what does this entail ? Is our consciousness/mind made of light ? This would explain how people have transcended space/time through meditation . Just a few questions I’d like to hear the answers too .

I often hear about the wave-particle duality, and how particles exhibit properties of both particles and waves. However, I wonder, is this actually a duality? At the most fundamental level, we 'know' that everything is made up out of particles, whether those are photons, electrons, or maybe even strings. That light for example, also shows wave-like properties, why does that even matter? Don't we know that everything is made up of particles? In other words, wasn't Young wrong and Newton right, instead of them both being right?


Arghh I just know people are going to hate me for asking this...  I was just playing around with inheritance and I noticed you can instantiate a subclass object in one of two ways when you write code. So then I wondered if there is any functional difference between these two methods. So in the code below, does this produce the exact same result...a MountainBike object, or is there some difference I should know about? Bicycle is the superclass for this example. If I do Bicycle bike or MountainBike bike I am effectively making a MountainBike due to new MountainBike()? So basically the difference is just semantics at this point?   Bicycle bike = new MountainBike();  MountainBike bike = new MountainBike();

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


As a prospective undergraduate who has really benefited from his time on MSE thus far, i recently learnt that there exists asymptotic approximations for $\sum_{p\leq x} 1,  \sum_{p\leq x} p, \sum_{p\leq x} \frac{1}{p}, \sum_{p\leq x} \frac{\log p}{p}, \sum_{p\leq x} \log p, \sum_{p^m\leq x, m\geq 1} \log p$ where $p$ is a prime,                                                                                but have never seen any for $\sum_{p\leq x} p$ ?  Out of curiosity, i'm wondering if there is any such formula yet ?  An idea that quickly came to mind was, $\sum_{p\leq x} p$ =  $\sum_{p\leq x} (p/\log p)\log p$, and then apply the Abel/Euler summation theorem ?

Possible Duplicate:          What could I use to prove the following conjecture?  $ \sum_{p \le x} p^{m} \sim \operatorname{Li}(x^{m+1}) $  For $ m=0 $ this is just the prime number theorem, but would it be true for other numbers 'm' ? Or even for negative m?  Also if the function can be expanded in power series $ f(x)= \sum_{n=0}^{\infty} a(n)x^{n} $,  I also think that $ \sum _{p \le x}f(x) \sim \sum_{n=0}^{\infty}a(n)\operatorname{Li}(x^{n+1}) $.  Of course $ \operatorname{Li}(x)= \int_{2}^{x}\frac{du}{\ln(u)} $.


I thought that access structure and access tree are equivalent but I've read in a  (page 3) that there are at least three types of access structures :   AND gates Access tree LSSS generating matrix   I would like to know what is the difference between them, are they equivalent or some of them are more expressive (better to use) than others?  Thank you in advance.

I'm reading this article,  and in the Table 1, are there these access structure: Threshold, Tree, ($n$,$n$)-Threshold, LSSS, AND gates. I have 2 questions.  1) What are the differences between these access structures ?  2) How can i measure the performance of a scheme in a network ? (i.e scalability, number of users (producers and consumers) supported, number of contents supported) [If this question is off topic, i will remove it].


I'm trying to pipe multiple lines into a text file while manipulating the string that is being piped according to a sequence  cmd="My string 00"  for i in $(seq -f "%02g" 00 05); \   do \   echo $(echo $cmd | sed -e 's|00|$(echo $i)|g') >> outfile.txt ;  \ done   doesn't work. The output should look like this:  My string 00   My string 01   My string 02   My string 03   My string 04   My string 05     but the output is:  My string $(echo $i) My string $(echo $i) My string $(echo $i) My string $(echo $i) My string $(echo $i) My string $(echo $i)

I tried the following code to replace QQ with ZZ, but it doesn't do what I want:  var1=QQ sed -i 's/$var1/ZZ/g' $file   However, this code does what I want:  sed -i 's/QQ/ZZ/g' $file   How do I use variables in sed?


I'm getting this error when I try to reload Synaptic, I installed apps in terminal via ppa's I found on launchpad.net and dep files from other developer sites...  Could not download all repository indexes  The repository may no longer be available or could not be contacted because of network problems. If available an older version of the failed index will be used. Otherwise the repository will be ignored. Check your network connection and ensure the repository address in the preferences is correct.  Failed to fetch dl.google.com/linux/deb/dists/stable/Release  Unable to find expected entry 'non-free/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file) Failed to fetch ppa.launchpad.net/apt-fast/stable/ubuntu/dists/trusty/main/source/Sources  404  Not Found Failed to fetch ppa.launchpad.net/apt-fast/stable/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found Failed to fetch ppa.launchpad.net/apt-fast/stable/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found Failed to fetch ppa.launchpad.net/nanny/ppa/ubuntu/dists/trusty/main/source/Sources  404  Not Found Failed to fetch ppa.launchpad.net/nanny/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found Failed to fetch ppa.launchpad.net/nanny/ppa/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found Failed to fetch ppa.launchpad.net/stebbins/handbrake-releases/ubuntu/dists/trusty/main/source/Sources  404  Not Found Failed to fetch ppa.launchpad.net/stebbins/handbrake-releases/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found Failed to fetch ppa.launchpad.net/stebbins/handbrake-releases/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found Some index files failed to download. They have been ignored, or old ones used instead.   Someone suggested I edit /etc/apt/sources.listWhen I open it up all I see is the normal ubuntu ppa's

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


On  there are frequent complaints about waves of edits removing interesting new content from the 'front page', which is used by many to track the site's activity. Would it be possible to implement a checkbox to hide an edit from the 'front page' on minor sites such as Travel.SE?  Obviously it should only be available for high-rep users (10k could be a nice limit) to avoid abuse.  The situation there is different from the discussed  since the site gets 20-30 new questions per day and the edit waves are a lot more noticeable.

It would be nice to allow users to mark a change in an answer (or question) as minor (e.g. for a simple spelling or grammar correction). A change marked as minor wouldn't push the question on top of the list of questions on the home page or in the feeds. It wouldn't trigger any notification. This could be implemented with a "Minor change" checkbox when editing an entry (a la Confluence). What do you think?


Prove that $$\int_0^\sqrt{2\pi} \sin x^{2} \, \mathrm{d}x \gt 0 $$  I thought of changing the variable $y =  x^{2}$. And now I need to change this integral so I can integrate on the interval $[0; \pi]$. But I don't know how to do this so I can evaluate the given interval. What should I do?

show that $$I=\int_{0}^{\sqrt{2\pi}}\sin{x^2}dx>0$$  follow is my methods: let $$x^2=t$$ then $$I=\int_{0}^{\pi}\dfrac{\sin{t}}{2\sqrt{t}}dt+\int_{\pi}^{2\pi}\dfrac{\sin{t}}{2\sqrt{t}}dt=\int_{0}^{\pi}\dfrac{\sin{t}}{2}\left(\dfrac{1}{\sqrt{t}}-\dfrac{1}{\sqrt{\pi+t}}\right)dt$$ since $$\dfrac{1}{\sqrt{t}}-\dfrac{1}{\sqrt{\pi+t}}>0$$ so $$I>0$$  My quuestion: have other methods? Thank you


I'm stuck on how to sanitize the code below for SQL injections.   Line 3 is where I'm stuck and put ??? for the value I'm not sure of. I'd also appreciate if someone can review the entire thing to check if I made other mistakes.  $path will look something like /1/A/2/B/3/C/  1 $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); 2 $stmt = $db->prepare("SELECT * FROM table WHERE path = :path"); 3 $path = filter_input(???, 'path', FILTER_SANITIZE_STRING); 4 $post->bindParam(':path', $path, PDO::PARAM_STR); 5 $post->execute();

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I'm struggling to display French characters and the £ sign from my database. They appear fine in the phpmyadmin display, but appear as question marks in diamonds on my web page.   I have set the tables to utf8_bin in the database, and inserted  meta http-equiv="Content-Type" content="text/html" charset="utf-8" in my header.   It makes no difference. Please can anyone help me? I have been searching for an answer for hours and am not getting anywhere! thanks...

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


I know this is abit of a "wide net" question. I am currently switching over to 5e from years of activity (after 4e was released) from 3.5e..  The mechanics of 5e seem secondary while the role-playing seems primary from my experience in about 10 AL games.  I've spent the last 13 years or so away from TT-RPG  I desire highly mechanical play with other players that are also "rules to their letter experts," not self-styled "RP-actors".   Is Pathfinder 2e the D&D akin system, currently is popular enough to find players, that fits my wants?  I have played D&D:Basic, Advanced, 2e, 3.5e, 4e (twice), 5e (about 10 times)  I have not played any version of Pathfinder

What are some of the rule changes that Pathfinder brings in comparison to D&D 3.5?  I am curious what changes were made so I can explain to my group what it has to offer.


I know that matter (mass) curves spacetime, but do other forms of energy do the same? I.e. is matter the only form of energy that curves spacetime?

I know a photon has zero rest mass, but it does have plenty of energy. Since energy and mass are equivalent does this mean that a photon (or more practically, a light beam) exerts a gravitational pull on other objects? If so, does it depend on the frequency of the photon?


When the crew lands on Miller's planet and notices the giant wave approaching, it seemed odd to me that there would be a lack of current pulling towards the wave.  The giant waves would command a tremendous amount of energy, so I feel like even trying to stand up before the massive wave hits would be impossible.

When watching the part where they go down to Miller, I was bothered by the fact that the waves didn't break despite the fact that the water level is ostensibly only knee-deep (roughly, a wave starts to break when the depth of the water is less than the height of the wave). But then, a friend came up with the idea that the waves are not really waves. Given that the gravitational influence of Gargantua on Miller is, well, gargantuan (I'm not apologizing for that joke) the "waves" are actually mountains of water created by Gargantua's gravity. As such, the "waves" don't really move towards the crew; rather, they are stationary (relative to Gargantua), and it is the rotation of Miller that brings the crew towards the "waves". The reason the ocean is so shallow is because a substantial proportion of Miller's water is used up to make up the "waves".  Is this really a plausible idea? What bothers me about this is that, if it is really the planet that is rotating under the "waves", the crew should have experienced a night-day (or day-night) transition between one "wave" and the next.


I am converting a PHP 5.3 library to work on PHP 5.2. The main thing standing in my way is the use of late static binding like return new static($options); , if I convert this to return new self($options) will I get the same results?  What is the difference between new self and new static?

In PHP 5, what is the difference between using self and $this?  When is each appropriate?


So I have a question about the unbiasedness of the OLS estimator. It is unbiased when $E\{\epsilon|X\} = 0$ and some other assumptions, where $X$ is the regressor. Is it still unbiased if I relax the requirement and say that $E\{\epsilon\}=0$ and $E\{X\epsilon\} = 0$? I read a paper and it is refered to as the weak orthogonality. However, I do not know if these two conditions: $E{\epsilon}=0$ and $E{X\epsilon} = 0$ can lead to unbiasedness, or just consistency?

The OLS estimate $b$ is equal to $(X^TX)^{-1}X^Ty$ for the linear regression model. If we assume that $E(\epsilon|X)=0$ then it is easy to prove simply by taking the conditional expectation, of $b$ substituting in the expression for $y$ and simplifying.  But how do we prove it if we only know that $E(X^T\epsilon)=0$? $E(\epsilon|X)=0$ implies $E(X^T\epsilon)=0$, but not the other way around.  EDIT: Can I just get an answer, just to be sure, that even if the $u_i$'s are i.i.d., that $E(x_iu_i)=0$ does not imply unbiasedness?   So just to be absolutely clear: If $u_i$ is i.i.d., and we know that $E(x_iu_i)=0$ holds, but we don't know whether $E(u_i|x_i)=0$ holds, then OLS may be biased?


I've seen comments posted that a particular individual is in jeopardy of losing their question asking privileges. (Because of a history of down voted questions) If a rep point of "1" is required to ask a question, how could they not be able to ask a question? Does this ultimately mean they are being banned from the site? Is this documented somewhere, I can't seem to find it.

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


I have a snippet of code that I don't manage to understand.   To give some context: I have a line (defined by its angular coefficient m) and I search over a set of segments to find the intersecting one. A segment and a vector of segments are defined as:  typedef std::pair<Eigen::Vector2d, Eigen::Vector2d> Vector2dPair; typedef std::vector<Vector2dPair> Vector2dPairVector;   The mentioned code is (to provide a minimal working example):  #include <iostream> #include <Eigen/Dense>  typedef std::vector<Eigen::Vector2d> Vector2dVector; typedef std::pair<Eigen::Vector2d, Eigen::Vector2d> Vector2dPair; typedef std::vector<Vector2dPair> Vector2dPairVector;  int main() {   Vector2dPair segment;   segment.first = Eigen::Vector2d(2, -2);   segment.second = Eigen::Vector2d(2, 2);    Vector2dPairVector segments;   segments.push_back(segment);    double angle_min = 0;   double angle_max = M_PI_4;   double angle_increment = M_PI / 16.0;   double range_min = 0.0;   double range_max = 10.0;    Vector2dVector points;    double field_of_view = angle_max - angle_min;   int num_ranges = static_cast<int>(std::nearbyint(std::abs(field_of_view) / angle_increment));    std::cerr << "fov: " << field_of_view << std::endl;   std::cerr << "num ranges: " << num_ranges << std::endl;    points.resize(num_ranges);    for (int i = 0; i < num_ranges; ++i)   {     const double angle = angle_min + i * angle_increment;      std::cerr << "angle: " << angle << std::endl;      const double m = std::tan(angle);      Eigen::Vector2d point = Eigen::Vector2d::Zero();     bool found = false;      for (const auto& segment : segments)     {       // compute segment coefficients (a*x + b*y = c)       double a = segment.second.y() - segment.first.y();       double b = segment.first.x() - segment.second.x();       double c = a * segment.first.x() + b * segment.first.y();        // build A matrix and w vector to setup linear system of equation       Eigen::Matrix2d A;       A << -m, 1, a, b;        Eigen::Vector2d w;       w << 0, c;        // solve linear system to find point of intersection       Eigen::Vector2d p = A.colPivHouseholderQr().solve(w);        // check that the point lies inside the segment       double x_min = std::min(segment.first.x(), segment.second.x());       double x_max = std::max(segment.first.x(), segment.second.x());        double y_min = std::min(segment.first.y(), segment.second.y());       double y_max = std::max(segment.first.y(), segment.second.y());        // point is outside the segment       if (p.x() < x_min || p.x() > x_max || p.y() < y_min || p.y() > y_max)       {         std::cerr << "p: " << p.transpose() << std::endl;          std::cerr << "min: " << x_min << ", " << y_min << std::endl;         std::cerr << "max: " << x_max << ", " << y_max << std::endl;          std::cerr << (p.x() < x_min ? "true" : "false") << std::endl;         std::cerr << (p.x() > x_max ? "true" : "false") << std::endl;         std::cerr << (p.y() < y_min ? "true" : "false") << std::endl;         std::cerr << (p.y() > y_max ? "true" : "false") << std::endl;          continue;       }        std::cerr << "found" << std::endl;       found = true;       point = p;       break;     }      if (!found)     {       throw std::runtime_error("wtf!!");     }     std::cerr << std::endl;   }    return 0; }   The weird thing is that at some point the final check is not behaving as expected. In particular, I get:  p:        2 0.828427 min: 2, -2 max: 2, 2 true false false false   That is the check p.x() < x_min is true when p.x() = 2 and x_min = 2.  Can someone please tell me what is the problem?  Thanks.

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


"Every lesson is established on a model of personal power, a network of personality, character, and credibility; and firmly rooted in trust as its foundation." Or should it be "Every lesson is established on a model of personal power; a network of personality, character, and credibility; and firmly rooted in trust as its foundation." I'm thinking there should be semi colons because the lessons are established on 3 things: a model, a network, and trust which are then all expanded upon. Or should there be no semicolon at all?

Men, particularly, spend hours of their leisure time installing their own fireplaces, laying out their own gardens; building garages and making furniture.   I do not understand the use of the semicolon (";") after "gardens" in the sentence above, could someone help?   Thanks


I've got a windows 2008 production server which I'm planning to install windows updates on, without restarting it for several weeks.   Is this a good idea? (This is a production server, which is on continuously, but I'd like to download & install updates now, so that when reboot time comes, I can reboot it right away, without first installing updates.)   Thoughts? ( & Thanks!)

As a small software development company, we run a few Windows production webservers and manually install Microsoft updates and security patches. Most of the time, a restart is required.   After the updates are installed and the server asks for a restart, is the server during the time between this message and the restart somehow more vulnerable, or is it perfectly in order to delay the restart (and the security level remains the same as before)?


Is there an elegant way to have performant, natural sorting in a MySQL database?  For example if I have this data set:   Final Fantasy Final Fantasy 4 Final Fantasy 10 Final Fantasy 12 Final Fantasy 12: Chains of Promathia Final Fantasy Adventure Final Fantasy Origins Final Fantasy Tactics   Any other elegant solution than to split up the games' names into their components    Title: "Final Fantasy" Number: "12" Subtitle: "Chains of Promathia"   to make sure that they come out in the right order? (10 after 4, not before 2).  Doing so is a pain in the a** because every now and then there's another game that breaks that mechanism of parsing the game title (e.g. "Warhammer 40,000", "James Bond 007")


I was reviewing some first posts, and I decided to fix a typo in one of them.    This post had one suggested edit in the queue, so editing it brought up the edit review page. The edit didn't fix the typo, so I went to improve it.  After I fixed the typo, I found myself at the next item of the suggested edits review queue, rather than back among the first posts.  I think that you ought to stay in the queue you were browsing in such a situation, and be able to complete your original review.

I was in the first posts review queue and chanced on a post with a suggested edit. (Note: I have enough reputation to review suggested edits.) I clicked on “edit (1)” and was taken into the suggested edits queue. When I approved the suggested edit, I was taken to the next suggested edit, and so on until there were no more suggestions (“There are no items for you to review.”, still in the suggested edits queue). In this situation, I think it would make more sense if I was brought back to that post I was working on in the first posts queue, as soon as I acted on its suggested edit. Alternatively, the suggested edit should be shown in the same kind of pop-up as on a question thread page. The same goes for other queues (late answers, low quality, etc.).


It's a famous fact that for all connected, planar graphs, Euler observed (but failed, remarkably, to prove) that $$V-E+F=2$$ However, all of the proofs I have seen (including those I have created myself) are one-way, i.e. they show that if a graph satisfies the above conditions then the polyhedral formula holds (typically because the proof involves gradually deconstructing one's graph in a manner that leaves $V-E+F$ invariant). Does the converse in general hold?  That is, if $V-E+F =2$ for some graph, is that enough to conclude that it's planar and connected?

Generally the theorem by Euler is stated:  If $G$ is connected and planar then $v - e + f = 2$ (where $v$ is the number of vertices, $e$ is the number of edges and $f$ is the number of faces of the graph $G$).  My question is:   Is this theorem an equivalence? I.e. is it true that if the equation $v - e + f = 2$ holds for a graph $G$ then $G$ is connected and planar.  Really thankful for any help with this. I couldn't find a counter-example myself, (i.e. a graph for which $v - e + f = 2$ holds but is either not connected or not planar) but I guess the theorem would be stated as an equivalence if it were an equivalence...


I have a list in my program, defined as such: List<String> myList = new List<String>();  I also have a foreach loop, getting an item out of it:  foreach (String item in myList) {     ... }   In the above loop, I want to figure out what the index of item is in myList. How can I do this?

Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop?  For instance, I currently do something like this depending on the circumstances:  int i = 0; foreach (Object o in collection) {     // ...     i++; }


How can I add a 5th level of depth with the outlines Package?  \setlistdepth{5}   does not work.  \documentclass{article} \usepackage{outlines} %\setlistdepth{5} \begin{document} \section{start} \begin{outline} \1 foo \2 bar \3 too \4 foo %\5 bar \end{outline} \end{document}   -  This is the solution to expand Outlines Package in depth   ->

I am using the outlines package to write some outlines, and occasionally four levels are not enough to present my data. I understand that this is a limitation of LaTeX, as you cannot nest more than four levels of enumerate environments. Is there any way to increase this limit? If not, why is the limit exactly four?


Can anyone help?  I've looked for this info all over but have not been able to find any answers.  Are Puerto Rican residents able to invest their Roth IRA assets in any investment company in the continental United States?

Can anyone help?  I've looked for this info all over but have not been able to find any answers.  Are Puerto Rican residents allowed to open a Roth IRA while living and working in Puerto Rico? If so, what set of laws applicable that Roth IRA must the account owner follow? Are Puerto Rican residents able to invest their Roth IRA assets in any investment company in the continental United States?


I've inherited a machine running ubuntu 12.04. The system clock has drifted and is now behind actual time by 6 minutes.  In the "Date and Time" panel, I see that "Network Time" is on. Timezone is correct.  I'm not sure where the network time is coming from, and how to get it back in sync with the rest of the world.   What's the right way to fix this?

On Karmic (9.10), my system time is currently off by 17 minutes, e.g. when I type date on the terminal I get Thu Jan  6 16:22:29 CST 2011 while the correct time is 16:05pm. I went through the standard time set and cannot fix this.  If it were off by a multiple of an hour I would blame timezone or daylight savings time settings, but 17 minutes, I have no idea.  Thanks


A horizontal pipe of uniform cross sectional area A empties into a bucket,  filling it at a rate R(unit volume per unit  time). The speed of the fluid within the pipe is v. Guess a formula for the pressure in the pipe by using dimensional analysis.   How would we go about this? I can work out the units of pressure to be (M/L(T^2)) where M is mass in kg, L is distance in metres, and T is time in seconds. But how would I form a guess using this?  The correct answer involves guessing that the pressure depends upon the density of the fluid, the area, and the rate, which already is a big leap of faith.   But even then, it could be something like ln (density) or e^area.  Furthermore, even if we decide not to use ln(density) etc, it could still be the case that, for e.g, pressure is related to (M^2/m0), i.e, the constant is NOT dimensionless, in which case we'd probably get something like infinite solutions.   Lastly, even if we refute using ln (density) etc and just decide on using powers of the variables ( assuming the constant is dimensionless), what would we do if we had a solution set consisting of more than one possible choice?   There are so many other things which can go wrong too. For example, it may be that it depends upon the density of the pipe, not the fluid. Why do we then still continue to use dimensional analysis to guess formulae?

It seems to me that although dimensional analysis is useful for demonstrating when a physics equation is wrong (when the dimensions are inconsistent), there is little justification for how it is often used to show that a given equation is correct. I'll motivate this claim with an example I went over in a class I'm TAing. Generally speaking, my question is: How (and under what conditions/assumptions) can we know that a functional relationship predicted by dimensional analysis, specifically by Rayleigh's method (), is the unique functional relationship that can hold between a given set of quantities?  Consider a column of stationary fluid in Earth's gravitational field. We'd like to find a formula for $\Delta P$, the increase in pressure that is measured when moving from the surface of the fluid to a point at depth $h$. Assume that we know that $\Delta P$ depends on only three variables: The depth $h$, the mass density $\rho$ of the fluid, and the acceleration of gravity $g$. These quantities have dimensions of:  $$\Delta P : [M][L]^{-1}[T]^{-2}$$ $$\rho : [M] [L]^{-3}$$ $$g : [L][T]^{-2}$$ $$h : [L]$$  Here, $[M]$ is mass, $[L]$ is length, and $[T]$ is time. Now, the standard argument in dimensional analysis goes as follows (this is basically Rayleigh's method of dimensional analysis). We suppose the equation for $\Delta P$ has the form  $$\Delta P = k \rho^a g^b h^c,$$  where $k$, $a$, $b$, and $c$ are all dimensionless constants. Now, for this equation to be meaningful, the dimensions on the left and right sides must be the same. To ensure this, we can replace each quantity in $\Delta P = k \rho^a g^b h^c$ with its corresponding dimensions, yielding:  $$[M][L]^{-1}[T]^{-2} = ([M] [L]^{-3})^a ([L][T]^{-2})^b ([L])^c = [M]^a [L]^{-3a+1+c} [T]^{-2b}$$  For the dimensions to be the same on both sides, we have to have $a=b=c=1$, and thus $\Delta P = k \rho g h$ for some dimensionless $k$.  At this point, we've certainly shown that $\Delta P = k \rho g h$ is a possible, dimensionally consistent formula for the pressure change. But I don't see how this formula is at all unique. For me, the biggest unjustified assumption enters when we assume that $k$ must be dimensionless. Even if we know that the only variable dimensionful quantities that $\Delta P$ depends on are $\rho$, $g$, and $h$, I don't understand how it follows that $\Delta P$ can't depend on one or more dimensionful constant. But the values we get for $a$, $b$, and $c$ will depend on what dimension we suppose that $k$ has. So if we can't pin down the dimension (or lack thereof) of $k$, then we can't fix $a$, $b$, and $c$, and so we've made no progress beyond the initial assumption $\Delta P = k \rho^a g^b h^c$.  When considering Newton's law of gravitation from the perspective of dimensional analysis, this ambiguity manifests itself in the opposite way. In order to derive the proportionality $F = G m_1 m_2 / r^2$ in the same way as we did $\Delta P = k \rho g h$ (by assuming that $F = G m_1^a m_2^b r^c$), we must assume that our constant $G$ has dimensions $[L]^3 [M]^{-1} [T]^{-2}$. Why is a dimensionful constant reasonable in this case, but not when deriving $\Delta P = k \rho g h$? I think this is the sticky point that this one asker was getting at in their question:   In that question, the answerer provides a method to determine the dimensions of $G$ to make Newton's law dimensionally consistent, but this is only after having shown that $F \propto m_1 m_2 / r^2$, without dimensional arguments. But this is a far more modest result than what is often claimed to be a consequence of dimensional considerations - namely results like $\Delta P = k \rho g h$, or $T \propto \sqrt{l/g}$ for the period of a pendulum as a function of $g$ and its length $l$.  So is there an insight missing in my analysis, which would clear up these ambiguities and ensure that dimensional analysis produces a unique functional form for the relationship between a set of quantities? Or is dimensional analysis just often used in ways that aren't always justified?


What is the possible minimum sigma value (given $1\sigma$, $2\sigma$, $3\sigma$, $4\sigma$, $5\sigma$, $6\sigma$) one can use when we want a less than 0.3% defect ratio? My approach was to implement $68-95-99.7$ rule, and get $3\sigma$ as a correct answer. Would it be right method, or there are missing parts?

What is the smallest sigma value (out of $1\sigma$, $2\sigma$, $3\sigma$, $4\sigma$, $5\sigma$, $6\sigma$) we can use when we want a less than 0.3% defect ratio? My idea is to use $68-95-99.7$ rule, and obtain $3\sigma$ as an answer. Is it correct approach, or has missing parts?