Edit: it's still problematic because the names aren't very descriptive. Based on past values (from Windows) I can sort of deduce what is what, but it's still uncertain. The problem is that the reading names are not descriptive. I'll open a new question for that though.  I'm trying to read my temprature sensor values using Xsensors and Psensor, but both programs only show a single value - what I suspect to be the CPU core temperature.  Here's a screenshot to illustrate:    I would like to also see:   GPU temperature CPU socket temperature disk drives temperatures fan speeds if possible etc - everything programs like HWMonitor can show on Windows basically   How can I achieve that?

I wanted to install a package to monitor the temperature of my CPU called .  According to Synaptic, it's already installed.    Can someone give me some simple step-by-step instructions on how I can actually run it from the command line or otherwise?


OK, a nephew is a male child of your siblings. But what do you call a male child of your female cousin?  A cousin nephew? A nephew cousin? ...?

Please refer the following questions asked elsewhere on this site:       I am a native Hindi speaker; Hindi has a plethora of terms referring to relationships. To take a trivial example, the term uncle may refer to father's elder brother, father's younger brother, mother's brothers, father's sister's husband, mother's sister's husband, all of which have specific addresses in Hindi.  I discussed the same with one of my teachers. She had the opinion that the development of language mirrors the cultural moorings of the society that uses the language. Now, since all of the above relationships have distinct status and reverence in the Hindi speaking society, that calls for different addresses. That may well not be the case in English speaking societies.  Is that correct? What other linguistic reasons may account for such a dearth of vocabulary in English in this area?


I am a Nigerian and I have single entry visa from Norway which is also a Schengen country and I also a US visa but I have a multiple flight itinerary to first fly to Germany to spend 4 days there before flying to US as my final destination, so would I be allowed entry to Germany with single entry visa from Norway?

My friends and I planned to visit Germany, so I got a single entry tourist Schengen visa to Germany. However, my travel plans have changed since then, because my friends are going to Italy instead. I don't have time to apply for a visa to Italy, but I have been told that I can use my Schengen visa to enter Italy. Is that true?


I a super newby in VM world.  My host operating system is macOS and the guest is Ubuntu 18.04.   If I clone the guest VM, would I be able to use it in a different host with Windows 10?  I'm guessing it is not possible, but I need to hear it from an expert.  Thank you in advance

I use VirtualBox 4.1.x on my Ubuntu machine and I’ve set up several virtual machines. Since there are several ways one can move a virtual machine in VirtualBox to another computer, I was wondering which one is the recommended way:   Use the “Import/Export utility.” Copy the entire virtual machine folder, containing the .vdi and .vbox files. Clone the VDI using “Virtual Media Manager” and then recreate a VM on the target machine but using the cloned VDI as the hard disk.   I have successfully used the 1st method several times and it has always worked. The problem is that after exporting and importing, the disk image is transformed into VMDK and not VDI anymore!  The 2nd method is probably the easiest but I’m not sure that simply copying the files will work or not on the target machine. When searching about this method, I found some people had problems in which they had to edit the VirtualBox.xml file to solve it!  At last, there’s the 3rd method, but it requires the extra work of creating a VM similar to the original VM configuration, which is not desirable.  It’s clear from the above explanation that my desired method is the 2nd one, but I need expert advice on this if it works or not. I don't want any XML editing getting in my way!  What’s the best method of safely transferring my VM’s to another computer with VirtualBox?


I read this story in a collection of short stories the 1980's and I am now looking for the publication.  All I can recall is that it was about a warrior race imprisoned on their own planet by an Alliance of other planets.  This imprisonment took the form of placing a force field around the entire planet that was controlled by the planet's moon.  The Alliance does not contact the warrior race for years; but eventually sends a delegation to the planet to ask for their help defending against an invader.  The Alliance finds what appears to be a peaceful agrarian society with little or no appearance of a warrior race.  Most of the Alliance delegation thinks there is little that the former Warrior race can do to help so they agree to turn off the moon force shield and the former Warrior race agrees to come to their aid.  In the mean time an away party, not the negotiation party finds out that the entire planet is filled with machinery, but they are unable to communicate this to the negotiation party before they leave.   At the end of the story the Alliance ask will the Warrior race help since they do not appear to have any ships; the story ends with the entire planet being revealed as a ship and the formal imprisoning moon being drawn along with the planet ship, once the force field generator is destroyed.  Can anyone name this story or help me find it???

First we are told that the Galactic Empire/Federation/Powers-that-be have kept the Earth locked up for being too warlike, but now their help is needed against invaders from another galaxy.  When the aliens land the first thing they meet is a talking bunny.      at the end when humans have accepted to join the fight the alien offers to send ships to transport them. The human leader tells that there is no need...  and the Earth accelerates away.   I must have read this sometime in the mid eighties, so no later than 84 or 85, but the story may be from the sixties or before.


I read this story around 10-12 years ago but was probably written in the 1990s or earlier.  Here's what I recall: There's a guy (I want to say his name's John, but not too sure about that) who goes into the London underground and ends up visiting a platform he's never seen before. It turns out that he has somehow travelled to the past (19th century, I believe). He sees that all the people there are wearing Victorian clothes. One phrase from the story that's stuck with me all these years is brass spittoon since that's the first time (and probably the last time) I've seen that phrase being used.

I cannot remember the story exactly, but I guess it goes like this -   Protagonist was travelling somewhere. So he goes to a train station. But the ticket counter he went to appeared old fashioned (may be with old lamps and kind of things). He gives money to the man at the counter to buy a ticket. But seeing the coins, the person asks if the protagonist is trying to fool him. (Implies that the person has not seen the coins before, so he thinks protagonist is trying to fool him giving fake money).   Somehow the protagonist reached back to his home and tells his relatives/neighbors about his experience. He got curious about this and made several attempts to get back to that same ticket counter, but couldn't find it.   After some days the protagonist go missing. The relatives/friends find an old bundle of letters at his house. The letters had been sent by the protagonist from a different time period. From the letters it is understood that the guy had found the counter and traveled back in time. He is happy there and do not wish to return.  I remember the place of the plot as Illinois.


here is what the machine shows   #apt-get install tor Reading package lists... Done Building dependency tree        Reading state information... Done Package tor is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'tor' has no installation candidate

I'm trying to install tor on my Kali Linux 2016.1 (kali-rolling). When I type apt-get install tor in Terminal, this error appears:  Reading package lists... Done Building dependency tree        Reading state information... Done Package tor is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'tor' has no installation candidate   How can I fix this and install tor?  UPD:  I tried this:  - I added deb http://deb.torproject.org/torproject.org wheezy main to sources file, but it didn't help at all, so I deleted this string and now it's in a default condition


If I were a dog, I’d bark all day. If I was a dog, I’d bark all day    Thanks in advance for your precious answers.

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


The party in the game I'm running is being taken to court, in a reasonably big city. I'm trying to figure out what sort of measures would be used in a courtroom where magic is available. I've already established that there will be a zone of truth in effect, that everyone will be expected to allow to affect them. However, I've said that alignment detection and the like is probably not admissible. On the other hand, they'll likely have most of their magical effects/items removed.  Specifically, I'm looking for two main things:   Is there anything beyond zone of truth that would likely be employed by the court to ensure an honest and fair trial? Assume access to at most 4th level spells. What sort of measures for security would be reasonable to implement? Mostly to prevent violence or people charming the jury.

The Background  I'm a pretty new DM, and I'm running a casual game of D&D 3.5 (with some rulings from Pathfinder added to the mix, for practical reasons) and I like doing special things for my players, who are very close friends.  One of my PCs seeks justice, to clear his name from a heinous crime he didn't commit. So, I'm trying to set up an investigation and trial arc, with some rewards on his head to spice things up.  But, I'm thinking about setting up something mechanically special for this arc. By the climax, after investigations and ready to prove innocent, I want a trial to take place, but as a game itself, similar to what the Ace Attorney videogame series, loved both by me and the player in question, does. And seeing how the series implemented itself on a medieval setting already (), I thought I could do something similar.   This way, I can get more of a "game" out of this situation, and reward logical thinking in a more structured manner. Witnesses, cross examinations and evidence analysis would be added as mechanics by me, so they aren't the problem. Neither will be the setting, not being based on the "Kings do Divine Justice".  Also, I'll be creating or finding some class to serve as the "Truth People" or something like that, to carry on with this idea, so I don't have to twist the whole setting to fit this thing in.  But...  ...then I got slapped in the face by the fact that magic, even though not so strong in our setting, still exists and will probably destroy everything I can think for this system, from illusion and transformation spells to Zone Of Truth, for starters.   They would make everything so obvious, or so fabricated it wouldn't need a trial. Shove people on Zone Of Truth and there you go. Modify an item with magic, perfect piece of evidence.  I don't want to cherry-pick spells to rule them out just for this scenario. So, is there a way to set this up without being so "Ok magic here works different because I want to"? Am I overestimating the use of magic in D&D? Should I give up this silly idea before it ruins the game?


I need some tips on an assignment that I am currently working on. I need to create a program for converting time specs (n1y n2n n3d n4h n5m n6s -- note the amount of whitespace can vary between the different inputs) to seconds. One of the functions that I need to create is a function to validate the time spec input (as a const char*). The function header looks as follows:  // is_legal_time_spec: //      Checks if ctime_spec is a valid time spec // In: //      ctime_spec != NULL // Out: //      return -- true if the ctime_spec is a valid time spec //                false if otherwise bool is_legal_time_spec( const char *ctime_spec ) {     return false; }   Ive had some ideas about how to use the strpbrk(3) function for this, but I was wondering if there is another easier function that I can use to check the format of the time spec input.  Thanks in advance for your help.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


I'm using Ubuntu 14.04 and I want to make a live USB for another linux distro, but I don't know how to. In Windows I used  but sadly it doesn't work on linux.  How can I make a live USB for my desired linux distro?

How do I make an Bootable Ubuntu USB containing the the latest version of Ubuntu?  For completeness, how would I be able to do this on Ubuntu, Windows, OS X or another Linux distro?


I'm not sure how to start this problem with Rings, could someone perhaps lead me in the right direction?

I apologize if this is too obvious, but I crave for a reasonable definition/explanation - why is  $(-1)(-1)=1$?  Something akin to the reason $a^{-1}=\frac{1}{a}$, I.e. because $a^{-1}a^1=a^{1-1=0}=1$, so we get $a^{-1}=\frac{1}{a^1}=\frac{1}{a}$ by dividing both sides by $a^1$.  That sort of stuff.


Here's an excerpt of my prorgam:  package something.util; public class Reports {     public static void logStatus(LogStatus testStatus, String testDetails) {         test.log(testStatus, testDetails);     } }  package something.pages; public class MainPage {     public void someMethod(){         Reports.logStatus(LogStatus.INFO, "Clicked A/B Testing link");     } }   When I execute the code above, I keep getting NullPointerException and I am not sure why. At least a pointer to the mistake I'm making will help.

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?


are there any theorems that give us any conditions to know if a linear subspace $E$  plus its orthogonal complement span the whole vector space?   For exemple, I know that in $\mathbb{R}[X]$, the complement orthogonal of the hyperspace $Span(1+X, 1+X^2, ...)$ is $\{0\}$ and thus the sum does not span the whole space  Thanks !

I am trying to prove that given a subspace $\mathbf{W}$ in $\mathbb{R^{n}}$, the subspace and its orthogonal complement 'cover' whole of $\mathbb{R^{n}}$ through '+' where we define $\mathbf{W}$+$\mathbf{W^{\perp}}$ as linear combinations of vectors both in the subspace and in its orthogonal complement. It seems intuitively right, and I can prove that the sum of their dimensions adds up to n, but I am not sure how to prove the question I am looking at. Thanks!


I am recently selected in interview panel for Automation Engineers. As i have never taken interviews till now, i am confused about how to judge a candidate? What kind of question should i ask to him and what i should expect?  Question asked  is something different, He is more into how should i interview if candidate doesn't into testing but he is a coder(exact phrase from question : His question is "besides some basic programming questions, maybe a single very basic testing question, what else should I ask ?") and creating frameworks but my question is if a person knows both testing and fundamentals of automation as well , as per my understanding a test engineer should be aware of manual testing process as well even if candidate is more into automation, What should i ask him and how can i judge him based on those questions.

A variant on the  I am interviewing candidates for an Automation position, we don't use commercial automation tools, but rather use a framework using mainly Perl, so knowing Perl or some other programming language is required, but being a "computer geek" is a great plus. Another problem is that good programmers tend not to have testing state of mind, they will follow the needed design but will have a hard time going from test case to test code without forgetting something in the way.  So... besides some basic programming questions, maybe a single very basic testing question, what else should I ask ?


How to update to LibreOffice version 4 to version 5

LibreOffice is seeing some dramatic improvements each version and subversion that goes out.   I would like to have always the latest version of LibreOffice on my machine(s). I know of the PPA that exists but is it recommended to use it with 12.04 for daily use? What are the pro and cons of using the PPA? Will it break my system/Libreoffice installation?  Does libreoffice get eventually also upgraded in the Ubuntu repositories or does this upgrade happen only with new releases? Who manages the upgrades of libreoffice in Ubuntu and in the PPA?


When I print out the user value and the pass value into LogCat, the values are printed out as "A" and "a". If the user value is "A" and the pass value is "a",  I don't understand why the if statement doesn't execute. When I place the contents that are inside the if statement outside of the if statement, the startActivity() method operates correctly. This tells me that the if statement is the problem but I don't see how. I don't get it!          public void onClick(View v)          {             String user = username.getText().toString();             String pass = password.getText().toString();              System.out.println(user);             System.out.println(pass);              if (user == "A" && pass == "a")             {                 Intent intent = new Intent("com.example.android.STARTINGPOINT");                 startActivity(intent);             }           }

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


First, thank you userr2684291 for reminding me of the web site's name.  Here is the situation: I couldn't remember the name of LXXX-8 web site, so I went to the chatroom to get some help. (I don't know whether advertisement is allowed here or not, so I put XXX in the web site's name)     Could you remind me the web site's name please?   It is a web site that you can write some sentences, and some other users will come to help   you check your grammar.   ColleenV once told me the web site's name, but   I have forgotten   I felt like using simple present tense in the last sentence, but my hands was typing the sentence in present perfect tense.   I think simple present tense is also correct, but I don't know how to explain it to myself that which one is the better.      ColleenV once told me the web site's name, but I forget it now   I am sorry, moderators. I have read the suggested answer in the given link, but I do not understand how it can help me solve my question. I would like to know which of the tenses is the better in the given situation.  I need help. And which one sounds more natural to your native ears?     "I have forgotten" or "I forget it now"

I'm walking out of a bar and I'm putting my hand in my pocket, and I can't find my wallet.  So it's better to say "I have forgotten my wallet" or "I forgot my wallet" ?


When i Click to submit - No reaction ! Help please ! PHP Form Not Work  I think error in form, please, check for first action and form connectedness   Login.php   <link rel="stylesheet" href="style.css">
     <form action="action.php" method="POST" class="log" id="log">
Log In
           Username:          <input type="login" name="loginl" id="login">           Password:          <input type="password" name="password" id="password">           Mail:          <input type="mail" name="mail" id="mail">          <input type="button" value="Submit" id="button">      </form>
    Action.php  <?php      $loginl = $_POST["loginl"];     $password = $_POST["password"];     $mail = $_POST["mail"];     $text = $_POST["text"];       $loginl = stripcslashes($loginl);     $password = stripcslashes($password);     $mail = stripcslashes($mail);     $text = stripcslashes($text);      $loginl = mysql_real_escape_string($loginl);     $password = mysql_real_escape_string($password);     $mail = mysql_real_escape_string($mail);     $text = mysql_real_escape_string($text);       $db = mysql_connect("localhost", "root", "usbw", "armus");     mysql_set_charset($db, "utf8");      $result = mysql_query("SELECT * from users where loginl = '$loginl' and password = '$password' and mail = '$mail'") or die("Failed to query database ".mysql_error());      $row = mysql_fetch_array($result);     if ($row['loginl'] == $loginl && $row["password"] == $password && $row["mail"] == $mail){         echo "Login Success!!! Welcome ". $row['text'] ;     } else {         echo "failed to login!";     }  ?>   output - NO RESULT  My PHP version - 5.4.17  where is my mistake?

When looking at most sites (including SO), most of them use:  <input type="button" />   instead of:  <button></button>    What are the main differences between the two, if any? Are there valid reasons to use one instead of the other? Are there valid reasons to use combine them? Does using <button> come with compatibility issues, seeing it is not very widely used?


Why could the crew beyond the worm hole only receive video logs? Why did they not have two way communication with NASA on Earth?

In Interstellar, we saw Murph, Tom, Prof. Brand are able to send message to Cooper. Then why  Cooper or Dr. Brand can't send message as well?


Plz guide me. Why? my website is not showing "cache option" in search result.  when I check Ex- (Cache:  ) then it shows -  "404. That’s an error."  URLs are indexed & no any issues in search console.   We dropped my ranking due to it. so plz

My site is getting 404. That’s an error. message when I click on cached from Google search results.  This is the error message from Google:  That’s an error.   The requested URL /search?q=cache:8kxLAgFrhZQJ:www.mysite.com.....&cd=8&hl=en&ct=clnk&gl=uk was not found on this server. That’s all we know.  What I did before I was getting this error is that about 10 days ago, I moved my hosting from Ixwebhosting to Gearhost (cloud based). I also added 301 redirect from non www to www.  I have no idea why I am getting this error. Please advise what might be the reason if there is a solution for it.  All of my pages are indexed by Google though.


I have a laptop on which a friend installed Ubuntu 10.04, but I never really used it. Now I want to install the latest version and start using Ubuntu.   The update manager says that it is not supported at all. So, is it easier to uninstall Ubuntu 10.04 and then install 16.04.1 from scratch? I have no files of importance to save.    Any tips what is the best and quickest way of doing this? I am totally new to Ubuntu.

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


I tried to delete Ubuntu and deleted a disk partition from Windows 10. Now I'm stuck at the GNU Command Line and I don't know how to exit this because I'm not familiar with Linux and Ubuntu. How can I get back to Windows 10. And can I actually delete GRUB from command line? Thanks

I have Windows 8 pre-installed, and then I installed GRUB with Ubuntu. Ubuntu is not my thing, so now I want to remove it along with GRUB. From what I have learned, with UEFI, GRUB does not overwrite the windows bootloader in the EFI partition and is stored elsewhere. How would I remove GRUB and make my PC use the Windows bootloader instead? It should be noted that I created a separate /boot partition when installing Ubuntu.


I'm in tax bracket A.  My employer takes out the appropriate taxes reach pay for my tax bracket.  During a special pay period, my pay is much higher than normal. If my pay was ALWAYS what it is in this particular pay period, I would be in a higher tax bracket (B).  The amount of "extra" alone does not actually push me into B.  My employer takes taxes out during this period as if my pay during that period was what I got paid every pay period, resulting in a much higher chunk of my pay going to taxes than it should.  Is my employer correct to do so?  This is in the USA, just to be clear.

I just started at a new company and received my first paycheck. It included a signing bonus, which of course made the paycheck much higher than a normal one will be. The fed withholding amount on the paycheck was much higher than I thought it would be, by a few percentage points.  How does payroll normally calculate the withholding amount? Obviously, the amount for the whole year can't be calculated, so it has to be predicted in a sense. But does payroll use the amount that they know is my annual salary, or do they do some sort math to simulate the gross pay on each paycheck being the same for the rest of the paychecks in a year?


I proposed a programming puzzle, where the question is to generate gramatically correct sentence with the shortest program (see: [).  One suggested solution was "Hello, World!", this is an standard output at a special language where no code is written.   My question is: Can "Hello, World!" be rated as a correct English sentence? My feeling is, that it is not, because there is no verb in it. But since I'm not clear what is the correct definition of a sentence, I want to raise the question to the linguistic experts here.  Edit:  Based on the feedback I got here, there are several different possiblities on how to define a sentence. This was a bit of a suprise to me. Since the answer to this question seems to be opinion based. I suggest to close this question.


Which reference to 'mum' in the following text shouild be capitalised, and which not capitalised? I'm confused...  ...................................................................  What? Did you say you’d met a man? Mum…mum – crikey – really? Do tell. What’s he like? Never too late, mum, I’ve always told you that. I’ve also got news, but not as exciting as yours…wow!’ Jessica chose her words carefully. ‘Saffie, it’s not like that, really it isn’t.’ She heard giggles. ‘Come on, mum – what do you mean? You’ve fallen in love, haven’t you – admit it.’ Saffron giggled again. ..........................

I am trying to understand capitalization rules with Mom and Dad. I believe I have it correct below, but please let me know if I do not.     The one thing I learned from my dad was that it was good to earn the trust of one's children. Dad has shown me how good that a dad can be. One day when I went to his house, and Dad wasn't there, I ran outside....   The above passage is just made-up just so that you would see what I mean about capitalization. Let's put numbers by each one, like so:     The one thing I learned from my dad(1) was that it was good to earn the trust of one's children. Dad(2) has shown me how good that a dad(3) can be. One day when I went to his house, and Dad(4) wasn't there, I ran outside....    This is one where I'm not certain. I believe in this sense I'm showing possession here with "my", and it just didn't seem right saying "my Dad". I don't know what the grammar rule is here, or if I even have it right. This one is obvious—it starts the sentence. In this case, I'm using Dad like a name instead of saying "Larry". Therefore, it should be capitalized. Again, just like 3.


I am trying to make a Hangman game in Java, I use 3 Strings to process the game. randWord is the word randomly selected word from a designated word list array (WORD_LIST), randWordExt is the randWord in extended format (e.g. penguin -> p e n g u i n), and guessWord is the String that gets updated while the player guesses.      static String[] WORD_LIST =     {         //list of words implemented here     };     static String randWord;     static String randWordExt = "";     static String guessWord = "";     static int LIVES = 10;   This is my main method where the problem is, the while loops is not exiting when the word is completely solved. Hence the final message is never displayed. It loops through perfectly, guessing works, but when the word is solved it doesn't exit the loop or display the final message.      public static void main(String[] args) {      boolean running = true;     Scanner input = new Scanner(System.in);          generateWord();         System.out.println("You have " + LIVES + " lives to guess the word! \n" + guessWord);         while(running){              guessLetter(input.next().charAt(0));             if(guessWord == randWordExt){                  running = false;              } else {                  System.out.println(guessWord);                 System.out.println("Lives left: " + LIVES);              }          }         input.close();          System.out.println("The word was " + randWord + ", you guessed it in " + " moves!");      }   The generateWord method:  public static void generateWord(){      randWord = WORD_LIST[(int)(Math.random() * 87)];      for(int i = 0; i < randWord.length(); i++){          guessWord = guessWord + "_ ";      }      for(int i = 0; i < randWord.length(); i++){          randWordExt = randWordExt + randWord.charAt(i) + " ";      }  }   And finally the guessLetter method:  public static void guessLetter(char letter){      boolean changed = false;      for(int i = 0; i < randWordExt.length(); i++){          if(!(guessWord.charAt(i) == letter)){              if(randWordExt.charAt(i) == letter){                  guessWord = guessWord.substring(0, i) + letter + guessWord.substring(i + 1);                 changed = true;              } else if (randWordExt.charAt(i) != letter && i == randWordExt.length() - 1 && changed == false){                  LIVES -= 1;                 System.out.println("\'" + letter + "\'" + " is not in the word!");              }          } else {              System.out.println("\'" + letter + "\'" + "has already been guessed!");          }      }  }

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


If I do Vault Of Glass on easy and obtain all loot chests then repeat on hard, will those loot chests " reset"????  Side note: anyone know the chance of getting exotic stuff from the raid, because I swear I have a curse on my character (have had to buy every legendary and exotic item - level 29)  Thanks guys and sorry if this question has been addressed already :)

I beat the vault of glass on normal mode, but I got no items just ascendent energy/shards.  Now I'm wondering if I were to beat it on hard, would I get anything else? I know the chests that I've opened in normal model won't give me anything, but what about the rest of the raid?  I also noticed that after I beat  Vault of Glass on normal, it still says there are rewards, does that mean I can do it as many times as I'd like per week and still have a chance of getting raid gear?


I am trying to pass file data form my form to a new PHP page. This is my html <form id="upload_flv" enctype="multipart/form-data" action="upload_file.php" method="post" style="margin-bottom:0;">     <span id="uploader">         <label for="myFile"> </label>         <input name="MAX_FILE_SIZE" value="<?php echo (int) get_true_max_filesize(); ?>" type="hidden" />         <input name="mediafile" id="myFile" type="file" />         <input type="submit" class="btn"  name="submit" id="upload_submit" value="Step 2 &rarr;" class="btn" />     </span>     </form>  this is my ajax function $(document).ready(function () {              $('form').submit(function (e) {                 e.preventDefault();                  var Filedata = $('form').serialize();                 //alert(Filedata);                  $.ajax({                      type: "POST",                     cache: false,                     url: "../../upload_file.php?PHPSESSID=<?php echo session_id();?>",                     data: {Filedata: Filedata},                      success: function (msg) {                         //alert("Success!");                         window.location = "addvideo.php?step=2";                                              }                  });              });          });  How to get this file data on upload_file.php?

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


Some implementations of decision trees (eg cran/tree) can split on categorical variables where the split separates the variable into 2 groups:  > library("tree") > df <- read.csv('https://forge.scilab.org/index.php/p/rdataset/source/file/master/csv/datasets/Titanic.csv')  > tree(Survived ~ Class, data=df, weights=Freq, minsize=10) node), split, n, deviance, yval, (yprob)       * denotes terminal node  1) root 2201 2769 No ( 0.6770 0.3230 )     2) Class: 3rd,Crew 1591 1772 No ( 0.7549 0.2451 ) *   3) Class: 1st,2nd 610  844 Yes ( 0.4738 0.5262 ) *   For a numerical variable, splits are calculated by trying all possible splits between the minimum and maximum value of the variable.  How are the splits enumerated for a categorical variable? Do you have to try all combinations of values? (this would seem to be computationally crazy)  Or is there a heuristic you use to limit the number of combinations tried?

I am curious about the practical implementation of a binary split in a decision tree - as it relates to levels of a categorical predictor $X{j}$.  Specifically, I often will utilize some sort of sampling scheme (e.g. bagging, oversampling etc) when building a predictive model using a decision tree - in order to improve its predictive accuracy and stability. During these sampling routines, it is possible for a categorical variable to be presented to a tree fitting algorithm with less than the complete level set.  Say a variable X takes on levels {A,B,C,D,E}. In a sample, maybe only levels {A,B,C,D} are present. Then, when the resulting tree is used for prediction, the full set may be present.  Continuing from this example, say a tree splits on X and sends {A,B} to the left and {C,D} to the right. I would expect the logic of the binary split to then say, when faced with new data: "If X has value A or B, send to the left, otherwise, send this case to the right". What seems to happen in some implementations is "if X has value A or B, send to the left, if X has value C or D send to the right". When this case takes on value E, the algorithm breaks down.   What is the "right" way for a binary split to be handled? It seems the much more robust way is implemented often, but not always (see Rpart below).  Here are a couple examples:  Rpart fails, the others are ok.  #test trees and missing values  summary(solder) table(solder$PadType)  # create train and validation set.seed(12345) t_rows<-sample(1:nrow(solder),size=360, replace=FALSE) train_solder<-solder[t_rows,] val_solder<-solder[-t_rows,]  #look at PadType table(train_solder$PadType) table(val_solder$PadType) #set a bunch to missing levels(train_solder$PadType)[train_solder$PadType %in% c('L8','L9','W4','W9')] <- 'MISSING'   #Fit several trees, may have to play with the parameters to get them to split on the variable  ####RPART mod_rpart<-rpart(Solder~PadType,data=train_solder) predict(mod_rpart,val_solder) #Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = attr(object,  :  #factor 'PadType' has new level(s) D6, L6, L7, L8, L9, W4  ####TREE mod_tree<-tree(Solder~PadType,data=train_solder,split="gini") predict(mod_tree,val_solder) #works fine  ####ctree mod_ctree<-ctree(Solder~PadType,data=train_solder,control = ctree_control(mincriterion = 0.05)) predict(mod_ctree,val_solder) #works fine


I'm trying to build a GUI for a random dice simulator, with the intended goal of the simulator being to change the die size to different polyhedral dice (ex. a 20 sided die, a 10 sided die, etc.). My problem is that for the random.randint (1, b), I'm having trouble using a button to change the variable to a different number. What can I do?  I've tried having a command for the button such as:  def d4():     b = 4   and  def d4():     b.set(4)   Code setup:  a = 1 b = 20  def rollagain():     result = random.randint(a, b) def d4():     b = 4  # a bunch of buttons and labels  b_d4 = Button(bones, text = "D4", height = 1, width = 8, command = d4) b_roll = Button(bones, text = "Roll Dice", width = 8, command = rollagain)  # button placements  bones.mainloop   The starting value for b is 20, as I would like the result to be a value for a 20 sided die. When I click the d4 button, I would like to change b to 4, to represent a 4-sided die. But everything I've tried so far has resulted

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I keep receiving spam mails from different senders using different domain names (e.g. newsletter@buyerkart.info via  utilityinbox.com).  I could create a filter to catch all mail from newsletter@buyerkart.info, but I want to catch/filter all the mail sent via utilityinbox.com.  How could I achieve that?  Edit: Screen shot attached.

I have this annoying problem in Gmail. Spammers are by-passing the Gmail spam filters and are so clever that I am not able to create a manual filter of my own to block them. They are sending me junk mails from e-mail IDs of the form:  Jewelskart@greatestjewels.in via watchstore.cleanmail.in  Shoppingkart@shoppers.in via watchstore.cleanmail.in   In general,  something@somethingelse.in via watchstore.cleanmail.in   Now, I cant set a filter for each and every mail as they are from different IDs. The common part is the via address which is watchstore.cleanmail.in. But when I try creating a filter with watchstore.cleanmail.in in From field, Gmail doesn't list these emails. In short, the filter is not able to detect via addresses.  Report Spam/Unsubscribe options aren't working.  How can I get rid of these annoying spammers?


Remember how on iChat you could block certain people or just allow certain people? Is there a way to do that on iMessage?

I have had the same problem as the previous complainant. I received an iMessage from a @yahoo.com address saying "hi". I then asked who this was and the reason for the message and also how he obtained my number and email. He claimed that he has me stored in his directory as "Abba". I'm certainly no Abba!   I asked him to remove me from his contacts, to which he agreed. Today the idiot messages me again saying hi. I mentioned that I would have him reported, he then called on FaceTime and hung up???? Also sent me a pic of himself!! How do I block him from contacting me, this is rather annoying?


I need help with this exercise.  I need to prove $$\int_{0}^{1}x^{-x}\ dx=\sum_{n=1}^{\infty}n^{-n}$$  I think I should use some convergence theorem, but I'm stuck.  Thanks a lot!

Earlier today, I was talking with my friend about some "cool" infinite series and the value they converge to like the Basel problem, Madhava-Leibniz formula for $\pi/4, \log 2$ and similar alternating series etc.  One series that popped into our discussion was $\sum\limits_{n=1}^{\infty} \frac{1}{n^n}$.  Proving the convergence of this series is trivial but finding the value to which converges has defied me so far. Mathematica says this series converges to $\approx 1.29129$.  I tried Googling about this series and found very little information about this series (which is actually surprising since the series looks cool enough to arise in some context).  We were joking that it should have something to do with $\pi,e,\phi,\gamma$ or at the least it must be a transcendental number :-).  My questions are:   What does this series converge to? Does this series arise in any context and are there interesting trivia to be known about this series?   I am actually slightly puzzled that I have not been able to find much about this series on the Internet. (At least my Google search did not yield any interesting results).


I currently got Windows 8 on my machine and would like to upgrade to windows 10.  I got several products installed on my machine, will I have to do a re-installation for each of them after the upgrade?   Also Will I lose my Office product license and other licenses on doing the upgrade?   EDIT:  The installed software I got is :  1- Microsoft Office 2- Visual Studio 2013 3- SQL Server 2014

I have Windows 8.1 Update, if I update to Windows 10 when it becomes available what is going to happen to my data and apps?  Of course I have to do a backup, but I wonder if the data will be overwritten or not.


Which of these is correct? This is in the context of buying a surprise gift for someone and you think your gift is hilarious.     I bought myself a hilarious one!   or     I bought myself an hilarious one!   I’ve been saying both so many times that neither makes sense to me anymore.

A basic grammar rule is to use an instead of a before a vowel sound. Given that historic is not pronounced with a silent h, I use “a historic”. Is this correct? What about heroic? Should be “It was a heroic act” or “It was an heroic act”?  I remember reading somewhere that the h is sometimes silent, in which case it’s an, and when the h is pronounced, it’s a. But then I also remember reading that it depends on which syllable is stressed. And I also think I read somewhere that it might differ between British and American English.  Personally, I pronounce the h, and believe that a is correct. I find that it sounds incorrect to use an and pronounce heroic without the h.  So how do I know when to use a and when to use an with a word beginning with the letter h? Are both acceptable or is there one that is correct?


For many statistical procedures, it seems the observations must be independent. For example the observations within each group in a two-sample t-test must be independent for the standard error/P-value to be accurately computed. Likewise, the observations of an independent variable in linear regression must also be independent. But I cannot understand why dependence will cause incorrect standard error/P-values.  and unfortunately didn't understand the answer. This time round I'm hoping someone can point me in the direction of resources that clearly explain why dependence a problem and that also demonstrate it being a problem. Are there any books/videos/PDFs/blog posts out there that achieve this? I'm particularly interested in resources that visualise why dependence a problem.

I'm interested in why dependent observations are a problem in statistics. Let's say you want to know if there is a difference in mean exam scores between two schools. You collect 50 observations in each school. These 50 observations are derived from 5 different classrooms in each school and there is dependence within classrooms. In this instance, how would the results of the t-test be affected and how might they lead to inaccurate conclusions?


Hello When I turn on my Lap Top the screen rotated 90 deg. (Both of login screen and desktop screen). So I use this code to rotate screen  xrandr -o normal   but the first problem is: this code is just for desktop (I need to login to computer and run this code and I can not change login screen rotation) and the second problem is: this code is temporary and I want save setting after restart  My lap top is: Asus Tp 550 LJ and has  touchscreen

How can I run the following xrandrcommand on startup?  xrandr   cvt 1368 768  xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync xrandr --addmode VGA1 1368x768_60.00 xrandr --output VGA1 --mode 1368x768_60.00


Usually curved spacetime looks like it causes objects to attract to each other. But is the opposite also possible? For instance if I twist/curve a towel in one direction it is getting smaller but in the other direction it is getting longer (the length of it gets another direction (diagonal or straight). So is it possible that a curveture also creates a repellent effect?

Is  (i.e. repulsive gravity) possible in string theory?  I have read some articles about scientists making assumptions about the existence of anti-gravity, but is it possible in string theory?


The following codepiece is a script used to install Apache. I run this script in-place when executing it from the heredoc block that wraps it (APACHE).   Note that inside this APACHE heredoc, I have an internal heredoc (MOD_REWRITE), which I can refer to as a "secondary" or "internal" heredoc.  Please also note that all the code inside APACHE is indented (tabulated), besides the code of the internal heredoc.   bash /dev/fd/10 10<<'APACHE'      # Setup basics:      apt-get update -y && apt-get upgrade -y     apt-get install tree zip unzip     a2enmod mcrypt && a2enmod mbstring      # Setup LAMP environment with enabled mod rewrite:      echo -e "\07" && echo -e "\077" # Insert password.     apt-get install lamp-server^ -y     a2enmod rewrite  cat <<MOD_REWRITE >> /etc/apache2/apache2.conf  <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> MOD_REWRITE      systemctl restart apache2.service      # Setup maldet:      cd /usr/local/src     wget http://www.rfxn.com/downloads/maldetect-current.tar.gz && tar -xzf maldetect-current.tar.gz     cd maldetect-* && bash ./install.sh  APACHE   If I indent it with commands with spaces instead of tabulations, I can run the script just fine (as long as it doesn't have the MOD_REWRITE inside it). If I add the MOD_REWRITE, the script brakes when executed; The same happens if I remove all space-indents whatsoever and totally replace them with tabulations, but AFAIK, the last time I tried to execute the script with tabulations, it also broke (even when I added an hyphen between bash /dev/fd/10 10<< and 'APACHE'.  My question:  What is the right way to indent the MOD_REWRITE heredoc inside the APACHE heredoc, so the script would be more unified and would execute without breakage?  Notes:   The reason I want to indent internal heredocs as well, just as I would do with any other command, is from aesthetic reasons --- It makes it easier for me to read and organize my scripts. This question is not the same as "" because it asks about the correct way of indenting internal heredocs inside external heredocs, and not about indenting external heredocs themselves.

If there's a "First World Problems" for scripting, this would be it.   I have the following code in a script I'm updating:  if [ $diffLines -eq 1 ]; then         dateLastChanged=$(stat --format '%y' /.bbdata | awk '{print $1" "$2}' | sed 's/\.[0-9]*//g')          mailx -r "Systems and Operations <sysadmin@[redacted].edu>" -s "Warning Stale BB Data" jadavis6@[redacted].edu <<EOI         Last Change: $dateLastChanged          This is an automated warning of stale data for the UNC-G Blackboard Snapshot process. EOI  else         echo "$diffLines have changed" fi   The script sends email without issues, but the mailx command is nested within an if statement so I appear to be left with two choices:    Put EOI on a new line and break indentation patterns or Keep with indentation but use something like an echo statement to get mailx to suck up my email.   I'm open to alternatives to heredoc, but if there's a way to get around this it's my preferred syntax.


Q) $\int_2^{\infty}\left( \frac{1}{x\log^2x} \right)^pdx$  $p=1$ is simple by substitution. How can I do this in general? Thanks.

I see  question and the answer by joriki.  However I cannot understand joriki's argument that $$\int_2^\infty \left(\frac1{x\log^2x}\right)^p\mathrm dx$$  diverges for p>1.  So I try to show that by myslef, by finding a function $f(x)<\left(\frac1{x\log^2x}\right)^p$ for sufficiently large $x$ and $\int f(x) dx=\infty$, but it is difficult.  Please help me to understand that argument or give me some hints.


I see a post on site A that I want to migrate to site B (where site B is not on the list of eligible sites for migration when closing a question as off topic, or I don't have enough reputation to vote-to-close yet).    What are guidelines should I follow before flagging that post for migration?

I posted a question which was closed as off-topic and it seems like it could fit on another site in the network. How can I go about moving it there?   What is migration? When can a question be migrated, and who can migrate it? When should I consider migration, and when is it inappropriate? What causes a migration to be blocked and what happens after? What causes a migration to be rejected and what happens after? Anything else I should know about migration?


I need to prove $\sum \binom nk 2^k = 3^n$, combinatorially.   I have already proved this identity using binomial theorem,  simply by substituting x = 1 and y = 2.   Could I get some help/tips on how to prove this combinatorially?

I need help proving that $$\sum_{r=0}^n\binom{n}{r}2^r=3^n$$  I'm thinking this should use the idea that $\binom{n}{r}=\binom{n}{n-r}$ but I'm not sure how to proceed with it.  Thanks in advance!


I have the following problem:  I want to iterate through a list of types and in the loop pass the type as a parameter to a generic function and somehow this doesn't work. I could just hardcode it if there really isn't any way to do it, but that obviously wouldn't be as "pretty" as using a loop.  Generic method:  public async Task GenericMethod<T>() where T : class {     // Does something ... }   List of types:  List<Type> listOfTypes = new List<Type>() { typeof(classA), typeof(classB) };   Iteration where the problem occures:  foreach(Type type in listOfTypes) {     await GenericMethod<type>(); }   Error message:      CS0118 'type' is a variable but is used like a type   And just FYI: This would work (hardcoded):   await GenericMethod<classA>();

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I've created a cool select box in Angularjs , all the codes works fine with no problem , the only problem that I'm facing with no luck to solve it is this :   Let say below is my select box markup :
     Title    <input type="text" ng-model="q">

{{r}}

   So far it works and and when I click on this div or any child of it ( lets say that title element) , the ul will toggle show and hide.  Problem :   When I click outside of this div ( anywhere outside ) I want this select box to be closed ( isOpen=false) , I know that I have to catch the document.click event and do something with that , but I'm not sure how to use it.

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


I'm writing a sandbox-type game and i'm looking for a good way to store game data. I tryed Lua and plain text files, but the have a big minus - player can edit them his self!  So how do I protect data from player? Thank you!

What options are there for saving game data in a secure manner? I'm interested in solutions specifically tailored for C++.   I'm looking for something that is fast and easy to use. I'm only concerned about storing simple information such as   Which levels are and are not unlocked The user's score for each level   I'm curious again to know what's out there to use, any good libraries to use that give me nice, secure game data files that the average player can't mess with.   I just found  here which looks very nice, but it would be great to get some opinions on potential other libraries/options out there.


Or to put the question differently; what is the point of a persistent APT cache that seemingly doesn't get rid of downloaded packages immediately after install? Does anyone even know what is the eviction policy, is there one? I find on internet all kinds of articles on Ubuntu maintenance how-to's involving the apt-cache clean command and there's also questions asked on this site how to  or  - which may be very useful, sure, but I first need to figure out why files are left sitting around in the cache and what the default eviction policy is. I as a human - when I install new software, I download install files somewhere, but after install I delete them. I see no point at all just leaving crap behind forever and ever, and I certainly don't have the need to reinstall the same software over and over again. In fact, re-installs are like extremely rare, right? So, this is what I just can't for the life of me understand, why do Ubuntu act different from what I am pretty sure is the human behavior of most of us? Edit:  doesn't ask about the eviction policy and the accepted answer quickly spirals into a tutorial on package management, briefly answering my question simply with the files are there "in case they're needed for future use". This last part is exactly what I am asking about. WHAT future use? And, what is the default eviction policy? Lots of IT admin articles out there suggest a "regular cleaning", I am pretty mind-struck why I have to do this myself. Edit 2: I know why files were put in the cache folder. I am asking WHY ARE THEY LEFT IN THERE and what is the eviction policy? Seriously, stop voting this as a duplicate. You're not helping the community.

Why are there deb files in  /var/cache/apt/archives/?  In what cases  were the deb files downloaded into that directory?


I have a List<String> which is like,  List<String> dummyList=Arrays.asList("a","b","c","a","b","e","f","e");   I have a list which contains names of students in a class, I need a lambda expression to fetch only the count of students with names "a","b","c".  I tried using,   dummyList.stream().collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));   it gave count of entire students in the class, but I need the count of students "a","b","c", the final map should be of,  a:2 b:2 c:1

I want to filter a java.util.Collection based on a predicate.


How could I get to have a look into LOB contents?  \d ticketgrantingticket                Table "public.ticketgrantingticket"           Column           |          Type          | Modifiers  ---------------------------+------------------------+----------- id                         | character varying(765) | not null number_of_times_used       | numeric(10,0)          |  creation_time              | numeric(19,0)          |  last_time_used             | numeric(19,0)          |  previous_last_time_used    | numeric(19,0)          |  ticketgrantingticket_id    | character varying(765) |  expiration_policy          | oid                    |  authentication             | oid                    |  services_granted_access_to | oid                    |  expired                    | boolean                |  proxied_by                 | character varying(1)   |  Indexes:     "ticketgrantingticket_pkey" PRIMARY KEY, btree (id)  SELECT expiration_policy,         authentication,         services_granted_access_to  FROM ticketgrantingticket LIMIT 2;   expiration_policy | authentication | services_granted_access_to  -------------------+----------------+----------------------------            1165742 |        1165743 |                    1165744            1165757 |        1165758 |                    1165759 (2 rows)   This shows those numbers by default.  I so far found  which I think is not working properly in my client somehow:  SELECT expiration_policy,         encode(authentication::bytea, 'escape'),        services_granted_access_to  FROM ticketgrantingticket LIMIT 2;  ERROR:  cannot cast type oid to bytea LINE 1: SELECT expiration_policy, encode(authentication::bytea, 'esc...   I can see the same in pgAdmin III.  I am expecting blobs there because IINM oid can be used as a large object reference. We are using oid because not knowing what we were doing. I have so far assessed that one of those three columns will be safely and profitably converted to bytea, but am being unable to spy the other two columns' contents in the source (non postgres) system, so I decide to spy them in this (postgres) target system.

I have a database table that looks like:   create table answers(    id int not null,    question_id int not null,    answer text null )   This table was originally build by Hibernate using the @Lob attribute for the "answer" column.  I did not realize it at the time, but when setup that way, Hibernate stores an OID in the column instead of the actual text.  Everything works fine when I use Hibernate to retrieve the values since it automatically converts the OID to the CLOB string, however it is becoming a performance problem and I'd like to get rid of the OID.   select * from answers ID     QUESTION_ID     ANSWER =============================== 1       123             55123 2       234             51614 3       345             56127 should be ID     QUESTION_ID     ANSWER =============================== 1       123             Male 2       234             203-555-1212 3       345             555 Main St. New York, NY    My desire is to add an extra column to the table "ANSWER_VALUE TEXT" and do something like below to get the actual value into the table, then change Hibernate around to not use the @Lob designator   update answers set ANSWER_VALUE= getValueFromOID(ANSWER)   Does that "getValueFromOID" function exist?  If not, could I get some pointers on how to create one or at least how to fetch the actual value of an OID?  Thanks


I use VLC to play all my videos, and wanted to know to remove the video player that comes with Gnome.

In my opinion, VLC is a much better and much faster player than Totem, and plays everything without having to need all of the extra junk Totem comes with. My question is, can you safely uninstall Totem? I'm trying to reduce the amount of junk on my computer, and since I'm using VLC for all my movie/video objectives, I see no need to have Totem.  Thanks


I have two spheres in 3-dimensional space. The mass and initial velocity of each sphere is known. If the spheres collide elastically, how can I calculate their final velocities? The spheres do not necessarily collide head-on.

I am working on a particle simulation where there is no gravitational force exerted on particles, they simply travel through space and, upon collision, change trajectories accordingly. There isn't a set number of dimensions the simulation can be run on, with the minimum being 2. Each particle has three attributes: radius (each particle is an  $n$-ball of  $n$ dimensions corresponding to the simulation's dimensions), coordinates (a tuple describing its position), and velocity (another tuple describing how quickly it moves in any given direction, determining where it will be on the next iteration). With the coordinates one can determine exactly the angle at which it strikes another particle, and that should be enough to determine the new velocities of both particles, or so I think. However, I'm not sure how to do this for an unknown amount of dimensions. I would presume a sigma function could describe this behaviour well, but I'm not sure how to write it. How might I go about doing so? Any necessary information can be added upon request.


When I currently compile my LaTeX document, I do it like this:  sketch figures/torus.sketch > figures/torus.tex pdflatex $(DOKUMENT).tex -output-format=pdf # aux-files for makeindex / makeglossaries makeindex $(DOKUMENT) pdflatex $(DOKUMENT).tex -output-format=pdf # include index pdflatex $(DOKUMENT).tex -output-format=pdf # include symbol table make clean # remove intermediate files like *.log and *.aux   This takes about 245 seconds (over 4 minutes).  But quite often, when I compile the document the first time after many changes, it has some errors, e.g.   forgetting about LaTeX issues with # and _ forgetting curly braces { or } confusing input{figures/somefile.tex} with \includegraphics{figures/somefile.png} forgetting to include packages   It would really be awesome if there was a fast LaTeX syntax checker. I would let the syntax checker run before the rest. If it fails, the rest will not be executed (as I do it with a Makefile, make will stop when the first error occurs). Does a LaTeX syntax checker exist? (False-negatives are ok, but there should not be any false-positives).

Is there a program equivalent to lint for LaTeX? (lint checks C code for syntax errors and possible mistakes.)


My husband is a British citizen and my kids and I have South African passports. We want to travel to London for a few days. What type of visa should I apply for and is there costs involved with my husband being a British citizen?

I am a Bangladeshi citizen married with my husband who is a British citizen by birth. Currently, we both live in Bangladesh and my husband works at a university. We, are planning to visit UK for about 3 weeks. Just to be clear, we have no intention to settle down in the UK.  Do I need to apply for a visa? If so, then what type of visa should I apply for?  N.B. I've been searching on the internet (including the UK border agency website) for hours now but couldn't get a definite answer.


Is it possible to create the following symbol,     Circled 1 (or any number or letter).   The output should be something like \textregistered except R being replaced by 1 (or the corresponding number or letter, as the case may be).

This question led to a new package:      I'm trying to make some good-looking numbers in a circle, using the simple command:  \textcircled{1}   However, the circle is misaligned vertically with the number, and look a bit sloppy:    Any suggestions how can I adjust the vertical alignment so that the numbers look more centered w.r.t to the circles? Or, if that's not an option, what other ways to achieve the same results are possible?  I will use those only for numbers, and in very few places, so manual adjustment per glyph is an option.  I'm using pdfLaTeX with Computer Modern, if that matters.


$\binom{74}{37}-2$ is divisible by :  a) $1369$  b) $38$  c) $36$   d) $none$  $of$ $ these$  I have no idea how to solve this...I tried writing $\binom{74}{37}$ in some useful form but its not helping...any clues?? Thanks in advance!!

how to prove $\forall p$ prime :   $\binom{2p}{p} \equiv 2 \pmod p$ we have:  $\binom{2p}{p} = \frac{2p (2p-1)(2p-3)...1}{p!p!}$ but how to continue?


Suggestion: superuser.com should forward to superuser.stackexchange.com or something with stackexchange in the name, and should very-very-clearly be branded as part of the SE family.  I eventually figured out that it was, indeed, part of SE (right?! :) but, given all the fake-SE/SO copycat sites out there, it'd be nice to at least see stackexchange.com as part of the URL.  I love the whole SE family thing but, given that 99.44% of my usage is on Stack Overflow, when I go to a different member site, it'd be nice to know that I'm "in bounds" and haven't strayed to one of "those other guys" and am about to give them my account credentials, etc.  (Same suggestion for all the other members of the SE family that don't have SE.com in the URL.)

I have a Chrome search engine of the form http://%s.stackexchange.com/ that I use to quickly move between various SE sites (I find this more efficient than bumbling my way through the multicollider).  It would be nice if we could get aliases (like e.g. http://so.stackexchange.com/ or http://stackoverflow.stackexchange.com/ as a redirect to ) for all the sites that have their own domain names. I believe that's just the Trilogy (SO, pt/ja/ru.SO, SU, SF) and Stack Apps (plus corresponding metas where they exist, plus Meta MathOverflow).  Note that Ubuntu already has  redirecting to .  EDIT: Either I forgot to check MathOverflow when I originally posted this, or it's been added since then -  redirects to  now. However,  does not go anywhere.


After compiling following document, there is an extra blank space at the beginning of each page. I suspect there is an incompatibility between the lineno and pdfsync package. Is there a way to fix this problem?  \documentclass[a4paper,10pt]{amsart} \usepackage{pdfsync} \title{Title of article} \usepackage{lineno} \pagewiselinenumbers  \begin{document} \maketitle \section{Introduction} In the traffic court of a large mid-western city, a young lady was brought before the judge to answer a ticket given her for driving through a red light. She explained to his honor that she was a school teacher and requested an immediate disposal\linelabel{disposal} of her case in order that she might hasten on to her classes. A wild gleam came into the judge's eye. "You are a school teacher, eh?" said he. "Madam, I shall realize my lifelong ambition. Sit down at that table and write 'I went through a red light' five hundred times."  Line \ref{disposal} on page \pageref{disposal}. \end{document}   Related  and .

I stumbled upon these SyncTeX files in my directories and wanted to know what they are for. I searched this site and the internet and I think I have some vague understanding of what it is but I'm still not very satisfied with my actual knowledge. I've found many questions about configuring SyncTeX but none about what it is and what it does.  So, could someone explain what is SyncTeX and what does it do exactly and/or point to some general purpose documentation?


I've been trying to figure out how to start an application after Debian (Wheezy) is done booting up and on an LXDE desktop session. It is a mono C# application. The script I have is simply  mono /home/myapp/myapp.exe   I then added this script to init.d and from there did update-rc.d add myapp. This did not work because it would return  (myapp:4820): Gtk-WARNING **: cannot open display:   As apparently not everything is yet set up to be able to use a GTK application. This is why I'd like to start the application AFTER everything has been set up. I've also tried adding it to crontab (-e) by adding this line:  @reboot /etc/init.d/myapp.sh   I've also added   #! /bin/sh ### BEGIN INIT INFO # Provides: beheertool # Should-Start: console-screen dbus network-manager # Required-Start: $all # Required-Stop: $remote_fs  # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start beheertool ### END INIT INFO #   To the original script to perhaps make it launch later (with the Required-start: $all part).  None of these have worked, any help would greatly be appreciated.  EDIT 1: The application is a C# Mono application that uses GTK-sharp.  The environment itself boots to a GUI (LXDE) without requiring login. When normally running the application outside of the boot script X seems to be running (when checked with pidof X). Adding /usr/bin/startX to the script changed nothing, however.

I am using Ubuntu 14.04. I wrote a small script named trial. The contents of the script are as follows:   #!/bin/sh SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin      sh -c firefox   I copied the script to /etc/init.d, modified permission using chmod +x trial and used update-rc.d trial defaults. The file made link but when I rebooted the machine. It did not run firefox. I tried cron @reboot but with no success. I tried rc.local too again failure.


private static double convertCentimeterToInches(double d) {     double feetPart = 0;     double inchesPart = 0;     if (String.valueOf(d) != null && !String.valueOf(d).trim().isEmpty()) {         feetPart = Math.floor(convertCentimeterToInches(d) / 12);         inchesPart = Math.ceil(convertCentimeterToInches(d) - (feetPart * 12));     }     return inchesPart; }     06 - 01 02: 25: 08.037: E / XXX(1099): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java: 352)  06 - 01 02: 25: 08.037: E / XXX(1099): at java.util.concurrent.FutureTask.setException(FutureTask.java: 219)  06 - 01 02: 25: 08.037: E / XXX(1099): at java.util.concurrent.FutureTask.run(FutureTask.java: 239)  06 - 01 02: 25: 08.037: E / XXX(1099): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java: 230) 06 - 01 02: 25: 08.037: E / XXX(1099): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1080)  06 - 01 02: 25: 08.037: E / XXX(1099): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 573)  06 - 01 02: 25: 08.037: E / XXX(1099): at java.lang.Thread.run(Thread.java: 856)  06 - 01 02: 25: 08.037: E / XXX(1099): Caused by: java.lang.StackOverflowError  06 - 01 02: 25: 08.037: E / XXX(1099): at java.lang.RealToString.longDigitGenerator(RealToString.java: 269)  06 - 01 02: 25: 08.037: E / XXX(1099): at java.lang.RealToString.convertDouble(RealToString.java: 111)  06 - 01 02: 25: 08.037: E / XXX(1099): at java.lang.RealToString.doubleToString(RealToString.java: 59)  06 - 01 02: 25: 08.037: E / XXX(1099): at java.lang.Double.toString(Double.java: 317)  06 - 01 02: 25: 08.037: E / XXX(1099): at java.lang.String.valueOf(String.java: 1625)   I am just thinking on why its throwing stackoverflow error, when everything seems to be perfect in double. There is no conversion happening from double to int or float which could result in stackoverflow.

What is a StackOverflowError, what causes it, and how should I deal with them?


Email that I enter in TextField in this section of code is exactly equal to the email in one of the accounts in the array list, but every no has is true. Where is the problem??   boolean has = false;             for (Account value : accounts) {                 if (value.email == email.getText().trim() && value.password == password.getText().trim()) {                     has = true;                 }             }

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


I created these .tpl.php file for two node:  html--node__39.tpl.php html--node__14.tpl.php  Question: can I create just one file for both node?, something like:  html--node__39&&14.tpl.php

In my Drupal7, I have same piece of code in tpl.php files for two different nodes. My tpl.php files are following:  page--node--9.tpl.php page--node--11.tpl.php   Since code is same for both pages, it is possible to create a tpl.php file for both nodes? I mean something like   page--node--9and11.tpl.php


I was asked to prove that an infinite series $$\sum_{n=1} ^\infty \frac{(-1)^n}{n}$$ is a convergent series.  I tried using ratio test but the limit results in 1 which is inconclusive.  I am stuck at this point.  Can you give me some hint on how to approach this question?  Thank you  edit : My professor only taught ratio test, root test and comparison test where if $|b_i| \leq a_i$ for all i = 1, 2, ... and $\sum a_i$ converges then the sum of $b_i$ converges absolutely. Is there any way other than alternating series test to prove this problem?

$$ \sum_{i=0}^\infty \frac{(-1)^n}{n} $$  This alternating series fails the p-series test because the exponent of n = 1.  Yet it seems to pass the alternating series test.   1 - $a_n$ must be positive. True.  2 - Terms must be decreasing. $\frac{d}{dn} 1/n = -n^{-2}$, which is < 1. True.  3 - $ \lim_{n\rightarrow\infty} 1/n = 0  $ True.  $(-1)^n/n$ is clearly a divergent series, so why does it pass the AST?


When I migrated my jdk from jdk_8u261 to jdk11.0.11, the performance of String concat speed has dropped dramatically. For example, with the following code, jdk_8u261 spends about 1ms , jdk11.0.11 spends about 500ms. I realize that jdk11 make some optimization with String concatenation, such as StringConcatFactory and some concatenation strategy. I don't see why it is worser than jdk8 in my case. Here is the demo:     // alphabet concat test     String a = "a";String b = "b";String c = "c";String d = "d";String e = "e";     String f = "f";String g = "g";String h = "h";String i = "i";String j = "j";     String k = "k";String l = "l";String m = "m";String n = "n";String o = "o";     String p = "p";String q = "q";String r = "r";String s = "s";String t = "t";     String u = "u";String v = "v";String w = "w";String x = "x";String y = "y";     String z = "z";       long t1 = System.currentTimeMillis();     String str1 = a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p                     + q + r + s + t + u + v + w + x + y + z;     System.out.println(System.currentTimeMillis() - t1);

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


I am a beginner in Java, recently faced such an interview question on Java String concept:  public class Test1 {      public static void changeStr(String str){         str="welcome";     }      public static void main(String[] args) {         String str="1234";         changeStr(str);         System.out.println(str);      } }   I think the output should be "welcome", however, I tested it in Eclipse, it showed "1234", isn't Java string is a reference, so the Java string "str" references gets changed to "welcome" in method changeStr?  Pardon me for the beginner question!

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


When running biber I get this error. Anybody knows what causes this?  INFO - This is Biber 1.9 INFO - Logfile is 'root.tex.blg' read_file '/var/folders/6_/m4ps2q251c971g6s42g04j9h0000gn/T/par-727564666164656e/cache-a3cdad92316c60c9c5179d80d6bb51a7a024393c//inc/lib/Biber/LaTeX/recode_data.xml' - sysopen: No such file or directory at /var/folders/6_/m4ps2q251c971g6s42g04j9h0000gn/T/par-727564666164656e/cache-a3cdad92316c60c9c5179d80d6bb51a7a024393c/bda77484.pm line 112.

I'm trying to use biblatex and when I compile my document I get an error like the following:  Windows  data source C:\Users\<username>\AppData\Local\Temp\par-5061756c\ cache-890efc00b3ca6b775c7d44a325c1349fb2a3a3bd\inc\lib/Biber/LaTeX/recode_data.xml not found in .   Mac  data source /var/folders/v2/rld0ls7d2935gkvqv5hfr1x00000gn/T/par-616c616e/ cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/LaTeX/recode_data.xml not found in .   Linux  data source /tmp/par-6963617269756d/cache-f37ab610b7d79b2720a8ee3732849c6821705520 /inc/lib/Biber/LaTeX/recode_data.xml not found in .


I have to train a convolutional network. When I visualize its conv filter matrices from a layer, many filters are quite similar, almost equal.  1) Don't you know a common way to detect couples of similar kernels? Maybe, it is somehow connected with their correlation?  2) Don't you know any good strategies to deal with such duplicate kernels? My only offer is to re-initialize such duplicate with noise and continue the training, but I don't think it is the best idea.

Based from what I have learned, we use multiple filters in a Conv Layer of a CNN to learn different feature detectors. But since these filters are applied similarly (i.e. slided and multiplied to regions of the input), wouldn't they just learn the same parameters during training? Hence the use of multiple filters would be redundant?


I'm creating a prime number finding script, and I want to print what number is currently active.  def is_divisible(number: int, dividor: int) -> bool:     float_number = number / dividor     if float_number.is_integer():         return True     return False   def is_prime(number: int) -> bool:     """         Returns a bool, whether the a number is a prime.     :param number: number     :return: bool (True if it is a prime, False if it's not a prime)     """     tmp_numbers = set()      for i in range(2, number):         if any(is_divisible(i, n) for n in tmp_numbers):             continue          if is_divisible(number, i):             return False          tmp_numbers.add(i)      return True   number = 99999999 for i in range(2, 90000):     print("checking {}".format(i), end="\r")     if is_prime(i) and is_prime(i + 4) and is_prime(i + 8):         print(i)   When I terminate the script, I can see that line ("checking ...") but while it's executing I can't see it.

On Unix, I can either use \r (carriage return) or \b (backspace) to overwrite the current line (print over text already visible) in the shell.  Can I achieve the same effect in a Windows command line from a Python script?  I tried the curses module but it doesn't seem to be available on Windows.


I was always using interfgaces similarly to abstract classes - just to make sure all objects will have consistent external methods etc.  But from MSDN, I do not get that:  interface ISampleInterface {     void SampleMethod(); }  class ImplementationClass : ISampleInterface {     // Explicit interface member implementation:       void ISampleInterface.SampleMethod()     {         // Method implementation.     }      static void Main()     {         // Declare an interface instance.         ISampleInterface obj = new ImplementationClass();          // Call the member.         obj.SampleMethod();     } }   Why there is explicitly mentioned interface name in the method declaration and why it does not work without it? Also why is the interface being instantionated, shouldn't be just instance of class implementing it?

What are the differences in implementing interfaces implicitly and explicitly in C#?  When should you use implicit and when should you use explicit?  Are there any pros and/or cons to one or the other?    Microsoft's official guidelines (from first edition ) states that using explicit implementations are not recommended, since it gives the code unexpected behaviour.  I think this guideline is very valid in a pre-IoC-time, when you don't pass things around as interfaces.  Could anyone touch on that aspect as well?


In my /etc/hosts file, I have two lines:  127.0.0.1 localhost 127.0.1.1 hostname   What is the difference between the two lines, where do I find the host name?

This may be a bit of a noobish question, but I was taking a look at /etc/hosts on my new Xubuntu install and saw this:  127.0.0.1 localhost 127.0.1.1 myhostname   On most 'nixes I've used, the second line is omitted, and if I want to add my hostname to the hosts file, I'd just do this:  127.0.0.1 localhost myhostname   Is there a difference between these two files in any practical sense?


Just a wild idea of mine, can I reuse ER mask if I'm blasting it in the microwave to kill coronavirus or anything else on it? Will this disinfect the mask if there is anything on it, this is so I'll be able to use it again...

Please forgive the obvious question.   H2O2 vapor sterilization is deadly for the layperson but should be workable for hospitals. I can't find the small Chinese study I read the other day about it. Here are two more quickly googled sources.        2.


I don't know how this phenomenon is called.  Simply put, I can either put the noun to the end and place it's properties before, or I can use "of". What is the difference, is some form more formal and suitable for academic writing?

I would be very grateful for some advice on how to decide whether to use an attributive noun or the "of genitive" (periphrastic genitive).  It seems to me that an attributive noun is generally preferable, except when it leads to ambiguity, often due to the combination of several modifiers with mixed dependent relationships.  Additionally, the of-genitive, when used stand-alone, seems to impart a more formal tone, a higher register.  Simple examples (preferred first, less-preferred second):  The department secretary vs. the secretary of the department.  But:  The excellent secretary of the department vs. the excellent department secretary.  Any additional guidelines would be most welcome.


I've checked the question archive and can't find an exact answer to the following. I have just installed Ubuntu on a new PC.   While I'm fairly proficient in lumbering about in MSs operating console, obviously the Unix environment is quite different.  I need to run a command but when I su - to the root I am prompted for the password for permission to do so. This is the odd bit. When i enter the correct log on password it is rejected and I am returned to the same prompt from where I entered the su etc from. This is despite the password being the one that SUCCESSFULLY authorizes other system changes (such as installing new software like a virus checker etc). I can't get my head around this. It's the same password I created when setting up the system and, as advised, it allows root access in other ways, just not through the su - command.   Anyone help?   I have another question about mounting a volume but I won't ask that until I get this right as I will need to get to root to issue the command I suspect is needed to get this other matter sorted. Thanks in advance.  Peter

I've downloaded a driver for a video card (*.run) and tried to install within a terminal. When I started the installation process I got this error: ERROR: nvidia-installer must be run as root. I'm logged in with my own profile.


GIS is not my field. I need this data for an odd job at work. I have been unsuccessful in finding the data from Google FusionTables but found (what I believe to be) the shapefile for MSA's from the US Census on the  Is there an easy way to convert this file to KML polygon data? I have tried QGIS but it seems to throw an error when I save the Layer as a KML file type. Alternatively, is there any place I can simply find this polygon data? Here is the error text I receive from the QGIS: "Export to vector file failed. Error: creation of data source failed (OGR error:Failed to create KML file polygon_data.kml.)"  @mtn.biker successfully created the file for me and outlined their process in the comment below if anyone else runs into this issue.

I've downloaded a map from  (limited to San Francisco census tracts), and I'd like to convert it to KML format. However, after unzipping the shapefile .zip file and running  $ ogr2ogr -f KML pop_by_census_tract.kml 140_00.shp   I get the following error message:  ERROR 6: No translation for Mercator_Auxiliary_Sphere to PROJ.4 format is known. Warning 1: Failed to create coordinate transformation between the input coordinate system and WGS84.  This may be because they are not transformable, or because projection services (PROJ.4 DLL/.so) could not be loaded. KML geometries may not render correctly. This message will not be issued any more.   Source: PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",     GEOGCS["GCS_WGS_1984",         DATUM["WGS_1984",             SPHEROID["WGS_1984",6378137.0,298.257223563]],         PRIMEM["Greenwich",0.0],         UNIT["Degree",0.0174532925199433]],     PROJECTION["Mercator_Auxiliary_Sphere"],     PARAMETER["False_Easting",0.0],     PARAMETER["False_Northing",0.0],     PARAMETER["Central_Meridian",0.0],     PARAMETER["Standard_Parallel_1",0.0],     PARAMETER["Auxiliary_Sphere_Type",0.0],     UNIT["Meter",1.0]]  ERROR 1: Latitude 4553026.920500 is invalid. Valid range is [-90,90]. This warning will not be issued any more Warning 1: Longitude -13627851.842700 has been modified to fit into range [-180,180]. This warning will not be issued any more   When I open the resulting KML file in Google Earth, I get randomly scattered lines across the entire planet. The example at code.google.com/apis/kml/articles/vector.html works fine, so the installation of GDAL (1.8.0 from macports) isn't totally broken.   seems related, but I'm not sure if it's saying that Mercator_Auxiliary_Sphere is just not supported by GDAL, or if it's implying I should pass another command line option to make it work.    I wound up accomplishing my goal by downloading , which contains shapefiles that ogr2ogr and shp2pgsql can understand, and joining it with the pure table data from factfinder2. I'm still curious about the format factfinder2 is using, but it's no longer blocking progress for me.


I want to Arrange the following growth rates in increasing order  This order are following : O((35)^n),O(n^4),O(1),O(n^3 logn) Please give me idea how to arrange growth rates in increasing order

I want to Arrange the following growth rates in increasing order  This order are following : $O (n (\log n)^2), O ((35)^n), O(35n^2 + 11), O(1), O(n \log n)$  Please give me idea how to arrange growth rates in increasing order  Regards, Jatin


Whenever I post a question (usually on Stack Overflow), I almost always get a downvote within the first few minutes of it being posted. I try my best to follow all the rules, search before posting, and correct formatting of the post, but when I ask for help, now I am greeted with the "Careful what you post, you might be banned" message because 2 or 3 of my questions have 1 downvote on them.   I think users should be required to provide a reason, or at the very least a comment describing why that they think the content shouldn't be on Stack Overflow and/or isn't useful. This would help encourage new users like me to contribute content that could help, rather than hold back in fear of getting post banned.

Note: If you're looking for a simple explanation as to why comments aren't required on downvotes, see .   I used to get "upset" (though that is too strong a term) when I got downvoted without comment. If my answer isn't good enough then I'd like to know why. Not only does it improve the answer for the OP but it improves my knowledge too.  Where the down-vote has been explained I've found it useful & it has improved my answer, or forced me to delete the answer if it was totally wrong.  So is there any way we can encourage people to leave a comment? Perhaps they don't lose rep if they explain their down-vote?  I must admit though that I haven't always explained my down-vote either so you could call me a hypocrite. I've also grown a thicker skin over the months of using SO (it seems to have come with the higher rep score ;-)), so I'm less bothered about this now.


I am trying to produce a DEM for my dissertation (i'm relatively new to ArcGIS) so that I can conduct hydrological analyses of catchments. I have downloaded LIDAR (.laz 2x2 km) data and have created a las dataset. It is my understanding that I now need to make this into a terrain dataset to analyse the data. I have made a feature dataset and have imported LIDAR ground points into a multipoint feature class. However, I do not know what to do next. I have read that adding breaklines is important and that there is more preprocessing I need to do.I have catchments that are separate to each other so I believe I may need to merge them. I am looking for help as to what processes I need to execute to have a data set upon which I can use the hydrology toolbox to carry out accurate analysis.

I was wondering if there is an option to convert LiDAR data (.las) to a  (DEM/DSM) format that ArcGIS 10.0 can read?


I'm new to Perl and is working with regular expressions. I am not able to decide how Perl resolves the ambiguity for a regex match when multiple matches are possible for a given query string. For example   ('hellohellohello' =~ m/h.*o/)   This could match 'hello', 'hellohello' or 'hellohellohello'. Which one will it choose - shortest or largest match ? What if we want opposite behavior (like if default is to find the shortest match then finding the largest match) ? In case the answer to the first is largest consider  ('hello    hellohello' =~ m/h.*o/)  Here, it could match from the first line (before the newline character) or the second line (after the newline character) - first vs largest match. Which one will it use ?   What are the complete set of rules that can be used to decide which substring of a string would match a given regex (might be some case other than the one mentioned in the examples where multiple matches could be found) ?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


According to the conservation of momentum and kinetic energy, in a perfectly elastic collision,  $m_{1i}v_{1i}+m_{2i}v_{2i}=m_{1f}v_{1f}+m_{2f}v_{2f}$ $ \frac{1}2 m_{1i}v_{1i}^2 + \frac{1}2 m_{2i}v_{2i}^2 = \frac{1}2 m_{1f}v_{1f}^2 + \frac{1}2 m_{2f} v_{2f}^2$  The momentum of the rubber ball: $$m_{1}v_{1i}=m_{1}v_{1f}+m_{2}v_{2f}$$ As a rule, in terms of kinetic energy $$\frac{1}2m_{1}v_{1i}^2 = \frac{1}2m_{1}v_{1f}^2 + \frac{1}2m_{2}v_{2f}^2$$ As the ball bounces back and the door moves forwards, why is there more kinetic energy in the system? as in an elastic collision $(-v)^2=v^2$, so while in momentum: $$m_{1i}v_{1i}=m_{1f}(-v_{1i})+m_{2f}v_{2f}$$ $$2*m_{1i}v_{1i}=m_{2f}v_{2f}$$ in terms of the energy: $$\frac{1}2m_{1i}v_{1i}^2 = \frac{1}2m_{1f}v_{1i}^2 + \frac{1}2m_{2f}v_{2f}^2$$ $$0 = \frac{1}2m_{2f}v_{2f}^2$$ Am i missing a step? (This is collision between 2 dynamic objects rather than a dynamic and fixed object)

Is momentum conserved when an object bounces back against a wall? The wall doesn’t move, but the object moves in the opposite direction. Assume this is an ideal, elastic collision.  If, initially, the momentum of the system came from the ball, and after the collision, the momentum of the system was also from the ball, but in opposite directions, then momentum would not have been conserved?   I have a feeling this is wrong, so anybody clarify this for me?


In terms of post production I need to measure the exact distance from the camera sensor to several objects on the set.  Where I can find specifications to determine the sensor position of a canon 600D?

Once you know the MFD (minimum focus distance) for a particular lens, is that the distance from the subject to the front of the lens or to the camera sensor?


I just came over this question migrated from Stack Overflow to Code Review:    None of the posters is member of the SE Code Review community. Both question and answer are upvoted.  How would the rep gain be handled?  If one or both decide to join the community would they achieve the reputation points?

When a question is migrated, is the reputation earned by its author on the original site subtracted from the author's total? What about votes? Badges? Do the same rules apply to the question's answers?


I need to save the user agent of a visiting user.  This is my snippet:  // User Agent $ua = $_SERVER['HTTP_USER_AGENT']??''; $ua_md5 = md5($ua); // Search if the UA already exists in the user_agents table $ua_id = $db->query("SELECT id FROM user_agents WHERE md5='".$ua_md5."';")->fetchColumn();  if(!$ua_id) {     // If it doesn't exist, insert it and get its id     $db->query("INSERT INTO user_agents (md5, user_agent) VALUES ('$ua_md5', ".$db->quote($ua).")");     $ua_id = $db->lastInsertId(); }   I use PDO:quote instead of prepared statements only for performance reasons (it's faster and this script runs thousands of times per second).  It happens that some users has this user agent:     Mozilla/5.0 (Linux; Android 5.0; \xD6wn Smart Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile Safari/537.36   And the insert fails for this error:     "PHP message: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xD6wn Sm...' for column 'user_agent' at row 1" while reading response header from upstream   What is the reason and how can it be fixed?    Edit: more debugging found out the $ua value is:     Mozilla/5.0 (Linux; Android 5.0; ÖWN S1 Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile Safari/537.36

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


I have a very basic question about the termination resistor of the CAN Bus. I know that a termination resistor is needed in order to avoid unwanted reflections. Since the characteristic impedance of a loseless line is defined as $$Z=\frac{L'}{C'}$$ and the inductance as well as the capacitance is depending on length, I am asking myself why the termination resistor of CAN is always recommended to be 120 Ω. Shouldn't it vary for Highspeed- and Lowspeed-CAN?

I know the reasons for using terminating resistors on a  and how important it is.  But why 120 ohm? How did this value come up? Is there any specific reason to use 120 ohm?


There is one line of C++ code shown below. return ::as_Register(value() >> 1);  I just want to know what's the meaning of the '::' which has nothing before it. Is it the C++ syntax? Can there be nothing before '::'? Such as return ::myMalloc(size)? The code is from jdk8 openjdk/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp. I am deeply studying the JDK.

In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:  ::foo();


$$\frac {\sin x}{1-\cos x} = \frac {1+\cos x}{\sin x}$$ The only way I can see of doing this is by cross multiplying but isn't that not allowed when trying to prove something?

I'm doing some math exercises but I got stuck on this problem.  In the book of Bogoslavov Vene it says to prove that:  $$\frac{\sin x}{1-\cos x} = \frac{1+\cos x}{\sin x}.$$  It is easy if we do it like this: $\sin^2 x = (1-\cos x)(1+\cos x)=1-\cos^2 x$. But how to prove it just by going from the left part or from the right  Can anybody help me?  Thank you!


Can anybody tell how to completely clean up your desktop computer from QGIS files ( Windows Registry, user folders and program folders)?  It's for QGIS version 2.4 and 2.10.  'Ok' and 'cancel' buttons are missing from dialog boxes in QGIS project, and despite uninstalling QGIS the same error appear when installing new version, even 2.8.5 (Long term release).  Therefore a complete clean up of QGIS is needed.

I want to uninstall and completely remove QGIS installation from my computer(windows vista). I have uninstalled it and when i try to reinstall it says it is already installed on the system.


I found  that describes the fate of Darth Maul after his last appearance in the Clone Wars cartoons. It claims to be canon, although no source is cited, and I cannot be sure if the video title is the name of the source.   Can someone verify for me whether this really is what it says it is, and whether it's genuinely part of the Star Wars canon?

For all types of derivative works, namely:   Movies Novels Comic books Other written works (including RPG materials) Cartoons Video games Derivative movies (such as the infamous Ewok movies and even more infamous )   According to what rules does something become "canon" and who is responsible for the evaluation of a published work?


I want a custom command named something like "ServerStart" or something which is a combination of two commands, one after the other.   The first command would be cd .Server The second being java -Xmx7168M -Xms7168M -jar server.jar   How do I do this so this becomes one Terminal command?

I have the following commands.  cd import zcat urls1.sql.gz | mysql -u root -p urls cd /var/www/project1/ nano 1.php   As of now I'm executing it one by one.  Is there a way to combine those commands in one line?


I'm confused how do i can justifying to my students the difference between the two Notation “$\log x$” and “$\ln x$” however i checked the definition  in wikipedia. Really many people understand that the notation “$\log x$” must be the decimal logarithm (base $10$). But what I think is $\log x$ can be written as $\log_{e}x$ which is $\ln x $. The difference occurs only when I put the base $a$ as $\log_{a}x$ different from $e$.  My question here is:     Should the notation  “$\log x$” mean the decimal logarithm and how can I give the correct notation with the correct definition to my students?   Thank you for any help

Which one is more preferable to write when you are writing an exam. Is it $\log(x)$ which denotes the natural logarithm or is it $\ln(x).$