Finding Ideals in $\begin{bmatrix} \mathbb{Q} & \mathbb{Q}\\ 0 & 0 \end{bmatrix}$

I am looking to find the left, right and two sided ideals of the ring R = $\begin{bmatrix} \mathbb{Q} & \mathbb{Q}\\ 0 & 0 \end{bmatrix}$. It is in finding the left ideals that I am stuck. Finding the Right Ideals To find the right ideals I considered a nonzero element $\begin{bmatrix} a & b\\ 0 & 0 \end{bmatrix}$ of an arbitrary right ideal $I_{r}$. I  then considered two cases. Case 1: $a\neq0$ We have $\begin{bmatrix} a & b\\ 0 & 0 \end{bmatrix}\begin{bmatrix} a^{-1} & 0\\ 0 & 0 \end{bmatrix}=\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix}\in I_{r}$. Hence for any $\begin{bmatrix} c & d\\ 0 & 0 \end{bmatrix} \in R$ we have: $\begin{bmatrix} c & d\\ 0 & 0 \end{bmatrix}=\begin{bmatrix} c & 0\\ 0 & 0 \end{bmatrix}\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix}+\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix}\begin{bmatrix} 0 & d\\ 0 & 0 \end{bmatrix} \in R$. That is $I_{r}=R$. Case 2: $a=0$ We have $K=\{b\in\mathbb{Q}\mid\begin{bmatrix} 0 & b\\ 0 & 0 \end{bmatrix}\in I_{r}\}$ is an additive subgroup of $\mathbb{Q}$ and $I_{r}=\begin{bmatrix} 0 & K\\ 0 & 0 \end{bmatrix}$. Moreover one can verify that $\begin{bmatrix} 0 & K\\ 0 & 0 \end{bmatrix}$ is a right ideal of $R$. Hence in this case any ideal is of the form $\begin{bmatrix} 0 & K\\ 0 & 0 \end{bmatrix}$ where $K$ is an additive subgroup of $\mathbb{Q}$. Finding the Left Ideals I have tried a similar strategy as above. I considered a nonzero element $\begin{bmatrix} a' & b'\\ 0 & 0 \end{bmatrix}$ of an arbitrary left ideal $I_{l}$. I then attempted to consider two cases. Case 1: $b'=0$ We have $K'=\{a'\in\mathbb{Q}\mid\begin{bmatrix} a' & 0\\ 0 & 0 \end{bmatrix}\in I_{r}\}$ is an additive subgroup of $\mathbb{Q}$ and $I_{l}=\begin{bmatrix} K' & 0\\ 0 & 0 \end{bmatrix}$. Moreover one can verify that $\begin{bmatrix} K' & 0\\ 0 & 0 \end{bmatrix}$ is a leftideal of $R$. Hence in this case any left ideal is of the form $\begin{bmatrix} K' & 0\\ 0 & 0 \end{bmatrix}$ where $K'$ is an additive subgroup of $\mathbb{Q}$. It is for the second case that I am stuck, I have no idea how to proceed. Moreover when finding the ideals, I will simply check whether each left/right ideal I find is a right/left ideal. Overall is this the best way to have approached this question, it feels awfully long.


How to estimate the disk space for 1 million rows if I have a table of fewer rows in InnoDB MySQL

I want to estimate the disk space for 1 million rows.    Currently, I have 8527959 rows, Data Length of 744 MB and Index Length 989.4 MB.  Please let me know if my calculations are correct.  Total Data Length for 1 million rows  Data of 744MB consists of 46500 pages of 16KB blocks (InnoDB page size)  If 46500 pages consist of 8527959 rows, 1 page consists an average of 183 rows.  So, 1 million rows need (1,000,000/183) pages= 5465 pages of 16KB  So, 1 million rows of data need 87.4MB.  Total Index Length for 1 million rows  Indexes of of 989.4MB consists of 61837 pages of 16KB blocks (InnoDB page size)  If 61837 pages consist of 8527959 rows, 1 page consists an average of 138 rows.  So, 1 million rows need (1,000,000/138) pages= 7247 pages of 16KB  So, 1 million rows of data need 115.9MB.  Total disk space (approximate) for 1 million rows  Total data length+Total Index Length = 87.4MB + 115.9 MB = 203.3 MB  Is this correct?


Loop through values of properties of an object?

I know there are a bunch of topics with the same question, but I am just so confused.  I want to loop through my objects properties and write the value.  But everything I have seen says to           Dim pinfo() As PropertyInfo = MyCompanies(1).GetType().GetProperties()   This creates an array with the info of the properties, but it does not store the actual value of that object.property,     The name of the property is ticker, but the value of Mycompanies(1).ticker is AMZN.  My Code:   Dim pinfo() As PropertyInfo = MyCompanies(1).GetType().GetProperties()   'Loop through Properties   For pi = 0 To pinfo.Length - 1         'I want to get the values of each property         Console.WriteLine(?)     Next pi   Note: MyCompanies(1) is just the second object in an object array, all objects are of the company class   doesnt help either. It leads me to believe that I should do:      For Each pi In pinfo         'I want to get the values of each property         Console.WriteLine(PropertyInfo.GetValue(MyCompanies(1))     Next pi   but that wont even build. Is it because I am trying to give it the object by using the position in the array?  ...and outside of this loop I will have to loop through my object array, so i figured i could just replace the 1 with an i...


How to bootstrap reputation as a new user?

I recently referred someone else to the StackExchange network. However, I was  quickly pointed to a pretty embarrassing problem:  The new account started with one reputation. But with just one reputation, one is unable to upvote, unable to comment, unable to answer a question, and not even able to put this question on meta.  Someone please advise: how do you start participating in Stack Exchange if you don't have a question? Do you really have to make something up?


How to pinpoint root cause of excessive log file growth

The log file stays pretty small (~500MB) until about 11PM, and at that point it begins growing until no disk space is available. The log file reached it's maximum size at 12:39AM, so the growth took place over approximately an hour and a half time frame. The drive that houses the logs only has about 40GB of total space available, so the log file can only grow to that 40GB. That should be plenty though as the data is fairly static and only about 50GB total. Here are a few more additional notes:   DB recovery model is full Transaction log backups are taken every 15 minutes A defrag job is called at 11PM but looking at the history it only runs for a few minutes max   How can I pinpoint the exact cause of this? It has to be a large transaction that is open but how can I determine that?


Why does $\frac{1}{x} < 4$ have two answers?

Solving $\frac{1}{x} < 4$ gives me $x > \frac{1}{4}$. The book however states the answer is: $x < 0$ or $x > \frac{1}{4}$.  My questions are:  Why does this inequality has two answers (preferably the intuition behind it)?  When using Wolfram Alpha it gives me two answers, but when using $1 < 4x$ it only gives me one answer. Aren't the two forms equivalent?


From a quality perspective, what is better: turning volume up in the software, in the OS, or on the speakers?

If music isn't loud enough, how do I get the best quality (even if the difference is in fact so small it's negligible)?   By making the music louder in my music player, game or other sound-producing software program? By raising the volume at the operating system level (for instance, by clicking the speaker icon in the Windows notification area and turning the volume up)? By turning the volume up on the amplifier or speakers that are attached to your computer, and thus changing the volume on the hardware?   Does programs vs. OS matter? Does software vs. hardware matter?


Free alternatives to M/Monit interface for the Monit systems management system

I really like  systems management system but I have no IT  budget to purchase M/Monit interface which is used to manage multiple hosts for our small university lab. I have checked out Ruby based   and I see that Django people are cooking something. Can  anybody give me some advice to a simple wrapper which can help me  pull info from  multiple servers?    Edit: How is this question duplicate? I am not asking about monitoring  tools. I have evaluated probably half dozen of those in the past two  weeks. I am asking a very specific question about a very specific  monitoring tool. I concede that as unpleasant as it might be the  comment I received from  ewwhite was a valid observation.


Find $L=\lim \limits_{n\to \infty}\sqrt[n]{x^n+y^n+z^n}$

Find the limit following:  $$L=\lim \limits_{n\to \infty}\sqrt[n]{x^n+y^n+z^n}$$  With $x,\: y\: z\in R$  P.S  I think this limit result is $L=max\left\{x,\: y\: z \right\}$. But i'm not find it, so expect people to help me find out the results by some solution  Extend this limit:  $$S=\lim \limits_{n\to \infty}\sqrt[n]{\sum_{i}^{m}a_{i}}$$ with $a_i\in R,\: i=1,\: m$


I like The Alien trilogy, but the fourth film is total crap (IMO), and I guess the primary reason for this is that I do not see the logic in the cloning process.  So at the end of Alien3 we discover that Ellen Ripley has an alien queen inside of her. Cool. But she then kills her self so...  In Alien 4 Ellen is cloned, but why would that result in a cloned Alien embryo? If you clone a pregnant mother you don't clone the baby, just the mother. Right?


This novel is about a character who jumps back in time to relive his life.  It's called “replayer” or something like that but Google didn’t help with the variations I tried.  He’s in his office talking on his phone to his wife, and she is saying “We have to…” and he feels like he has a heart attack, and wakes up in a “very messy room” which he quickly discovers is his young self.  Each time his life ends at the exact same date and time, but each jump is not as far back.  He meets another replayer and they have a love spanning many lifetimes. He (as a rich hermit) first notices her because of a movie she made.  to try and find others, they posted a newpaper ad with the “remember when” theme, listing slogans from the future.  A few replied with wrong ideas about what the ad was concerning.  One replied with proof of his own, adding Tylonol Scare and Princess Di to the list.  They knew which stocks to but for long-term investment, simply from remembering brand names in the future.  Investment consultants were the cover they used when visiting the other guy they had found (who was in an institution for the criminally insane, BTW).  What novel is this?


I'm using Matlab Neural Network Toolbox. I want learn feed forward net for my classification problem. But network doesn't learn anything useful, so I start checking network setting.  I choose xor problem. I find that network doesn't learn xor if the output transfer function is set to logsig (log-sigmoid function)! Sample code:  x = [0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1; 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1]; y =[0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0]; net = feedforwardnet([2 2]); net = configure(net,x,y); net.layers{3}.transferFcn = 'logsig'; %problem is here [net,tr] = train(net,x,y); net(x)   The output is: 0.5000 0.5000 0.9985 0.5000 0.5000 0.5000 0.9985 0.5000 0.5000 0.5000 0.9985 0.5000 0.5000 0.5000 0.9985 0.5000  I try few times and I never got any value smaller then 0.5. If I comment 6th line which set transfer function to logsig the net learn perfect.  Does anyone know why network with logsig doesn't work?  P.S My matlab version MATLAB 7.12.0 (R2011a).


Can I backfeed a portable generator into my house's electrical system?

Is there a safe way to power my house using a portable generator? The power rating for the generator is 6kW, and I want to run my electric water heater (4.5kW) and my refrigerator (0.5kW) and possibly a few lights.  The water heater is the main priority, but it's wired directly to the house so I can't just unplug an outlet and plug it into the generator.  The method I've heard used most often is to backfeed into the dryer outlet after turning off the main breaker. I'm aware that if I don't turn off the main breaker, I could shock a worker or destroy the generator when the power comes pack on. I also know enough that I have to use a power line rated for the Amperage I'll be drawing. Are there any other dangers I need to look out for?  I had a friend suggest that I deactivate one of the heating elements and thereby reduce the amount of power that the water heater will draw. I'm guessing I'd still need 240V rather than 120, but I'm not sure. It would be awesome if I could just use a 12 or 14 gauge extension cord instead of a really expensive 10 gauge, but I don't want to do anything that will catch my house on fire.  Also, can anyone give me a detailed explanation of steps I need to take for this whole process?  (Any advice would be greatly appreciated. It's been eight days since we've been without power, and possibly 3-4 more until it's restored.)


My work has been deleted - how can we discourage that?

I answered  and just after commenting "Yep that seems to be working! Thank you so much!" the question author deleted the question (and, thus, my answer).  Is this behavior considered appropriate on SO?  Shouldn't it be discouraged?


Is it possible in unix to search inside zip files

I have 100s of directories and within those I have a few zip files. Now there are  images named abc.jpg in those zip files. The zip files may be in any folder or in any subfolder so its difficult to extract them all in one place.  I just want to collect those image files. Is this possible?


Tendency of rotation of an object in space

My teacher explained that when an external load is applied on an object in space ,eccentric to its centre of mass, the object will be accelerated linearly(along a straight line) because there will be  no resisting forces(like friction).He also added that when the same load is applied to an object lying on a suface in earth, the object rotates  (because of the resisting forces) and also moves linearly.But mass resists change in state of  motion.So even in space the centre of mass will be the point at which the effect of entire mass will be cocentrated.So even if there is no other resistive forces,the object should rotate.Is this right?


I am able to self-fund a PhD, how can I use this when applying?

Some candidates have the personal or family resources to self-fund their graduate studies, or already know that they are willing to take on debt for them (disregard whether this is a good idea, which has   ). They still, however, need to actually be admitted to a graduate school, and having funding doesn't guarantee admission.  The ability to self-fund obviously makes it possible to take unfunded offers, but are there any other ways to actively leverage this funding situation during the application process? Should the applicant inform schools that they would take an unfunded offer, and, if so, when should they (e.g. when applying, after being put on a waitlist)? Are there specific strategies that a candidate might be able to use when choosing schools to apply to?  I suspect that answers to this question might be field-specific, so I won't necessarily specify a field. Answers discussing the differences between fields might also be interesting.  Note that I am not in this situation, so I won't really be able to answer those kinds of clarifying questions. I just thought it was an interesting question that was inspired by but not directly addressed in .


Blender 2.70 not installed, but can open it, yet can't find it in dash or add it to launcher

I have downloaded  and moved it to folder /opt and yet I can't find it in dash or place it in launcher. I have searched for solutions on the net, but I don't quite understand those.


Does entanglement not immediately contradict the theory of special relativity? Why are people still so convinced nothing can travel faster than light when we are perfectly aware of something that does?


Retinal eccentricity to colour sensitivity

Colour perception goes out to 50 degrees but is the sensitivity to RGB. Question is it the same in the four quadrants of the retinal field? That is if the red colour sensitivity eg is 30 temporal retina 50 degree nasal retina etc. And what are the eccentric limits for each colour [frequency]in the four quadrants.


No options of installation type when installing ubuntu 14.04

My computer is Dell L521X with WIN 8.1. I want to install ubuntu alongside with win 8.1. Before installation, I've disabled Intel® Rapid Start Technology and change the boot option to legacy. But, at the step of installation types, there is no option. On the Gparted, I could see the normal partition. What's wrong with it?


How to prove that $P \rightarrow Q$ is equivalent with $\neg P \lor Q $?

In my book about Logic, which is called 'Language, Proof and Logic', by the way, there is explained that the conditional $ P \rightarrow Q $ is equivalent with $\neg P \lor Q$.   that gives as answer: 'just compare the truth tables and you can see that they are equivalent'. However, I would like to know how to prove this using formal propositional logic. This should be possible, right?


Congruence Equation Problem Question Solve for x

I am trying to solve:  $x = 1(\mod13), x = 2(\mod31)$. Using the chinese remainder theorem, I got $x = 31*8 + 13 *y$, where I don't know what $y$ is, since I don't know how to solve $x = 13(\mod31)$. Please help!


I have three functions: getMeses(), getDias() and getHoras(), these functions I want to call or invoke them from a Map like myMap.get("meses").invoke and it calls the getMeses() function.  I'm trying using  the Hack Reflection one.  But when execute the *.invoke method an error appears:  02-20 13:36:01.153 27778-27778/com.urbanclouds.finntime E/AndroidRuntime: FATAL EXCEPTION: main Process: com.urbanclouds.finntime, PID: 27778 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.urbanclouds.finntime/com.urbanclouds.finntime.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2543) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2609) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1465) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5683) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])' on a null object reference at com.urbanclouds.finntime.MainActivity.onCreate(MainActivity.java:39) at android.app.Activity.performCreate(Activity.java:6270) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2609)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1465)  at android.os.Handler.dispatchMessage(Handler.java:111)  at android.os.Looper.loop(Looper.java:207)  at android.app.ActivityThread.main(ActivityThread.java:5683)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)   This method can't be use on Android? If not, how can I do what I want?  This is my actual code:  String time_data_keys[] = {"meses", "dias", "horas"}; HashMap<String, TextView> time_data;  @TargetApi(Build.VERSION_CODES.KITKAT) @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      int id;      time_data = new HashMap<>();      for ( String key : time_data_keys) {         id =  getResources().getIdentifier(key,"id",getApplication().getPackageName());         time_data.put(key, (TextView) findViewById(id));     }      Map<String, Method> methodMap = new HashMap<>();      try {         methodMap.put("meses", MainActivity.class.getMethod("getMeses"));         //methodMap.put("dias", MainActivity.class.getMethod("getDias"));     } catch (NoSuchMethodException e) {         e.printStackTrace();     } /*     try {         methodMap.get("meses").invoke(null);     } catch (IllegalAccessException | InvocationTargetException e) {         e.printStackTrace();     } */     time_data.get("meses").setText(getMeses());     //time_data.get("dias").setText(getDias());     //time_data.get("horas").setText("Horas: %128:%32:%17"); }  private String getMeses() {      // some stuff     int num_meses = 2;     String meses = String.valueOf(num_meses);      Log.i("getMeses()", "He conseguido entrar!!");      return getResources().getString(getResources().getIdentifier("meses","string",getApplication().getPackageName()))             .replace("%m",meses); }   EDIT: Using this instead of null have the same result


I am using Ubuntu 16..  I want to run the following command  apt-get update   It is working after executing the following  sudo -i   and exporting http_proxy.  But when I execute   sudo apt-get update   after exporting http_proxy, the command results in error. How can I run apt-get update without having to use a root shell?


Difference between regulator's tab and pin?

Take the classic LM1117 linear regulator   Pin 2 is Vout.  The tab is also Vout.  From a component layout perspective, it would be nice if I could connect the output capacitor to the tab instead of the pin.  What is the functional difference between the tab and the pin?  Does one have less current carrying capability than the other?  Can I leave the pin floating and instead connect the tab to the output capacitor?  Must I hook the output capacitor to the pin?  Can I just short the pin to the tab?


Validating (not sanitizing) that user-supplied HTML only contains limited subset of tags in Python

I am developing a web application using Python/Flask/SQLAlchemy on the server side.  I am using the  rich text editor to allow users to enter text with a very limited subset of HTML in it.  While wysihtml sanitizes the resulting HTML on the client side, some kind of server-side checking is required to ensure that only that subset of HTML is accepted.  To repeat, it not only should be valid HTML, I want it to only contain a very limited set of tags.  Furthermore, it doesn't have to be a complete HTML document.  Furthermore, I would like to know when non-compliant HTML is submitted, as it is either a bug in the client-side validation, or a (likely malicious) attempt to bypass it indicating an attack.    I could use  to sanitize the user supplied HTML, but that does not work as a validator (there is no easy way to tell whether the sanitized HTML has been substantively changed) , and the developer has made clear that he regards validation as outside the scope of his tool.    I have looked, but there doesn't appear to be a standard tool for doing validation in these circumstances.  I would prefer not to roll my own if I don't have to for two reasons: first, it will take extra time, and second, I don't want to run the risk of making rookie mistakes.  So can anybody point me to a standard method for doing this server-side in Python?  And, if not, why doesn't one exist?  Is the thinking behind my need for one misguided, and if so why?


I'm trying to figure a way to create a generic class for number types only, for doing some calculations.  Is there a common interface for all number types (int, double, float...) that I'm missing???  If not, what will be the best way to create such a class?  UPDATE:  The main thing I'm trying to achieve is checking who is the bigger between two variables of type T.


Does my Drupal 7 site have transaction support enabled by default?

I happen to read through the commented lines in settings.php under the "Database settings" (around line no. 45) the following text:     Some database engines support transactions. In order to enable transaction support for a given database, set the 'transactions' key to TRUE. To disable it, set it to FALSE.   Note that the default value varies by driver.  For MySQL, the default is FALSE since MyISAM tables do not support transactions.   My databases array, auto-generated by Drupal Installer, is the following one:  $databases = array(   'default' => array(     'default' => array(       'database' => 'test_db',       'username' => 'root',       'password' => '',       'host' => 'localhost',       'port' => '',       'driver' => 'mysql',       'prefix' => '',     ),   ), );   Is it true that my site is not transaction aware until I add a key/value, 'transaction' => TRUE (preferably after 'prefix' => '') to $databases?


Document database structure for auditors

I am DBA for a Microsoft SQL Server 2008r2. Due to an audition, I need to provide data structure of my database, to people without an explicit IT background. I guess they would like the traditional format, with the tables as rectangles, with the fields listed inside, and the arrows between them to represent foreign keys. Is this something that is provided out-of-the-box by Microsoft?


What's the difference between i-- and --i in c#

How does "i--" differ from "--i" in c#?  is this the same?  it seems to equate to the same thing.  i--;   other answers seem to say i++ or ++i, but i am asking about i-- or --i


On Docker's documentation pages, all example commands are shown without sudo, like this one:  docker ps   On Ubuntu, the binary is called docker.io. It also does not work without sudo:  sudo docker.io ps   How can I configure Docker so that I don't need to prefix every Docker command with sudo?


Let $X=\{0,1\}$ be equipped with the indiscrete topology; Why is every $f:Y \to X$ continuous?

By continuity of $f$, I understand that $f^{-1}X$ must be open in $Y$. Well, the statement is general, i.e. for any space $Y$. Don't know what's in it, don't know what topology it has.  Regardless, $f:Y \to X$ is continuous as long as $X=\{0,1\}$ has the indiscrete topology $\{\phi, X\}$. Why?  As mentioned we don't know what topology $Y$ has thereby, we don't know what sets are open closed or clopen or neither. So th pre-image $f^{-1}X$ has no means to be determined whether it is or isn't or neither open in $Y$ or not.  I mean, what if $f$ isn't injective and is constant, say it maps $f(y)=0 \in X$? But $0$ isn't open or closed to start with because $\{0\} \not\in \tau$. Then what? It makes no sense then to talk about whether the pre-image of open sets are open sets because $f$ isn't mapping any $y$ to an open set in $X$!   Confused, can someone tell me what is going on?


I recently bought a Carreras centos limited edition mountain bike. I want to find out how to make my suspension bouncier and I want to experience a MUCH more comfortable ride. I have tried fiddling around with the knobs that say preload on them but it isn't making the ride any different. I am quite small and I don't know whether that is affecting the suspensions bounciness. Please help.


The meaning of the ending of "Riddick" (2013)

At the very end of the movie , Riddick asks the question:   Is Vaako alive or dead?  And gets the following answer:   Both.  I don't understand the meaning of the end at all. How should I interpret this answer and the whole conclusion of the movie.


In universe, students are sorted into houses based on their qualities.  But when Harry Potter was sorted he was told, "He would do well in Slytherin."  The question is why?  There doesn't seem to be specific classes or instructors just for the specific houses.  While you could assume there would be mentoring or tutoring not in classes within each houses dorms, the fact that those students would have came up in the same house system and not have any different training other than that afforded all students.  Also the mentoring or tutoring isn't really acknowledged.  Why would any student develop differently in any house, other then being affected by like personalities and qualities?


What is the name of this fallacy: "A is B, therefore everything is B"?

We've all heard some form of the following statements:  "I like cookies, therefore everyone likes cookies" "That plane is yellow, so all planes must be yellow." "I have come to this conclusion, and if I have, then everyone else must have too"  The logical fallacy in these statements is: A is B, so everything is B. Is there a name for this type of fallacy?


I've noticed weird behavior when using .toFixed(i). I was trying to round (38.174999 * 100) and got weird results  console.log(`i: ${i} = `, (38.174999 * 10 ** 2).toFixed(i)) i: 1 =  3817.5 i: 2 =  3817.50 i: 3 =  3817.500 i: 4 =  3817.4999 i: 5 =  3817.49990 i: 6 =  3817.499900 i: 7 =  3817.4999000 i: 8 =  3817.49990000 i: 9 =  3817.499900000 i: 10 =  3817.4999000000 i: 11 =  3817.49990000000 i: 12 =  3817.499900000000 i: 13 =  3817.4998999999998   from 13 onward it's similar. Does anyone know reason and already tried to check what is going one according to JS spec   For all those that are marking this question as 0.1 + 0.2 problem it's not the same. Question is why .toFixed(13) changes value in comparison to .toFixed(12)


The equation $\phi (x)=n$ has only a finite number of solutions.

While reading about Euler's totient function, I came across this question:     Prove that for a fixed $n$, the equation $\phi (x)=n$ has only a finite number of solutions.   I have thought a lot about it but could not arrive at a proof. I know that $\phi(m_1m_2)=\phi(m_1)\phi(m_2)$ (for $m_1,m_2$ co-prime), but it doesn't seem to help. Any hints/ideas on how to tackle this problem?  Note: I dont think this is a duplicate of , as that question doesn't prove the result. It just clarifies the OP's misinterpretation of another result.


Can the 0V reference output of a switching power supply be connected to the neutral conductor?

Like the title says, I would like to know if it is possible to connect the 0V reference output of any switching power supply to the neutral conductor. Here is an image of what the connection should look like:    What would happen if I place this connection? Is it safe? If that isn't such a good idea, is there another way to reference de 0V output to the neutral?  Regards.


I have been working on this for quite a few works now. I have a dynamic table to which I add more columns using a button. In one of these column's I wish to create a image upload button. I add columns to my table using javascript and to one of those columns I add the following form    tblBody.rows[row].cells[6].innerHTML = ' <form enctype="multipart/form-data" method="post">                                           <input type="file" name="file_upload" id="file_upload">                                           <input class="button green" type="submit" name="submit" value="Submit Content">                                           </form>';   For uploading the image using AJAX and jQuery I used the following code on   So I include the following javascript to my code  $(function() { // Variable to store your files var files;  // Add events $('input[type=file]').on('change', prepareUpload); $('form').on('submit', uploadFiles);  // Grab the files and set them to our variable function prepareUpload(event) {     files = event.target.files; }  // Catch the form submit and upload the files function uploadFiles(event) {     event.stopPropagation();      event.preventDefault();        var data = new FormData();     $.each(files, function(key, value)     {         data.append(key, value);     });      $.ajax({         url: 'submit.php?files',         type: 'POST',         data: data,         cache: false,         dataType: 'json',         processData: false, // Don't process the files         contentType: false, // Set content type to false as jQuery will tell the server its a query string request         success: function(data, textStatus, jqXHR)         {             if(typeof data.error === 'undefined')             {                 // Success so call function to process the form                 submitForm(event, data);             }             else             {                 // Handle errors here                 console.log('ERRORS: ' + data.error);             }         },         error: function(jqXHR, textStatus, errorThrown)         {             // Handle errors here             console.log('ERRORS: ' + textStatus);             // STOP LOADING SPINNER         }     }); }  function submitForm(event, data) {     // Create a jQuery object from the form     $form = $(event.target);      // Serialize the form data     var formData = $form.serialize();      // You should sterilise the file names     $.each(data.files, function(key, value)     {         formData = formData + '&filenames[]=' + value;     });      $.ajax({         url: 'submit.php',         type: 'POST',         data: formData,         cache: false,         dataType: 'json',         success: function(data, textStatus, jqXHR)         {             if(typeof data.error === 'undefined')             {                 // Success so call function to process the form                 console.log('SUCCESS: ' + data.success);             }             else             {                 // Handle errors here                 console.log('ERRORS: ' + data.error);             }         },         error: function(jqXHR, textStatus, errorThrown)         {             // Handle errors here             console.log('ERRORS: ' + textStatus);         },         complete: function()         {             // STOP LOADING SPINNER         }     }); } });   But for some reason this does not work when I include the form with javascript. It works fine when the form is in normal html file. Does anybody have a idea why it's not working?


I have seen people say that Steam downloads games when your PC is sleeping or shut down, but my game doesn't download when I shut it down or put it to sleep. I don't really know why, but it worked on other games, I just don't know why it won't work on this game. I like to download games at night, because my internet sucks in the morning. Why won't Steam download games when I set my laptop to sleep mode or shut it down?


Front tyre size - is 1.9" a good option?

I have in my bike a 1.9" tyre in the front wheel and a 2.2" in the rear. Is it safe to use this tyre sizes?


How do you tell if you should use a one-tailed test or a two-tailed test in a t-test?

For example, how would you decide between which tailed test to do in the following experiment:  Ethanol dilutions were made with different proportions and Daphnias were submerged in them to collect their heart rates. The Daphnias were also submerged into beakers with different temperatures.  My null hypothesis was that the Daphnia will not be affected by the changing variables and if they are, it is due to a purely kinesis response (caused by chance).   My alternative hypothesis was that Ethanol would decrease the heart rates of the Daphnias as the dilution concentrations increase. I assumed this because Ethanol is a respiratory and nervous system depressant that acts as an anesthetic and potentially leads to death after an overdose. I also assumed that the Daphnias' heart rates would fall and become steadier in lower temperatures because they usually inhabit cooler, freshwater habitats.


How to remove the URL from the printing page?

I want to remove the URL that gets printed on the bottom of the page.   like:  yomari.com/.../main.php?sen_n   How can it be omitted or prevent from getting printed?  To be more specific, is there any way I can prevent the page URL, date and the page title being printed along, while printing the web page?


I've been trying to prove   $$\sum_{k=1}^{n}{(-1)^{k+1} {{n}\choose{k}}\frac{1}{k}=H_n}$$  I've tried perturbation and inversion but still nothing. I've even tried expanding the sum to try and find some pattern that could relate this to the harmonic series but this just seems surreal. I can't find any logical reasoning behind this identity. I don't understand . Is there any proof that doesn't require the integral transform?


I get a similar scatter plot (as above) showing the relation between two different quantitative variables. It is also fan-shaped.  I am trying to fit a linear model for this relation. I think I should apply some kind of transformation to the variables in order to unify the ascent variance in the relation before fitting a linear regression model, but I can't find the way to do it. Or maybe, there is a better model to use in these cases, I can't either find it.  I have tried rlm, but when plotting the residuals vs the predictor they are very skewed. I have tried to use the weights retrieved by the model to transform the output:  fit <- rlm(y ~ x, data=df) plot(fit$resid ~ df$x) # Heteroskedastic & Skewed  df$y <- df$y * fit$w  plot(df$y ~ df$x) # Wrong   But it is obviously wrong.  I have also tried to apply a SD ratio calculated from all the y of each x and other similar erratic approaches.  Is there any typical way of fitting a model for this kind of relation (fan-shaped) or a typical model (and R package) to use in this cases?  Is there any typical transformation that could be applied to the variables in order to reduce the variance?  Sorry, I duplicated the post: Follow , instead.


How do you calculate that $\lim_{n \to \infty} \sum_{k=1}^{n} \frac {n}{n^2+k^2} = \frac{\pi}{4}$?

How do you calculate that: $$\lim_{n \to \infty} \sum_{k=1}^{n} \frac {n}{n^2+k^2} = \frac{\pi}{4}$$ ? In general I would look for a formula for the expression inside the sigma, and then calculate. But I have no idea what kind of formula there is for this expression. Hint?


This is not a Ubuntu Touch related question.  Is there a mobile version of the Ubuntu OS for Nokia N97?.  If there is:    How to install it?. Where to download it?. How to set preferences?. Is there a "Ubuntu apps store"? (Not the Ubuntu Software Center , I mean apps for mobile phones, including touch screen games and that kind of stuff).


Is it okay to ask a question and answer it yourself to share you knowledge?

Pretend I know how to do something that a lot of people can't do or don't know how to, can I do a question like "How can I start a jar file with a batch file?" and answer it? Is that allowed?  P.S.  is different from mine (At least I think it was unclear.)


I think "so" in "you're so not cool" emphasizes the whole sentence.  Whereas, "so" in "you're not so cool" emphasizes "cool", meaning "very cool".  I am not sure whether I'm right.  So,  What is the difference between "you're so not cool" & "you're not so cool"?


var functionName = function() {} vs function functionName() {}

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


\selectcolormodel{gray} not applied to \draw

Today I found something weird. When I use \selectcolormodel{} in a TikZ drawing the model is only applied to \fill and not to \draw[fill=]. Does anyone know why?  \documentclass{article}  %\usepackage[gray]{xcolor} % all draws or fills become gray \usepackage{xcolor} \usepackage{tikz}  \begin{document}  \begin{tikzpicture}      \draw [fill=cyan] (0,0) rectangle (1,1);     \fill [cyan] (2,0) rectangle (3,1);  \end{tikzpicture}  \selectcolormodel{gray}  \begin{tikzpicture}      \draw [fill=cyan] (0,0) rectangle (1,1); % expected this one to change     \fill [cyan] (2,0) rectangle (3,1);  \end{tikzpicture}  \end{document}   And the result is the one below.


Jmeter Expected closing bracket for IPv6 address at index 28

I am trying to Load test on the link:  and getting this error message:   Expected closing bracket for IPv6 address at index 28  Please could you help  Tuti


How can I determine the minimal installation set for a list of packages?

I have some installation notes for installing the GLEW libraries for development purposes. They read:     Install everything with "glew" in its name.   This means I currently run:  sudo apt install glew-utils libglewmx-dev libglew-dbg libglewmx-dbg libglew-dev libglewmx1.10 libglew1.10   ...except that I'm sure some of these are prerequisites, and I don't need to include them in the list.  Given that I have a list of package names as above, how can I reduce it to install only the non-dependencies, without having inspect each package's dependencies individually in Synaptic Package Manager, aptitude or a similar tool?  I guess I'm looking for either a "Select a group of packages" option in a GUI program or  magic-debian-tool <LIST-OF-PACKAGES>


I have a question about the \displaystyle command. So every time I write a quiz or test, in order to make a fraction, limit, integral, etc. look decent, I have to do something like,  $\displaystyle\frac{2}{3}$    or   $\displaystyle\int_{0}^{\infty} e^{-5x}dx$.    If I do not input this command, the text is absurdly small. Is there a package or command I can put in my template so that it just automatically assumes to do the \displaystyle command?  I run MiKTeX on a Windows computer. I have decent LaTeX knowledge, but am foggy in templates.


how to update serialized options programatically?

I want to automate updating plugin options. There are some things that I repeat a lot.  With  I know I can update simple options like this:  php wp-cli.phar option update blog_public 1   However, some plugin options save their options in a serialized string.   Example of serialized option_value in wp_options:  a:9:{s:4:"from";s:21:"xx@xxx.com";s:8:"fromname";s:51:"xxx";s:4:"host";s:13:"smtp.xx.com";s:10:"smtpsecure";s:3:"ssl";s:4:"port";s:3:"465";s:8:"smtpauth";s:3:"yes";s:8:"username";s:21:"xx@xxx.com";s:8:"password";s:13:"xxx";s:10:"deactivate";s:0:"";}   How to update those options?


.click function will only work inside a parent .click function and cannot be executed outside it

I've been developing an application which allows table rows to be edited using jquery. The original post is here   The flow of the application is:   Table is loaded. 'Edit' button (with a class editBtn) appears on each row. Clicking the 'Edit' button removes the class editBtn and adds a class saveBtn. The text is also changed from 'Edit' to 'Save'.   The intention is that when clicking the Save button I can do an ajax request.   However, I can only target the .saveBtn being clicked if the jquery for it resides inside the original .click function on .editBtn. So for example, this works:  $('.editBtn').click(function() {     var $button = $(this).addClass('save').text('Save');     var $tr = $button.closest('tr');     var id = $tr.data('id');     var $td = $tr.find('td:first');     var $td2 = $tr.find('td:nth-child(2)');      $td.html('<input value="' + $td.text() + '" />');     $td2.html('<button class="btn btn-primary btn-success saveBtn">Save</button>');      $('.saveBtn').click(function() {         console.log('savebtn');     }); });   But this does not work:  $('.editBtn').click(function() {     var $button = $(this).addClass('save').text('Save');     var $tr = $button.closest('tr');     var id = $tr.data('id');     var $td = $tr.find('td:first');     var $td2 = $tr.find('td:nth-child(2)');      $td.html('<input value="' + $td.text() + '" />');     $td2.html('<button class="btn btn-primary btn-success saveBtn">Save</button>');  });  // Moved outside $('.editBtn').click     $('.saveBtn').click(function() {         console.log('savebtn');     });   Why is this?


Once I got mis-charged on my bank-issued debit/credit card.  What happened is that a COMCAST service representative offered to connect me with "premium" technical support for $50, so I said OK, then she disconnected me instead of transferring me to the technical support. I tried calling back, but after 45 minutes of waiting I gave up. Nevertheless, I was still billed the $50. Naturally, I wanted to do a chargeback to get refunded.  I went to my bank in person to demand the charge back, but they told me to "work it out"  with the vendor, ie COMCAST, and refused to do the charge back. I do not want to call COMCAST again because the wait times are very long and I doubt they would cooperate with me anyway.  How can I make my bank do the charge back, or should I talk to somebody else (attorney general's office, etc)?  I live in Massachusetts.


In Phase 10, can you play out your hand before all players has played a turn?

In Phase 10, is it legal to lay out your phase and play out your hand (placing remaining single card in the discard pile) in the first round, before all players have had a chance to play in that round (i.e. pick up a card and discard)?


Why, when one opens 1 car window, does that noise occur?

When you're driving and you open 1 car window, say the front one, there comes a horrible noise, but when you open another window just the slightest bit, this noise goes away (I'm sure most people know what I'm talking about then I mention this 'noise').   Why does this noise occur? Why does it go away when another window is slightly opened?   (Not sure about the tag).


I want to know how I can compress my dll files in my program, then upon running of the program the files are extracted from the program so that the program may use them, and when the program is closed, the files are compressed back in.


Proof with the definition of limit and derivative

I want to prove with the definition of limits and derivative that if $$\lim_{x \to \infty} f'(x) = 0$$   then $$\lim_{x \to \infty} f(x+1)-f(x) = 0$$  I can solve it with the Mean Value Theorem at $[x, x+1]$ but i don't understand how i must use the definitions.  It's necessary to use only definitions.


Hypothesis not rejected, what does that mean for expected value?

So I have a linear regression analysis where the confidence interval includes 0, therefore the null hypothesis that the intercept is 0 cannot be rejected. Does this mean that the intercept value should not be included in the y = b + mx + error equation when predicting? The x is statistically significant so the slope is not 0. I just don't know what the intercept not being statistically significant means.


Counterexample to the structure of commutative rings

Every finite commutative ring $R$ must be of the form $\frac{ \mathbb{Z} }{n_1 \mathbb{Z}} \times \frac{\mathbb{Z}}{n_2 \mathbb{Z}} \times \dots \frac{\mathbb{Z}}{n_k \mathbb{Z}}$. I am unable to find a counterexample. I heard that a field of order $4$ works, but I cannot see the reason. Can anyone explain why a field of order $4$ cannot be of the form above.


I would like to ask if the following statement is true.  Consider a quadratic integer ring $R$ that is a Euclidean domain and $p$ a prime element of $R.$ Then $R/(p)$ is a field and is isomorphic to a finite field $\mathbb{F}_q$ where $q=|N(p)|$ (the absolute value of the norm of the element $p$).  If this is true, in what book can I find a proof of it? Thank you so much!


What's the difference between may and can in the context?

I would be grateful if someone would explain the difference between "swimming can/may be dangerous".


Why does violet (purple) color contain red component?

We see rainbow color on short-wavelength side as violet or purple:    And this color is obviously contain R component from RGB.  How can this happen, if only blue pines can percept this color, while red pines are on the opposite side of the band?


How to follow page redirects using requests

I have this simple code:  import requests r = requests.get('https://yahoo.com') print(r.url)   Which after executing, prints:   https://uk.yahoo.com/?p=us   I want to see:   How many redirects have happened before arriving on https://uk.yahoo.com/?p=us (clearly, there is redirect as I typed https://yahoo.com originally)? I also want to save the content of each page, not only the last one. How to do this?


WINDOWS: Taking Back/Restoring Default Ownership Permissions of directory

I have a 1TB external (USB) HDD which i used for additional data storage (mostly media files).  Unfortunately, i appear to have changed the permissions on one of the sub-folders, and this is my problem.  The PC which i used the drive on most of the time, has died. Now, putting this external drive into a new PC, i cannot access the said sub-directory (Music) as i do not have permission.  Is it at all possible to resore the permissions of this directory to the default (ie FULL access to EVERYONE with no specifically defined "owner"?  I think the problem now is that the Owner of the folder is my user account from my (now dead) previous PC.  I dont know if this helps but the permissions were adjusted (originally) on a Windows 8 PC, where i was logged in using my Micrsoft Account. Even when plugging in the drive to another Windows 8 PC (this time Surface Pro), and logging in using the same Microsoft Account, i still cannot access the files in the music folder.  Is this possible?


LaTeX - how do I force PDF page height/width?

I am attempting to finish my LaTeX project, and I can't seem to get the PDF to compile to the right size no matter what I do.  In my .cls file I have this set:  \paperheight 11in \paperwidth 8.5in   But no matter what I change it to, it compiles to about 8.25x11.7".  I can post my .cls files or anything else for that matter if someone knows hat I am doing  Here is my .cls file:  - I am using BakomaTex Word for my editor.  When I compile my PDF, I am still getting strange dimensions.  I really appreciate this, thank you.


How To Get Command Blocks Talking in Chat

I need a way for a command block to say things in chat when it is powered, or more preferably whenever someone spawns into the world.


What is the shape of a rain water drop and how it forms?  When tried to figure that out using surface tension, water drop becomes unnatural. Lower part has a smaller radius and upper part has a larger one.   For upper part, P1 - Patm = 2T/R1  For lower part, P2 - Patm = 2T/R2  But, P2 = P1 + hdg  So R1>R2  T = surface tension of water Patm = pressure of atmosphere  h = length of the water drop d = density of water R1 = radius of the upper part R2 = radius of the lower part g is gravitational acceleration   But we see inverse type of water drops in natural. What is the real physics behind this?


Can KingRoot Brick my Nexus 9 and HTC One

Hello Android Enthusiasts,  I was wondering if KingRoot can potentially brick my HTC One and Nexus 9. I have not rooted either yet for my warranty is still active. If either is bricked, is there a way that it could possibly be recovered? If possible, could you please provide me with some statistics or percentages regarding the likeliness of one of these devices becoming bricked? Here are a few more specifications about my devices:  HTC One M8 Harman Kardon Edition from Sprint  HTC Google Nexus 9 (No carrier, WiFi)  Thank you in advance.  Regards,  Ani


How To NOT extend selection with Box Select?

I'm new to Blender and am having a few hitches.  Each time I use box select on a group of vertices it extends the selection from what was previously selected.  I can avoid this by hitting A to deselect all before using Box Select but I was hoping there was a way to have this happen by default.  Isn't it the desired workflow to select groups of objects and move them independently and only extend the select with Shift?  I must be doing it wrong.


The Axii sign should allow Geralt to get one enemy to fight on his side for a short while. This sound extremely useful for fighting groups, but I was unable to get it to work so far.   What happens when I use it on an enemy is that he gets distracted for a second and some visual effect is visible on the enemy. But he doesn't attack other enemies and the whole thing lasts only a second or so.  Am I doing something wrong, or does the Axii sign just not work on many enemies?


I would like to visit somewhere with no cars. What are the largest inhabited regions with no automobiles? (Emergency vehicles are allowed.)


One word describing making an uncharacteristically stupid mistake?

I am looking for one word to describe making a mistake that ordinarily should have been well within your ability to perform properly.  For example, if someone is considered especially gifted in perceptual organization, yet they fail to notice how to open an extremely simple lock, what type of mistake is that?  The connotation I'm looking for is something like a gross blunder, or an uncharacteristically stupid mistake.  The one word can be any type of word, i.e. noun, adjective, verb, etc. For example:   "You have made a (noun)." "You just (verb)ed." "That was very (adjective)."   Words like "gaffe", "blunder", "mistake", to me at least, don't indicate the extreme uncharacteristicness of the stupidity involved.


Indian Passport Holder travelling to South Korea - visa requirements

I am an Indian Passport holder who is working in Bangkok, Thailand (Work permit holder)   Do I need Tourist Visa for South Korea? Do I need Business visa for South Korea in case of meeting the client or Branch office in South Korea?


Word for statement that adds no value to a conversation

This shouldn't be "trite". I'm wanting a word one could say when an empty statement is made especially when it's annoying..... For example, you're driving and see a sign advertising for a massive lottery and someone says, "yah you know after taxes...." or if you're watching a news channel and a protest rally is being covered and someone (also watching) says "they just want attention".


The mass-energy equivalence is a principle which can not be derived from anything?

Not duplication) I couldn't find the answer for the general case, instead of the special case that I already seen in Youtube I hyperlinked.  I will fully satisfy with not only a mathematically rigorous proof, but also just any argument.  For example, I was impressed by the thought experiment(in Youtube :  ) arguing the equivalence principle for the special case that the rest mass of an object actually turned out to be a part of total energy of the object.  Is there any argument like that, but for the general case that the total energy(= rest E's + kinetic E's + potential E) of a system must be the total mass of the system which determines the amount of gravitational attraction and resistance for an acceleration? I think it might require the general relativitistic consideration.


Proving that the set enclosed by an ellipse is convex

I'm trying to prove that the following set ($B$) defined by an ellipse is convex, but I am getting stuck.  $$B = \left\{(x_1,x_2):3(x_1-3)^2+2(x_2-3)^2 \leq 1 \right\} $$  My sad attempt:  $$ \textrm{Let }x,y \: \in \: B \:, \: \lambda \: \in \: [0,1]$$  $$ \lambda x+(1-\lambda)y=(\lambda x_1+(1-\lambda)y_1,\: \lambda x_2 +(1-\lambda)y_2  )$$ $$3(\lambda x_1 + (1-\lambda)y_1 -3)^2+2(\lambda x_2+(1-\lambda)y_2-3)^2=3(\lambda ^2x_1^2 +(1-\lambda)^2y_1^2+9+2\lambda x_1(1-\lambda)y_1-6\lambda x_1 -6(1-\lambda)y_1)+2(\lambda ^2x_2^2 +(1-\lambda)^2y_2^2+9+2\lambda x_2(1-\lambda)y_2-6\lambda x_2 -6(1-\lambda)y_2)$$  and this is where I have lost all confidence in proving it. I was able to factor some of the terms into the form $(\lambda x_1 -3)^2$, $((1-\lambda) y_1 -3)^2$, $(\lambda x_2 -3)^2$, and $((1-\lambda) x_2 -3)^2$, but I don't think that helps the situation any.


My Ubuntu has a problem with the Ubuntu Software Center and I can't solve it, but I'd like to try the new version of Ubuntu, 13.10.  I'm using Ubuntu 12.04, can I upgrade to 13.10 how can I do that? Its not dublicate :)


Quantum entanglement vs classical analogy

Consider that we have two balls, one white and one black, and two distant observers A and B with closed eyes. We give the first ball to the observer A and the second ball to the observer B. The observers don't know the exact color (state) of their balls, they know only the probability of having one or another color, until they look at them (measure). If the observer A looks at his ball he will see its color, which is white, so he immediately knows the color of the second ball. Lets call this “classical entanglement”.  My question is: What is the difference between this “classical entanglement” and the quantum entanglement, for example, of two entangled electrons with opposite spins states? Can this analogy be used to explain the quantum entanglement?


Solving a system of equations using Euclid's Algorithm

Find the general solution $(x, y)$ ∈ $\mathbb Z × \mathbb Z$ for the system of equations $355x − 113y = 1$ ... eq$1$ $355x + 113y = 1$ ... eq$2$ You need one parameter $t ∈ \mathbb Z$ to describe the general solution.  My attempt: Euclid's Algorithm: gcd($355,113$) $= 1$ $1 = 355(-7)+113(22)$ So for eq$2$ $(x,y)=(-7,22)$ And for eq$1$ $(x,y)= (-7,-22)$ So general solution is $(-7,22t)$, where $t$={$-1,1$} Is my answer correct? If not, please how do we solve this?


I'm using +[NSUserDefaults standardUserDefaults] to store application settings. This consists of roughly a dozen string values. Is it possible to delete these values permanently instead of just setting them to a default value?


I have below line placed in controller that fires list has no row exception. I just need to show a custom message instead when the query returns no value.   Apex code:  Id CI=[select Compliance_Incident_abv__c from Compliance_Incident_Transaction_abv__c where Name=:selectedCIT].Compliance_Incident_abv__c ;  //**This line throws error**     system.debug('CI@@'+CI);         if(cond != '')             cond += ' and';           else             cond += ' where ';                                        if(CI!=null)          cond += ' Id = \'' + CI+ '\'';


Find and replace every text between (every) two strings?

How can I select every text between base64 and ==?  Please, I have tried a whole lot of REGEX without success.  I have an exported mailbox file from Apple Mail. I want to simply delete the image data (replace the Base64 data with nothing).  Every solution I've found is select every text between the first base64 and the last ==, which is not helping.


What are the elements of dihedral group $\mathbb{D_6}$?

I'm not really all that good with dihedral groups and can't find anything online that explicitly shows the elements of $\mathbb{D_6}$


Start Vagrant box on boot with ~/.profile (Budgie 17.04)

I'm trying to set up my system to automatically boot my two main Vagrant boxes when my computer turns on but it's throwing an error saying no such file or directory when I added this to the bottom of ~/.profile  bash cd ~/Develop/Websites/scotch && vagrant up bash cd ~/Develop/Websites/homestead && vagrant up   I can paste that line (minus the bash) into a terminal though and it works fine.  I'm told I shouldn't use ~/.profile for this and should possibly use a cron @reboot.  How would I format that since it's not a script that runs necessarily? It's not a file you run, it's a command that has to be in a specific folder.


Is it possible to repeat my track object along a path? I tried using the method shown here  using an array and then a curve modifier, but this happened when I added the curve modifier and chose the path as the curve object.


How is it that $\mathbb{N}$ and $\mathbb{Z}$ have the same cardinality?

I've been reading on set theory and I've found some interesting things.  First, the set of all natural numbers is countably infinite in cardinality. This infinity is denoted by $\aleph_0$. All good.  You can show a one to one correspondence between these natural numbers and integers in general, thus there are as many naturals as integers.  How is that possible?! If you can create a set similar to $\mathbb{N}$ from the negative values of $\mathbb{Z}$ then there is no way they can have the same cardinality. Unless of course, the notion of infinity in $\aleph_0$ dilutes this fact. Please elaborate.


I wondered why i can change the title of my current frame after passing it eg. to another class. If i pass my current frame in the constructor of another class by the this reference, why am i able to change the size or the title of the window? I thougt only values were passed by methods and no object instances.  I know this sounds a little confusing but its not a question about programming syntax but about how stuff works in java.  I would be happy if someone could tell me the answer.


Acceleration in infinite Atwood's machine

Problem:  Consider the inﬁnite Atwood’s machine shown below. A string passes over each pulley, with one end attached to a mass and the other end attached to another pulley. All the masses are equal to m, and all the pulleys and strings are massless. The masses are held ﬁxed and then simultaneously released. What is the acceleration of the top mass?   I don't know how to do this problem with infinite pulleys. If the tension in the topmost string is $T$ then I get, and $a_1, a_2$ be the acceleration of the first and second masses wrt.the first and second pulleys then I get,  $\frac{T}{2}-mg=ma_1$ and  $\frac{T}{4}-mg=m(a_2-a_1)$ but I dont know how to proceed. I am beginner at mechanics.  Please help.


Forgot ubuntu passwords and would like to start fresh

I installed ubuntu on a Windows Vista laptop last year, didn't use it much and now am trying to update to newer version and run other updates that it lists, but it asks for my password and I have no idea what it is.  I do not have any files to save as I just used it for internet access so would like to just completely start over, install latest version and not setup passwords, any guidance for someone that is really just savy enough to install a printer driver.


I only play tennis in the summer. I play tennis only in the summer. I play tennis in the summer only.   It there any difference in these 3 sentences?


Identifying $\langle a,b\mid a^2b^2\rangle$.

The Question:     What group is $G=\langle a,b\mid a^2b^2\rangle$?   Thoughts:  I found that the presentation maps onto $\langle a, b\mid a^2, b^2, 1\cdot 1\rangle\cong \mathbb{Z}_2\ast\mathbb{Z}_2$, which is reassuring since GAP says $G$ is infinite.  Extra Context:  I'm not sure if that's enough context so here's a :   What are you studying?   A PhD in combinatorial group theory, first year.   What text is this drawn from, if any?  If not, how did the question arise?   None. The group arose in my research. Without giving too much away, the group is cyclically presented.   What kind of approaches (to similar problems) are you familiar with?   Here's a list of related questions of mine:          There's more but I think that's enough.   What kind of answer are you looking for?  Basic approach, hint, explanation, something else?   A simple identification would be great. A detailed explanation of why it is what it is would be better, although (strong) hints are preferred.   Is this question something you think should be able to answer?  Why or why not?   Yes. I've been working closely with presentations in a research context for months now. It looks like Google should have the answer.  Please help :)


I have a dual boot computer with both Linux Mint and Windows 7 on it. I want to run ubuntu instead of linux mint. How do I get rid of Linux Mint and still keep Windows 7 without damage to grub also.


Close and re-open votes, are they working properly?

I have 349 rep and the system will let me vote to re-open a question although I saw somewhere else on Meta Stack Exchange that you need 3,000 rep to be able to cast close/re-open votes. It says I have earned the "View close votes" privilege but I thought that was only viewing close/re-open votes and not casting them. It was a pe-open vote on my own question, if that makes a difference.  What is going on here?


How similar is the Magi anime to the manga?

I know some anime counterparts of manga are extremely different while others are so similar they nearly go panel-by-panel. I've watched the Magi anime (labyrinth and kingdom of magic) and would like to read the manga to see what comes next. My question: How close is the manga to the anime? Is it different enough that I should read the manga from the beginning or could I start off where the anime left off? And if I could start off where the anime left off, about what chapter would that be? :D Thanks so much in advance~!


What multiple, m, of a, divided by b, returns a remainder that is c below m? What formula do you use for this math question? for example if a is 73 and b, the divisor is 97. Then what multiple, m, is to be multiplied such that the remainder is 35 below m In this case the answer by searching is 79. That is, (79 x 73) mod 97 = 44 [44 is 35 below 79]. If I don't want to search then how to devise formula to give correct answer? For example, if a is 475813677834783 and b, the divisor, is 37683749758978594988734958734997589341. Then what multiple, m, is to be multiplied such that the remainder is 6783687436873 below m?


python math result differs from python result and calculator

why does a simple python calculation give a different result than same calculation in PHP or pocket-calculator?  tmp = (50.73 / 120) * 20   in python3 tmp now is 8.45499999999 in php and other calculators it leads to 8.455 (without any manual rounding)  my problem here is that i need to round (commercial rounding) the tmp variable with 2 decimal points and this leads in python3 to 8.45 which is not correct. commercially rounded 8.455 would be 8.46


My question is: Why do we consider Lagrangian densities in  field theory (as opposed to Lagrangians as in point mechanics)? Is it simply because of the following? We wish the theories to be Lorentz invariant and as in Special Relativity space and time are no longer independent of one another we must consider the physics at each spacetime point $x^{\mu}$, implying that the theory should be locally described by a density. Additionally, to obey Poincare invariance the Lagrangian density should not be explicitly dependent on $x^{\mu}$, and for it to be Lorentz invariant it must be dependent on spatial derivatives $\nabla\phi$ of the fields as well as temporal derivatives $\partial_{t}\phi$ (as time derivatives in one reference frame will correspond to a combination of time and spatial derivatives in another frame). (Physically does the fact that $\mathscr{L}$ depends on $\nabla\phi$ as well as $\partial_{t}\phi$ because the field $\phi$ is defined at each spacetime point and so a fluctuation in $\phi$ at a point $x^{\mu}$ will produce temporal and spatial derivatives at that point which will affect fields in its immediate neighbourhood (i.e. infinitesimally close to it)?)


Proving Dedekind finite implies finite assuming countable choice

I'd like to show that if a set $X$ is Dedekind finite then is is finite if we assume $(AC)_{\aleph_0}$. As set $X$ is called Dedekind finite if the following equivalent conditions are satisfied: (a) there is no injection $\omega \hookrightarrow X$ (b) every injection $X \to X$ is also a surjection.  Countable choice $(AC)_{\aleph_0}$ says that every contable family of non-empty, pairwise disjoint sets has a choice function.   There is the following theorem:     from which I can prove what I want as follows: Pick an $x_0 \in X$. Define $G(F(0), \dots, F(n-1)) = \{x_0\}$ if $x_0 \notin \bigcup F(k)$ and $G(F(0), \dots , F(n-1)) = X \setminus \bigcup F(k)$ otherwise. Also, $G(\varnothing) = \{x_0\}$. Let $F: \omega \to X$ be as in the theorem. Then $F$ is injective by construction.   The problem with that is that I suspect that the proof of theorem 24 needs countable choice. So what I am after is the following: consider the generalisation of theorem 24:     (note the typo in $(R^\ast)$, it should be $F(z) \in G^\ast (F \mid I(z), z)$), and its proof (assuming AC):     I want to modify this proof to prove the countable version of the theorem. But I can't seem to manage. I need a countable set $\{G^\ast \mid \{\langle f,z \rangle \} : \langle f,z \rangle \in dom(G^\ast) \}$. Ideas I had were along the lines of picking $f_0(x) = x_0$ the constant function and then to consider $\{G^\ast \mid \{\langle f_0,n \rangle \} : \langle f_0,n \rangle \in dom(G^\ast) \}$ but what then?  Thanks for your help.


How do I transfer my post from a community to another community?

The amount of Stack Exchange Community is increasing rapidly. Even if I was really careful to choose the site I should post my question. However the situation that failing to post the question on most suitable site is still unavoidable. Even though posting it on the currently most suitable zone, when some beta community come to public the best fitted site would be replaced. Is there a efficient way to transfer the post between community without any risk of the loss of reputation?  Is there not, will the supervisor of Stack Exchange consider the possibility to add this feature to Stack Exchange?


OS keyboard shortcuts conflict with apps keyboard shortcuts in GNOME 3

I have Ubuntu 16.04 with GNOME shell. I set ctrl+shift for the "Modifiers-only switch to next source" option.   This shortcut conflicts with apps hot-keys. I can't use ctrl+shift+i to open devtools in Chrome, it just switches the layout. In VS code IDE if I press shortcuts with ctrl+shift (for example ctrl+shift+f), shortcuts work but always switch a keyboard layout. When I used Windows this problem didn't exist.  Can I set the ctrl+shift shortcut in such a way that it causes a switch action only after the keys are released and only if this 2 keys were pressed (without additional keys)?


How to fix "E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)"

I am trying to install Unetbootin on Ubuntu but get the above error and this one:   E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Can anybody tell me how to fix this so I can install Unetbootin successfully?


I want a 'simple' proof to show that:  $$1^4+2^4+...+n^4=\frac{n(n+1)(2n+1)(3n^2+3n-1)}{30}$$  I tried to prove it like the others but I can't and now I really need the proof. Also I want a geometric proof for that and this one below:  $$1^3+2^3+3^3+...=(\frac{n(n+1)}{2})^2$$  geometric proof: I want a proof using shapes and geometry.


I have a CSV file that looks like this:  qw12er,foo,0 bn5mgh rt8yp,foo,10 gh78jk bn852mv,foo,852 78ghjkh tgbr,foo,10 ujmyhn wsx2d,foo,0000 ui52ohn tgbr,foo,7418529 ujmyhn ikl896o,foo,22 wsxdc52   I want to modify the 3rd column and remove all numbers and space from the beginning of the 3rd column.  Then output would be as follows:  qw12er,foo,bn5mgh rt8yp,foo,gh78jk bn852mv,foo,78ghjkh tgbr,foo,ujmyhn wsx2d,foo,ui52ohn tgbr,foo,ujmyhn ikl896o,foo,wsxdc52


What and where is the iso file for 32bit architecture PC to install ubuntu 18.04

In order to create one USB stick with 18.04 for 32 bit, can someone tell me  where is the iso file and its name for 32bit architecture PC  to install ubuntu 18.04 as I am unable to find the exact link for 32 bit. Ubuntu desktop 18.04 is saying its for 64bit.


Biblatex and Polyglossia error after TeX Live update

I've just updated TeX Live distribution (from 2015.37233 to 2015.38831), and now I encounter error whenever biblatex package is loaded provided that default language is Russian. Here's the minimal non-working example (LuaLaTeX build):  \documentclass[final,a4paper]{article} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{libertine}  \setdefaultlanguage[babelshorthands=true]{russian}   \usepackage{biblatex}  % compiles if commented out  \begin{document}      Проверка.  \end{document}   This gives me the following error:  russian.lbx: line  506: Package xkeyval Error: `fromjapanese' undefined in families `blx@lbx'. }   Here's the relevant place in russian.lbx:  ... 505  annotation       = {{аннотация}{аннот\adddot}}, 506 } 507  508 \protected\gdef\lbx@ru@mkbibdatemonth#1{% ...   Should this be considered a bug?


What are the assumptions for applying a quantile regression model?

The question has been asked (one time) on CV before, but the answer is really imprecise and does not really answer the question in my opinion.  So: What are the assumptions for estimating a linear regression model via quantile regression?  To my understanding (and as several CV users have mentioned), quantile regression does not assume any specific distribution of the error terms - does that mean that, in a time series model, autocorrelation and heteroscedasticity do not have to be accounted for?  What about the other Gauss-Markov assumptions? I would assume that the assumption of no perfect multicollinearity has to be met when applying quantile regression, but do the parameters have to be linear? The linearity assumption only has to hold for the specific quantile I would assume.  Anyways - I do not find any backup for any of my thoughts in the scientific literature and I would appreciate a comprehensive answer. Thank you!


Can a true neutral character cast spells affected by alignment?

Is a true neutral character restricted by alignment from casting a spell that is, say lawful or chaotic, or can he/she cast a spell no matter if its affected by an alignment. (A lawful character can't cast a chaotic spell and a good character can't cast an evil spell, vice versa)


A map of two Euclidean spaces preserving connectedness and compactness is continuous

Let $ f:\mathbb R^n \to \mathbb R^m$. If $f$ preserves connectedness and compactness then $f$ is continuous. How can this be proven? I don't really know where to start.


Trace Geometric Network in custom script tool?

I'm trying to make a Python script tool which uses the Trace Geometric Network tool (10.3). My script works in the Python window, but as a script-tool, it runs and NOTHING HAPPENS. Messages state: Executing..., Start time..., Running script..., Completed script... Succeeded at... It acts like the tool executed with no errors, but there's no visible output.   The Trace Geometric Network tool refuses to work inside a Python script tool the way it does in the Python window.  I tried playing with the parameters, data types in of parameter settings, and deleting and remaking the tool several times. I even tried using other geometric networks with the tool. Finally, I made a bare-bones script with only the trace tool to troubleshoot, and NOTHING. I get the same action as above.  Here's my bare-bones script:   geoNetwork = arcpy.GetParameterAsText(0)  inflags = arcpy.GetParameterAsText(1)  barriers = arcpy.GetParameterAsText(2)  arcpy.TraceGeometricNetwork_management(geoNetwork, "Trace", inflags, "TRACE_DOWNSTREAM", barriers)   Here's a screen shot of how I'm setting my parameters in the tool properties:    How can I to get this to work as a Python script tool?  Here's the actual code. As this tool executes, I can see it looping over the flags and selecting them one by one. No output group layer files are added to the map and no apparent traces are made. Again, these functions work as intended if pasted in the python window, but misbehave as python-script tools.   inflags = arcpy.GetParameterAsText(0) geoNetwork = arcpy.GetParameterAsText(1) barriers = arcpy.GetParameterAsText(2) outPath = arcpy.GetParameterAsText(3) outName = arcpy.GetParameterAsText(4)  def makeFullPath(path, name):     return path + "\\" + name  def TraceCapture(inflags, geoNetwork, barriers, outPath, outName):       mxd = arcpy.mapping.MapDocument("CURRENT")     df = arcpy.mapping.ListDataFrames(mxd)[0]     flagList = list(arcpy.da.SearchCursor(inflags, 'UNITID'))     trace = 1     segmentCapture = []     for flag in range(1, len(flagList)+1):          try:             outputLayer = "Trace_" + str(trace)             expression = '"OBJECTID" =' + str(trace)             arcpy.SelectLayerByAttribute_management(inflags, "NEW_SELECTION", expression)             arcpy.TraceGeometricNetwork_management(geoNetwork, outputLayer, inflags, "TRACE_DOWNSTREAM", barriers)             arcpy.AddMessage("Trace_" + str(trace) + " complete")              for lyr in arcpy.mapping.ListLayers(mxd, "", df):                 if lyr.name == "Sewers":                     pipesCursor = arcpy.da.SearchCursor(lyr, 'ASSETID')                     for i in pipesCursor:                         segmentCapture.append((flagList[trace - 1][0], i[0]))                 if lyr.name == outputLayer:                     arcpy.mapping.RemoveLayer(df, lyr)             trace += 1         except RuntimeError:             print "Flag " + str(trace) + " was invalid and skipped."             trace += 1             continue      arcpy.CreateTable_management(outPath, outName)     outFile = makeFullPath(outPath, outName)     arcpy.AddField_management(outFile, "manholeID", "TEXT", "", "", 10)     arcpy.AddField_management(outFile, "pipeID", "TEXT", "", "", 10)      with arcpy.da.InsertCursor(outFile, ["manholeID", "pipeID"]) as cursor:         for row in segmentCapture:             cursor.insertRow(row)  TraceCapture(inflags, geoNetowrk, barriers, outPath, outName)


How do you list all subgroups of D6 (which is of order 6)?

$G$ is the dihedral group $D_6$ of order 6. I need to find all subgroups of order 2 and order 3. I have found the cyclic group $\left<b\right> = \{e, b\}$, but that's as far as I have come.  How do you list all subgroups of eg.  $D_6$? and how would you present all subgroups of eg. order 2?


I needed to find cardinality of irrationals. I have provedthat R\Q is uncountable. Now I need to build a bijection h : R\Q → R . How to do this?


A CNAME record can't be set up for the domain root

I recently bought a new domain from namecheap and decided to delegate it to Yandex.Connect services, so I changed namecheap's DNS to custom, added Yandex' nameservers (dns1.yandex.net and dns2.yandex.net) in the control panel, added the proof and within a couple hours my domain was being managed by Yandex.  Since I am hosting a personal site in my own premises and since my ISP doesn't sell any static IPs I decided to use DDNS. But when I tried to add a CNAME for @ that points to my-domain.example-ddns.org I found out it does... nothing. The record just isn't being created. I tried adding another one for a subdomain and it works perfectly fine.  After reading  I read this:     CNAME. Remember that a CNAME record can't be set up for the domain root, because this is prohibited by the RFC.   Imagine my shock when I read such a thing, when at the same time I have another domain registered with namecheap, but using namecheap's basic DNS instead, where I set up a CNAME record for @ that points to my-other-domain.example-ddns.org and it works perfectly fine!   How do I work around this? Using an A record is a no-go since I can't get an static IP.


Add a menu item to admin dashboard which isn't a link?

I am trying to add a menu item which is supposed to be a separator which has a height set and divides items in the menu. I haven't managed to create a menu item which isn't a link.  add_action( 'admin_menu', 'add_admin_menu_separator' ); function add_admin_menu_separator() {     add_menu_page( '', '', 'read', 'test', '', 'none', '10000000' ); }   Doing this creates a menu item without any text or icon, but it is still a link to /test. Using # won't work either because I don't want it clickable at all.  Is there any workaround for this?  Thank you!


Failure to boot from USB : "Failed to start MokManager"

Trying to make a computer usable by using Ubuntu: this Asus computer, originally running Windows 10, wouldn't start. Idea was to boot Ubuntu from a USB drive, check hardware that way and then install Ubuntu on it if the HDD was still working. I would appreciate quite simple explanations as I am fairly computer literate, but obviously in way over my head here.  The problem now is that when I try to live boot Ubuntu or Xubuntu 18.04.3 from USB (created with Rufus), I get this error message, and then the computer turns off:     Failed to open EFI\BOOT\mmx64.efi - Not Found      Failed to load image EFI\BOOT\mmx64.efi: Not Found      Failed to start MokManager: Not Found      Something has gone seriously wrong: import_mok_state() : Not Found   Now, the very long story of how I got here.  I first used Rufus to create a bootable USB drive with Ubuntu on. Computer would not boot from this (either "Try Ubuntu" or "Install Ubuntu") because of a problem with squashfs.  I Decided to try XUbuntu instead. Created bootable USB drive with Xubuntu 18.04.3 using Rufus. Was able to boot into "Try Xubuntu without installing" with this, and tried to install Xubuntu from the desktop. I selected "Erase disk and install Xubuntu", then automatic updates while installing, and third party applications, and secure boot.  Installation then crashed. Several error messages came up that I didn't have time to see or take note of, but one was definitely "ubi-timezone failed with exit code 1".  Following this, I tried to live boot from the USB again but I get the above error message and nothing happens. I then tried to create a new bootable USB drive using Ubuntu and Rufus, and the error message is the same. There seems to be no way to start the computer at all. Have I bricked it?  Can someone explain what is happening and how to fix it?  Thanks a lot!  EDIT : After using Ubuntu 19.10 to try and go around MOK issues, I now have the error message      tpm_crb MSFT0101:00: can't request region for resource


Show that the integral of a positive function is positive

Suppose $f:[0,1] \to (0,\infty)$ is a Riemann integrable function. Prove that the integral of the function from $0$ to $1$ is strictly positive.   I have been trying to do this for awhile but I can't seem to get it. Here is my thought process: If the function is Riemann integrable, then its set of discontinuities has measure zero (Lebesgue). I am not sure how to connect this to the integral being positive


How can I open files in external programs in Python?

I'm wondering how to open files in programs such as Notepad and Picture Viewer depending on the extension the file has. I'm using Python 3.3 on Windows.  I've done some research and people have mentioned a module named Image, but when I try and import this module I get an ImportError.  Here's what I have so far:  def openFile():     fileName = listbox_1.get(ACTIVE)     if fileName.endswith(".jpg"):         fileName.open()   I will also have HTML and JSON files that I will need to open in Notepad.


Statement  "If G is finite abelian group  and H is its subgroup  then there is a normal subgroup N of G such that   G/N is isomorphic  to H ."  Clearly  [G:H] divides order of G   .As G is abelian therefor there exists  a normal subgroup of order  [G: H] ( Say N). Now  o (G)/o (H)=o (N) . I.e o (G)/o (N) =o (H)  but How can I prove above statement?


I have installed Ubuntu 13.10 in my samsung laptop,everytime i boot up the system it starts with full screen brightness which is quite annoying in the night.  Is there a way to fix this problem so that the brightness remains at a level which i set before shutting down the system ?


Why does the direct sum of infinitely many groups require only finitely many are nonzero?  Is it just a case that the direct sum and direct product are two different things, and those are their names?  Or is there a logical connection between the idea of a sum and a product that governs one permitting infinitely many nonzero elements and the other not?


Is std::regex safe for user-defined expressions?

Is it considered safe to use user-defined expressions with std::regex (eg for a server-side search)? Does the standard library make any guarantees about the safety of broken expressions?


This is similar to . But my question is specifically about plain old <script> tags in my HTML body like so  <script type="text/javascript" src="/path/to/my/script.js"></script>   I have a custom window.onerror function that I wrote to deal with general script errors. And indeed, if such a script has a syntax error or some other runtime error occurs while evaluating the script itself, that is handled correctly by my onerror function.  But if the script fails to load at all, because of an interrupted connection or even a 404 or other server error, window.onerror is not called. How can I detect this kind of failure programmatically in Javascript?  To clarify: I realize I could just put an onerror attribute in every single script tag. I'm asking if there's a better way, something comparable to my global window.onerror or some way of making that function be called.


What rule governs "panic->panicking" and why? Would it apply to all -ic verbs?

It seems odd that the continual tense of "to panic" is "panicking". Or "picnic->picnicking". When did the "k" get added, and why? Surely the natural extension would be "paniccing" if one wished to preserve the hard "c" sound visually and avoid "-ici-" and its intuitive soft "c"? Does that rule also apply to all verbs ending in -ic? For example if we had verbs "to lyric [a song]" or "to topic [a forum post]"? I can't think of other examples!


Proving that an $m \times n$ matrix has rank 1

I've been trying to work through the exercises in my book where you have to prove certain things are the case. It has been going okay so far, however I've gotten stuck on the following exercise, and I am not sure where to start.  How can you prove that an $m \times n$ matrix $A$ has rank 1, if and only if $A$ can be written as the outer product uv$^T$ of a vector u in $\mathbb{R}^m$ and v in $\mathbb{R}^n$  I really don't know how to even start with this.


How to synchronize the database upon team work on Drupal 8 project?

For example, there is being written a big project on Drupal 8 by several developers. They use Git for team working.  The first developer is creating some node types and adding some test nodes. At the same time the second developer is creating some taxonomy vocabularies and adding several taxonomy terms.  At the same time the third developer is setting up search indexes for Search API.  After it they need to synchronize the database for continuing work.  I suppose that commiting, pushing and manually merging SQL dumps is not good idea.  Could you share your experience, how is the best way to synchronize the database after work ? Are there any good tools for it ?


I have started with RabbitMQ. I have a (windows) machine on which I installed two RabbitMQ nodes as a service - I have choose the nodename, port and service name for each of them. The services are running normally (i see that they are listening in a netstat-a).  I have also installed management plugin with "rabbitmq-plugins enable rabbitmq_management" and restarted both services. But the plugin isn't running - I dont see it listening in a netstat and I can't connect to the management console via browser.  Any idea what could be wrong? Is there any log to see what is goind on?  Updated: when I do rabbitmq-plugins list i get:  c:\RabbitMq\sbin>rabbitmq-plugins list [e] amqp_client                       3.0.1 [ ] cowboy                            0.5.0-rmq3.0.1-git4b93c2d [ ] eldap                             3.0.1-gite309de4 [e] mochiweb                          2.3.1-rmq3.0.1-gitd541e9a [ ] rabbitmq_auth_backend_ldap        3.0.1 [ ] rabbitmq_auth_mechanism_ssl       3.0.1 [ ] rabbitmq_consistent_hash_exchange 3.0.1 [ ] rabbitmq_federation               3.0.1 [ ] rabbitmq_federation_management    3.0.1 [ ] rabbitmq_jsonrpc                  3.0.1 [ ] rabbitmq_jsonrpc_channel          3.0.1 [ ] rabbitmq_jsonrpc_channel_examples 3.0.1 [E] rabbitmq_management               3.0.1 [e] rabbitmq_management_agent         3.0.1 [ ] rabbitmq_management_visualiser    3.0.1 [e] rabbitmq_mochiweb                 3.0.1 [ ] rabbitmq_mqtt                     3.0.1 [ ] rabbitmq_old_federation           3.0.1 [ ] rabbitmq_shovel                   3.0.1 [ ] rabbitmq_shovel_management        3.0.1 [ ] rabbitmq_stomp                    3.0.1 [ ] rabbitmq_tracing                  3.0.1 [ ] rabbitmq_web_stomp                3.0.1 [ ] rabbitmq_web_stomp_examples       3.0.1 [ ] rfc4627_jsonrpc                   3.0.1-git7ab174b [ ] sockjs                            0.3.3-rmq3.0.1-git92d4ba4 [e] webmachine                        1.9.1-rmq3.0.1-git52e62bc


Installing php5.5 on Ubuntu 16 with apache2

I need to use an older version of php for my project (I know that it isn't supported). I have tried adding PPA ppa:ondrej/php , but it doesn't work - It couldn't find the package. Is there another way? Simple  sudo apt-get install php5   doesn't work either; it returns no installation candidate


I want to make a simple addition program but get stuck at an error stating the following: TypeError: can only concatenate str (not 'int') to str.  I have no idea what to do, I am pretty new to Python coding.  def addition():     x = int(input("Please enter the first number:"))     y = int(input("Please enter the second number:"))     z = x+y     print("The sum of " +x+ " and " +y+ " gives " +z )   I expect the code to return the value of the sum of the two entered values.


Almost Sure Convergence of a product with SLLN

This is an exam problem, so it should be rather easy but I still can't quite see how to solve it:  Let $X_1, X_2, \dots$ be independent and identically distributed random variables on the same probability space such that  $$ \mathbb{P} \left[ X_1 = - \frac14 \right] = \mathbb{P} \left[ X_1 = \frac14 \right] = \frac12.$$ For all $n \in \mathbb{N}$ define  $$ M_n := \prod_{k=1}^n (1+X_k).$$ Use the law of large numbers to show that $(M_n)_{n \in \mathbb{N}}$ converges almost surely and determine the limit.  (It might be worth noting that the first part was to show that $(M_n)_n$ is a martingale.)  The naive way to apply the SLLN is by taking $\log$ and then naively using SLLN. However, I can only get the limit of $\prod_{k=1}^n (1+X_k)^{\frac{1}{n}}$ in this way. So what's the correct way of applying the law of large numbers?


I am using the unit uBigIntsV4 with the component TInteger Fortunately it has a built in random procedure, which let's you choose a very high random number and return it as a string.  But I can't find a way to develop a function which lets me pic a high random number from x to n without being repeated.  Creating a list or an array is not possible due to native unsigned integers's range to cover all cases.   How would I be able to solve this?


Say I have a large amount of input and excepted output. Can I instruct visual studio to run test methods on all elements of the collection as separate unit tests?  [TestClass] public class CalcTests {     private static IDictionary<string,string> data = new Dictionary<string,string>()     {         {"1+1","2"},         {"sin(9^180)!7", "pi"}     }      // This will run all cases, but provides little insight as cases might vary wildly in complexity     [TestMethod]     public void TestCalc()     {         foreach(var entry in data) {             Assert.AreEqual(Calc(entry.Key), entry.val);         }     } }


The definition of a Hamiltonian system I am working with is a triple $(X,\omega, H)$ where $(X,\omega)$ is a symplectic manifold and $H\in C^\infty(X)$ is the Hamiltonian function.  I am wondering if someone can give me an interesting, or useful, example of a Hamiltonian system for which $X$ is not the cotangent bundle of a manifold.


What can I use to replace onions on sauces?

Is it possible to replace onions with another vegetable on sauces and get a similar flavour?


Investigation on this sequence :$A=\sqrt{1+2\sqrt{1+3\sqrt{1+4\sqrt{...}}}}$

I know that the answer is three and is easy to prove that like this: $$3=\sqrt{1+8}$$ $$ 3=\sqrt{1+2\sqrt{1+15}}$$ $$ 3=\sqrt{1+2\sqrt{1+3\sqrt{1+24}}}$$ $$...$$ but I wanted to know if there is any direct way of calculating the answer. thanks in advance.


How take a screenshot without rooting the phone?

implies that I must root my device in order to bypass this unreasonable restriction. I have many use cases where I need to take screenshots for normal,  non-nefarious reasons, yet it seems that I am prevented from doing so by some particuler application provider.  How do I avoid this restriction without rooting my phone?  References:   The following sums up my situation and hardware configuration to the letter:


I have a script which connects to a remote host to replicate some files via SSH.  I must connect to an rsync daemon listening on port 873.  To accomplish this I have a ssh configuration like this.  Host blah     LocalForward 10873 127.0.0.1:873     Hostname 10.2.4.1   Unfortunately because of the timing of this script, there is a small chance that on occasion when it attempts to establish the SSH session another similar script will have the port open to a different host.  If I connect while another ssh session is open I get the obvious message Address already in use.  me@local:~$ ssh blah bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 10873 Could not request local forwarding. Linux remote 2.6.26-2-amd64 #1 SMP Tue Jan 25 05:59:43 UTC 2011 x86_64 motd... remote:~$    What I want to have happen is to have the SSH client immediately exit with a exit code so I can put some logic into my script to report a failure instead of trying to run any commands against the port forwarded to the incorrect host.


In modular arithmetic, why is $\left(g^{k_1} \bmod n\right)^{k_2} \bmod n = \left(g^{k_1}\right)^{k_2} \bmod n$?

Why is $\left(g^{k_1} \bmod n\right)^{k_2} \bmod n = \left(g^{k_1}\right)^{k_2} \bmod n$ ?  Note of the editor: I used $=$ where the  used == because $=$ in a cryptographic context is equivalent to == in many programming contexts (they both stand for equality, even if the former denotes an assertion and the later an operator). I rejected $\equiv$ (equivalence modulo) because there is no common notation for that in a programming context, and because there is no opening parenthesis immediately on the left of the rightmost $\bmod$, as there should be per proper notation in a cryptographic context.


What should I keep in mind when making 2D games for multiple resolutions?

I'm making a 2D (Android) game. Android devices vary quite a lot in screen resolution; what do I need to keep in mind when making my game?   Do I need to keep big versions of all images and scale down depending on the resolution (doesn't that waste space)? Do bitmap fonts scale well or do I need to use something else? Anything else I'm forgetting?


I just commented on a question and I tried to add @BDuelz: in front of it but it got truncated.  How come?


I need to get the result from pow(a,b) as an integer (both a and b are integers too). currently the calculations where (int) pow( (double)a, (double)b) is included are wrong. Maybe someone can help with a function that does the pow(a,b) with integers and returns an integer too?  But here is the odd part: I made my script in Linux with Geany (and g++/gcc compiler) and had just pow(a,b) the script compiled and worked fine. But in university I have Dev-C++ (and MS Windows). In Dev-C++ the script didn't compile with an error [Warning] converting toint' from double'  I need to make this scrpit work under Windows (and Mingw compiler) too.


Is the wave-particle duality a real duality?

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


Do published papers have to contain original work?

Can I turn my MSc thesis into a paper and can the paper get published if it does not have original work?


How did Kylo Ren travel to the other planet in the TIE fighter?

Near the end in amongst the battle, Kylo Ren lands next to his ship that Rey stole. I understand that at a stretch (or through the will of the Force) Kylo found a TIE Fighter in the wreck he was in, but to my understanding those TIEs would not have had hyperdrives, so how did he travel that far without a carrier ship? I suppose I'm guessing/assuming that he travelled on his own (Solo if you will), and not with his Star Destroyer, as the Knights who travelled with him on his Star Destroyer were already at the destination. But if the Force willed him to find the TIE Fighter, why not a shuttle with a hyperdrive? It would be iconic enough to use in the film, surely.  How did Kylo Ren travel to another system in a civil war era TIE Fighter with no hyperdrive or carrier ship?


Prove that $\int_0^{\pi} \sin^2 x\, dx = 2 \int_0^{\pi/2} \sin^2 x\, dx$

It can be observed that $$\sin^2 \left( x + \frac{\pi}{2} \right) = \cos^2 (x)$$ Being the squared cosine an even function, the squared sine will be symmetrical as well, but with respect to $x = \pi / 2$.  Are there any other approaches for this proof? Is there anything else that can be observed, hopefully about the $\sin^2 x$ function itself, without considering the space-shift $x + \pi / 2$ and the cosine?


What is the name of the event when the user clicks the X button at the upper right corner of the window? How will I override that function?


In actions that involve another person, we can structure sentences like the following examples:  I drove him home. I cooked him a meal. I gave him a spoon. I threw him the ball.  I'm not sure of the name of this grammar pattern, but the use of the pronoun "him" is simply a shortening of "for him" or "to him" or "at him", depending. Is there a reason why we can't (or at least, don't) say:  I opened/closed him the door.  to mean "I opened/closed the door for him"?  Is there a grammar rule, or is it just not idiomatic?


Symmetry arguments and plane sheet of charge

The electric field due to a infinite plane sheet of charge is given by $\sigma/\epsilon_o$. Now could we have deduced by symmetry that the electric field's magnitude won't depend on distance?


I am looking for a way to achieve a MacPaint style effect from a full color RGB piece. See below for an examples of the style.     Basically what I need is a way to assign a different 1bit patterns to different color values (alternatively to a different grey values) in photoshop, or some other windows software (I have found  that seems to be able to do that, but it is MacOS only).   The piece I am using it on is just few objects against dark background, but because the objects rely heavily on gradients, doing it by hand would take forever.  Thank you in advance.


Sometimes you want to buy an avocado, but all they have are hard on touch and you know they are not ready yet; they are rubbery and untasty.  One can buy them and wait couple days, they ripen sooner or later (hopefully before they get spoiled).  Are there any tricks and tips on how to speed up the ripening? Like special storage, some treatment to the avocado etc.