I've been studying the postulates of QM and seeing how to derive important ideas from them. One thing that I haven't been able to derive from them, however, is the identity of the momentum operator.  For simplicity, I'm only thinking about no relativistic effects, no spin, no time-dependent potentials, and one spatial dimension. Also I'm assuming the position operator is simply multiplication by $x$, as in, I'm in position space. So the Hamiltonian operator is  $ H = -\frac{\hbar^2}{2m}\nabla^2+V$.  I know that the momentum operator is $p = -i\hbar \frac{\partial}{\partial x}$.  But how do I get there from the postulates? I know that it makes sense, as it results in the Ehrenfest Theorem, the De Broglie wavelength hypothesis, the Heisenberg Uncertainty Principle (for $x$ and $p$), the momentum operator being the generator of the translation operator, and possibly many other desirable theorems, and correlations with classical momentum.  But none of these are postulates (at least, not in the various formalisms I encountered), so you can't derive $p = -i\hbar \frac{\partial}{\partial x}$ from them. Rather, they are consequences of it. You need to know the operator beforehand to see that they are correct. Yes, this is just semantics, but that is the core issue for me:  Regardless of how much sense it makes, is the identity $p = -i\hbar \frac{\partial}{\partial x}$ (under the assumptions I made) a Postulate, meaning that you can't derive it from other postulates, or can it in fact be obtained from them? And in the latter case, could you show me how?  Note: I know that there are many different and equivalent sets of postulates for QM. But in none that I saw did they name it as a postulate nor properly derived it.


Where do I put custom packages in a directory structure for a large document?

I am writing a large document (thesis proposal) that I would like to break into separate files, with the following directory structure:  . |-- ch/ |   |-- chapter1.tex |   |-- chapter2.tex |   |-- somemacros.sty |   |-- moremacros.sty | |-- main.tex   The main.tex file calls \usepackage{ch/somemacros}, which in turn requires the moremacros package.  Unfortunately, compiling this will fail to find ./moremacros.sty because it simply doesn't exist there.  I hesitate to hard code the directory structure into the packages, since some of these macros are written for use outside of this particular document (e.g., subject-specific mathematical notation).  But i also hesitate to develop these macros in a separate VCS repository, since I'm developing them as needed while writing the proposal document.  How can I handle this problem?  Is there a solution that meets my constraints? Also feel free to (try to) convince me that these constraints are unnecessary (e.g., "use a better directory structure", "use a separate repository", etc.).


Possible Duplicate:          I wanted to know if it was possible to define a new command with a name that contains numbers?  e.g. \newcommand{\agent1}{agent~1}  Or even \ag1ent if having a number at the end is problematic.  I couldn't find the answer in the FAQ.


How did Ron's Ford Anglia cross the barrier between Wizarding World & Muggle World in HP Chamber of Secrets?

In Harry Potter & The Chamber Of Secrets, when Harry and Ron fail to cross the 9&3/4 barrier, they use their flying Ford Anglia instead to fly to Hogwarts.   It is implied that there is some sort of barrier between the Muggle World and Wizarding World (at least the Hogwarts Express platform).   But it is unclear how they bypassed that barrier while flying using the Anglia. Has there been a canon explanation to this?   And how exactly did Ron know the route to Hogwarts and the train route of the Hogwarts Express (they cross their paths with Hogwarts Express in the movie) ?


call different functions for list elements

Have a list with numeric strings, like so:  numbers = ['1.2', '5.6', '1'];   Would like to convert first two list elements to float, and last element to int:  numbers = [1.2, 5.6, 1];   Is there any one liner/elegant way of doing?  currently I'm doing with:   numbers = [ float(x) for x in numbers ] numbers[-1] = int(numbers[-1])   or  functions = [float, float, int] results = [func(arg) for func, arg in zip(functions, numbers)]


How do I /give a Banner with a custom name in Minecraft Bedrock?

I am attempting to give a Banner object with a custom name of 'Keycard2'. The command I'm using is: /give @p banner 1 11 {display:{Name:"Keycard2"}}   The error I'm getting is:  Line 1, Column 2 Missing '}' or object member name  What am I doing wrong? Bear in mind that this is Bedrock edition, but as far as I can tell this command should work.


Why does Property Set throw StackOverflow exception?

I know java and would normally put in getter/setter methods. I am interested in doing it in C# with the following code, but it throws a StackOverflow exception. What am I doing wrong?  Calling Code  c.firstName = "a";   Property Code    public String firstName; {     get     {         return firstName;     }     set     {         firstName = value;     } }


Evaluate limits of trigonometric equation

Evaluate the limit  $$\lim_{x\to0} \frac{\sin x+\sin3x+\sin5x}{\sin2x+\sin4x+\sin6x}$$  I have tried expanding out the equation but it gets really long and tedious.  Is there a better way to solve this question?


I have setup one computer on our network as the file server. Because Internet here in Tanzania is both slow and expensive I would like that one system to download all the updates and then the other 10 computers on the network to get those update files from the server. I'm a bit of a noobie to Ubuntu, but really want to learn how to get this working smoothly so as to help other NGOs and schools here in Tanzania. Brendon


My problem relates to the "and graduation" part of the title below and would like more space between the two lines in the title. I'm using a template, could it be that that the "vertical space" between the lines was set in the thesis.cls file? If there is a quick/easy 'hack' to put in the preamble, that would also be appreciated.    My code is as follows:  \documentclass[a4paper, 11pt, oneside]{thesis} \begin{document} \frontmatter      \begin{titlepage} \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}  \center    %--------------------------------------------------------------------------------------- - %   HEADING SECTIONS %---------------------------------------------------------------------------------------- \begin{center} %\includegraphics{UCT} \end{center} \textsc{\LARGE University of Cape Town} \leavevmode \\[1.5cm]   %---------------------------------------------------------------------------------------- %   TITLE SECTION %----------------------------------------------------------------------------------------  \HRule \\[0.5cm] { \huge \bfseries The Determinants of Student Retention and Graduation}\\[0.4cm] \HRule \\[1.5cm]  %---------------------------------------------------------------------------------------- %   AUTHOR SECTION %----------------------------------------------------------------------------------------  \noindent \begin{minipage}{0.3\textwidth} \begin{flushleft}  \large \emph{Author:}\\ Christopher \textsc{Rooney}\\ % Your name \href{mailto:chris.rooney1@gmail.com}{chris.rooney1@gmail.com} \end{flushleft} \end{minipage} \hspace{\fill} \begin{minipage}{0.5\textwidth} \begin{flushright}  \large \emph{Supervisor:} \\ Dr.\ Corn{\'e} \textsc{Van Walbeek}\\ %Supervisor's Name \href{mailto:Cwalbeek@gmail.com}{Cwalbeek@gmail.com} \end{flushright} \end{minipage} \\ [2cm] \begin{center}   {\large A thesis submitted in partial fulfillment for the\par}   {\large degree of Masters in Applied Economics (Development Stream) \par}         \bigskip         \bigskip         \bigskip         \bigskip %---------------------------------------------------------------------------------------- %   DATE SECTION %----------------------------------------------------------------------------------------  {\Large \today \par}  %----------------------------------------------------------------------------------------  \vfill % Fill the rest of the page with whitespace \end{titlepage} \end{document}


Let Q be the group of quaternions. Show that Aut(Q) is isomorphic to S4.  Any help here would be really appreciated!  (Also, sorry, I'm new, so I'm not really sure about how posting on here works.)


Problem with Subdivision Surface after Bevel

Creating a very simple figure out of plane with Bevel modifier following by Subdivision Surface resulted in weird geometry. Steps how to reproduce the problem:  I've used a mesh plane, squished z-axis and applied scale, then added 4 loop cuts, then moved middle part with G or move tool, afterwards added modifiers and used shade smooth.  Normals weren't changed, all geometry is same as before, no n-gons were created. Why this might happen? Simple plane with 4 loop cuts  Bevel settings  Subdiv settings  normals


I'm using Terminator version 0.97. Is there a way that I can scroll unlimited? In the current version I only can scroll back limited history


Proof for $A,B \in M_n(\mathbb{F})$ that if $[A,B]=tA$ for $0\neq t\in\mathbb{F}$, then $A^n=0$

Statement. Suppose we have a square matrices $A,B$ of order $n$ over a field $\mathbb{F}$ of characteristics $0$ or $p>n$. If $[A,B]=AB-BA=tA$ for some nonzero $t\in\mathbb{F}$, then $A^n=0$. The problem is to prove this statement.  Where I've got so far. There is an idea to take trace of both sides of equation: $$ \mathrm{tr}\,(AB-BA)=\mathrm{tr}\,(tA) $$ $$ \mathrm{tr}\,(AB)-\mathrm{tr}\,(BA)=t\times\mathrm{tr}\,(A) $$ since $\mathrm{tr}\,(AB) = \mathrm{tr}\,(BA)$ (by properties of the trace) we have $$ t\times A = \mathrm{tr}\,(A) $$ and since $t\neq 0$, we have $\mathrm{tr}\,(A) = 0$. That's all I could get form it. What sould I do next?


Array Count of repeating variable with integer output in ruby

I am new to ruby and this might be a simple solution but i can't seem to figure out how to output the number of the most frequency occurrence in the array. Assume that animals is an array of strings. Write a set of Ruby statements that reports to output how many times the word “cat” appears in the array. For example, if the array animals has the contents of [“cat”, “dog”, “cat”, “cat”, “cow”], your script should write out the number 3.  Here is what i have so far, which gives me an output of cat but i want to just show how many times it repeats. Thanks!  array = [ "cat", "dog", "cat", "cat", "cow" ] repeat_item = array.uniq.max_by{ |i| array.count( i ) } puts repeat_item


How to reference an object of array to an object

I've been studying Java on my own. I've had this problem which I tried to debug for days but to no avail.  How do I reference grades[0] to lab.score(60) so I can use it in my toString method? I'm trying to assign the score number to lab and references to grade[0] so that I can use it in the main as shown in my code below but all I get is this error:   Exception in thread "main" java.lang.NullPointerException     at CourseGrades.toString(CourseGrades.java:35)     at java.lang.String.valueOf(Unknown Source)     at java.lang.StringBuilder.append(Unknown Source)     at CourseGrades.main(CourseGrades.java:58)    My Code:  import java.util.Scanner;  public class CourseGrades {     private GradedActivity grades[] = new GradedActivity[3];      public void setLab(GradedActivity lab)     {         lab = new GradedActivity();         lab.setScore(60);         grades[0] = lab;      }     public void setPassFailExam(PassFailExam passfailexam)     {         passfailexam = new PassFailExam(10,6,70);         grades[1] = passfailexam;     }     public void setEssay(Essay  essay)     {         essay = new Essay(80);         grades[2]= essay;     }     public void setFinalExam(FinalExam finalexam)     {         finalexam = new FinalExam(50,4);         grades[3] = finalexam;     }     public String toString()     {         String str = "Lab Score: "  + grades[0].getScore() +                      "\tGrade: "  +                      "\nPass/Fail Exam Score: "  +                      "\tGrade: "  +                      "\nEssay Score: "  +                      "\tGrade: "  +                      "\nFinal Exam Score: "  +                      "\tGrade: " ;         return str;     }      public static void main(String[] args)     {         CourseGrades kk = new CourseGrades();         String st = kk + "testing";         System.out.println(st);     }  public class GradedActivity {     private double score;      public void setScore(double s)     {         score = s;     }      public double getScore()     {         return score;     }      public char getGrade()     {         char letterGrade;          if (score >=90)             letterGrade ='A';         else if (score>=80)             letterGrade ='B';         else if (score >=70)             letterGrade ='C';         else if (score >=60)            letterGrade = 'D';         else              letterGrade = 'F';          return letterGrade;     } }


Bicycle Pump: Dual (Schraeder/Presta) automatic valve stuck

I got a pump with an head like this, and I use both the presta and the schraeder opening. The problem is that the automatic switching does not seem to work as well as it once did. It is pretty random where the air comes out, and most of the time it involves a lot of shaking and cursing before I can get my tires pumped up.  Can I fix this somehow? The pump was not cheap, and I would like to avoid getting a new one, though the hassle of getting air out of the correct hole is annoyinng.  This question is about a Pump Head, where the mechanism does work (air only comes out of one hole), but switches pretty randomly.   I want to get an answer if there is a solution without replacing the head, else i would order a new pump head.


My Schengen visa was rejected in october 2018 stating:   Justification for the purpose and conditions of intended stay was not provided The information submitted regarding the justification for the purpose and conditions of intended stay was not reliable.   Kindly advise what went wrong. This was my first attempt for any visa application. I do not have any travel history and the reason I want to travel now is to redeem a travel voucher I was awarded by my employer.   So I do understand me not adding a cover letter was one of the biggest mistake. Secondly I think I submitted two bank statements...One is for my Salary transfer account where usually I do not maintain any balance and second was my savings account which I usually use for all my transactions.  So if I now attach the copy of travel voucher and cover letter and my salary account with a good balance and transactions for almost 4 months, will that help?


Maximum of sum of finite modulus of analytic function.

Let $f_1,f_2,\ldots,f_n $ be  analytic complex functions in domain $D$. and $f = \sum_{k=1}^n|f_k|$ is not constant.  Can I show the  maximum of $f$ only appears on boundary of $D\,$?


I am a working on designing a network for a new volunteer ambulance headquarters.  I am trying to decide if I should use Sub nets and how to group them. As of now the network load is going to be made up of, 36 IP based security cameras, around 20 ip phone extensions,  1 server that holds all the call report data, IP camera server, 7 work stations, 2 network printers, WIFI for 3 call  reporting devices to connect to the server, separate WIFI for public usage, access control doors and the HVAC system talks to all of the different parts over the network.


Assume for all finite $r>r_0$ that   $$\lim_{n\to\infty}\mathbb{P}(\mathcal{A}_{r,n})=0,$$   where $\mathcal{A}_{r,n}$ is an event on some random variables, and $n$ and $r$ are deterministic variables. How to prove the following?   $$\lim_{n,r\to\infty}\mathbb{P}(\mathcal{A}_{r,n})=0.$$   This is a part of a bigger problem. I need to prove the second equation but I have proved the first one. Is the second equation always true? If yes, how can I prove that?


AES-128/192 safer than AES-256 in practice?

Related-key attacks can break AES-192 and AES-256 with complexities 2^176 and 2^99.5, respectively.   Quote from:   It seems that more bits/key length doesn't necessarily mean more (confidence in) security (At least above a certain minimum key length).


get nullpointer exception in Main thread

in this program i wanted to load images in array of image in netbeans. the program works if i read a single picture. however when i used a loop to load the pictures, i get error exactly at "labelx.seticon(imageicon)". as you see i tested if the icons are null and got the message they are not null. any help will be apprciated. the error i got an error in main thread nullpointer exceptions.                  thanks   public class Image_array2 {      /**      * @param args the command line arguments      */    public Image_array2()     {         photo();     }     public static void main(String[] args) {         new Image_array2();         int g=5;         Image [] arrayimages = new Image[49];         System.out.println("gamal" + g);          // TODO code application logic here     }     public void photo()     {         //try{         ImageIcon myicon;         ImageIcon[] icons = new ImageIcon[3];         JFrame frame = new JFrame();         frame.setSize(900,900);         JLabel[] labelx = new JLabel[3];         JLabel mylabel = null;         Image image;           for(int i = 0 ; i<3;i++)          {              // image= new ImageIcon(this.getClass().getResource("src/image_array2/mycards/image"+i+".jpg")).getImage();          ////  Image img = new ImageIcon(this.getClass().getResource("src/image_array2/mycards/image22.jpg")).getImage();            //if(img == null)               // System.out.println(" it is nothting");           // else                //System.out.println("it is okay");           icons[i] = new ImageIcon("src/image_array2/mycards/image"+i+".jpg");          myicon = icons[i];          if(myicon == null)                System.out.println(" it is nothting");            else                System.out.println("it is okay");          labelx[i].setIcon(icons[i]);          //label[0].setIcon(icons[i]);         // mylabel.setIcon(myicon);         // frame.add(label[i]); }          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);          frame.setVisible(true);       //  } catch(IOException e) {} }     } }


Are there any side effects to Force Speed?

If Force Speed accelerates the body, does this mean that the body also ages faster when it's in use? Can it be used to increase one's metabolism and to heal minor wounds?


I normally use Thunderbird as my email client, but the other day I accidentally started up evolution.  Now the envelope icon in the indicator area contains information about both Thunderbird and Evolution. Since I'm not using Evolution, I tried to get rid of the Evolution information by uninstalling the evolution-indicator package, but this didn't help. I still have both Thunderbird and Evolution listed when I click the envelope icon. (And, yes, I did restart the computer.)  The /usr/share/indicators/messages/applications/ directory only contains Thunderbird and Empathy, not Evolution.  How do I get rid of the Evolution information?


I was hopeful someone could tell me if you can take elven accuracy twice. The wording doesn’t oppose it from happening, but I didn’t know what people thought.


Is there a specified length of time that a pc must wait before trying to perform the same action (due to a previously failed ability check)

For example, a rogue fails a roll attempting to unlock a prison cell.  All other pc party members fail on their respective rolls.  At that point, may the initial rogue try again or are the prisoners in the cells just stuck there?


How to adopt SD card as Internal Storage

I currently own a Samsung J3 emerge with Android version 6.0.1 (Marshmallow). However, I cannot format my AD card as Internal as I do not have that option. I cam only format it as portable. What must I do?


I have a page with several buttons(name SousMenu), all this buttons have onclick action.  Now I've create a main button to control all the button(idMenu). When the main button isn't checked, buttons aren't cheked.  if(document.getElementById(idMenu).checked == false) {       var x = document.getElementsByName(SousMenu);     var i;     for (i = 0; i < x.length; i++) {         x[i].checked = false;         x[i].onclick;     } }   Now I want to execute function for all buttons when the main button isn't checking, I've try something like x[i].onclick but it doesn't work..  Thanks for your help


How does a company earn money from going IPO and being on the stock exchange?

Please clarify if I understand the process of a company going IPO and selling shares on the stock market.  A company goes IPO, and starts of with selling 1 million shares on an exchange. Sets the price at $20 per share, so the value is $20m.  It keeps say 50% of the shares for employees, so 500K shares are sold on the market. They all get purchased, and now the share price is $40.  So the company got 500K shares times $20 share price or $10m in the bank from going IPO?  How do they continue to put cash in the bank from being on the stock market other than internal employee held shares being sold back to the public? (that is not even cash for the company)


How to prepare your PC or laptop for theft

Of course preventing them from getting stolen is the top priority, but invariably, someone is going to get jacked. What are some good practices to minimize the damage incurred when your PC is stolen?  Given most of our PCs contain our entire lives, its frightening to know that all this information can be in someone else's hands.   Some ideas i had (a bit paranoid, i admit).   keep encrypted backups.  Use truecrypt to have double encrypted (with strong password) volumes where you store your personal data. schedule Eraser to run every evening so that potential thieves couldn't undelete (and subsequently retrieve) sensitive data do all your banking in a virtual machine.  Keep the virtual machine volume encrypted, and on a portable usb drive that you carry with you / keep in a safe. have applications that phone home (or hit something to leave an IP trace) upon connection to the internet (can someone suggest a good solution for this?)   Does anyone have any other suggestions?


Is the switching workscreen still available on v14.04?

On the older versions I was able to switch from one of 4 screens in the work space. Is this not available in the new 14.04 version?


When should I open/close the windows/curtains to keep the room cool in summer?

Folk wisdom has it that in order to keep your room cool, it's best to close the window. I assume the reasoning is that while a breeze of air feels cool, in most traditional houses the outside air temperature is actually warmer, heating up the room.  However, I live in a studio directly under the roof with giant east-facing windows. In summer inside temperature can be easily 5 degrees Celsius warmer than outside. Yet friends keep advising me to keep my windows closed.  What is the correct approach?  What I have been doing is opening the windows as soon as outside temperature is cooler than inside temperature (estimated based on weather forecast and room thermostat) and keeping the curtains closed until the window is in the shadow. (related: )


How to retrieve correct normal information of a render?

How can I get the the same vector for every angle on denoising normal information when rendering in Cycles?  I realized that, based on the camera angle and its position, the normal vector is different. Sometimes it is green (RGB)::(0,1,0) and sometimes black (0,-1,0). I checked the normals on all objects, so they are correct. When I show my normals they go in both directions.       What I want is that even when my camera is in another position, the vector should be not (0,-1,0) but instead be green.  For example: in the first image the cupboards should be greenish and not black.


Form submit in jQuery/Ajax post doesn't triggers second time

I have a piece of code in jQuery/.NET MVC that looks like this:   $('form').submit(function (event) {                 event.preventDefault();                 event.stopPropagation(); // only neccessary if something above is listening to the (default-)event too                 if ($(this).valid()) {                     $('#confirmLoader').show();                     $('.btnregister').hide();                     var formdata = new FormData($(this).get(0));                     $.ajax({                         url: this.action,                         type: this.method,                         data: formdata,                         processData: false,                         contentType: false,                         success: function (result) {                             if (result.statusCode == 700) {                                 //  var loginWrapper = result.View.find(".loginWrapper").innerHTML;                                  //  var sas = $($.parseHTML(result.View)).find(".loginWrapper").prevObject[45].innerHTML;                                    // $($.parseHTML(result.View)).find(".loginbody").html()                                 //                                 //console.log($($.parseHTML(result.View)).find(".loginbody").html());                                 $(".loginbody").html($($.parseHTML(result.View)).find(".loginbody").html());                                //$("body").html(result.View);                                 //                                 // console.log(result.View);                                 return false;                             }                             else if (result.statusCode == 200) {                                 window.location.href = result.url;                             }                          }                     });                 }                 return false;             });   So the basic purpose of this method is to post the data and log in the user onto the system.  In the case of the when the server responds with error code 700 => I render the entire page in .net MVC action and return it as a result to the user and should be displayed;  So for example, if I entered xy mail and wrong password, the message is displayed the first time, but the second time I get the entire page rendered, without even getting the javascript code to execute.  I have to note two things:  $("body").html(result.View);    Like this, the response always works when the status code is 700 and it always displays the message properly.  However, I don't want to replace the entire DOM of the user, only the portion where the login form is, and display the error message.  Thats why I tried this:  $(".loginbody").html($($.parseHTML(result.View)).find(".loginbody").html());   With this solution it only works first time... Second time it renders me the entire page, and I can see the page being refreshed...  Why is this happening with solution #2?  P.S. this is the code that is returned in  background:  ModelState.AddModelError("WrongUsernamePassword", "Wrong username or password!");  return Json(new { statusCode = 700, View = this.RenderView("Login", model) });   Why doesn't 2nd method works?  Can someone help me out?


If a prime $p$ is divided by 30, remainder is either prime or 1

Show that if a prime number $p$ is divided by 30, then the remainder is either a prime or 1.  I did the sum sum but cannot complete it. I took $p=6k+1$ and $p=6k-1$ form. now for any $k=5m$ we get $6k=30m$ form so we can say that the remainder comes 1 but then I can't give proper proof of the rest.


Running Ubuntu's latest release on Lenovo T430

I'm listing below the specs of my Lenovo laptop:   Lenovo ThinkPad T430  2349-Core i5 2.6 GHz-3230M/64-bit  Windows 10 Pro/Windows 7 Professional 64-bit  4 Gb RAM 500 Gb HDD DVD printer 1366 x 768/14 wide  HD-Intel HD Graphics update 4000   I'm hoping to run the latest Ubuntu on my Laptop, but it's not on  list, and so I'm a little worried that if I switch from Windows10 to Ubuntu the hardware might not be 100% compatible resulting in poor performance.  As a side note, I did see the T440 and T450 in the list but for past releases, and Lenovo in general seems to be pretty compatible with Linux. Do you guys think that it's okay to make the switch? Thanks!!


Why doesn't an Environment texture appear when the world has a Volume Scatter shader?

I'm working on lighting a scene in which I need to have both an Environment texture for the background and Volume Scatter for light cones, but when I check the volume section in World setting and choose the Volume Scatter, the environment becomes black background (but the lighting works as I want).  I'm using Blender 2.72  How can this be fixed?


Which one of the following is correct?  1) Its strong faculty and motivated students are all appealing to me.  2) Its strong faculty and motivated students are both appealing to me.  Thanks!


Prove that $X \times Y \times Z = X \times (Y \times Z) = (X \times Y) \times Z$.

$X$ and $Y$ are sets.  $X \times Y$ denotes the cartesian product of the set X and Y.  It's given that none of the sets is empty.


Is there a way to use a PNG image as a desktop background without conversion to JPEG on Windows 7?

Suppose I wanted to use a PNG file as a desktop background. I can right click on it and select "Set as desktop background".   Surprisingly, this does not actually set the image as the desktop background. Rather, it appears to generate a JPEG-converted version of the image (I have no idea where it is stored), and use that instead of the original PNG file.  How do I know this? The image that appears as background on the desktop is sprinkled with DCT quantization noise, and the colors are washed out. For example, consider the following 1920x1080 PNG image (right click to open as full-size):    This is what it looks like when I take a screenshot of the background (right-click and open in a new tab to see details):    As you will see when viewed at actual size, the high-spatial-frequency visual components are surrounded by the characteristic haze of quantization errors unique to JPG images, and the colors are significantly less vibrant, both of which prove that the original file is not being used. I saved the screenshot losslessly, so this is exactly as it appears on my screen.  Does Windows support the use of PNG images without on-the-fly lossy conversion to JPEG? Or does this feature not exist? Admittedly this is a minor gripe, but I was wondering if any Super User's knew of any workarounds.


My girlfriend has never owned a house, I have, can she get a help to buy isa?

this is a follow on from my previous question:      So the Help to buy ISA has arrived. Having had a read though the documents though I'm still unclear on whether my girlfriend is eligible for a help to buy ISA (for use with a joint purchase), even if I'm not:     Taken together I think that means that your girlfriend can get one of   these ISAs and use it towards a jointly-purchased house. But you'd be   wise to check that with the ISA provider.   Reading though (for example) the   It states:     Accounts are limited to one per person rather than one per home so   those buying together can each claim a bonus.   So does this mean she can open and use a help to buy ISA even if I can't?


Python-Which command is better for changing the file extension?

I am trying to change an extension for a file, and I got two options.   os.path.splitext(os.path.basename(g_filename))[0] + ".new"  os.path.basename(g_filename).split('.')[0] + ".new"  Both gives the same output. So i am getting a new file called oldfile.new from oldfile.old  No possibility of having too many '.' in the file name.  Which is better of these two? What is the thumb rule (if any)?


How to kill worker threads in python after their execution?

I'm working on a project for college and I've come up with a music player module. I borrowed the following code from here itself, but I would like to kill the following threads once they finish execution, such as when the particular song stops playing. How should I do this??:  def worker_func():     while commands:   # Checks if the the list is not-empty. Loop exits when list is becomes empty         com = commands.pop(0)         os.system(com)  workers = [threading.Thread(target=worker_func, args=tuple(), name='thread_'+str(i))  for i in range(5) ]  # Create 5 workers (consumers) [worker.start() for worker in workers]  # Start working #[worker.join() for worker in workers]   # Wait for all workers to finish   I'm using mpg123 command line music player to play the music tracks and pulseviz visualizer when the music plays. I would like to kill both of these threads once execution stops.  Thanks in advance.


What are the Cauchy sequences in $(X,d)$ when $X = \mathbb{R}$ and d represents the discrete metric?

I know that a discrete metric $d$ on $X$ is defined by   $$d(x,y) = \begin{cases} 1 &\text{if $x \neq y$} \\ 0 & \text{if }x = y. \end{cases}$$  for any $x,y \in X$.  But what exactly are the Cauchy sequences in a metric space $(X,d)$ when $X = \mathbb{R}$ and $d$ represents the discrete metric?


I ran into this issue while trying to submit this question on travel.stackexchange.com:  I was able to publish it by viewing the HTML content on the button and getting rid of the disable property on the button. Otherwise I could not publish the question. I tried again to just do a test and the same thing happens. I ask a question, add the tags and the system tells me to review my question and says "Your question is ready to publish!" yet the button to submit is disabled. I'm on the latest version of Google Chrome:  It does not happen to this site, but it happens on travel.stackexchange.com.


I am building internal in my custom module that I am porting to Drupal 8:   I need to get a current language prefix so I can prepend it to the link. I Drupal 7 it was as simple as:  global $language; $prefix = $language->prefix; $mylink = $prefix . '/example/something';   How can do this in Drupal 8?  EDIT: My issue specifically is that I have a language prefix set to NONE for the default language at Home >> Administration >> Configuration >> Regional and language >> Languages >> Detection and selection. (admin/config/regional/language/detection/url)  For the default language, I want the code to return the real prefix, i. e. NONE, not en (the code for the default language, English).


Interpretation of log(1 + x) transformed predictor

neatly explains how to interpret a log transformed predictor in OLS. Does the interpretation change if there are 0s in the data and the transformation becomes log(1 + x) instead?   Some authors (e.g. Fox and Weisberg 2011) recommend adding a start (i.e. a positive constant) if a log transformation is necessary to correct skewness and improve symmetry, but the data contains zeros.   Consider a variation of the Ornstein example in CAR (p. 303):   require(car) data(Ornstein) boxplot(Ornstein$interlocks, horizontal = T)      The data is clearly right skewed, and contains 0s.   summary(powerTransform(1 + Ornstein$interlocks)) ## bcPower Transformation to Normality  ##  ##                         Est.Power Std.Err. Wald Lower Bound Wald Upper Bound ## 1 + Ornstein$interlocks    0.1248    0.053           0.0209           0.2287 ##  ## Likelihood ratio tests about transformation parameters ##                              LRT df      pval ## LR test, lambda = (0)   5.502335  1 0.0189911 ## LR test, lambda = (1) 262.431991  1 0.0000000   The powerTransform() function suggests that a log(1 + x) transformation here could be useful.   boxplot(log(1 + Ornstein$interlocks), horizontal = T)     As you can see, symmetry is indeed improved.   Question: If this transformed variable were to be included in an OLS regression as an IV, would the coefficient estimates still have the usual interpretation of log transformed variables?


How to create a filter in Gmail to identify messages forwarded from Zimbra?

EDIT:  You cand find additional information in   I have two email accounts, one is my main Gmail account which I check regularly (for simplicity I name it mygmail@gmail.com), and the other one is from university mail service where I currently study (and I name it myunimail@mail.uni.com).  As the disk quota of university mail server is too low and there are lots of daily announcements from university staff which contain huge attachments, after about 5-7 days all disk quota is used and afterwards no emails will be delivered to my inbox.  So I created a filter in the university mail service (which uses Zimbra) to forward all received messages to email alias mygmail+UNIFWD@gmail.com and then delete the message.  Now the main problem is: I want to create a filter in Gmail to mark these forwarded messages with a custom label, but the information included in message header, specially FROM and TO fields, is not enough to distinguish these messages from other ones (as shown below)    As you can see, there is no sign of alias I used in the Forwarding Address in Zimbra's filter settings. Even I can't rely on TO field (which contains myunimail@mail.uni.com) because there are messages which are sent to both of my email addresses, so some mistakes will occur if I use this field.  By the way, these forwarded messages are marked by Gmail as being sent via mail.uni.com  Is there any way I can use this to filter messages?  Did I miss something while setting up the filter in Zimbra?


Prove that $⌊xy⌋ \le ⌊x⌋⌊y⌋ + ⌊x⌋+⌊y⌋$ for $x,y \in \mathbb{R}$, as $x,y>0$

I'm trying to prove that  $⌊xy⌋ \le ⌊x⌋⌊y⌋ + ⌊x⌋+⌊y⌋$ by writing x as $x=m+\epsilon_1$ and $y=n+\epsilon_2$ for some positive integer $m,n$. Trying to use the inequality $⌊xy⌋ \le xy$ and $(m+\epsilon_1)(n+\epsilon_2)<m+n+mn$, but it turns out that the inequality doesn't hold, and I have no idea how to prove this inequality then. Can somebody share some lights on this issue? Thanks!


Intimidated Beginner Daunting To Animate

which tutorials can get me to animate my very first 3D animation.  The way I learn is if I could find a video to follow along that will allow me to be successful at getting a ball to bounce or getting any basic object to become animated...by the end of the video.  A true bona fide quick start.  I have watched several youtube tutorials that claim to be for absolute beginners but I just need to have one very simple success under my belt and then my mind can rest at easing knowing that it's possible for me to animate an object.  Right now it seems impossible that I will ever be able to animate an object.


When I read about generic programming, often, are used this two terms:   parametrized types; type parameters   Are there difference between them?


YA novel: siblings from a walled city, whose DNA is spliced with animal DNA

I remember a scene where they fly over a wall and land in a forest.  They find a huge home and realise that when the world was dying due to overpopulation, the poor were moved to the walled area while rich elites got to enjoy a green world.  There was also a scene with an animal who didn't attack them due to something in the DNA, which I think meant that the walled humans also were genetically spliced with animals.


How can a UK citizen get an extension of visa-free stay in Malaysia inside the country?

I am British citizen. We are allowed to stay in Malaysia for 90 days. Can I extend my 90 days if I cross over to Singapore and return to Kuala Lumpur the following day, hence getting another 90 day "extension" for my stay in Malaysia?


I'm really new to Java, and was wondering if someone could help me convert the following to foreach loops into for loops?  Assuming expression is a collection of items:  for(Type x: expression){    ...    for(Type y: x.expression){      .....     } }


NullPointerException when testing resource in dropwizard with mockito

I built a restful API with dropwizard. And now I want to test it with .   public class BlogCommentResourceTest { private static final BlogCommentDAO dao = mock(BlogCommentDAO.class); private final BlogComment blogComment = new BlogComment(1, "url", "comment", new Date(), "name"); @ClassRule public static final ResourceTestRule resources = ResourceTestRule.builder()         .addResource(new BlogCommentResource(dao)).build(); List<BlogComment> list = new ArrayList<BlogComment>();  @Before public void setUp(){     list.add(blogComment);      when(dao.getLast()).thenReturn(blogComment);     when(dao.getAll(POJOs.BlogCommentPOJO.toString())).thenReturn(list); } @After public void tearDown(){     reset(dao); } @Test public void getLast(){     assertThat(resources.client().target("/blogcomments").request().get(List.class))             .isEqualTo(list);     verify(dao.getAll(POJOs.BlogCommentPOJO.toString()), times(1)); }   }  This is the method I want to test.  enter code here   And error message is shown as below:  java.lang.NullPointerException at dao.DAOBase.getAll(DAOBase.java:37) at dao.BlogCommentDAO.getAll(BlogCommentDAO.java:19) at resource.BlogCommentResourceTest.setUp(BlogCommentResourceTest.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at io.dropwizard.testing.junit.ResourceTestRule$1.evaluate(ResourceTestRule.java:202) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)   Somebody know what happened? Why it is the DAOBase that throw a null pointer? My unit test for all of dao shows they works well.


Raster to polygon with RGB composite using Arcgis

I am trying to convert an RGB composite to a shapefile to use with. The raster to polygon function returns with three shapefiles with "grid_code" of the value of each of these three channels. I am wondering if there are easier ways to combine them into one shapefile with a unique value for each color? Or can I do anything to transform the RGB composite raster into one that contains a unique value for each color before the raster to polygon exercise?  Edit: I have a raster of world solar intensity consisting of about 10 colors which indicates the solar intensity categories of pixles. The raster is in RGB composite form. What I want to do is to create a polygon shapefile out of this raster. However the shapefile generated by raster to polygon function of arcgis contains only information on R channel.


Can an uncountable subset of $\mathbb{R}$ have empty intersection with its derived set?

Question: Is there an uncountable subset $A$ of $\mathbb{R}$ such that $A\cap A'=\emptyset$, where $A'$ denotes the derived set of $A$?  I just know that an uncountable set $A $ must have limit points (that is, $A'\ne\emptyset $) and that, if $A$ is countable, then it is easy to find such an  example, say, we can take $A=\mathbb{N}$ (in which case $A'=\emptyset $ and therefore $A\cap A'=\emptyset $). But, here $A$ is an uncountable set :-(  Please help me, stuck on this


Linear Regression With Groups vs. Points - Issue with Influence of Zeros

I have a data set with two columns, the first of which is to be used as a response variable and the second of which is to be used as a predictor variable. The predictor variable, however, is populated by integer values, many of which are zero.  When I place data points for the predictor and response variables into groups corresponding groups, no group has a value of zero anymore.  Performing a linear regression on the data when it is in this form produces a significantly higher $R^2$ than in the ungrouped regression. My question is:  Is something seriously wrong with my methodology if the change in $R^2$ is massive between the grouped and ungrouped models?  Can this be explained by the large number of zeros?  To provide a slightly better idea of what I mean by grouping consider the following data:  A  B  0  .2 0  .3 0  .3 2  .6 4  .7 6  .8 7  .7 4  .4   A would be grouped as follows:  0-3 4-7   with the new B values being the group averages.


I know a lot of people have asked this before, but I just wanted to clarify, because when I was in my virtual desktop, and I went on a site and my antivirus on my host machine went off saying that they blocked a threat. This scares me, because I want to use a virtual desktop to make youtube videos showcasing viruses. Is it just a false alarm? Is there a way to make the viruses not transfer to my actual computer?   My OS on the virtualmachine is windows XP 64bit and on my host machine its windows 10 64bit. My antivirus is avast. The infection says: URL:MAL 185.38.187.84/Chmj.htm


What could have triggered a question ban in this case?

I would like to know what triggers a question ban? Is it based on votes?  After self deleting a question on programmers, I got a question ban. What's the reason?  This question is submitted at MSO : "The only advice I could give is to consider posting on Meta Stack Overflow since the algorithm is used across the network. Is it weird that a self-deletion triggered it..."


php link to image file outside default web directory

Here is the directory structure  /domain.com  /public_html   /functions   /image   /mobile   /www   the /domain.com/public_html/www folder has a file index.php the default web directory is /user/public_html/www in the index file is an include that includes the functions with include"../functions/function.inc" this works without problem when I want to link to a picture in the image folder I don't get any results for example      Does anybody has any idea why the link to the image does not work and how to link correctly to the image file ?  I tried <img src="<?php echo $_SERVER['PHP_SELF']; ?>../image/graphic/logo.gif" alt="alt text"/>  but that gives me the same result when I build a link around the image to get to the properties I get this as path  the path should be   when I try to browse directly to this url  I get an 404 file not found error because the default web directory is /domain.com/public_html/www I tried  to get to the image folder but that does not help neither.  Anybody any ideas or is it impossible to html link to graphical files outside the default web directory ?  thanks for reading this far  Thanks for the answers so far. I will try to solve my problem with one of the recommended solutions and report my working solution back here. I wanted to have the image folder at the same level as the www and mobile folder because some of the images used for the pc (www) version and the mobile version are the same. Of course it is easier to just get an image folder in the www and in the mobile folder and I think that is what I am going to do.  thank you everybody for the advice. The main reason why I am not going to work with a script is that a script will be a difficult solution to an easy problem and also because I don't really see how you can wrap your image in a css class and how to provide alt text for an image.


Parse string with characters and numbers in android

I have the following string with characters, numbers and also extra non-numeric characters. I managed to replace the non-numeric characters. But I am lost with characters and numbers at the end.I am getting this string from the following method. I use this method to remove the non-numeric.  String[] stringArray = string.replaceAll("\\[", "").replaceAll("\\]", "").replaceAll("[^ A-Za-z0-9]","").trim().split(",");   results with "I7f253e0", "I6fc2699". How can I parse this ?  public static int[] string_to_int_arr(String string){      String[] stringArray = string.replaceAll("\\[", "").replaceAll("\\]", "").replaceAll("[^ A-Za-z0-9]","").trim().split(",");      int[] intArray = new int[stringArray.length];      for (int i = 0; i < stringArray.length; i++){         try {             intArray[i] = Integer.parseInt(stringArray[i]);         } catch (NumberFormatException e){             Log.e(TAG,"" + e);         }     }     return intArray; }


I want to write an application with the library in nodejs. Is there any way to connect QML or C++ with nodejs on ubuntu touch?  Edit: I want to write a native application (in QML) and use a library written in nodejs. How can I call nodejs in QML?  Duplicate question does not respond to the question.


Find The Last 3 digits of the number $2003^{2002^{2001}}$  BY number theory or otherwise,   Also i would like to ask is there a property observed in the numbers of the form $k^n$, where for some $k, n$ is varied then the digits of $k^n$ are periodic,  for example,  $2^n$,  its last digit is periodic with period 4, its second last digit is periodic $4\cdot 5 = 20$ its third last digit is periodic with periodic with period $20\cdot 5 =100$  I have observed this property with other numbers as well, though period might vary,for different values of $k$.


Why was the ring necessary for Sauron to control Middle-earth?

Sauron seems to have quite a bit of power while he does not have the Ring. What does the One Ring in his possession allow him to do that he cannot without it?   He still controls thousands of orcs, the ringwraiths and other creatures to do his dirty work while not having the One Ring. From what I understand, Sauron needs the One Ring back in order to be able to gain control over Middle-earth and its people. What is the reason for this? He was still able to be destroyed when he had the ring, simply by having it cut from his hand.  Is it the fact that his powers greatly increase while having the ring, and if so, what are those powers that increase?


What about checking for a question mark in the post title on Stack Overflow?

Been on Stack Overflow for a while now. I noticed that the post titles that are in the form of a question are usually much clearer than the ones that are not.  I think it's because it forces you to write a complete sentence instead of dropping the words out of your head.  Since Stack Overflow is about questions and answers, it may be possible to improve the question quality by checking if there is a question mark (?) in the title and refusing to accept the question if there is not.  What do you think?


This is more of a asking for direction. What are the means of developing programs that can add something to the Ubuntu top bar?  Let's say I want to make a program that shows the network traffic on the topbar. I'm focusing on GNOME. What should I learn?  p.s. I am not a newbie to programming and bash.


Appropriate problems for different type of ML classifiers

I have learned several classifiers in Machine learning - Decision tree, Neural network, SVM, Bayesian classifier, K-NN, Markov process...etc.  Can anyone please help to understand when I should prefer one of the classifier over other - for example - in which situation(nature of data sets, etc) I should prefer decision tree over neural net OR which situation SVM might work better than Bayesian OR what types of problems are appropriate to apply decision tree, neural net, k-nn, markov processs or SVM or bayesian ??  Thanks.


Drywall anchors or wood studs when securing a TV?

Which is better to use for securing a TV to the wall?


Setting default path when opening a terminal session

I am new to Ubuntu.  Whenever I open a terminal my current working directory /home/Varun (as found by typing pwd).  Is there any way I can make the terminal's path to be set as /home/Varun/Desktop/Java Files when it opens?


Moving average process notation: negative or positive $\theta$s?

I noticed that sometimes the moving average process is written in two different ways. I would like to know which one is correct.   $y_t = \epsilon_t + \theta \epsilon_{t-1}$  $y_t = \epsilon_t - \theta \epsilon_{t-1}$


What is the purpose of this statement in Verilog?

I see syntax quit similar to this very frequently:  4'd0  Sometimes it is associated with an assign statement:  assign S0 = 2'b00;  I tried searching online however I could not find any sources.


Is there a way to make Geocode or location address based on a shapefile streets, without using a web service and using QGIS or some open source software?


How to create a new folder on List view on nautilus?

This is a really small problem, although it seems to be like a pretty big design issue.   When the folder is full of files, for example, there's no empty space left to right click on, so how do I create a new folder? Or a new document? There's absolutely no space to click.  Here's an example:    If I right click anywhere, it just opens the file right click menu.


How does a USB C port provide the power to charge laptops?

I've heard about laptops such as the new Chromebooks that are charged via a wall charger that connects to a USB-C port. I'm quite happy that this will supposedly standardize laptop chargers but I'm a little unclear about how this works.   Existing USB ports provide a 5 volt source, but the laptop chargers provide up to 20 volts. is there some kind of higher voltage line or are the USB-C powered laptops running on a lower voltage?  All this information I've seen gives a fairly vague idea of providing more power, providing up to 100 watts rather than 10 watts. Even so, my laptop is not the most powerful machine and the charger still outputs fairly near 100 watts, I can imagine more chargers for power laptops providing much more than 100 watts. Could a general purpose USB-C charger really power all these machines?


I'm pretty new to QGIS (2.14.3) and am half way between singing its praises and hitting my head against the desk. I've been having a particularly vexing problem recently with a map I've created.  In the image (Fig 1) below you will see that I'm mapping out rivers and riparian areas. I'm projecting into WGS84/Pseudo Mercator.   (1) What I can't understand is that it appears like the OpenLayers image in the background has shifted when the jpg file is being made. In fact if you look closely, neither the full map nor the overview map is in the correct (or even the SAME) position. However, in the print composer (Fig 2) the image and layers line up perfectly.  (2) The buffer I've created (yellow and red line) should look like it does in the overview map however if you look in the full map where I've zoomed into a particular section, you'll see that it suddenly cuts across from north-west to south-east on the right-hand side of the map. Nothing I do has corrected this, including remaking the layers. This problem seems to persist in print composer, QGIS and the jpeg files. [Edit] There is also mean to be a bridge displayed in red but that doesn't seem to show in the print composer or JPEG either.  Fig 1: Jpeg file   Fig 2: Print composer view   Am I missing something? Or is this just a freak event? I'm very close to just taking a screenshot of the Print Composer and using that at the moment.


One of the motivations behind requiring C++ programmers to put the typename keyword before accessing a type nested inside a templatized type was to prevent ambiguity in templates. For example, consider the following code, which assumes the existence of a template type called MyTemplate:  template <typename T> void MyFunction(const T& elem) {     int itr;     while(true)     {         typename MyTemplate<T>::Inner * itr;     } }   Consider the line           typename MyTemplate<T>::Inner * itr.    Since we have the typename keyword here, the compiler understands that we're declaring a pointer of type MyTemplate::Inner* called itr. If we don't put the  typename  keyword in here, C++ will think that    MyTemplate<T>::Inner  is a class constant rather than a type. What will the statement     MyTemplate<T>::Inner * itr mean in this case? Does the difference between these two cases help explain why the typename keyword is necessary?


Shifting -5 V to +5 V signal to 0 to +5 V for ADC

I want to convert the  output voltage of an ECG (-5 to +5) to 0 - +5 volt for ADC. Should i use Op amp ? What is my problem in this picture? I simulated it in Proteus ... but when input voltage is higher than 4 V or lower than -4 V Vout gives an unexpected value.   Below is another simulink that have same problem ...    My idea to make this level of voltage is (Vin +10)/2 that give the range 0-5 V.


How to view executable associated with file type?

I can't figure out how to see which executable Windows 10 has associated with a file type.  Current problem: I have a Python 3 installation which I want to keep as my default Python. However, I recently had to install Python 2.7 for a project. This apparently set itself as the default program used to open Python files. I want to reset all of the file associations to Python 3. (If you are not familiar with Python: this is important because some code only works in one version.)  This is what I see in the "Set Associations" part of Control Panel:    Considering both versions are "Python" and have executables "python.exe" and "pythonw.exe", this is rather unhelpful. If I click "Change Program", I get this:    ... still unhelpful. Even better, if I click "More Apps" I get:    Same Python? Different Python? Who knows!  Clicking "Look for another app on this PC" starts in C:\Program Files\ (where neither version is located), so no hints there.  Now, I realize I can solve my current problem by clicking all the way through each file extension and setting to my Python 3 executable, but it's really bothersome that there's no indication of where the "apps" in this list are actually located. I can imagine screwing up associating a new file type in the future because I can't tell which program is which (or even security issues, considering all Windows tells you is an icon and a name..).  I'm not afraid of the registry, but the keys referenced in answers here  do not include file paths.  Is there any way to view the location of the executable currently associated with a particular file type?


C++: Will any exception be missed by catch( ... )

Does catch(...) catch all exceptions or will there be some exception that could be missed by this?


"non-static method cannot be referencd from a static context" - Java

For some java homework we were told to create a program that makes collages, with one of the methods being that the one of the "fragments"(images) of the collage will be scaled by width and height. The pre-written class "fragment" already has a method to scale the image:  public void scaleFragment(int newWidth, int newHeight) {     width = newWidth;     height = newHeight; }   So in the main class I call up this method by doing this:  public void makeTiles(int tileWidth, int tileHeight) {   for (Fragment sm:collage){     Fragment.scaleFragment(tileWidth, tileHeight);   } }   When I try to run this however, I come up with this error: "non-static method scaleFragment (int,int) cannot be referencd from a static context"  After reading up on this website I found that you needed to crate an instance of the class?so I did this:   Fragment fragment = new Fragment();   for (Fragment sm:collage){     Fragment.scaleFragment(tileWidth, tileHeight);   }   This however comes up with the error "constuctor error in class fragment cannot be applied to given types"  The main class has declaces the arraylist collage like this:    Fragment fragment = new Fragment();   for (Fragment sm:collage){     Fragment.scaleFragment(tileWidth, tileHeight);   }   can anyone help me solve this problem? Thanks in advance.


How does separation of tracks affect the acceleration of a rolling ball on the tracks?

If I have two metal rods arranged like a ramp with coefficient of friction $\mu$, at an angle $\theta$ to the ground, and a solid metal ball or radius $r$ and mass $m$ rolling down between the two tracks in such a way that it touches both of them, how does the separation between the tracks $d$ affect the acceleration $a$ of the ball, assuming a uniform gravitational field of strength $g$?  I know that I can model a box sliding down a ramp using equations with energy but how do I calculate for a rolling ball, and take into account the separation between the tracks?


What is the best method to merge two PHP objects?

We have two PHP5 objects and would like to merge the content of one into the second. There are no notion of subclasses between them so the solutions described in the following topic cannot apply.    //We have this: $objectA->a; $objectA->b; $objectB->c; $objectB->d;  //We want the easiest way to get: $objectC->a; $objectC->b; $objectC->c; $objectC->d;   Remarks:   These are objects, not classes. The objects contain quite a lot of fields so a foreach would be quite slow. So far we consider transforming objects A and B into arrays then merging them using array_merge() before re-transforming into an object but we can't say we are proud if this.


Linux-to-Windows: non-volatile const integral type

I have some code, written on Linux, that i am attempting to compile in Windows, visual studio 2015.  In one of the Header files:      #include <Eigen/Core>     #include <Eigen/Geometry>     #include <Eigen/StdVector>     #include "transformable_vector.h"      namespace nicp {        template <int wCoordinate_>         class HomogeneousVector4f : public Eigen::Vector4f {       public:         EIGEN_MAKE_ALIGNED_OPERATOR_NEW;          static const float wCoordinate = wCoordinate_;  }   the lines:   template <int wCoordinate_>     class HomogeneousVector4f : public Eigen::Vector4f {   public:     EIGEN_MAKE_ALIGNED_OPERATOR_NEW;      static const float wCoordinate = wCoordinate_;   are giving me this error:  Error   C2864   'nicp::HomogeneousVector4f<0>::wCoordinate': a static data member with an in-class initializer must have non-volatile const integral type   I have tried removing the const, and replacing it with constexpr, but to the same result.  I have tried:  const float HomogeneousVector4f<wCoordinate_>::wCoordinate = wCoordinate_;   as well as:   static constexpr float wCoordinate () { return wCoordinate_; }   and:   static float wCoordinate () { return wCoordinate_; }   EDIT: I have tried all the answers in the question marked as 'duplicate', to no avail. I believe the difference here is that this class is created with an int passed to it.   Thank you.


What is the use of the yield keyword in Python? What does it do? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist):     if self._leftchild and distance - max_dist < self._median:         yield self._leftchild     if self._rightchild and distance + max_dist >= self._median:         yield self._rightchild    And this is the caller: result, candidates = [], [self] while candidates:     node = candidates.pop()     distance = node._get_dist(obj)     if distance <= max_dist and distance >= min_dist:         result.extend(node._values)     candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result  What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop?   1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: [Module mspace][1].


Why when clicking on numpad_0 or only 0 i don't see anything with the camera?

The camera is viewing the city. I scaled the camera made it bigger.    Then i click on numpad_0 and see    But if i will make a new project with only the cube in the start and will click the numpad_0 it will lock and show the cube.  Why it's not showing the city ?


How to jump to a location using mouse on iTerm/terminal?

I work on a terminal most of the time.   Is there an application / plugin over iTerm or any other terminal like application using which I can control the cursor location of my terminal using a mouse ?


how to know from which search engine the visitors coming to my website ? PHP-JAVASCRIPT

Can I know which "search engine" the visitor used to be on my site?  For example:   If the visitor searched for my website in google, when click on link from google to my website,  i need to know the search engine name, here is "google.com".  The same if searched on yahoo , and click on my site link, i will get yahoo.com as a search engine.    It's possible?


pointed me in the right direction! (close this if you like)  Im trying to reinstall windows through a usb drive and remove ubuntu 14.04   My disks readout is  Size : 8.0 GB — 7.9 GB free (1.1% full)  Device : /dev/sdb1  Partition type : HPFS/NTFS (Bootable)  Contents : NTFS — Mounted at /media/f-17/bullshit  This is where I stand now, Ive tried unetbootin (After pushing OK imgur.com/6BQhtow) there is most definitely a USB drive in a working USB slot, and gparted returns in terminal  ====================== libparted : 2.3 ======================  (gpartedbin:10708): GLib-CRITICAL **: Source ID 7 was not found when attempting to remove it  (gpartedbin:10708): GLib-CRITICAL **: Source ID 6 was not found when attempting to remove it  (gpartedbin:10708): GLib-CRITICAL **: Source ID 26 was not found when attempting to remove it  (gpartedbin:10708): GLib-CRITICAL **: Source ID 25 was not found when attempting to remove it Input/output error during read on /dev/mmcblk0   and then when it opens gives the following error after thinking a while  Window title : Libparted bug found!  Error : Input/output error during read on /dev/mmcblk0  My mount options are set to this : imgur.com/RHyQaw8


Lehman Brothers (is/are) now taken over by some other company.   My answer is is.   My approach to finding the correct answer is that according to subject–verb agreement rules, if both of them refer to same subject, we use a singular verb. Thus:     Lehman Brothers is now taken over by some other company.   Is my approach right according to subject–verb agreement rules?


How can I remove a question with accepted answer or withdraw my ownership to that question?

My motive behind this might seem unclear, so I'll try to explain myself. I've asked questions in Stackoverflow community in the past three years that now after a while seem very 'dumb' to myself. I like to think that I've progressed more than someone is expected to do in this time. Now in the process of finding a job I have this concern that the person evaluating me might have a look at my profile here and see those 'dumb' questions which really don't represent me today. So to sum it up: I'm insecure! But I suspect that it could be a concern to many like me.  Now is there a way to remove a question with up votes/accepted answer? or even better is it possible to just withdraw my ownership to that question so it's content can remain available to the community?


Referencing JSON file in Minecraft Bedrock via command

On Minecraft Bedrock Edition, I have just created a JSON file that creates a chest with random loot in it. The problem is that I don't know the command to get the chest that contains random loot. Here is what I did. I used  to create a loot table that gives you a certain amount of random items. I then saved this in a JSON file and put it in the following directory along with a manifest JSON file in order for Minecraft to recognise it.  The problem I am now having is that I don't know how to use the give command in Minecraft to give me a chest with random loot that uses the JSON file. The website I used to create the random loot table generator mentions this is the command you would use to get the chest with random loot from the JSON file loot table created (in Java Editon though): /give @p minecraft:chest 1 0 {BlockEntityTag:{LootTable:"mctools:chests/loot_table"}}  The problems I am having with this are that I don't know what directory I would need to put in to access the JSON file loot table, I am also not sure what other syntax would be needed because I know the idea of using minecraft:chest only works for Minecraft: Java Edition and for Minecraft: Bedrock Edition you would have to do something different. What I am asking is, what type of command do I need to use to give me a chest which uses the JSON file loot table?


Can the Simulacrum of a Level 10+ Cleric attempt a Divine Intervention?

Clerics get the Divine Intervention feature at level 10.     Beginning at 10th level, you can call on your deity to intervene on your behalf as an action. Describe the assistance you seek, and roll percentile dice. If you roll a number equal to or lower than your cleric level, your deity intervenes. The DM chooses the nature of the intervention.      If your deity intervenes, you can't use this feature again for 7 days. Otherwise, you can use it again after you finish a long rest.      At 20th level, your call for intervention succeeds automatically, no roll required.   If someone makes a Simulacrum of a Level 10+ Cleric, can that Simulacrum attempt a Divine Intervention ?


What is the difference between local and global in a TeX meaning?

In  it came to the question about the difference between local and global in a TeX meaning.  In the liked question the babel shorthand ; should be deactivated inside a {tikzpicture}, which can be done with  \begin{tikzpicture}    \shorthandoff{;}    ... \end{tikzpicture}


I suppose I am confused in general about the use of "into" versus "in to." For this case, though, consider the sentence, "I moved into my apartment today" as opposed to "I moved in to my apartment today." I like the sound of "moved into," but is "moved in" like an idiom that needs to be left in that form to work? Any assistance in sorting out my confusion would be greatly appreciated.


Just today, without me doing any special kind of update or plugin that I am aware of, the Chromium browser closes instantly after startup. When trying to start it in the terminal, I get this message:  Received signal 11 SEGV_MAPERR 000000000010 #0 0x7ff2a0573425 base::debug::StackTrace::StackTrace() #1 0x7ff2a057380b <unknown> #2 0x7ff2a089e390 <unknown> #3 0x56177f66adc8 <unknown> #4 0x56177f66d656 <unknown> #5 0x56177f66ddf9 <unknown> #6 0x56177f66e143 <unknown> #7 0x7ff2a05ee821 <unknown> #8 0x7ff2a0574eea base::debug::TaskAnnotator::RunTask() #9 0x7ff2a059de90 base::MessageLoop::RunTask() #10 0x7ff2a059f97d base::MessageLoop::DeferOrRunPendingTask() #11 0x7ff2a05a083d <unknown> #12 0x7ff2a05a1300 base::MessagePumpLibevent::Run() #13 0x7ff2a059cf15 base::MessageLoop::RunHandler() #14 0x7ff2a05c7628 base::RunLoop::Run() #15 0x7ff2a05f3e36 base::Thread::ThreadMain() #16 0x7ff2a05ee726 <unknown> #17 0x7ff2a08946ba start_thread #18 0x7ff289f433dd clone r8: 000000000000002e  r9: 00005617810c16ec r10: 0000000000000000 r11: 00007ff289fd0f50 r12: 00007ff1f17f6ff0 r13: 0000000000000008 r14: 0000000000000008 r15: 00007ff1f17f6eb0 di: 0000000000000000  si: 00007ff1f17f6eb0  bp: 00007ff1f17f6f00  bx: 00007ff1f17f6eb0 dx: 000000000000005e  ax: 0000000000000000  cx: 0000561782b3af60  sp: 00007ff1f17f6e60 ip: 000056177f66adc8 efl: 0000000000010206 cgf: 0000000000000033 erf: 0000000000000004 trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000010 [end of stack trace] Calling _exit(1). Core file will not be generated.   It changes slightly each time I try, but it always comes out basically that way, and I have no idea what it is saying.   Tried uninstalling chromium-browser and reinstalling. No change.  So I deleted ~/.config/chromium and re-ran, and the browser didn't crash. Yay! but then I logged into Google, and crashed with the same message shown above. So I started it up again, and didn't log in. So far so good. But as soon as any complicated website is opened, it crashes within a few seconds.   So then I opened Firefox. Since I'm writing this on the browser, it finally seems stable. So I can log into Google on Firefox with no trouble, then why is Chromium crashing on it?  Using Ubuntu 16.04. I've searched around for answers, and there are lots of people who experienced similar problems several years ago, but obviously that's irrelevant now as many versions have changed since.   For the record, I've also tried is to run chromium-browser --password-store=basic with no change. I've also tried downloading the repository using sudo add-apt-repository ppa:canonical-chromium-builds/stage, update, and re-install. No change. Also tried running chromium-browser --disable-gpu. No change.   I would really appreciate an answer as soon as possible, as I am very frustrated having to deal with this.


Show $f_n$ and $f_{n+1}$ are coprime using divisibility


Why hasn't the option to hide certain questions (that are for example on the first page of a Stack Exchange site you regularly frequent) implemented yet?


How to convert an existing Java application to a SYS V service (daemon)

I have a Java application, to start it I use     java -jar myapp.jar   To stop it I use CTRL+C.  Now I need to convert that application to something that I can start with:     /etc/init.d/myapp start   And I can stop with:     /etc/init.d/myapp stop   The problem is all about saving the PID of the process, I think I saw somewhere a recipe for doing this, I don't remember where and I'm not able to find it.  I saw that there is a project called , but I look for something free that does not limit memory usage. And I think that this work could be done in a single bash script.


Time in milliseconds since epoch in the terminal

How do I get the time since the epoch, in milliseconds, in the OSX terminal?  The Linux/Ubuntu equivalent is date +%s.%N:  Linux $ date +%s.%N 1403377762.035521859   Which does not work in my OSX terminal:  OSX $ date +%s.%N 1403377800.N


I want to ask if I can run Kubuntu properly on my laptop. I have a Toshiba Satellite A200-1MD from 2007 with 4GB RAM, Intel core i5 running at 2 GHz processor speed and 128 storage.


Does anyone know how to show this preferable without using modular  For any prime $p>3$ show that 3 divides $2p^2+1$


Logging out of a network share drive without reboot?

I have a small script that runs on each workstation which runs defrag and chkdsk and connect each workstation temporarily to a network share that they, normally, do not have access to. The command I use to connect to them is:  net use \\server\sharename [password] /USER:domain\username P:No   Is there a command to log that user out of the drive share without restarting the computer?  Workstations run on Windows XP SP3  EDIT: I've used:  net use \\server\sharename /delete   but the command returns "The network connection cannot be found". However, I can still navigate to \\server\sharename in MyComputer address line and have full access to it still.  EDIT2: Assume I've read through the help files for net use   ;D  EDIT3: Would a reboot suffice? Yes... however it is more convenient to log the user out of the share instead =D. I know I'm difficult.


Python sleep until time without busy loop

Let's say I want to make an event reminder in Python.  It would read a file on startup containing a list of events (meetings, birthdays, etc), figure out which one is soonest, and then do something like time.sleep(1e7).  Actually, that doesn't work: trying to sleep for ten million seconds gives an OverflowError.  Okay, no problem: we'll call time.sleep(2**22) in a loop.  It's a bit less elegant, but the overhead of waking up our process every 7 weeks for no good reason should have basically no impact on system performance or battery life or all those good things everyone likes when they warn us against calling sleep in a loop.  But!  This doesn't work!  It seems to work, unless you test what happens when you hibernate the computer.  If you call time.sleep(60) and immediately hibernate, and then immediately power it back on, you will find that the time the computer spent turned off "doesn't count"; the program will wake up late, even if the whole hibernate/wake up thing took less than a minute.  So, what to do about it?  A common suggestion in this situation seems to be a busy loop: call sleep, and then when you wake up, check the time to see how much more sleep you can afford.  The problem with this approach is that it forces you to take very short naps or else be very unreliable.  If the next event is several months away (maybe you just use the event reminder to keep track of birthdays), that doesn't mean we can afford to sleep for several weeks, because we don't know how much of that time the computer will be on.  It could be that the computer will hibernate mere minutes after we call sleep, and remain off until the day before the event we should remind about.  Thus, we could miss the event by several weeks, as well as whatever other events were shortly after it.  So, what's a safe time?  One second is certainly safe; in fact, one second is probably overkill.  Checking every ten seconds is probably safe; if someone put their computer to sleep and only turned it on less than ten seconds before their reminder is due, I don't think they can complain too much if it arrives a few seconds late.  One minute is more dubious; for some things, being reminded a minute late makes little difference, for others it does.  For instance, if your favorite TV show is at 4pm and your reminder is set to 3:59, then having it come a minute late is bad; the user had better know this can happen, and should set the reminder to 3:58 to compensate.  But the overhead of checking the time every minute is probably NOT negligible.  At the very least, it discourages the OS from paging out the python interpreter and giving the memory to a more deserving process.  Or if it does page it out, then the extra disk traffic generated every minute might slow down the game the user is trying to play, causing a glitch in the otherwise perfect 60 fps framerate.  Or maybe none of this would happen and I'm grossly overestimating the effects of calling sleep once in a while, but still feels wrong and kludgy and inelegant and inefficient and just plain icky.  The operating system knows how long I've been sleeping; this job is trivial from its end.  My program has no clue when the computer was hibernating, and it should not have to care.  There should be some way to get the OS to use its knowledge to wake me at the right time.  Am I right?  Is there in fact such a way?  And if so, what is it?


Could spontaneous symmetry breaking happen again in our universe?

It is generally believed that $10^{-35}$ seconds after the Big Bang, the symmetry of a GUT was broken and after $10^{-12}$ seconds the electroweak force was broken:  \begin{equation} \mathrm{SU(2)} \times \mathrm{U(1)} \rightarrow \mathrm{U(1)} \end{equation}  This symmetry breaking is a result of the universe cooling down and undergoing a phase transition. I'm aware that the temperature of the universe it about $2.7$ Kelvin, so the temperature of the universe cannot decrease much more, but I was wondering if there is a chance that another phase transition might happen again in the future?


Properly bootstrap drupal for standalone PHP file?

This is what I have right now:  <?php     define('DRUPAL_ROOT', '/var/www/clients/client1/web15/web');     include_once(DRUPAL_ROOT . '/includes/bootstrap.inc');     drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); //  drupal_flush_all_caches();        $users = views_get_view_result('userlist', 'uid_list');     $i = 0;     foreach ($users as $user) {         $filename = 'sites/default/files/generated_pdfs/individual_pdf_report_' . $user->uid . '.pdf';         generate_employee_pdf($user->uid, $filename);         error_log('Generated ' . $filepath);         $i++;     }     // create object     $zip = new ZipArchive();     // open archive     if ($zip->open("sites/default/files/generated_zips/individual-reports.zip", ZIPARCHIVE::CREATE) !== TRUE) {         die ("Could not open archive");     }     // initialize an iterator     // pass it the directory to be processed     $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("sites/default/files/generated_pdfs/"));     // iterate over the directory     // add each file found to the archive     foreach ($iterator as $key=>$value) {         $zip->addFile(realpath($key), $value->getFilename()) or die ("ERROR: Could not add file: $key");     }     // close and save archive     $zip->close(); ?>   I'm getting a bunch of errors from the above when run standalone. Works fine in my module. Some of the errors are:  Warning: Invalid argument supplied for foreach() in drupal_depth_first_search() (line 56 of /var/www/clients/client1/web15/web/includes/graph.inc). Warning: Invalid argument supplied for foreach() in _module_build_dependencies() (line 229 of /var/www/clients/client1/web15/web/includes/module.inc). Warning: include_once(sites/all/modules/views_bulk_operations/actions/archive.action.inc): failed to open stream: No such file or directory in views_bulk_operations_load_action_includes() (line 56 of /var/www/clients/client1/web15/web/sites/all/modules/views_bulk_operations/views_bulk_operations.module).


faces are lined and stripey in the view port after extruding

I'm new to Blender and I was wondering how to correct this; i'm not sure what to call it on my faces...      i'd be grateful if you legends could enlighten me?


it is project to Learn cause i love coding i`m trying to read from file that got Shape Like below i must read [] sections and take every element under it and it is ini format    [Connection]     IP=     LoginPort=     Locale=     Version=     [Client]     Username=xxx     Password=xxx     CharName=xxx     Captcha=      [MASTER]     Master=     [Buffs]     //[Comment...........]     Buff1=9460     Buff2=10078     Buff3=     Buff4=     Buff5=     Buff6=     Buff7=     //[Comment...........]


Does an Indonesian citizen need a transit visa at Munich airport?

I am UK citizen travelling from New Delhi to Munich on Lufthansa where I need to change planes and terminal to get a Condor flight to Agadir. The travel agent informed me that I must collect and check in bags again. I understand I do not need a Schengen visa to travel from T2 to T1.  However I am travelling with a friend from Indonesia.  Does he need pass Immigration to collect and recheck bags, and thus require a  visa?


Express solutions of equation $ \tan x= x $ in closed form

I know that the equation $$ \tan(x) = x $$ can be solved using numerical methods, but I’m looking for a closed form of the solutions. In my opinion, having only numerical solutions means that we don’t know the problem, and sooner or later, we’ll be able to find a closed-form solution or at least a power-series solution. I’m looking for an explicit form of a sequence $ (x_{n})_{n \in \mathbb{Z}} $ in $ \mathbb{R} $ such that  $ 0 < x_{0} < \dfrac{\pi}{2} $, $ \tan(x_{n}) = x_{n} $ for all $ n \in \mathbb{Z} $, and $ (2 n - 1) \dfrac{\pi}{2} < x_{n} < (2 n + 1) \dfrac{\pi}{2} $ for all $ n \in \mathbb{Z} \setminus \{ 0 \} $.  The existence of such a sequence follows from the continuity of $ x \mapsto \tan(x) - x $ over its domain. Its uniqueness follows from the monotonicity of $ \tan(x) - x $ over the intervals $$ \left( (2 n - 1) \frac{\pi}{2},(2 n + 1) \frac{\pi}{2} \right), \quad n \in \mathbb{Z}. $$


How can I capture product photography with the entire product in focus?

I would like to shoot professionally but am having an issue with my Nikon D3300.  I shoot product photography, mainly sunglasses.   My questions is what function, mode, and option should I choose on this camera to be able to shoot professional photos such as the one below. I am interested in sharp images to capture the text on the foreground and the background on the temples of the sunglasses.   The green focus box will only either capture the background or the foreground separately on two different images. I would like both on one image.


Interesting Combinatorial Identities; e.g. $\sum_{k=0}^n {n\choose k}^2 = {2n\choose n}$

I came across the following combinatorial identity:  $$\sum_{k=0}^n {n\choose k}^2 = {2n\choose n}$$  Here's the kind of proof which caught my interest:  $\sum_k {n \choose k}^2 = \sum_k {n \choose k}{n \choose n - k}$, and this represents the number of ways we might choose a committee of $n$ people out of a group of $2n$ people. On the other hand, ${2n \choose n}$ represents the same thing. So the result follows.  Now, I'm looking for some nice combinatorial identities which are, in spirit, similar to such an identity.  Thank you.


Vote split does not include leading sign when count exceeds 99

I don't care, and I can only imagine it's very much [status-bydesign] to preserve some real estate (though larger numbers use a smaller font anyhow). Still, just in case it matters, especially for downvotes:  When the number of up or down votes exceeds 99, then the leading plus or minus sign is not shown in the :              The sign is also "missing" in the Ajax response. For the above images, the JSON :  {"up":"+99","down":"-3"}   :  {"up":"100","down":"-1"}   :  {"up":"1147","down":"107"}   If the JavaScript code ever relies on the minus sign (like ) then in theory this might be an issue.


How Do I Fully Flush Cached Redirects From Safari?

I have a device with a web-based control panel, and accidentally set it to redirect all http pages to https, even though some don't work over https. Although I've since corrected this, Safari seems to have memorised the redirect and is refusing to forget it, instead constantly attempting to redirect me to the invalid https address.  I've already closed Safari, cleared ~/Library/Caches/com.apple.Safari/ and ~/Library/Cookies/HSTS.plist but it still seems to be remembering the redirect when I re-open it.  Where else could Safari be storing this information? I can access the correct page via Firefox or Chrome, so it may not be a system wide service, or if it is it's not one that the other browsers use.  Unfortunately because the web-panel is provided by a device I don't believe I can adjust headers or setup a redirect back to the correct URL, which seem to be options offered in other similar questions, so I really need to find out where this data is being stored so I can destroy it with fire.


I've picked a portable HVAC unit. It's a 2.6 KW 10,000 BTU model. The only way I will be able to vent it is by cutting a hole in one of the glass windows and and using the special fitting. I wanted to test the unit out in the mean time by just throwing the vent hose out of the door but of course the door is still open quite far like this. Is this not going to allow me to get an idea of how well the unit works with the door open so much or will it be drawing to much warm air in?


What is the recommended maximum amount of lines a JS document can have before it starts to lose performance?, i mean, At what number is it better to create a new document instead of keep coding in the same file and  making it bigger and bigger?


Is it possible to edit the Audit fields on UPDATE?

I found a question that was asked  but they are only mentioning that Audit fields can be change on Create/Insert... What about when fields are already created and needs to update the Created Date of the Opportunity? Re-creating fields in production for Opportunity records keeping the CreatedDate as date before doesn't seem like a plausible workaround..


How do I use Chrome to open new tabs in google.com that are not location specific

I am using Google as my search engine. It always wants to redirect to a location-specific search page. So you always have to set this. Chrome always opens new tabs in location specific Google. I want this always to be Google.com. How can can set the default page for each new tab?  To avoid confusion, I am not asking for start up page, but a page for each new tab.


I am getting an error in a test class      System.LimitException: Too many query rows: 50001   Here is the line in the code. There are not 50,000 ProductCategoryMappings, only ~4,400. Seems I am misunderstanding the nature of the limit. Can someone assist and explain why I am hitting the limit? Thanks.   List<Product_Category_Mapping__c> listOfProductCategoryMappings = new List<Product_Category_Mapping__c>(             [SELECT Id, Segment__c, Site__c, Product_Name__c, Product_Category__c,                 Product_SubCategory__c, Product_Cat_SubCat__c, Product_Type__c              FROM Product_Category_Mapping__c]);


Rational Solution of a System of Linear Equations

I am having a little trouble with this problem -     Let $A$ be a $m\times n$ matrix and $v$ be a $n\times 1$ matrix, both of which only has rational entries. It is known that the equation $Ax=v$ has a solution in $\mathbb R^n$. Does this imply that the given equation will have a solution with rational entries?   I think that the result is true, but I am unable to prove it.Thanks for any help.


Recover files from a broken Virtualbox machine .vdi

My Ubuntu 12.04.1 running on virtualbox ran out of space while I was installing software on it and now it is . I've got files I need to recover from it. I have the ubuntu64.vdi file on my Windows 7 (host) laptop and I was wondering if there is any way of recovering the files from the vdi file. In parallel, I generated a fresh 12.04.1 machine on virtualbox in the same laptop, and I'll use that one instead of the borked one. I can add the borked vdi to the list of disks in the working one. Then I used gnome nautilus to mount the borked disk. I can find the files in there, but they are about 2 months old. I think this coincides with the last time that I did a virtualbox snapshot of the machine, but not the last time I got a working machine, which was yesterday. Is there any way of mounting the vdi as of yesterday, just before it crashed? EDITED: Here is what Virtual Media Manager tells me about my ubuntu64.vdi file:  EDITED2: I copied my ubuntu.vdi to an external USB with plenty of disk space. I tried using Windows to clone it, but got an error:  I tried the same from the working VM via a shared folder of the USB drive, and it started the cloning. Took a good while, but finished successfully: root@precise64:/media/sf_E_DRIVE/copy_of_ubuntu64_vm_folder_20140224/ubuntu64#  VBoxManage clonehd ubuntu64.vdi ubuntu64.raw --format RAW 0%...  10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Clone hard disk created in format 'RAW'. UUID: 90f99198-18e1-40ee-85fe-c083dcbb1ac3  EDITED3: After creating the raw file, I run testdisk with Deeper Search, I get a list like this:  Ater Deeper Search has finished, I get a list like this:  But I don't know which one is which snapshot... Any ideas?


How to format the xml in java dom parser?

<?xml version="1.0" encoding="UTF-8"?><Request>  <Id>   here the first tag  was written into file followed by xml version, i need that need to write in next line. like below  <?xml version="1.0" encoding="UTF-8"?>  <Request>   <Id>   i Have use below code to write the xml into file,please help  TransformerFactory transformerFactory = TransformerFactory                 .newInstance();         Transformer transformer = transformerFactory.newTransformer();         DOMSource source = new DOMSource(document);         StreamResult result = new StreamResult(new File(                 Constants.xmlLocation                         + Constants.metaDataXmlFileName                         + format.format(calendar.getTime()) + ".xml"));          transformer.setOutputProperty(OutputKeys.INDENT, "yes");         transformer.setOutputProperty(                 "{http://xml.apache.org/xslt}indent-amount", "5");         transformer.transform(source, result);


I am completely new to Linux and Ubuntu.   I have written python code in Windows and want to run it in Ubuntu. It uses a text file for input. The 'path-to-file' in windows looks as follows   c:user\documents\python\file.txt   How is the location written for Ubuntu?


How do you check if a selector matches something in jQuery?

In Mootools, I'd just run if ($('target')) { ... }.  Does if ($('#target')) { ... } in jQuery work the same way?


Where does inspiration end, where does illegitimate copying start?

I'm creating the UI for a web application which will mainly run on Macs. So my goal is to preserve the look and feel of Mac OS. But since I don't use Apples Frameworks I'm not allowed to use their UI design. So my question is: how closely am I allowed to copy their design without violating copyrights?  Do you think this is still legitimate?


Robot is prize for winning arcade game, then tries to kill everyone?

A local teen gets the high score on an arcade game, and he wins a real life replica of the main enemy in the game. It arrives at his door one day. At first he and his (I'm pretty sure girlfriend, maybe sister?) are enamoured with it, but then it tries to kill them and their friends and family. There is one scene I remember where the robot picks up a long kitchen knife in its arm, and it rotates quickly.   I thought the movie was called "Hover" for some reason, but that's not it. The robot was short and red I think.


yum packages update with excluding packages which need reboot

We are  trying to update few yum packages but need to ensure that the packages which need to reboot are to be excluded. Example : There are close to 500-1000 packages and I need to exclude kernel packages as we cannot update without security approval. Is there any option in yum to handle this scenario?


how to over-ride text box classname in drupal

By default text box class name is : class="form-text" i want to over-ride the class name, with some othername. how to over-ride ? Can any one give the suggestions.


Rigid body dynamics derivation from Newton's laws for higher dimensions

Since Newton's laws are defined for point particles, I'd like to derive some laws of motions for rigid bodies only by considering a rigid body as a system of particles such that the distances from every particle to every other particle doesn't change with time. I think I derived that the force applied on one particle of a rigid body must be the same for every other particle of the rigid body in one dimension by the following:  Consider two particles on a line $P_1$ and $P_2$ both with masses $dm$ and positions $x_1$ and $x_2$. Let's say that a force $F_1$ acts on the particle $P_1$. By Newton's second law we get: $$F_1 = dm\frac{d^2x_1}{dt^2}$$ By the definition of a rigid body, the distance between $P_1$ and $P_2$ doesn't change with time. Define $r$ as this distance ie. $r = x_1 - x_2$. Therefore: $$\frac{dr}{dt} = 0$$ Taking the derivative of both sides we further get that $$\frac{d^2r}{dt^2} = 0$$ $$\frac{d^2(x_1 - x_2)}{dt^2} = 0$$ $$\frac{d^2x_1}{dt^2} = \frac{d^2x_2}{dt^2}$$ By Newton's second law this is the same as: $$\frac{F_1}{dm} = \frac{F_2}{dm}$$ (where $F_2$ is the force acting on $P_2$), and since $dm \ne 0$ finally: $$F_1 = F_2$$  These steps can be done for arbitrary amount of particles, and so we get that in one dimension, if a force is applied on one of the particle of a rigid body, every other particle of the rigid body experiences the same force.  The problem is that I cannot do a similar proof for two dimensions by defining the distance $r = \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}$, but I'm sure that it can be done, and that if done torque, moment of inertia and center of mass would arise. Can someone do a similar proof for two dimensions, if it can be done like this at all?


Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) is causing my scanf to fail

#include <stdio.h> #include <string.h> #include <stdbool.h> int main(int argc, const char * argv[]) {     bool isTrue=true;     int nums[50];     for (int i = 0; i<sizeof(nums); i++) {         nums[i]=2147483647;     }     char operations[49];     int counter = 0;     printf("What is your first number? (THERE IS NO PEMDAS, THE NUMBER 2147483647 is not allowed)\n");     scanf("%d", &nums[counter]); // Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) }   I have more code, but it is unrelated to the problem. Thank you for helping and just ask if more info is needed (I am making a calculator that lines up inputs and calcultes them  eg. 3 + 5 * 9 / 2 = 36. The equation can have at most 50 integers and 49 operations.)


In Xubuntu 16.04.3 (and several previous versions aswell) it is not possible to have no power icon in the notification area.  A power icon is displayed even though 'Show system tray icon' is unchecked in Xfce Power Manager.  When 'Show system tray icon' is checked, there are two power icons displayed.  (See screenshots)  I've searched and I can't find any information related to this in Xubuntu/Xfce.  Is there a way to fix or work around this bug?


Proof that the equation $x^2 - 3y^2 = 1$ has infinite solutions for $x$ and $y$ being integers

I have seen the Pell's equation wiki page but I need to prove this from scratch without mentioning any formula. I have also seen multiple answers on this site but the answers tend to skip over and assume formulas.  This is what people do -> $x^2 - 3y^2 = 1$ has solution 1, 0.  Next they say we "observe" that $$(x',y') = (2x + 3y, x + 2y)$$ is also a solution.  What I'm asking is how they get this value. Can someone help?