Let $V$ be finite-dimensional vector space such that $dim(V)=n$ and consider $T \in L(V)$ and $\lambda_1,...,\lambda_k$ all the different eigenvalues. a) If $W_j$ is the subspace associated to $\lambda_j$ for $j\in{1,...,k}$ prove that $W_1,...,W_k$ are independent  What I know here is that we have to prove that $w_1+...+w_k=0, w_i \in W_i$  If T is diagonalizable, prove that $V=W_1 \oplus...\oplus W_k$  If T is diagonalizable $\exists\beta=${$v_1,...,v_n$} such that $v_i$ is a characteristic vector $\forall i \in${$1,...,n$} how do I prove $V=W_1 \oplus...\oplus W_k$?

I'm trying to show that a finite sum of eigenspaces (with distinct eigenvalues) is a direct sum.   I have $ \alpha : V \to V $. The eigenspaces are $ V_{\lambda_i} = \ker(\alpha - \lambda_i id_V )$ for $ 1 \leq i \leq n $. My attempt at a proof:  $ A + B $ is a direct sum iff $ A \cap B = \{0\} $. If $ v \neq 0 \in V_{\lambda_i} \cap V_{\lambda_j} $ for some $i,j, i \neq j $, then $ \alpha(v) = \lambda_i v $ and $ \alpha(v) = \lambda_j v $. So $(\lambda_i - \lambda_j)v = 0 $, and so $ \lambda_i = \lambda_j $. This is a contradiction, so any pair of the eigenspaces have trivial intersection. Therefore $ \cap_{i=1}^n V_{\lambda_i} = \{0\} $, and so we have a direct sum.  Is this ok?  Thanks


Electric current is considered to be a scalar quantity because it does not follow the rules of vector addition. Then, why is current density called a vector quantity as it is just current/area ?

Current is a scalar $I$ with units of $\mathrm{[J/s]}$. It is defined as $I=\frac{\mathrm{d}Q}{\mathrm{d}t}$. Current density is a vector $\vec{J}$ (with magnitude $J$) with units of $\mathrm{[J/s/m^2]}$. It is current per unit cross-sectional area, and is defined as $\vec{J}=nq\vec{v_d}$ (where $n$ is the number of moving $q$-charges with drift velocity $v_d$).   Why is $I$ defined to not have a direction? Current density $\vec{J}$ is defined as a vector, so why is current $I$ not?  There are many questions about current vs. current density  ... like ,  and , but none answers my question about one being vector and the other being scalar. Is it simply just a definition? It just seems so obvious to define current as a vector too.    of current density is $I = \int \vec{J} \cdot d\vec{A}$. Mathematically, the dot product gives a scalar. But, for me this doesn't give much explanation still, as we could just as well have mathematically defined current as a vector and then used the area in scalar form in an equivalent formula like: $\vec I = \int \vec{J} \cdot dA$.  Is it just a definition without further reason, or is there a point in keeping $I$ in scalar form?


Is this possible? Im trying to remove all software that comes preinstalled instead of the Settings app, Terminal and GNOME. If it is possible, how can I do this? (Ubuntu 20.04)

I'm wanting to do a minimal install of Ubuntu 20.04 LTS on a VM I'm making.  My original thought was to use either the network installer or the minimal CD, but both of those seem to be gone right now.  How would I be able to get that kind of install on 20.04 LTS?


I really enjoy using this app, but the back button or the phone back button is broken. As in example, if I open the main menu, click on the Stack Overflow top menu select tags, click on php in example, click on any topic, click on back ... I should see the topics, but instead I see the tags.

This looks a little bit like a variation on  but specific to the tags view.  Reproduction (app version 1.0.71):   Select any site (say Meta) from the sidebar Switch to the tags view using the top bar Choose a tag, any tag ( is nice)   optionaly refine your search with more terms  Go to any question found, go back   you end on the unfiltered tags view  Go back again   lucky you, your search is here


For my circuit the primary Power Supply is a 6V Solar Panel (Note that for the most part the Solar Panel is usually well below 6V but it varies anywhere between 6V to 0V depending on light conditions.)  However there will be times when I want to power the circuit using a simple 5V USB Adapter.   Here are the design requirements:  1) I will NEVER remove the Solar Panel from the circuit. 2) I want the Solar Panel to automatically disconnect from the circuit when the 5V USB Adapter is connected to the circuit.  3) I'd prefer not to use any IC's or things of that nature. I wanted to accomplish this using MOSFETs (preferred), diodes if necessary, resistors, and capacitors/inductors if necessary.  I've seen similar posts to this and they've been moderately helpful but I haven't found anything that has helped me with a fully functioning circuit as I've described in the requirements.

I'm designing a board that can be powered either by USB or an ATX power supply.  They can both be plugged in at the same time, independently.  I'd like the ATX to provide 5V if its plugged in, but fall back to the USB if possible.  The chips in the circuit will all be running at 5V.  Any ideas?


I need to deal with loads of code lines in verbatim mode and append them to the appendix. That is, I may not need to show them in a fancy way but I want them to occupy least amount of space. As you could see in the following figure, the text occupy a lot of space. I also need them to have a fix indent from right and left, so by keeping as many in a line, they indentation varies.

I want to apply small fonts inside the Verbatim environment e.g.  {\small  \begin{Verbatim}  1   double x, y; 2   double z, w; 3   main(); 4   return 0;  \end{Verbatim}}   Before the command \small and after the closing braket } text has normal size, which is obvious but the font size should be small inside the brakets.     Why is this command not applied to the environment's contents?


When using JOINS we have the choice of using either the WHERE clause and the OR clause.   Question: is there a performance difference between these two? Should one be used over the other? What is the difference exactly?  Example:  SELECT field  FROM table1 INNER JOIN table2 ON table1.id = table2.id;   or  SELECT field  FROM table1, table2 WHERE table1.id = table2.id;

After reading it, this is not a duplicate of . The answer may be related (or even the same) but the question is different.    What is the difference and what should go in each?  If I understand the theory correctly, the query optimizer should be able to use both interchangeably.


I will need to use emoticons for a document that I am producing and I want to know which is the state-of-the-art in the available packages to produce emoticons in LaTeX?  So far, there is just some ad hoc references to some packages. A list of all available packages (or at least the most important ones) in a systematic way I think would be useful for users to have a organized source to choose the appropriate package according to their needs.

I would like to include smileys in my LaTeX document. Is there any package with lots of different smileys?  In mnsymbol and wasysym, I found some general symbols:  \documentclass{article} \usepackage{MnSymbol,wasysym} \begin{document} wasysym: \smiley{} \frownie{} \blacksmiley{}  MnSymbol: \(\smile{} \frown{}\) \end{document}     But I do not like the output. Actually, I am looking for smileys which look like "default smiles" in Google Talk, MSN, ... ;) <- this one is my favourite. ;)


Lawrence Washington, in his book 'Elliptic Curves: Number Theory and Cryptography', says:  If $E$ is defined over $R$, then $E(R)$ is isomorphic to the unit circle $S^1$ or to $S^1 \oplus Z_2$.  Conceptually, I understand the point via provided graphs and explanation, but how can I map the elliptic curve to the unit circle?

Using Weierstrass' $\wp$ function it can be proved that the group of complex points on an elliptic curve $E /\mathbb{C}: y^2 = x^3 + ax + b$ satisfies $E(\mathbb{C}) \cong \mathbb{R}/\mathbb{Z} \oplus \mathbb{R}/\mathbb{Z}$.  Now, suppose that $E$ is defined over $\mathbb{R}$. Is there a way to prove directly from the isomorphism above that the group of real points on $E$ is  $$ E(\mathbb{R}) \cong \begin{cases} \mathbb{R}/\mathbb{Z} \quad \text{if $x^3 + ax +b$ has one real root,}\\ \mathbb{Z}/2\mathbb{Z} \oplus \mathbb{R}/\mathbb{Z} \quad \text{if $x^3 + ax +b$ has three real roots} \end{cases} $$  I have seen some arguments that use results from the theory of Lie groups to prove this, but I was wondering if it can be proved from the "torus" description of $E(\mathbb{C})$.  Thanks a lot for any help.


I have a program which can recognize specific words from a file .txt  The problem is when find a word I send it to a method like "value" and I question:   if (value == "specificword") {...}   this question is always false. I have made many debugs and I'm sure both are the same word (without a space or tab or enter) so: Is it possible this be a problem with the text format?

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?


This happened in  on , where we have all sorts of uncommon programming languages to put in a code block. OP's code is copied here at the markdown level:   bbcccbc-cc-b--b-- c b     c  - L`.{6} . $0X  Y`X`\LAPACK .L L  The above uses raw <pre><code> to preserve the blank-only line (by ending with &#32;) between the line with single b and the one with single c (check it by dragging on it). But it is wrong because the code should start with a single empty line, not two; removing a line there will break the entire code block. On the other hand, using the fenced or indented block does not have any way to preserve the blank-only line (it is stripped now, but it should be preserved in order to be a valid code) works as expected with the blank-only lines, but is not shown as such in the preview section. Using fenced block:  bbcccbc-cc-b--b-- c b     c  - L`.{6} . $0X  Y`X`\LAPACK .L L  Using indented block: bbcccbc-cc-b--b-- c b     c  - L`.{6} . $0X  Y`X`\LAPACK .L L  Edit: I just found that the three blanks are preserved on the main post. I saw the bug described above in the preview section, and wrongly assumed that it will be the same when actually posted. It is very likely a bug in the preview renderer.

One of the users on Stack Overflow pointed out that the rendered version of some posts is not what the preview or revision shows. After triggering a re-render the glitch was gone, but since it is not a problem to find more I found another one. Here is an example of the difference.         However, I noticed that there are more differences in the rendered version and the one generated by CommonMark which is the reason that I am raising this as a bug, so the developers can take a look at it if they are not aware of it yet. Inline code not generated properly when following HTML The rendered version of  is correct:    But the preview is broken:    Also:       But not here:     Ignoring HTML code.  Before:    After:    Not even sure what is going on here  Before:    After:    Other posts:


Medicating Uvula  resulted  in making   the  tongue  fall out   The proverb means  sometimes   remedying  a  simple  problem  may  turn  out  to  be a  different  problem  of    great  magnitude  I  would  like  to  know  the  equivalent  problem  in  English.  I  believe  that  it  is  not  a  duplicate  of   the  previous  post  because  in the  post  the  Post  The  OP was  saying  that  the  situation  was  getting  worse  every  time  being rectified.But  the  proverb  I posted  does  not  mean it.Trying  to  solve  a  problem  resulted  in  a  some  other  problem  of   great  magnitude  and  danger.Besides, My  proverb  is  a  literal  translation of  a  Telugu  proverb  which  may imply  that  we  must  be  very  careful about  remeding  a  situation  otherwise  it  might  lead  to  a  different  consequence  which  might  be  fatal.It  does  not  mean  that  the  same situation is  getting  worsened  as  a result  of  medication  or  the  metophorical use  of the  same  problem getting  more complicated.

Example sentence - This problem is a _____ which gets complicated every time you try to solve it.   Is there such a word that represents a problem which will become worse if/when one tries to solve it?  Note - After seeing the comments and answers I'd like to add that this is not a can of worms or Pandora's box because it doesn't create a new problem but just worsens.   Example: Magic leaves protecting a fruit by enclosing it. Every time a leaf is touched, all the leaves close together further, that is more tight than before.


I am trying to detect spaces on textarea my code is following  textarea.value.replace(/\s/g, '&nbsp;');   but it detects all whitespaces and I want to detect only spaces...  is any solution??

I'm trying to use this code to replace spaces with _, it works for the first space in the string but all the other instances of spaces remain unchanged. Anybody know why?  function updateKey() {     var key=$("#title").val();     key=key.replace(" ","_");     $("#url_key").val(key); }


Let $f:[0,1]\to \mathbb R$ be a continuous function such that $f(0)=f(1)$. Prove that $f(x)=f\left(x+\frac12\right)$ has a solution for $x\in [0,\frac12]$.  This question has to do with continuity and the intermediate value theorem. I observed that $f(0)=f\left(\frac12\right)=f(1)$ but I don't see how to show that the function go through zero (i.e has a solution) for all we know it can be a straight line parallel to the $x$ axis in $[0,1]$.

Let $f \in C[0,1]$ and $f(0)=f(1)$.   How do we prove $\exists a \in [0,1/2]$ such that $f(a)=f(a+1/2)$?  In fact, for every positive integer $n$, there is some $a$, such that $f(a) = f(a+\frac{1}{n})$.  For any other non-zero real $r$ (i.e not of the form $\frac{1}{n}$), there is a continuous function $f \in C[0,1]$, such that $f(0) = f(1)$ and $f(a) \neq f(a+r)$ for any $a$.  This is called the Universal Chord Theorem and is due to Paul Levy.  Note: the accepted answer answers only the first question, so please read the other answers too, and also this answer by Arturo to a different question:     This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


The new topbar is decidedly awesome. It is like a top hat, only in bar form.  But it's got its hidden issues. The 'help' link looks a bit down because it is horribly misaligned:    The review seems to be aligned with your rep/badge numbers and the Stack Exchange logo in the top left. help and search seem to be on a different level, aligned against the rest of the top bar.  I'm all for standing out, but these several pixels are just taking it too far.

It shows like this on Firefox 25 and Internet Explorer 11 (minus the red line of course):    Chrome seems to be fine.


This question is mainly intended for the sites related to artificial intelligence only. This is not intended for getting a feature on all sites. The area I am discussing is restricted to . Any site that has significant intersection with the artificial intelligence can be considered for this question. There are several sites in our . Among them, some has intersecting interests. For this question, the significant interest intersecting sites to  are as follows     Some sites has good amount of expert users, while some other sites has good amount of beginners.  Some questions are on-topic on several sites, if the question falls in to the intersection part. Some questions are on-topic on one site and the same are off-topic on other sites, but related. With this context, I want to propose/discuss the idea of streaming important questions of a site in its interest intersecting sites. The importance of question may be decided based on activeness or some other property of the question. This can be done by either integrating news feed or by a column on the right side of the main site that can be similar as Hot Network Questions i.e., Hot Related (network) Questions. I like the latter better than the former since most of the active users stares at the main page of the site than in chat rooms. It will be highly useful for users on other sites to identify the existence and also to participate in the overlapping sites. It is also helpful for the progress of the related sites. Some sites need attention of experts from other related sites, so that the expert users can contribute to both the sites. This applies to beginners  or intermediates also for asking questions. If we view our contribution is to a single Stack Exchange network and our intention is to contribute to public, I am feeling that this proposal is appreciable and implementable. You can read  for more details.

The scopes of many sites overlap, e.g.:    and ;  and ; , , , and ; and any language site with  and .   Currently the "Related" list of questions is restricted to questions for that particular site.  It seems natural to extend this to either:   add an additional, short "Related network questions" list, or allow a limited number of off-site questions within the "Related" list, highlighting the site they're from, and maybe throttling the  for off-site questions.   My hope is that it can identify questions that are already asked on other sites (), and this knowledge can assist writing answers.  Question: Would a "Related network questions" list be possible and worthwhile?


Because of its length, the two towers of the Verrazano Bridge are not parallel: they are [???], accounting for the curvature of the earth.  There's a bunch of terms that come close, such as:     Radial from the center of the earth.   Okay, but this only covers vertical lines.     They're skewed.   Close, but no cigar. "These two lines are skewed." Huh?  Is there an exact term?

The two towers of the Verrazano Bridge are not parallel: they are slightly [???] to account for the curvature of the earth.    What is that word?


Let $f(z)$ be analytical in the unit disk $\mathbb{D}=\{z:|z|<1\}$. Suppose $|f(z)|< 1$ when $|z|<1$ and for some $r\in(0, 1)$$f(0)=f(r)=f(-r)=0 $. Prove $|f(z)|\leq |z|\left|\dfrac{z^2-r^2}{1-r^2z^2}\right|$.  I think we should apply the Schwarz lemma here,but for now I can only prove $$ |f(z)|\leq\left|\dfrac{z-r}{1-rz}\right|, |f(z)|\leq\left|\dfrac{z+r}{1+rz}\right|, $$ which seem of no use. I do not know where $|z|$ of RHS comes from (the rest part are two maps in Aut($\mathbb{D}$)). Appreciate any help or hint!

I need some help with this problem:     Let $f\colon D \to D$ analytic and $f(z_1)=0, f(z_2)=0, \ldots, f(z_n)=0$ where $z_1, z_2, \ldots, z_n \in D= \{z:|z|<1\}$. I want to show that $$|f(z)|  \leq \prod_{k=1}^n \left| \frac{z-z_k}{1-\overline{z_k}\, z} \right|$$ for all $z \in  D$.   It seems that I need to use Schwarz-Pick Lemma but it seems that the problem doesn't satisfy the conditions. Another lemma that I can use is that of Lindelöf saying: Let $f:D \to D$ analytic, then $$|f(z)|\leq \frac{|f(0)|+|z|}{1+|f(0)| \cdot |z|}$$ for all $  z \in D$.  It seems to be an easy problem but I couldn't succeed in solving it.


I have a VM running Ubuntu Server 18.04.  I am trying to install libpostgressql-jdbc-java as root:  apt-get install -y libpostgresql-jdbc-java   This produces the following error:  E: Unable to locate package libpostgresql-jdbc-java   My /etc/apt/sources.list contains these lines:  deb http://archive.ubuntu.com/ubuntu bionic main deb http://archive.ubuntu.com/ubuntu bionic-security main deb http://archive.ubuntu.com/ubuntu bionic-updates main   I never modifed the configuration. It's a clean install with updates applied.  What am I doing wrong?

How do I get to the Universe Repository in supported versions of Ubuntu?


Which font is used in this image or how can I find?

I'm currently doing a design course and have been tasked with recreating a typographic piece including the fonts.  What is the best method for identifying fonts? I have tried the online 'questionnaire' style identifiers as well as image upload ones, but they are inaccurate at best.  I have specifically tried WhatTheFont and Identifont with this sample:


I am not able to install any packages from terminal or software center.      Something wicked happened resolving 'your_proxy: 800' (-5 - No address associated with hostname).    This error pops up. I need help.

I am getting this error frequently while updating Ubuntu 12.04 LTS. How can I fix it? Log is:  Ign http://archive.scrapy.org precise/main Translation-en Fetched 6,620 kB in 1min 21s (81.2 kB/s) W: Failed to fetch http://archive.scrapy.org/ubuntu/dists/precise/Release.gpg Something wicked happened resolving 'archive.scrapy.org:http' (-5 - No address associated with hostname)


Should there be an apostrophe in the sign "residents parking". A quick Google  suggests there shouldn't. But why not? Is "residents" an adjective?

Possible Duplicate:          If referring to a Users Group (meaning a group made up of multiple individual users who have some control of the group itself), would you use:    A: User’s  B: Users’ C: Users   I have read the post on the  but in this case, plural is appropriate since the group does not belong to one individual.  Wikipedia suggests Users’ (or Users) and in my domain, a leading stats software company has a , though they then use user’s group as part of the description.  What do you think —  A, B, or C?


I define an interface and build a class inherit it.   interface IOperator {     int Priority{ get; }     string Identifier { get; }     int Dimension { get; }      Expression GetExpression(IVariable[] variables);     object Excute(IVariable[] variables);  }  public class Op_Muti:IOperator {     int IOperator.Priority { get { return 40; } }     string IOperator.Identifier { get { return "*"; } }     int IOperator.Dimension { get { return 2; } }   public object IOperator.Excute(IVariable[] variables) {     throw new ArgumentOutOfRangeException(string.Format("{0} can't apply to {1}", Identifier, variables[0].VarType.ToString())); }   }  The Identifier is defined in interface   string Identifier { get; }   and implement in class Op_Muti  string IOperator.Identifier { get { return "*"; } }   but can't reference in   throw new ArgumentOutOfRangeException(string.Format("{0} can't apply to {1}", Identifier, variables[0].VarType.ToString()));   Why?

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


How might I determine whether $\sum_{n\ge0}\frac1{2^{2^n}}$ is rational?  I have seen in the answers to  that the sum converges and it was also mentioned that this is called Kempner's number.  mentions this under the name Fredholm number.

How to sum the series:  $$\sum _{ n=0 }^{ n=\infty  }{ \frac { 1 }{ { 2 }^{ { 2 }^{ n } } }  }$$   PS: Just a hint would suffice.


Assuming there is in fact a way for traversable wormholes (Einstein-Rosen bridges) to exist: What effect would a wormhole have on the gravitational field of a large body (planet or star) if one side of the wormhole is further away (in 'normal' space) from the large body? For example, in the far distant future, a mad scientist creates a wormhole near the orbit of mercury and moves one opening out to the Oort cloud. Would observers near the outer opening be accelerated into/through the wormhole, as if they were far closer to the star? Would you be able to orbit the wormhole, as if you were closer to the star? Would that create something like Lagrange points where the gravity felt through the wormhole balanced the gravity through normal space?

Lets say a wormhole exists with point A inside the gravity well of a star and point B in a space where there is no notable nearby mass to create a gravitational force. If one were to approach point B, would one experience gravity from the star near point A of the wormhole? Do gravitational effects 'travel' through a wormhole?


I am new to C++, and i can't figure out what's wrong in this code. Will appreciate any help.  class ResourceLoader { protected:     static std::map<int, Texture> textureCollection; public:     static Texture getSingleTexture(GameTexture gameTexture) {         return ResourceLoader::textureCollection[gameTexture];     }      static void loadTexturesFromFiles() {         ResourceLoader::loadSingleTexture(GameTexture::Character);     }      static void loadSingleTexture(GameTexture gameTexture) {         Texture texture;         texture.loadFromFile("texture.png");         ResourceLoader::textureCollection[gameTexture] = texture;     } };   This results in:     undefined reference to `ResourceLoader::textureCollection'"   How is it undefined if textureCollection is declared in the protected section?  Also I don't user headers for class declaration. I know that this is not the best practice, but this speeds up the whole process..

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


I'm new to blender. I have a version 2.90 and I  wanna apply the texture to my building model. But I can't do it is there anyone how to create a texture or import it from anywhere and then apply? I know it's a dumb question but don't mind. Everyone should help each other!

I am creating a model of a glass and I would like to put a drawing on it (a png picture).  I know how to do it using Blender Render, but not with Cycles Render. Help :)


My post was deleted and I want to reply to the mod commenting on it after deletion. How can I do this?

Why can't I comment on my deleted post if I don't agree with the reasons for deletion?  My answer to  was deleted, but I don't believe syntax checking and grammar/spell checking are the same.


For me the following sentences seems identical. But I am not sure. Would you please explain the differences, if any?     She tried singing.      She tried to sing.

I tried to open the door. I tried opening the door   We can use both infinitive and gerund with verb "try" as used in above sentences. Does it change the meaning of the  sentence if use gerund or infinitive?.(here i don't know if the meaning of sentences is changed.)     The same confusion arise in these two sentences.  1.I stopped seeing him. 2. I stopped to see him.(But in case of these two sentence i know the meaning is changed but don't know exactly what the change is).


I have a folder which contain .srt and .txt files inside /var/www/myvideo folder with filename like this:  /var/www/myvideo/course1/module1/dasa22.en.srt    /var/www/myvideo/course1/module1/dasa22.en.txt    /var/www/myvideo/course1/module1/dasa22.de.txt    /var/www/myvideo/course1/module1/dasa22.de.srt    /var/www/myvideo/course1/module1/asda2.ja.txt    /var/www/myvideo/course1/module1/asda2.ja.srt    /var/www/myvideo/course1/module1/dasa22.en.srt    /var/www/myvideo/course1/module1/dasa22.en.txt    /var/www/myvideo/course1/module1/dasa22.de.txt    /var/www/myvideo/course1/module1/dasa22.de.srt    /var/www/myvideo/course1/module1/asda2.ja.txt    /var/www/myvideo/course1/module1/asda2.ja.srt    /var/www/myvideo/course2/module3/cccaa.end.txt    /var/www/myvideo/course2/module3/vvv.en.srt    /var/www/myvideo/course2/module3/vvv.ja.txt    /var/www/myvideo/course2/module3/aaa.ja.srt    ...   the .srt and .txt file will be inside the subfolders of /var/ww/myvideo, but i want to delete the file that has de.txt de.srt ja.txt ja.srt postfix, how can i achieve this?

How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.


I am using xsl to control the output of my xml file, but the BOM character is being added.

I have an XSD file that is encoded in UTF-8, and any text editor I run it through doesn't show any character at the beginning of the file, but when I pull it up in Visual Studio's debugger, I clearly see an empty box in front of the file.      I also get the error:   Data at the root level is invalid. Line 1, position 1.    Anyone know what this is?  Update: Edited post to qualify type of file. It's an XSD file created by Microsoft's XSD creator.


I added a PPA for updating my kernel for ubuntu-12.04. Later, I found that the kernel doesnot exist on the link within PPA.  I used this command. sudo add-apt-repository ppa:kernel-ppa/ppa  Now if I try sudo apt-get update, I get an error 404, because  , does not exist.  Trouble is I am unable to do an update. Even not able to do sudo ppa-purge ppa:kernel-ppa/ppa  Suggest a solution.

I've added many PPAs using the add-apt-repository command. Is there a simple way to remove these PPAs? I've checked in /etc/apt/sources.list for the appropriate deb lines but they aren't there.   This is on a server system so a command line solution would be great!


I'm using a MacBook Pro (Retina, Mid-2014) running OS X El Capitan and I'm curious if I can run a script when I close my computer (without installing anything).  Note: I don't want to install anything.

How can one configure MacOS (10.8 or higher) to automatically and immediately call a user-designated script (probably a bash script) upon the user closing the display lid of a MacBook Air or Pro?  Details.  I want to do this because in some scenarios my MacBook Air 2013 running 10.8.5 does not immediately sleep/lock the screen upon lid close (possibly because a VPN client is trying to open a connection).  As such, I want the system to immediately execute a script which calls  upon lid close.  However, I don't know how to call scripts upon display-lid closing.


Very short story about  engineering problems with weapons development in an intergalactic space war. Force field, matter shrinking technology. Taught in engineering design programs.

I am looking for help to point me out at a very old novel (likely from the '60s) about two empires at interstellar war. When it comes to starships, one is technologically very advanced, and the other has very low and inefficient technology.  The highly advanced empire has apparently strong chances to win the war, in particular considering a new technology they were developing. I remember the technology to work like this: consider the space as a flat surface, and on this surface, a disk around the spaceship. When the technology was turned on, this disk was stretched out, as made of rubber, so that it produced a cone, with the tip being the spaceship. The spaceship was therefore teleported 10 parsec away (if I remember correctly), but retained all the connections to the original position. If the spaceship moved, the cone moved as well. This allowed to move in position among enemy ships completely unnoticed, by stretching while afar, then moving in the proper position 10 parsecs away, then destretching.  Despite this technology, the empire lost the war because of delays. It's a perfect example of how having a disruptive technology does not guarantee to win against the competitors.  I am trying to find out the author and name of this novel, hopefully with the date of publication and in which journal/magazine.


I have an SSD that has Ubuntu installed, and a data HDD which used to be sdb. The hard drive has lots of data in it already. Now, I see fdisk doesn't show all partitions correctly and something has been changed. Below is the output from fdisk. First, the HDD is now shown as sda, but without partition (e.g. sda1). So I can't mount it.   $ sudo fdisk -l Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes  Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: B50CD632-617E-47EA-A984-B0A6096801E3  Device          Start        End    Sectors   Size Type /dev/sdb1        2048    1050623    1048576   512M EFI System /dev/sdb2     1050624 1819488255 1818437632 867.1G Linux filesystem /dev/sdb3  1819488256 1953523711  134035456  63.9G Linux swap   When I check /etc/fstab, it shows  $ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point>   <type>  <options>       <dump>  <pass> # / was on /dev/sda2 during installation UUID=65266004-ca77-48bc-97ce-28baa4002799 /               ext4            errors=remount-ro 0       1 # /boot/efi was on /dev/sda1 during installation UUID=50B9-B0CF  /boot/efi       vfat    umask=0077      0       1 # swap was on /dev/sda3 during installation UUID=ea9208b6-a4b1-4540-95ab-68fa7fe4d6bb none            swap    sw              0       0   What can I do to recover access to my HDD (/dev/sda above, but mysteriously it used to be sdb1)?  (Edit: below is the result from parted --list)  $ sudo parted --list  Model: ATA TOSHIBA HDWE140 (scsi) Disk /dev/sda: 4001GB Sector size (logical/physical): 512B/4096B Partition Table: loop Disk Flags:   Number  Start  End     Size    File system  Flags 1      0.00B  4001GB  4001GB  ext4   Model: ATA Samsung SSD 850 (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:   Number  Start   End     Size    File system     Name         Flags 1      1049kB  538MB   537MB   fat32           EFI System Partition boot, esp 2      538MB   932GB   931GB   ext4 3      932GB   1000GB  68.6GB  linux-swap(v1)

Well, I have accidentally deleted my Ubuntu drive. I just want to recover all the contents of /home.   Is there a way to do it? I referred to , where I need to specify the extensions of files. And in my case, I don't know actual extensions. So, is there any utility which can let me recover my /home folder alone?  I have not even formatted that drive or touched it at all. So no write has been done on that drive.  If you have suggestions on how to recover, please tell me.


Let $X$ be a random variable with a distribution given by $\mathrm{Bin}(n,p)$ for $p$ in the open unit interval. Compute the moment $E(1/(X+1))$, where we define the negative moment of order $n$ by $E(X^{-1})$ for $n>0$ integer.     How would one do the above computation? I've tried for a while to no avail. I was thinking that perhaps one could manipulate the $1/(X+1)$ term so that the evaluation of the sum becomes easier (kind of how we use $X^{2}=X(X-1)+X$ for some computations).  Thanks for the help!

The problem:  X is a binomial random variable, find $E[\frac{1}{X+1}]$ n and p are not given  PDF for a binomial distribution is $\binom{n}{k}p^k(1-p)^{n-k}$  Expected value is $\sum{x_ip(x_i)}$  But this is where I get stuck, I'm really rusty on my statistics and I'm not sure exactly how to structure it in the next step? I think I want to get the form of the following out of the summation  $\sum _{k=0}^{n} \binom{n}{k}p^k(1-p)^{n-k} = (p + 1 - p)^n = 1$  But I'm not sure if it should look like  $\sum \frac{1}{xp(x)+1} $  and if it should where to go from here?


Similar to this issue:    When I install the Github desktop on Windows 7, it opens briefly in the task manager and shuts down.  I have re-installed numerous times to no avail.  There is no error message. Any ideas?

Today I have installed GitHub For Windows. I had installed GitHub for Windows earlier and at that time it worked fine, but due to some reason I had to uninstall it.  Today when I installed GitHub again it installed perfectly. But after installation when I click on the icon, GitHub does not open. I checked Task Manager for processes and for some time I can see Github.exe, but after some time it disappears.  When it did'nt work I uninstalled and installed again, but the results are the same.  When I try to open it, only the loading symbols comes up.


I'm fairly new to python. I'm trying to create a function called updates. One of its arguments is a file name, called countryFileName. In my main.py I would prompt the user to enter the file name, but here in this function I need to make sure that the file name given by the user exists. If it does exist, it should then proceed to process the file. If the country file does not exist, then updates should give the user the option to quit or not, prompting y or n. If the user does not wish to quit (responds with “n”), then the function should prompt the user for the name of a new file. If the user wishes to quit (responds with a “y” or anything other than a “n”, then the method should exit and return False. The method should continue to prompt for file names until a valid file is found or the user quits. Here's what I got so far: def updates(countryFileName): file3 = open(countryFileName, "r") output = open("output.txt", "w") if file3 == None:     # Run the loop until the user enters correct file name     while True:         # Prompt the user to enter the choice         quitchoice = input("Quit? Press y for yes or y for no: ")         if quitchoice.lower() != "n":             output.write("The update is unsuccessful, sorry\n")             output.close()             return False          elif quitchoice.lower() == "n":             countryFileName = input("Enter new name of file: ")             # Open the file and check status             file2 = open(countryFileName, "r")             if file2 != None:                 break  Right now if the user enters the wrong file name, I just get an error "No such file or directory". I'm not sure why, but I think when python gets an error at the second line file = open(countryFileName, "r") it doesn't continue to my loop. How would I solve this?

How do I check whether a file exists or not, without using the  statement?


I'm having a simple problem but cant find a solution:  I'm creating a row in my table client, but I don't know how recovery the id of the table that I just created, for example:  ALTER proc [dbo].[spinsert_client] @idclient int output, @name varchar(20), @surname varchar(40), as insert into client(name,surname) values (@name,@surname)   here I insert a client, now I want recovery that exact same idclient to insert "products" with it without have to manually search this client , I tried recovering the last row of the client table but I realise that if more than one person is using the same database in different computers it can be a problem, so I need create a client and recovery his id at the same time (it is an assumption I don't know). Im using sql server and Visual studio with c#  sorry for my bad English and thanks for the attention   edit------------------- solution:    ALTER proc [dbo].[spinsert_client] @idclient int output, @name varchar(20), @surname varchar(40) as insert into client(name,surname) values (@name,@surname) Select @@IDENTITY as newId;   them in my c# code:  rpta= SqlCmd.ExecuteScalar().ToString();

What is the best way to get IDENTITY of inserted row?  I know about @@IDENTITY and IDENT_CURRENT and SCOPE_IDENTITY but don't understand the pros and cons attached to each.  Can someone please explain the differences and when I should be using each?


$$\sum\limits_{k=2}^{n}{\frac{1}{k^2}}<1$$   First step would be proving that the statement is true for n=2   On the LHS for $n=2$ we would have $\frac{1}{4}$  therefore the statement is true for $n=2$   Now we must assume the statement is true for $n=j$ with $j\geq2$   $$\sum\limits_{k=2}^{j}{\frac{1}{k^2}}<1$$   Now we must prove true for $n=j+1$   $\sum\limits_{k=2}^{j+1}{\frac{1}{k^2}}<1$  $\Rightarrow \sum\limits_{k=2}^{j}{\frac{1}{k^2}}+\frac{1}{(k+1)^2}<1$  I cant seem to introduce the induction hypothesis

I'm having trouble proving this by induction. We need to show that $P(k+1)$ is true: $$\sum_{i=2}^{k+1} \frac{1}{i^2}\leq 1.$$  Don't know where to go from here. Any help?


I am developing an application in Cocoa. I need to create a DMG file to install my application like Adium (which provides a nice UI to drag the app file to Application folder). Is there a tool for this?

I need to create a nice installer for a Mac application. I want it to be a disk image (DMG), with a predefined size, layout and background image.  I need to do this programmatically in a script, to be integrated in an existing build system (more of a pack system really, since it only create installers. The builds are done separately).   I already have the DMG creation done using "hdiutil", what I haven't found out yet is how to make an icon layout and specify a background bitmap.


I lost my phone somewhere and I know it is not in my house; it is ethier in my car or at the place where I got out of the car (which is by my school).  I do not know if my phone is dead by now and if not, then it is on silent mode. My question is:  How can I find where my phone is?  I got no apps and I tried the Google android device manager and it is saying no location found.  So, how do I find out where it is? I searched EVERYWHERE in the car. I need to know as soon as possible, and if there is no way you can help me, then is there anyway I can get my photos and videos etc from my LOST phone and transfer it to my NEW phone?

I realize this is a long shot, but my phone was lost or stolen a few hours ago.  At the time it was stolen, I didn't have any specific applications installed to track it or wipe the data. So... my bad. I'm hoping the fact that I have a pattern lock will at least prevent anyone from accessing my data.  My question is, do I have any options for tracking or data wipe after the fact? (I'm more interested in tracking.)  Note: I have read similar questions, but unless I'm mistaken, they all address the question in terms of preparation before losing the phone. I'm asking about fallback options after losing the phone.


similar question to this are asked many times around Stack over, but I really can't find anywhere that answers this specific case. I have a char, which of course has a binary represenattion. I print it with this method: void print_binary(unsigned char x) {     int b = 128;      while (b != 0) {         if (b <= x) {             x -= b;             printf("1");         } else             printf("0");         b = b >> 1;     } }  And I have some char: char c = 'c';  Now, I need to be able to flip a specific bit in any char/byte.To really spell it out, I need a function with this signature: char flip_bit(int idx, char c) { So, I give it a char, and a index. It should then flip the bit at the spot of the index, and return a new char. Solutions that doesnt work for me In similar looking questions there have been given some solutions that I can't use for this issue spefically: int mask = 0x90; // 10010000 int num  = 0xE3; // 11100011 num ^= mask;      This doesnt work, because I need to do this dynamically, and cannot hardcode every byte for xor'ring with. IF someone could show me how to implement this in the above described function, that would be great. Or this solution: char c = 'c'; c |= 1UL << 4;  This works for flipping bit 4 from a 0 to a 1. But I can't get it to work the other way around. Also I need something where it's not necessary for me to specify whehter it should change into a 1 or a 0, but just flip it. c |= 0UL << 4; # this has no effect  Cant someone help me? EDIT: This question has been closed, since it sounds a lot like , however, if one takes the time to read what what I have written here, you will notice that none of the proposed solutions to that questions satisfies the spefications that I have written

How do you set, clear, and toggle a bit?


In the sentence- "Jessie's and Nora's dogs are lovely". Do we really have to put apostrophes on both the names?

Quoting :     The girls' and boys' teams are both in the playoffs. (Both girls and   boys have their own team--both have their own apostrophe.)       The girls   and boys' team is excited about being in the playoffs. (One team of   girls and boys--one apostrophe.)   Is there a sentence that could be formed using      girls' and boys' team — i.e. plural boys with apostrophe; plural girls  with apostrophe but a singular team?


This is my jsfiddle:   I want the text Hello World to be centered vertical but somehow it is not working. How do I fix this problem?  This is my CSS:  .app-header{   height: 50px;   background: #000;   color: #fff; } .v-center{   vertical-align:middle; }

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


Suppose I have a quantum state $\frac{1}{\sqrt{2}}|0\rangle+\frac{1}{\sqrt{2}}|1\rangle$. Also I have a mixture of two quantum states $S_{1} = |0\rangle$ and $S_{2} = |1\rangle$. In this mixture $50\%$ chance of getting $S_{1}$ and $50\%$ chance of getting $S_{2}$.  If I give you these two situation one by one, is there anyway you can tell which is what? Also what is the difference between them?

My understanding so far is: a pure state is a basic state of a system, and a mixed state represents uncertainty about the system, i.e. the system is in one of a set of states with some (classical) probability. However, superpositions seem to be a kind of mix of states as well, so how do they fit into this picture?  For example, consider a fair coin flip. You can represent it as a mixed state of “heads” $\left|0\right>$ and “tails” $\left|1\right>$: $$ \rho_1 = \sum_j \frac{1}{2} \left|\psi_j\right> \left<\psi_j\right| = \frac{1}{2} \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} $$  However, we can also use the superposition of “heads” and “tails”: specific state $\psi = \frac{1}{\sqrt{2}}\left( \left|0\right> + \left|1\right> \right)$ with density  $$ \rho_2 = \left|\psi\right> \left<\psi\right| = \frac{1}{2} \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix} $$  If we measure in the computational basis, we will get the same result. What is the difference between a superposed and a mixed state?


Im in the feed tab and it seems like the columns don't have the enought width making it completly unreadable Please fix it asap  My tablet is a BQ Edison 3   App Version: 1.0.89 Device Manufacturer: bq Device Model: Edison 3   OS Version: 5.0 (1449647458)

The lines wrap so much on v1.0.85 that only a few items can be displayed.  Edit: This is on the world's most low end tablet, Azpen A727.  Screenshots of the old:    and new, showing loss of quality


During the time when the passenger pigeon was hunted down to only captives in the zoo, how could the zoo not maintain a small population and keep the species alive? Why did the population slowly die out? I thought a bird can successfully raise multiple young, given the near perfect conditions in captivity in which the people there are trying to keep them alive?  Just a question I ramdomly thought of, so answers would be appreciated! Edit: this is not a duplicate. Birds can have multiple young. That will increase the population success rate.

What is the smallest viable reproducing population, such as in a human population. By viable I mean a population which keeps genetic defects low (enough).  A very strongly related question: what is the expected number of generations a given population can survive?


Say you're making an argument that has two parts:     Why did such and so happen?  First, bla bla.  Second, bla-pity bla bla bla.   I'm thinking "secondly" would sound better.  But if I use "secondly," do I have to use "firstly" -- which sounds so -- yuck.  The tone of the piece of writing is medium formal.  I mean, it's formal, but not formal at the level of a brief submitted to the Supreme Court.

Take it for granted that enumerations have secondly, …; thirdly, …; finally, … Is there any reason, except tradition, to prefer the traditional first to firstly?


I'm leaving the U.S. for a two-months stay in Switzerland this summer.  I have dual citizenship, U.S. and German; I'm departing the U.S for Switzerland with German passport and returning from Switzerland to the U.S. with U.S. passport.  Is this correct?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


My code returns an object:    public async Task<IHttpActionResult> GetAnswers(int userTestQuestionId)     {    return Ok(new AnswerToClientDTO         {             AnswerGridCorrect = answerGridCorrect,             Result = result,             UpdateRowCount = updateRowCount         });   Here is the code for the AnswerToClientDTO which is only used in the one place in my application:  public class AnswerToClientDTO {     public string AnswerGridCorrect { get; set; }     public int UpdateRowCount { get; set; }     public string Result { get; set; } }   Is it possible for me to return an anonymous object where I do not have to declare a class from an ASP.NET WEb API method?

Using the simple example below, what is the best way to return results from multiple tables using Linq to SQL?  Say I have two tables:  Dogs:   Name, Age, BreedId Breeds: BreedId, BreedName   I want to return all dogs with their BreedName.  I should get all dogs using something like this with no problems:  public IQueryable<Dog> GetDogs() {     var db = new DogDataContext(ConnectString);     var result = from d in db.Dogs                  join b in db.Breeds on d.BreedId equals b.BreedId                  select d;     return result; }   But if I want dogs with breeds and try this I have problems:  public IQueryable<Dog> GetDogsWithBreedNames() {     var db = new DogDataContext(ConnectString);     var result = from d in db.Dogs                  join b in db.Breeds on d.BreedId equals b.BreedId                  select new                         {                             Name = d.Name,                             BreedName = b.BreedName                         };     return result; }   Now I realize that the compiler won't let me return a set of anonymous types since it's expecting Dogs, but is there a way to return this without having to create a custom type?  Or do I have to create my own class for DogsWithBreedNames and specify that type in the select?  Or is there another easier way?


After Han and Luke rescue Princess Leia from the Deathstar, one of the first things Leia says to Han-after they fight off a very meager squad of Tie Fighters-is that their escape was too easy, and that the only explanation for the ease of their escape was that they were being tracked.                                                       HAN                      Not a bad bit of rescuing, huh? You                       know, sometimes I even amaze myself.                                   LEIA                      That doesn't sound too hard. Besides,                       they let us go. It's the only                       explanation for the ease of our                       escape.                                   HAN                      Easy... you call that easy?                                   LEIA                      **They're tracking us!**                                   HAN                      Not this ship, sister.       [...]                                   WILLARD                      When we heard about Alderaan, we                       were afraid that you were... lost                       along with your father.                                   LEIA                      We don't have time for our sorrows,                       Commander. **The battle station has                       surely tracked us here.**                           (looking pointedly to                            Han)                      It's the only explanation for the                       ease of our escape. You must use the                       information in this R2 unit to plan                       the attack. It is our only hope.             EXT. SPACE             The surface of the Death Star ominously approaches the red             planet Yavin.    Leia personally witnessed the awesome power of the Deathstar destroy her home planet, and admitted that it was only a hope that a weakness could be found in the stolen data R2 was carrying.                                    LEIA                      At least the information in Artoo is                       still intact.                                   HAN                      What's so important? What's he                       carrying?                                   LEIA                      The technical readouts of that battle                       station. I only hope that when the                       data is analyzed, a weakness can be                       found. It's not over yet!    Why was Leia so willing to knowingly lead the Deathstar to the Rebel base?   When faced with the destruction of her home world she was clever enough to send them to an abandoned base, why didn't Leia use the Millennium Falcon to lead them away from the Rebel stronghold? Why didn't she get Han to drop them off somewhere they could meet up with some sympathizers and catch a new ride to the Rebel base or just ship R2 there? Why didn't she insist that R2 figure out how they were being tracked and disable the beacon? Or even better yet, why didn't she use this knowledge to her advantage and lead the Deathstar to a strategically advantageous location to engage or ambush it, like a meteor or asteroid rigger to explode? As clever as she was the only solution shouldn't have been, "They're following us. We had better lead them exactly where they want us to and hope that we can come up with a plan before they catch up to us!"  I'm not the only one to wonder about this:

In A New Hope, after Han and Luke fight off the TIE Fighters while escaping from the Death Star, these exchanges happen:             INT. DEATH STAR - CONTROL ROOM             Darth Vader strides into the control room, where Tarkin is             watching the huge view screen. A sea of stars is before him.                                   TARKIN                      Are they away?                                   VADER                      They have just made the jump into                       hyperspace.                                   TARKIN                      You're sure the homing beacon is                       secure aboard their ship? I'm taking                       an awful risk, Vader. This had better                       work.             INT. MILLENNIUM FALCON - COCKPIT             Han, removes his gloves and smiling, is at the controls of             the ship. Chewie moves into the aft section to check the             damage. Leia is seated near Han.                                   HAN                      Not a bad bit of rescuing, huh? You                       know, sometimes I even amaze myself.                                   LEIA                      That doesn't sound too hard. Besides,                       they let us go. It's the only                       explanation for the ease of our                       escape.                                   HAN                      Easy... you call that easy?                                   LEIA                      They're tracking us!                                   HAN                      Not this ship, sister.             Frustrated, Leia shakes her head.                                   LEIA                      At least the information in Artoo is                       still intact.                                   HAN                      What's so important? What's he                       carrying?                                   LEIA                      The technical readouts of that battle                       station. I only hope that when the                       data is analyzed, a weakness can be                       found. It's not over yet!   Leia doesn't even know if there is a weakness, let alone whether they'll find one. If she (correctly) realizes that they're being tracked, why doesn't she suggest that the Millennium Falcon go somewhere besides Yavin 4 instead of just frustratedly shaking her head? I know the plans , but it seems unlikely that continuing to fly to the secret Rebel base in the ship she's certain is being tracked is the only option. They are already in hyperspace when this conversation happens, but they apparently have time to talk for a little while after, so presumably they'd have time to stop and reroute.


To make USB devices accessible to a guest OS under VirtualBox, one must     i) install the appropriate extension pack    ii) navigate to 'Settings ----> USB' in the VirtualBox menu and  iii) tick 'Enable USB 2.0 (EHCI) Controller   iv) add a `USB device filter`    Step iv) requires selecting a USB device filter by clicking on a list of available USB devices which appears at the mouse-pointer position    when clicking on the 'Add new USB filter` icon on the right margin ( a USB icon with a green plus sign ) when pressing ALT+INS     In either case one will see a list of USB device candidates currently attached to the host system.     These can then be selected and will appear permanently under the 'USB Device Filters' list of the USB menu.    This does not work under 14.04.   When attempting to add an attached device ( clicking on appropriate icon or pressing ALT+INS )      VirtualBox can not see any of the connected USB devices, resulting in a <no devices available> message. Trying to enter the device details manually into a blankly created USB device filter does not work either. Booting the guest OS ( Win 7 ), you are not able to see any 'removable drives'.   The obvious items were all checked:   VirtualBox installed from repository ( apt-get install ) App reports version 4.3.10 Appropriate VirtualBox extension pack ( 4.3.1r93733 ) successfully downloaded+installed from the Oracle site   As mentioned previously on the the same box with 12.04 installed everything works as it should and Win7 can see the removable drive as expected.  As a last resort various permutations of VM settings, USB sticks, e.t.c. were tried without achieving the desired result.   Has anyone encountered the same issue? Has anyone encountered similar difficulties? Has anyone been able to work around the problem? ( remember manual entry of device details into an empty filter entry has not worked )   Does anyone know if this is an issue   with VirtualBox? with the current version of the VirtualBox extension pack? or perhaps even with Trusty Tahr itself?   I have full USB functionality on my 14.04 host.

I was following this question but found a problem.   I used guvcview to test the camera, it works. I installed the 12.04 virtualbox release from their website and installed the extension pack. But when I click the usb with the green plus sign it says no devices available.


How should I solve this equation system without using logarythms,using just a simple method? (E.g. turning it into a quadratic one using t)  $$\left(\frac{3}{2}\right)^{x-y} - \left(\frac{2}{3}\right)^{x-y}=\left(\frac{65}{36}\right)\\ xy-x+y=118$$

Consider the system  $$\begin{aligned} \left( \frac{3}{2} \right)^{x-y} - \left( \frac{2}{3} \right)^{x-y} & = \frac{65}{36}, \\ xy -x +y & = 118. \end{aligned}$$  I have solved it by performing the substitutions $x-y=u$ and $xy=v$. Then I multiplied the first equation by $6^u$ and used $a^2-b^2=(a+b)(a-b)$ to find  $$(3^u+2^u)(3^u-2^u) = 65 \cdot 6^{u-2}.$$  By inspection I found $u=2$ and $v=120$. I solved the original system in $x,y$ and got the answers. Is there another quicker way to solve this without resorting to this sort of ninja inspection? I have found a second solution by solving $a^u +1/a^u = 65/36$, which assures $u=2$ but takes much more time.  Could there be a third way faster than these?


Because no matter how many objects will we create with static will share same reference ?

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


I am a Canadian with a Tier-5 Visa that starts on December 30th, 2020. I'm moving with my girlfriend, she goes to school in the UK. I currently have no job lined up, but this might change. I was hoping to arrive earlier than my start date, ideally 2-weeks, in order to deal with the 2-weeks quarantine, then search for a place the rent, and spend Christmas there. Is it likely that a) I get turned away before I get on the plane, b) I am not let into the UK, c) I would have to leave and re-enter the country on my start date, d) It'll be fine? Also, what happens if my Biometric Residence Permit is not ready?

My Tier 5 YMS visa is set to start on September 30th, 2016 however, I want to get there earlier.  Can I enter the UK as a tourist, if I explain to border control/immigration that I am entering as a tourist and do not plan to work or do anything really until my Tier 5 visa starts?  I can find no official contact or information source on this with UK Visas Information, the British High Commission, etc.


My rep on SU is 124927. When I go to the top bar site drop-down (the Stack Exchange™ MultiCollider SuperDropdown™) it shows my Meta SU rep to be 100005 (a significant difference).    This question, , says it can be different because of caching, and that in any case rep should be synchronised hourly:  The reputation on meta sites is not updated instantly (except for this site, Meta Stack Exchange, which is not a typical per-site meta), after you get more reputation in the main site, but it is updated once per hour, according to the What is "meta"? How does it work? page  So we can rule out caching as I haven't had any rep changes in the last hour or so. So, where has my 24922 rep gone? Note, that if I look at my rep on Meta SU in the top bar it is correct (see the image), it is only the site drop-down that is wrong. The same problem is affecting other site metas as well. I've had no rep changes on SO or Software Recommendations in the last 7 days and these reps don't match up either.

While using the top bar to navigate across communities, I noticed that the reputation displayed on meta sites on that list does not match the one of their corresponding main sites:    I have noticed on past situations that reputation gained takes a bit to "update" on the display on Meta sites (that is, if you gain rep on SO, for example, it will take some time for you to see your updated rep on MSO).  However, I have never noticed this behavior here, on the Sites List of the top bar. Furthermore, the "delay" here seems to be more severe, as the "outdated" rep showed is of several days ago (for example, I turned 3k on SO almost exactly a week ago, but the rep shown on MSO is still <3k).  Any idea what could be causing this behavior?    Update: 2 months later this persists: my main site rep updates correctly but their corresponding meta rep remains the same as in the image above.     Update: As per Catija's  I removed the site (MSO) and put it back in, but it didn't update the rep.   However, after removing one site (TWP Meta), waiting at least a day, and then adding it back I see that although the reputations still don't match, the number displayed did changed a bit (previously 29,924 but now 33,112):


I have a Windows 10 Pro installation that was upgraded from a previous Windows 8 install. When installing the latest Windows 10 upgrade, the update fails with the error "Unsupported Disk Layout for UEFI Firmware".  I understand this is because i have MBR partitions and not a GPT partition table. All the guides I've found tell me I have to reinstall Windows from scratch after repartitioning the drive.  Is there a way to convert the partitions and keep the installed copy of Windows 10 working so I don't have to reinstall?

I've installed Windows 10 in BIOS mode and use MBR. How can I convert it to use UEFI and GPT without reinstalling Windows 10? Is this possible?


I've tried following along with  and , and tried searching for the correct driver, but I had trouble figuring out which it was. I did not find clear information pertaining to my specific hardware.  The adapter does not show up with sudo lshw -C network.  And lsusb gives:  $ lsusb | grep -i realtek Bus 001 Device 007: ID 0bda:0811 Realtek Semiconductor Corp.   I'm running 16.04, dual booting with Windows 10, and this hardware is working in Windows.  Thanks in advance for any help.

Hello I having having issues seeing my wifi I bought my computer built from newegg and recently switched to Ubuntu it picks up my wired connection fine but doesn't even give my any options for my wifi dongle  would be grateful for some help if possible and thank you I have been trying to get it to work for days  I am not sure what type of device it is is says ac600 on the dongle which i look up and says it could be netgear or edimax  "lshw -C" *-network                       description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:03:00.0        logical name: enp3s0        version: 06        serial: 74:d4:35:b8:50:ac        size: 1Gbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.0.2 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s        resources: irq:28 ioport:ce00(size=256) memory:fdfff000-fdffffff memory:fdff8000-fdffbfff   "lsusb" Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 005: ID 0bda:0811 Realtek Semiconductor Corp.  Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 003: ID 154b:fa05 PNY Flash Drive Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 003: ID 093a:2521 Pixart Imaging, Inc. Optical Mouse Bus 003 Device 002: ID 1130:1620 Tenx Technology, Inc.  Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 008 Device 004: ID a012:b012   Bus 008 Device 003: ID 046d:0829 Logitech, Inc.  Bus 008 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  "ifconfig" enp3s0    Link encap:Ethernet  HWaddr 74:d4:35:b8:50:ac             inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0           inet6 addr: ::355f:6ae4:a42a:7481/64 Scope:Global           inet6 addr: fe80::a92f:a3c8:1f6b:6322/64 Scope:Link           inet6 addr: ::cc28:f3c5:70b1:420f/64 Scope:Global           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:61536 errors:0 dropped:0 overruns:0 frame:0           TX packets:43687 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:55328319 (55.3 MB)  TX bytes:5679616 (5.6 MB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:5312 errors:0 dropped:0 overruns:0 frame:0           TX packets:5312 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1            RX bytes:536533 (536.5 KB)  TX bytes:536533 (536.5 KB)


I was watching a youtube tutorial that looked at logistic regression. To illustrate this they showed a graph that plotted p on the y-axis, where they used the inverse of logit(p).  Can anyone help me understand the algebra behind how they got from logit to inverse logit as below? Finding it quite frustrating to just see a black box output like this!

The outcome of the logistic model is binary (0;1) - intervention that occurs in hospital (3838 interventions in 51096 cases). I am modeling the effect of age groups (60 to 74; 75 to 89 and 90+) and sex (female) on the outcome. My reference age group is male aged 18-59.  My logistic regression coefficients look like this:  intercept  -4.313 female      0.5117 age 60-74   0.4081 age 75-89   1.1761 age 90+     1.5612.   Corresponding odds ratios:  female      1.668 years60_74  1.504 years75_90  3.242 years90     4.764   Now I am trying to obtain a probability of an outcome = 1 for each case. What is the right way to do this?


I think I have understood properly the principle of , however the sensitivity is around  of accuracy of distortion. That looks pretty small... just starting with simpler phenomena, for example, thermal expansion. In order to avoid thermal expansion, the temperature needs to be control within a variation of $10^{-10}~\rm K$ or $10^{-11}~\rm K$ along the tubes.  I guess that the tubes do not need to be exactly $4~\rm{km}$ equal as the lasers can be synchronized although the distance is not exactly 4km within the range of $\left[10^{-18}~\rm m\right]$  How is the thermal noise avoided currently in LIGO, related to suspension and not complete vacuum?  It is already demonstrated that the frequency cut-off is low, but, how is that achieved? Which materials and isolation supported it?

Since LIGO is dealing with readings at nanometers, events such as vehicles driving nearby, and constant (but extremely minor) tremors of the earth can cause movement with the mirrors at nanometers.  Such tiny movements are extremely difficult to measure, but can easily cause errors when using such a small scale.  How does LIGO remove these factors, and take precautions to prevent false readings due to noise?


I'm struggling with this a lot. I think it all boils down to my basic understanding of what the ring   $\mathbb Z/2\mathbb Z \times \mathbb Z/5\mathbb Z$ is. As much as I know is that it is a ring of 10 elements, but I have no idea how I would go about finding the units in this.  The way I view it is:  $\mathbb Z/2\mathbb Z  = \{0,1\},\qquad   \mathbb Z/5\mathbb Z= \{0,1,2,3,4\}$.  So would   $\mathbb Z/2\mathbb Z \times \mathbb Z/5\mathbb Z= \{0\times0, 0\times1, 0\times2, 0\times3, 0\times4, 1\times0, 1\times1, 1\times2, 1\times3, 1\times4\} = \{0,0,0,0,0,0,1,2,3,4\}$?  This seems totally incorrect to me, so it would be great if someone could clear this up for me.  I understand a unit is an element $u$ such that $uv=vu$, but in this I don't really even know what the elements are... Would the unit be $0$ and $1$?  Any help would be great. Thanks

How do I exactly find the zero divisors and units of a ring in the form of $\mathbb{Z}_n \times \mathbb{Z}_m$? For instance, how does one calculate zero divisors and units of $\mathbb{Z}_6 \times \mathbb{Z}_2$? I understand that a zero divisor is a non-zero element of $R$ such that $rs = 0$ for some other non-zero element $s$ in $R$. But I don't really quite understand how to apply that to a ring of the form $\mathbb{Z}_n \times \mathbb{Z}_m$. Also, the units of $\mathbb{Z}_6 \times \mathbb{Z}_2$ would be elements that send some element $s$ in $\mathbb{Z}_n \times \mathbb{Z}_m$ to the multiplicative identity, right? (which would be 1)? How do I apply these concepts to "product" rings? Thank you.


I'm working on a case study where the number of phone calls (min = 0 calls and max = 10 calls) is measured every 30 seconds in a metro station. The experiment was done three times during on day where the number of phone calls were measured every 30 seconds for one hour. Hence, the data that has been collected has three experiments. Each experiment therefore has 120 measurements of phone calls ranging from 0 to 10. The data in my excel sheet has three columns (one for each experiment) and each column has 120 entries.   Experiment 1 | Experiment 2 | Experiment 3 10             2              5 5              3              2 8              1              5 1              1              6 .              .              . .              .              .   What I'm trying to figure out is how to determine if the data I have is normally distributed and if my sample mean is normally distributed. The first thing that came to find is to figure out the frequency of the number of phone calls and throw them in a histogram, but the histogram is all over the place and has no normal distribution feel to it and cannot conclude the data is not normally distributed.   Experiment         1        2       3 Mean           5.150    4.567   5.092 = 4.936 E(X-bar) STD            2.975    2.734   2.959 VAR            8.851    7.475   8.756

I want to know how to check a data set for normality in Excel, just to verify that the requirements for using a t-test are being met.    For the right tail, is it appropriate to just calculate a mean and standard deviation, add 1, 2 & 3 standard deviations from the mean to create a range then compare that to the normal 68/95/99.7 for the standard normal distribution after using the norm.dist function in excel to test each standard deviation value.  Or is there a better way to test for normality?


My question is related to  post (the comments below). Basically, how can I identity the source and drain of a transistor ? I thought that drain and source were totally symmetric inside of NMOS or PMOS from the P/N structure behind as also explained . But apparently, in the comment below  post, a PMOS source should be the highest voltage of a circuit and the NMOS source is the ground. I would like to understand why. Also I am not sure to understand this explanation because what happens if actually a NMOS transistor is not plugged to the ground on any of its port (but at some "intermediate" voltage).

I am confused by a litte detail with CMOS inverter. Note that I am really a beginner in CMOS "theory". Here is the electrical circuit:  At "first view", I understand the principle. If \$V_{in}\$ is high (\$V_{in}=V_{DD}\$), then the PMOS will be open and the NMOS closed. Thus \$V_{out}=0\$. Reciprocally, \$V_{in}=0\$ implies the PMOS closed and NMOS closed thus \$V_{out}=V_{DD}\$ My question I have trouble when I look at the details. Let us consider \$V_{in}\$ high for instance. A PMOS will be closed for \$V_{GS} < V_{Tp}<0\$ (threshold voltage), and \$V_{GS} > V_{Tn}>0\$ for NMOS. But for this I must identify where are source and drain. To identify where is the source and the drain of a transistor, I must find which one has the highest voltage. But as I do not know \$V_{out}\$ how can I find them ? \$V_{out}\$ is what I try to find so I am not supposed to know it (else the reasoning is circular)... Is there an implicit assumption that "by design", for CMOS circuit, any voltage in the circuit will verify \$0 < V < V_{DD}\$. Applying this to \$V_{out}\$ I can deduce source and drain for both transistors and solve my issue ? Because "in principle", I could imagine some negative voltages and because of that identifying what is source and drain is not straightforward here.


Let $A$ be a nonzero noetherian commutative ring with one, and let $x$ be an indeterminate.   Can the rings $A[x]$ and $A$ be isomorphic?  Of course such a ring would have infinite Krull dimension, but noetherian rings of infinite Krull dimension are well known to exist: see .

Let $R$ be a commutative Noetherian ring (with unity), and let $I$ be an ideal of $R$ such that $R/I \cong R$. Then is it true that $I=(0)$ ?  I know that a surjective ring endomorphism of a Noetherian ring is also injective, and since there is a natural surjection from $R$ onto $R/I$ we get a surjection from $R$ onto $R$, but the problem is I can not determine the map explicitly and I am not sure about the statement. Please help. Thanks in advance.


I have several of my favourite apps as icons on my desktop favouries bar but they can behave differently.  Some of them (e.g. Firefox, Thunderbird, Geany) just add a dot to the icon each time you instance them whilst others (e.g. Dolphin, Netbeans) add another icon to the bar.  Is there a way to set this behaviour? I prefer the multiple dot approach.  Secondly, is there a way to change an app's icon?  For instance, Dolphin and the default file manager use the same icon - just wondered if I could distinguish more easily between them.

Is there a way to customize a Lucid Lynx Launcher icon for various programs? There does not seem to be a way to do this using Create Launcher or Launcher properties. The application is not actually "installed" on the PC, the executable has just been copied. All I've been able to do so far is to add the command /home/t32/bin/pc_linux/t32marm -c /home/t32/config_usb.t32 to a generic Launcher icon using Create Launcher.


I have a sword that currently rotates around a pivot point thats off of the actual object. Im new to blender and im not sure how i would go about changing it so that the sword rotates around the handle. Any help would be appreciated!

How can I change the local origin of an object, without changing the object location in the world space.  This is the object located at position (0,0,0) in the world space    This is the same object located at position (0,1,0) in the world space, but with its local origin offset so that the object is in the same place    Is there a way to do this in a single step?


I am training a deep neural networks for self driving cars using Adam optimization, and I wonder how can I find a standard batch size value , currently I am using the value 1 and I can see that my resources are not fully used (CPU and RAM) ? Thank you

When training a neural network, what difference does it make to set:   batch size to $a$ and number of iterations to $b$ vs. batch size to $c$ and number of iterations to $d$   where $ ab = cd $?  To put it otherwise, assuming that we train the neural network with the same amount of training examples, how to set the optimal batch size and number of iterations? (where batch size * number of iterations = number of training examples shown to the neural network, with the same training example being potentially shown several times)  I am aware that the higher the batch size, the more memory space one needs, and it often makes computations faster. But in terms of performance of the trained network, what difference does it make?


I have to proove this this identity which connects Fibonacci sequence and Pascal's triangle:  $$\begin{pmatrix}n\\0\end{pmatrix}+\begin{pmatrix}n-1\\1\end{pmatrix}+\dotsm+\begin{pmatrix}n-\lfloor\frac{n}{2}\rfloor\\\lfloor\frac{n}{2}\rfloor\end{pmatrix} = F_{(n+1)}$$  Example: ${6\choose0} + {5\choose1} + {4\choose2} + {3\choose3} = 13 = F_{7}$

The binomial sum   $$s_n=\binom{n+1}{0}+\binom{n}{1}+\binom{n-1}{2}+\cdots$$   satisfies the Fibonacci relation.   I failed to prove that $\binom{n-k+1}{k}=\binom{n-k}{k}+\binom{n-k-1}{k}$... Any hints or suggestions?


Looking at what block device commands like lsblk or blkid return it seems that linux HDD support SCSI drivers regardless of the type of the devices, like a USB flash driver that is presented as follows in lsblk command:  ...     sdb               8:16   1    30G  0 disk      └─sdb1            8:17   1    30G  0 part /run/media/user/HP v224w ...   Why sdb and sda drivers are called SCSI drivers? What does this terminology have to do with Small Computer System Interface?

I have 3 SATA devices on my system. They show up under /proc/scsi/scsi, although these are not SCSI devices. Why do my SATA devices show up under the SCSI directory?  $ cat /proc/scsi/scsi  Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00   Vendor: ATA      Model: WDC WD2500AAJS-6 Rev: 01.0   Type:   Direct-Access                    ANSI  SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00   Vendor: TSSTcorp Model: CDDVDW TS-H653Z  Rev: 4303   Type:   CD-ROM                           ANSI  SCSI revision: 05 Host: scsi4 Channel: 00 Id: 00 Lun: 00   Vendor: ATA      Model: ST3320620AS      Rev: 3.AA   Type:   Direct-Access                    ANSI  SCSI revision: 05


I am trying to remember a young adult series I read perhaps 15 years ago, but I don't remember many details. One of the characters was named Briar. As I recall, there are four main characters that channel elemental power, and they have a meditation routine to unlock this power where they inhale and exhale to a seven count. Sorry it's not much to go on, I will try to add more details if I remember any.

I'm trying to track down a book I borrowed form a library in the UK around 2000/2001. Here are the details I remember:  The story is set in a fantasy world; no connections to our world The main characters are four children who have no connection initially but are brought together over the course of the story The children are all taken in by an elderly woman who starts to develop their magical skills Each of the children has a different type of magic: one is nature, another is related to fabric or clothes A significant plot point is the girl with nature based magic takes in and rears a baby bird. A lot of time is spent discussing how much work it will be to care for this animal The title may have something to do with weaving or thread but I might be confusing this with another story


If we shine a beam of light to an object 1 light year away it takes a year for light to shine on it. Now if we block the light source would it take 1 year for the object to become dark or would it become dark instantaneously?

I have seen many folks doing this  concluding that shadow from point A on the Moon can travel to point B on the Moon faster than light.  What I fail to understand here (and I am sure I am wrong), is nothing can travel faster than light. I also read about Relativity where Einstein stated that every event happening for you depends on how fast the light gets from where the event is happening to you.  This is my particular problem with this Moon shadow experiment. You cannot make a shadow travel faster than light, because in order for the "disappearance" of light to get to the Moon, it has to travel at light speed.  Here is one way to understand my point. Consider we shine a flashlight on Moon, like the guy in the linked video did, we move the finger across the face of the flashlight, before we moved the finger it was casting the shadow at Point A on Moon, after we finish moving our finger, the shadow is at Point B on the Moon.  When the finger reaches the end of it's moving length, the light waves that have left the flashlight before the finger reached there will have to hit Point B and it will take them a second and a half to get there, and another second and half for us to see that shadow on point B, which makes it 3 seconds + finger moving time for us to actually see the shadow at point B. That means shadow traveled (say) across the diameter of the Moon in 3 seconds.   So. about 3000 Km in ~3 seconds make it 1000 Km per seconds which is very tiny compared to the speed of light. How can these experiments conclude that Shadow could be made to travel faster than light? What is the obvious clue that I am missing here?


I am able load the data using RESTclient(POST Method only) in FireFox. but while development i am not able to load the data in jquery or ajax using post method.  URL is,   can anyone help me. ?  Thanks in Advance. :)

I need to make an AJAX request from a website to a REST web service hosted in another domain.  Although this is works just fine in Internet Explorer, other browsers such as Mozilla and Google Chrome impose far stricter security restrictions, which prohibit cross-site AJAX requests.  The problem is that I have no control over the domain nor the web server where the site is hosted. This means that my REST web service must run somewhere else, and I can't put in place any redirection mechanism.  Here is the JavaScript code that makes the asynchronous call:  var serviceUrl = "http://myservicedomain"; var payload = "<myRequest><content>Some content</content></myRequest>"; var request = new XMLHttpRequest(); request.open("POST", serviceUrl, true); // <-- This fails in Mozilla Firefox amongst other browsers request.setRequestHeader("Content-type", "text/xml"); request.send(payload);   How can I have this work in other browsers beside Internet Explorer?


I am trying to define a typed dictionary in Python. I have written the following snippet but I wonder if there is a better way to achieve the same goal. I am using defaultdict but feel free to change that to dict for the base if you want.   from collections import defaultdict  class typed_dict(defaultdict):      def __init__(self, key_type, val_type, *args, **kwargs):         self.key_type = key_type         if type(val_type) == type(lambda: 1):             self.val_type = type(val_type())         else:             self.val_type = val_type         super(typed_dict, self).__init__(val_type, *args, **kwargs)      def __getitem__(self, k):         try:             assert type(k) == self.key_type             return super(typed_dict, self).__getitem__(k)         except AssertionError:             print('key mismatch, got {}, must be {}'.format(type(k), self.key_type))      def __setitem__(self, k, v):         try:             assert type(k) == self.key_type             assert type(v) == self.val_type             super(typed_dict, self).__setitem__(k, v)         except AssertionError:             print('key or value mismatch, got {}: {}, \  must be {}: {}'.format(type(k), type(v), self.key_type, self.val_type))    d = typed_dict(int, str) d[1] d[2] = "two" d["one"] d["three"] = 3 d[3] = 3 print(d)  d = typed_dict(int, lambda: '') d[1] d[2] = "two" d["one"] d["three"] = 3 d[3] = 3 print(d)  import numpy as np d = typed_dict(int, lambda: np.zeros(2)) d[1] d[2] = "two" d[3] = np.array([1,2,3]) print(d)

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


I tried to find $f(a) = \int_{0}^{\infty} \frac{\log(x^{2}+a^{2})}{x^{2}+b^{2}}$. After differentiating I get : $f(a) = \frac{\pi \log(a+b)}{b} + C$. But it's not easy to find this constant. I represent constant as $\int_{0}^{\infty} \frac{\log(x^{2}+1)}{x^{2}+1} - \pi \log(2)$. Any hints ?

How do I solve this? $$\int_0^\infty\frac{\ln(1+{x^2})}{1+{x^2}}$$ I know the answer is $\pi\ln2$.


I want to examine the convergence of $(1-\frac{1}{kn})^n$ for $k\in\mathbb{N}$. My intuition is that for $k=1$, the sequence converges towards $1/e$ and for all other value for $k$, it should converge towards $0$. I'm just unsure about how to prove this.

I need to show the following: $$\lim_{k\rightarrow \infty} \left(1 + \frac{z}{k}\right)^k=e^z$$  For all complex numbers z. I don't know how to start this. Should I use l'Hopitals rule somehow?


I just recently learned that 30x Optical Zoom on a Camera and 30x Magnification on Binoculars are different things.  Suppose if I have got 30x50 Binoculars, then what would be its equivalent number of an Optical Zoom that I can expect?

I read  that shows how focal lengths can be converted to optical magnification, but it isn't clear to me how it would work the other way around. My binoculars are adjustable from x10 to x30 times zoom, but what would that be in an equivalent lens focal length? Working with the equation you have some reference focal lengths to work off of, but working with magnification it is not clear to me what information to use. Would I use the focal length of the human eye as the minimum focal length, the optical zoom as the magnification number, and the maximum focal length would be what I'm solve for?


How do you add more values to enums in java, I made some code to give an idea of what I'm going for but I know it doesn't work.  public class Types  {     public enum PieceTypes     {}      public void addTypes(String a)     {         PieceTypes = PieceTypes.values() + a;     }  }   I have no idea where to start, please help.

It is possible to add and remove elements from an enum in Java at runtime?  For example, could I read in the labels and constructor arguments of an enum from a file?    @saua, it's just a question of whether it can be done out of interest really. I was hoping there'd be some neat way of altering the running bytecode, maybe using  or something. I've also followed up with  because I realised I wasn't totally sure when an enum should be used.  I'm pretty convinced that the right answer would be to use a collection that ensured uniqueness instead of an enum if I want to be able to alter the contents safely at runtime.


I've installed the Arduino IDE but something must have not worked.  When I click the 9-dots at the bottom left of my screen to see all applications, the icon isn't there.  But if I use the file manager and double click on a .ino file, the IDE launches.  After searching here, I did ensure that there is a .desktop file in ~/local/share/applications and that the paths are correct.  What am I missing?  (This is 19.10 Ubuntu)

Being a newbee with Ubuntu, I still struggle quite a lot with setting up desktop icons to my apps.  I am currently trying to setup a desktop icon to Arduino IDE and I don't know enough to properly set it up.  Here's the current setup.  I have installed Arduino-1.6.7 in a folder by that name in my home folder.  At present, the only way I can run it is to go to the terminal, CD to the  Arduino-1.6.7 folder and then run it with $ ./arduino.  This works but obviously, I would rather run it with a simple icon.    I have tried to use  method, but when I browse to /usr/share/applications, there is no icon for Arduino.  Thank you for being part of the village that raises this idiot.


I have read that there is a bug in SSL called heart bleed bug. Has Ubuntu 14.04 shipped along with this bug or has it been resolved in this release?

As of today, a  has been found affecting versions 1.0.1 through 1.0.1f (inclusive) and 1.0.2-beta.  Since Ubuntu 12.04, we are all vulnerable to this bug. In order to patch this vulnerability, affected users should update to OpenSSL 1.0.1g.  How can every affected user apply this update now?


When Voldemort came to kill Harry, Lily put herself between Voldemort and Harry unarmed. Did she do it foolishly* out of love for her child or did she know about Sacrificial Protection that her death could ensure the survival of her child?  *It is foolish in otherwise circumstances because logically her own death couldn't change anything.

In  DVK says, that "Lily's protection magic was triggered by her choosing to die to protect Harry". Has she got or knew anything, that would let her believe, that her sacrifice will save Harry? Or was it -- like JKR says in an interview  -- something, that any normal mother would have done for her child (no magic or mystery involved)?


In Captain America: The First Avenger, Howard Stark introduces Vibranium to us, saying that it's 'a lot stronger than steel, and a third the weight, and it's completely vibration-absorbent'. This is while Steve is trying out the Vibranium shield.  And we all know that when you hit something, the reason it might make a sound, like the ringing of a bell or the sound of a gong, it's because hitting the object causes it to vibrate, thus causing the air around it to vibrate, and so we perceive this as sound. For a bell, the surface is smaller, so it vibrates faster (higher frequency) so the note we hear is higher. For a gong, the vibration frequency is lower, so the note is lower.   Then in Captain America: The Winter Soldier, Bucky Barnes punches the shield in the fight sequence on the bridge, just after he shoots Natasha. And the shield made a sound very similar to a gong.  How is this possible if Vibranium is supposed to absorb all vibration (being completely vibration-absorbent). The shield should not be making any sound at all when hit...

If the shield doesn't vibrate, how could it produce sound? This would necessitate something vibrating to move the air.  The only thing that I can think of that is plausible, is that vibranium is able to quickly dampen vibrations, and isn't just immune to them. This would then allow it to produce sounds.


I found many people like to use "literally" in their sentences . Is that a kind of emphasize? How can I use this word?

We all know that literally is being overused currently. I want to know if literally should only be used in contrast to situations which are normally figurative in common usage. For example:     It literally took him an hour to get here. (not a figurative   expression)      I am literally starving to death. (Figurative expression made literal   because the person is actually starving to death.)   Literally is used for the latter example, correct?


I have heard that we can obtain the source code of Ubuntu and customize it as we wish. But where can I find the source code of Ubuntu, and what languages are used to write Ubuntu?

I am assuming that all application installed through apt-get are open source; but for those that are available in that manner, where can I get the source code for these applications as well as update them?   I have a couple applications I use regularly that aren't being actively developed any longer and I would like to add features. Where would I go to get the rights to update these applications?  In this case specifically, I am referring to the hellanzb package


I work at a weather app. I use a free api to get the weather information. When I try yo run this class i get "null" Why?You can see the json code in the url. It should return "Romania" but it returns "null" and I don't know why.    import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.net.URL; import java.util.HashMap; import java.util.Map; import java.util.Scanner;  import org.apache.commons.io.IOUtils; import org.json.simple.*; import org.json.simple.parser.ParseException;  public class Weather {     public static URL url;      public void getWeather() throws IOException, ParseException {          url = new URL("http://api.openweathermap.org/data/2.5/weatherq=drobeta,romania");          Scanner scan = new Scanner(url.openStream());         String str = new String();         while (scan.hasNext())             str += scan.nextLine();         scan.close();         System.out.println(str);          String genreJson = IOUtils.toString(url);         JSONObject genreJsonObject = (JSONObject) JSONValue.parseWithException(genreJson);         // get the title         System.out.println(genreJsonObject.get("country"));      } }

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