The following code gives the error UnboundLocalError: local variable 'Var1' referenced before assignment:  Var1 = 1 Var2 = 0 def function():      if Var2 == 0 and Var1 > 0:         print("Result One")     elif Var2 == 1 and Var1 > 0:         print("Result Two")     elif Var1 < 1:         print("Result Three")     Var1 =- 1 function()   How can I fix this? Thanks for any help!

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


Let me redo this, I was accessing a sever via ssh, i can access the server easily from my system (the server is in my local network). I tried copying a file from my local system to my server and it failed due to an error (permission denied). And now I do not want to dig whats wrong and instead want to get that file(which is on my system) from my server directly to which I am ssh'd into.  Old questions: /* I am using scp as a root, tried all the things but unable to copy files from my system to the remote server (to which I am logged-in via ssh from the same system). Let say i want to get the files from my system while being on ssh'd server, how do i do it.*

It's driving me nuts! I just want to transfer one simple file from laptop to server.  I'm using ubuntu on both machines.  So I have:  -rwxr-xr-x 1 sandro    414622 2011-10-14 23:42 sandrophoto-html.tar.gz   And I'm sending it using:  sudo scp -P XXXX sandrophoto-html.tar.gz usern@server.local:/media/xx/xx/xx   And I get: scp: /media/xx/xx/xx/sandrophoto-html.tar.gz: Permission denied  p.s. I might be doing this other way around - I want to send file tar.gz that is located on my desktop, to remote server into the folder /media/yadayda


Is it possible to print a certain field in the bibliography while omitting it in the (footnote) citations?  For example:  \usepackage[backend=bibtex,style=verbose-trad1,natbib=true,doi=false,isbn=false,url=false]{biblatex} \addbibresource{x-mendeley.bib}  ...  \renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}  \printbibliography   Prints this citation and bibliography:     I can get the url, isbn etc. in there by using:  \usepackage[backend=bibtex,style=verbose-note,natbib=true]{biblatex}   This is what I want for the bibliography, but I don't want all these long urls etc in the  footnote citations.    Is there a way to differentiate between the two? And could I for example add the isbn's to the citation but not the url?

I am using Biber and the verbose IBID style setting to generate my footnotes. Here is my bibliography settings  \usepackage[citestyle=verbose-ibid, bibstyle=authoryear, backend=biber, labeldate]{biblatex}   Some of my book entries in the bib file contain URL data (e.g. the Google book reference). I like the fact that these are showing up in the bibliography section at the back of the document, but I do not want them showing up in the full version of the first citation of a work.  Is there some way to de-activate URL printing in the main matter, but not in the back matter, e.g. by redeclaring some macro?  Thanks!


I would like to install my Epson Scanner ( model WP-4535 ) in Ubuntu 16.04 (had it installed in 15.10).  I installed this   sudo apt-get install sane libltdl7    then iScan from the epsonpage (1), which is supposed to be an all-in-one package. I installed it via ./install.sh which results in having the following iscan parts:  x@y:~$ dpkg -l iscan* | grep ii ii  iscan                2.30.3-1     amd64        simple, easy to use scanner utility for EPSON scanners ii  iscan-data           1.39.0-1     all          Image Scan! for Linux data files ii  iscan-network-nt     1.1.1-1      amd64        Image Scan! Network Plugin   iScan still cannot communicate with the scanner, though it can be identified via the following command  scanimage -L device `epson2:net:192.168.0.7' is a Epson PID 087D flatbed scanner   If I recall it from 15.10 (worked after hours of meh) , epkowa was the solution not epson2, but adding it manually via      sudo nano /etc/sane.d/dll.conf doesn't work.  The  ubuntuuser page (2), suggests installing ltdl7 packages, which seems to be important, but I have no clue, how to find it (same with the plugin):  iscan_2.X.X-1.ltdl7_i386.deb (32 bit) / iscan_2.X.X-1.ltdl7_amd64.deb (64 bit)  ggf. iscan-plugin-gt-1500_2.1.2-1_i386.deb (allgemein iscan-plugin-SCANNER_VERSION_ARCHITEKTUR.deb) oder z.B. etwas wie esci-interpreter-perfection-v330_0.1.1-2_i386.deb    Also installed  xsltproc (3), because of reasons, but didn't change it.  Any suggestions?; help appreciated!  (1): hxxp://support.epson.net/linux/en/iscan_c.php?version=1.0.4  (2): hxxps://wiki.ubuntuusers.de/Hardware/Epson/#Verwendung-von-iScan  (3): hxxps://wiki.ubuntuusers.de/Scanner/Epson/

I have the Epson SX218 with a built-in scanner. The printer works fine but if I want to scan something simple scan says no scanner found.  Any ideas what I can do?  By the way, how can I check the ink level of the printer??


I was confused about why in anime, high school students were not allowed to work. I understand in real life that they have to have permission from the school. Maybe I'm just reading into it too much as a Westerner.

In Hana and Hina After School (Hana to Hina wa Houkago) one of the main plot points it that neither Hana or Hinako are actually allowed a job and if discovered they could be expelled, to the point that Hinako  quit her job as a Model and      in Chapter 14 (still reading) Hinako quit her job with Hana because Maiko posted online about buying something where Hinako worked.   Is this really something in Japan? that students like Hana and Hinako aren't allowed jobs and would actually get expelled for having one, even if it doesn't interfere with their school works? (as shown how Hana's and Hinako's work scheduled were changed so they could do their exams)


I'm trying to find out where does the word OK come from?

I've heard lots of varying histories of the term "OK".    Is there any evidence of the true origin of the term?


I'm trying to define a function prem_dern that returns the first index and last index of an input real number ( by the user ). When executing, the intitializing part works fine but not the prem_dern function ( program exits right after compiling. The program doesn't return any errors when compiling.Here is what I did : #include <stdio.h> #include <stdlib.h>  void prem_dern(float t[], int n, float r) {        int i,j;     printf("donner le reel pour savoir les positions ");     scanf("%f",&r);     for(i=0;i<n;i++)     {         if (t[i]==r)printf("la premiere position %d:",i);          break;     }     for (j=n-1;j>0;j--)     {         if(t[j]==r) printf("la derniere position %d:",j);         break;     } } int main() {   int i,n;     float r;     float t[100];     printf("donner le nombre des elements : \n");     scanf("%d",&n);     for(i=0;i<n;i++)     {         printf("donner un element :");         scanf("%f",&t[i]);     }     prem_dern(t,n,r);     return 0; }

Why does everyone tell me writing code like this is a bad practice?  if (foo)     Bar();  //or  for(int i = 0 i < count; i++)     Bar(i);   My biggest argument for omitting the curly braces is that it can sometimes be twice as many lines with them. For example, here is some code to paint a glow effect for a label in C#.  using (Brush br = new SolidBrush(Color.FromArgb(15, GlowColor))) {     for (int x = 0; x <= GlowAmount; x++)     {         for (int y = 0; y <= GlowAmount; y++)         {             g.DrawString(Text, this.Font, br, new Point(IconOffset + x, y));         }      }  }  //versus using (Brush br = new SolidBrush(Color.FromArgb(15, GlowColor)))     for (int x = 0; x <= GlowAmount; x++)         for (int y = 0; y <= GlowAmount; y++)             g.DrawString(Text, this.Font, br, new Point(IconOffset + x, y));   You can also get the added benefit of chaining usings together without having to indent a million times.  using (Graphics g = Graphics.FromImage(bmp)) {     using (Brush brush = new SolidBrush(backgroundColor))     {         using (Pen pen = new Pen(Color.FromArgb(penColor)))         {             //do lots of work         }     }  } //versus using (Graphics g = Graphics.FromImage(bmp)) using (Brush brush = new SolidBrush(backgroundColor)) using (Pen pen = new Pen(Color.FromArgb(penColor))) {     //do lots of work }     The most common argument for curly braces revolves around maintance programming, and the problems that would ensue by inserting code between the original if statement and its intended result:  if (foo)     Bar();     Biz();     Questions:   Is it wrong to want to use the more compact syntax which the language offers? The people that design these languages are smart, I can't imagine they would put a feature which is always bad to use. Should we or Shouldn't we write code so the lowest common denominator can understand and have no problems working with it?  Is there another argument that I'm missing?


For an oscillating string that is clamped at both ends (I am thinking of a guitar string specifically) there will be a standing wave with specific nodes and anti-nodes at defined $x$ positions.   I understand and can work through the maths to obtain the fact that the frequency is quantised and is inversely dependent on $L$, the length of the string, and $n$, some integer.  If I pluck a guitar string, this oscillates at the fundamental frequency, $n=1$. If I change to a different fret, I am changing $L$ and this is changing the frequency. Is it possible to get to higher modes ($n=2$, $n=3$ etc)? I don't understand how by plucking a string you could get to 1st or 2nd overtones. Are you just stuck in the $n=1$ mode? Or would the string needed to be oscillated (plucked) faster and faster to reach these modes?

In physics textbook, we can calculate the nth harmonic of a vibrating string of a fixed length. How can we do this in a real guitar?  For example, if I just pick a single open string, how can I get any arbitrary harmonic for this?  More precisely,    the first harmonic has 2 nodes and 1 anti nodes the second harmonic has 3 nodes and 2 anti nodes the nth harmonic has n+1 nodes and n anti nodes


In my profile I add         and "Save And Copy To All Stack Exchange Accounts".  On Meta Stack Exchange [tag:status-completed] linked to , as it should.But on other sites it is linked to status-completed tag posts on them - in my Stack Overflow profile it is linked to .  I tried to place it in hyperlink:  <a href = "https://meta.stackexchange.com/questions/tagged/status-completed"> [tag:status-completed] </a>   or   [ [tag:status-completed] ](https://meta.stackexchange.com/questions/tagged/status-completed)   but it doesn't work.  Is it possible to link [tag:some-tag] to specific Stack Exchange site?

The  tag in my Stack Exchange profile links to different sites depending on where it's being viewed:  Profile on StackOverflow:  [tag:CSS] => https://stackoverflow.com/questions/tagged/css   Profile on StackExchange:  [tag:CSS] => https://stackexchange.com/questions/tagged/css   Profile on CodeReview:  [tag:CSS] => http://codereview.stackexchange.com/questions/tagged/css    I'd like to have these all link to https://stackoverflow.com/questions/tagged/css. You can ; why not add the ability to specify the site with tags? <!-- tag: stackoverflow -->[tag:css] <!--tag: meta -->[tag:feature-request]  The current behavior also cause a bug on my :    All tags send me to find a Panda aka 404 Page Not Found.


let there be $\{z_1 ,..., z_n\}$ a group of complex numbers. Show that there's a subset $J \subset \{1,...n\}$ so that $$\lvert \sum_{k \in J}z_k \rvert \ge \frac{1}{4\sqrt2}\sum_{i=1}^n\lvert z_i \rvert$$  I've tried playing around with it, like squaring it and I got up to $$2^5 \sum_{k \in J}\lvert z_k \rvert ^2  -\sum_{i=1}^{n}\lvert z_i \rvert^2 \ge \sum_{i \neq k \in J} \lvert z_i \rvert \lvert z_k \rvert -2^6Re \sum_{i \neq k \in J} z_i \bar z_k$$  and here is where I got stuck

Consider the following problem.  Fix $n \in \mathbb N$. Prove that for every set of complex numbers $\{z_i\}_{1\le i \le n}$, there is a subset $J\subset \{1,\dots , n\}$ such that   $$\left|\sum_{j\in J} z_j\right|\ge \frac{1}{4\sqrt 2} \sum_{k=1}^n |z_k|.$$  I believe I proven have a stronger statement. Is this proof correct, and if so, what is the optimal constant?  My proof. Consider all the $z_i$ with positive real part. Call the real part of the sum of these numbers $X^+$. In a similar way, form $X^-$, $Y^+$, and $Y^-$. Without loss of generality, let $X^+$ have the greatest magnitude of these.  Note that because $|\operatorname{Re}(z)|+|\operatorname{Im}(z)|\ge |z|$, we have  $$ \left(\sum_{k=1}^n  |\operatorname{Re}(z_k)|+|\operatorname{Im}(z_k)| \right) \ge \sum_{k=1}^n |z_k|.$$  But note that $\sum \limits_{k=1}^n  |\operatorname{Re}(z_k)|+|\operatorname{Im}(z_k)| = X^+ + |X^-|+ Y^+ +|Y^-|$, so we have  $$ 4X^+ \ge \sum_{k=1}^n |z_k|.$$ By choosing $J$ to be the set of complex number with positive real part, this proves a stronger statement, because the factor of $1/\sqrt 2$ isn't needed.


Well, I know that $\sqrt{2}$ is an irrational number and I am also familiar with the proof by contradiction method, but I'm confused by this notation as we can divide $\sqrt{2}$ by $1$ (as $\sqrt{2}$ is a real number and for a real number it is possible) and will get $\sqrt{2}$, so can't $\sqrt{2}$ be written as $\frac{\sqrt{2}}{1}$, and in that case $\sqrt{2}$ should be a rational number.

$$\Bbb{Q} = \left\{\frac ab \mid \text{$a$ and $b$ are integers and $b \ne 0$} \right\}$$ In other words, a rational number is a number that can be written as one integer over another. For an integer, the denominator is $1$ in that case. For example, $5$ can be written as $\dfrac 51$.  Is $5$ a rational number? Or is $\dfrac 51$  a rational number? I'm not able to figure out what the definition is actually saying. What are the numbers that cannot be written as one integer over another?  Irrational numbers are the numbers that cannot be written as one integer over another. Roots of numbers that are not perfect squares are examples of irrational numbers.  However, what is this then: $\dfrac {\sqrt 7} {2}$?


Most examples of logistic regression uses a cutoff (for classification) of 0.5. But I suspect this is a reasonable starting point only if you have equal number of positive samples and negative samples.  Suppose we want to classify whether someone will get a disease or has a disease. We randomly draw 1000 people from the population. Only 50 (5%) of the 1000 people have the disease, while the other 95% don't. Suppose we train a logistic model based on various attributes of the 1000 people.  Would it be reasonable to use a cutoff of 0.05 for this case? Any prediction greater than 0.05 gets classified as "disease." I understand the threshold should be determined by acceptable number of false positives/negatives, but I'm just talking about a starting point here.  Suppose the ground truth is that 5% of population has this disease. But in a 2nd case, we sample in such a way so that we have 500 people with the disease and 500 don't, and train another model. We would expect the output from the logistic model to be a lot closer to 0.5 than 0.05 in this 2nd case right?  This makes me think that the logistic regression uses the distribution of the different classes in the training data as their prior probabilities. And the output is the posterior probability. Is this a way to understand it?

PREFACE: I don't care about the merits of using a cutoff or not, or how one should choose a cutoff. My question is purely mathematical and due to curiosity.  Logistic regression models the posterior conditional probability of class A versus class B and it fits a hyperplane where the posterior conditional probabilities are equal. So in theory, I understood that a 0.5 classification point will minimize total errors regardless of set balance, since it models the posterior probability (assuming you consistently encounter the same class ratio).   In my real life example, I obtain very poor accuracy using P > 0.5 as my classifying cutoff (about 51% accuracy). However, when I looked at the AUC it is above 0.99. So I looked at some different cutoff values and found that P > 0.6 gave me 98% accuracy (90% for the smaller class and 99% for the bigger class) - only 2% of cases misclassified.   The classes are heavily unbalanced (1:9) and it is a high-dimensional problem. However, I allocated the classes equally to each cross-validation set so that there should not be a difference between the balance of classes between model fit and then prediction. I also tried using the same data from the model fit and in predictions and the same issue occurred.   I'm interested in the reason why 0.5 would not minimize errors, I thought this would be by design if the model is being fit by minimizing cross-entropy loss.   Does anyone have any feedback as to why this happens? Is it due to adding penalization, can someone explain what is happening if so?


I am working with example code from Stroustrup's book(Programming: Principles and Practice using C++").I have downloaded std_lib_facilities.h from   http://www.stroustrup.com/Programming/std_lib_facilities.h   When I try to compile on Ubuntu 14.04 with gcc,I got this:  d19.cc:1:32: fatal error: std_lib_facilities.h: No such file or directory  #include <std_lib_facilities.h>   Then I have doublechecked,file is in my directory.  milenko@milenko-HP-Compaq-6830s:~/cplus$ ls -l std_lib_facilities.h  -rw-r----- 1 milenko milenko 5667 Jul  4 09:35 std_lib_facilities.h   I have changed <> to "" and works fine,but still lingers a question why do we use <iostream> and  "std_lib_facilities.h"

In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?   #include <filename>  #include "filename"


I already have the Taken King. What will happen if I install the Legendary Edition? Will it delete my save file?

I'm a year one Destiny player; I bought The Dark Below, House of Wolves, and I'm thinking about buying the Legendary Edition. My only concern is that I'm not sure if the data from my original Destiny game would be overwritten or ignored by the Legendary Edition. Would it create its own save files like a completely different game? I don't want to get Legendary if that's the case, because all of my items would be completely gone, along with god knows how much play time.


I did not have enough rep to answer or comment on the original question, but I wanted to contribute my findings. See  for the original question. I received a warning similar to the one below, although the error code might have been different.  The following feature couldn't be installed: .NET Framework 3.5 (includes .NET 2.0 and 3.0) Error code: 0x800F081F  I tried running the update through the "Windows Features" dialog after each change, and reverted a change when it did not work where applicable. I tried different VPN's, changing the settings for "Specify settings for optional component installation and component repair" (source: ), however I did not try offline installation using DISM.exe because I did not have a Win 10 image handy.

When I try to install .net 3.5 I get the follwing message:     The following feature couldn't be installed:      .NET Framework 3.5   (includes .NET 2.0 and 3.0)      Error code: 0x800F081F   I tried with a standalone package and through Windows Features.  Update: Internet connection is fine.


In many languages, we use new to instantiate a new instance of a class. For example, in Java:  class MyClass {     int number = 1;      MyClass(int n) {         self.number = n;     } }   MyClass obj1 = new MyClass(5);   However, as I've been using Python more and more, I've come to wonder why the new keyword is even necessary. In Python, we can simply do:  class MyClass:     def __init__(self, n):         self.n = n   obj1 = MyClass(5)   So, what's the purpose of the keyword? Is there some syntactic ambiguity that we resolve by using the keyword?

Why does the  exist in modern languages such as C# and Java? Is it purely a self documenting code feature, or does it serve any actual purpose?  For instance the following example:  Class1 obj = new Class1();  Class1 foo() {     return new Class1(); }   Is as easy to read as the more Pythonesque way of writing it:  Class1 obj = Class1();  Class1 foo() {     return Class1(); }   EDIT:  hit the nail on the head with the clarification of the question: Why did they choose this syntax?


I've uninstalled McAfee and downloaded a new antivirus program. However, I am now noticing there are a number of folders with McAfee still saved under Windows/System32 folder as well as AppData folder. Would this cause issues with the new antivirus running, given there are still some files/folders from the old one on the PC? Is it safe to delete these?

So I'm cleaning out an old computer, and several of the programs it thinks it has were actually installed on an old drive, that's now gone. For some of them, it prompts to get rid of them because it can't find the drive, so that's all well and good.  But, for LibreOffice and a couple of others, it tries to run the LibreOffice Uninstaller, and only quits with a fatal error when the LibreOffice uninstaller can't find the drive.   The difference here is that in the first case, Windows can't even find the drive with the uninstallers on them, so it prompts to remove them; but in the second, its found the uninstallers on the local disk somewhere and is trying to run them, prompting a fatal error when the uninstaller can't find them.  What should I do here? How can I remove what's left of these programs/erase their names from the family tree?  Thanks!  evamvid


If $0< \alpha, \beta< \pi$ and $\cos\alpha + \cos\beta-\cos (\alpha + \beta) =3/2$ then prove $\alpha = \beta= \pi/3$   How do I solve for $\alpha$ and $\beta$ when only one equation is given? By simplification I came up with something like  $$ \sin\frac{\alpha}{2} \sin\frac{\beta}{2} \cos \frac {\alpha +\beta}{2}=\frac{1}{8}. $$ I don't know if this helps. How to do this?

If $0\leq x,y\leq\frac{\pi}{2}$ and $\cos x +\cos y -\cos(x+y)=\frac{3}{2}$, then how can I prove that $x=y=\frac{\pi}{3}$? Your help is appreciated.I tried various formulas but nothing is working.


I am new to working with time series. I have come across the statement that k-fold cross-validation is not be suitable for time-series, but I have a doubt that this restriction does not apply to my situation. My time-series are restricted to a certain interval, let's say 12 months. Furthermore assume that I have 100 samples of time series, respectively 100 sequences of values, for which I assume that they were generated by the same process. The individual samples (one sample = one series = one sequence) are incomplete, for example one sample could have missing measurements in month 1 and 6, and another sample misses measurements in months 2 and 4. I want to learn/create a model which allows me to predict the missing values of samples I haven't seen before. Naively, I would assume that I can do 5-fold cross-validation here by splitting my 100 samples into five folds of 20 samples each, train on four folds and validate on the fifth, repeating for all possible validation folds. I don't see how this could lead to data-leakage, since I do not split any one series into several parts. Rather, I treat each series as an individual sample. Am I correct in my assumption that I am doing something else than the usual 'forecasting' here, because I assume a restricted time-horizon, into which my inference falls as well? What is the name of this problem? I assume one could still say that I am forecasting in some sense, because in inference I might be confronted with a series which misses data for all but the first month. Or am I missing something fundamental here and cross-validation is indeed inappropriate?

Hyndman's great explanation of proper time series CV is at the bottom of the page in the following link:   Leave-One-Out illustration in the following link:   In the 'leave one out' illustration if the dataset in the illustration was time series data and was sorted from past to present from left to right, wouldn't it be identical to Hyndman's explanation on Time Series CV?  If not, how so?


I'm learning about phrasal verbs, but I'm not sure if I'll use them correctly. Which one of the following phrasal verb uses correct:  -I don't know how to turn down the volume? -I don't know how to turn the volume down?  I always think that they're same, but lately I feel like there must be a rule how to use them correctly, or perhaps they get different meanings?

Another murky subject arose today:  Would like to know, which one is appropriate:     I am unable to attend the mandatory meeting; I will make up some excuse.    Or:      I am unable to attend the mandatory meeting; I will make some excuse up.


I encountered this situation a few times before, but I didn't care much. This is a bit annoying for mobile users, me alike.  Yesterday I added a comment to  using the Stack Exchange iOS mobile app, which was for my own question. After that, I was greeted with a blank page, which you can see below. Commenting was successful, and it's there. Why is this happening?  EDIT: I was made aware that this question already has an answer , but it doesn't. The OP probably put their comment as an answer.  .  I am running version 1.6.6.2 of the app.

Since iOS 11.2 all the way through 12.2 beta 4, if you post or discard a comment on any post on any SE community, the screen will turn white. This has been ongoing continuously for a year now, and it affects both the SE app and the SO app.   You can go back to the previous screen and open the question again, and everything appears as normal. You can also rotate the screen to get the text to come back. Using the arrows to navigate between the question and answers updates the HUD, but the screen remains white unless one of the above is done to get the text back.        UPDATE: After posting anything (comment, answer), the screen goes all white except for the sidebar. Perhaps it is intentional, but I prefer last week’s behavior of going back to the content. Not major, since the sidebar icons still work.


I’m having a pool put in and the pool guys said they need a 20 amp breaker for the pool equipment. My outside panel says 100 amps (see picture). But my panel inside adds up well over 100 amps. Is this normal?  The breakers never trip even with the dryer, AC, and other appliances running.

So I know practically nothing about houses having rented for many years, just bought a house and was told by my inspector the panel is only a 70 amp panel and will need to be upgraded before I go to install AC.  I took him at his word, and had one AC consult, mentioning this to the guy he looked at my panel and agreed it needed an upgrade.  He gave a terrible quote ($5500 for a 3 ton goodman AC install without the electrical work, no ducting work necessary), so I got somebody else to give me a quote.  Now here's the problem: Fellow comes over and says I have a 150 amp panel and there's room (which I can see) for a couple more breakers on it, and gives me a considerably better AC quote (3500 for a lennox 3 ton 14 seer, all the same bells and whistles).  So now I'm thinking, considering how terrible the quote was from the first consult, perhaps he was just trying to squeeze even more money out of me? Why did my inspector tell me it was a 70 amp panel?  I look at the panel and there's like 6 or 8 15/20 amp breakers on it as well as a 30 amp double-breaker thingy (not sure if this is 30 per or 30 total) and a 50 amp double-breaker thingy.  I'll get a picture when I get home to post here, but off hand my question is:  Is it accurate to say I definitely have over a 70 amp panel due to the sum of amps on breakers in there right now? Is the sum of those little labels on the breakers make up my panels current amperage?  I look online for 70 amp panel and it's this tiny dinky thing with 3 breakers on it..  Edit: Here are the pictures, if this is not a 70 amp can anybody identify the amps?  Appearances to me are the diagram on the box does not match the actual panel, as the panel has 20 breaker spots (as I read it) while the diagram shows 14. And yes, I realize it's missing a main breaker, so I included the other two pieces I understand identify the max amp load; the conduit and the meter.


Could I submit a (Math) paper in a journal (i.e.  or ) as an independent researcher (not associated with any university)?  What is the process to submit a paper without affiliation?

Assume you have already completed your undergrad and have been working for a number of years. Does one need to be part of a university or a learning institution to publish papers?


Getting table cells values on checkbox selection  //function to get table cells values     function n() {   $('.m').on('click',function() {     var id = $(this).closest("tr").find(".t").text();     var p= $(this).closest("tr").find(".t1").text();     $('#c').append('', id, '');   }); }  for(int i=0;i<10;i++) {   div.innerHTML="

<input type='checkbox' class='m' onclick=n()>	data	data

"; } //appending values on checkbox selection

   While checkbox selected getting values of table rows in function n() in above example, but value appends in div#c, in such way as on first checkbox click goes 2 times, on second click 3 times prints and so on.  Why this happens?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I would like to backup photos and videos in the Compact Flash memory card directly to connected USB 2.0 or IEEE1394 enabled portable disk drive.  As I will be photographing in remote region using my EOS 7D, I prefer not requiring a laptop as intermediate CPU to copy the files.

This question seems similar to , but my needs are different :   I shoot in RAW exclusively I'm looking for a 100% offline solution: while traveling, Internet won't be accessible the "laptop" solution is too heavy for me: I'm looking for a lightweight solution the simplest, the better: one device to rule them all   EDIT:  I'm using good old Compact Flash cards (yes, the bigger ones), so I need a device that can read it. If it can read from other cards, this question might be interesting for more people than myself  - that's the whole purpose of the website.    Also asked by :  Portable Storage Device while traveling  I need storage device which is able to read CF cards and make a backup of my photos while traveling. I do not want to carry laptop (it's bulky) and tablet (too little storage) but looking into some other solutions.   So far I found:   Epson PXXXX - price is blocker for me Jobo Giga Vu - same as above Nexto DI - bit better, but still a lot Hyperdrive Colorspace UDMA - this looks the best for price/options Wolwerine PicPac - cheap, bad opinions DigitalFoci PhotoSafe - same as above Ex-Pro® Picture 2 Drive - didn't find much about it   So ladys & gents what do you use?


Im trying to pass the following regex to javascript but I couldn't achieve passing it. I was the entire afternoon trying to successfully use it for my project, but sadly I couldn't find the way to make this work. Here's the link of the regex:   Regex: ((?<![\\])['"])((?:.(?!(?<![\\])\1))*.?)\1  Test string: [1, "c", "[\"asd\" , 2]"]  What I want to achive is to get outer quotes of a given string.  The regex was taken from here:

I need a Perl regular expression to match a string. I'm assuming only double-quoted strings, that a \" is a literal quote character and NOT the end of the string, and that a \ is a literal backslash character and should not escape a quote character. If it's not clear, some examples:  "\""    # string is 1 character long, contains dobule quote "\\"    # string is 1 character long, contains backslash "\\\""  # string is 2 characters long, contains backslash and double quote "\\\\"  # string is 2 characters long, contains two backslashes   I need a regular expression that can recognize all 4 of these possibilities, and all other simple variations on those possibilities, as valid strings. What I have now is:  /".*[^\\]"/   But that's not right - it won't match any of those except the first one. Can anyone give me a push in the right direction on how to handle this?


I am trying to connect a MSSQL database from a Ubuntu 14.04 machine. I am using FreeTDS to connect, by following this tutorial   [  I'm stuck with the final stage, after giving the following command :  isql -v MSSQL devuser 'devpass'   Ubuntu is giving me the following error :  [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect   How can I overcome this issue and connect the MSSQL database?  Update 1 My problem is half solved now. Driver has been found now. At this moment it is showing the following error.  [IM002][unixODBC][Driver Manager]Data source name not found [IM003][unixODBC][Driver Manager]Host name unknown [ISQL]ERROR: Could not SQLConnect

Ubuntu 14.04.1 LTS   From my Ubuntu machine I want to access an MS SQL 2005 server via ODBC. This MSSQL server is on our internal network. I've installed these packages: unixodbc, unixodbc-dev, unixodbc-bin, libodbc1, libtool, autotools-dev and several other dependencies. Also tdsodbc, freetds-bin, freetds-common, freetds-dev, libct4.   But I can't seem to find where the .so file is to use it in my DSN in /etc/odbc.ini. Which file do I use? Doing this: echo "select 1"|isql -v mydsn gives me this error:   [01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libtdsodbc.so' : file not found [ISQL]ERROR: Could not SQLConnect   The 'mydsn' is trying to point to /usr/lib/libtdsodbc.so but it's not there. Which .so file do I set up in the /etc/odbc.ini file?  Thank you.


In tikz, I define a variable outside \foreach loop, and use \pgfmathtruncatemacro command to increase it inside the loop. Below is my MWE. \documentclass{article} \usepackage{pgfplots,tikz,tikz-3dplot}  \begin{document} \begin{figure}     \centering     \begin{tikzpicture}     \pgfmathtruncatemacro\j{1};     \foreach \i in {1,4,7}     {          \node at (\i,1.4) {\j};         \pgfmathtruncatemacro\j{\j+1};         \node at (\i+1.5,1.4) {\j};         \pgfmathtruncatemacro\j{\j+1};         \node at (\i,0) {\j};         \pgfmathtruncatemacro\j{\j+1};         \node at (\i+1.5,0) {\j};     }     \end{tikzpicture}  \end{figure} \end{document}  Instead of increasing the value of \j up to 12, it resets back to 1 after only one iteration of the loop. What am I doing wrong?

I'm trying to plot some recursively defined sequence with tikz and am encountering some behavior I can't understand, here is my code:  \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\f}{1} \foreach\i in {1,...,10} {   \pgfmathsetmacro{\ff}{\i*\f}   \draw (0,\i) node {\ff};   \pgfmathsetmacro{\f}{\ff}   } \end{tikzpicture} \end{document}   I would have expected this to print the sequence of the factorials of the first ten integers (going down) but what I get is 10,9,...,1. What is happening ? How can I handle such recursively defined functions in Tikz ?


I did some research and some say they are same and interchangeable but some says they are different. What I understand is that Bandwidth is the amount of data carried while the Speed is the data carried at a certain rate. So, when we get Internet plan from our ISPs and they say that the speed would be, for example, 50Mbps. Is that Bandwidth or Speed? I am a little confused. Can anyone shed some light on it and make it clear? Thank you in advance

I have an internet connection that provides a bandwidth of  256 kbps. However, when I download a file, the downloading software displays numbers like 30 kbps, 40 kbp etc. and keeps changing. I have never seen it showing 256 kbps.  What I want to know is that even though I have a connection which has 256 kbps bandwidth, when somthing is being download it doesn't use the full 256 kbps bandwidth.  I want to know what do the numbers 30 kbps, 40 kbps indicate ? Do they indicate speed. Please help me to understand this.


I'm a veteran hobbyist photography with a so-so photography IQ in the moment, by no means a settings expert. I often shoot landscapes and wildlife, but also will be taking pictures for my university's basketball/football/baseball teams.   I have a Canon Rebel t7i and a 24-105L f/4 IS USM and am looking for a good telephoto - but don't have a bunch of money to splurge on one.  I know in a perfect world I get the Canon 70-200L f2/8 IS USM but that is just too pricey for me. So, I've looked into a variety of alternatives and would love advice based on my budget and the subjects/events I normally shoot: Third Party Lens - Sigma or Tamron nomination 70-200L f/4 IS ll USM 70-200L f/4 USM (no Image Stabilization) 80-200L f2.8 (No IS and no Ultra Sonic Motor)  I would especially love some information about what/where I would by hurt by the lack of a USM.  Thanks

This is a two parts question  1) Is there a significant reason I should get the Tamron 70-200 G2 rather than the Tamron SP 70-200mm F2.8 Di VC USD?  2) Would getting the Canon 70-200L (first version) be a better purchase then the Tamron in question 1?


I have built universal jQuery plugin using jQuery Dialog to displays messages. now this is called my jQuery $.ajax -->done function . I need to capture Dialog close event in .ajax function so that I can redirect page after that accordingly. How I achieve this??  Ajax function  $('#NewFunctionNavigationForm').submit(function (e) {     e.preventDefault();    var DataToPost =  JSON.stringify($('#NewFunctionNavigationForm').serializeObject());    var formURL = $(this).attr("action");    $.ajax({       type: "POST",       url: formURL,       dataType: "JSON",       contentType: "application/json; charset=utf-8",       data: DataToPost,   }) .done(function (data, textStatus, jqXHR) {      alert("Success: " + data.Response);      $(this).MyMessageDialog({         _messageBlockID: "_StatusMessage",         _messageContent: "ccc"     });       ????????????? i need to capture dialog close event here??     window.location = "/SystemCore/SystemCoreHome"; }) .fail(function (jqXHR, textStatus, errorThrown) { alert("Error"); }) .always(function (jqXHROrData, textStatus, jqXHROrErrorThrown) { alert("complete"); });  });   message Dialog plugin  function ($) {    var _messageWrap = {     _messageBlockID: "",     _messageContent: ""    }; $.fn.MyMessageDialog = function (_messageWrap) {      alert("from plugin  "+_messageWrap._messageBlockID + "  " + _messageWrap._messageContent);      $("#" + _messageWrap._messageBlockID).text(_messageWrap._messageContent);       if($("#"+_messageWrap._messageBlockID).length) //check if div with given ID exists     {          $("#" + _messageWrap._messageBlockID).dialog({             modal: true,             autoOpen: false,             buttons: {                 Ok: function () {                     $(this).dialog("close");                 }             },             width: "50%",         });          //clear existing content if there are any in given Div         $("#" + _messageWrap._messageBlockID).html("");          //add content to div          $("#" + _messageWrap._messageBlockID).append(_messageWrap._messageContent);          $("#" + _messageWrap._messageBlockID).dialog("open");     }     else     {         alert("not exist");     } };  }(jQuery));

I am using the  plugin  I am looking for way to refresh the page when in some circumstances when the dialog is closed.  Is there a way to capture a close event from the dialog?  I know I can run code when the close button is clicked but that doesn't cover the user closing with escape or the x in the top right corner.


We already have the spoiler formatting      like this   for information that should be hidden until specifically needed (by hovering), and the code snippet formatting    like this     for code that can be revealed and left visible, but when answering questions that ask specifically for a hint, or a direction (e.g. my answer ) it would be very useful to be able to either create a hierarchical spoiler (such that viewing spoiler 3 reveals spoilers 1 and 2 as well), or a non-code snippet (such that the user can expand the entire post without having to use 'Ctrl+A' to view everything inverted), in order to provide the information that the question asks for specifically, while still solving the problem for future visitors who may want more than a hint.  The collapsing is covered in part by , but the idea of hierarchical / sequential spoilers has not been raised / addressed before.

A question with attachments, screenshots and/or long code, makes it vertically long and often difficult to read fast.  It would be nice to have a new kind of format, such as 'hideable', with a graphic button or a '+' / '-' sign, so you can add additional details, visible only on a click.


My computer has a error that is preventing it from booting to the desktop. The error message is      Warning failed to connect to lvmetad no such file or directory falling   back to internal scanning   It happened right after I installed GNOME, how to fix the error?

My Ubuntu laptop which was working fine until recently. My desktop disappeared and all the desktop icons are gone. All I have access to is the terminal. In an attempt to fix the problem, I installed GNOME but it made the computer give the error:     Warning! Failed to connect to lvmetad. No such file or directory Falling back to internal scanning.    I can press Ctrl+Alt+F1 to start tty1 but I can't get to a graphical user interface. What did I do wrong and how do I fix it?.  The operating system is ubuntu Linux


Let $R$ be the relation on $N\times (N\setminus\{0\})$ defined by $((a, b),(c, d)) \in R$ if $ad = bc$. Prove that $R$ is an equivalence relation.  I'm pretty confused with this problem, mainly because I don't understand the significance of $(N\setminus\{0\})$. Any ideas on how to solve this?

If $N$ is the set of all natural numbers, $R$ is a relation on $N \times N$, defined by $(a,b) \simeq (c,d)$ iff $ad=bc$, how can I prove that $R$ is an equivalence relation ?


Given two polytopes $P_1, P_2$ then define the graph on $P_1 \times P_2$ as follows:  $[(a,b),(x,y)]$ is an edge in $P_1 \times P_2$ iff $a=x$ and $[b,y]$ is an edge in $P_2$ or $b=y$ and $[a,x]$ is an edge in $P_1$.  Is this new structure a polytope?

How do we calculate the Cartesian product between $n$ polygons? Is it always a polytope? If so, can we say anything about its faces?  For example, $n$ squares: $\{S_1:[a_1, a_2] \times [b_1, b_2], \ldots, S_n:[a_k, a_{k+1}] \times [b_{k}, b_{k+1}]\}$ so, $S_1 \times \ldots \times S_n \in \mathcal{R}^n$ forms a $n-$dimensional box.


Assuming each coin flip is independent of each other, and chance for heads is $50\%$.  How can we calculate the chance that after $n$ flips having gotten 6 heads in a row at least once?

Tossing a fair coin for $N$ times and we get a result series as $HTHTHHTT\dots~$, Here '$H$' denotes 'head'  and '$T$' denotes 'tail' for a specific tossing each time.  What is the probability that the length of the longest streak of consecutive heads is greater than or equal to $k$? (that is we have a $HHHH\dots~$, which is the substring of our tossing result, and whose length is greater than or equal to $k$)  I came up with a recursive solution (though not quite sure), but cannot find a closed form solution.  Here is my solution.  Denote $P(N,k)$ as the probability for tossing the coin $N$ times, and the longest continuous heads is greater or equal than $k$. Then (For $N>k$)  $$ P(N,k)=P(N-1,k)+\Big(1-P(N-k-1,k)\Big)\left(\frac{1}{2}\right)^{k+1}   $$


I have been deported from UK two years ago, because I was charged and sentenced for criminal offence. Would there be any issue if I apply for schengn tourist visa

I have a friend; he’s been living in the UK since he was 18. He has applied for family and work visas but the UK has refused all of them. He got married to someone in the UK. Immigration didn’t think it was real and he got deported. He ended up coming back. Now he has met a girl and they are trying to do his papers again. He went back to his country and is applying there but will the visa get approved since he has been deported?


It is a simple code, what I am looking for is to learn the best practices that I can implement, when trying to refactor the show method, to a method that is closed to modifications. so that in the future if they ask me to enter a new card with a value of type chain, it is not necessary to modify this method.  class Card: def __init__(self, suit, value):     self.suit = suit     self.value = value  def show(self):     if self.value == 1:         value = "Ace"     elif self.value == 11:         value = "Jack"     elif self.value == 12:         value = "Queen"     elif self.value == 13:         value = "King"     else:         value = self.value      return f'{value} of {self.suit}'

I want to write a function in Python that returns different fixed values based on the value of an input index.    In other languages I would use a switch or case statement, but Python does not appear to have a switch statement.  What are the recommended Python solutions in this scenario?


I am comfortable with the argument that in order for the wavefunction to be single valued/2$\pi$ invariant this means that $L_z$ must be an integer value of $\hbar$. $$U(2\pi e_z)=e^{-(2\pi i/\hbar)\hat L_z}=1$$ However I don't know how it follows from this that $|L|^2 = \beta \hbar^2$ where $\beta$ in an integer. $L_x$ and $L_y$ are indetermined so it seems fishy to say 'if' they were measured they would have integer $\hbar$ values and so $L_x^2 + L_y^2 + L_z^2$ would be an integer $\hbar^"$ value, since we can never actually measure all of these at once.

I simply have no idea how this result is found $$I=\hbar  \sqrt{\ell(\ell+1)}.$$ The result seems to just be dumped in textbooks rather than explained. I can get the result that $I_z=\hbar m_j$. Please explain as clearly as possible how this is derived.  Also, any pointers towards any books/videos that may help me learn quantum mechanics would be appreciated.


I also learned that to get a list of tax rates for the territory I need to use the address and possibly a zip code. Is there a unified method for storing a structure of addresses in the database?

Take the representation of an Address, here below is a complete and very detailed implementation:    here instead is a quick implementation (which more or less contains the same fields, imagine all fields in the former are contained also in the second)    If I were to decide which is the closer to a normalized and academically correct one I'd say the first one, however if I were to start a project I would go with the second.  Do you agree with this consideration? And if yes, how does one deal with this fact?   start with an easy database and as soon as it is time improve it into a more normalized/academical database. start with something as close as possible to the academical database stick with the quick and dirty solution


How can I add to pie charts in ArcGIS (10.1) labels of the values the charts are created with?

I am creating a Location Pie chart for my study area using Male and Female population in ArcGIS for Desktop.  The software creates for legend of charts but I want to create a label on chart itself.  How do I do this in ArcMap?


Firstly I am very new to Linux i.e. never used it before (have used plenty of other OS) I have an old desktop computer -motherboard in an intel d865gbf and I would like to run Ubuntu linux on it. What version must I download and where do I get it? Thanks in advance for your help

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


My attempt $$\sum_{r=0}^{n} r \times \frac nr \left[\binom {n-1}{r-1} \right]^2$$ $$=n\sum _{r=0}^{n} \left [\binom {n-1}{r-1}\right]^2$$ The square on the binomial coefficient is throwing me off, otherwise it would have been easier to proceed. I don’t know what to do with that square. Edit: As pointed out in the comment, i managed to find out $$\sum_{r=0}^n (\binom nr )^2 = \binom {2n}{n}$$ But using this in the above expression isn’t giving me the right answer. Am I supposed to make a modification to the limits in the sigma function?

Please help me evaluate the following series.     $$\sum_{k=0}^{n} k{n\choose k}^2.$$


I am currently an undergrad student in computer engineering in Brazil and I have taken the Quantum mechanics subject as well as I am did a  (the two jupyter notebooks, it's in portuguese though) on quantum computing with a teacher that is currently building one at my college. Apart from the chances I already have of learning about this subject are there other means or opportunities any of you recommend going after?

I am a computer science student and am currently searching for resources from where I can learn about quantum computers, quantum computing models, their working principles, their gates and some simple quantum algorithms.


I have 2 versions of Blender, 2.79 and 2.9. I edited a .blend file that was made in 2.79 today in 2.9, then saved. Now, I cannot open it in 2.79 anymore (it just crashes Blender). However, there are plugins in the 2.79 version that I haven't yet installed, or might not exist in 2.9. And I have to deliver some files. I now that all Adobe apps allow you to export documents to a previous version if you need, but I couldn't find anything about Blender. I would prefer not to have to redo textures, etc. Can I export the file from 2.9 to 2.79 easily?

I was experimenting with a file in 2.8 and accidentally saved it. When I opened it back in 2.79 I can't see my model. It disappeared with the error  File written by newer Blender binary.  How can I get my model? I can see my model in 2.8 but nothing in 2.79. I tried to export it  in .obj, but I lost all my modifiers, material and camera setting.


Hi guys this is my first time using this website and I thought it would be useful as I am currently in 7th grade doing Maths Olympiad and studying permutation and combination here is my question ---->  Mrs Reed forgets the combination number to her safe. The combination has 4 numbers, each a 1 digit number. The 4 digits add up to 10 and there is no zero. How many times at the most does Mrs reed have to try to open her safe?  Thanks and pls note that I am currently in Grade 7 so pls explain it so I am able to "understand"

Mrs Reed forgets the number combination to her safe. The combination has $4$ numbers each is a $1$ digit number. The $4$ digits add up to $10$ and there are no zeros. How many times does Mrs Reed have to try to open her safe?  My attempt: ${9 \choose 3} = 84$ but the answer is $80$.


I've been working on the following exercise and got stuck:  "Prove that a connected Riemannian manifold is complete if and only if every regular curve that diverges to infinity has infinite length."  Here, a curve with domain $[0,b)$ (and $b$ possibly infinite) diverges to infinity if for every compact subset of the manifold, there exists a time beyond which it does not intersect the compact set anymore.  I was able to prove the forward direction, but I can't figure out how to get the converse. I've tried both to show that maximal geodesics are defined for all time, and when that didn't work, I tried to show Cauchy sequences converge, but I didn't have success in either case. Any advice is greatly appreciated.

A divergent curve on a noncompact Riemannian manifold $M$ is a curve $\alpha:[0,\infty)\to M$ where given any compact $K\subset M$ we have there exists $t_{0}$ such that $\alpha(t) \notin K$ for $t>t_{0}$. Subsequently the length is defined in the usual sense for curves on a manifold:  $L(\alpha)=\int_{0}^{\infty} ||\alpha′(t)||dt$.  The problem is  Prove that a noncompact manifold is complete if and only if every divergent curve has unbounded (i.e. infinite) length.  I proved that if M is Complete ⟹ Every divergent curve has unbounded length. But i don't know how i prove the reciprocal.  Thanks


Hey, I am trying to put a little logic into my C# app that will create a table called Import, IF it doesn't already exist.. here is my code, it doesn't seem to work tho.  con.Open();                     using (SqlCommand cmd = con.CreateCommand())                     {                         cmd.CommandText =                             @"                         IF (EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'RX_CMMData' AND TABLE_NAME = 'Import')) BEGIN CREATE TABLE Import (   RowId     integer PRIMARY KEY NOT NULL,   PartNumber  varchar(200) NOT NULL,   CMMNumber   varchar(200) NOT NULL,   Date        varchar(200) NOT NULL,   FeatType    varchar(200) NOT NULL,   FeatName    varchar(200) NOT NULL,   Value       varchar(200) NOT NULL,   Actual      decimal,   Nominal     decimal,   Dev         decimal,   TolMin      decimal,   TolPlus     decimal,   OutOfTol    decimal,   FileName    varchar(200) NOT NULL ); END";                         cmd.ExecuteNonQuery();                     }                     con.Close();

I would like this to be the ultimate discussion on how to check if a table exists in SQL Server 2000/2005 using SQL Statements.  When you Google for the answer, you get so many different answers. Is there an official/backward and forward compatible way of doing it?  Here are two possible ways of doing it. Which one among the two is the standard/best way of doing it?  First way:  IF EXISTS (SELECT 1             FROM INFORMATION_SCHEMA.TABLES             WHERE TABLE_TYPE='BASE TABLE'             AND TABLE_NAME='mytablename')     SELECT 1 AS res ELSE SELECT 0 AS res;   Second way:  IF OBJECT_ID (N'mytablename', N'U') IS NOT NULL     SELECT 1 AS res ELSE SELECT 0 AS res;   MySQL provides the simple   SHOW TABLES LIKE '%tablename%';    statement. I am looking for something similar.


How does light and light energy "breakdown" (when light is reflected, some light will be transmited, absorbed, or reflected, just like energy associated with light) depend on wave frequency? I've looked up similar questions, but they only seem to explain why light frequency doesn't change during reflection, and not why and how does the wave frequency influences the reflection.

I was surprised to see that the Fresnel equations for reflection depends on refractive index and angle of incidence, but they do not depend on frequency. Why is this case? Are they restricted to regions that do not show frequency dependence?


My charging port is broken. Need to make a charger, thanks for help.

I have a ES cordless drill and it has a Li-Ion battery (model is ES GB118L20).  The original battery charger is missing and there is almost no way for me to get one in my country.  The Battery has 5 Samsung INR18650-20R 3.7v cells connected in series.     The battery pins are BATTERY+, BATTERY- and 4 pins marked BATTERY1, BATTERY2, BATTERY3 and BATTERY4 which are connected between + and - of batteries (probably used for balanced charging). Also there are T, BS and ID pins which I'm not sure of their role.  I tried charging the cells one by one by connecting a TP4056 charger to each battery pin (for example [BATTERY- and BATTERY1] or [BATTERY1 and BATTERY2], but was not successful. It didn't even start charging it.  Can anyone help me how to charge this thing?


I am unsure if this is even possible, but basically, I have event listeners that were automatically added to a checkbox control by a library (jQuery).  Inspecting the control in Chrome Developer Tools, under the Event Listeners, I can see that touchmove has been attached to my control.  How would I be able to basically remove that Event Listener, particularly if I don't know the function that was attached to it?  Looking for some advice. Thanks.

I have an input type="image". This acts like the cell notes in Microsoft Excel. If someone enters a number into the text box that this input-image is paired with, I setup an event handler for the input-image. Then when the user clicks the image, they get a little popup to add some notes to the data.  My problem is that when a user enters a zero into the text box, I need to disable the input-image's event handler. I have tried the following, but to no avail.  $('#myimage').click(function { return false; });


I'm tring to read from text file in hebrew but i get some jebrish...  this is my code:  try {         workFile =new File("tripShosWork.txt");         homeFile =new File("tripShosHome.txt");         BufferedReader homeBr =  new BufferedReader(new FileReader(homeFile));         BufferedReader workBr = new BufferedReader(new FileReader(workFile));         home = new String [98];         for (int i = 0; i < home.length; i++)              home[i] = homeBr.readLine();         work = new String [19];         for (int i = 0; i < work.length; i++) {             work[i] = workBr.readLine();          }     } catch (Exception e) {         e.printStackTrace();     }      System.out.println(Arrays.toString(work));     System.out.println(Arrays.toString(home));   i need your help!

I tried to use java.io.FileReader to read some text files and convert them into a string, but I found the result is wrongly encoded and not readable at all.  Here's my environment:   Windows 2003, OS encoding: CP1252 Java 5.0   My files are UTF-8 encoded or CP1252 encoded, and some of them (UTF-8 encoded files)  may contain Chinese (non-Latin) characters.  I use the following code to do my work:     private static String readFileAsString(String filePath)     throws java.io.IOException{         StringBuffer fileData = new StringBuffer(1000);         FileReader reader = new FileReader(filePath);         //System.out.println(reader.getEncoding());         BufferedReader reader = new BufferedReader(reader);         char[] buf = new char[1024];         int numRead=0;         while((numRead=reader.read(buf)) != -1){             String readData = String.valueOf(buf, 0, numRead);             fileData.append(readData);             buf = new char[1024];         }         reader.close();         return fileData.toString();     }   The above code doesn't work. I found the FileReader's encoding is CP1252 even if the text is UTF-8 encoded. But the JavaDoc of java.io.FileReader says that:     The constructors of this class assume   that the default character encoding   and the default byte-buffer size are   appropriate.   Does this mean that I am not required to set character encoding by myself if I am using FileReader? But I did get wrongly encoded data currently, what's the correct way to deal with my situtaion? Thanks.


Given $(G,\cdot)$ a topological group with identity $e$, is it always true that $\pi_1(G,e)$ is abelian?  For what it's worth: I have already shown that if $f,g\in\Omega(X,e)$, then $[f \times g]=[f\cdot g]$, where "$\times$" is the ordinary path multiplication (left to right), "$\cdot$" is the group multiplication (that's to say, $f\cdot g(t)=f(t)g(t)$) and $[\cdot]$ is the homotopy class. So in view of this property, if $G$ is abelian itself then $\pi_1(X,e)$ is trivially abelian too. However, I have no clue how to proceed when $G$ is nonabelian.

Hypothesis: Let $G$ be a topological group with identity element $e$.  Let $\mu$ denote the multiplication mapping in $G$.  Goal: Show that $\pi_1(G,e) = \pi(G)$ is an abelian group via the hint below.  Hint: There are two products on $\pi(G)$.  The usual product $\circ$ defined for the fundamental group and the product $\ast$ induced by  $$ \ast: \pi(G) \times \pi(G) \cong \pi(G \times G) \overset{\pi(\mu)}{\rightarrow} \pi(G). $$  Show that there is a common two sided unit, $u \in \pi(G)$ for both products and there is a distributive law  $$ (f \ast g) \circ (a \ast b) = (f \circ a) \ast (g \circ b) $$  Attempt:   Suppose the distributive law in the hint holds.  Suppose further that $1$ -- the identity element in $\pi(G)$ with respect to $\circ$ -- serves also as the identity element in $\pi(G)$ with respect to $\ast$. Then for $a,b \in \pi(G)$, we would have the following relationship:  $$ (1 \ast a) \circ (b \ast 1) = (1 \circ b) \ast (a \circ 1) $$  so that  $$ a \circ b = b \ast a $$ Then if we can show that for all $f,g \in \pi(G)$ that $f \ast g \iff f \circ g$, we could complete the above relation to  $$ a \circ b = b \ast a = b \circ a $$  so that $\pi(G)$ is abelian as desired.   Question: Am I on the right track?


I am looking for multiple proofs of that statement: here $\phi(n)$ denotes the Euler’s totient  $$\sum_{d|n}{\phi(d)}=n$$   Here’s one:   By unique factorisation theorem: $n=\prod_{k=1}^{m}{p_k^{\alpha_k}}$ and $d=\prod_{k=1}^{m}{p_k^{\beta_k}}$ where $0\leq \beta_k\leq \alpha_k$ so:   \begin{align} \sum_{d|n}{\phi(d)}&=\sum_{0\leq \beta_k\leq \alpha_k}{\phi\left(\prod_{k=1}^{m}{p_k^{\beta_k}}\right)}\\ &= \sum_{0\leq \beta_k\leq \alpha_k}{\prod_{k=1}^{m}\phi({p_k^{\beta_k})}}\\ &=\sum_{0\leq \beta_k\leq \alpha_k}{\prod_{k=1}^{m}{(p_k^{\beta_k}-p_k^{\beta_k-1}})}\\ &=\prod_{k=1}^{m}{\sum_{0\leq \beta_k\leq \alpha_k}{(p_k^{\beta_k}-p_k^{\beta_k-1}}})\\ &= \prod_{k=1}^{m}{p_k^{\alpha_k}}\\ &=n. \end{align}

If $k$ is a positive natural number then $\phi(k)$ denotes the number of natural numbers less than $k$ which are prime to $k$. I have seen proofs that $n = \sum_{k|n} \phi(k)$ which basically partitions $\mathbb{Z}/n\mathbb{Z}$ into subsets of elements of order $k$ (of which there are $\phi(k)$-many) as $k$ ranges over divisors of $n$.  But everything we know about $\mathbb{Z}/n\mathbb{Z}$ comes from elementary number theory (division with remainder, bezout relations, divisibility), so the above relation should be provable without invoking the structure of the group $\mathbb{Z}/n\mathbb{Z}$. Does anyone have a nice, clear, proof which avoids $\mathbb{Z}/n\mathbb{Z}$?


I downloaded the driver for the HP LaserJet Pro M15w printer on this  , whether this website is safe to use

Let's assume that one has some HP printer and/or scanner and checked its support status on the corresponding page of HPLIP site - .  So one have the following information: the device Model name, Min. HPLIP Version and Driver Plug-in need.   What should one install to make Ubuntu fully support the HP printer and/or scanner?


I want to start learning game development and I would obviously come across this tool. So every where I went people mentioned Unreal Engine 4 to be a viable choice, I've tried a bit of Unity and now I want to try Unreal. Only issue I came across UDK and UE4, I downloaded UDK which turns out to be different from tutorials and I can't seem to find any info on that and besides I could only run the software once because after the first time it starts a game, I re-installed UDK I still get the issue, but anyways that's a different topic, what I want to know is whether UDK and UE4 are different and if they are, where do i get UE4, becauuse when I down UE4 (from - ), it downloads a game launcher and no development tool. In case they are same, why is my version of UDK different fr

I'm thinking of learning Unreal Engine 4, but it costs money, and I want to try and keep costs as low as possible while I'm learning. In contrast, the Unreal Development Kit is free.  How similar are the two? If I learn UDK first, how easily can I transition to UE4?


Realized vs realised, randomized vs randomised etc. Is it true that the former is always correct in US and the latter in UK english? Is there a list of english-speaking nations that use the former or the latter?

I have trouble understanding why some words change "s"-es to "z"-s from BE to AE and some not. For example:   analyse -> analyze characterise -> characterize hypnotise -> hypnotize   But:   compromise -> compromise   Is there any rule to this?  Slightly related:


problem 5.5.36 - Let $\mathscr{X}$ be a separable Banach space and let $\mu$ be counting measure on $\mathbb{N}$. Suppose that $\{x_n\}_{1}^{\infty}$ is a countable dense subset of the unit ball of $\mathscr{X}$, and define $T:L^{1}(\mu)\rightarrow \mathscr{X}$ by $Tf = \sum_{1}^{\infty}f(n)x_n$. a.) $T$ is bounded. b.) $T$ is surjective. c.) $\mathscr{X}$ is isomorphic to a quotient space of $L^{1}(\mu)$.  Attempted proof a.) We have that $Tf = \sum_{1}^{\infty}f(n)x_n$, hence  $$\lVert Tf\rVert  = \lVert \sum_{1}^{\infty}f(n)x_n\rVert \leq \sum_{1}^{\infty}|f(n)|\lVert x_n\rVert \leq \sum_{1}^{\infty}|f(n)| = \lVert f\rVert_{1}$$ hence $T$ is bounded. Attempted proof b.) My thoughts here is to assume that $\{x_n\}$ converges to $x$ and $x$ is in $\mathscr{X}$. Then go from there to prove that $T$ is surjective. For c.) I have no clue, any suggestions is greatly appreciated.

Folland, "Real Analysis", Chapter 5.3, Exercise 36:     Let $\mathcal{X}$ be a separable Banach space and let $\mu$ be   counting measure on $\mathbf{N}$.  Suppose that   $\left\{x_n\right\}_1^\infty$ is a countable dense subset of the unit   ball of $\mathcal{X}$, and define $T \colon L^1(\mu) \to \mathcal{X}$   by $Tf = \sum_1^\infty f(n) x_n$.  (a)  $T$ is bounded.  (b)  $T$ is   surjective.   I have proved (a).  I would like help on (b).  Here are my ideas so far.    Say we want to show $y \in \mathcal{X}$ is in the image of $T$.  Reduce to the case $||y|| = 1$ and let $x_{n_m} \to y$.  My thought is to produce for each $N$ a function $f_N \in L^1(\mu)$ such that $||y - \sum_n^\infty f(n)x_n|| < 1/N$ and also such that the $f_N$ converge in $L^1(\mu)$ to some $f \in L^1(\mu)$.  Then use the continuity of $T$ to conclude $T(f) = y$.    The way I have been setting up my inequalities is as follows. Pick $M_N$ such that for all $m > M_N$, $||y - x_{n_m}|| < 1/N$.  Then I want to define $f_N$ so that $$\sum_n^\infty f_N(n) = \sum_{m > M_N}^\infty f_N(m) = 1, $$ hence $$||y - T(f_N)|| = ||\sum_{m > M_N}^\infty f_N(m) y + \sum_n^\infty f_N(n)x_n|| \leq \sum_{m > M_N}^\infty f_N(m) || y - x_{n_m} || < \frac{1}{N}. $$  Presumably, if the $f_N$ are appropriately chosen, then I can find a dominating function and apply the Dominated Convergence Theorem to finish up.    However, getting all these hypotheses to hold simultaneously has been difficult.  In essence, the difficulty seems to be in requiring that the $f_N$ be "normalized" as well as possess a dominating function.  If this method is feasible, at least it seems to require a bit of analysis to show the desired series all converge.  Perhaps I am missing something cleaner.  If so, a simpler solution would be much appreciated.    -Thanks.


I have been assigned to do a job on a server but am unsure what dist is running. /proc/version tells me:  Linux version 2.6.18-194.26.1.el5.028stab079.2 (root@rhel5-build-x64) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Fri Dec 17 19:25:15 MSK 2010  so that makes me think Red Hat Enterprise Linux 5 but then i try to install some package and find out that aptitude and apt-get are installed instead of yum. I thought aptitude and apt-get belonged to the debian world. So now I wonder, what distro is running on this server?

Is there a way to determine what version (distribution & kernel version, I suppose) of Linux is running (from the command-line), that works on any Linux system?


I'm looking for a way to illustrate Trapezoidal rule. I've seen this code to illustrate Riemann sums () but I don't see how to adapt it.  \documentclass[border=5mm]{standalone}  \usepackage{pgfplots}  \pgfplotsset{compat=1.9}  \begin{document} \begin{tikzpicture} \begin{axis}[         xtick={0,1,3,5,7,9,11,13,15,17},ytick={0,...,1.5},         xmax=18,ymax=1.2,ymin=0,xmin=0,         enlargelimits=true,         axis lines=middle,         clip=false,         domain=0:17,         axis on top         ]  \addplot [draw=red, fill=red!10, ybar interval, samples=9, domain=1:17]         {x^-1}\closedcycle; \addplot [draw=green, fill=green!10, ybar interval, samples=9, domain=17:1]         {x^-1}\closedcycle;  \addplot[smooth, thick,domain=1:17,samples=40]{x^-1};  \end{axis} \end{tikzpicture} \end{document}   Do you have any suggestion ?

I have problem to draw graphic with LaTeX (especially TikZ)?  Like this:


How to prove that if a number is divisible by 2 and 3 both,it is also divisible by 6.It should be proven by using Euclid's Division Lemma.

Why is it that a number such as $108$, that is divisible by $2$ and $3$, is also divisible by $6$?   Is this true that all numbers divisible by two integers are divisible by their product?


I'm trying to learn using git in windows with command line. I want create a txt file in master, then create 2 branches and modify text differently but I have a problem. I succesfully create repository file. Then I add the file and commit it. No problem until this point. After this I create and checkout to new branch with code: git checkout -b feature2  Then I open the text with notepad(with command) and modify and save it. Then checkout to master and when I open the text it is modified version. So I can not create third branch with different text. It seems that there is only one text file to all branches. What do I miss?

I am working on a git repository with a master branch and another topic branch. I have switched to topic branch and modified a file. Now, if I switched to master branch that same file is shown as modified.   For example:  git status in git-build branch:  # On branch git-build # Changes to be committed: #   (use "git reset HEAD <file>..." to unstage) # #       modified:   cvsup_current #   Switch to master branch  [root@redbull builder_scripts (git-build)]# git co master M       builder_scripts/cvsup_current Switched to branch "master"   git status in master branch  [root@redbull builder_scripts (master)]# git status # On branch master # Changes to be committed: #   (use "git reset HEAD <file>..." to unstage) # #       modified:   cvsup_current #   Why is that the file is shown as modified in master branch even though it was modified in git-build branch?   My understanding was that the branches are independent of each other and when I change from one branch to another the changes do not "spill over" from one branch to another. So I am obviously missing some thing here.   Anyone got a clue stick?


I have a Clojure listing and I want to colour certain keywords whereas I can only do for strings not including any dash ('-') or slash ('/). But I also need to consider keywords consisting of with dash and etc as well.   I have the following listing:  \documentclass[english,a4paper,12pt]{report} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{listings} \usepackage{xcolor}  \input{listingsClojure}  \begin{document} \begin{lstlisting}[         basicstyle={\fontsize{9}{10}\ttfamily},         mathescape=true,showstringspaces=false,         flexiblecolumns=true,         tabsize=2,         numbersep=1pt,         numbers=left,         xleftmargin=0.2cm,         framerule=0pt,language=Clojure         ] (defn NOAsp [?n1 ?n2]   "the numbers"   (l/all       (w/asp ?n1)       (equals ?n2 (.getSourceLocation ?n1)))) \end{lstlisting}   \end{document}   And my lstdefinelanguage Clojure file:  \usepackage{soul} \usepackage{xcolor}  \lstdefinelanguage{Clojure} {     morekeywords={defn, equals,l,all,getSourceLocation,'w/asp'},     morestring=[b]",     morestring=[b]',  }   \lstdefinelanguage{none} {   keywords={},   alsoletter={+},   morekeywords={} }  \newcommand{\fsize}{\fontsize{8pt}{0pt}\selectfont} \newcommand{\fsizesmall}{\fontsize{7.5pt}{0pt}\selectfont\ttfamily}     \lstset{   basicstyle = \fsize,   identifierstyle = \fsize,   keywordstyle = \fsize\color[HTML]{71295b},   keywordstyle = [2]\fsize\bfseries \color[HTML]{859900},   commentstyle = \fsize\color[HTML]{839496},   stringstyle = \fsize\color[HTML]{2429c9},   lineskip={-2pt} }   I would like to see 'l/all' and 'w/asp' and '.getSourceLocation' together in color. Now I only see the following keywords are coloured: 'l', 'all', 'defn' and 'getSourceLocation'. More clearly, the red blocks must be coloured together:

When using Perl variable names with sigils with listings, the $ and @ sigils somehow get coloured in identifierstyle, but the % sigil remains unstyled.  Therefore, this code:  \documentclass{article}  \usepackage{listings,xcolor}  \lstdefinestyle{perl}{    language=Perl,    basicstyle=\ttfamily,    keywordstyle=\bfseries\color{green!40!black},    commentstyle=\color{purple!40!black},    identifierstyle=\color{blue},    stringstyle=\color{orange}, }  \lstset{style=perl}  \begin{document}     \begin{lstlisting}         my ($a, $b, $c) = ('a'..'z');         my ($a, $b, @c) = ('a'..'z');         my ($a, $b, %c) = ('a'..'z');     \end{lstlisting} \end{document}   gives this result:    Is there a way I could make listings understand that % should have the same style as $ or @?  The manual is pretty clear about keywords and comments, but it didn't help me understand the difference between an identifier and an operator (?) that doesn't get styled. Looking at the Perl language definition in lstlang1.sty didn't help either since there is nothing there about either $ and @ or %.


We are looking for a way to auto download our Salesforce weekly export files to an internal server for long term storage.    Has anyone successfully done this either custom, using a 3rd party tool or tools (or some combination of both)?

After a Data Export has completed there can be a large number of zip files to download.  If there are 80+ files at 130 MB (In Summer 12 the limit has been increased to 512 MB) each and each file takes several minutes to download it can be a time consuming process to do manually.  Is there a way to automate the retrieval of these zip files?


This post has two parts: (a) a question and (b) a proposal.   (a) Often, particularly while writing technical papers or user's manuals, I have come across a situation where I need to say:      A user of this software may not need to use it from his personal computer. He can use it from a phone or even from his tablet.   I have seen many authors use female pronouns (i.e. “she” and “her”), but lately this trend seems to have ebbed somewhat.   I, and (I suspect) many other authors, do not want to use passive voice to avoid this.   Is there a gender-neutral way to describe the same situation?   (b) If there is none, I would like to propose using “ze” (for “he” or “she”) and “zir” (for “his” or “her”, rhyming with “fir”) as gender-neutral pronouns. I want to know how you feel about these words.

I know that one can use "they" / "them" / "their" in place of "he" / "him" / "his" or "she" / "her" / "hers" when the subject's / direct object's gender is not known; for instance, just looking at the default user's about me section on Stack Exchange sites:     Apparently, this user prefers to keep an air of mystery about them   My question is what happens when someone wants to reference the subject using a pronoun instead.  Should the verb be conjugated accordingly to the pronoun? E.g.:     Apparently, they prefer to keep an air of mystery about them   Or should the conjugation be retained? E.g.:     Apparently, they prefers to keep an air of mystery about them   The former looks unclear because it wouldn't allow the reader / listener to understand if the writer / speaker is talking about a single person or about a group of people, however the latter sounds very weird, at least just to the non-native speaker which I am.


OK in Skyrim I had a follower but then they disappeared. I've seen another question a lot like this but the answers to it did not help. I was wondering what quest would teleport me because one of the answers to that other question said that if I got a quest that teleported me automatically  then my Follower would appear next to me.  It was Mjoll the lioness. I went back to where I originally got her (at the Bee and Barb)  and she was there but it says that i already  have a follower but I don't.  I was able to pickpocket my items from her but I still can't have a follower now.  So to summarize what is a quest or quest chain that will teleport me so I can get my follower back?

I had parked my follower at an inn with a bunch of valuable items that I didn't want to carry. I guess I have been out a bit too long as this message appears:      Your follower tires of waiting and leaves.    There have been other situations where my follower has mysteriously disappeared as well.  How can I find my follower when they get up and leave or disappear into thin air?


I have a desktop and a laptop that are stuck in Ubuntu 15.04 Any time I try to install or update any software, either through Software Centre, Package Manager or apt-get, it crashes out with a bunch of error messages once it starts trying to download files from the Ubuntu repositories. I've tried all different methods to try to manually upgrade the system files from version 15.04. But all updater or upgrader processes all crash once they start trying to download from the repositories. Nothing works to let me download the packages I need or upgrade the system. Any way I can fix it manually or do I need to get like a Ubuntu 18 installation CD and reinstall the whole system?

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


I am trying to count each character in strings. My function getting two strings. when I debugging my code I saw a very strange thing for me. Although the two characters are the same, the condition behaves as if they are not the same. my expectation is when they are the same to increase the value of lcounbir.You can see the below public class ContainStr {     public static void main(String[] args){         System.out.println(containString("hostr1ell","ehllo"));        }      public  static boolean containString(String str1,String str2){          int str2lenght=str2.length();         int str1lenght=str1.length();          int[] str1ar=new int[str2lenght];         String [] strbirar=new String[str1lenght];         String [] strikiar=new String[str2lenght]; //        int vl=1; //        int zerocounter=0;           for(int i=0 ;i<str1lenght;i++){              strbirar[i]=String.valueOf(str1.charAt(i));           }         for(int i=0 ;i<str2lenght;i++){              strikiar[i]=String.valueOf(str2.charAt(i));           }         int lcounbir=0;         int lcouniki=0;         int contson=1;          for (String letter:strikiar              ) {             for(int i=0;i<str2lenght;i++){                  if(letter==strikiar[i]){                     lcouniki+=1;                 }             }             for(int i=0;i<str1lenght;i++){                 if(letter==strbirar[i]){                     lcounbir+=1;                 }             }             if(lcounbir!=lcouniki){                 contson=0;                 break;              }         }         if (contson==0){             return false;         }         return true;      } }

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


My goal is to display source code (awk, Python, R and SAS) and text (their output) side-by-side. Both are loaded from external files, and can be pretty long sometimes (pagebreaking is inevitable), the source code should be syntax highlighted. The source code should stay on the left side, and the output should stay on the right side, even if there is a pagebreak.  I'm using the listings package for its syntax highlighting.  I can't find an environment to behave right when there's a pagebreak.  Some of what I've tried already:   multicols: this environment is fine, until there's a pagebreak (left side breaks to the right side and messes up everything) minipage: no pagebreak yet

In (La)TeX documentation and tutorials, it is common to show a snippet of code next to the output it generates. It might be two minipages side by side, or a code listing followed by boxed output, or whatever. For a trivial example, we might see  \[ sin \theta \] next to its output, sin θ  Whenever I've done this, I had to use two copies of the code, e.g., once inside verbatim and once inside a minipage or framed box). This just begs for inconsistencies and maintainability problems, since it's very easy to fix one copy and not the other. So, is there any way to display a bunch of code and to execute (a copy of) it, showing the results?  I'm pretty sure it's not straightforward: the code needs to have different catcodes for reading and displaying, but catcodes get assigned only once, when the text is encountered. But if there's no better way, it should be doable by reading the code verbatim and saving a copy in the .aux file, from where it'll get read and interpreted the next time around. But I've never seen such a thing. Has anyone else here?


I generate keys for my software as:  Guid.NewGuid().ToString();   that returns something like: 15c6bd70-8d3c-42d0-bb24-40da6e08ed9d  anyways everytime someone purchases a new software I generate a new key. can it be possible that I generate the same key twice? Everytime someone purchase the software I call the method: Guid.NewGuid().ToString() Should I append a counter at the end of each guid to be 100% sure that there cannot be duplicates?  Edit  A constructor of the Guid class takes a byte array of 16 bytes as a parameter. If you serialize the current date (8 bytes) then append another 8 random bytes to the constructor of the GUID will that be 100% secure? I am just asking for learning based on your answers I will probably just have Guid.NewGuid()

Is a GUID unique 100% of the time?  Will it stay unique over multiple threads?


I've had a few concerns over a new form of "spam" - that is, through voting. A while back, I had seen some wild reputation increases to my account, amongst others, that seemingly felt weird - as I've barely participated in asking questions or providing answers. Earlier today, this sentiment was echoed by another user in chat:  and like 250 this month? it seems like someone is spam upvoting  This was another user that saw a 250 rep increase, but has been inactive for quite a while. For a site that hasn't seen more than 5 questions a day, that was really weird. To put things even more out of hand, it seems like each vote has been placed on a question.  I did some investigation of my own, and it seems like I've found a badge hunter. More of a... gold badge hunter. This user is among the top 3 voters of the site. Looking into this user's profile, this user only has under 200 rep, and has posted a single question, which was received differently. One thing caught my eye:  Votes all time              by type 581   up              535    question 1     down            47     answer   Each vote is an up vote (with the exception of one), and there are 535 up votes on questions. There are 535 questions in the entire site. Using reputation stats from user profiles, I came with the conclusion that these votes are...  Done within a short period of time. 5 question votes within a couple of minutes Done in [near] perfect chronological order: The earlier the vote, the earlier the question was asked. As if the user had gone through the list of questions in order, and placed an up vote on each one.   I see this as incredibly problematic. First:  It dangerously inflates reputation. Votes are not done based on their content, but simply for voting. Therefore, reputation loses it value as a way to measure expertise.  It's like serial up voting. Generally, when we hear the term "serial up voting", we think of a voting ring, where one user continuously up votes another. This is negative for the targeted user. Well, here, we've got a voting ring with the site and this user. A user continuously up votes the site, causing negative damage for the site.  We mix good and bad content. Since low quality questions are a victim of the voting spree, many get meddled with the rest of "good quality" questions, despite being closed as off-topic, too broad, or whatever the reason. We can no longer reliably sort questions by quality with the very system that was designed to help us.   ... And the rest of voting fraud issues outlined in .  I've got a couple questions on this:  Is this comparable to serial voting? Should such votes be reversed? How should we determine whether or not to reverse them?  Should we stop this? Let it be? Is this really that big of a problem for sites? (I would argue that it's less of an issue for graduated sites that receive large amounts of content, but what about beta sites that rarely see more than a few questions a day)

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


In the formula $\Delta U = C_v\Delta T$, we get the constant volume heat capacity by assuming constant volume conditions. However, I've understood that a constant volume is not required when using the formula.  I tried understanding the solution through several other posts but it still doesn't make sense to me. Unless my base knowledge is wrong (I have a hard time understanding thermodynamics), why are we allowed to use $\Delta U = C_v\Delta T$ when volume changes?

When we try to establish a relation between the pressure and temperature in adiabatic process we come across a equation..  $dU = dq - PdV$  $dq=0$ (Adiabatic process) and,  $dU=C_v.dT$ (Heat capacity at constant volume)  Therefore, $C_v.dT = -PdV$$\tag1$  In this equation we are using heat capacity defined at constant volume but their still is some work done by the system (i.e, $PdV$ is not $0$ or $dV$ not equals to $0$).  The first part of the equation $(1)$ is implying that the volume is constant but the second part is implying that the volume is not constant (if it was there would be no work done).  Then why there is this contradiction ?


Is there a term used to refer to the following parts of these sentences (in bold):  Look out for the car travelling at high speed. Catch me coming in hot.  I'm not sure if these can be considered adjectival clauses or if there's a better terminology for it.

In a casual search of the web, I found a few indications English does not allow zero copulas ().  However, I frequently see sentences with subordinate clauses that juxtapose a noun phrase with an adverb phrase, such as the following from a contemporary sci-fi author:  Kai stares up at me from the grave, his eyes hard as obsidian.  If this clause were made into a sentence, it would take an obligatory verb:  *His eyes hard as obsidian.  His eyes are hard as obsidian.  The original clause seems to contain an implicit "to be."  Is it an example of a zero copula?  If not, what is this construction called?


I'm writing a scientific text and need to use β as a character. However when I use \beta it changes the formatting of the rest of the paragraph to italics and removes spaces. Is there a way to stop this from happening?

After using the Pi symbol (\Pi), my text changes to a different font and goes to italic. How can I resolve this?


I just started a project width a lot of colored pencils in it.  As I want to have all of them have the same Material, but a different color, i came up with the question:  Is there a way to create a single Material und assign different colors to meshes that all have this one material assigned?  Or:  Is it possible to link the materials of the pencils, so if I tweak one of them, the rest will have the changes applied, too?

I have to display several versions of the same object, with only the color changing. My first approach was to duplicate the mesh and add a different material to each.  My problem is: when I want to modify the mesh, I have to do it on each object separately. I tried to have different objects with the same mesh, but the color seems to be linked to the mesh and not to the object.  Is there a way (even programmatically) to have the same mesh in different objects with different colors?  Additionnal info:  I'm using Cycles and my material is a node material in which there is only one changing color.


Could it damage an Ubuntu system when somebody runs an upgrade like apt-get dist-upgrade or a similar command and somebody else does an upgrade remote at the same time as well?

I'm pretty sure this is a duplicate somewhere. I apologize for the repeat. I'm running Xubuntu 14.04. For some odd reason my pc is running slow today, so I thought it might have something to do with the software, so I did an update, and sudo apt-get update returns an error:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   I tried the answer given in   and this is the following result:  $ sudo lsof /var/lib/dpkg/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs       Output information may be incomplete. COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME aptitude 2166 root    3uW  REG  252,0        0 49021509 /var/lib/dpkg/lock  $ sudo lsof /var/lib/apt/lists/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs       Output information may be incomplete.  $ sudo lsof /var/cache/apt/archives/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs       Output information may be incomplete.  $ sudo dpkg --configure -a dpkg: error: dpkg status database is locked by another process    How do I fix this? Could someone walk me thru the steps?  Why would I need a "lock" on an open directory?  How do I find what process is using it? How do I check my hardware if that's the culprit??   I will try a reboot, and see if that fixes anything. Be right back.    OK, NOW after rebooting I get the following results:|  $ sudo lsof /var/lib/dpkg/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs       Output information may be incomplete.  $ sudo lsof /var/lib/apt/lists/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs       Output information may be incomplete.  $ sudo lsof /var/cache/apt/archives/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs       Output information may be incomplete. lsof: status error on /var/cache/apt/archives/lock: No such file or directory lsof 4.86  latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ  latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man  usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s]  [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information.   I also tried  sudo dpkg --configure -a   which may have worked cause when I did  sudo apt-get update   I got NO ERRORS.


Scenario:  A PC has become Large through means of Enlarge Person. All of the gear he carries has been Enlarged with him as per  spell.  A Large Greatsword lies on the ground nearby and he goes and picks it up. Does the greatsword:  A: Remain Large allowing the PC to wield it just as the equipment enlarged with him?  Follow up:  What happens when the PC returns to their original size?  Can a Medium PC then carry around a Large weapon on their back, drop it before Enlarge Person is cast, then pick it up and wield it?  B: Enlarge by one size into a Huge Greatsword as soon as it is picked up by the Enlarged PC  C: do something I haven't thought of....?

The rules for  and  say "All equipment worn or carried by a creature is similarly [reduced or enlarged] by the spell." Does that happen once at the beginning of the spell for the duration of the spell or do other things picked up later also change in size?  Which one of the two is it, and wouldn't the latter have really strange consequences, such as if you pick up a friend all their equipment (but not the friend itself) would become while you carry it/him?  Inspired by this .


I have been looking for a small connector that I can use for Ethernet 10/100 base communication. There were some similar discussions here about the same topic, but I couldn't find a solid answer.  In my application, I don't want to use an RJ45 connector because of the form factor. I looked at some industrial connectors like "Industrial Mini IO" from TE, but the problem with those is now I have to deal with a big back shell for the cable itself although the connector helps with making the product smaller.     I was wondering has anyone used an RJ12 for a 10/100 base Ethernet application? That's currently one of the options I'm looking at and I'm not sure if it is the correct way.   If RJ12 is not a good option, does anyone know any small connector that I can use which also doesn't need a big back shell for the mating cable?

I'm designing a small board that needs an ethernet connection. However, the RJ45 jack takes considerable space. I would like to reduce the footprint of the connector to safe some space.   Would it be possible to replace it by a (non-standard) smaller connector, like a micro usb connector or a JST PH connector? Which connectors would be suitable and why (or why not)?


Reading about AKS primality test I've encountered the expression $(x+1)^n \equiv x^n+1 \mod{(n, x^r-1)}$. What does the notation $x\equiv y\mod{(r,s)}$ mean in general? Is it simply $x \equiv y \pmod r\pmod s$?

Where does a layman go to get a basic understanding of AKS primality testing. I am not talking about the optimal choice of $r$ (which I am told is the hardcore number-theoretic part of the algorithm). I mean basic things, like what does $\bmod(n, x^r-1)$ mean (how can something be mod two things?) And what does binomial expansion have to do with anything?  I can't find anything in Wikipedia that is appropriate for my level.


How do I discover which application installed these programs?  /usr/lib/tracker/tracker-store, tracker-extract, tracker-miner-fs  It's eating up all my resources.  The CPU, one or two of them anyway,  is well over 100% usage, The memory is very loaded, system load is over 50%,  and disk read/write is very busy.    The man pages tell me it's a data miner set of programs for files on  my system only.  htop tells me I am the owner.  Yesterday I installed some programs, all from the software center, with one exception: Enthought Canopy, it's a Python IDE.  How do I discover which application installed these programs?

Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is.  Bonus question: what if it's a file that isn't installed on my system? Is there, say, a website that will let me look up a file and see what packages, if any, provide it?


Posts’ and comments’ minimum length validations are being bypassed by the U+2800 BRAILLE PATTERN BLANK Unicode character "⠀". It counts as an "Other Symbol", not as whitespace or a control character.  For example, see the comment beneath this post.   This needs to be fixed.

If you comment something on Stack Overflow, you need to enter at least 15 characters, and you can't post a comment which just contain spaces.  But if you type in zero-width spaces it will work. A zero-width space can be translated with &#8203; in HTML.  For better understanding, I have added a zero-width space comment to my question.