When I run this code:    Double test = (23.1d + 0.1d);   Log.i(Constants.TAG, "Test: " + test);   I get:   Test: 23.200000000000003   I need to add values that will at most have two decimals. For example 19.99 + 0.1 =20.09, how can I do it so that precision is not lost?

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


I have a 2 part question:  1) If they are imaginary, one may get asked, "Well, if imaginary, they don't exist! Why do ANYTHING with them??"  The only thing I can think of is that while both $\sqrt{-9}$ and $\sqrt{-16}$ both don't exist, they don't exist in slightly different ways.  Obviously a 3 is more relevant to one of those, and a 4 is more relevant to the other.  So, they don't entire not exist, right?  2) When they are taught, you're just taught HOW ($\sqrt{-16}=4i)$ with no real explanation of WHY you'd ever bother with introducing this placeholder in the first place.   How does one actually justify imaginary numbers?     Can someone outline some sort of actual application of math (Physics? Electricity?) where you're trying to figure something out, and you run into a $\sqrt{-16}$ and  is makes sense to turn this into $4i$.

I've always enjoyed solving problems in the complex numbers during my undergrad. However, I've always wondered where are they used and for what? In my domain (computer science) I've rarely seen it be used/applied and hence am curious.  So what practical applications of complex numbers exist and what are the ways in which complex  transformation helps address the problem that wasn't immediately addressable?  Way back in undergrad when I asked my professor this he mentioned that "the folks in mechanical and aerospace engineering use it a lot" but for what? (Don't other domains use it too?). I'm well aware of its use in Fourier analysis but that's the farthest I got to a 'real world application'. I'm sure that's not it.  PS: I'm not looking for the ability to make one problem easier to solve, but a bigger picture where the result of the complex analysis is used for something meaningful in the real world. A naive analogy is deciding the height of tower based on trigonometry. That's going from paper to the real world. Similarly, what is it that is analyzed in the complex world and the result is used in the real world without imaginaries clouding the problem?  The question:  is nice but covers a more mathematical perspective on interim results that make solving a problem easier. It covers different ground IMHO.


Is it correct when you say, "I and my wife had our second baby last month" ?.

I've always been taught to put myself last when referring to myself in the same sentence as others but the usage of "me and..." seems to be everywhere these days. The misuse of the word "me" instead of "I" aside, is there some new rule I haven't heard of? Shouldn't we put ourselves last regardless of the "me"/"I" usage?  Examples of "correct" usage:      My friends and I went for some ice   cream. Did you see my friends and me   at the ice cream stand?   Examples of "incorrect" usage:     Me and my friends went for some ice   cream. Did you see me and my friends   at the ice cream stand?   Note: I was also taught that the only person who could put themselves first was the queen.


When I go to check my mails in Thunderbird Mail I see weird shapes floating on my email.   On scrolling up-down those image shapes disappears.

From my old HD (Ubuntu 16.04) I copied ~/.thunderbird and other programs to the new disk with Ubuntu 18.04 installed. All went good. I tried to install Opera. The installation was unsuccessful, a window asking something was held. After that Thunderbird Local Folders -> Inbox (only) was invaded by large icons like this screenshot  Flowers, plants, trucks and others. I restarted but those images are still there. Opera was successfully installed. What can I do to remove them?


I am having a problem operating with a char array. My idea was to use scanf to store input in a char array and then store the contents of that array inside a struct.  Here is the code which may be easier for you to understand:  struct ListaCategoria {     int ident;     char data[MAX];     struct ListaCategoria* next; };  struct ListaCategoria* headCat;  void inserirCat(){     int x;     char arr[MAX];     printf("Identificacao : ");     scanf("%d", &x);     printf("Designacao : ");     scanf("%c[^\n]", &arr);     struct ListaCategoria* temp = (struct ListaCategoria*) malloc(sizeof(struct ListaCategoria));      (*temp).ident = x;     (*temp).data = arr; //this is the line that's giving some trouble can someone explain me why? }

I am a little surprised by the following.  Example 1:  char s[100] = "abcd"; // declare and initialize - WORKS   Example 2:  char s[100]; // declare s = "hello"; // initalize - DOESN'T WORK ('lvalue required' error)   I'm wondering why the second approach doesn't work. It seems natural that it should (it works with other data types)? Could someone explain me the logic behind this?


I encountered a problem using equals, let me first add the code here :  Operateur o = new Operateur(nom, age, sexe, grade, role); for(Operateur op : Membre.getOperateurs()){   if(o.equals((Object)op)){     already_exists = true;     break;   } }  if(already_exists){   ret = ">Can't create it : already exists";   Membre.removeLast();   o.finalize(); }else{   ret = ">Created it"; }   Here I check if a new Operateur isn't just a copy of an old one (Membre.getOperateurs gets me the list of all instances of Membre that are actual Operateur).      My problem is that when I run this bit of code, if my Operateur is brand new it appears as already existing (which he should not, since he's brand new).  For instance, when I create the first Operateur ever it evaluates it as a duplicate of an already existing one.  As :  import cmd.*; import matrice.*; import persona.*; import non_grata.non.*; import non_grata.grata.*; //all above is importing packages to use all classes required   public class Debug{   public static void out(String s){     System.out.println(s);   }//handy    public static void main(String[] args){     Membre.init();//Membre.membre = new ArrayList<Membre>();     Personnel.init();//Personnel.membre = new ArrayList<Membre>();     Vaisseau.init();//Vaisseau.vaisseaux = new ArrayList<Vaisseau>();     MatrixCmd cmd = new MatrixCmd();//Create the command parser      String parser_input = "afficherMembres";//get some input     String parser_output = cmd.execCommand(parser_input);//process it     out(parser_output);//use it     //empty list, correct since we only initialized it      parser_input = "newOPsion mikebike 10 o string string";     parser_output = cmd.execCommand(parser_input);     out(parser_output);     //outputs ">Impossible de créer cet Opérateur : Il existe déjà" which it shouldn't     //since there are no other Operateur and this is only     //given as output when it founds a similar Operateur      parser_input = "afficherMembres";     parser_output = cmd.execCommand(parser_input);     out(parser_output);     //outputs an empty list, meaning that there are no Membre created     //and therefore no Operateur      parser_input = "newOPsion mikebke 8 f tring sring";//command that will trigger the bit of code above     parser_output = cmd.execCommand(parser_input);     out(parser_output);     //outputs">Impossible de créer cet Opérateur : Il existe déjà" which it shouldn't   } }

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?


I have noticed that in both the 10k tools and in many Meta questions, 'rejected' migrations are referenced. What are they? How is one rejected? What happens?

I posted a question which was closed as off-topic and it seems like it could fit on another site in the network. How can I go about moving it there?   What is migration? When can a question be migrated, and who can migrate it? When should I consider migration, and when is it inappropriate? What causes a migration to be blocked and what happens after? What causes a migration to be rejected and what happens after? Anything else I should know about migration?


I have been paying more attention to the suggested edits pending approval area in my shiny new 10K tools, and I have noticed (just a few) very poor suggested edits.  Reputation is a rough measure of how much the community trusts you. Awarding people +2 reputation makes sense because of this. You're reputable because you suggested an edit that (at least two of) the community agrees with.   However, I think people should also be penalized for a rejected edit. Perhaps -1 reputation, or something more creative (like 5 rejected edits in a week results in -1 reputation).  In my opinion, the other side of reputation is not represented in the suggested edit process.  To me, this is similar to deciding an answer is useful (upvoting) and deciding an answer is not useful (downvoting).  Thoughts?

First time I've got the following message on SO:     Too many of your edits were rejected,   try again in 7 days.   Although, I have made ~50 accepted edits this day.  I'm sure that should outweigh the ~5 rejected edits, right?    My suggestion:  bool allowEdit(USER u) {     if(u.rejected * 5 > u.accepted)         return(false);     else         return(true); }   Think of it this way: if I do a 1000 accepted edits, and mess up on 5 [rejected], does that mean I should get banned for 7 days?    Hmmm... There seems to be a bug; the message only appears when clicking edit from review.  But otherwise, I can't edit , even when going to it from the homepage.


I am getting this could not resolve issue. I have been on an open network from last two months after fresh installation of ubuntu 18.04. I have just shifted in a LAN with proxy. I have done every settings including updating the /etc/resolv.conf file and have looked at other solutions of these types. None is working.  sudo apt-get update Err:1 https://download.sublimetext.com apt/stable/ InRelease                      Could not resolve 'download.sublimetext.com' Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease                 Could not resolve 'security.ubuntu.com' Err:3 http://dl.google.com/linux/chrome/deb stable InRelease                      Could not resolve 'dl.google.com' Err:4 http://archive.ubuntu.com/ubuntu bionic InRelease                           Could not resolve 'archive.ubuntu.com' Err:5 http://ppa.launchpad.net/leaeasy/dde/ubuntu bionic InRelease      Could not resolve 'ppa.launchpad.net' Err:6 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu bionic InRelease Could not resolve 'ppa.launchpad.net' Err:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Could not resolve 'archive.ubuntu.com' Err:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Could not resolve 'archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Could not resolve 'security.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease  Could not resolve 'dl.google.com' W: Failed to fetch http://ppa.launchpad.net/leaeasy/dde/ubuntu/dists/bionic/InRelease  Could not resolve 'ppa.launchpad.net' W: Failed to fetch http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu/dists/bionic/InRelease  Could not resolve 'ppa.launchpad.net' W: Failed to fetch https://download.sublimetext.com/apt/stable/InRelease  Could not resolve 'download.sublimetext.com' W: Some index files failed to download. They have been ignored, or old ones used instead.

Like , I can't run apt-get update sometimes. Restarting or waiting for a while makes the problem go away. I never have issues pinging or visiting the respective URLs in a browser.  I've tried every up-voted answer to no avail. What is apt doing that is so different to ping or my browser? For example, when I run apt-get update I see this:  Err:1 https://download.docker.com/linux/ubuntu xenial InRelease   Could not resolve host: download.docker.com Err:2 https://deb.opera.com/opera-stable stable InRelease   Could not resolve host: deb.opera.com Err:3 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu xenial InRelease   Could not resolve 'ppa.launchpad.net' Err:4 http://ppa.launchpad.net/saiarcot895/myppa/ubuntu xenial InRelease   Could not resolve 'ppa.launchpad.net' Err:5 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial InRelease   Could not resolve 'ppa.launchpad.net' Err:6 http://repository.spotify.com stable InRelease   Could not resolve 'repository.spotify.com' Err:7 http://dl.google.com/linux/chrome/deb stable InRelease   Could not resolve 'dl.google.com' Err:8 http://archive.ubuntu.com/ubuntu xenial InRelease   Could not resolve 'archive.ubuntu.com' Err:9 http://archive.ubuntu.com/ubuntu xenial-updates InRelease   Could not resolve 'archive.ubuntu.com' Err:10 http://archive.ubuntu.com/ubuntu xenial-backports InRelease   Could not resolve 'archive.ubuntu.com' Err:11 http://archive.ubuntu.com/ubuntu xenial-security InRelease   Could not resolve 'archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/xenial/InRelease  Could not resolve host: download.docker.com W: Failed to fetch http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/dists/xenial/InRelease  Could not resolve 'ppa.launchpad.net' W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease  Could not resolve 'dl.google.com' W: Failed to fetch https://deb.opera.com/opera-stable/dists/stable/InRelease  Could not resolve host: deb.opera.com W: Failed to fetch http://ppa.launchpad.net/saiarcot895/myppa/ubuntu/dists/xenial/InRelease  Could not resolve 'ppa.launchpad.net' W: Failed to fetch http://repository.spotify.com/dists/stable/InRelease  Could not resolve 'repository.spotify.com' W: Failed to fetch http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/dists/xenial/InRelease  Could not resolve 'ppa.launchpad.net' W: Some index files failed to download. They have been ignored, or old ones used instead.   Running ping download.docker.com:  PING d2h67oheeuigaw.cloudfront.net (52.85.41.233) 56(84) bytes of data. 64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=1 ttl=251 time=18.8 ms 64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=2 ttl=251 time=18.4 ms 64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=3 ttl=251 time=19.5 ms   And visiting the page in my browser works fine. How can I make apt-get "just work"?  Here is the contents of my /etc/apt/resolv.conf:  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1 search home.gateway


I'm trying to install Ubuntu on Acer Nitro an515-53 but I have no clue how. I'm very new to all this, does anyone have a tutorial?

I would like to see a full how-to guide on how to install Ubuntu.


My application is defining the method name to the string at runtime. And I want to call that method from string.  Example  private void ButtonClick(){     string goVoid;     goVoid = "testVoid";     goVoid(); // Calling testVoid }  testVoid(){     //code }

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


I have iOS 9 on my iPhone SE. If I wanted to update it today to iOS 10.3.3, would it be possible? How? I'm asking it because the most recent version is 11.3 beta 6

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


I am getting tired of running from city to city, so now I am on the quest for HM02. Do I get it through the main story, or is there somewhere I must go non-quest specific?

I have HM Strength and HM Cut.  I would love to fly around this new beautiful world but I'm curious when it will be possible.  Any help?


By Lagrange's theorem the possible order of the subgroups of the group will be 1 or 3 or 37 or 111  Now by Sylow's 1st theorem this group must have a subgroup of order 3 and as well as 37.  Then we can prove that every abelian group of order 111 is cyclic.  Now my question is:  Is there be any non-abelian group of order 111?  If there be a non abelian group of order 111 then the given statement is False otherwise the statement is True .  Thanks.

I just constructed the semidirect product in Lang, and I'm trying to tie some facts together. From Ash's Algebra, I know that if $p\lt q$ are distinct primes, if $q\not\equiv 1\pmod{p}$, then any group $G$ of order $pq$ is abelian.  Is the converse true, that for any primes $p\lt q$, if $q\equiv 1\pmod{p}$ then there exists a nonabelian group of order $pq$?  One example I found online is that $\mathbb{Z}_3\ltimes \mathbb{Z}_7$ is nonabelian, and here $7\equiv 1\pmod{3}$. I was considering then semidirect products $\mathbb{Z}_p\ltimes\mathbb{Z}_q$ where $q\equiv 1\pmod{p}$ and some homomorphism $\phi\colon \mathbb{Z}_p\to\operatorname{Aut}(\mathbb{Z}_q)$ I calculate that  $$ (1,0)(0,1)=(1+0,\phi_0(0)+1)=(1,1) $$ and $$ (0,1)(1,0)=(0+1,\phi_{-1}(1)+0)=(1,\phi_{p-1}(1)). $$ Is it true somehow that $\phi_{p-1}(1)\neq 1$ in each case to show the group is nonabelian? I guess if it did this would imply $\phi_{p-1}$ is the trivial automorphism, so maybe there's something there? If not, is there a way to show $\mathbb{Z}_p\ltimes\mathbb{Z}_q$ is nonabelian in these cases in general? Thanks.


Do we know if light is red-shifted by traveling through space? If it isn't, how do we know? I guess my pondering has lead me to wonder if the observed accelerating space-expansion is a misinterpretation.   If light is red-shifted by traveling through space, we may be able to re-interpret Hubble's equation (I know, that might be heresy) as  $redshift = SomeConstant*d$ which would imply that distant objects aren't necessarily accelerating, the light we view is increasingly redshifted for more distance objects, independent of them moving away from us. Then, maybe we don't need dark energy anymore.?.

I was thinking that maybe photons loss energy naturally when they travel great distances.  Or maybe the mass of all matter is increasing over time and therefore photons emitted in the past are necessarily less energetic.  Or is the expansion of space backed up by so much other evidences that trying to find another explanation is completely foolish?


I'm trying to understand the differences between the Action<T>, Func<T> and Predicate<T> delegates as part of my WPF/MVVM learning.  I know Action<T> and Func<T> both take zero to one+ parameters, only Func<T> returns a value while Action<T> don't.  As for Predicate<T> - I have no idea.  Therefore, I came up with this following questions:     What does Predicate<T> do? (Examples welcomed!) If Action<T> returns nothing, wouldn't it be simpler to just use void instead? (Or any other type if it's Func<T> we're talking about.)   I'd like you to avoid LINQ/List examples in your questions. I've seen those already but they just make it more confusing as the code that got me 'interested' in these delegates have nothing to do with it (I think!). Therefore, I'd like to use a code I'm familiar with to get my answer.    Here it is:     public class RelayCommand : ICommand {     readonly Action<object> _execute;     readonly Predicate<object> _canExecute;  public RelayCommand(Action<object> execute)     : this(execute, null) { }  public RelayCommand(Action<object> execute, Predicate<object> canExecute) {     if (execute == null)         throw new ArgumentNullException("execute");      _execute = execute;     _canExecute = canExecute; }  [DebuggerStepThrough] public bool CanExecute(object parameters) {     return _canExecute == null ? true : _canExecute(parameters); }  public event EventHandler CanExecuteChanged {     add { CommandManager.RequerySuggested += value; }     remove { CommandManager.RequerySuggested -= value; } }  public void Execute(object parameters) {     _execute(parameters); } }   Note: I took out the comments to avoid super-long block of code. The full code can be found .  Any help is appreciated! Thanks! :)  P.S: Please don't point me to other questions. I did try to search but I couldn't find anything simple enough for me to understand.

Can someone provide a good explanation (hopefully with examples) of these 3 most important delegates:   Predicate Action Func


Sorry, maybe it is a beginner problem. This is a part of my MainActivity.java:  public class MainActivity extends Activity{ ...         EditText et101 = (EditText) findViewById(R.id.editText101); ...         public myOwnClass(String my_id){                 et000.setText(my_id) }   why do I get an NPE when I use et101 in myOwnClass? This is the error:  Caused by: java.lang.NullPointerException   The error is in that line, where EditText et101 = (EditText) findViewById(R.id.editText101); is

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?


For example, determine  $\int \left(\frac{1}{2x+1}\right)dx$.  Given that $f(x)$ = $\ln(2x+1)$ and $f'(x)$ = $\ln\left(\frac{2}{2x+1}\right)$.  Would this be $\frac{1}{2} \int\left (\frac{2}{2x+1}\right)dx = \frac{1}{2} (\ln(2x+1) + C)$ or  $\frac{1}{2} \int\left (\frac{2}{2x+1}\right)dx = \frac{1}{2}  (\ln(2x+1)) + C$?

Question:  Is it possible to get multiple correct results when evaluating an indefinite integral?  If I use two different techniques to evaluate an integral, and I get two different answers, have I necessarily done something wrong?    Often, an indefinite integral can be evaluated using different techniques.  For example, an integrand might be simplified via partial fractions or other algebraic techniques before integration, or it might be amenable to a clever substitution.  These techniques give different results.  For example, looking over a few other questions on MSE:      From : evaluate $$ \int x(x^2+2)^4\,\mathrm{d}x. $$    Via the substitution $u = x^2+2$, this becomes $$ \int x(x^2+2)^4\,\mathrm{d}x       = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + \frac{32}{5} + C.     $$ However, multiplying out the polynomial and integrating using the power rule gives $$ \int x(x^2+2)^4\,\mathrm{d}x       = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + C    $$     From :  evaluate   $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x. $$    Simplifying the integrand using partial fractions then integrating gives $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x       = \frac{-2}{(x+1)} - \ln|x+1| + C.    $$ Via integration by parts, we get $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x       = \frac{x-1}{(x+1)} - \ln|x+1| + C.    $$     From : evaluate   $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x. $$    Using the substitution $u = \sec(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x       = \frac {\sec^2(\pi x)}{4\pi} + C.    $$ Using the substitution $u = \tan(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x       = \frac {\tan^2(\pi x)}{4\pi} + C.    $$


I want to delete the duplicate entries from one table of database (SQL). I don't understand how do I do this?  Please help me to write a query for this problem.  For e.g.-  Name | mobileno | address  abc  | 99xxxx01 | India  abc  | 99xxxx01 | India  def  | 98xxxx02 | USA

What is the best way to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows)?  The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field.  MyTable  RowID int not null identity(1,1) primary key, Col1 varchar(20) not null, Col2 varchar(2048) not null, Col3 tinyint not null


sparked my question.   Will my PC receive the Long Term Support (LTS) using LXDE in Ubuntu 12.04?  What does it mean that ? Does it just mean it's not explicitly tested with new hardware and doesn't get point releases? Or does it mean that LXDE packages don't get the same kind of community support as community-supported packages that more commonly appear in Ubuntu installations?

Anyway....there is Ubuntu 12.04 LTS and the normal 12.10 version. Is that the same with Lubuntu? On their site, for some reason, they seem to be promoting the 12.10 version while for me an LTS is always more appealing. I am wondering if they have the same ideology as the Ubuntu team.  UPDATE: Is it okay to talk about Lubuntu here at all? I understand that it is a flavour of Ubuntu...but still. Are they 2 very different teams?


I have encountered the statement that "the error term and one of the regressors are correlated" a few times and I am having trouble understanding what is meant exactly. Let's say we have a DGP  $$y=\beta_1+\beta_2 x+\beta_3 z+e $$  where the error term $e$ fulfills all of the standard OLS assumptions. Furthermore $x$ and $z$ are correlated. Now if the coefficients of the relation  $$y=\lambda_1+\lambda_2 x+u$$  where estimated the statement could be made that the estimate of $\lambda_2$ is biased since $x$ is correlated with the error term $u$. But this statement seems to be assuming that we are trying to estimate the coefficient $\beta_2$ from the first equation.  So my question is the following. When we speak of an error term being correlated with a regressor, does this mean that there is a specific coefficient we are trying to estimate,( in the above example the coefficient $\beta_2$) and plugging it into the given equation will yield a relationship where the regressor and error term are correlated?

The first sentence of this  page claims that  "In econometrics, an endogeneity problem occurs when an explanatory variable is correlated with the error term. "  My question is that how can this ever happen? Isn't regression beta chosen such that the error term is orthogonal to the column space of the design matrix?


I was reading Stroustrup's "Programming -- Principles and Practice Using C++" and found that he included a function without the main curly braces without explaining himself and online people say it is impossible.  I have compiled the code and it works totally fine.  void f()     try {}      catch(...) {}   I expect to get a compiler error from this but I do not and it works fine. I am using C++17.

Note that this function does not have a "{" and "}" body.  Just a try/catch block:  void func( void ) try {     ... } catch(...) {     ... }   Is this intentionally part of C++, or is this a g++ extension?  Is there any purpose to this other than bypass 1 level of {}?  I'd never heard of this until I ran into


The word he's is a contraction of the words he and is. If I want to use the contraction to say     I'm a better driver than he is   I should be able to say/write I'm a better driver than he's, but that just sounds awfully wrong in my head.  Is it correct to say/write      I'm a  better driver than he's   I reckon it might sound silly due to the fact that it sounds like I'm saying I'm a better driver than his when pronounced.

A basic example:     -Hey, will you be at the party this Friday?   -I'll   A guy I know does that all the time and I can't convince him that this isn't correct... or is it?  For me it just sounds stupid and is hard to pronounce only one word like that


I wanted to move  1000 files in a directory to another dir.  I can do it if I'm in the original dir but if I try this   mv $(ls /home/jeremy/source|tail -1000) /home/jeremy/dest   from elsewhere, the path gets stripped and so I would need to append the path somehow. I find the $ convenient and wanted to avoid xargs as it seems tricky.

I have a directory with thousands of files. How can I move 100 of the files (any files will do) to another location.


I am new to electronics, and I don't understand the theory of a Short Circuit. Why does a Short Circuit happen?

In my book there is no explanation of the phrase short circuit but at many places the author has used it. I had googled it. Some explain it as the flow of charge along a high potential difference while others explain it as the flow of charge along a low resistance path. What exactly is a short circuit? An explanation along with a diagram would be very helpful.


Working on a plugin in Java. everything works. I come to this one if statement and it just fails. I've tried changing the values from int to string and vice versa, it simply won't budge. I logged the coordinates. I try to compare them as strings. Code:  String locationx = plugin.getConfig().getString("locationx"); String eventlocationx = Integer.toString(event.getClickedBlock().getX());  String locationy = plugin.getConfig().getString("locationy"); String eventlocationy = Integer.toString(event.getClickedBlock().getY());  String locationz = plugin.getConfig().getString("locationz"); String eventlocationz = Integer.toString(event.getClickedBlock().getZ());  if (locationx == eventlocationx && locationy == eventlocationy && locationz == eventlocationz) {     System.out.println("SUCCESS: Passed coordinate check on the right click.");     return true; } else {     System.out.println(locationx);     System.out.println(eventlocationx);      System.out.println(locationy);     System.out.println(eventlocationy);      System.out.println(locationz);     System.out.println(eventlocationz);      System.out.println("ERROR: Failed on the right click coordinate check.");     return false; }    config:  locationx: '-226'  locationy: '64'  locationz: '266'   console log:  -226 [11:31:47 INFO]: -226 [11:31:47 INFO]: 64 [11:31:47 INFO]: 64 [11:31:47 INFO]: 266 [11:31:47 INFO]: 266 [11:31:47 INFO]: ERROR: Failed on the right click coordinate check.   I hope anyone can help me out.

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?


I run a ssh server on an Android phone using SimpleSSHD.   When the phone is connected to a wifi network, I can connect to the SSH server from a computer in the same wifi network.  When  the phone is connected to a carrier's wireless mobile network, I found an IP address on the android phone in "Settings-> About Phone -> Status". How can I find out if the IP address is a public IP address for the phone's network interface, or shared by many devices in the same LAN? Can any computer connected to the Internet connect to the SSH server using the phone's IP address? It seems that I can't, and I was wondering why?  $ ssh -p 2222 11.22.333.444 ssh: connect to host 11.22.333.444 port 2222: Connection timed out   Thanks.

I am having an Android device and I want to connect in via 3G/4G and I am getting connection refused.  Any ideas how to do that?


My attempt to use JTable and ModelTable in clojure has been successful only to the point of being able to read a file and put the data into suitable rows & columns. My difficulty arises when I want to change some of the data. The Clojure examples I have examined only display cell values.   If anyone can direct me to 1 or more Clojure examples of how to use listeners associated with JTable/ModelTable I would be most grateful. The application is very simple and only needs to display data in a table then save any changes or additions to a file.

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?


My machine is 32 bit so can't use Chrome. Netflix does not work on chromium.   So I installed silver-light using pipelight:    Any solution?

Is there a way to stream Netflix content to my Ubuntu machine?


When I submit a suggested edit, a notice would say that my edit "Won't be viewable to other people until it is approved by trusted community members" (sorry if I did a quotation mistake), but it doesn't specify how much reputation is required to become a "trusted community member."

When clicking "edit" I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking "improve this question" or "improve this answer" shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the "Improve Edit" and "Reject and Edit" buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see "" in the .


I recently saw a script in which below find command was used:  find "$@" -type f -name "*.iso"  What does "$@" mean here?

Consider the following code:  foo () {     echo $* }  bar () {     echo $@ }  foo 1 2 3 4 bar 1 2 3 4   It outputs:     1 2 3 4       1 2 3 4   I am using Ksh88, but I am interested in other common shells as well. If you happen to know any particularity for specific shells, please do mention them.  I found the follwing in the Ksh man page on Solaris:     The meaning of $* and  $@  is   identical  when  not  quoted  or  when  used  as a parameter   assignment value or as a file name. However, when used as  a   command argument, $* is equivalent to ``$1d$2d...'', where d   is the first character of the IFS variable,  whereas  $@  is   equivalent  to  $1 $2 ....   I tried modifying the IFS variable, but it doesn't modify the output. Maybe I'm doing something wrong?


How do you integrate the equation $$ \int \frac{(\cos^3x)}{(\sin^2x)}dx $$ using U substitution?

I'm stuck with this integral  $\int\frac {\cos^4x}{\sin^3x} dx$    which I rewrote as  $\int \csc^3x \cos^4xdx$  then after using the half angle formula twice for $\cos^4x$ I got this  $\frac 14\int \csc^3x (1+\cos(2x))(1+\cos(2x))dx$   then after solving those products I got these integrals  $\frac 14 \{\int \csc^3xdx+2\int \csc^3x \cos(2x)dx + \int \csc^3x \cos^2(2x)dx\}$  I do know how to solve the $\int \csc^3xdx$ one but I'm totally lost on the other ones, any tips/help/advice would be highly appreciated! thanks in advance guys!


How do you configure Ubuntu Server to automatically receive files over Bluetooth and save them with no user interaction?  This question is almost identical to , but relates to Ubuntu Server, where no GUI is available.  Edit: To clarify, this question is not about pairing Bluetooth devices, but about making an Ubuntu Server machine automatically accept Bluetooth file transfers. This question is not a duplicate.

I've been trying to pair up my bluetooth keyboard with my computer after reinstalling from a standard ubuntu 12.04 to a minimal install.  In the minimal install I have no gui, so I've been trying to use the various command line tools available, but I can't figure out how the pairing is supposed to go. Pairing when I had a gui worked flawlessly.  I've asked for help here:   No one has replied but a lot of details of my situation is available there.  How is one supposed to pair bluetooth devices from the command line?


I was trying out a command yesterday that put my computer into hibernation mode. The first line in the command sequence was sudo -s which made my command line go from   userName@computerName:~$    to   root@computerName:~#    I looked at the manual page for sudo and it did not give any explanation as to why this happen or what mode it had entered.   What does the root and # mean in the second command line tag? what does this mode allow you to do and how do I get out of it? Thank you in advance for any help!

When I'm doing something that requires root be typed in dozens of times in a row, I prefer to switch my session to a root session. In the various tutorials and instructions I have used on the Internet, I see sudo su, sudo su -, sudo -i and sudo /bin/bash being used to open a root session, but I'm not clear on the difference between these and when or if that difference matters.  Can someone clear this up for me?


I want to get the device whether is it Mobile,Tablet,Iphone or desktop based on the screen width. I know about breakpoint and picture module. But I need to change some HTML based on that condition. How can I get the condition in tpl file.

Using Drupal 7.14 with the PHP filter on I have the following in a Basic Page content type:  <?php if ($is_mobile == TRUE):?>

 <?php else: ?>

 <?php endif; ?>   I get the error message:  Notice: Undefined variable: is_mobile in eval() (line 1 of D:\websites\modules\php\php.module(80) : eval()'d code).  I sort of understand - I'm trying to grab a variable from the Drupal system but is there any way to do this? Maybe using Tokens?


I live in Tanzania Africa and have been promoting Ubuntu for use by NGOs, Schools, and Friends. So far I've got a lot of positive feedback, but do have one huge problem. Internet here is both slow and very costly (up to $1,200 per month) So what I am looking for is a current release of Ubuntu which includes all the updates and popular applications already on it like; Gimp, VLC, Ubuntu Restricted files, Scribus, Inkscape, VirtualBox, Chrome, Audacity, Compiz, Blender, Ubuntu Tweak, Gnucash, Skype, etc... Basically all the 4 - 5 star applications. Does a hybrid DVD exist? I found links to one called Ubuntu Install Box 11.04, but not sure if they are truly legitimate. Any help would be greatly appreciated. Brendon

I need to upgrade my existing Ubuntu system, and I also want to install Ubuntu on a new laptop.  I would like to have an installation CD or DVD to do both of these.  Where exactly I can order or request an Ubuntu installation CD/DVD/USB?


I have a hard time understanding, on an intuitive level, what matrix multiplication actually does. I have used it a lot, but I do not really know what it does.  I know that $Ax = y$, where $A$ is a matrix and $x$ is an $n$-tuple, is just another way writing a system of equations. Seeing it this way, matrix addition is quite intuitive. Since every elementary matrix can be seen as representing an elementary row operation, I can understand what matrix multiplication does with invertible matrices. However, that still does not explain anything when we are working with matrices that are not invertible.  What is a good way of thinking about matrix multiplication?

I have just watched the first half of the 3rd lecture of Gilbert Strang on the open course ware with link:    It seems that with a matrix multiplication $AB=C$, that the entries as scalars, are formed from the dot product computations of the rows of $A$ with the columns of $B$. Visual interpretations from mechanics of overlpaing forces come to mind immediately because that is the source for the dot product (inner product).  I see the rows of $C$ as being the dot product of the rows of $B$, with the dot product of a particular row of $A$. Similar to the above and it is easy to see this from the individual entries in the matrix $C$ as to which elements change to give which dot products.  For understanding matrix multiplication there is the geometrical interpretation, that the matrix multiplication is a change in the reference system since matrix $B$ can be seen as a transormation operator for rotation, scalling, reflection and skew. It is easy to see this by constructing example $B$ matrices with these effects on $A$. This decomposition is a strong argument and is strongly convincing of its generality. This interpreation is strong but not smooth because I would find smoother an explanation which would be an interpretation begining from the dot product of vectors and using this to explain the process and the interpretation of the results (one which is a bit easier to see without many examples of the putting numbers in and seeing what comes out which students go through).  I can hope that sticking to dot products throughout the explanation and THEN seeing how these can be seen to produce scalings, rotations, and skewings would be better. But, after some simple graphical examples I saw this doesn't work as the order of the columns in matrix $B$ are important and don't show in the graphical representation.   The best explanation I can find is at . It is convincing but a bit disappointing (explains why this approach preserves the "composition of linear transformations"; thanks @Arturo Magidin). So the question is: Why does matrix multiplication happen as it does, and are there good practical examples to support it? Preferably not via rotations/scalings/skews (thanks @lhf).


I used this command:  /testfor @p[score_Room1_min=2,score_Room1=2] {Inventory[{id:minecraft:dye,Damage:1s,tag:{display:{Name:"Body part"}},Count:10b}]}   It all works, but only when I have 10 body parts.  How can I test for at least 10, for example 11 or 12 without needing to make new command blocks?

I am using the AmazingKit plugin on my Minecraft server to make inventory kits for players. In a command block I have the following command:  /tellraw @p ["",{"text":"Iron","clickEvent":{"action":"run_command","value":"_____"}},{"text":" / "},{"text":"Gold","clickEvent":{"action":"run_command","value":"_____"}}]   Which prints the following result: Iron / Gold.  When a player clicks on Iron, what command should I write where the empty space is _____ in order to check if the player has at least (>=) 20 iron ingots in his inventory and if he/she does, remove 20 iron ingots and execute /kit Basic. If the player has less than 20 iron ingots in inventory, the command won't be executed. Instead, Insufficient amount of iron ingots will be printed out.   Same applies when a player clicks on "Gold".  I'm on 1.14 version


While talking to myself the other day, I noticed something odd.  We have the five W words and the H:   What When Where Who Why How   I've heard three of these words said with "some" at the start:   Somewhat Somewhere Somehow   But I've never heard "somewhen", "somewho" or "somewhy". If when, why, and who, are the same type of speech as what, where, and how, why don't we put "some" before the former three?

For , a desire for concision motivated me originally to use 'somewhy' instead of 'for some reason'; afterwards, a user kindly advised that 'somewhy' obsolesced. Why?  Google introduced me to , whose author delineates his confusion of the absence and his reasoning justifying 'somewhy' (identical to mine). Though his questions have not been answered and " "Somewhy" didn't appear in the dictionaries I [he] checked " , OED's entry does not answer our questions either:      {adv.} = {rare.}      For some reason or reasons.   Postscript: I read this , which displays the correlatives for 'why', but doesn't explain their obscurity. The lone prevalent exception is 'therefore'.


I have an ESP 3200 Kodak printer. It does a great job at printing however I am making skateboards and using heat transfer vinyl, and printing it in sections rather than a single page. I have recently ordered 100' of the transfer vinyl and am cutting it into 8.5" x 33" segments. I have changed the page layout to landscape, watched a few YouTube videos on how people do it with Excel to no avail simply because they never even did it themselves. They simply show the instructions and they didn't work, and showed no proof of completing the task. I am using GIMP image editor on a 2009 Mac Pro, and the Preview app. I am able to set the page settings in System Preferences and the page layout in print preview to 214mm x 838mm and 8.5" by 33" respectively, however I believe it's behaving like a graphics program in that it's showing scaling problems on pages after changing the printers default paper size in System Preferences and not printing the entire document, rather one page at a time. There is a possibility it will not print larger than 14 inches however the printer seems to handle the paper correctly and it makes me wonder if there's something wrong in my settings. It could be the file format too as Mac OS X seems to default to PDF, which is obviously arranged by pages.


Can you give any idea about the range of the following function?  $$f(x) = \frac{\sqrt{3}\,\sin x}{2 + \cos x}$$

What is the range of the function   $$\frac{\sqrt{3}\sin x}{2+\cos x}$$


I received two -1 but I didn't make a comment to that question. How come?   The question in question is

The title basically says it all: "Why is downvoting a question free but downvoting an answer not?"  I ask this because I think bad answers are a lot more damaging than bad questions. If it is a a bad question it might lead to some minutes wasted for the people that read it. But a bad answer can lead to big bugs into production code. False faith in how stuff works, or can even be bad propaganda.  So why does it cost me that silly 1 rep. I know it shouldn't matter. I have plenty of rep, but still I hesitate that tiny bit before doing it.


Just wanted to get some other opinions.  I am currently having a discussion on how to go on a web environment.  We want to virtualize our web layer for a very active site.  However, there is a debate going on as to which is better.  More servers or more worker processes on the site.  Here are the two opinions.  I want to turn our 6 physical servers into 6 virtual hosts.  Run 10 VMs per host with 8 GB of RAM, 4 proc cores, and 2 worker processes on 1 application pool.  My coworker wants to run 2 VMs per host with 32 GB of RAM, 4 proc cores, and 10 worker processes on 1 application pool.  My thought has always been run fewer worker processes and more servers to increase performance because worker processes (in my experience) are not incredibly reliable.  Any thoughts would be great.  Thank you.

This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.


I would like to see the ways that you prove that $$\sum_{n\ge0}\frac{(-1)^n}{(2n+1)^3}=\frac{\pi^3}{32}.$$All methods are welcome.   My Proof:  We start by breaking up the sum as  $$S=\sum_{n\ge0}\frac{(-1)^n}{(2n+1)^3}=\sum_{n\ge0}\frac1{(4n+1)^3}-\sum_{n\ge0}\frac1{(4n+3)^3}$$ and seeing that this can be expressed in terms of the polygamma function: $$S=\frac1{2^7}\left[\psi_2\left(\frac34\right)-\psi_2\left(\frac14\right)\right].$$ Then using $$\psi_s(z)=\int_0^1\frac{t^{z-1}}{t-1}\ln^s(t)dt$$ we have  $$S=\frac{1}{2^7}\int_0^1\frac{\ln^2(x)}{x-1}(x^{-1/4}-x^{-3/4})dx.$$ Then taking advantage of $x\mapsto 1/x$,  $$S=\frac1{2^7}\int_1^\infty \frac{\ln^2(x)}{1-x}\cdot\frac{1-x^{1/2}}{x^{3/4}}dx.$$ Then $x\mapsto x^4$ cleans this up quite nicely: $$S=\frac12\int_1^\infty \frac{1-x^2}{1-x^4}\ln^2(x)dx=\frac12\int_1^\infty \frac{\ln^2(x)}{x^2+1}dx.$$ Then we use a little symmetry: $$S=\frac14\int_0^\infty \frac{\ln^2(x)}{x^2+1}dx.$$ Finally, we use $x\mapsto\tan x$: $$S=\frac14\int_0^{\pi/2}\ln^2(\tan x)dx.$$ We immediately recognize this as  $$\int_0^{\pi/2}\ln^2(\tan x)dx=\left(\frac{\partial}{\partial a}\right)^2\frac{\Gamma(\frac{1+a}2)\Gamma(\frac{1-a}{2})}2\bigg|_{a=0}$$ but the Gamma reflection formula gives this as  $$\frac\pi2\left(\frac{\partial}{\partial a}\right)^2\frac{1}{\cos\frac{\pi a}{2}}\bigg|_{a=0}=\frac{\pi^3}{8},$$ which provides our result.

I recently ran into this series: $$\sum_{n=0}^{\infty} \frac{(-1)^n}{(2n+1)^3}$$  Of course this is just a special case of the Beta Dirichlet Function , for $s=3$.   I had given the following solution: $$\begin{aligned}  1-\frac{1}{3^3}+\frac{1}{5^3}-\cdots &=\sum_{n=0}^{\infty}\frac{(-1)^n}{\left ( 2n+1 \right )^3} \\    &\overset{(*)}{=} \left ( 1+\frac{1}{5^3}+\frac{1}{9^3}+\cdots \right )-\left ( \frac{1}{3^3}+\frac{1}{7^3}+\frac{1}{11^3}+\cdots \right )\\    &=\sum_{n=0}^{\infty}\frac{1}{\left ( 4n+1 \right )^3} \; -\sum_{n=0}^{\infty}\frac{1}{\left ( 4n+3 \right )^3} \\    &= -\frac{1}{2\cdot 4^3}\psi^{(2)}\left ( \frac{1}{4} \right )+\frac{1}{2\cdot 4^3}\psi^{(2)}\left ( \frac{3}{4} \right )=\frac{1}{2\cdot 4^3}\left [ \psi^{(2)}\left ( 1-\frac{1}{4} \right )-\psi^{(2)}\left ( \frac{1}{4} \right ) \right ]\\   &=\frac{1}{2\cdot 4^3}\left [ 2\pi^3 \cot \frac{\pi}{4} \csc^2 \frac{\pi}{4}  \right ] \\   &=\frac{\pi^3 \cot \frac{\pi}{4}\csc^2 \frac{\pi}{4}}{4^3}=\frac{\pi^3}{32}  \end{aligned}$$  where I used polygamma identities and made use of the absolute convergence of the series at $(*)$ in order to re-arrange the terms.   Any other approach using Fourier Series, or contour integration around a square, if that is possible?


1. How come sort command ignore leading blanks even though I didn't specify -b? Text File file1 Morpheus   Trinity       Neo Cypher  Command > sort file1 Shell Output Cypher Morpheus       Neo  Trinity  Since the byte code of SPACE comes before alphabets in ASCII. Aren't Neo and Trinity supposed to come before both Cypher and Morpheus?    2. How come sort command enable dictionary order even though I didn't specify -d? Text File file2 {Neo Morpheus Trinity Cypher  Command > sort file2 Shell Output Cypher Morpheus {Neo Trinity  Since the bytecode of { comes after the alphabets in ASCII, aren't {Neo should comes last?

For a long period I thought the default behavior of the sort program was using ASCII order. However, when I input the following lines into sort without any arguments:  # @   I got:  @ #   But according to the ASCII table, # is 35 and @ is 64. Another example is:  A a   And the output is:  a A   Can anybody explain this? By the way, what is 'dictionary-order' when using sort -d?


Suppose $\hat{x}\in\mathbb{R}^d$ is a normalized vector and $\alpha\in(0, 1)$ a scalar. Is there a way to compute the determinant of the following matrix quickly? $$ I_d - \alpha\hat{x}\hat{x}^\top $$ To me this structure seems to have a lot of structure so I'd expect some trick to do the job.

This question aims to create an ""  of numerous questions that ask about determinants of specific matrices (I may have missed a few):              The general question of this type is  Let $A$ be a square matrix of rank$~1$, let $I$ the identity matrix of the same size, and $\lambda$ a scalar. What is the determinant of $A+\lambda I$?  A clearly very closely related question is  What is the characteristic polynomial of a matrix $A$ of rank$~1$?


I've got this working in MSSQL but I've fallen off and been run over when it comes to MySQL.  I'm trying to search for all records in a group after a certain date in an employee info table.  I can get the records in the employee info table but I also need to return all employee numbers in another table that are part of the same group.  The purpose being to see which employees in the group have submitted some paperwork. Since the table has data from multiple years, it needs to filtered so I can search after a certain date each year.  Here are my two tables  empInfo -------------------------------------- id             | int date           | datetime empNumber      | varchar grpNumber      | int active         | int  empReports -------------------------------------- id             | int date           | datetime empNum         | varchar grpNumber      | int empFName       | varchar empLName       | varchar dateReceived   | varchar active         | int   The idea is to search for a group number and return all employee IDs from the empInfo table and show which ones have records from the empReports table. The current query is:  SELECT r.dateReceived as Date, t.empNumber AS Emp, r.grpNumber AS Grp, r.empFName, r.empLName  FROM empInfo t  LEFT JOIN empreports r  ON t.empNumber = r.empNum WHERE t.grpNumber = 100  AND t.active = 1  AND r.dateReceived > 1587574487  ORDER BY CAST(t.empNumber as UNSIGNED INTEGER) ASC   This returns a single record      Date    |  Emp  |  Grp  |  empFName  |  empLName ------------------------------------------------------ 1589561752  |   1   |  100  |  Fred      |  Derf   What I need to see is more like      Date    |  Emp  |  Grp  |  empFName  |  empLName ------------------------------------------------------ 1589561752  |   1   |  100  |  Fred      |  Derf     NULL    |   2   |  100  |  NULL      |  NULL              NULL    |   3   |  100  |  NULL      |  NULL       NULL    |   4   |  100  |  NULL      |  NULL       NULL    |   5   |  100  |  NULL      |  NULL     I've tried different joins, swapping the query around and just about anything else I can think of with no joy, so any assistance any MySQL gurus could offer would be greatly appreciated.  Thanks in advance.

I have 2 tables: Employees, attendanceIn   When I query using LEFT JOIN   SELECT employees.eno,employees.name,employees.dept,attendanceIn.attIn FROM `employees`  LEFT JOIN attendanceIn ON employees.eno = attendanceIn.eno WHERE date(attIn) like '2016-07-02%'   What I got is,     Whats wrong with my Query? How do I get my Expected result?


I'm from the US and interested in traveling to the Balkans.  I checked the US Embassy government website for certain countries in the Balkans, and they are apparently deemed safe. But numerous people have told me of issues like sex trafficking that happen in that region, suggesting I'm at risk if I travel there. Part of me thinks that is unnecessarily cautious, but at the same time, I wouldn't want to be putting myself in that situation if more reliable sources would have confirmed that to be a real risk.  Is it safe to trust just the US Embassy website? Or are there other places I should check for this type of information? What about political issues?

Are there travel websites constantly updated with safety tips and political situation of countries?


So, I'm setting up an experiment network for me and the other geeks at my school to use for website testing and server practice. I'm the sys and net admin (but really it's just for playing Quake).  Messing with it at home, I find it tedious to have to type a whole IP address to SSH into a host (in this case, a Raspberry Pi). The current hostname I have for it is hyperfang. Instead of pi@longip, how can I make it so that I can make this pi@hyperfang? On my router, there are settings for a static DNS. Would I have to make a DNS server on my network for this to work?  My network is wireless, and laptops will be connected to the network. I have no root access to the laptops, but I have a Raspberry Pi for users to login through ssh. What I want is when anybody joins the network and wants to login to my Pi, they can use pi@hyperfang. I am not looking for a hostfile configuration solution, but something else like local domains.  I have avahi running on my Pi, but it isn't working.  NOTE: this network is NOT connected to the internet, it's a pure local network.

Here are details of the machine I want to access using its hostname:  $ hostname hostname $ cat /etc/hosts 127.0.0.1   localhost 127.0.1.1   hostname.company.local  hostname   It's a default Debian 6 (Squeeze) install, so I didn't fiddle with anything yet.  This is what I get from a machine (running Debian Unstable) trying to access above machine:  $ ping hostname ping: unknown host hostname $ ping hostname.company.local ping: unknown host hostname.company.local $ cat /etc/resolv.conf nameserver 192.168.2.21 nameserver 192.168.2.51 search company.local


I try to login via header function (HTTP authentication). I take username and password and #check it in MySQL database.  It woks! but in log out I have a problem!  How can I delete active login that make via function below? (I must say I can logout if I #delete active sessions in my browser!). should I unset php_auth_user server variable?  <?php header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); ?>

Is it possible to log out user from a web site if he is using basic authentication?  Killing session is not enough, since, once user is authenticated, each request contains login info, so user is automatically logged in next time he/she access the site using the same credentials.  The only solution so far is to close browser, but that's not acceptable from the usability standpoint.


I've got this .bat file:  ftp -s:commands.txt   File commands.txt:  open www.domain.nl username password cd path/to/upload/to/ prompt   How can I now upload the folder where I ran the .bat to the server? It doesn't really matter if upload.bat and commands.txt get uploaded too.

I need to upload a full folder using FTP.  Is there is any option for transferring a folder and all of its contents at once?


I got a really big logcat (since 2016) and I'm interested in printing everything (all the rows) after a point (let's say, September). The logcat is really big, so I can't really use tail.

Input file1 is:  dog 123 4335 cat 13123 23424  deer 2131 213132 bear 2313 21313   I give the match the  pattern from in other file ( like dog 123 4335 from   file2).  I match the pattern of the line is dog 123 4335 and after printing all lines without match line my output is:   cat 13123 23424 deer 2131 213132 bear 2313 21313   If only use without address of line only use the pattern, for example 1s how to  match and  print the lines?


I have this query in MSSQL:  UPDATE [dbo].[sliders_item] SET AdminCategoryLabel = st.Title from [dbo].[sliders_item] si inner join [dbo].[sf_content_link] cl on si.base_id = cl.parent_item_id inner join [dbo].[sliders_type] st on cl.child_item_id = st.base_id   Wich works well when sf_content_link have one record with si.base_id = cl.parent_item_id.  I have to update AdminCategoryLabel using the connection table sf_content_link for the case when sf_content_link have many records with si.base_id = cl.parent_item_id. Somehow i have to select all the Titles from sliders_type and concatenate them to replace the current st.Title wich takes only first record.  Any idea how to do that?  The tables designs are:   sliders_item: base_id, AdminCategoryLabel sliders_type: base_id, Title sf_content_link: id, parent_item_id (FK for sliders_item base_id), child_item_id (FK for sliders_type base_id).

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


I am trying to a create a class TemplateTest<T> which accepts a single parameter - the class T. I have the following code which declares the class TemplateTest and the constructor:  //in TemplateTest.h  #ifndef TEMPLATETEST_H #define TEMPLATETEST_H  template<class T>  class TemplateTest {     T property;     public:        TemplateTest(T value); };  #endif // TEMPLATETEST_H   //in TemplateTest.cpp  #include<iostream> #include "TemplateTest.h"  using namespace std;  template<class T>  TemplateTest<T>::TemplateTest(T value) : property(value) {};   I'm not sure where the error is, but when I call the constructor in main.cpp with a parameter p I get the message: undefined reference to TemplateTest<p>::TemplateTest(p).  //in main.cpp  #include<iostream> #include "TemplateTest.h"  int main() {     int g = 6;      TemplateTest<int> temp(g);      return 0; }  //returns "undefined reference to TemplateTest<int>::TemplateTest(int)   What am I doing wrong?

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


I have 20,000 photos, half of those photos are duplicates, how can I delete Meaning How can I delete pictures that contain duplicate content

Is it possible to find duplicate files on my disk which are bit to bit identical but have different file-names?


Supposing that the subject of the noun clause is, in fact, presently, and intrinsically, the best, would the correct sentence be:     I heard [that] you are the best man for the job.   or     I heard [that] you were the best man for the job.   or perhaps either?  The argument for the former is that "is" more accurately represents the time window during which the subject is the best, whereas the argument for the latter is that tense agreement between "heard" and "was" is aesthetically pleasing.  Perhaps also supporting the latter is that "was" does not contradict "is"—per Hedberg, 1990s: "I used to do drugs. I still do, but I used to, too."

I know the past tense carries the past tense in every dependent clause, but referring specifically to places or to things that are eternal, like the Earth, seems a bit weird and therefore we sometimes (I believe incorrectly) say     He didn't know that New Jersey was actually on the East Coast.   Because it still is. Or     He thought the Earth was round.   So is it square now?  Logically speaking, would you consider the use of past tense here a bit confusing in a day-to-day speech in these examples? Would you instinctively opt for using the present tense?


When Gold/Silver came out, I remember being excited that I could transfer over Pokemon from RBY, given a friend's GBA and a link cable. That's the generation I stopped at, but I'm curious if the practice continued indefinitely.  Can I have a Pokemon originally caught in every (mainline) game in ORAS, given the old games and all the necessary consoles and accessories? How far does this extend to (trade-capable) spinoffs, like Colosseum? If I wanted to do this, and had all the games, what consoles and accessories would I need?

I know that you can trade Pokemon between games of the same generation (Gold/Silver, Ruby/Sapphire) and even trade between 1st gen and 2nd gen. However, I haven't been able to find a way to trade Pokemon so that I can play with my 1st generation Pokemon in HeartGold, for instance. If it is possible, how many steps would it take and what equipment would I need?


is not a real problem but more a curiosity, what's more I do not want some stupid question, the point is playing with Visual Studio (x64), I have noticed that if a Structure is present a wchar*  #include <iostream>  struct {     wchar_t* pTest;     unsigned int uTest; } Test;  int main() {     std::cout << "sizeof(Test) - " << sizeof(Test) << "\n\n"; }   sizeof(Test) - 16  will not have to be 12 ?  #include <iostream>  struct {     wchar_t* pTest;     //unsigned int uTest; } Test;  int main() {     std::cout << "sizeof(Test) - " << sizeof(Test) << "\n\n"; }   sizeof(Test) - 8   #include <iostream>  struct {     //wchar_t* pTest;     unsigned int uTest; } Test;  int main() {     std::cout << "sizeof(Test) - " << sizeof(Test) << "\n\n"; }   sizeof(Test) - 4   I understand that behind there a logic, but I'm confused about who are the rules relating to this.

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I was playing around with the function $\dfrac{1}{1+x^2}$, and knowing that the integral over $(0,\infty)$ was $\dfrac{\pi}{2}$, I was hoping to see if there was some neat pattern to determining the value of the following generalized form: $$I=\int_0^\infty \frac{dx}{1+x^n}$$ for natural $n\ge2$. I ran some computations in Mathematica and got a consistent result of $\dfrac{\pi}{n}\csc\left(\dfrac{\pi}{n}\right)$, which also happens to be equivalent to $\dfrac{1}{n}\Gamma\left(\dfrac{1}{n}\right)\Gamma\left(1-\dfrac{1}{n}\right)=\mathrm{B}\left(\dfrac{1}{n},1-\dfrac{1}{n}\right)$.  Is there some neat trick I can use to get this result? I've considered integrating along a contour, but I'm somewhat rusty with complex methods. Also, the result was posted previously .  I tried something like this instead: $$\frac{1}{1+x^n}=\begin{cases}\displaystyle \sum_{k=0}^\infty(-1)^kx^{nk}&\text{for }|x|<1\\\\ \displaystyle\sum_{k=0}^\infty (-1)^k x^{-n(k+1)}&\text{for }|x|>1\end{cases}$$ then integrating along the respective intervals $(0,1)$ and $(1,\infty)$.  Here's my attempt: $$\begin{align*}I &=\left\{\int_0^1+\int_1^\infty\right\}\frac{dx}{1+x^n}\\\\ &=\sum_{k=0}^\infty \left\{\int_0^1 (-1)^kx^{nk}\,dx+\int_1^\infty (-1)^kx^{-n(k+1)}\,dx\right\}\\\\ &=\sum_{k=0}^\infty \left\{(-1)^k\left[\frac{x^{nk+1}}{nk+1}\right]_{0}^{1}+(-1)^k\left[\frac{x^{-n(k+1)+1}}{-n(k+1)+1}\right]_1^\infty\right\}\\\\ &=\sum_{k=0}^\infty \left\{\frac{(-1)^k}{nk+1}-\frac{(-1)^{k}}{1-n(k+1)}\right\}\\\\ &=\left(1-\frac{1}{1-n}\right)+\left(-\frac{1}{n+1}+\frac{1}{1-2n}\right)\\ &\quad\quad+\left(\frac{1}{2n+1}-\frac{1}{1-3n}\right)+\left(-\frac{1}{3n+1}+\frac{1}{1-4n}\right)+\cdots\\\\ &=1-\frac{2}{1-n^2}+\frac{2}{1-4n^2}-\frac{2}{1-9n^2}+\cdots\\\\ &=\sum_{k=0}^\infty \frac{(-2)^k}{1-(kn)^2}\end{align*}$$ However, this series diverges by the ratio test, so I'm not sure if I made a mistake in my calculation or used some flawed reasoning.

I am trying to evaluate the following:  $\displaystyle \int_{0}^{\infty} \frac{1}{1+x^a}dx$, where $a>1$ and $a \in \mathbb{R}$  Any help will be much appreciated.


A frozen joint of turkey was partly defrosted cut into 2 and the other half was re-frozen   Surely this is not safe

What are the general rules regarding when can you refreeze food that was frozen and then thawed in the fridge? and what are the reasons behind them? (Hygiene? Food quality?). Let's assume for the sake of the argument that the items were in a non-frozen state only a few hours.  To be more specific, I'm interested in the application of these rules for  - Ginger garlic paste - Dough - Indian Curries - Green Chilly paste - Frozen green peas


i want to try Ubuntu on my 11 year old laptop (Dell). I don't get the latest system requirements, but maybe you can help me find an older version that i can try. My favorite would be Ubuntu, but if it isn't going to work i will also try Lubuntu. (Btw: is Lubuntu made by Cannonical, too?) My system requirements:  DELL Laptop, 64-Bit CPU: Intel Celeron CPU 900 @ 2.20GHz GPU: ATI Mobility Radeon HD 4300 RAM: 2 GB  Thanks for your help!

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


I've read all the techniques to reset an iPad and none of them work. Not only do I not know the password to the Apple ID, the Apple ID doesn't exist at all! It was a former employee's email address. So I just recreated his old email account and registered with Apple as a new Apple ID. But the iPad won't take the Apple ID password I just created...  I can't even sign out unless I turn "Find My iPad" off, but when I turn that off I'm asked for the Apple ID password again. iTunes also makes me turn "Find My iPad" off.  What can I do?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


I want to test if two observations of nominal data accord to the same distribution. I am using the chi squared statistics to perform a  and normalize the result with Cramer's $\phi$.  Unfortunately, all the examples for performing a chi squared homogeneity test I could find (e.g. ) perform the test with two one-dimensional observations. The example after the link above, for example, compares boys and girls dependent on their viewing preferences. This makes two observations in the form $[x_0, \ldots, x_n]$. However, I want to test observations in the form $[[x_0, \ldots, x_n], \ldots, [z_0, ..., z_m]]$. I don't know, if "multidimensional" is the right term in this context. I figured it might be.  Could you explain to me, how a chi squared homogeneity test can be performed with multi-row observations? I know it works, because scipy provides unique values for two dimensional input lists.  import scipy.stats as sps observation1 = [[95, 31, 20], [70, 29, 18]] observation2 = [[21, 69, 98], [54, 35, 11]] data = [observation1, observation2] print sps.chi2_contingency(data)   The code above yields (159.18016188570166, 4.772222443744986e-31, 7, array([[[ 69.44008748, 47.45072645, 42.53205358], [ 45.11526642, 30.82876539, 27.63310068]], [[ 76.04085626, 51.96125177, 46.57502446], [ 49.40378984, 33.75925639, 30.25982128]]])) where the first value is chi squared. Flattening the observations yields different values, so there must be a difference.  How do you calculate $\chi^2$ for determining the homogeneity of multidimensional observations? Please note that I know how to calculate $\chi^2$ on a multi-row contingency table. Instead I want to know how to perform a for the homogeneity of two contingency tables.  Example:  Table 1                                   Table 2         outcome0 outcome1 outcome2 sum                outcome0 outcome1 outcome2 action0       95       31       20 146        action0       21       69       98 action1       70       29       18 117        action1       54       35       11     sum      165       60       38 263   Question: Are these observations following the same distribution?  Scipy allows to determine the expected values (and $\chi^2 $) of multi-dimensional observations. The expected values are returned as the last element of its call:  Expected table 1                      Expected table 2         outcome0 outcome1 outcome2            outcome0 outcome1 outcome2 action0    69.44    47.45    42.53    action0    76.04    51.96    46.58 action1    45.12    30.83    27.63    action1    49.40    33.76    30.26   The sum of the squared differences, divided by the expected value, yields the $\chi^2$ value. Note, however, that the expected tables are not just the expected values from each individual table (quick proof for the first cell of table 1: $\frac{146 \cdot 165}{263} = 91.60$). Instead their calculation seems to be somehow dependent on each other.  I'd like to know how the expected values depend on each other, so that I can calculate it myself.

I am having difficulty in how to calculate the Pearson's $\chi^2$ statistic for a contingency table with entries: (3, 0) and (0, 3) (row-wise).  I was studying Agresti's categorical data analysis and found this table. He calculated it as 6.  Through what calculation did he reach this answer?


What is a ppa? I tried installing vlc 2.2.1 but I found two PPAs and both of them seem to work? Is there no difference between them? Which one is better for future releases?   sudo add-apt-repository ppa:mc3man/trusty-media sudo apt-get install vlc vlc-plugin-*  sudo add-apt-repository ppa:videolan/stable-daily sudo apt-get install vlc    Also, why is sudo apt-get update always included in the steps of installing new software? Isn't Ubuntu supposed to be updated by its nature ?

I keep reading about  ('PPAs') and people answer questions with a link to a PPA. What's the best way to use these?     There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience, an index of each is below.


I'm trying to make the user type an easier URL.  So users query for: https://example.com/invoices/X123  And the .htaccess would rewrite (mask) to    https://api.example.com/invoices/1/getInvoicefromHash.html?hash=X123   But somehow it does not work. It just redirects...  This is my .htaccess:  RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^invoices/(.*)$ http://api.domain.com/1/getInvoicefromHash.html?hash=$1 [QSA,L]

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.


I've seen the statement:     It's possible that random variables $X_i, X_j$ are independent for $i≠j$, but $X_1, X_2, X_3$ are dependent.   I haven't been able to find examples of this though.  Any examples?

Given that I have a fair coin which I toss three times, how do I:  a) Find three events $A$ , $B$, and $C$ such that no two are independent but $P( A  \cap B \cap C) = P( A ) P( B) P( C)$ ?  b) Find three events $A$ , $B$, and $C$ such that every two are independent but all three are not independent: $P( A  \cap B \cap C) \not= P( A ) P( B) P( C)$ ?  How would I approach a problem like this ? I started by drawing a binary tree that ended up with 8 leaves but I have no idea how to use it to get the answers. Any help would be appreciated.


Why is it that when I want to mention in a comment or an answer a user, sometimes it displays the name, and other it just doesn't? I'm not sure if that is supposed to happen? Is it because some of them have a space in their user names? Why?

Possible Duplicate:          Say, we've got an answer with some comments under it. Sometimes when I want to reply to one of the comments, I can easily refer to the comment author printing @ and starting to enter the author's name, that is autocompleted for me. But sometimes (if only one person gave comments or not...) I'm not suggested with any variant. Why is it so? On what terms does it depend?


After my sister upgraded her Lenovo laptop to Windows 8.1, her internet connection keeps showing "limited" connection. She can't access to internet. However, my Toshiba laptop (Windows 7) can access to internet. Even though we tried to restart her laptop and even disconnect and reconnect the modem few times, same problem still occur. Please help.

My windows 7 network will show limited access or unidentified network after coming up from hibernation.  In the office I normally use LAN connection, I turn-off my wireless card (DELL Latitude has on/off switch for the wireless card). When I back at home I will turn on the wireless card, but it will take about 15 seconds to detect my home WIFI and then show limited access. I will have to restart the notebook and it will be able to connect to my WIFI and internet.  The problem will be solved if I restart the notebook, but that defeats the purpose of hibernation doesn't it?  I have tried uninstalling the wireless card driver but still does not solve it. I also tried updating my network card driver but windows says I am using the latest driver. On support.dell.com also showing I am using the latest driver.


I need a general proof for any form of a cone, not a right circular one.

Abstract definition of a cone: locus of points of line segments join a single point $v$, called vertex with set of coplanar points called base.  Height of cone is distance from vertex to plane.  If I take strange set of co-planer point such as complicated design for example, as base then volume of the set join with some vertex is still given : $\tfrac13$ (base)(height).  How can I prove this in calculus?  I have tried a few it is too late to wake my sister, thank you.


Or maybe it is two mirrored triangles... and an 'invertor' dot?   This is from a diagram in the , page 76 bottom left.  Note that  shows a similar device. In that question however the symbols only have two ports and no dot/circle.

The below image is from a service manual for a mobile radio. Note the small symbols that appear to be four triangles, point to point. I've searched far and wide and cannot identify that symbol. I have a nagging feeling that I've seen something like it in hydraulics, but never in an electronics diagram. I know that my radio doesn't have a bunch of stars of David printed inside it, so what could this symbol be?  Some of them have a line through the middle, others don't. Compare for example the ones near the labels "mic int" and "mic ext". Does this represent something, or is it a typo?


How is it possible to do an exhaustive key search (DES algorithm) and only search for 2^55 instead of 2^56 keys ?  This is a slide from my course if this helps you. I don't understand it.

I was reading upon Biham and Shamir's paper and a fact has been presented over there: if $ P_1 = \bar P_2$ and I choose a key $K_1 = \bar K_2$ then in that case  $$T_1 = DES(P_1, K_1)$$ $$T_2 = DES(P_2, K_2)$$  then $T_1 = \bar T_2$ . Does this hold for only that particular combination of S-box or it will be same for any S-box combination. I mean if I change S-boxes randomly then will it still be same?  Also there is one more thing mentioned on the paper, but I am not able to get it. PFB the image.   Here output $T$ will be $\bar T_2$ only if I $P_2$ was inserted with $\bar K$. And clearly I am entering $P_1$ (which is $\bar P_2$) hence the output can never be $T_2$. Please correct.


Here's the dataframe:        0         1        2  A     (0.2,.1)  (.1,.3)   (.4,.5) B     (0.2,.14) (.1,.3)   (.42,.5) C     (.5,.12)  (.1,.5)   (.74,.5)   When I try to export it to excel using:  df.to_excel('hello.xlsx',float_format='%.2f')   It shows floating points like .10000000001 - how do I just show up to two decimals? (the precision seems to be lost when you zip two values , that were previously rounded)

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


What exactly is going on in the video example? I understand the phenomena occurs because of magnetism but I am trying to figure out the mechanics behind this sculpture. There obviously is a magnet underneath but what is it doing? Is it moving? Is it getting some type of charge? Any insight is great!

What exactly are the spikes, or peaks and valleys, caused by in pictures such as these    Wikipedia states that "From the point of view of magnetic energy, peaks and valleys are energetically favorable", but I'm not exactly sure what that means, or how it works. Why isn't the fluid just happy being attracted to the magnet in a semi-sphere shape? Could it be that it gains a magnetic charge, so it attempts to repel itself at the same time? Just pulling at straws here.


I met someone online. She says she wants to help me with legal issues. She said her late father left her a business and she says she is selling the business and sending the money to my account. She says she needs: my full name my routing and account numbers  Online information such as screen name and password. is this a scam?

A man in  west  coast  Austria wants to deposit money  into  my account.  I'm in Alabama.  I had to get an online  account.  I did that, but he says his bank manager  needs all this information:   DOB SSN    online access username  online access  password   security  question and answer   bank name   bank address   bank number  person who is on the account     their name their address    account no   routing no     OK. Is it safe  to do this or am I being scammed?  I don't want him  to be able to end up withdrawing all my money instead of depositing money.


The flagging page specifically states: "Something not quite right? Let us know about it."  I was flagging some items yesterday, including , which says:     The main problem I have is that there's a limit to the amount of requests I can make per minute. I've been searching on google for certain methods to use cache files to override this   I flagged it with the message:     From my understanding, this could lead to spamming of reddit. This question does not sit right with me.   It got declined because:     a moderator reviewed your flag, but found no evidence to support it   No evidence? Are you serious? He's looking to override the rate limiting on Reddit's API.

How should we treat questions that are, or have seeds of, evil or malicious purposes and actions, such as writing spambots and malware?    Should they be answered like regular "everybody keeps their pants on" questions? Or should there be some other type of response to this bad behaviour lot?


I just found  , and I must say I found it very useful; however, it was closed as "Off topic". Now, it hasn't generated all that many page views, but I would have loved it if it was open, in case something new came up in the past year it was closed.   The "Off topic" specification doesn't exactly explain what the problem is with the question; I see the point for Stack Overflow, given there is no actual coding problem discussed - but a user in that post points out:     (That aside, prepare for your question to be closed, it's a bit too close to "please provide me a list of", which isn't muchly appreciated)   Now, the thing is, a lot of times I actually would appreciate greatly a "provide me a list of" question, like in this case - however, I can see the point in this posting in particular not being on-topic for Stack Overflow.   My question then is - is there a place where such "listing" questions about computer software in general can be asked? I don't think it would fit in programmers.SE, and one may think superuser.com would be appropriate - but then again, its purpose could be understood as specific questions about how to do more advanced stuff with existing software, thereby excluding again listing questions.   If that is so, then where do such question belong? If Super User on the other hand is appropriate, wouldn't the referred post be better off moved to Super User, and opened for contributions there - instead of sitting on Stack Overflow closed?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


How can we prove $\operatorname{cosec}(2A) + \operatorname{cosec}(4A) + \operatorname{cosec}(8A) = \cot(A) - \cot(8A)$?

Evaluate $$\dfrac{1}{\sin(2x)} + \dfrac{1}{\sin(4x)} + \dfrac{1}{\sin(8x)} + \dfrac{1}{\sin(16x)}$$  It would be tough for us to solve it using trigonometric identities. There should be strictly an easy trick to proceed. Rewriting and using trigonometric identities $$\dfrac{1}{\sin(2x)} + \dfrac{1}{\sin(2x) \cos (2x)} + \dfrac{1}{ 2\big [2\sin (2x)\cos (2x)\cos (4x)\big ]} + \dfrac{1}{\sin(16x)}$$ What am I missing? Regards


I have a custom block module. I want to override core/themes/bartik/templates/block.html.twig in my-module directory.  In my-module directory I have a folder templates/ and the twig file block--my-module.html.twig.  In modules/custom/my-module/my-module.module i have:  function my_module_theme($existing, $type, $theme, $path) {    return array(      'my_module' => array(      'variables' => array('message' => NULL),      'template' => 'block--my-module'     ),   ); }   If I insert in my build() function in modules/custom/my-module/src/Plugin/Block/MyModule.php e.g:  '#theme' => 'my_module',   my twig template is loaded from modules/custom/my-module/templates/block--my-module.html.twig, but as a child inside the default block.html.twig core/themes/bartik/templates/block.html.twig?  What I am doing wrong here?

The Question:  In Drupal 8: How do I add a template override for a view block and have that twig file reside in a custom module - not my theme?  Further Information:  I have already created a custom module that creates a content type, imports data from an RSS feed and generates nodes into the content type it created.  The module also contains a view YML file so that the view for my content type is created when the module is installed.  The view only has one display which is a block.  I would like to create a template override for the block and house the template override within the module (rather than within my theme).  The template override does the following:   Adds the appropriate classes to the block Adds an image beside the block title when the title is displayed Wraps the {{ content }} in a div with an appropriate class Loads the custom module's library to apply CSS   The goal is to have a module that a non-technical person can install, assign a block to the desired region and have all the templates, CSS, JS, etc pull from the module.  I don't want them to have to copy a template into their theme, etc.  I want the block to be a view so that the user can use the Views UI to make any desired updates to the view block's fields, number of returns, etc.  I was able to get Drupal to recognize the template by using hook_theme_registry_alter() but the variables from the block are null.  Both the {{ label }} and {{ content }} are null when I kint them in the template override.  Here is the hook_theme_registry_alter() code:  /**  * Implements hook theme_registry_alter  **/ function MYMODULE_theme_registry_alter(&$theme_registry){   $theme_registry['block__views_block__MYVIEW_block_1']['path'] = drupal_get_path('module','MYMODULE') . '/templates/';   $theme_registry['block__views_block__MYVIEW_block_1']['template'] = 'block--views-block--MYVIEW-block-1'; }   It should be noted that when I used hook_theme_registry_alter() for a view page template override in my module it worked.  My guess is that the variables were pulled from the page alias.  Please include detailed information because I am still learning about the various hooks and how variables are passed.  Thanks in advance!


I have created a Webapp that requires external images. I achieved that by creating a shortcut of the extFolder in the eclipse project folder (WebContent/Web/images/extFolder).  Now when a user tries to upload a new picture, after the upload the old picture is shown and new one won't show until I restart the webapp.  a. Is there a better way to add an external folder in Tomcat 8  b. If no then can the Webapp refresh that directory to incorporate the changes?

How can i use Tomcat to serve image files from a public folder outside webapps? I dont want to use a 2nd Apache fileserver on a different port since the image files are part of the same app. And i dont want to create a symlink to the public folder inside webapps since my app is deployed as a war file....Is there a simpler solution similar to using default servlet for static content inside webapps, for static content outside outside webapps


I have an issue with Server 2008 and Windows 7 client machines -- the event viewer log for Internet Explorer 10 is empty.  I've googled this for the best part of my morning with no joy.   Currently tried:    Checked IE logs are enabled in event viewer. Browsed to location of event logs and noticed the date modified is 20/3/13 Tried creating a custom log and added IEFRAME as the event source, its still blank.   See below for virtually the same issue without an answer. I'm trying to investigate an issue where IE crashes and finding it difficult without logs.

OS- Windows 7 Professional & Windows Server 2008 R2  In Event Viewer --> Application and Services logs --> Internet Explorer there is no log, it is always empty.  I need to check why my Internet Explorer crashes automatically, but I don't find any log.  I have also try some registry setting to enable log. but unable to do the same. below is the print-screen.


I am trying to measure the speed of different encryption algorithms. I thought I would start of with logging the current time (either nano or milli) then run the actions needed, once done, grab the time and and compare.   It all worked for one iteration, but once I try and add a loop to automatically test multiple algorithms, the numbers don't add up.   public static void main(String[] args) throws Exception {      Map<String, int[]> algorKey = new HashMap<String, int[]>() {         {             put("AES", new int[] { 128 });             put("DES", new int[] { 56 });         }     };     Iterator it = algorKey.entrySet().iterator();     while (it.hasNext()) {         Map.Entry pairs = (Map.Entry) it.next();         String algorithm = (String) pairs.getKey();         int[] keyLengths = (int[]) pairs.getValue();          for (int i = 0; i < keyLengths.length; i++) {             int keySize = keyLengths[i];              Long startT = System.nanoTime();             System.out.println(startT);             // Generate key             KeyGenerator kgen = KeyGenerator.getInstance(algorithm);             kgen.init(keySize);             SecretKey key = kgen.generateKey();             Long endT = System.nanoTime();             System.out.println(endT);              System.out.print("Algorithm: " + algorithm + "\nKey Size: "                     + keySize + "\nTime to Generate: " + (endT - startT)                     / 1000000 + "ms\n\n");         }     } }   Results come out as follows, the first result is correct (I tested both algorithms individually) but the second is far far far too small.    11223817758736 11224385930995 Algorithm: DES Key Size: 56 Time to Generate: 568ms  11224386324864 11224401644040 Algorithm: AES Key Size: 128 Time to Generate: 15ms     (I used snippet to keep the formatting of my results)  I am not sure why the subsequent results happen so fast, or why the time is not counting as it should or something. Is there a possibility that there is caching of data going on that speeds up the process?  I added even more loops and each subsequent iteration got smaller than the last.  Thanks a lot

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


When a user clicks the "search" button in my ASP.NET application, a temporary "spinner" div is loaded. Then when the search (finally) completes, the contents of the spinner div are replaced by the HTML returned by the SubmitSearch method.  $("#spinner").load("@Url.Action("SubmitSearch","Search")");   I also have this JavaScript file that is loaded in:  $(document).ready(function() {     $(".card--result").hover(function () {         alert("hover");         $(this).css('cursor', 'pointer');     });      $(".card--result").click(function() {         var url = $(this).attr('data-url');         window.open(url, "_self");     }); });   However, the problem is that a div with card--result class is part of the new HTML that gets added to the page after the .load method succeeds.   How can I register the .hover and .click functions so that they are actually triggered on the newly loaded HTML elements?

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


I'm an avid watcher of trailers. I watch trailers over and over again. I even watch trailers of movies that I don't plan on watching.  But sometimes, I notice that some trailers contain some additional scenes that aren't in the movie.  I noticed this in a few trailers/movies before. A notable example is the  of  where the following [amazing] scenes aren't in the movie:        Cyborg .   Aquaman .   Cyborg .   The Flash .   Wonder Woman, Aquaman and Cyborg .      So, Why do trailers have those additional scenes? Are those scenes filmed just for the trailers? Isn't that needlessly expensive?

I had seen all the trailers of  before its release. In one of those trailers Uncle Ben (Martin Sheen) says to Peter,       Do you have any idea what you really are?   This seems to imply that Uncle Ben knows about Peter's identity. This would have been a huge spoiler. But when I saw the movie, there was no such scene.   Do the filmmakers discuss such spoilers with some of the audiences and see if they like it and then change it accordingly? Or was this scene cut for other reasons?