I love macro photography, it gives an insight in the small world around is. Unfortunately, I'm really not good at it. When I came across an artificial beehive, I took a chance to get into the bees and try to snap some bee portraits. Out of the hundreds of pictures, only one or two are to my liking. The main thing that throws me off, is focus.  I shoot with a Canon 700D paired with an EF 100mm f/2.8 Macro. Whenever I try to photograph insects from up close, I try to get as close as my lens lets me (so it can still autofocus) and take a bunch of pictures. However, time and time again the subject is only partially in focus. Below are some examples.        As you can see in these examples, it's often the case that a strip, or "band", of the environment is in focus, as one would expect, but this also causes the part of the creature that is a bit further back to be out of focus. I'd rather get rid of that band, and focus solely on the insect. Oftentimes it's things like hind lags or antennae, or the back part of the body that is out of focus but I'd want to be able to have the whole insect into focus. I'm not sure how to approach this.  Two things that I have considered, but I'm not sure if they make sense:   take a step back, and take a picture from further away and then crop. But this, in turn, would cause more of surroundings to be 'in focus' and I'd like to have this blur in the environment to single out the insect. post-processing to sharpen the out-of-focus areas (I'd rather not do this) focus manually, but I'm not sure this would have a better result   Any other tips regarding capturing insects are welcome!

I have been messing around with some Macro Photography using the techniques (and a reversal ring) described in a  by @ My main issue is that I am having a hard time getting the subject into focus. There are times when the center is blurred and the outside is in focus or the center in focus and the outside out of focus. What are ways to get as much of the subject in focus?   I am using a Nikon D5100, I have a 18-55mm kit lens but I find the 55-200mm lens easier to use for shooting.


What do you call someone who is favored by a higher authority, such as in the work place they get more perks than other people...teacher's pet?

Over dinner tonight, one of the guests was describing herself as her boss's favorite employee, and asked for a term to describe this.  As the only guest who spoke English as a first language, the question fell on me, but I could not think of any such term.  Is there one?  It would be similar to "teacher's pet" to describe a teacher's favorite student, but in the professional realm.  "Boss's pet" just doesn't seem to fit.


I was wondering if anyone had any theories as to why the "Woman" told Wilfred to not tell the doctor anything about the conversations she had with him??  I don't see how this would have altered his decision either way.

In The End of Time, we see that The Doctor looks at one lady who was alongside Rassilon very peculiarly. Why? Who was she? What was her role? Did the Doctor know her? If yes, how?


I've had a life-long fancy for using vodka to clean sanitize and naturally use it in my air-lock.  Given that it is only 40%, however, and I live in California where pure grain alcohol is illegal, would starsan be better?  I guess the two dimensions to take into account would be sanitation and cost, but I am more concerned about sanitation.

I've just started making my first brew, and am using vodka in the airlock, but am hoping for some more detailed info about what is best practice, or if there is not really any difference between using water, vodka, or other things I haven't thought or heard of... Also, does the quality of the vodka count? (As in, cheap vodka has a, er, particular taste - if that ends up in the fermenter, how much will it affect the brew taste?)


What would be a genuinely-acceptable example of usage for a derived cast? I have always thought they are only used when implementing "hacks" but if this is not the case, could someone give an acceptable example of when to use one?

What are the proper uses of:   static_cast dynamic_cast const_cast reinterpret_cast C-style cast (type)value Function-style cast type(value)   How does one decide which to use in which specific cases?


Let $\eta$ be a bi-linear form on $\mathbb{R}^4$ given by $$\eta\left(x,\,y\right)=x_0y_0-x_1y_1-x_2y_2-x_3y_3$$ The Poincare group is defined as the group of isometries of $\eta$, that is, the group of all maps $\Lambda:\mathbb{R}^4\to\mathbb{R}^4$ such that for all $(x,\,y)\in\left(\mathbb{R}^4\right)^2$, $$ \eta\left(\Lambda\left(x-y\right),\,\Lambda\left(x-y\right)\right)=\eta\left(x-y,\,x-y\right)$$  Then one usually says that these comprise affine transformations, for example, in the Wikipedia article on the Poincare group: "The Poincaré group itself is the minimal subgroup of the affine group".  My question is: is there a mathematical theorem that says, just given the data I specified so far (or more data?), that $\Lambda$ has to be affine (and if so, what is that theorem and its proof?), or is it part of the physical input which stipulates that lines must be sent to lines?

In almost all proofs I've seen of the Lorentz transformations one starts on the assumption that the required transformations are linear. I'm wondering if there is a way to prove the linearity:  Prove that any spacetime transformation $\left(y^0,y^1,y^2,y^3\right)\leftrightarrow \left(x^0,x^1,x^2,x^3\right)$ that preserves intervals, that is, such that  $$\left(dy^0\right)^2-\left(dy^1\right)^2-\left(dy^2\right)^2-\left(dy^3\right)^2=\left(dx^0\right)^2-\left(dx^1\right)^2-\left(dx^2\right)^2-\left(dx^3\right)^2$$  is linear (assuming that the origins of both coordinates coincide). That is, show that $\frac{\partial y^i}{\partial x^j}=L_j^i$ is constant throughout spacetime (that is, show that $\frac{\partial L_j^i}{\partial x^k}=0$).  Thus far all I've been able to prove is that $g_{ij}L_p^iL_q^j=g_{pq}$ (where $g_{ij}$ is the metric tensor of special relativity) and that $\frac{\partial L_j^i}{\partial x^k}=\frac{\partial L_k^i}{\partial x^j}$. Any further ideas?


I have to prove that $$\lim_{x \to \infty} \frac{x^{a}}{b^{x}} $$  equals zero for all $a$ of $\mathbb{N}$ and $|b|>1$  The suggestion is to start by finding $$\lim_{x \to \infty} \frac{x^{1}}{b^{x}} $$  which I have done. But what I get is $\frac{x}{b^{x}}$ and since the limit of $b^{x}$ is defined as $0$ I don't know how to continue...

In other words, how to prove:  For all real constants $a$ and $b$ such that $a > 1$, $$\lim_{n\to\infty}\frac{n^b}{a^n} = 0$$  I know the definition of limit but I feel that it's not enough to prove this theorem.


A few days ago I asked a question about the inadequate performance of the newfangled rendering of the math formula display.  It has disappeared.  What happened to it?

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


It has been confirmed that the magnetic poles of the Earth get reversed , but why should they get reversed in the first place ?  Also, why is their pattern of reversal so arbitrary ?

I have always been told that the geomagnetic field acts "as if" there were a bar magnet inside the Earth. I now this is not true, but I feel that knowing what is actually going on would help me understand the answer to the question that I'm about to ask:  Why does geomagnetic reversal happen? Is it something gradual or relatively fast?  (What is the origin of the geomagnetic field? Can we answer my questions starting from this mechanism?


I am currently a newbie in ubuntu. I have ubuntu 14.04 and want to update it via terminal. I use proxy server (which requires authentication ie username and password)to access internet. I can easily surf internet but when it comes to Ubuntu software centre or an update through terminal, i am unable to do it.Terminal always gives 'error 407 proxy authentication required' and then fails. Please help me with this.

When I try to install a software using Ubuntu Software center I get:  Failed to download repository information Check Your Internet connection   When I try to do a apt-get install something, I get:  407  Proxy Authentication Required   I use a proxy server that requires a user-name and a password. I have set my systems proxy manually, by plugging in the required numbers in the Networks proxy and applied it system wide. I guess the problem now is plugging in my user-name and password.  When I use INTERNET via Mozilla, it specifically asks me for my user-name and password.


I just had a conversation where the sentence 'The system is broken because it's fixed!' was correctly spoken under the pretense where fixed means that it's rigged. Assuming that context of rigged matches as a weak synonym for broken, the question came up - what's the word for a pair of words that are simultaneously synonyms and antonyms?   I am not asking about autoantonyms. I am not even looking for a single word. I am trying to find a term to describe the relationship of two different words, where one is an autoantonym and where one of its definitions is synonymous with the second word, causing the two words to be synonyms and antonyms at the same time.  In my example:   fixed = rigged: fixed and rigged are synonyms fixed = repaired: fixed and rigged are antonyms   What is the label given to the relationship between fixed and rigged?

For example:   "transparent" can mean both "obvious" and "hidden"  "aught" can mean both "all" and "nothing"    Is there a term for a word which has multiple definitions that are antonyms?


Using XUbuntu 13.10.  Some key combination -- maybe CTRL-ALT-ESC or something similar -- keeps throwing me into a full-screen tty. When that happens, how do I get back to Xubuntu? I can log in to the tty with my username and pw, but I don't know how to return to my graphical session.

I accidentally pressed Ctrl+Alt+F12 and my display turned to black... I then had to make a reboot.. What did it do to my system? Also what does Alt+ F8 to F10 do?


I'm using Linux app-server 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux. When I go to a directory with several files named name1.php, name1.html, name2.php, etc. and type:  $ sudo ls *.*   I get:  ls: cannot access *.*: No such file or directory   I have the same sort of problem with grep:  $ grep "TOS.html" *.* grep: *.*: No such file or directory   Why is that and how do I get around this problem?  Edit #1:  $ shopt | grep glob + grep glob + shopt dotglob         off extglob         on failglob        off globstar        off nocaseglob      off nullglob        off   Edit #2:  $ ls -ld;echo --;sudo ls -ld  + ls --color=auto -ld drwxr-x--x 16 www-data root 12288 Oct 10 17:08 . + echo -- -- + sudo ls -ld drwxr-x--x 16 www-data root 12288 Oct 10 17:08 .

Can someone explain to me the following?  $ ls -ld /temp/sit/build/ dr-xr-s--- 3 asdf qwer 4096 Jan 31  2012 /temp/sit/build/  $ ls -ld /temp/sit/build/* ls: /temp/sit/build/*: Permission denied   So apprently, I can't use the asterisk here. I've tried it with a sudo command and I get a "no such file" error rather than "permission denied"...  sudo ls -l /temp/sit/build/* ls: /temp/sit/build/batch*: No such file or directory   but it finally works if I don't use the *  sudo ls -l /temp/sit/build/ total 4 dr-xr-s--- 11 asdf qwer 4096 Oct  3 23:31 file


Whenever I run this I get an error:     "Exception in thread "main" java.lang.NullPointerException    at anime.re.drawShape(re.java:17)   at anime.re.main(re.java:12)"   I am not passing a null reference, what is the problem?  import javax.swing.JFrame; import java.awt.Graphics;  public class re {     public static void main(String[] args) {         JFrame frame = new JFrame();         frame.setSize(400, 400);         Graphics g = frame.getGraphics();         drawShape(g);         frame.setVisible(true);     }      public static void drawShape(Graphics g) {         g.drawOval(0, 0, 100, 100);      } }

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?


Let $a$, $b$ and $c$ be positive real numbers such that $$(1+a+b+c)\big(1+\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\big)=16.$$   Prove that $$a+b+c=3.$$    I am not able to get how to prove that? Thanks for help in advance .

Let $a,b,c$ be positive real numbers satisfying $$(1+a+b+c)\left(1+\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right)=16,$$ then $a+b+c=3$.  I thought about the application of the AM-GM-HM inequality, but in vain. I also thought about splitting 16 into factors and comparing but went nowhere. Any ideas. Thanks beforehand.


I have two browsers on my device: Chrome and Firefox. I usually use Firefox, but I have to use Chrome for some sites to work around Firefox bugs. All the same, I get bored of having to choose the browser every time I click a link, when it would be simple to teach the computer which sites I want to use with Chrome.  Is there another way to handle links so that I can set up Chrome to open automatically for some websites and Firefox for others, instead of having to choose every time?

I have the following browsers on my phone:   stock Dolphin Mini Opera Mobile Firefox   I don't want to set a catch-all default because some pages render better on some browsers than on others.  When I click on a link on a non-browser app (e.g. google search or google reader) it asks me which browser to choose (as expected).  Can I set a default browser for some pages and a different default for others?


They're different in different languages, but I'm looking for the name of the category of those words.  For example, a sound of dog's barking: "woof-woof". But in Russian it's "ghav-ghav";  A sound of cat: "meow". But in Japanese it's "nya".  Also various sounds that are used in comics: "boing", "bang", "poof", "ka-pow", etc.  EDIT:  These words are called "Onomatopeic"

As a spin-off from :  If a human exclaims something like "ouch!", I believe it's considered an interjection.  But if a pig exclaims "oink!", what is the part of speech?  And if a bell goes "bong!", what is the part of speech?  You could speak of "an oink" and "a bong" as nouns, but I mean in a context like      The man went "ouch!", the pig went "oink!" and the bell went "bong!"   Are interjections only for humans?


I know it is possible to do so with InDesign but why doesn't Illustrator allow this even though we can insert text?

I am creating a CV in Illustrator and exporting it to a PDF. I just read an article which stated that it is a good idea that we use hyperlinks in the CV so that the employer can just click and not have to copy the address. I like this idea, but I don't know how to add a hyperlink to text in Illustrator. Is it possible?


multiple records might have the external id.  I want to Query all the duplicate Records ,I want to know all the Records which is having same external Id  How can I perform this query?  The Answer is:  SELECT External__c, count(Id) records FROM MyObject__c GROUP BY External__c HAVING count(Id) > 1   If you are open to using Apex, you can generate a Set based on the above. If your volume is low enough, you can do it all in one go:  Set<String> externalIds = new Set<String>(); for (AggregateResult aggregate : [     SELECT External__c FROM MyObject__c     GROUP BY External__c HAVING count(Id) > 1 ]) externalIds.add((String)aggregate.get('External__c'));  List<MyObject__c> duplicates = [     SELECT Id, External__c FROM MyObject__c     WHERE External IN :externalIds ];   I am Having Large Number of Records,How to Query? then I want to know all records which is having same External Id,Guide Me for the Answer

I have an external system that needs to update a record in my org. This system only knows the external id, but the problem is that this external id is not unique, e.g. multiple records might have the  external id. Now I am changing the record id to be unique, and I want to query the all records created with a duplicate record id.  How can I perform this query?


I'm trying to do something similar to the lights around the edge of the Vegas sign, which would be really easy with the Cloner in c4d... I don't want them to deform (so Array + Curve seems to be no good) and I've tried cobbling something together in Geometry Nodes but I can't get the objects to align to the path normals: they all face the same way. Some solutions I've seen suggest doing it with Python - surely that's not necessary??

I have a chain object. And i have a curve it follows. I got it to work for following curve, but chain object is not circles but both parts are more like stretched circles (ovals). Object i made with 2 toruses one rotated 90 degrees and then joined them together. I tried single torus too. But same issue. on a curve it just looks stretched oval. What can be the issue?   Thanks


I read that the relation between temperature and kinetic energy of an ideal gas is only applicable to a large number of particles so that the mean value for kinetic energy has to be considered, so the temperature concept makes sense only as a statistical quantity. But why is that?  Using the aforementioned relation for a single, classical, non-rotating particle, it should always be possible to apply some work on it such that its velocity with respect to the ideal box that contains the particle is zero, hence making the kinetic energy of the particle zero too. But doing so, the temperature obtained is zero kelvin.  This leads to the fact that the temperature to kinetic energy relation only applies to a large number of particles. However, it sounds odd to me. Albeit being highly improbable, such a zero kinetic energy configuration should be possible for a large collection of particles too. This means that temperature is somehow related to entropy, but again, if I'm not wrong, the entropy of such a system is zero.  In conclusion, why is that the temperature for a single classical particle can't be defined? Does it exist a different temperature definition that makes it possible?

A show on  the weather channel said that as a water molecule ascends in the atmosphere it cools. Does it make sense to talk about the temperature of a single molecule?


Using Ubuntu 14.04 LTS.   sudo apt-get update   thats all i ran, and it'd start off real smooth, then it'd get to a part where it gets stuck for like a fair ammount of time after which it'd display this error.  W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_restricted_binary-amd64_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_restricted_binary-i386_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-amd64_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-i386_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-backports/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-backports_restricted_binary-amd64_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-backports/multiverse amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-backports_multiverse_binary-amd64_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-backports/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-backports_restricted_binary-i386_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-backports/multiverse i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-backports_multiverse_binary-i386_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-security/restricted amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-amd64_Packages)     W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty-security/restricted i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-i386_Packages)     W: You may want to run apt-get update to correct these problems   of course the suggestion it suggested isnt going to work, as it's that very command after running which i came across the error.  I've tried creating a new sources.list file, and also, in the 'other software' tab in the updater settings, i found two "canonical Partners" and thus i eradicated one of them. Still it wont work.  there are a number of lists that the error tells of... I checked one and couldnt make any sense out of it.   Also, I installed the 32bit architecture manually so as to be able to use skype

I keep getting this warning whenever I try to run sudo apt-get update.  W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   Below is the output from /etc/apt/sources.list file:  deb http://archive.ubuntu.com/ubuntu precise main restricted deb-src http://archive.ubuntu.com/ubuntu precise main restricted  deb http://archive.ubuntu.com/ubuntu precise-updates main restricted deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted  deb http://archive.ubuntu.com/ubuntu precise universe deb-src http://archive.ubuntu.com/ubuntu precise universe deb http://archive.ubuntu.com/ubuntu precise-updates universe deb-src http://archive.ubuntu.com/ubuntu precise-updates universe  deb http://archive.ubuntu.com/ubuntu precise multiverse deb-src http://archive.ubuntu.com/ubuntu precise multiverse deb http://archive.ubuntu.com/ubuntu precise-updates multiverse deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse  deb http://archive.ubuntu.com/ubuntu precise-security main restricted deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted deb http://archive.ubuntu.com/ubuntu precise-security universe deb-src http://archive.ubuntu.com/ubuntu precise-security universe deb http://archive.ubuntu.com/ubuntu precise-security multiverse deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse   How do I fix it?


If A and B are similar, how does one prove that tr(A) = tr(B)

Let $A$ and $B$ be $n\times n$ matrices. Suppose $A$ is similar to $B$. Prove $\operatorname{trace}(A) = \operatorname{trace}(B)$.  I'm not sure where to go on this. So far I have this:  If $A$ is similar to $B$, then      $B=P^{-1}AP$ and $A=PBP^{-1}$   This implies that:     $\operatorname{trace}(B) = \operatorname{trace}(P^{-1}AP)$ and $\operatorname{trace}(A) = \operatorname{trace}(PBP^{-1})$   Not sure where to go from here


Let $G$ be a group of order 35. Show that $G \cong Z_{35}$  Now, I am going to assume that this is a LaGrange based question. Also, I know that in order to be isomorphic, it must be one to one and onto.

I've been asked to prove this.   In class we proved this when $n=15$, but our approached seemed unnecessarily complicated to me. We invoked Sylow's theorems, normalizers, etc. I've looked online and found other examples of this approach.    I wonder if it is actually unnecessary, or if there is something wrong with the following proof:   If $|G|=35=5\cdot7$ , then by Cauchy's theorem, there exist $x,y \in G$ such that $o(x)=5$, $o(y)=7$. The order of the product $xy$ is then $\text{lcm}(5,7)=35$. Since we've found an element of $G$ of order 35, we conclude that $G$ is cyclic.   Thanks.


In all d&d books that I had on my hand, nothing mention the progeniture of two dragon of different colors (red and green, silver and gold or even red and gold). Is something say that dragon can only reproduce with a dragon of the same color?  If not, the baby will be only of one color? or an hybrid of the two color? A dragon with no power?

Is it possible, and if so, what happens when a metallic and chromatic dragon mate? I'm most interested in blue and bronze dragons.  I'm interested in lore from all editions except the fourth edition.  This question is for a specific campaign of mine.  General information about dragon lore of breeding habits are also interesting, but in particular:    both what kind of offspring is producing what kind of lineage would follow for its own offspring?


as far as I know, it is not possible to execute bash functions in a makefile, so I put them in a external shell script and I call the script from the Makefile. running the script directly works well, but running through the makefile throws the error:    make deploy_staging  ./deploy.sh ./deploy.sh: 1: ./deploy.sh: function: not found publishing  usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run:   aws help   aws <command> help   aws <command> <subcommand> help aws: error: argument --function-name: expected one argument ./deploy.sh: 4: ./deploy.sh: Syntax error: "}" unexpected Makefile:7: recipe for target 'deploy_staging' failed make: *** [deploy_staging] Error 2   this is my deploy.sh script (the one that works if executed directly):  function publish {   echo "publishing $1"   aws lambda update-function-code --function-name $1 --zip-file fileb://./dist/src.zip }     publish endpoint1 publish endpoint2   and this is how I am calling it from the makefile:   deploy_staging: dist/src.zip     ./deploy.sh   wonder why Make complains about the "}" character, I expected the content of the script to be hidden or isolated from the point of view of the makefile.

I'm writing a script to copy some files around, and trying to use shopt -s dotglob  like .jshint and whatnot.    I can run shopt -s dotglob directly at a bash prompt with no error.  However, running the script throws the error:  script.sh: 81: script.sh: shopt: not found   I'm running this script in bash shell, with the shebang header #!/usr/bin/env bash.  Error line:  shopt -s dotglob cp -r $TEMP/img/* $TARGET/img/ cp -r $TEMP/js/* $TARGET/js/ cp -r $TEMP/less/* $TARGET/less/   Not finding anything helpful on google, any idea what the problem is here?


I'm facing a dilemma here: Stack Overflow now requires users to demostrate prior solution attempts whenever they post questions that ask for code. In the case of self-answered questions, this rule seems problematic: are users required to demonstrate prior solution attempts when they already know the answer to a question, or does the rule not apply at all in this case?  In order to comply with this new requirement, will I be required to post a redundant solution attempt for a problem that I've already solved, or will it be acceptable to post the question without showing a prior solution attempt (since the only solution that I have so far is a completely working solution)?

As I understand it Q&A style questions are  but a self answered question should be judged independently of the answer. Often after I've solved a problem I would like to share the question and answer on stack overflow (and have on a couple of occasions) but how to show "minimal understanding of the problem" is always challenging. For example I have been looking into the following question  How can I plot a straight line in the JMonkey Engine library I'm trying to plot straight lines between vertices that I specify using the JMonkey Engine 3D graphics library. So for example if I was to try to plot between: (2,0,0) (-1,0,1) (0,1,1) (1,1,1) (1,4,0) Then I would get:   This is something I do (and forget how to do) relatively often and the answer is harder to find than you'd imagine ( provides everything needed to figure it out but its spread out over several posts and isn't a complete solution on its own). Therefore I want to provide a Q&A for it but at present this question feels like it would fail the minimal understanding test  Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work  Should I make up some imaginary problem? (Probably the final source code messed up a bit) Or mention in the question that I’m self answering to assuage some of the normal "This is not a do your work for you site" comments.


I had a partially frozen pork tenderloin that I browned on all sides, then put into a hot oven at 365 degrees.  At some point the oven was accidentally turned off.  An hour and a half later I discovered the oven was warm, but off.  The internal temp of the pork at this point was 120 degrees.  I then turned the oven back on and finished cooking to an internal temp of 180 degrees. It was actually very tender.  Is it safe to eat?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


What is Big O notation and why do we measure complexity of any algorithm in Big O notation? An example will do the good.

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


Recently I've noticed that whenever I open a question that has imgur.com-linked images, I get a mixed content warning (and, indeed, imgur links have http: prefix), which is strange since I use HTTPS Everywhere extension for Firefox (which should set all prefixes to https). That also seems to be true for some other sites (which might suggest that it's a Firefox problem).   EDIT: whatever the site configuration, I expect HTTPS Everywhere to replace the imgur-links with their https versions (they do work on their own). Moreover the extension has a . Isn't it correct and shouldn't that be enough?

Stack Overflow has HTTPS in some places! However, this breaks most existing image links. Could those be made protocol-relative, or react to the requesting protocol, or just always use HTTPS?  The same applies to .sponsor-tag-img.


I've got a collection of selectable divs on my page  $(function() {    $('#selectable-divs div').click(function(){    var x = $('#selected-divs div').attr('id');    alert(x);    }); });

Item 1

Item 2

Item 3

Item 4

Item 5

Item 6

   I'm looking for correct jQuery that would capture the ID value of whats been selected/clicked in the "selectable-divs" collections. The selectable part of the jquery works fine, however, when I click the div, it returns a value of "undefined" in the alert box

Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); <script type="text/javascript" src="starterkit/jquery.js"></script>  <form class="item" id="aaa">   <input class="title"></input> </form> <form class="item" id="bbb">   <input class="title"></input> </form>     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form.


On an android app, called Classic Solitaire Klondike from Potato Jam, I'm struggling with a deck which seems unsolvable. In this app, 100% of the decks had a solution before. I wrote a solver running every possible solution, but nothing comes out. Here's a capture done with my solver:  I represented with red color the cards I never managed to flip. So I get stuck quite fastly. In the app, the deck is identified by the following seed number: 43688966 I guess I must probably miss something, but can't see where ...

I play a lot of Solitaire games on my Android phone and love to keep an eye out for the statistics.  Given that the Solitaire version lets you restart the game endlessly, I usually play until I solve it. But I never managed to solve more than 80% of the games played (1000+).  So now I wonder, is every Solitaire game solvable?


Those two integrals $$\displaystyle\int \sqrt{\sin \left( x\right) } dx$$ and $$\int ln \left( \sin \left( x\right) \right) dx$$ one of them  known if it definite. The integration is  $$ \int \limits^{\pi }_{0}\sqrt{\sin \left( x\right) } dx = 2\sqrt{\frac{2}{\pi } } \Gamma \left( \frac{3}{4} \right) ^{2}$$ My question is how we can evaluate those two integrals in indefinite form? .  Thanks

$$\int \sqrt{\sin x} ~dx.$$  Does there exist a simple antiderivative of $\sqrt{\sin x}$? How do I integrate it?


I am trying to install ruby virtual machine by running commands from terminal.While installing rails some error occurs and terminal got stuck up.What should be the action in the specified case.I tried ctrl+esc, esc, ../ etc like command prompt from windows.But it doesn't work.What is the proper way to end the process without closing the terminal?

How do I end all processes with the same name in a more gentle way than killall does? I don't want to interrupt the processes, but leave them time to properly quit.    See also:


forfiles -p "C:\what\ever" -s -m *.* /D -<number of days> /C "cmd /c del @path"   I am using the above set to 90 days.  It does not want to delete files previous unless set to 30 days.  Not sure what I am missing.

I am having issues making this syntax work correctly. What I would like to do is remove all tmp and bak files from the specified directory and all subdirectories if the modified date is older than 7 days.  for %G in (.tmp, .bak) do forfiles -p "C:\test\cad projects" -s -m *%G -d -7 -c "cmd /c del @path"   My syntax was gathered from .  If I change my search mask to only include one desired extension then I get correct results.  forfiles -p "c:\test\cad projects" -s -m *.bak -d -7 -c "cmd /c del @path"   I don't do much with batch files so I was hoping someone could assist. Thanks for reading.


Is it possible to set the terminal NOT to scroll down to the last line when the program that is currently running outputs data on the standard output ?  I have a program that is running and is constantly outputting data to stdout thus updating the terminal and the terminal automatically scrolls down to the last line and does not let me read the data that was outputted before or other commands that I have previously run.

In Ubuntu, I want to scroll up while a command is running in my terminal window and generates new output (the command that is running is rspec). I can scroll up, but each time rspec generates a new line of console output, it throws me back down to the bottom. Is there a way to scroll all the way up? I'm using terminator on Linux Mint/Ubuntu 12.04 LTS. I found a possible workaround.  says that with stty ixon  you can turn on "XON/XOFF flow control for terminal output. Being able to pause output by typing ^S and resume it by typing ^Q [...]" This it not totally what I wanted though, without having to pause the output (and maybe wondering when forgetting to turn it on again), I thought there might be a simple modifier key like shft-alt with mouse wheel scroll-up. Are there better solutions?


It’s the first time I use Ubuntu and I don’t have a clue how to download and install programs. Can anyone help?

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


Suppose that $P(X_{1} = x) = P(X_{2} = x) = \frac{1}{a} e^{-\frac{x}{a}}$ and $Y = X_{1} + X_{2}$. I am trying to find $P(Y = y)$. What I've done is \begin{align} P(Y = y) &= \int P(X_{1}=x_{1})P(X_{2}=x_{2})P(Y = y| X_{1} = x_{1}, X_{2} = x_{2}) dx_{1}dx_{2} \\          &= \int  \frac{1}{a} e^{-\frac{x_{1}}{a}} \frac{1}{a} e^{-\frac{x_{2}}{a}} \delta(y - x_{1} - x_{2})dx_{1}dx_{2} \\          &=  \int  \frac{1}{a} e^{-\frac{x_{1}}{a}} \frac{1}{a} e^{-\frac{y-x_{1}}{a}}dx_{1} \\          &= \frac{1}{a^{2}} \int e^{-\frac{y}{a}}dx_{1} \\          &=\frac{1}{a^{2}} e^{-\frac{y}{a}} \int dx_{1} \end{align} Which goes to infinity and even if I renormalize it I get $\frac{1}{a}e^{-\frac{y}{a}}$ which I know is not the correct answer. What exactly am I doing wrong?

Question: Let $X$ and $Y$ be two independent and identically distributed exponential random variables with parameter $\lambda>0$. Compute the probability density function of $X+Y$.   My Answer: I have found the joint probability density function of $X$ and $Y$ to be $f_{X,Y}(x,y)=\lambda^2e^{-\lambda x - \lambda y}$. I then let $Z=X+Y$ and calculated $F_Z(z)=\lambda^2e^{-\lambda z}$.  I know I need to integrate $F_Z(z)$ to calculate the density function but am unsure on what the limits should be or if I found $F_Z(z)$ correctly. I was also wondering if there is a quicker way to tackle such questions or if this method is okay.


I'm using Slovenia characters and PHP MySQL select where clause to fetch results from the database. This query is working properly with English letters but has an issue with Slovenia letters like (ć, č, đ, š). I have set database collation to utf8_slovenian_ci. And encoding of php files is utf8

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I have a new Dell XPS 15 9560, which comes with Windows 10 Home 64-bit. I want to scratch that OS entirely and run Ubuntu 16.04.3 desktop amd64.   I use an external ASUS DVD, attached to USB3. From within Windows it works as expected, both to read and write.  However, booting with the proper Ubuntu image on the DVD encounters problems. I obtain the menu with four entries. Selecting either Try Ubuntu or Install Ubuntu brings up a screen with the word Ubuntu and a progress bar under it. Activity continues for a while, and then nothing more happens. If I started tty1 (ctrl+alt+F1) before it get stuck, I can see activity traces, which indicate errors like  ACPI exception AE_NOT_FOUND/while loading table ACPI error 1 table load failure, 12 successful DRM: failed to create kernel channel, -22.    To get away from this, I have to do a hard reboot. The Windows system is not affected.  There are obviously a number of different parameters that might affect this behaviour, and I have made changes which appear ok, e.g. changing to SATA AHCI from RAID. Dell support have no answer, as it should suffice to press F12 during boot to select the DVD drive, provided it is enabled for boot in the BIOS.  How to possibly resolve this problem?  Continued research:   Burnt the same 16.04.3 XPS AMD64 iso distribution to a USB memory, and attempted a new install. This time, Ubuntu appeared to install, granting all the questions required, but at the final "Reboot now" to complete the install, nothing happened, thus no reboot performed, although waiting a long time. Performed a hard reboot. At boot, the ubuntu boot option was there, but without being able to boot. Burnt ubuntu-17.04-desktop-amd64.iso to the same USB, and attempted a new install. This time, install completed, and the machine could be rebooted by clicking the "Reboot now" button. System booted and presented the login screen to logon as the administrator. Entering the appropriate password, followed by clicking on the arrow at the right end of the password field, resulted in only the background screen, no status line at the top of the window and no pointing device available. The only way out of this seems to be a hard shutdown. Left the laptop with a friend, who succeeded to install Ubuntu 17.04 desktop amd64. Most things appear to work now. There still are flaws (no exception messages, does not shutdown properly, some installs do not start after installation completed, installs using the Ubuntu install service might not run at all. Comments by friend: Seems to be two different graphics, NVIDIA and another. Currently additional driver in use is x.org.xserver - Nouveau display driver from xserver-xorg-video-nouveau. The NVIDIA binary driver, ver 375.66 from nvidia-375 not in use. Problems with graphics also seen in document: .    In all cases, UEFI was used, secure boot was disabled, SATA mode changed from RAID to AHCI, and fastboot set to "thorough" in POST behavior. The machine used was Dell XPS 15 9560 with 32GB memory, 1TB SSD, and, as currently reported by Ubuntu 17.04 desktop:  Processor: Intel Core i7-7700 HQ CPU @ 2.80GHz x 8;  Graphics:  Intel Kabylake GT2;  OS type:   64-bit;  Disk:      1TB;  To summarize, the problems encountered might be due to inappropriate graphics driver usage, although exact reasons are unknown.

I am using a 7th generation i5 processor(7200,2.50 ghz).The processor also have intel hd graphics 620 and nvidia geforce 940mx 2gb graphics card. I read previously that only windows 10 can be installed to this specific processor.  Is it true no version of ubuntu can be used with this processor?  If it's possible to install ubuntu using this processor, what additional steps other than the normal installation process should I undertake to get Ubuntu working?


The hostname of my name is very long, which is odd. How can change the hostname for my system?  My hostname, currently, is   himanshu@himanshu-Lenovo-ideapad-100-15IBD:~$  Is there any way I can shorten this or change it entirely?

I want to change the OS hostname but I do not want to restart.  I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this?


I'm knew to this site spice so please be gentle :)  I've installed LTSpice (LTspice XVII for OS X, Build Oct 25 2018, 14:56:22 US Pacific) on a MacBook Pro running macOS High Sierra 10.13.6.    When I try to add anything to the schematic the display does not refresh and I get the remnants of moving the component across my schematic.  See the image for what I mean.  Hopefully someone can help me on this as I prefer to run a native tool rather than something in a vm.  Thanks!

Hi. I installed LTSpice in my macbook pro late 2011 with this specs:  OS: Mac OS high Sierra 10.13.6 Graphic: Intel HD Graphic 3000 512MB RAM: 16 GB  somehow I got a bug when i moved a component or wire which showing a shadow of footprints along the moving trajectory. (shown in image)  has anyone encountered the same problem? I've tried to searched the answer but didn't find the same case anywhere. Anyone got an idea?  Thanks for helping. I know this is not 100% EE, let me know if I should post this in stack.


What is the rule regarding the use of definite article (the) before superlative adverbs? Is it mandatory, optional, or not required at all to use the before superlative adverbs?

Is there a difference between these two sentences? Are they the same?   What color do you like the best? What color do you like best?   Is there a difference in their meaning?


According to my knowledge factorial means that the number is multiplied by the numbers preceding it up to $1$ . That's it . $5!=5×4×3×2×1=120$  $4!=4×3×2×1=24$  $3!=3×2×1=6$  $n!=n×(n-1)×\cdots \times 2×1$  And similarly  $0!=0×(-1)×(-2)\times\cdots\times1$   But this is not possible as we have crossed 1 before and another 1 is bot possible . So it should be ND. please tell me where I am wrong

Possible Duplicate:             If I'm right, factorial $!$ means:  $$n!=1 \cdot 2 \cdot 3 \cdot 4 \cdots n $$  so:  $$ \begin{align} 5!&=1\cdot2\cdot3\cdot4\cdot5=120\\ 4!&=1\cdot2\cdot3\cdot4=24\\ 3!&=1\cdot2\cdot3=6\\ 2!&=1\cdot2=2\\ 1!&=1 \end{align} $$  But what is $n!$ when $n=0$?  It can't be undefined and it can't be $n!=0$, since those are illegal in known equations like:  $$e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$$  So what is it?


How to remove a dot and a page number in the environment glossaries? See the picture below - the yellow mark.  Thanks for help.    \documentclass[10pt,a5paper]{book} %46paper \usepackage[utf8]{inputenc} \usepackage[main=slovak,english]{babel} \usepackage[cm]{fullpage} \usepackage[a5paper, top=15mm, left=10mm, right=10mm, bottom=10mm,foot=5mm,marginparsep=0mm]{geometry} \usepackage{amssymb} \usepackage{tipa} \usepackage{glossaries}   %-----------------------------------------------  \usepackage{tikz} \newcommand{\ballnumber}[1]{\tikz \node[circle,fill=.,inner sep=1pt,anchor=south] {\color{-.}\bfseries #1};}    % GLOSS  %----------------------------------------------- \makeglossaries \newglossaryentry{to catch} {   name={ to catch },   description={ [\textipa{k\ae tS}] $\bullet$ \textbf{caught} [\textipa{kO:t}] $\bullet$ \textbf{caught} [\textipa{kO:t}] $\blacktriangleleft$ {\tiny \ballnumber{1}} chytať, dochytať \textit{čo (rukami)}  } }   \begin{document} \catcode`\-=12 \sloppy   \gls{to catch}  \printglossaries  \end{document}

I use the glossaries package for my glossary and some acronyms: \usepackage{datatool} \usepackage[ngerman]{translator} \usepackage[nonumberlist,acronym,toc,section]{glossaries}  \makeglossaries  ...  /% Glossary \printglossary[style=altlist,title=Glossar]  /% Acronyms \deftranslation[to=German]{Acronyms}{Akronyme} \printglossary[type=\acronymtype,style=long]  Curiously, glossaries makes a period after each acronym. Screnshot:  How can you change that?


Probably an easy measure theory exercise, but I am drawing a blank. I have done exercises like this before, and I feel like I have wanted to consider a set like $A=|f|^{-1}[1,\infty)$ and split the summation/ integral over $A$ and $A^c$. Doesn't quite seem to be working for me in this case. If anyone has some hints for me that would be excellent.

currently I am working on the following two exercises as a revision for my exam.  Let $\mu$ be the counting measure on $\mathbb N$.   Show that if $1 \le p < s < \infty$ then $f \in L^p$ implies $f \in L^s$ and $\|f\|_s \le \|f\|_p$. Show that if $f \in L^p$ for some $p \ge 1$ then $\lim_{s \to \infty} \|f\|_s = \|f\|_\infty$.   My attempts so far:   It is $f \in L^s$ iff $\sum_{k = 1}^\infty |f(k)|^s$ converges. Since $f \in L^p$ we know that $\sum_{k = 1}^\infty |f(k)|^p$ converges. Thus for any $\varepsilon > 0$ there is $N \in \mathbb N$ s.t. \begin{align*} k \ge N \Longrightarrow |f(k)|^p < \varepsilon \Longrightarrow |f(k)| < \varepsilon^{1/p} \end{align*} We have $\forall k \ge N$ that $|f(k)|^s < \varepsilon^{s/p}$. Originally I wanted to use the comparison test now, showing that \begin{align*} \sum_{k = N}^\infty \varepsilon^{s/p} < \infty, \end{align*} but that does not work since \begin{align*} \sum_{k = N}^\infty \varepsilon^{s/p} = \varepsilon^{s/p} \underbrace{\sum_{k \ge N} 1}_{= \infty},  \end{align*} so I don't know how to go on here. Let $K := \|f\|_\infty$. We need to show that $\forall \varepsilon > 0$ $\exists M \in \mathbb N$ s.t. \begin{align*} s \ge M \Longrightarrow \left|\left(\sum_{k = 1}^\infty |f(k)|^s\right)^{1/s} - K\right| < \varepsilon. \end{align*} Choose $M$ s.t. $M > p$. Then $s > p$ and from part (i) we know that \begin{align*} \left(\sum_{k = 1}^\infty |f(k)|^s\right)^{1/s} \le \left(\sum_{k = 1}^\infty |f(k)|^p\right)^{1/p}. \end{align*} But how can I use this?


I'm trying to add some survey results to a database using PDO. Because the survey has 50 questions I thought I would add them using a PHP foreach loop to add the result of each question.  There are two different tables. One is the respondent table that contains users details (name, email etc). And the other table is a responses table that shows the respondents answers to the survey and is linked by their ID.  Everytime I run this I get the error:      Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064   The first statement execution runs fine and I can see the users details added to the database, but I cannot get the second statement to run successfully.  //Add respondent to database $sth = $dbh->prepare("     INSERT INTO `respondents` (`id`,`firstname`,`lastname`,`email`) VALUES (?,?,?,?);     INSERT INTO `responses` (`rid`) VALUES (?) ");  $sth->execute([$id, $first, $last, $email, $id]);  //Add survey results $sth = $dbh->prepare("     INSERT INTO `responses` (?) VALUES (?)     WHERE `rid` = ? ");  foreach ($responses as $key => $response) {     $sth->execute([$key, $response, $id]); }   I'm a bit new to PDO and MySQL so I'm sure this isn't the best way to do this so any help would be appreciated. Thanks.  Full error:      Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''1') VALUES ('1'); WHERE rid = 'df3f745ad872d72aa6466e571af743eb''

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I was really excited to read about a recent experiment at Fermilab.  one can read the article. A dicrepency was seen between the calculated value of the muon  $g-2$ factor, in the context of the standard model, and the experimental value. A truly breathtaking experiment! Finally new physics! But what is the new physics? What are the new particles? What is the new force? Can a substructure of the muon be responsible? Does it have to be substructure? What new particles could be involved, if no substructure is involved? EDIT What if the value that is found in experiment turns out to be truly different from the theoretical value? I'm already inclined to think that this is already the case, in all my excitment, but I should not, indeed, jump too high too soon. But suppose there comes a point in the future tyhat there is no doubt anymore. IF. What could the new physics be? Like the magnetic moment of the proton showed a value hinting to substructure (three quarks), this could also be the case for the muon. What else could be the case if substructure is not involved? And now I see the list given below, by @G.Smith...

The nature of the experiment has been discussed , but my main question is this: is there any theory that has predicted the results of this experiment or are we completely clueless about what's happening? In other words, have we come up with a new hypothetical interaction that could explain the results?


#!/bin/bash  current_date=$(date +"%m-%d-%Y") file="name Backup ($current_date)" tar -cvzf $file.tgz module8   My output needs to be named "name Backup $current_date"  When I run the script is just names the file "name" not even "name.tgz"  This is what I get for an output  name                 | 175 kB | 175.0 kB/s | ETA: 00:00:00 | 100%  Backup: No such file or directory  (03-16-2019).tgz: No such file or directory

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


Rather than seeing this screen    I hope to see Ubuntu 16.04 booting process. How should I see that?

Lately, booting Ubuntu on my desktop has become seriously slow. We're talking two minutes. It used to take 10-20 seconds. Because of plymouth, I can't see what's going on. I would like to deactivate it, but not really uninstall it. What's the quickest way to do that? I'm using Precise, but I suspect a solution for 11.10 would work just as well.


It seems that he is rich.   and     It appears that he is rich.    These two sentences seem to me similar. Is there any slight difference?

Are there any significant structural or semantic differences between seem, appear and look in the sense of "to give the impression of being or doing something"?        She looks unhappy.   He seems angry.   They appear (to be) contented.   It looks as if it's going to rain again.   It looks like we're going home without a suntan.   It seems as if they're no longer in love.   It seems like she'll never agree to a divorce.    They appear to have run away from home. They cannot be traced.   I seem to have lost my way. Can you help me?   It seems to be some kind of jellyfish. Do not go near it.   They appear not to be at home. Nobody's answering.   They do not appear to be at home. No one's answering.    It seems that I may have made a mistake in believing you did this.   It appears that you may be quite innocent of any crime.   It looks as if/like you won't go to prison after all.   It seems a shame that we can't take Kevin on holiday with us.   It doesn't seem like a good idea to leave him here by himself.   It seems ridiculous that he has to stay here to look after the cat.


I want to redirect all domains from a specific directory to a new subdomain (invisibly).  e.g. example.com/literal/some/path/to/file.html -> sub.example.com/literal/some/path/to/file.html AND  www.example.com/literal/some/path/to/file.html ->  www.sub.example.com/literal/some/path/to/file.html  Where "literal" should be constant, and anything that comes after it is arbitrary.  I've tried things like   RewriteEngine on RewriteCond %{HTTP_HOST} ^example\.com/literal RewriteRule ^(.*)$ http://sub.example.com/$1 [L]   But I can't get all the options right. Any help appreciated.

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


When I started the download for 14.0.4.3 32-bit I didn't find any obvious link to a list of checksums. I'd suggest that site management add that information. in the meantime can someone point me to the appropriate checksum please!

I've just downloaded a CD image of Ubuntu. I know the installer has a check CD option, but how can I check that the image is good before burning it to CD?


What does the star mean in $\rightarrow ZZ^{(∗)}$? Z boson can neither be positive nor negative. "For masses above 130 GeV, Higgs-boson decays, H $\rightarrow ZZ^{(∗)}$, where each Z decays to a pair of oppositely charged leptons, would provide the experimentally cleanest channel to study the properties of the Higgs boson." Quoted from "The ATLAS Experiment at the CERN Large Hadron Collider"  page 2 or 3

I can always find that in some articles the production of higgs decay written as "$\rm H\to {ZZ}^*\to 4l$", "$\rm H\to ZZ\to 4l$", "$\rm H\to Z\gamma^*\to\ldots$” What dose it mean when some particles with a superscript *? Such as “$\rm Z^*, W^*, \gamma^*, \ldots$". What’s the difference between them and "$\rm Z, W, \gamma$"?


I am trying to show the following- If $X_n$ converges in distribution to $X$ and $Y_n$ converges in probability to 0, then show that $X_nY_n$ converges in probability to 0.  Attempt- $$P(|X_nY_n|>\epsilon) = P(|X_nY_n|>\epsilon,|Y_n|>\eta) + P(|X_nY_n|>\epsilon,|Y_n|\leq\eta) \leq P(|Y_n|>\eta) +P(|X_n|>\epsilon/\eta)$$  Now the term on the left goes to 0 but what do I o with the remaining part, can someone please provide the solution.

I have to show : $X_n \to X$ in distribution, $Y_n \to 0$ in probability $\implies$ $X_nY_n \to 0$ in probability.   Let $\alpha>0, \epsilon>0$. Then $\exists \delta>0$ such that $-\epsilon/\delta$, $\epsilon/\delta$ are continuity points of distribution of $X$ and $$P(|X|>\epsilon/\delta) \leq \alpha$$  Since $X_n \to X$ in distribution, $P(X_n \leq x) \to P(X \leq x)$ for all continuity points $($and in particular $-\epsilon/\delta$ and $\epsilon/\delta)$. There exists $N_1, N_2 \in \mathbb{N}$ such that $$n \geq N_1 \implies |P(X_n \leq -\epsilon/\delta) - P(X \leq -\epsilon/\delta)|<\alpha$$ $$n \geq N_2 \implies |P(X_n \leq \epsilon/\delta) - P(X \leq \epsilon/\delta)|<\alpha$$ Let $N=\max\{N_1,N_2\}$. Then for $n \geq N$,  $$P(|X_n|>\epsilon/\delta)=1-P(|X_n| \leq \epsilon/\delta)=1-P(-\epsilon/\delta \leq X_n \leq \epsilon/\delta) = 1-P(X_n \leq \epsilon/\delta)+P(X_n < -\epsilon/\delta) = 1-P(X_n \leq \epsilon/\delta)+P(X_n \leq -\epsilon/\delta  \,\,[\text{by continuity}] \leq 1-P(X \leq \epsilon/\delta)+P(X \leq -\epsilon/\delta)+2\alpha = P(|X|>\epsilon/\delta)+2\alpha \leq 3\alpha$$  Since $Y_n \to 0$ in probability, $\exists$ $N_3 \in \mathbb{N}$ such that $$n \geq N_3 \implies P(|Y_n|>\delta) \leq \alpha$$  Choose $N^{*}=\max\{N,N_3\}$. Note that $$|X_nY_n|>\epsilon \implies |X_n|>\epsilon/\delta \,\,\text{or}\,\, |Y_n|>\delta$$ Hence, $$P(|X_nY_n|>\epsilon) \leq P(|X_n|>\epsilon/\delta \,\,\text{or}\,\, |Y_n|>\delta) \leq P(|X_n|>\epsilon/\delta)+P(|Y_n|>\delta)$$ Thus, $$n \geq N^{*} \implies P(|X_nY_n|>\epsilon) \leq 4\alpha$$ Since, $\alpha>0$ is arbitrary, $X_nY_n \to 0$ in probability.     Is the proof okay? I have a feeling that I have sort of over-killed it. Is it possible to write a shorter proof of the result? Thank you.


Here's a piece of pseudo code that i wanna compute the big-O of it, but i have difficulty to calculate it, does someone can help me? thanks!   for i = 1 to p   for j = i to n     for a = i to j       for k = 1 to m         ;

I need to calculate the time complexity of the following code:  for (i = 1; i <= n; i++) {   for(j = 1; j <= i; j++)   {    // Some code   } }   Is it O(n^2)?


Is there a difference between using "it seems" and "it seems that" For example:  "It seems that automatic restart is not happening now" "It seems automatic restart is not happening now"  Which one is correct?  Or are they both?

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


$(*)$ Let $\{ x_n \}$ be a sequence where $x_n$ is either $1$ or $-1$. Then   $$ \sum_{n=0}^{\infty} \frac{ x_n}{n!} \; \; \; \text{is irrational}$$  This problem arise when I was trying to prove that $e$ is irrational. If the result above is true, then we can put $x_n = (-1)^n $ and hence   $$ \frac{1}{e} = \sum \frac{(-1)^n}{n!} \; \; \; \text{is irrational} $$  which would imply that $e$ is irrational.   So, my question is: Is $(*)$ true?

How can one prove that the series $\displaystyle \sum\limits_{n=1}^\infty \frac{1}{(n!)^2}$ converges to an irrational number? There's no need to use Taylor expansion, integrals or any advanced/professional techniques. It can be proved using only basic techniques. My first attempt was to assume that the series does converge to a rational number $ \frac{p}{q}$ and then it follows by definition that for every positive epsilon there exists an integer k such that $ {\sum_{n=1}^{k} \frac{1}{(n!)^2} -\frac{p}{q}}<=\epsilon$ I tried to get a contradiction but I failed.


I recently read an SEO blog post where the author was giving examples of how to improve the SEO of an e-commerce page.   One of the points the author made was to have a blog, such as blog.example.com where updates can be made.   I thought this would only have an effect on blog.example.com and not example.com/product-1.  Similarly do other areas of SEO work in the same way.  For example does a link to blog.example.com have an effect on example.com/product-1?

If I have example.com, and blog.example.com, do search engines see those as one site or two? Will using subdomains hurt SEO? I have some technical reasons why I can't use example.com/blog.


There are two descriptions of axiom of choice that are considered equivalent. The first one goes like this:  Let $({X_i})_{i \mathop \in I}$ be an indexed family of sets all of which are non-empty, indexed by $I$ which is also non-empty. Then there exists an indexed family $({x_i})_{i \mathop \in I}$ such that $\forall i \in I: x_i \in X_i$  The second one goes like this:  That is, the Cartesian product of a non-empty family of sets which are non-empty is itself non-empty.  I don't see how the second one is equivalent to the first one. Can someone illustrate with an example that both the descriptions mean the same thing?

I understand that the axiom of choice, given the axioms of ZF set theory, is equivalent to the statement that "the Cartesian product of any family of nonempty sets is nonempty." I've been unable to find this proof. Could someone sketch it for me? Or provide me with a source at least?


Is there any way to set a shortcut (e.g. ctrl+alt+n) for creating a new folder in windows 7?   This is obviously instead of right clicking and pressing create new folder.

Does anyone know the shortcut key to create a new folder in Windows Explorer and in Finder?  Also, does anyone know the shortcut key to create a new folder on the desktop?  (I'm using windows vista and mac os x)


As we are printing the words behind our t-shirt, my friend insisted that the correct word is thanks instead of thank. Please advise

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


I have exported game archive with all objects. I also have CSV file with all their details, such as model name, location, rotation (XYZW). How do I import CSV file, and make blender read it and put all objects on the places?  Ps. Z rotation axis must be multiplied to '-1'.

How can i use the value in column 'lon' and 'lat' as the position of my uv_sphere? For example,read the values from line 4, (116.4559081, 39.9139083), and make these 2 numbers as my uv_sphere x and y position in blender? and gives different colors for different mode, for example i have 4 modes in the csv , i want to make the uv sphere that represents the bus mode to be red, and subway to be green , rail to be blue and tram to be yellow., and use the row ['from'] and ['to'] to connect the nodes with a cylinder with x scale 0.5 , y scale 0.5 and the z scale with the value in ['length'] value.


I do not know how to create a directory within my Home directory.  I also need to name the directory A452.  How do I do this?

How can I make a directory on the desktop?  I tried cd /desktop command but it gives an error  no such file or directory.  What's the correct command?


Should this question begin with Whoever or Whomever:  W--- we trust the most is really our master.  Clearly the clause "W-- we trust the most" is in the subjective (nominative) position in the sentence as a whole, followed by "is" and a predicate nominative. However, if "We" is the subject of that clause, it would seem that the objective (accusative) case (therefore "Whomever") would be correct. Our current sloppy and hideously erroneous usage tends to obliterate objective forms ("whom") in most cases, but what is the correct usage?

He created it.  Put me in touch with him.   So which is correct and why:   Put me in touch with whomever created it. Put me in touch with whoever created it.


How is the path of a directory retrieved in UNIX filesystems? Since directories are pointing to subdirectories it seems like the path need to be set together from the parent and parent parents etc.  Is this how it's done or are the paths stored somewhere in the inodes?

Where are filenames stored on a filesystem?  It's not in inode or with the actual file content since we have hard link that two filenames can point to the same inode.


I am trying to write my own class and I don't quite understand the use of percent signs. For example, I have this snippet of code in my .cls file: \renewcommand{\maketitle}{     \begin{center}         \huge\bfseries{foo}     \end{center} }  However, scanning through examples online, I have noticed the use of percent signs: \renewcommand{\maketitle}{%     \begin{center}         \huge\bfseries{foo}     \end{center}% }  These two bits of code seem to work exactly the same. I'm wondering, is there any difference between the two (I'm guessing the % sign does not have the same meaning that is has in .tex files)?

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


I'm trying to stall magic wormhole on 18.04. But I get this error:  I tried to resolve it by installing those missing packages, but no go. Why does linux make it so difficult to figure out how to fix these problems.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Need some more routes from India to Grand Cayman. How can I book air ticket from India to Georgetown, Cayman Islands without any Transit visa that is required by UK/USA, or which are the countries where I can take connecting flight of same airways or different airways without any further transit visa that is required in USA/UK.

I recently found out that if I travel From India to the Cayman Islands via UK/USA, I will need a transit visa. So which countries or route or airway should I choose to get to the Cayman Islands for which a transit visa will not be needed?


Given weight = mass * gravity do I weight less during high tide and more when tide recedes?  My guess is weight = mass * gravity * gravitational pull of moon factor

Using $g = \frac{Gm}{r^2}$, the force on a point mass located at 1 AU from the Sun ($m = 2 \cdot 10^{30} \text{ kg}$) is about ~0.006 N/kg.  Does that mean that, e.g., a 70 kg person is ~42g lighter during the day, and ~42g heavier at night? That seems like it could make a big difference for things like measuring gold bars or other weight-sensitive items. (Gold arbitrage: buy your gold during the day and sell it during the night! Risk-free profit!)  This makes me suspect that I'm overlooking something obvious, because a ~0.05% weight difference seems like something everyone would have noticed long ago. So what am I missing?    Edit: A few answers below indicate that there shouldn't be any weight difference, because the Earth orbits the Sun in free-fall. But if that's the reason, does that mean that a 1:1 tidally-locked Earth-Sun system wouldn't experience differential gravity from the Sun on opposite sides? That doesn't seem right.


i have this but unable to understand what does it do, int[] newArray = new int[3 << 1]; what it does to newArray Please help me to understand it.

I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ...   What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness.


Good evening!  I want to create a bibliography for a thesis but I can't download the related Libreoffice tool because the necessary package is untrusted for my computer. Each time I try I get the following error message:  libreoffice-base libreoffice-base-drivers libreoffice-sdbc-firebird libreoffice-sdbc-hsqldb    Here is a pic of the situation:    Can you help me download it or find an alternative solution?

I tried installing VLC Player yesterday, and I got the Requires installation of untrusted packages error.  I searched for hours for a solution to this problem, and finally came upon a suggestion that said to change servers for downloading updates from.  I did this, and it gave me a 404 error when I clicked on "Check" in the Update Manager.  I tried switching my server back to the main one (and after that, several other ones), but I am now still getting a 404 error:   And the other error I get when downloading or updating:   Edit: Output of cat /etc/apt/sources.list:  deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted #Added by software-properties  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse universe #Added by software-properties  ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates restricted main multiverse universe #Added by software-properties  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise universe deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team.  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse #Added by software-properties  deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security restricted main multiverse universe #Added by software-properties deb http://us.archive.ubuntu.com/ubuntu/ precise-security universe  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu precise partner deb-src http://archive.canonical.com/ubuntu precise partner  ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software.


I am confused in the following expression: we do say "it's not a bad idea" but we do not say "it's not too bad an idea" but instead, we say "it's not too bad of an idea" right?  What is the function of "of" here? Why do we put "of" just because we put "too" in the sentence?  Also how would you comment on the following examples:  1) "He is not as good a player as he could be" would you put "of" between "good" and "a"? or is it more natural with the above?  2) "She is as good a friend as any"  Again, would you put "of" between "good" and "a" here?   Thank you very much for the answers in advance!

In an essay, a friend used the expression:       It wasn't that bad of an idea.    I think that it would be preferable to write       It wasn't that bad an idea   However, I can't explain why.


HTML code :   <select id = "menu"> <option value="2017">2017</option> <option value="2016">2016</option> <option value="2015">2015</option> </select>   What I have tried :   document.getElementById("menu").selectedIndex = 2015;

I have the following HTML <select> element:  <select id="leaveCode" name="leaveCode">   <option value="10">Annual Leave</option>   <option value="11">Medical Leave</option>   <option value="14">Long Service</option>   <option value="17">Leave Without Pay</option> </select>   Using a JavaScript function with the leaveCode number as a parameter, how do I select the appropriate option in the list?


I do not know python very much (never used it before :D), but I can't seem to find anything online. Maybe I just didn't google the right question, but here I go: I want to change an instance's implementation of a specific method. When I googled for it, I found you could do it, but it changes the implementation for all other instances of the same class, for example: def showyImp(self):     print self.y  class Foo:     def __init__(self):         self.x = "x = 25"         self.y = "y = 4"      def showx(self):         print self.x      def showy(self):          print "y = woohoo"  class Bar:     def __init__(self):         Foo.showy = showyImp         self.foo = Foo()      def show(self):         self.foo.showx()         self.foo.showy()  if __name__ == '__main__':     b = Bar()     b.show()     f = Foo()     f.showx()     f.showy()  This does not work as expected, because the output is the following:  x = 25 y = 4 x = 25 y = 4  And I want it to be:  x = 25 y = 4 x = 25 y = woohoo  I tried to change Bar's init method with this: def __init__(self):     self.foo = Foo()     self.foo.showy = showyImp  But I get the following error message:  showyImp() takes exactly 1 argument (0 given)  So yeah... I tried using setattr(), but seems like it's the same as self.foo.showy = showyImp. Any clue? :)

Is there a way in Python to override a class method at instance level? For example:  class Dog:     def bark(self):         print "WOOF"  boby = Dog() boby.bark() # WOOF # METHOD OVERRIDE boby.bark() # WoOoOoF!!


I would like to change the normal text color in a beamer frame with different colors for different frames.  In the following example, the frame title color seems to change correctly, but not the normal text color.  \documentclass{beamer}  \title{Example}  \setbeamercolor{normal text}{fg=green} \setbeamercolor{frametitle}{fg=green}  \begin{document}  \setbeamercolor{normal text}{fg=red} \setbeamercolor{frametitle}{fg=red} \begin{frame}   \frametitle{Red Title}   Some text in red \end{frame}  \setbeamercolor{normal text}{fg=blue} \setbeamercolor{frametitle}{fg=blue} \begin{frame}   \frametitle{Blue Title}   Some text in blue \end{frame}  \end{document}

I'm going crazy just trying to change the color of the text within a frame environment.  \begin{frame}[plain]   I want this text to be red!!! \end{frame}   I have tried almost every single environment listed on the .  {   %\usebackgroundtemplate{\includegraphics[width=\paperwidth]{dark_galaxy.jpg}}   \begin{frame}[plain]     \setbeamercolor{alerted text}{fg=red}     \setbeamercolor{background canvas}{fg=red}     \setbeamercolor{block body alerted}{fg=red}     \setbeamercolor{block body}{fg=red}     \setbeamercolor{block body example}{fg=red}     \setbeamercolor{block title}{fg=red,bg=blue}     \setbeamercolor{fine separation line}{}     \setbeamercolor{frametitle}{fg=red}     \setbeamercolor{item projected}{fg=red}     \setbeamercolor{normal text}{fg=red}     \setbeamercolor{section in sidebar}{fg=red}     \setbeamercolor{section in sidebar shaded}{fg=red}     \setbeamercolor{separation line}{fg=red}     \setbeamercolor{sidebar}{fg=red}     \setbeamercolor{structure}{fg=red}     \setbeamercolor{subsection in sidebar}{fg=red}     \setbeamercolor{subsection in sidebar shaded}{fg=red}     \setbeamercolor{title}{fg=red}     \setbeamercolor{titlelike}{fg=red}      Electromagnetic radiation from hydrogen gas in VIRGOHI 21 suggests it is     part of a system with a mass of \approximately $10^{11}$ solar masses.   \end{frame} }


I'm writing a simple networking system. Entities are defined as classes derived from the base class Entity. In order to identify entities over the network, I have a unique ID for each one, but when it comes time to spawn a new entity, I need a way to identify which entity type (and therefore which class) to create, so I also store a typeId for each entity. public abstract class Entity {     uint id;     ushort typeId;     //abstract stuff }  public class Entity_BeachBall : Entity {     //overridden stuff }  Say I have a list of all the derived entity classes like so:     public List<Type> entityTypes = new List<Type>     {         typeof(Entity_BeachBall)     };  Now I have a way to identify which class an entity uses; for instance, if typeId == 0, then that means it should use the class Entity_BeachBall. The problem is, how can I create a new instance of that class, even if it gets immediately implicitly cast back to the base class? This is roughly what I want to do: public static class EntityManager {     public List<Type> entityTypes = new List<Type>     {         typeof(Entity_BeachBall)     };          public Entity GetNewEntity(ushort typeId)     {         return new entityTypes[typeId](); //something like this     } }  Is this possible? If not, is there a better solution?

One may not always know the Type of an object at compile-time, but may need to create an instance of the Type.    How do you get a new object instance from a Type?


Sharing some illustrations from  agency. If you see them, all have dotted / grainy colors.   I've highlighted the thing I want to ask about by yellow color. It's not limited to one artist. For example, you can see  work also, where in some illustration you would find similar grains or grainy gradient but non-uniform. Now, I know similar effect can be done using Illustrator Filter > Artistic > Grain or similar filter. I've done the same in one of illustration done by me below (in the main background):  But there's slight difference in between mine and the ones shared above (first 2, done by agency). If you observe them: 1) The grains are non-uniform. Looks like the designer used more effect where he wanted more and less where less needed. 2) He even has used in form of gradient also. In my case, I can do both things like I've done in Teddy, but the grains are too large, uniform (see pink background) and are not subtle. While in the agency's, they feel different than mine, looks like sand particles spread over layers by hand. And is non-uniform also at some places. I think I like mix of both effects, so I want to learn this techniques also. So is it possible and convenient to do this in Illustrator? Or you would recommend Photoshop (where there are lot of free brushes available)? Also I don't want to limit myself to grains only. I want to know about it and learn this technique so that I can try other similar types of grains/effects also.

I am looking to create some graphics or logos that look and feel very much like that thicker colored construction paper in photoshop or illustrator cs6  Example here:   and here :   Any thoughts here?


This is probably something simple but i can't figure out the solution. I have a Javascript that ask for some data from a PHP. Data included in an array. I am actually receiving the array from php but i can't fragmented it.  this is the PHP file:  <?php  $q1 = intval($_REQUEST["qq1"]);  // some data // $reply_1 = "daTa1"; // $reply_2 = "data2"; // $reply_3 = "987654321"; //..............  $arr = array( $reply_1, $reply_2, $reply_3, $reply_4);  echo json_encode($arr); ?>   and the below is part of the javascript    var datareceived= new Array (15);  var url = "theabovePHP.php?qq1="+i;  function reqListener () {      console.log(this.responseText);               }       var oReq = new XMLHttpRequest();      oReq.onload = function() {       datareceived= this.responseText;     }      oReq.open("get", url, false); // false wait     oReq.send();  document.getElementById('div_display_part_OF_data').innerHTML = datareceived[1]+" some data " + datareceived[2];     The issue is that i am receiving the data in var datareceived, that looks like this ["daTa1","data2","987654321","2015/09/27 16:20:48","35.1320112","33.344586"] but I can't have them as an array.  When I ask the datareceived[3], this should be  987654321, i receive "T" (the 3rd charachter in datareceived) etc..

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


I'm working on a lab for programming principles II, and I have a class that makes a point, with methods for setting the point, and calculating the distance between other points.  Calculating the distance worked fine when testing it with a runner for just the class, but when I make other classes that use it as an object, I'm getting an error with the distance formula.  import java.lang.Math;  public class MyPoint { private double x; private double y;  public MyPoint(double dubx, double duby) {     x=dubx;     y=duby; }  public void setX(double dub) {     x = dub; }  public void setY(double dub) {     y = dub; }  public double getX() {     return x; }  public double getY() {     return y; } public double distance (MyPoint otherPoint) {     return Math.sqrt(Math.pow((otherPoint.getX()-getX()),2)+(Math.pow((otherPoint.getY()-getY()),2))); } public MyPoint midpoint(MyPoint otherPoint) {     MyPoint point = new MyPoint((otherPoint.getX()+getX()/2),(otherPoint.getY()+getY())/2);     return point; } }   That's the class I'm getting the error on.  The distance part is getting a null pointer exception.  Here's what I'm passing in:  import java.lang.Math;  public class MyTriangle { private MyPoint v1; private MyPoint v2; private MyPoint v3;  public MyPoint getPoint1() {     return v1; } public MyPoint getPoint2() {     return v2; } public MyPoint getPoint3() {     return v3; } public void setPoint1(double x, double y) {     v1= new MyPoint(x,y); } public void setPoint2(double x, double y) {     v2 = new MyPoint(x,y); } public void setPoint3(double x, double y) {     v2= new MyPoint(x,y); } public double getArea() {     double a= v2.distance(v3);     double b= v1.distance(v3);     double c= v1.distance(v2);     double s= (a+b+c)/2;     return Math.sqrt(s*(s-a)*(s-b)*(s-c)); } }  public class TestMyTriangle { public static void main(String [] args) {     MyTriangle tr1 = new MyTriangle();     tr1.setPoint1(17,17);     tr1.setPoint2(5,30);     tr1.setPoint3(5,17);     System.out.println("Area:\t"+tr1.getArea());     } }   And the error:  Exception in thread "main" java.lang.NullPointerException at MyPoint.distance(MyPoint.java:34) at MyTriangle.getArea(MyTriangle.java:37) at TestMyTriangle.main(TestMyTriangle.java:9)   I can't seem to figure it out.  Please help.

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?


Diproton is an isotope of helium without any neutrons. It commonly forms in the Sun, where protons are fused constantly. However, it is extremely unstable, and will revert back to two protons almost immediately after.  Now, nucleons are held together by the strong interaction. So if the electromagnetic interaction is weaker than the strong interaction, why won't the protons stay held together instead of repelling one another?

It is known that there are no diproton or dineutron nuclei.  Does this mean that two protons or neutrons are not actually attracted to each other? Even if the attraction was weak, wouldn't it cause bound states anyway?  Related:


The question  Let $G$ be a group of order $8$ and $x$ be an element of $G$ of order $4$. Prove that $x^2 \in Z(G)$ already posted  . But the answer is not given there. SO I have tried to solve the problem.  Let us consider the subgroup $H=\langle x\rangle=\{e,x,x^2,x^3\}$. Then $[G:H]=2$. The cosets of $H$ in $G$ are $H$ and $g-H$. The quotient group is of order $2$. Therefore $(G-H)^2=H, H$ being the identity element in the quotient group. Let $x\in H$. Then $x^2\in H$. If $x\in G-H$. Then $(xH)^2=(G-H)^2=H\implies x^2H=H\implies x^2\in H$. Therefore for every $x\in G, x^2\in H$.  If I can show that $H=Z(G)$, then everything is done. Is it possible to show this ?

Now as $x$ is of order $4$ and it generates $H=\langle x\rangle$ a cyclic subgroup of $G$ of order $4$, hence index of $H$ in $G$ is $2$.  So $H=\langle x\rangle$ is normal in $G$.  Now $gH=Hg $, for all $g$ in $G$.  => $g(x^2)=(x^2)g\:$ (since  $x^2$ is an element of $H$), for all $g$ in $G$.  Hence $x^2 \in Z(G)$.  This was my approach. (I think that I am wrong in here, $g(x^2)=(x^2)g$) Please, correct me wherever necessary. And if you could provide a better solution, please do.


So I am trying to figure out how to teleport someone within a radius, but only when there is one entity left within that radius. I was trying this:  /tp @p[c=1] x y z   But the c is only for how many people you wish to teleport. So my mind jumped to:  /tp @p[entity=1] x y z   But as far as I'm aware you, can't specify entity under @p. I am rather new to command blocks in general. Is it possible, and if yes, how? I would normally like to figure it out myself because I learn better that way, but this is too confusing for me. If it is possible I would rather just be told how to figure it out without giving me the complete answer, but at this point I'll be content with anything.

I want to make it so I always have 50 entities in an area. So when 1 dies/despawns/leaves the area I want it to detect that and summon in a new entity, and yes I do want them to die/despawn/leave the area so preventing those things is not an option.


I was doing my homework assignment and I did this question correctly. However, I'm interested in knowing the reason behind the logic that how $1/1^4 + 1/2^4 + 1/3^4$ .... to infinity evaluates to $pi^4/90$  Also, I know that whenever there is pi, somehow everything is related to circle. How is this question related to circle?  Here's a screenshot of my question if that helps! Thanks!

I know some nice ways to prove that $\zeta(2) = \sum_{n=1}^{\infty} \frac{1}{n^2} = \pi^2/6$.  For example, see  or the answers to the question "?"  Are there any nice ways to prove that $$\zeta(4) = \sum_{n=1}^{\infty} \frac{1}{n^4} = \frac{\pi^4}{90}?$$  I already know some proofs that give all values of $\zeta(n)$ for positive even integers $n$ (like #7 on Robin Chapman's list or Qiaochu Yuan's answer in the linked question).  I'm not so much interested in those kinds of proofs as I am those that are specifically for $\zeta(4)$.  I would be particularly interested in a proof that isn't an adaption of one that $\zeta(2) = \pi^2/6$.


I'm trying to make a text based game but my If statement won't print. Whats wrong?     System.out.print("What path do you choose?: ");    String pathChoice= kb.nextLine();    System.out.println(" ");    System.out.println(" ");    System.out.println(" ");    if (pathChoice==("North") || pathChoice==("north")){        System.out.println("You begin walking north and encounter an ogre of significant size.");        System.out.println("You draw your crude sword. How will you attack? ");

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


Let $\mathbb{F}:= \{a_1, \ldots , a_n \}$ be a finite field. Consider the following polynomial $$f = \prod_{i = 1}^n (X-a_i) + 1 $$ Is this polynomial irreducible? If not, is it irreducible in $\mathbb{F}_p$, a finite field with $p$ Elements for a prime $p$?

I have a question, I think it concerns with field theory.     Why the polynomial $$x^{p^n}-x+1$$ is irreducible in ${\mathbb{F}_p}$ only when $n=1$ or $n=p=2$?   Thanks in advance. It bothers me for several days.


How memory allocated for"enum" data type, i found that total size of enum data type is 4 bytes(linux) but some people answers is there is no memory allocation, its like 'macros' with a type(int) so please explain how enum all members function stored while accessing and what is data will be there in that 4 bytes.  Thanks

I'm creating a set of enum values, but I need each enum value to be 64 bits wide. If I recall correctly, an enum is generally the same size as an int; but I thought I read somewhere that (at least in GCC) the compiler can make the enum any width they need to be to hold their values. So, is it possible to have an enum that is 64 bits wide?


Regard the following scenario. One asks a question and there are some comments, some of them followed up by others. In the end, all the constructive ones have been incorporated as improvements to the OP and the rest has been addressed but rejected or deemed irrelevant. The same process is carried out for the replies, one of which becomes the accepted answer.  What I usually do at this point is to remove all my comments and flag the rest as obsolete. Note that we can assume other kinds of comments not exist in the scenario.  Am I too nit-picky and needlessly sugar-coating or does that contribute with gain for the community? In order to matter, there's a need for a lot of others doing that as well, of course.

Commenting is one of the unsung heroes of Stack Exchange. :   Request clarification from the author; Leave constructive criticism that guides the author in improving the post; Add relevant but minor or transient information to a post (e.g. a link to a related question, or an alert to the author that the question has been updated).   These are all essential for coordinating the creation of useful questions and answers, but originally comments were not part of the design for this system! During the beta period, it was observed that, without a way to annotate or discuss specific posts, answers became noisy and tangential. Therefore, a separate space was carved out for this purpose below each post, leaving answers free for content that, y'know, actually tries to answer the question. This created a problem, however: how do we expose useful comments inline with answers without adding back the same amount of noise comments were created to alleviate? . This simple strategy proved to be quite durable, working admirably in most common cases - but it suffers from a few drawbacks:  Comments can become obsolete, addressing issues or concerns long ago addressed via edits to the post itself. Those one-liner contests Jeff alluded to don't always produce results as  as one might like. With the addition of comment replies and real-time notifications, comments can be used for casual conversation and debate - fun and perhaps even enlightening for those involved, noise for those just looking for an answer.  Thus the need for comment moderation. This involves three groups of people:  The authors of the comments themselves can clean up after they're done, if they so desire.  can flag comments in response to the issues noted above, bringing them to the attention of the moderators. (They can also vote on comments, controlling to a degree which ones are shown)  can remove individual comments or entire comment threads, , and even  posts if comments are getting unruly.  This raises several questions, which I'll try to address below:        These guidelines are based on the authors' experience moderating comments on various sites. Individual communities, particularly on meta sites, may benefit from additional guidelines - this guide is intended as a baseline.


$$\sum_{n=0}^\infty n!x^{n^2}$$   Can anyone tell me what will be the radius of convergence for this power series. According to me it is $0$.   If you can please show me how to go about it if I am wrong.

The question is to calculate the radius of convergence of $\sum\limits_{n=0}^\infty n!x^{n^2}$.  I dont know how to calculate R.O.C for such type of questions involving $n^2$ as power of x. How do we do this? Any help appreciated.


I am trying to add the total marks at the end of an exam paper using probsoln. All the questions are in a seperate file and I just use \loadallproblems to add them to the exam paper. I add the number of marks for each question in the "Question File" with \marginpar{[\marklabel{2}]}. Is there any way (other than adding it manually!) to add all the marks together and add this number at the bottom of the exam paper? Here is the code I am using, I can't find any way to add this total:  \documentclass[a4paper]{report} \usepackage{probsoln} \newcounter{myprob} \newenvironment{myproblems}   {\par\setcounter{myprob}{0}}   {\par} \newcommand\MyProb{%   {\par\medskip\centering\refstepcounter{myprob}{\LARGE \bfseries Question : Vraag \arabic{myprob}}\par\bigskip}%   }  \renewcommand{\solutionname}{\bfseries MEMORANDUM}  \loadallproblems{Questions}   \showanswers  \begin{document}  \begin{myproblems} \foreachproblem{\MyProb\thisproblem} \end{myproblems}  \end{document} \endinput   Would appreciate any help!!

I defined the command:  \newcommand{\shcpoint}[1]{%     \ifnum #1<2         (\emph{#1 point})\quad\phantom{s}%     \else         (\emph{#1 points})\quad%     \fi     }   and I use it in the following form:  \documentclass{article} \usepackage{amsmath} \usepackage{enumitem} \begin{document} \begin{enumerate}  \item \shcpoint{2} Some random question  \item \shcpoint{3} Other question \end{enumerate} \totalshcpoints \end{document}   The question is, how can I store the points somewhere, maybe in the .aux file and then add it to find the total in the document or section where it is used (globally and locally). I am aware that this is a feature used by the exam class and other packages.


Has anyone implemented (either through hacky own scripts or an actual package) something that emulates Excel's conditional formatting?  It would be useful to have the ability to colour the contents of a table cell proportionally to their value to easily visualise trends at a glance.  Google hasn't helped me a great deal here, so either "conditional formatting" doesn't mean much in the TeX world and I'm failing to find anything, or its as difficult as I'm suspecting it might be.  Anyone have any information?

Scientific talks have their own culture, reporting the results, typically for me, in a table of the following form  1.7333    1.6472    1.5418    1.4682    1.5740 1.1525    1.2878    1.2652    1.3511    1.5102 1.2181    1.1500    1.2220    1.2425    1.5699 0.9786    1.1051    1.1472    1.3096    1.6757 0.9569    0.9190    1.0433    1.2924    1.4867   There is clearly a(n almost perfectly) monotonic pattern for rows and columns. Now for the naked eye, this is not the most quick way of capturing informing.  I would like numbers that bigger in absolute value, to appear differently (either green vs red or light vs dark) than smaller numbers, such that the pattern becomes clear instantly.  Is there a way of programming this in LaTeX?


If I find a program that I would like to install on Ubuntu, but there is only an installer available for Debian or another Debian derivative such as Mint, what can I do? Is there a way to use a pure Debian installer to install on Ubuntu?   I have seen some references to using dpkg or gdebi to find the right dependencies for a local copy of the installer. Is this workable solution?

How do I install a .deb file via the command line?


I currently have a maintenance plan that is reorganizing indexes everyday and I would like to know if you reorganize an index everyday would you ever need to rebuild the index? If so, why?

After searching the internet i couldn't find the reason for    Why do we need to rebuild and reorganize indexes in SQL Server ? what does internally happens when we rebuild and reorganize ?   An article on a  says :     Index should be rebuild when index fragmentation is great than 40%. Index should be reorganized when index fragmentation is between 10% to 40%. Index rebuilding process uses more CPU and it locks the database resources. SQL Server development version and Enterprise version has option ONLINE, which can be turned on when Index is rebuilt. ONLINE option will keep index available during the rebuilding.   I couldn't understand this, though it says that WHEN to do this, but I would like to know WHY do we need to rebuild and reorganize indexes ?