I was confused while looking for the meaning of bi-weekly. Is it twice per week or once per two weeks?

Our company publishes an internal e-newsletter that we call the <Title> Weekly. We're now going to publish every other week, so the title needs to be changed. The first solution that came to mind was <Title> Biweekly, but a few questions on this site have pointed out that "biweekly" is a troublesome word, and we didn't really like the word anyways.  What is a good word to describe a publication that is now publishing less than it used to? Searching around on this site yielded "fortnightly" as an idea, but that doesn't fly as well across the pond. I just learned about the existence of "hebdomadal", but I doubt that "bihebdomadal" would get approved.  Any ideas? It doesn't even have to be a synonym of biweekly; in fact, it'd probably be better if we went in another direction. The publication is publishing less frequently so the idea of scaling back could be in play, but the new format opens the door for a more focused and relevant publication, because we won't be struggling for content week after week. So, a word like "condensed" could be on the table as well. Or, even a word that's better than "regular" to indicate that while it's not as frequent, it's still a regular publication.


Consider the following problem, given without solution in a german abstract algebra text book:     Let $R$ be a commutative ring with $1$ and $K \subseteq R$ a subring,   such that $1 \in K$ and $K$ is a field.      Show that for each $r\in R$ there exists a unique ring homomorphism   $\varphi: K \left[X\right] \rightarrow R$, such that $\varphi(a) = a$   for $a \in K$ and $\varphi(X) = r$.       $K\left[X\right]$ is the ring of all polynomials over $K$ with variable $X$.   I do not know at all about how to approach this. This is the beginning of a very introductory course on abstract algebra, and I feel like I'm missing the required tools here. How can this be proven?

I am studying from Patrick Morandi's Field and Galois Theory, and I am stuck on Problem 6 from Section 1 (on page 13).     Verify the following universal mapping property for polynomial rings:         Let $A$ be a ring containing a field $F$. If $a_1,\dotsc,a_n \in A$, show that there is a unique ring homomorphism $\varphi \colon F[x_1,\dotsc,x_n] \to A$ with $\varphi(x_i) = a_i$ for each $i$.       Moreover, suppose that $B$ is a ring containing $F$, together with a function $f \colon \{ x_1,\dotsc,x_n \} \to B$, satisfying the following property: For any ring $A$ containing $F$ and elements $a_1,\dotsc,a_n \in A$, there is a unique ring homomorphism $\varphi \colon B \to A$ with $\varphi(f(x_i)) = a_i$. Show that $B$ is isomorphic to $F[x_1,\dotsc,x_n]$.      The  for the book says that we must assume that all the rings are commutative and the ring homomorphisms are $F$-homomorphisms (that is, they are ring homomorphisms that fix $F$).    I have proved the first part as follows: let $\mathbf{a} = (a_1,\dotsc,a_n)$. The evaluation map $\operatorname{ev}_\mathbf{a} \colon F[x_1,\dotsc,x_n] \to A$ given by $\operatorname{ev}_\mathbf{a}(f) = f(a_1,\dots,a_n)$ is an $F$-homomorphism with $\operatorname{ev}_\mathbf{a}(x_i) = a_i$ for each $i$. Moreover, if $\varphi$ is any $F$-homomorphism from $F[x_1,\dotsc,x_n]$ to $A$ with $\varphi(x_i) = a_i$, then we must necessarily have that $$ \begin{align} \varphi\left( \sum_{k_1,\dotsc,k_n} c_{k_1,\dotsc,k_n} x_1^{k_1} \dotsm x_n^{k_n} \right) &= \sum_{k_1,\dotsc,k_n} c_{k_1,\dotsc,k_n} \varphi(x_1)^{k_1} \dotsm \varphi(x_n)^{k_n}\\ &= \sum_{k_1,\dotsc,k_n} c_{k_1,\dotsc,k_n} a_1^{k_1} \dotsm a_n^{k_n}\\ &= \operatorname{ev}_\mathbf{a}\left( \sum_{k_1,\dotsc,k_n} c_{k_1,\dotsc,k_n} x_1^{k_1} \dotsm x_n^{k_n} \right). \end{align} $$ Thus, the existence and uniqueness of $\varphi$ has been established.    I am stuck in proving the second part. From the previous result, we have a unique $F$-homomorphism $\Phi \colon F[x_1,\dotsc,x_n] \to B$ given by evaluation at $(f(x_1),\dotsc,f(x_n))$, and my intuition is that this is the required isomorphism. But I am not able to make much progress.  To show that $\Phi$ is injective, the idea I have in mind is as follows: given $0 \neq g \in \ker(\Phi)$, choose the ring $A$ and elements $a_1,\dotsc,a_n$ in such a way that $g(a_1,\dotsc,a_n) \neq 0$, thereby arriving at a contradiction. To show that $\Phi$ is surjective, my intuition is that the uniqueness of the map $\varphi$ should play a role, since we will have used only the existence in showing injectivity.  Am I on the right track? I haven't been able to convert these thoughts into a proof yet, and I would really appreciate some hints. Thanks in advance!


At the start of Harry Potter and the Goblet of Fire, how was Alastor Moody captured?  Why was he able to be captured by Wormtail and Barty Crouch Jr?  After all Alastor Moody was the most powerful Auror, and single-handedly captured dozens of Death Eaters.  Also, didn't he place protective enchantments around his own home?

I had always assumed that it was a struggle to capture Mad-Eye Moody, one of the most powerful and paranoid ex-Aurors in the history of the Ministry.  Following on from this  it seems like Mad-Eye was overwhelmed quickly and quietly:     Wormtail and I did it. We had prepared the Polyjuice Potion beforehand. We journeyed to his house. Moody put up a struggle. There was a commotion.... I was ready to face Arthur Weasley when he arrived to sort out the Muggles who had heard a disturbance. I made the dustbins move around the yard.   To my knowledge, the dustbins moving were the only thing that alerted Arthur, or anyone else, to the commotion. Unless I'm misunderstanding, Wormtail and Crouch Jr incapacitated Moody without any noise, and then set off the bins... But this doesn't make sense.  What am I missing?


I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I have installed Ubuntu 11.10 alongside Windows 7. Now I want to uninstall Ubuntu, but I want my Windows 7 to be safe, i.e. intact with applications and documents in Windows.   I have not used Wubi, just installed alongside Windows. I am a new user.  Please help me and tell me how to uninstall Ubuntu 11.10 while preserving my Windows installation.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I am a GIS Analyst with one years experience and no idea where to begin with professional development. I'm competent with the ArcGIS platform, but I am not too familiar with its administration processes. I can work with basic Python programming. I'm taking a course in SQL next week, and I'm pretty terrible with web services.  Where/How/What should i focus on learning to step up to the next level in a GIS career.

I am keen to make a career in GIS.   What should I work upon to possess the adequate skills and can you recommend some good colleges for a GIS-oriented Postgraduate course?


I tried installing qt*, qt-sdk, qt5* and qt4* but none of them will even try to do anything besides vomiting errors all over the system! I'm trying to use VLC and VirtualBox but VLC complains about:   [0000562c635bed38] skins2 interface error: no suitable dialogs provider found (hint: compile the qt4 plugin, and make sure it is loaded properly) [0000562c635bed38] skins2 interface error: cannot instantiate qt4 dialogs provider   and then VLC drops to a totally useless shell  And VirtualBox throws   VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/usr/lib/virtualbox/VirtualBox.so",) failed: libQt5Core.so.5: cannot open shared object file: No such file or directory   and won't even open  What's the problem and how can I fix it?  PS: I have all the deps for all the programs!

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


in his paper "" he begins by introducing the : $$H\left (q,\frac{\partial{S}}{\partial{q}} \right)=E\tag{1}$$ such that $S$ is Hamilton's characteristic function (usually denoted $W$). Then he performs the Ansatz $$S=K \ln\psi\tag{2}$$ and writes the hamiltonian explicitly to arrive to the following equation: $$\frac{(\nabla\psi)^2}{2m}-\frac{2m}{K^2}\left (E+\frac{e^2}{r} \right)\psi^2=0.\tag{1"}$$ so far so good, I understand the steps. but then he integrates the equation over all space and regards it as a functional to be minimized, he writes (Equation (3) in the paper): $$\delta J=\delta \int dxdydz \left[ \frac{(\nabla\psi)^2}{2m}-\frac{2m}{K^2} \left (E+\frac{e^2}{r} \right)\psi^2\right ]=0\tag{3}$$ and by performing the variation "The Standard way" as he writes in German: he gets the well known form for the Schrödinger equation for the Hydrogen Atom. (equations (4) and (5) in the linked paper.) I understand how to perform the variation, but why did he define such a functional in the first place? why is the volume integral over the eigenvalue problem a functional to be minimized?

The  is the basis to understanding quantum mechanics, but how can one derive it? I asked my instructor but he told me that it came from the experience of Schrödinger and his experiments. My question is, can one derive the Schrödinger equation mathematically?


I have a base class A and a derived class B.  class A { public:     int x;     virtual int getX() {         return x;     } };  class B : public A { public:     int y; };   The virtual function is there just to make it polymorphic. Next i declare a list of A's but put B's inside:  vector<A> list; B b1,b2; b1.y = 2; b2.x = 10;  list.push_back(b1); list.push_back(b2);   Now i want to go over all elements on the vector and access the y member (which only B's have):  for (auto it = list.begin(); it != list.end(); ++it) {     B &cast = dynamic_cast<B&>(*it);     int value = cast.y;     std::cout << value << std::endl; }   This code gives a runtime error. Any idea how can i do the cast and access y?

Someone mentioned it in the IRC as the slicing problem.


I have a laptop thinkpad L450. Having 3 USB port which are identical with SS symbols and color (black). But I have want to know if they are actually USB 3 or its just a normal USB? Here is the image of my Device Manager As shown in the pictuere its showingf only one USB 3.0 on right, but how are they showing same symbols. As per  SS are USB 3

In my laptop (a Lenovo y470 ) there are three USB ports. One of those is USB 3.0 others are USB 2.0 . I do not know which one is what. When I copy data from my External HDD it transfers at 38MB/s from all of the USB ports. (Which is a good speed for USB 2 transfers, but to low for USB 3).  I used the device manager to confirm that I have one USB 3.0 port.    Is there a way a can figure out which port is 3.0 ?


I am taking English Language Studies as my bachelor's. It happened when one of our subjects' professor, Advanced English Grammar professor, said that the sentence "each person should do their own work" is not logical to say because of "their"'s usage -- or it is grammatically wrong based on prescriptive grammar's view. I think I kind of get it, but I am not satisfied nor convinced with her explanation. Can someone justify why or why not it is not logical? Thank you!

Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end.


I unwrapped this cube and applied a grid texture into it. Then i Enabled [Textured Solid] Option from N panel. But It now showing textured on the display. I am not understanding , what is wrong with me and my blender [2.72]

I have added some textures to objects in blender but the textures don't show up until I render the file. it can be difficult to know what the objects look like without rendering it. is there a way to have textures show in the editor even if they are at a lower res?  In editor:    Rendered:


The use of the option smooth in combination with the text decoration option gives the error "Dimension too large" Is this bug already known? What can I do? Short example code is given below.  \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{decorations.text} \begin{filecontents}{data.txt} 7.06215e+08 4.023e+07 7.0587e+08  4.026e+07 7.1787e+08  4.002e+07 7.3473e+08  3.93e+07 7.52415e+08 3.873e+07 \end{filecontents}  \begin{document}     \begin{tikzpicture}         \begin{axis}[   xmin=680, xmax=940, ymin=30, ymax=110,  width = 0.5\linewidth,  ]          \addplot+[smooth,draw = red ,mark=none,           decoration={text along path,    text={9 dB},raise=.5ex,text align={center}},  postaction={decorate}         ] table[x expr= (\thisrowno{0}/1000000), y expr= (\thisrowno{1}/1000000),comment chars = !]{data.txt};               \end{axis}     \end{tikzpicture}  \end{document}

I would like to draw a squiggly line with an arrow somewhere in the middle of it. TikZ has a pathmorphing decoration that draws a squiggly line and a markings decoration to place an arrow tip. So a solution would be to use them together:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations,decorations.pathmorphing,decorations.markings} \begin{document}  \begin{tikzpicture}  \draw[          decoration={snake},          decorate,          postaction={decoration={markings,mark=at position 0.6 with {\arrow{>}}},decorate}      ]         (0,0) -- (2,0); \end{tikzpicture}  \end{document}   Unfortunately this does not work and results in  ! Dimension too large. <to be read again>                     \relax  l.11         (0,0) -- (2,0);   I suspect there is an infinite recursion going on somewhere.  Is there a workaround? If not, is there a different simple solution to the problem?  (Note: This is probably related to my previous question )


I compile the code like so: c++ .\Run.cpp .\Vector.cpp The Vector.cpp and the Vector.h are in the same folder.. I've seen many threads about this problem, but they didn't help, im sure that there is a miniature problem but i can't see it... Thank you for the help!  This is the Vector.h  #ifndef VECTOR_H #define VECTOR_H #include <iostream>  template <class T> class Vector { private:     T *data;     size_t size;  public:     Vector() : data(nullptr), size(0) {}     Vector(const Vector<T> &v);     ~Vector();     Vector<T> &operator=(const Vector<T> &v);      void push_back(T el);     void push_front(T el);     void erase(size_t i);     void clear();      bool contains(T el);     T &operator[](size_t i);     size_t length(); };  template <class T> std::ostream &operator<<(std::ostream &os, const Vector<T> &v);  #endif   This is the Vector.cpp  #include "Vector.h" #include <iostream>  template<class T> size_t Vector<T>::length(){     return size; }  template<class T> T &Vector<T>::operator[] (size_t i){     return data[i]; }  template<class T> Vector<T>::Vector(const Vector& v) {     data = new T[v.size()];     for (size_t i = 0; i < v.size; i++)     {         data[i] = v[i];     }     size = v.size(); }  template<class T> Vector<T> &Vector<T>::operator= (const Vector& v){     if(this != &v){         delete data;         data = new T[v.size];         for (size_t i = 0; i < v.size; i++)         {             data[i] = v[i];         }         size = v.size();     }     return *this; }  template<class T> Vector<T>::~Vector(){     delete data; }  template<class T> void Vector<T>::push_back(T el){     T* newData = new T[size+1];     for (size_t i = 0; i < size; i++)     {         newData[i] = data[i];     }     newData[size] = el;     size++;     delete data;     data = newData; }  template<class T> void Vector<T>::push_front(T el){     T* newData = new T[size+1];     for (size_t i = 0; i < size; i++)     {         newData[i+1] = data[i];     }     newData[0] = el;     size++;     delete data;     data = newData; }  template<class T> void Vector<T>::erase(size_t _i){     T* newData = new T[size-1];     for (size_t i = 0, j = 0; i < size; i++, j++)     {         if(i == _i){             i--;             continue;         }         newData[i] == data[j];     }     --size;     delete data;     data = newData; }   The run.cpp  #include "Vector.h" #include <iostream> using namespace std;  int main(){     Vector<int> v;     v.push_back(4);     cout << v << endl;     return 0; }   The errors:  undefined reference to Vector<int>::push_back(int), undefined reference to std::ostream& operator<< <int>(std::ostream&, Vector<int> const&), undefined reference to Vector<int>::~Vector(), undefined reference to `Vector::~Vector()'

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I have a input that the user types in something Example  Test = input( 'Type in something' ) if Test == 'SOMETHING' :     print( 'You idiot!' )   How do I ignore the if the word something is in all caps or non caps example: Something SOMETHING SoMeThinG  Sorry My Grammar is so bad It's hard to word these things

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


when i run   $ ls -R / &    although the & (which suppose to relegate the process into the background) i end up having to sit through the entire listing of my system. pressing CTRL+C or CTRL+Z doesn't help. what am i doing wrong?

I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to terminate its process, then re-run the command. How can I terminate it?  I haven't closed its shell window. But as you know it doesn't stop using Ctrl+C and Ctrl+Z.


This question is founded in . I originally solved the problem years ago but now I'm moving all the problems over to a new language. As I revisit this problem, I already know the answer but I don't know when to stop looking for the answer.  The task itself, minus lead up and notes, is      Find the sum of all numbers which are equal to the sum of the   factorial of their digits.   The task of summing factorials is trivial. What isn't obvious to me is how do I know when I've found them all? I don't want to give away the answer to the question but here's what I know:      I know that there are only 2 of these numbers: 145 as mentioned in the questions example and 40585.   When do I know to stop looking? How do I know that the biggest of these numbers is THE biggest and there won't be any more?

145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find   the sum of all numbers which are equal to the sum of the factorial of   their digits. Note: as 1! = 1 and 2! = 2 are not sums they are not   included.   So I tried a random enough large upper bound (100000) in my program and it worked.  I deleted this part to not spoil the answer  My question is : How to find the closest upper bound using a mathematical approach ?


I want to calculate : $$\lim\limits_{x \rightarrow 0}\left(\frac{1}{\sin(x)} - \frac{1}{x}\right)$$ with l'Hôpital's rules. I get $$\lim\limits_{x \rightarrow 0}\left(\frac{1}{\sin(x)} - \frac{1}{x}\right) = \lim\limits_{x \rightarrow 0}\left(\frac{x-\sin(x)}{x\sin(x)}\right) = \lim\limits_{x \rightarrow 0}\left(\frac{1-\cos(x)}{\sin(x)+x\cos(x)}\right)$$ but I don't see useful next steps.

Find the limit:   $$\lim_{x \rightarrow 0}\left(\frac1x - \frac1{\sin x}\right)$$  I am not able to find it because I don't know how to prove or disprove $0$ is the answer.


I have a method:    add(int x,int y)   I also have:      int a = 5; int b = 6; string s = "add";   Is it possible to call add(a,b) using the string s?

I know in php you are able to make a call like:  $function_name = 'hello'; $function_name();  function hello() { echo 'hello'; }   Is this possible in .Net?


I'd like to delete my private beta account on world building. However, the delete link on the profile page is not there. Is this a bug or is it intentional?

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


I see hats in the main message window and near the input text field.    But no hats in the user list (right top corner) in the :

There appears to be a bug in the chatroom code - my hat is not showing on the chat room list of occupants:     It is correctly showing in the message list:    My question is not a dupe of :  As you can see one avatar has a hat and the other doesn't. They should either both have a hat or neither should have a hat ;)


I'm using revtex4 as my document class and apsrev4 as my bib style. I would like to remove the horizontal black line above the references.   How can I do this? Here's what I have without the text:  \documentclass[aps,12pt,tightenlines]{revtex4-1}  \usepackage{graphicx,topcapt,booktabs,SIunits,units,mhchem}   \begin{document} \bibstyle{apsrev4} \bibliography{research}  \pagestyle{plain}      \end{document}

When generating my LaTeX document (RevTex 4.1) using TeXShop on Mac OSX 10.10.3 the document generates a rather ugly line above my references but below the section heading.    This is the code I am using to generate my references:  \documentclass[% reprint, amsmath,amssymb, aps, floatfix, ]{revtex4-1} \usepackage{graphicx}% Include figure files \usepackage{dcolumn}% Align table columns on decimal point \usepackage{bm}% bold math \usepackage{gensymb} %symbols eg. \degree \usepackage[numbered]{Files/mcode} %Allow import of MATLAB code  \begin{document} %References \clearpage %Put references on separate page \onecolumngrid %Make references entire page \section{References} \bibliography{Files/Bibliography.bib} %"bibliography" -> bibliography file name \end{document}   Any help is removing this line or getting a prettier line would be much appreciated!


I know that charging a capacitor only moves particles from one plate to the other, so the total amount of charge in the capacitor does not change, nor does the total number of particles. However, the charged capacitor does have electrical energy that the uncharged capacitor does not have, and energy has a mass equivalence according to $e=mc^2$, so wouldn't the capacitor weigh a little bit more when charged? A 470 μF capacitor charged to 3.3 V, for instance, would have a stored energy of , which has a mass equivalence of , which is the weight of ~1,416,666 carbon atoms? Likewise, a superconducting loop inductor would weigh slightly more when it is  (has a current flowing through it) vs unenergized because of the mass equivalence of the energy stored in the magnetic field?

If so, how much? Is it possible to detect it, or is it beyond any measurement?  I'd say there are two possible scenarios (depending on the battery type) and both seem interesting:   The battery reacts chemically with its environment. The battery doesn't exchange any matter with its environment except electrons. I suppose there should be some difference at least due to the principle of energy-matter equivalence, but the difference is most likely immeasurable.


I'm currently working on the Breusch-Pagan Test using RStudio through the command ncvTest. I've used the dataset pipeline.txt in the alr3 package; the model I've fit is:   mod1 <- lm(Lab~Field)   I've also done the residual plot to look at the shape of residuals to have information about the variance and I've obtained that there should be some trace of non constant variance. To sustain this assumption, I've performed the ncvTest and these are my results:   ncvTest(mod1)      Non-constant Variance Score Test     Variance formula: ~ fitted.values      Chisquare = 29.58568    Df = 1     p = 5.349868e-08   My question is: how do I read these results?

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


Let $X \sim N(0, 1)$ and let $Y$ be a random variable with density  $$p_{Y}(t) = \begin{cases} te^{-t^2/2} & \text{ if } t \geq 0 \\ 0 & \text{otherwise.}\end{cases} $$  How can I find the distribution of $X \cdot Y$, assuming $X$ and $Y$ are independent? Can I just multiply the two densities together? I tried a lot of things, like working backwards from $P(X \cdot Y \leq t)$ and then trying to plug in the densities of $X$ and $Y$, but I got nowhere. Can someone please help me?

Could anyone please indicate a general strategy (if there is any) to get the PDF (or CDF) of the  product of two random variables, each having known distributions and limits?   My particular need is the following: Let $w :=u \cdot v$. The PDF of $u$ is $$\frac{1}{\pi u}\frac{1}{\sqrt{u^2-0.25}},$$ for $z>0.5$ and the PDF of $v$ is $$\exp\left(-\frac{v}{v_0}\right),$$ for $v_1<v<v_2$. What's the PDF of $w$?


Is there any way I can block only a specific program/installer (e.g Bluestacks) from being installed in my Windows 10 computer? I want myself to be not able to unblock the software.

I am looking for an unbreachable way to disable the games running on my PC. Even games which require quite a low amount of graphics say 256MB should not work. It is to put restriction on gaming on my PC. I have a graphics card of 1GB and  2GB RAM and a processor of 2.7GHz with Windows 7.  Can we prevent a process from running if it takes a certain amount of graphics memory greater than a value set by user? I mean can we put restriction on games on the basis of the amount of graphics memory they use. Also the method should be applicable to all games (ignoring the chess and other small games like that. Even if it gets blocked, then also no problem.  This is to prevent myself from playing games. But I need other software (non game) to run properly.


In Captain America: The Winter Soldier, it's revealed that in the Marvel Cinematic Universe (MCU), there was an Operation Paperclip at the end of World War II, just as .  In the MCU, the Soviet Union counterpart to Paperclip created the Winter Soldier, so the real world projects ended up having super-science ramifications in the MCU.  On the American side of this, we see the SSR (and later S.H.I.E.L.D.) absorb these scientists and their super-science accomplishments, but what about the Soviet Union?  Did the Soviet Union (and the countries it later split into) have a S.H.I.E.L.D. equivalent?  What did they accomplish, besides the Winter Soldier?

In the film Captain America: The Winter Soldier, a flashback explains how     Bucky was 'recovered' after his fall from the train.   I can't recall whether it is explicitly stated that he fell into the custody of the Soviet Union, but I know this to be the case in the 616 and he speaks Russian in the film.  The bunker under Camp Lehigh contains      Arnim Zola, who provides a piece of expository dialogue describing how he was acquired through "Operation Paperclip", colloquially known in Europe as The Brain Drain.   At the conclusion of WWII, Europe was divided up between what would eventually become the EU and the USSR. In order to keep players off the table, a great number of European 'assets' were repatriated as Americans:     Arnim Zola being one of them, and it is implied that the Winter Soldier is another.   If the Winter Soldier was already a Soviet asset, how have HYDRA (a German/American brain-drain coalition of Fascism) come to be in possession of him? If the Soviets created the Winter Soldier as a weapon against American-Intelligence/HYDRA/SHIELD, why is he fighting on their side? does the film explain this at all, or have I missed something?


Verify that 4(29!)+5! is divisible by 31. How do I work this out? Step by step explanation please!

Verify that $4(29!)+5!$ is divisible by $31$  I know I have to use Wilsons theorem: $(p-1)!=-1\pmod p$ but I'm not really sure how to apply this theorem. Step by step explanation please? Thank you!


For example, if something happened in the pre-Christian era, is it a   pre-Christian-era event, or pre-Christian era event   To give another example -- we say "low-sodium diets", but would you say that a menu is "low-sodium-based"? It feels over-hyphenated.

For example, "file system" and "related". Is it "file system-related"? It will appear as if it is a compound of "file" and "system-related", won't it?


Please look at this block of code:         List<int> list = new List<int>();         list.Add(1);         list.Add(6);         list.Add(2);         list.Add(3);         list.Add(8);         list.Sort((x, y) => x.CompareTo(y));         int[] arr = list.ToArray();         foreach (var i in arr)         {             Console.WriteLine(i);         }  I know that when executed, the code above will print the list in ascending order. If I switch the positions of x and y in "x.CompareTo(y)", then the list will be sorted in descending order instead. I know what CompareTo() does, but here how does it work with x and y to decide the order of sorting? what does x and y represent here?

I just came over this syntax in some of the questions in this forum, but Google and any other searchengine tends to block out anything but letters and number in the search so it is impossible to search out "=>".  So can anyone tell me what it is and how it is used?


I need to get the row with latest date in my table. I have tried using where rownum = 1 as well as using max function but I dont seem to get the correct result.   This is what I have tried, this gives me more than one rows, I want the row with the max date:  SELECT * FROM (SELECT col1,col2,coldate3,max(colDate3)  over (partition by coldate3) max_date FROM MY_TABLE  WHERE  TRIM(col1) = TRIM('abc')  AND TRIM(col2) = TRIM('efg') ) where coldate3= max_date;   I have also tried this, this gives me the max date but value of col1 is of some other row:   SELECT MY_TABLE.TARIFF  FROM MY_TABLE  WHERE ROWNUM = 1  AND TRIM(MY_TABLE.col1) = TRIM(:ls_col1)  AND TRIM(MY_TABLE.col2) = TRIM(:ls_col2)  ORDER BY coldate3 desc   What am I doing wrong.

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


I created a Ubuntu 14.04 instance on AWS, installed apache2 (via apt-get) and wordpress and everything was working fine until I tried to attach an elastic ip address to it.  At that point I lost connection through http.  I can still connect via ssh and can ping the server, but upon further inspection, discovered the server is returning a 301 and redirecting to the old public dns name.  Where is this redirect coming from?  I have no .htaccess files.

I've got a Wordpress site on our home intranet that has run into trouble now that the IP address has changed - The index page loads, but not the CSS and I can't log in to the site administration panel.  Unfortunately I am a bit behind on backups. Is there a way to get Wordpress to refer to the new IP address?


Does it make a difference against birthday attacks if the algorithm that I am using is 512 bit hashing?

I know that 512 bit hashing is more secure, but I don't really know why. I hope someone can help me to better understand it in more detail.


Does a component exist that functions as a switch for multiple connections at once, 3 in my case.  So power, ground, and data are coming in from the top. When the switch is in the left position (as pictured) they will get connected to the power, ground, and data lines on the left side. When the switch is flipped to the right position all 3 power, ground, and data are moved over to their respective matches on the right side.  Essentially it's like having a 3 switches, one each line and flipping them all at the same time.

I am trying to mod my arcade stick so I can switch two commonly swapped buttons on the controller.  Essentially they are simple 2 terminal momentary switches connected directly to the controller PCB. I would like to switch their responsibilities, so in my case the Back button and the LB button on the XBox pcb I would like to swap so the Back actuates the LB button on the PCB and the LB actuates the Back button.  My assumption is that I would need a switch with 8 terminals, 4 in 4 out.  What type of switch am I looking for?


amount is having diff after multiplying with 100  $amt = 33.48; echo "$amt: ".gettype($amt); $amount = $amt* 100; echo "\n$amount: ".gettype($amount); echo "\n"; $arr = array($amount); print_r($arr); echo "\n".json_encode($arr);   output   33.48: double 3348: double Array (     [0] => 3348 )  [3347.9999999999995]   live   How 3348 became 3347.9999999999995 ?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Let $R$ be a ring and $S_i$ be the subrings of $R$ such that $R = S_1 \cup S_2$. Prove that $R = S_1$ or $R = S_2$.   I am not exactly sure what to do here. If I want to proceed with letting $R \neq S_1$  and show that $R = S_2$, what should I do? Also, proof by contradiction isn't making sense to me in this case, since if we let $R = S_1 \cup S_2$ then $R \neq S_1$ and $R \neq S_2$, now what? I don't think it can be this trivial: Since we are given with $R = S_1 \cup S_2$ And, therefore, $R = S_1$ or $R = S_2$, which is a contradiction, can it? I am all out of clues. Any help would be much appreciated.   Edit: Ok I see that similar questions have already been asked here before, but those didn't clear up my confusions, and I don't think it'd be polite to comment or ask anything on there. Also, I think my approaches are slightly different than their's.

Suppose $G=H\cup K$, where $H$ and $K$ are subgroups. Show that either $H=G$ or $K=G$.  What I did: For finite $G$, if $H\neq G$ and $K\neq G$, then $|H|,|K|\le |G|/2$. But they clearly share the identity element, so $H\cup K\neq G$.  How can I extend it to $G$ infinite?


I am using the concmath package (ultimately I only need the concrete font in the math environments but lets do it globally for now). My issue is: In the math environment I get a pixelated font. See this picture  This is the mini example I do for the result: \documentclass[english]{article}  \usepackage[latin9]{inputenc} \usepackage{concmath} \usepackage[T1]{fontenc}  \makeatletter  \makeatother  \usepackage{babel} \begin{document} Hey!$\lambda\beta\gamma\langle\psi\rangle$ \end{document}  Any idea how to fix this? Thanks a lot in advance!

I would like to use the Concrete Math font in LaTeX, which is a bitmap font. The rendering with pdflatex is naturally poor-quality with jagged edges.  My solution so far has been to generate a DVI file and then convert to PDF using Linux's dvipdf. This tool effectively traces and smooths the edges of the glyphs and the end result is beautiful. However, using the DVI output format (with latex) causes a host of other problems with including figures, etc. For instance, you can't include .png or .pdf figures when using plain LaTeX.  Is there a way to somehow get the same bitmap font-smoothing effect in pdflatex? or via an intermediate format that still allows you to include at least .png figures?


I have a lot of magic cards from year 2009-2000 and i want to sell them but i dont know which one of my cards have value but i dont know if there is a website that has a list of old mtg cards that still has monetary value or can be sold.

I played for quite a few years and have a ton of cards that I want to get rid of. I have a mix of all editions before 2007. 7th, 8th, etc...  So the question is where can I sell them effectively. And if it is better to just get all rares out, and then sell the rest as a lot at a common hobby store.  Thanks for the feedback!


I'm looking for a way to detect if a Windows Installer installation is already in progress. What I've found out so far is:   Checking the Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress Using the Windows Installer API function MSIInstallProduct with a dummy file which then would return the specific error code.   Does anybody know a smarter solution?

Assuming I'm trying to automate the installation of something on windows and I want to try to test whether another installation is in progress before attempting install. I don't have control over the installer and have to do this in the automation framework. Is there a better way to do this, some win32 api?, than just testing if msiexec is running?  [Update 2]  Improved the previous code I had been using to just access the mutex directly, this is a lot more reliable:  using System.Threading;  [...]  /// <summary> /// Wait (up to a timeout) for the MSI installer service to become free. /// </summary> /// <returns> /// Returns true for a successful wait, when the installer service has become free. /// Returns false when waiting for the installer service has exceeded the timeout. /// </returns> public static bool WaitForInstallerServiceToBeFree(TimeSpan maxWaitTime) {     // The _MSIExecute mutex is used by the MSI installer service to serialize installations     // and prevent multiple MSI based installations happening at the same time.     // For more info: http://msdn.microsoft.com/en-us/library/aa372909(VS.85).aspx     const string installerServiceMutexName = "Global\\_MSIExecute";      try     {         Mutex MSIExecuteMutex = Mutex.OpenExisting(installerServiceMutexName,              System.Security.AccessControl.MutexRights.Synchronize | System.Security.AccessControl.MutexRights.Modify);         bool waitSuccess = MSIExecuteMutex.WaitOne(maxWaitTime, false);         MSIExecuteMutex.ReleaseMutex();         return waitSuccess;     }     catch (WaitHandleCannotBeOpenedException)     {         // Mutex doesn't exist, do nothing     }     catch (ObjectDisposedException)     {         // Mutex was disposed between opening it and attempting to wait on it, do nothing     }     return true; }


I'm trying to run a package installer from terminal and have it complete with limited interaction from the user. This will need to be ran on any computer.  The bash script I have so far is:  sudo installer -store -pkg "/Users/username/Desktop/test.pkg" -target /   It will not complete and I am getting the following error: installer: Can't load package "/Users/username/Desktop/test.pkg": The requested URL was not found on this server.  Not sure what this error means as I'm a newbie to scripting. Please advise what is needed to fix this.

Is it possible to install a .pkg using a terminal ? (I wanted to install an app through ssh).


I have a Gigabyte Q2550M laptop with 2GB (1333 Mhz) and now i want to add another 4GB (1600 Mhz) ram to have a total of 6Gb RAM, but now the laptop wont boot. However, when i add the Original 2GB (1333 Mhz) to the second RAM slot, the laptop doesn't want to boot as well. What could be the problem?

I currently have 2x1GG 1333MHz DDR3 strips. I plan to purchase a further 2x4GG 1600Mhz strips. Will I be able to use both sets of RAM in my PC together? Will they both be limited to 1333Mhz?   Old RAM: Corsair cm3x1024-1333c9dhx New RAM:  Motherboard:


There are two approaches by which solution to multiple linear regression are obtained. One is maximum-likelihood in which it is assumed that erorr $\epsilon$ is normally distributed and other is by directly equating the derivative of residual sum of squares (RSS) to zero. What is the reason that two approaches give similar solution, I MLE approach is more restrictive than RSS approach, but still the solution is similar. What am I missing?

I am new to Machine Learning, and am trying to learn it on my own. Recently I was reading through  and had a basic question.   Slide 13 says that "Least Square Estimate is same as Maximum Likelihood Estimate under a Gaussian model". It seems like it is something simple, but I am unable to see this. Can someone please explain what is going on here? I am interested in seeing the Math.   I will later try to see the probabilistic viewpoint of Ridge and Lasso regression also, so if there are any suggestions that will help me, that will be much appreciated also.


All I'm trying to do is use SelectLayerByAttribute to select all lines less than 5.1 meters. However, no matter what query I try I keep getting "error 000358 invalid expression" when I run the script as a tool. I have already tried using various combinations of escape characters and string concatenations like ' \"Shape_Length\" < \'5.1\' ' and '\"Shape_Length\" <' + '5.1'. I've also have tried putting Shape_Length in {}'s.  I tried doing the same query in the python window in ArcMap and all I have to do is "Shape_Length < 5.1" and it works just fine. I've never been so stumped. Anyone have anymore ideas on what to try?  import arcpy import os from arcpy import env from arcpy.sa import * from arcpy import da  arcpy.env.overwriteOutput = True arcpy.SetLogHistory(False) arcpy.CheckOutExtension("spatial")  og_polyline = arcpy.GetParameterAsText(0) polyline =arcpy.CopyFeatures_management(og_polyline,r"in_memory/lines")  layer=arcpy.MakeFeatureLayer_management(polyline,"thelayer.lyr")  calc_fields=["SHAPE@","OBJECTID"]  norepeatlist=[]  query="Shape_Length < 5.1"  arcpy.SelectLayerByAttribute_management(layer, "NEW_SELECTION", query)

My script takes separate 3D feature classes, calculates a field, appends to a target feature class, and then deletes the originals. This is a huge data processing task of over 4700 mass point feature classes appending to a single one. I know it was a big mistake to put so many feature classes into SDE, but given they're in there now, I've got to deal with them there (yes, the sheer fc count is bringing SDE performance to its knees--hence my urgency).  Early on it worked great, in that the merged result showed valid z-values. I was able to build a terrain and it looked great. I'd been running this in the background for weeks, and have just noticed z-values of 0 in the output, where the originals were not 0! Oh no!!! I'm certainly glad I still have the file-based originals!  Pseudocode:     An in_memory feature class is created from a z-aware template      For each fc in the feature dataset:            It is appended to the empty in_memory fc          The TILE_ID field is calculated using a portion of the name of the source fc           It is then appended to the target SDE fc          The in_memory feature class is emptied          Each processed fc is then deleted     When I initially posted, I was curious if it was my use of in_memory that caused this trouble. I had not initially been using it, and only switched to it because performance was far too slow otherwise, and WAY faster in_memory. To find where trouble started, I ran the Add XY Coordinates tool, which proved the trouble started with in_memory use. At that time I had also switched from CalculateField_management to da.UpdateCursor, so that's likely the bigger reason for the performance enhancement. I will now change my code to avoid in_memory.


The wizarding bank Gringotts is run by goblins.  We also know that there are goblin artisans because some of the artifacts such as the sword of Godric Gryffindor are goblin made. Do the goblins have any other career choice ? Or is the population of the species small enough that all of them can be employed by these two professions alone ?  EDIT: From the , there are some known goblins in other roles such as a spokes-goblin. But none in any of the classical careers [Healers, Professors]. Is this limitation in career choice due to not being able to use a wand ? As far as I know most wizarding positions seem to rely on use of wand magic. Also, I can't seem to find where they would learn the intricacies of the money business. Are these instructions just passed on word of mouth ?

I am a goblin in the wizarding world, and I just lost my job at Gringotts(FYI, I was NOT fired, I quit first) and I would really like to know if there are any job opportunities that don't discriminate towards goblins.  I need a job soon so would you please help?


I know that when a routine is called, the processor stores the memory address of the code that called the routine so that it knows where to go to continue execution when the called routine “returns.” This address (named the return instruction pointer) is stored on the stack.  I have three questions in mind:   Where in the stack is the Return Instruction Pointer stored? How is the RIP used when a function returns?  and Where should this cause the program to continue execution?

Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster?


As the title say: I don't know the meaning of "complexity"  When I visit a web page of sonar result I would very much want to know how to calculate it.

I'd prefer as little formal definition as possible and simple mathematics.


How can I install pessulus on Ubuntu 12.10? We are currently upgrading hardware and Ubuntu 12.10 supports the multi-touch screen that we're about to use.  When I enter the command apt-get install pessulus in the command line, I get this message:  Reading package lists... Done Building dependency tree Reading state information... Done Package pessulus is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'pessulus' has no installation candidate   What do I need to do to install pessulus? I'd be grateful for any help.

What does the above Error mean? What is an installation candidate?  I was trying to do  sudo apt-get install munin-memcached     and I get this message:  Reading package lists... Done Building dependency tree        Reading state information... Done Package munin-memcached is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package munin-memcached has no installation candidate   I googled for the problem and someone said to do a apt-get upgrade but it still did not solve my problem.


How to calculate the geographic position of an object in sky (Point B)(like an aircraft) from Home Point (Point A) based on only four variables:  Lattitude and Longitude at Home Point, Azimuth at point B, Distance from home point to point B and height of point B?

I would like to know how to find a set of coordinates on a small circle some distance from another point.   For example, lets say A = (39.73, -104.98) #Denver  B = (39.83, -106.06) #point approximately 50 nautical miles away from A along the great circle track to C  C = (40.75, -111.88) #Salt Lake City, approximately 323 nautical miles away from A  How do I get the set of orange coordinates when I don't know the angle but I do know the cross track distance?  For concreteness, lets say the outer points near B have a cross track distance of +- 30 nautical miles and the inner points have a cross track of +- 15nm.  And the points near C have a cross track of +- 25 nm.  Also I have an initial bearing from A to C of -1.34 #radians


I've tried code from other similar questions to mine, but they don't give me the correct output. I have this float number in scientific notation: 1.79555554E+10 The expected output should be: 17955555400 I have tried the following: sprintf('%.0f',floatval(1.79555554E+10)) and i'm getting this output 17955555376 I'm close but not quite there..how do I write my code so that the output would be 17955555400?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have a bug from the SMSManager when I try to send a message with the method sendTextMesasge. It returns me a java.lang.NullPointerException: Attempt to get length of null array.  There is my code :          // Constructs the message         TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);              String myPhoneNumber = mTelephonyMgr.getLine1Number();         String destNumber = taskManager.getHelpCenterNumber();         String message = getResources().getString(R.string.call_me_message) + " " + myPhoneNumber+".";          // Sends the message         SmsManager smsManager = SmsManager.getDefault();         smsManager.sendTextMessage(destNumber, null, message, null, null);   The LogCat receives this message :  08-03 09:59:10.548: E/AndroidRuntime(19825): FATAL EXCEPTION: main 08-03 09:59:10.548: E/AndroidRuntime(19825): Process: com.solarsquareretailer.view, PID: 19825 08-03 09:59:10.548: E/AndroidRuntime(19825): java.lang.NullPointerException: Attempt to get length of null array 08-03 09:59:10.548: E/AndroidRuntime(19825):    at android.os.Parcel.readException(Parcel.java:1546) 08-03 09:59:10.548: E/AndroidRuntime(19825):    at android.os.Parcel.readException(Parcel.java:1493) 08-03 09:59:10.548: E/AndroidRuntime(19825):    at com.android.internal.telephony.ISms$Stub$Proxy.sendText(ISms.java:1428) 08-03 09:59:10.548: E/AndroidRuntime(19825):    at android.telephony.SmsManager.sendTextMessage(SmsManager.java:305) 08-03 09:59:10.548: E/AndroidRuntime(19825):    at com.solarsquareretailer.view.MainActivity.onOptionsItemSelected(MainActivity.java:245)

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?


So I emailed a professor regarding graduate research assistantship and he replied by saying if it is ok for him to forward my email to his graduate student. I said yes and its been a week so I'm trying to get back to him but I'm not sure how to really phrase this email. What would be a good way to phrase a follow up email to the professor?

When needing to ask a professor about something important and potentially delicate, what is an appropriate way to phrase the question or write the email?  Examples include:   Requesting a recommendation letter Asking for exceptions to policy (e.g., ignoring a course prerequisite, rescheduling an exam) Asking if you can do research with them, join a group, get into a program Scheduling a meeting, exam, or defense Letting them know about a change of plans Letting them know about a life event affecting your work or studies (e.g., wedding, funeral, sickness, vacation)


In the video game Dark Souls, a key strategy is to watch for an enemy to start making an attack, such as a melee attack or breath weapon, whereupon you tumble out of the way to avoid the attack. The attack strikes your previous location, and you are unharmed.  Is it possible, within the standard rules of D&D 5th edition, to ready an action to avoid an attack or special attack (e.g. breath weapon) in this manner?

Let's say that a player uses the ready action and says "If a character aims at me with a weapon, I'll use Teleport to move behind cover."  What happens? Does this work? If not, please cite the rules to explain why not.


Obviously, the Starter Set. But when I see the catalog of my game shop I saw there's Dragonfire, Dungeon Masters Guide, and Monster Manual. But do I need all these to have an interesting D&D experience?

I have GM'd several RPGs before that are not D&D (Fate, Deathwatch, Star Wars). We first tried to play D&D using the 3.5 edition and it went horribly — too many books and too many options with no idea of where to start.  I have been told that 5E takes care of all that and is easier and more fun so I want to try that but I would like a definitive list of what I need.  I expect that the kinds of books we need divide up like this:   Rulebook for me as GM Rulebook for players Fluff for everyone Monster book for me as GM   Links to these would be helpful as we got very confused with the 3.5 books — who should use what books confused us.  What other things do we need to play a campaign? I expect things like:   Dice: what kinds and how many of each kind, roughly. Models and maps. Do we need these? Does 5E need models and a grid or can it be played without (which is preferred)?   Is there anything else that we need that I haven't anticipated?


I am looking for a book which tells the story of two worlds.   One of the worlds is very small and the other is very large (relatively to each other). The large one was I think populated with humans.  They try to communicate but the time scale in the two worlds is drastically different: a short time on the large one is orders of magnitude longer on the other one. This means that whatever is passed from one to the other will span generations.  The small world was dying I think.  There was a second book which describes the second phase of their interactions, after both sides understood the time rate difference and its implications.

A book I once owned and read back in late-80's or early-90's that I have not been able to identify title & author for:  It was a SF story concerning tiny native lifeforms, living on either a planetoid or possibly a dead/neutron star, that evolve at a seemingly accelerated time rate. Most of their story is told in the few days of observation (from orbit) by a human expedition to the planet, during which time-frame the race below progresses from stone-age tech level to being more advanced than the human observers, and eventually flying up to meet the humans in small advanced craft powered by micro-singularities... one of which accidentally 'disintegrates' the tip of a human scientist's nose in the process.


In , an user initiated a private discussion for understanding my concern better. (There is a chat window on the 5th comment)  Which badge is required for that?

I've just started getting these messages:     Please avoid extended discussions in comments. Would you like to automatically move this discussion to chat?   Why should one avoid doing this? I think it adds to the site...  (Tagged  in more ways than one!)


I have two tables  Table one: default_sellers_commissions  have:  id value - INT   Table two:  marketplace_saleperpartner  have:  id userID commission - INT default '0.00' commission_id   what I need is after insert a new row in table marketplace_saleperpartner update the marketplace_saleperpartner.commission value with value from default_sellers_commissions.value where the marketplace_saleperpartner.commission_id = default_sellers_commissions.id   So I create a trigger :   CREATE TRIGGER `marketplacedefaultcommission` AFTER INSERT ON `marketplace_saleperpartner` FOR EACH ROW UPDATE marketplace_saleperpartner SET `marketplace_saleperpartner`.`commision` = `default_sellers_commissions`.`value` WHERE `marketplace_saleperpartner`.`comm_id` = `default_sellers_commissions`.`id` AND `marketplace_saleperpartner`.`commision`='0.00';   P.S: for some reason I need the  marketplace_saleperpartner.commision to insert for the first time with value='0.00'  now I am getting this error while trying to insert a new row into table marketplace_saleperpartner   MySql Error: Can't update table in stored function/trigger because it is already used by statement which invoked this stored function/trigger   Any help please ?

I have just started using triggers and one thing that I would need to do is to create a trigger that updates the same table that's inserting the row.  TABLE:  CREATE TABLE `city` (   `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,   `city` varchar(50) NOT NULL,   `country_id` smallint(5) unsigned DEFAULT '0',   `country` varchar(150) DEFAULT NULL,   `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,   PRIMARY KEY (`city_id`),   KEY `idx_fk_country_id` (`country_id`),   CONSTRAINT `city_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=6009 DEFAULT CHARSET=utf8;   Trigger:  DELIMITER $$ CREATE TRIGGER `populate_country_id` BEFORE INSERT ON `city` FOR EACH ROW BEGIN  IF NEW.country_id = 0  THEN     UPDATE city     INNER JOIN country B ON city.country = B.country     SET NEW.country_id = B.country_id;  END IF;  END $$ DELIMITER ;   MySQL is just returning: Can't update table 'city' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.  Is there any way I can make this work?  Thanks everyone!


Let $m_1 ,...,m_k$ be $k$ distinct squarefree integers $\neq 1$ which are pairwise coprime.  Then is $[\mathbb{Q}(\sqrt{m_1},...,\sqrt{m_k}):\mathbb{Q}]=2^k$?  Intuitively, I guess that the statement is true, by observing the result when $k=1,2$, but I have trouble actually proving this for the general case.  What I know is that $\mathbb{Q}(\sqrt{m_1},...,\sqrt{m_k})$ is Galois over $\mathbb{Q}$, so $[\mathbb{Q}(\sqrt{m_1},...,\sqrt{m_k}):\mathbb{Q}]=|\mathrm{Gal}(\mathbb{Q}(\sqrt{m_1},...,\sqrt{m_k})/\mathbb{Q})|$ and every element of $G=\mathrm{Gal}(\mathbb{Q}(\sqrt{m_1},...,\sqrt{m_k})/\mathbb{Q})$ sends $\sqrt{m_i}$ to either itself or $-\sqrt{m_i}$ for each $i=1,...,k$, so $G$ has at most $2^k$ elements.  I think the key of the proof is to prove that if $\phi(\sqrt{m_i})$ is given, then there is always an automorphism $\phi$ of $\mathbb{Q}(\sqrt{m_1},...,\sqrt{m_k})$ having such value of $\phi(\sqrt{m_i})$, and here is where I stuck.  Does anyone have ideas? Any advice or comments will be helpful!  If it is hard to give the answer here directly, then any bibliography for reference is also acceptable.

Take $p_1, p_2, \ldots, p_n, p_{n+1}$ be $n+1$ prime numbers in $\mathbb{P} \subseteq \mathbb{N}$. $\sqrt{p_{n+1}} \notin \mathbb{Q}(\sqrt{p_1}, \sqrt{p_2}, \ldots, \sqrt{p_n})$ seems to be quite clear, but still need a proof. I know some proofs are involved with Galois theory, which is not I want.


when i am changing the case owner for more than 10 records in the case list it is throwing the error : Apex trigger LFIQTriggerForCaseChanges caused an unexpected exception, contact your administrator: LFIQTriggerForCaseChanges: System.LimitException: Too many future calls: 11  I believe we have to do some changes in Trigger. Can you please help?  Trigger :   trigger LFIQTriggerForCaseChanges on Case (after insert,after update) {     /** WK URLs. **/       //String TDGStagingURL = 'link';    //String TDGProductionURL = 'link';     for(Case listCases: Trigger.New)     {         List<Case> caseDetail= [SELECT User_ID__c,Account.Name, CaseNumber,ClosedDate,CreatedDate,CST__c,Description,Origin,Priority,Product__c,Status,Subject,Type,Owner.Name FROM Case where CaseNumber =: listCases.CaseNumber];         for(Case c: caseDetail)         {             List<User> salesidDetail = [SELECT  OW_Employee_ID__c,Name FROM User WHERE Id IN (SELECT OwnerId FROM Case where CaseNumber =: c.CaseNumber)];             if(salesidDetail.size() > 0) {             LFIQNotifyCase.main(salesidDetail[0].OW_Employee_ID__c,c.Account.Name,c.CaseNumber,c.ClosedDate,c.CreatedDate,c.CST__c,c.Description,c.Origin,c.Priority,c.Product__c,c.Status,c.Subject,c.Type,c.Owner.Name,WKProductionURL);             LFIQNotifyCase.main(salesidDetail[0].OW_Employee_ID__c,c.Account.Name,c.CaseNumber,c.ClosedDate,c.CreatedDate,c.CST__c,c.Description,c.Origin,c.Priority,c.Product__c,c.Status,c.Subject,c.Type,c.Owner.Name,WKStagingURL);            }          }     } }   LFIQNotifyCase class :  //Notify LFIQ webservices on changes to CASES object  public class LFIQNotifyCase  {       public static boolean isApexTest = false;      @Future(callout=true)      public static void main(String SFId,String Name,String CaseNumber,DateTime ClosedDate,DateTime CreatedDate,String CSTID,String Description,String Origin,String Priority,String ProductName,String Status,String Subject,String Type,String OwnerName,String ServiceURL)     {          try {                  String result = 'error';                  HttpRequest req = new HttpRequest();                 HttpResponse res = new HttpResponse();                 Http http = new Http();                 req.setEndpoint(ServiceURL + '/InsertSFNotification?UserId='+ (SFId !=null?SFId:'0')+'&ACCOUNT_NAME=' + (Name !=null?Name.replace(' ','%20'): Name) + '&CASENUMBER=' + CaseNumber + '&CLOSEDDATE=' + (ClosedDate !=null?ClosedDate.format('yyyy-MM-dd'): null) + '&CREATEDATE=' + (CreatedDate !=null?CreatedDate.format('yyyy-MM-dd'): null)  + '&CSTID=' + CSTID + '&DESCRIPTION=' + (Description !=null?Description.replace(' ', '%20'): Description) + '&ORIGIN=' + (Origin !=null?Origin.replace(' ', '%20'): Origin) + '&PRIORITY=' + (Priority !=null?Priority.replace(' ', '%20'): Priority) + '&PRODUCT=' + (ProductName !=null?ProductName.replace(' ', '%20'): ProductName) + '&STATUS=' + (Status !=null?Status.replace(' ', '%20'): Status) + '&SUBJECT=' + (Subject !=null?Subject.replace(' ','%20'): Subject) + '&TYPE=' + (Type !=null?Type.replace(' ', '%20') : Type) + '&OWNERNAME=' + (OwnerName !=null?OwnerName.replace(' ', '%20'): OwnerName));                                req.setMethod('POST');                 req.setHeader('Content-Length','0');                  req.setCompressed(false);                  if(!isApexTest) {                    res = http.send(req);                 }              }              catch(System.CalloutException e)              {                 System.debug('Error Calling LFIQ Webservice (' +  ServiceURL + ') : '+ e);                 //System.debug(res.toString());             }       } }

I have a business logic as follows.   1. A web service class parses XML file containing case data and loads the case to SF. 2. Trigger that on update of case email field make a call to future method to generate attachment ,send email and update case owner field.  trigger CaseUpdate on Case (After update)  {  for(case c : trigger.old)  {     for(case ca : trigger.new)     {         if((c.Email__c != ca.Email__c) && (c.CS_ID__c != null) && (c.Count__c == 1))         {           UtilsClass.generateReport_Future(c.id);         }     }  } }    @Future(callout=true)  public static void generateReport_future(String caseId)  { String result = ''; result = generateReport(caseId); if(result == '')  {     result = emailReport(caseId); } UtilsClass.ChangeOwner(caseId);  }   The issue i am facing is,  System.LimitException: Too many future calls: 11, even though single case record is loaded.  Multiple records may be loaded at the same time, but they are sequential(One By One).  Are the records coming in a single batch even though they are being loaded individually..?


I'd like to create an effect where I reveal an image when opening the cupboard's door. So far I've created a plane track with the image in it but can't figure out how to hide the image behind the opening door. Any suggestions please?

I am working with masking. Here is my node setting with the mask.   And here is my node settings  And what am i getting is this.    I tried invert node and many settings. It just doesnt work. Where am i going wrong


I have managed to get the answer as $07$ using modular arithmetic but answer seems wrong to me because the answer after evaluation of $k-38$ is $5$.  Please help.

What is the calculation way to find out the last $2$ digits of $7^{7^{7^7}}$? WolframAlpha shows  $...43$.


Find the simple modules of the algebra $A$, where  $A = \begin{equation*} \begin{pmatrix} K & 0\\ K & K \end{pmatrix} \end{equation*}$ and $K$ is a field $\textbf{My attempt:}$ I was thinking about something involving direct sums, I know that $A = E_{1,1}K \oplus E_{2,1}K \oplus E_{2,2}K$, but I don't know how to continue... I guess the summands are the simple modules of $A$. Could you help me?

Let k be a field. $A= \begin{pmatrix} k& k& k\\ 0&k&k\\ 0&0&k \end{pmatrix}$ is the upper triangular matrix algebra. Then the projective module $P(2)=Ae_2=\begin{pmatrix} k\\k\\0\end{pmatrix}$ has a submodule $P(1)= \begin{pmatrix} k\\0\\0\end{pmatrix}$. Also we know that the cokernel of the inclusion map $i: P(1) \rightarrow P(2)$ is $S(2)$(the simple module correspond to $e_2$), I thought $S(2)$ is of the form $\begin{pmatrix} 0\\k\\0\end{pmatrix}$, but find this is not an $A$-module, so what is $S(2)$, in other words, what are the simple modules of $A$ written as $3 \times 1$ matrix?


When running this piece of code:  #timestamp, capture, and tweet an image def stamp_cap_tweet():         timestamp = time.strftime("%d%m%Y-%H%M%S")     os.system("fswebcam -r 960x720 -d /dev/video0 " + timestamp + ".jpg") #save image to disk     twit.update_status_with_media(timestamp + ".jpg", status = "@shahidrogers " + timestamp) #tweet image @username     print "Tweeted image at " + timestamp #make a record in the Python output   I get the error     File "tweetpicture.py", line 17                                         os.system("fswebcam -r 960x720 -d /dev/video0 " + timestamp + ".jpg")                                                                                ^                                                   IndentationError:       unindent does not match any outer indentation level   What could this possibly mean? I have searched around and people have said that there's a mix of tab and spaces, but I do not understand this at all as I am still very new to Python and this is my first few lines of coding.  Thanks!

When I compile the Python code below, I get      IndentationError: unindent does not match any outer indentation level     import sys  def Factorial(n): # Return factorial     result = 1     for i in range (1,n):         result = result * i     print "factorial is ",result     return result   Why?


I am trying to implement an interface on a fragment. For this I created a Class "X" to perform an action. In this class I created a method that uses the interface object and in the fragment, I implement the interface and create an object of class "X", which calls the method that uses the interface object. As you can see in the code below. The public class ClassX {  private NewInterface newInterface;  public void sum(){      newInterface.sum(1,1);  }  }  The interface public interface NewInterface {      public void sum(int a,int b); }  The fragment public class ExampeleFragment extends Fragment implements NewInterface {      private ClassX classx;      public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {            View root = inflater.inflate(R.layout.fragment_example, container, false);          classx.sum(1,1);          return root;     }      @Override     public void sum(int a, int b) {                  int sum = a+b;      } }  And I'm getting the error: java.lang.NullPointerException: Attempt to invoke interface method on a null object reference The NewInterface object in class x is null. However, this procedure works when I implement it in the MainActivity class. Does anyone know what may be happening?

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?


I have created a form in a JavaScript and display it in a element. But when I have to submit on that form it doesn't works.  Here's my code:    // This is my javascript for submit.   $('#EncodeGradesForm').submit(function() {   $.ajax({     url: '<?php echo base_url('     grade / encode ') ?>',     type: 'POST',     data: $(this).serialize(),     success: function() {       alert('Submitted!');     }   }); });   var encoding; encoding = '
Encoding Grades...
'; encoding = '<form id="EncodeGradesForm">'; encoding += '<input type="hidden" name="subject_id" value="<?php echo $subjectData['id'] ?>">'; encoding += '<input type="hidden" name="section_id" value="<?php echo $section_id ?>">'; encoding += '<input type="hidden" name="grading_id" value="' + grades_id + '">'; encoding += '<input type="hidden" name="grade_id" value="' + content_id + '">'; encoding += '
'; encoding += '
'; encoding += '
'; encoding += 'Student	'; encoding += 'Grade	'; encoding += '
'; encoding += '
'; encoding += '
';  for (var i = 0; i < data.length; i++) {   encoding += '
' +     '' + data[i].firstname + ' ' + data[i].lastname + '	' +     '<input type="hidden" name="student[]" value="' + data[i].id + '" /><input type="number" name="score[' + data[i].id + ']" class="form-control" style="width: 100px; margib: auto;" />	' +     '
'; }  encoding += '
'; encoding += '
'; encoding += '<button type="submit" class="btn btn-primary btn-block">Submit Grade/s</button>'; encoding += '</form>';  $('#collapseContent' + content_id).html(encoding);

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


With the release of WordPress 4.0.1 all my sites got auto upgraded even if none visited them and all those websites are behind browser authentication.   My sites are not broken but I am just curious to know how WordPress auto-upgrades the sites which are behind browser authentication.

I received an email this morning stating that my Wordpress site had been automatically updated to the latest version. I knew about the feature but I've always wondered exactly how it works.  PHP isn't a permanently-running process: it only runs when requested. So as far as I can tell, Wordpress can only update itself when someone loads a web page. But the update process is not instantaneous, so surely a user visiting the site would have a really slow page load.  Is there a different trick they use for automatic updates? I've searched all over the place but haven't found any explanation.


can someone prove the following statement: Let X is an ordered set with the order topology. Let Y be a convex subset of X. Then the order topology on Y is the same as the subspace topology on Y.  intuitively it's kind of obvious but i can't prove it...

The followings is the Theorem $16.4$ from Munkres' Topology:    In the textbook it uses concept of subbasis to prove the theorem which I can't understand it. I tried to prove that in another way but I am not sure if I am correct.   Proof?:   1- Both $Y$ and $\emptyset$ are open in both typologies.   2- Basis elements in order topology in $Y$ are one of the three types: (1) All open intervals $(a,b)$ in $Y$; (2) All intervals of the form $[a_0,b)$, where $a_0$ is the smallest element (if any) of $Y$; (2) All intervals of the form $(a,b_0]$, where $b_0$ is the largest element (if any) of $Y$. Each of them can be written as $(c,d) \cap Y$ for $(c,d) \subset X$ an open set in $X$. And since $(c,d) \cap Y$ is open so the topology $Y$ inherited as a subspace of $X$ is finer than order topology in $Y$.   3- Any open set the topology $Y$ inherited as a subspace of $X$ is in the form $(c,d) \cap Y$ for $(c,d) \subset X$ an open set in $X$. This intersection is either $Y$ or $\emptyset$ or one the mentioned types of basis elements in order topology in $Y$ in paragraph 2. So the topology $Y$ inherited as a subspace of $X$ is coarser than order topology in $Y$. And we are done!   Is this proof a correct and rigorous one? And if not, is there any other simple proof not using subbasis?


I'm working on a game in XNA with a 2D tilemap as the playfield. I'm using a spritebatch with a transformation matrix to provide movement and scaling of the playfield. I'm trying to add a zoom function, so the player can click anywhere on the screen and it will zoom in to that point. The issue is that when I increase or decrease the scale, the "focus" of the zoom is always at the top-left hand corner of the screen.   So unzoomed:   And when zoomed in (note the position of the chequered tile):   What I'd like to happen when the player zooms is that it zooms into the centre of the screen, like so: (I achieved this by moving the playfield around after zooming)    I realise that the way to do this is probably to add or subtract from the X/Y co-ordinates that get fed into the transformation matrix, and probably at a fraction of the scale, but I can't figure this out. Everything I try tends to result in crazy effects while zooming.  Ideally I'd like to be able to set any arbitrary point on the screen, and zoom to that point. Can you help?  The code of the Draw function:     protected override void Draw(GameTime gameTime)     {         Matrix transformMatrix =            Matrix.CreateTranslation(-baseX, -baseY, 0) *             Matrix.CreateScale(baseR, baseR, 1) ;           GraphicsDevice.Clear(Color.CornflowerBlue);          // "World" spritebatch. Scaling applied.         spriteBatch.Begin(SpriteSortMode.FrontToBack, null, SamplerState.PointClamp, null, null, null, transformMatrix);          foreach (Vector3 Square in Squares)             spriteBatch.Draw(Textures[(int)Square.Z], new Vector2(Square.X, Square.Y), null, Color.White, 0, new Vector2(0, 0), 1, SpriteEffects.None, 0.82f);          base.Draw(gameTime);          spriteBatch.End();            // "UI" spritebatch. No scaling applied.         spriteBatch.Begin(SpriteSortMode.FrontToBack, null, SamplerState.PointClamp, null, null);         spriteBatch.Draw(Textures[0], new Vector2(ScreenMidX, ScreenMidY), null, Color.White, 0, new Vector2(0, 0), 1, SpriteEffects.None, 1f);          SpriteFont aFnt = Content.Load<SpriteFont>("Font1");         spriteBatch.DrawString(aFnt, "" + baseX, new Vector2(5, 0), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 1f);         spriteBatch.DrawString(aFnt, "" + baseY, new Vector2(100, 0), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 1f);         spriteBatch.End();     }   Full code available here:   Thanks for any help!

In XNA I am using a spritebatch to render a board. I have created a camera class which can provide me a view and projection matrix. Currently I am supplying the view matrix to my sprite batch when I call begin.  I can get the view matrix to correctly move everything around and do some zooming in and out. My problem is that I want to zoom in on a specific point (for now the center of the screen) but currently zooming just zooms in on the coordinate 0,0.   Here is how I am constructing the view matrix;          _ViewMatrix =             Matrix.CreateTranslation(                 new Vector3(                     (-_Position.X + _Width * _Zoom / 2),                     (-_Position.Y + _Height * _Zoom / 2),                     0) ) *             Matrix.CreateScale(new Vector3(_Zoom, _Zoom, 1));   How could this be altered to make it scale correctly relative to the given point. Later I will probably want to zoom to the mouse position, but if someone has a simple example I'm sure I can work out how to adapt it.


I am calling a bunch of methods asynchronously. Somehow the release version works fine but while debugging await task1; gives me an exception:      "System.InvalidOperationException: 'Cross-thread operation not valid:   Control 'comboBox1' accessed from a thread other than the thread it   was created on"   on line comboBox1.ValueMember = "value member";  async private void CallingMethod() {     Task task1 = Task.Factory.StartNew(TroubleMethod);     Task task2 = Task.Factory.StartNew(Method1);     var task3 = Task.Factory.StartNew(() => Method2(Param1));     //other tasks     //other stuff      await task3;     await task2;     await task1; }  private void TroubleMethod() {     class1 thedata = getDBdata();      comboBox1.DataSource = thedata;     comboBox1.DisplayMember = "display member";     comboBox1.ValueMember = "value member";      class2 thedata2 = getDBdata2();      comboBox2.DataSource = thedata2;     comboBox2.DisplayMember = "display member2";     comboBox2.ValueMember = "value member2"; }   TroubleMethod() has only one reference which is task1. So why the exception?

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


Let's suppose that $n$ is a natural number representing the number of vertices in a graph. How would we show that the number of spanning trees of the complete graph $K_n$ is $n^{n−2}$? I tested out a few values on $n$ and it makes sense logically, but how would we prove this?

I predicted the formula by finding total number of non-isomorphic labelled trees of order 1 is 1 , order 2 is 1,order 3 is 3,order 4 is 16,order 5 is 125.But how do i prove it ? I am beginner in graph theory so i will be very thankful if i get some simple approach to solve the problem(Not by using some difficult theorems).


Hello Photographic Lovers,   Aperture is what the power of lens to open and close so as to control the light.  So When we Zoom in the lens and see the far objects, then it changes the aperture.  So How the Zooming is related to the aperture?  Both looks different for me.  And Also is it possible to change the aperture when its zoomed to maximum level.   Please forgive me if this question sounds to be silly, as I am very new to this field and learning hard to get it.

Does the aperture ring lock the apertures beyond, say 5.6 at length lens's telephoto end? Does the lens introduce an obstacle to the aperture ring so the lens can't be opened anymore beyond the aperture at the telephoto end?  And why do lenses behave like this, anyway? Why don't they have constant apertures throughout their focal range?


I'm looking for a community that people can share knowledge about something, i.e. a new and faster algorithm. If this kind of community doesn't exist yet, would be a good idea a Stack Exchange about it.

I have a post that I made to share with others my experience of app submission to the iOS App Store. I don't know what I should do except post a question and answer it myself. I don't know how to move it to any other appropriate spot than Questions, and I keep getting down votes, because technically it is not a question. Instead, it's some experience I considered valuable to share with others.  So what I should do about this?    What happened after I post this question here yesterday:  After I post the question here, I drawn some attentions to my original post on Stack overflow,  and got a lot of down votes. I understand that it was not a real question. I mentioned it is not a Q&A and even vote for closing the question myself, however I still got a lot of down votes. Then what happened is the system banned me from asking questions again...  Now I am in the big trouble.


I'm working with database query results. The output would be like this:  rows = [(1, 2, 3), (4, 5, 6), (7, 8, 9)]  Which would be, say, 3 rows of table data from the db  And the column names are like this:  cols = ['col1', 'col2', 'col3']  I want make a list of dictionaries out of them, like this:  {'col1':1,'col2':2,'col3':3} {'col1':4,'col2':5,'col3':6}   So I did this:  res=[] for row in rows:   res.append(dict(zip(cols,row)))   But res is like this:  [{'col2': 2, 'col3': 3, 'col1': 1}, {'col2': 5, 'col3': 6, 'col1': 4}, {'col2': 8, 'col3': 9, 'col1': 7}, {'col2': 2, 'col3': 3, 'col1': 1}, {'col2': 5, 'col3': 6, 'col1': 4}, {'col2': 8, 'col3': 9, 'col1': 7}]   I can't figure out why the key-value pairs aren't in order by column names. It's not a huge problem, I can sort the dict elements by key names, but how do I get them in order in the first place, without the need to sort them?

Is it possible to retrieve items from a Python dictionary in the order that they were inserted?


Can't remember the name of this book about a person who is either on some sort of quest or is running from something. He discovers a wolf cub along the way (I think its mom had just died in a storm or something) and it becomes a traveling companion. I think I can remember him saying, or thinking, something like it would help him survive because the cub with its nose could pick up scents and sense threats before he could or something.  I think there was a fight with like a gigantic bear at some point and also at another point in the book I think he almost drowned because a evil hand tried to pull him underwater or something?  I think I read the book like a decade or so ago, does anyone know what this is?

As per the title, I remember getting about half-way through the first book of the series, which has the following points as far as I can remember (some may be erroneous):   I think there was around eight books in the series The protagonist is a young boy who has befriended a wolf He commands it with a whistle which is ultrasonic (but he doesn't know that) He makes whistles out of sticks, and discovers he can speak to wolves when he makes one too small (the wolf can hear it) I think the narrator is third person, but takes the perspective of the boy and the wolf alternately He travels to a village, possibly after his father dies The villagers are afraid of this wolf-boy combo, but an elder of the village remembers a prophecy that one day someone would come who would speak with the air I think there was some rite involving fire, which the boy overcomes The version I read was paperback, and about 3cm thick I read it at around 2009, and it was a relatively new book. Published since 2000 at a guess It was set in Celtic (or around that time) Britain I think the audience was young adult Originally the boy and his father lived in a cave I think he calls the wolf 'wolf' (imaginative, I know) There's a few references to animal skins. Possibly his father was a trapper I think he was fairly intelligent - using the phosphorous content in evaporated urine to create a flash in a large fire in the centre of the village (which was another part of the prophecy) The prophecy had at least two defining points, and then a promise to save the village The wolf disappears for a while as he goes to the village, and he blows his whistle to call it


One Table is accidentally dropped in my database. I had not taken backup of the database since it is in development environment. I want to restore the table. Kindly please provide any solution. The last backup was taken 6 months ago.  The table has related data to other tables.

Currently I deleted one table from the database. But now I want some of the information from that table.   Please suggest how to restore or get back the table.  I am using SQL Server 2008 R2.


As far as I can tell, consumer interchangeable-lens cameras are all categorized as single-lens reflex, rangefinder, or mirrorless. I feel like I never see these classifications used, though, for fixed-lens cameras like the Leica Q, Sony RX1, or Fujifilm X100T. Are all such cameras mirrorless or do some of them use a mirror and prism?

A DSLR by definition does not tell us if the camera has a mount for interchangeable lenses. The lens of a DSLR could be a fixed lens, right? Is there, or was there ever, such a camera? If not, why not?  I don't mean a "" with a tunnel viewfinder or an electronic viewfinder. With DSLR camera I mean a digital camera with an optical path through the lens to a viewfinder with the help of a mirror inside the lightbox. The letter 'R' in  does not mean a moving kind of mirror, it may just as well be a pellicle/transparent/beam splitter type of fixed mirror.


I am new to Latex and I try to include references in my document:  I use Texmaker and I export the .bib file out of Mendeley.  The file test.tex looks like the following:  \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \begin{document}   \bibliography{test} \bibliographystyle{plane}   \section{test}  test  \cite{Ref1}  \end{document}   test.bib looks like the following:  @article{Ref1, author = {test,1}, number = {5}, pages = {1--16}, title = {{Journal ∗}}, volume = {16}, year = {2006} }   Everything is in the same folder, I tried to compile it twice - I tried to change the bibliographystyle, etc. nothing works. Via autocomplete Texmaker suggest me Ref1.     Error: "Citation "Ref1" on page1 undefined.   Hopefully someone can help me!

I spent past couple of hours to get citation working on my latex. I am using TexMaker and I tried to compile the document in latex->bibtex -> latex -> latex -> PdfLatex order. However, I only see ? on my outcome pdf file. Could you help me? Thanks !   \documentclass{article}  \usepackage{natbib}   \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{1,  author = {Mustermann, A. and Mostermann, B. and Mistermann, C},  year = {2011},  title = {Using articles in {\LaTeX} documents},  journal = {Journal} } \end{filecontents}   \begin{document}  \cite{1}\qquad\citet{1}\qquad\citep{1}  \citeyear{1}\qquad\citeauthor{1}  \bibliographystyle{apalike} \bibliography{\jobname} \end{document}


$\big(^n_7\big)$ denotes the number of ways of choosing $7$ objects from among $n$ objects. For a real number $n , [n]$ denotes the greatest integer not exceeding x.  My attempt : I simplified $\big(^n_7\big)$ as $\frac {\prod_{j=0}^{6} {(n-j)}} {7!} $. For ${ \begin{bmatrix}{\frac {n}{7}} \end{bmatrix} }$, the only thing I could infer was that if $n=7k+m $, where $(k,m) \in N$ and $m < 7$ , ${ \begin{bmatrix}{\frac {n}{7}} \end{bmatrix} }$ would equal $k$. How should I proceed? Can anyone help?

This is an exercise from Apostol, which i have been struggling for a while.  Given a prime $p$, how does one show that $${n \choose p} \equiv \biggl[\frac{n}{p}\biggr] \ (\text{mod} \ p)$$ Note that $\Bigl[\frac{n}{p}\Bigr]$ denotes the integral part of $\frac{n}{p}$.  I would also like to know as to how does one try to solve this problem. Well, what we need is to show is whenever one divides ${n \choose p}$ by a prime $p$ the remainder is the integral part of $\frac{n}{p}$.  Now, $${ n \choose p} = \frac{n!}{p! \cdot (n-p)!}$$ Now $n!$ can be written as $$n!= n \cdot (n-1) \cdot (n-2) \cdots (n-p) \cdots 2 \cdot 1$$  But i am really struggling in getting the integral part.


I want to generate something like this in Latex    I've already checked  but wasn't able to generate something visually appealing.   I just need a general idea on how to do it on my own, you don't need to post the whole picture (also no problem if you want to :) )

I want to make following Software architecture inside TikZ:    See below my code:  \documentclass[border=2px]{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows}  \tikzset{     green/.style  = {draw, rectangle, minimum width=1cm, minimum height=1cm, text centered, text width=1.2cm, font=\footnotesize, draw=black, fill=green!30},     blue/.style   = {draw, rectangle, minimum width=6cm, minimum height=1cm, text centered, text width=5.0cm, font=\footnotesize, draw=black, fill=blue!30},     yellow/.style = {draw, rectangle, minimum width=6cm, minimum height=1cm, text centered, text width=5.0cm, font=\footnotesize, draw=black, fill=yellow!30}, }  \begin{document} \begin{tikzpicture}[node distance=1.1cm]     \node (r1c1) [green] {VC++};     \node (r1c2) [green, right of=r1c1, xshift=0.5cm] {VB.NET};     \node (r1c3) [green, right of=r1c2, xshift=0.5cm] {C\#.NET};     \node (r1c4) [green, right of=r1c3, xshift=0.5cm] {Others};     \node (r2c1) [blue,  below of=r1c2, xshift=0.8cm] {COM-API Interface};     \node (r3c1) [yellow, below of=r2c1] {Autodesk Inventor Application};      \draw (r1c1);     \draw (r1c2);     \draw (r1c3);     \draw (r1c4);     \draw (r2c1);     \draw (r3c1); \end{tikzpicture} \end{document}   Below is the generated diagram:    The modules inside generated diagram are not properly aligned. Any suggestions please?


It's a super simple countdown timer  def countdown(): start = int(input("1, 5, or 10 minute timer: ")) if start == 1:     t = 60 elif start == 5:     t = 300 elif start == 10:     t = 600 else:     exit() for i in range(t):     min, sec = divmod(t, 60)     timeformat = '{:02d}:{:02d}'.format(min, sec)     print(timeformat, end="\r")     time.sleep(1)     t -= 1   The timer works but nothing prints unless i remove the , end='\r' and then the out put counts down using a newline each time but im trying to have the timer update on the same line.

How do I force Python's print function to output to the screen?


The question is let (X,d) be a metric space. Show that $ d' = \frac{d}{1+d} $  I would like to know if I am on the right path with my solution. Any help would be greatly appreciated!   Solution:  Let $x,y,z \in X $ Then $ d'(x,z) = \frac{d(x,z)} {(1+d(x,z))}\le \frac{d(x,y) + d(y,z)}{ 1+d(x,y)+d(y,z)}=\frac{d(x,y)}{1+d(x,y) + d(y,z)}+\frac{d(y,z)}{1+d(x,y) + d(y,z)}\le \frac{d(x,y)}{1+d(x,y)}+  \frac{d(y,z)}{1+d(y,z)}$ $$= d'(x,y) + d'(y,z).$$ Thus we have proved that $d'=\frac{d}{1+d}$ is also a metric on $X$.

Let $(X,d)$ be a metric space and for $x,y \in X$ define $$d_b(x,y) = \dfrac{d(x,y)}{1 + d(x,y)}$$ a) show that $d_b$ is a metric on $X$  Hint: consider the derivative of $f(t)$ = $\dfrac{t}{1+t}$  b) show that $ d$ and $ d_b $ are equivalent metrics. c) let $(X,d) $ be $(\mathbb{R}, |\cdot|)$ Show that there exists no $ M>0$ such that $ |x-y| $ $\leq$ $Md_b$ $(x,y)$ for all $ x,y$ $\in$ $\mathbb{R}$  I have calculated $f(t)$ and $f'(t)$ and from this I know $f(t)$ is an increasing function as $f'(t)$ is strictly positive. But I don't know where to go from here or how to do parts b) and c)


What is the cheapest way to run AIX 6-7 at home? Using an emulator or is there any low-cost hardware that can run AIX6 or AIX7?  Purpose: practicing VIO/LPAR/HMC/etc..

I need to learn about , and I only have a laptop with Fedora 14/VirtualBox on it. Is there any chance that I could run an AIX guest in my VirtualBox?   My laptop has an Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz, and I read that it only runs on RISC architecture. So there's no way I can run it on my laptop?


This is what displays right before Windows Boot Manager, I have dual boot:     Failure predicted on Hard Disk 2: WDC WD1600BEVT -22ZCT0- (S1)   WARNING: Immediately back-up your data and replace your hard drive. A   failure may be imminent. PRESS F1 TO CONTINUE.   I've already tried smartmontools, any suggestions?  Also, I have a Phoenix BIOS, which doesn't have the ability to disable it from there.

The Disk Utility pop-up the same message so many times and too many at a time. The message is the same "Hard Disk Problem Detected. A hard disk is reporting health problems." The hard disk has previous bad sectors and S.M.A.R.T. ran out of allocated resource to replace them. The hard disk it still usable (being using it with 10.10 for half a year without any problem.  How can I turn off this annoying pop up.


I'm working with a table such as this one: create table example_table (ID Number(8), Year Number(8), Data Varchar(4)); insert into example_table (ID,Year,Data) ( select 1,2008,1 from dual union select 1,2010,2 from dual union select 2,2014,3 from dual union select 2,2020,4 from dual union select 2,2009,5 from dual union select 3,2003,6 from dual union select 4,2015,7 from dual union select 4,2014,8 from dual); select * from example_table;      ID Year Data     1 2008 1   1 2010 2   2 2014 3   2 2020 4   2 2009 5   3 2003 6   4 2015 7   4 2014 8     In this case, together the ID and Year columns form a unique identifier for a specific row. I only want to pull rows where the Year is maximized for a given ID, such as     Id Year Data     1 2010 2   2 2020 4   3 2003 6   4 2015 7     I know I can do this with a correlated subquery such as select distinct         ID, Year, Data from   example_table a where  Year =         (select max(year)         from   example_table b         where  a.id = b.id);  Or I can do it with a common table expression: with tmp(ID,Year)  as (     select distinct             ID,            max(year)             over (partition by ID)     from example_table) select distinct         ID, Year, Data from   example_table        inner join tmp           on  example_table.ID = tmp.ID           and example_table.year = tmp.year;  I could technically also do it by creating another table/view, but I don't have perms on my database to do that. Anyways, this is a common task I'm having to do within my scripts and I want to reduce the number of queries I generate. Is there any way to do this with only one query? I tried using a HAVING statement like: select example_table.ID,        max(example_table.YEAR),        example_table.DATA  from example_table group by ID, DATA having example_table.YEAR = max(example_table.YEAR);  but that doesn't seem to work because HAVING statements only function on groups, and I want to manipulate elements within the group. Is there a way to do this with only one query, and if not, what's the most clear way to do it with two queries?

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


So I need to write a method that does a lookup. It needs to take an enum generic and then convert the enum value to a string and return it  This is what I have so far  public static object lookupColumn<TEnum>(int? id, string defaultValue="")         where TEnum : struct, IConvertible {     if (!(typeof(TEnum).IsEnum))         throw new ArgumentException("TEnum must be of type Enum");      if (!id.HasValue)         return defaultValue;      TEnum enumValue = (TEnum) id.Value; //This line doesn't compile     return enumValue.ToString(); }   Any suggestions?  EDIT: The part that is causing me trouble is casting the int to an enum

What I want to do is something like this: I have enums with combined flagged values.  public static class EnumExtension {     public static bool IsSet<T>( this T input, T matchTo )          where T:enum //the constraint I want that doesn't exist in C#3     {             return (input & matchTo) != 0;     } }   So then I could do:  MyEnum tester = MyEnum.FlagA | MyEnum.FlagB  if( tester.IsSet( MyEnum.FlagA ) )     //act on flag a   Unfortunately, C#'s generic where constraints have no enum restriction, only class and struct. C# doesn't see enums as structs (even though they are value types) so I can't add extension types like this.  Does anyone know a workaround?