It is well known that Maxwell equations can be made symmetric w.r.t. $E$ and $B$ by introducing non-zero magnetic charge density/flux.  In this case we have $div B = \rho_m$, where $\rho_m$ is a magnetic charge density.  But this means that $B$ cannot be expressed as the curl of vector potential anymore.  Does it mean that it is impossible to develop electrodynamics of non-zero electric and magnetic charges in terms of vector and scalar potentials? What happens to $U(1)$ gauge invariance then?  P.S.: I know that for the point-like magnetic charge vector potential can still be introduced, but not in the entire space. My question is related to non point-like magnetic charge densities.

Absence of magnetic charges is reflected in one of Maxwell's fundamental equations: $$\operatorname{div} \vec B = 0. \tag1$$ This equation allows us to introducte concept of vector potential: $$\vec B = \operatorname{rot} \vec A.$$ Using this concept, it is possible to express Maxwell's equations in a graceful symmetric form: $$\nabla^2 \vec A - \frac{1}{c^2}\frac{\partial^2 \vec A}{\partial t^2} = - \frac{\vec j}{\epsilon_0 c^2}, \tag2$$ $$ \nabla^2 \phi -\frac{1}{c^2}\frac{\partial^2 \phi}{\partial t^2} = - \frac{\rho}{\epsilon_0}. \tag3 $$  Noticing, that vector $\vec A$ and scalar $\phi$ potentials, as well as electric current density $\vec j$ and charge density $\rho$, form a 4-vector in Minkovsky space-time. Therefore, Maxwell's equations can be expressed in a covariant form, using d'Alembertian: $$\nabla_{\mu}\nabla^{\mu} A_{\nu} = \frac{j_{\nu}}{\epsilon_0}. \tag4$$  If magnetic monopols exist, Maxwell's equation $(1)$ will look as: $$\operatorname{div} \vec B = \mu_0 c \rho_{\mathrm{magnet}}.$$  As the divergence of $\vec{B}$ isn't equal to zero, it impossible to introduce concept of vector potential. Thus, the equation in the form of $(4)$ will not be possible to express.


I've read a post that said that you can only add the CanDestroy and CanPlaceOn tag, is that actually true or is there a way to do other things, like getting unbreakable items? Edit: This is not a duplicate. I've read the post and I just want to know what exactly it meant.

This question was recently split into different questions for each workaround. See   meta posts for more information.   Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}} summon tnt ~ ~ ~ {Fuse:20s}


The MOVE command does not work when to ovewrite a directory. I have also tryed to run cmd with admin rights. I'm posting this question with more info so you can easily test it self.  Make your own folder somewhere and open command window at that location. Then copy and paste this block into cmd-window to create teststructure   MD aaa\test\a MD aaa\test\b MD bbb\test\b MD bbb\test\c MD ccc\test\a MD ccc\test\c ECHO hello > aaa\test\a\a.txt ECHO hello > aaa\test\b\b.txt ECHO hello > bbb\test\b\b.txt ECHO hello > bbb\test\c\c.txt ECHO hello > ccc\test\a\a.txt ECHO hello > ccc\test\c\c.txt   Now I want to move and merge all "test" folders in ".\test" The MOVE command is fine, but in win 7 it fails(Access Denied) when to overwrite existsing "folders". if you now try following block one by one, the first will be ok, but next will fail.   move /Y aaa\test .\ move /Y bbb\test .\ move /Y ccc\test .\   However I have found other solutions which does the the same.   XCOPY aaa\test test\ /E/Y XCOPY bbb\test test\ /E/Y XCOPY ccc\test test\ /E/Y RD aaa\test /Q/S RD bbb\test /Q/S RD ccc\test /Q/S   XCOPY and Then Remove Directory   ROBOCOPY aaa\test test\ /E /IS /MOVE   ROBOCOPY with the /Move option   COPY command is totally useless in this case...     I do really need MOVE command to get a batch file with this contetnt to work wich worked in XP.  move /y "%1" c:\mydir\   I tryed robocopy, but then it will move only the contents of the folder. not the folder completly.  robocopy "%1" c:\mydir /E /IS /MOVE   If you wish to help me, then you can do it in two ways..  1) Find a solution to get MOVE to work as in XP  2) Find a way to do the same as what  move /y "%1" c:\mydir\  does    A suggestion could be to get the folder name from the path and do something like this   // %1 = "c:\anotherdir\cool"  if %1 is path_to_a_folder then (    get %foldername of %1    robocopy "%1" c:\mydir\%foldername /E /IS /MOVE ) else move /y "%1" c:\mydir\    EDIT: Hey this works fine for directoryes, what more can i do so the script also can work with files?  robocopy %1 "C:\Users\azizkar\Desktop\ebben\%~n1" /E /IS /MOVE

I can't use this command in win 7 when want to move a directory if the destination exists. It says Access denied. Why hapens this? It worked in XP.  move /y "%1" c:\mydir\   I can use robocopy, but then it will move only the contents of the folder. not the folder completly.  robocopy "%1" c:\mydir /E /IS /MOVE   How can I solve this problem?


Let $f_1:[a,b]\rightarrow \mathbb{R}$ be a Riemann integrable function. Define the sequence of functions $f_n:[a,b] \rightarrow \mathbb{R}$ by  $f_{n+1}(x)=\int_a^x f_n(t)dt,$  for each $n\ge 1$ and each $x\in [a,b]$. Prove that the sequence of functions   $g_n(x)=\sum\limits_{k=1}^n f_k(x)$  converges uniformly on [a,b].   I try to use Ascoli Theorem to prove this problem by considering  $|g_n(x)-gn(y)|\le\sum\limits_{k=1}^n |f_k(x)-f_k(y)|$. However, $|f_k(x)-f_k(y)|\le M |b-a|^{k-2} |x-y|, $ where $M>0$ is a constant achieving by the condition that $f_1$ is an integrable function. However, this estimation depends on $k$, so I cannot apply Ascoli-Azela Theorem.   Thank you in advance for your help.

Let $f_1 : [a,b] \rightarrow \mathbb{R}$ be an integrable function.  Let's define a sequence $(f_n)$,  $ \ \ f_n : [a,b] \rightarrow \mathbb{R}$ as $f_{n+1}(x):= \int_a ^x f_n(t)dt$.'  Prove that  $\sum_{m=1} ^{\infty} f_m(x)$ is uniformly convergent on $[a,b]$.  Could you help me with that?  Thank you.


Note: This question is erroneously marked as a duplicate. It concerns a very specific situation with unfulfillable market orders in very illiquid markets, one that no other discussion here has covered. Related questions are addressed at the end.  TL;DR This is the entire order book:  __________________________________________________ |___________Buy__________|__________Sell__________| |  Time |  Price | Quant |  Time |  Price | Quant | |       |        |       | 10:05 | market |   1   | |       |        |       | 10:00 | $10.00 |   1   | |_______|________|_______|_______|________|_______|   There's an incoming buy order for 1 share, limit price $11. Which order gets matched and at what price?    With the above order book, if someone came in and placed a buy order for 1 share at limit price $9, I assume it matches the market order and trade is executed at $9. Straightforward. If instead the buyer placed a buy order with limit price $11, would it match the limit order or the market order?  Answering by determining "price" of unfulfilled market order  When the incoming order is a market order and there are only limit orders on the books, it's clear how to price it: based on the best bid or ask. But that doesn't help us here.  One option is that if we can figure out what to consider as the "price" for the unfulfilled market order on the books, we can decide based on price/time priority.  The possibilities are:   Price market order at best ask: $10. Now we have two orders at the same price, so the earlier-placed one gets it: the limit order. But this seems unfair. The trader placing the market order is clearly willing to go below $10, so they should get the trade! Price market order at best bid: $11 or undefined? On the one hand, the incoming buy order is at $11, but on the other hand, by definition an incoming order isn't on the books yet, so there is no "best ask". If it were $11, the buy order would be matched with the $10 limit order, even if the market order had been placed first! Seems unfair that an earlier-placed market order would lose out to a limit order. Price market order at last traded price: let's say $11. Again the market order would unfairly lose out to the limit order here. Price market order at $0.01 better than best ask: $9.99. Okay, this works. But we can't simply treat it as limit price $9.99 because this market order would match an incoming buy order with limit price $9.   Always matching market orders first  As @Dheer's answer suggests, one approach is to simply match market orders first no matter what. This makes a lot of sense, though we still need to figure out at what price does the trade executes. Clearly not the buyer's limit price of $11, because they'd get a worse deal than the limit order on the books. So, $10? $9.99? Last trade price, or opening price (but no more than $10)?  What if the incoming buyer placed a market order instead. At what price do you match two market orders - same as the answer to the above?  I guess this comes down to specifications for individual exchanges, but I'm wondering if there's a standard here or a way to approach it from basic rules that clears up all these situations.    Edit: Some specifics of how limit orders are matched is discussed at  This question is not a duplicate of that - my question is specifically about how an incoming limit order is matched when the other side of the order book has an unfulfilled market order. This case is not discussed at all by various existing questions, which only discuss matching incoming orders when there are sufficient limit orders already on the books.  Other relevant discussions that don't directly address these questions but are good background reading:         Another edit:  According to this answer , some or all markets will reject incoming market orders if there are no orders on the books to match it to, so the situation I describe in this question wouldn't be possible in the first place. I don't have any sources to back this up but if someone can confirm or contradict this we can probably settle this question.

Say a security has been trading at under $20.10, and there are limit orders selling at $20.10 and $20.21. Then Simon issues a limit order to buy at $20.21. According to , Simon would end up buying shares at $20.10.  Why does the exchange favor the buyer here?  I.e., why does the transaction execute at the seller's limit of $20.10 instead of the buyer's limit of $20.21?  (I.e., why don't Inara/River get to sell at $20.21 / above their limit, but Simon gets to buy at $20.10 / below his limit?)  Is the example flawed?  If it makes a difference, I'm mainly curious about NASDAQ and NYSE.  I tried Googling for specs (e.g. ), but couldn't find anything.  Only found that some  implementation executes the average of the buy/ask.  Just curious how the system works.


Show that the set $\{5, 15, 25, 35\}$ is a group under multiplication modulo $40$. Is there a relation between this and $U(8)$?  I am having a really difficult time beginning this proof. All this is abstract to me.

Show that the set $\{5,15,25,35\}$ is a group under multiplication modulo $40$. What is the identity element of this group. Can you see any relationship between this group and $\mathbb U(8)$?   I am very stuck on this question and I think my knowledge of abstract algebra is my liability at the moment. Right now I'm most confused by the fact that I learned: An element of a group of this nature must be relatively prime with the working mod.  Obviously here this is not the case, so I don't really know where to begin.  Do I need a Cayley Table?  Thanks.


I have a repository.  ("git init")  I've done check-ins and commits and logs and stuff. But, how can I remove all traces of git and delete git off this directory (and subdirectories)?   I'm on Ubuntu.

I've been wondering whether there is a good "git export" solution that creates a copy of a tree without the .git repository directory. There are at least three methods I know of:   git clone followed by removing the .git repository directory.  alludes to this functionality but starts with "Just read the desired tree into the index..." which I'm not entirely sure how to do.  is a third party script that essentially does a git clone into a temporary location followed by rsync --exclude='.git' into the final destination.   None of these solutions really strike me as being satisfactory. The closest one to svn export might be option 1, because both those require the target directory to be empty first. But option 2 seems even better, assuming I can figure out what it means to read a tree into the index.


I currently host a ASP.NET MVC site on Microsoft Azure. It's a great service, but a little pricey. Costs like $0.12 an hour just to have your site live, and then they also charge SQL Transfer and storage fees. Not CRAZY expensive, but like basically $100/month even if the site isn't doing anything.  I wanted to find a web host for an ASP.NET MVC site, that isn't going to break the bank while it's in its growing phase. Only data we really need is for storing user accounts for sign-up/logins, and for hosting images. I know a lot of hosts serve PHP/MySQL, and there's also plenty that serve ASP.NET Web Forms, but not nearly as many that serve ASP.NET MVC/SQL Server.  You guys know of any that suit these conditions and are pretty easy to setup?  Thanks!

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


An expression below embarrasses me. Why not "it's" but "their" litter?      a cat can use their litter box.   in the context we are talking about a few cats, but in this, specific, example we speak about one cat.

Is this sentence grammatically correct?  Anyone who loves the English language should have a copy of this book in their bookcase.  or should it be:  Anyone who loves the English language should have a copy of this book in his or her bookcase.


i haven't really changed anything of my code and suddenly cant compile it anymore with this error:  Error   29  22  error C2061: syntax error : identifier 'GameBase'   c:\users\...\documents\visual studio 2013\projects\first game\first game\snake.h    1   First Game Error   61  22  error C2061: syntax error : identifier 'GameBase'   c:\users\...\documents\visual studio 2013\projects\first game\first game\snake.h    1   First Game Error   30  33  error C2143: syntax error : missing ';' before '*'  c:\users\...\documents\visual studio 2013\projects\first game\first game\snake.h    1   First Game Error   31  33  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\users\benjamin\documents\visual studio 2013\projects\first game\first game\snake.h   1   First Game Error   62  33  error C2143: syntax error : missing ';' before '*'  c:\users\...\documents\visual studio 2013\projects\first game\first game\snake.h    1   First Game Error   63  33  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\users\...\documents\visual studio 2013\projects\first game\first game\snake.h    1   First Game Error   69  136 error C2661: 'Snake::Snake' : no overloaded function takes 2 arguments  c:\users\...\documents\visual studio 2013\projects\first game\first game\gamebase.cpp   1   First Game   The identifier and the syntax missing ; befor * occure inside of the snake file which is this:  #pragma once  #include "GameBase.h" #include <list>  using namespace std; enum State {     POSX, NEGX, POSY, NEGY, POSZ, NEGZ };  enum ChangeState {     RIGHT, LEFT, UP, DOWN };  class Snake : public Actor { public:     Snake(GameBase *game, Config *config); // HERE theidentifier     ~Snake();      //interface methods     void update(float delta);     void render(ID3D11DeviceContext *context, ID3D11Buffer *worldBuffer);      void setState(ChangeState& state); private:     /*Containing the pointer to the cubes of the snake*/     list<Cube *> m_cubes;     GameBase *m_game; // here the syntax ; before *     //timer for updating     float m_updateTime;     float m_timer;     int m_cubeSize = 21;      State m_state; };   And last but not least the gamebase here:  #pragma once  #include "Dx11Base.h" #include "Cube.h" #include "Wall.h" #include "Group.h" #include "Camera.h" #include "Logger.h" #include "InputHandler.h" #include "Snake.h"  #include <vector> class GameBase : public Dx11Base { public:     GameBase();     virtual ~GameBase();     /*load all shader and so on*/     bool load();     /*unload to be save when changing*/     void unload();     /*update the gamestate */     void update(float delta);     /*presents the new game state*/     void render();     /*Callback for the window its size changes*/     void callBack();     //set vscync or not     void setVsync(bool b);      void addToGroup(Actor* a);      int m_world[21][21][21];  private:     ID3D11VertexShader* m_vertexShader;     ID3D11PixelShader* m_pixelShader;      ID3D11InputLayout* m_inputLayout;      ID3D11BlendState* m_alphaBlendState; // generel blend state      ID3D11Buffer* m_viewCB; //constant buffer for view matrix     ID3D11Buffer* m_projCB; //constant buffer for view matrix     ID3D11Buffer* m_worldCB; //constant buffer for view matrix     ID3D11Buffer* m_cameraPosCB; //constant buffer for view matrix      XMMATRIX m_projectionMatrix; // viewport matrix      Camera m_camera;     InputHandler m_input;      /*the maingroup containing the actors*/     Group m_group;      /*compiles and creates the shader and also the INPUTLAYOUT!*/     bool compileAndCreateShader(char* vertexShader, char* pixelShader); };   with the rror of the no overloaded function takes 2 arguments here:  in the init:  Snake *s = new Snake(this, m_config.get());   Visual studio does not show any syntax errors or anything else it just dont compile. Cleaning didn't help.  Anyone has a clue whats going on and what i am doing wrong so i can get it back to running again?

What are the C++ coding and file organization guidelines you suggest for people who have to deal with lots of interdependent classes spread over several source and header files?  I have this situation in my project and solving class definition related errors crossing over several header files has become quite a headache.


Prove that if $f(x) = \frac{\sqrt{x} - \sqrt{a}}{x-a}$, then $f$ has a limit at a.  I have written a very basic level proof here:  Given $\epsilon > 0$, we want $\delta > 0$ such that $|(\frac{1}{\sqrt{x} + \sqrt{a}}) - (\frac{1}{2\sqrt{a}})| < \epsilon$ whenever $0<|x - a|<\delta$. So for $\delta = g(\epsilon)$, $0<|x - a|<\delta \implies |(\frac{1}{\sqrt{x} + \sqrt{a}}) - (\frac{1}{2\sqrt{a}})| < \epsilon$.  I tried and failed to find a way to represent delta in terms of epsilon. Saying, $\delta = g(\epsilon)$, is wrong. I saw some examples where they set $\delta=1$ and the used the $min$ function. I tried this but was not successful.  Edit: I need to find an answer using the epsilon-delta form. just solving for the limit is not sufficient.  Anyone have any tips?

For the function $f(x) = \sqrt{x}, \hspace{2 mm} f: [0, \infty) \rightarrow \mathbb{R}$, I wish to find all points $a$ at which $f(x)$ is differentiable, from the definition $$ f'(x) = \lim_{x \rightarrow a}\frac{f(x)-f(a)}{x-a} $$  Clearly, for our function $f(x) = \sqrt{x}$, this gives us $$ f'(x) = \lim_{x\to a}\frac{\sqrt{x} - \sqrt{a}}{x-a} $$  So the question boils down to showing for what values of $a$ this limit exists. How would this be done? Intuitively, I know that the answer is that the limit exists for all $a \in [0, \infty)$ and is given by $\frac{1}{2 \sqrt{a}}$, but I'm unsure of how to prove this from the limit definition of differentiability.


I have used blender for a while now and it worked perfectly, but when I opened it up today it's being very slow/laggy. When I look around in 3d view it takes forever to respond, and everything is either delayed or slow.

Update  This has been confirmed resolved in a later version 376.33 and possibly the update prior.     Okay, I recently did a computer update. I used to run Blender 2.77 on a Dell desktop (5 GB RAM, 2.7 GHZ, Windows 8, build in graphics card). Since that computer wasn't fast enough for my preference, I saved up and got a new gaming laptop - the Asus ROG GL552 (Windows 10, 16 GB DDR4 RAM, Nvidia GeForce GTX 960M with 4 GB DDR5 RAM, 2.6-3.5 Ghz, and quad-core intel processor). That laptop has been known to have outdated drivers, so when I got it, I updated it to up to date Windows 10 drivers.  As soon as I started Blender, I immediately noticed its speed. Even doing simple things, like clicking buttons, or rotating the view with the middle mouse button, took too long to register in the program. I tried changing some User Preference System settings, but that didn't really help much. And the hardware seems to be fine - the render is lightning fast (renders the startup scene in under .1 second; it's just laggy when loading the uv screen), so I don't know why it's like this, or what to do. Also, I ran Blender 2.77 on this computer, and it was also slow (although it was fine on my previous computer).  It could be an issue with drivers perhaps (or maybe OpenGL?), but I ran Unreal Engine 4, and had none of the same issues - the speed was pretty decent on that; so I'm not sure why Blender would be so slow. Any help is appreciated - thanks guys!


I have a long draft I am working on. In the draft, there are comments which are not meant to be public, but that I add in order to guide my work. Sometimes, I need to share my draft (e.g. with my advisor, send it to conferences, etc.) and I have to manually comment out the comment blocks in the draft.  I wonder if there is a way to create some "comment environment" that I can decide to compile or not with one line at the beginning of the document.

Problem  I am now preparing exercises for the course I am going to teach next quarter. I have two concerns   Writing problem descriptions and corresponding solutions in two separated files are pretty annoying since it may require lots of copy and paste in later days. Using hyperlinks to jump between problem description and solution is also annoying since some problem descriptions are rather long and involving a lot of fine details, which would make both my life and students' life harder.   I am wondering if there is a mechanism that could hide selected part of the text from global setting. I know I could use comment but    It seems that I need to comment all individual spots. I do not know how to comment all the parts I need to comment (there are more than 200 exercises I am planning to write).


I have a computer with the main C: drive getting full. I want to figure out what's on it and where. Searching for large files doesn't do me any good though.  Issues:     There are multiple user accounts. I need to search inside these user folders. I want to know about swap files, paging files, hibernation files, etc. I want to know about large sub directories in the Windows folder. Not all are instantly accessible and I don't know what ones a standard search is excluding. I don't have a good way of knowing how large the system recovery section is.   As it stands now I can highlight the folders on my C: and hit "Properties" and see that they contain 63GB of files. I'm missing another 120GB though! I want to know what it is and where it is. I am an Administrator.

How can I visualize which folders and files are taking up all of the space on my hard drive?  I'm getting some conflicting reports on the size of hard drive contents. Namely what is and isn't there and what folders are actually using the space.   I need to know which of the files or folders the culprits behind all this hidden bloat. Also there should be a print option to get it on paper.


How did Lupin have a house and money to live? What did he work in before Hogwarts? What job would accept him?

Professor Lupin's character always seemed to be poor- a werewolf, no job, shabby robes. Yet when he was teaching Harry to produce a patronus, he gave him chocolate frogs, butterbeer and the best bar of Honeydukes chocolate. Couldn't he afford a new set of robes, considering he had been able to afford all that. And being a teacher at the best wizarding school, I expect he would have been paid a handsome salary? If Dumbledore could offer ten galleons to a house elf, even Remus Lupin would have gotten a handsome salary? I am sincerely confused and would appreciate it if someone could provide a satisfactory answer.    From one of the comments, I noted the fact that Lupin already had some chocolate when he was on the train as he was asleep when the trolley witch passed. Was he carrying it in case an incident like Harry's occurred or was it actually just a way to introduce that particular scene?


all I'm developing app and it contains function which gets phone number and email from device. I've looked at some samples on internet but all of them are about unique id. How can i get phone number and email from device? Is there anybody who has experience in this area?

Is there any way to get own phone number by standard APIs from iPhone SDK?


I am trying to make a python script that will see if there is code in a string or not. this can not only be python code it can also be other code as seen in the picture below  Here is an example of what I need to process.    I know you could just just do a whole bunch of if 'var =' in code but this can also be false triggered.  Is there a better way to detect stuff like this?  thanks, ira.

Writing a python script and it needs to find out what language a block of code is written in. I could easily write this myself, but I'd like to know if a solution already exists.  Pygments is insufficient and unreliable.


I'm working with the blender-version v2.77 and I'm making one of my first trees with the sapling tree add on. Does anyone of you know if you still can edit the trees after doing something else? So for example you made the tree, and than modeled something else. Can you still edit the tree than (for me the leafs)?

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


For which natural numbers n, is  √ n   irrational? Prove your answer.

It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well.  On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$.  It seems that any positive integer has a square root that is either an integer or irrational number.        How do we prove that if $a \in  \mathbb N$, then $\sqrt a$ is an integer or an irrational number?      I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational.  This suggests we can extend the previous result to other radicals.        Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational?


I tried to plug my GameCube into my HDTV, but it displays in black and white. I could still play and hear everything. I have all the original cables for my GameCube, and it only does it with the Vizio TV I have. How do I fix this?

I connected my Gamecube to my HDTV using a PS3 composite cable (shown below). However, the image displayed is blurry, in black and white, and without sound. The cable fits perfectly on the analog AV out port, so I'm not sure whether this is a problem of incompatibility. Before buying a new cable I was wondering: are there any known issues when connecting Gamecubes to newer TVs? Does the Gamecube composite output have some proprietary hardware that will only allow Nintendo AV cables to work with the console?


I'm doing some testing of time domain convolution vs frequency domain multiplication, in particular that you can achieve the same result as multiplying two base 10 numbers by treating them as vectors, doing a DFT, multiplying, then recombining them as follows:  format long multiply = 527283*426715 a = [5 2 7 2 8 3]; b = [4 2 6 7 1 5]; len = length(a)+length(b) - 1; % the length of the convolution result temp = ifft(fft(a,len).*fft(b,len)); % add the numbers for each index up result = 0; for i = 1:length(temp)     result = result + temp(i)*10^(length(temp)-i); end result result == multiply   When I run that code, I get 0 at the end, implying that the two numbers aren't equal. If I reduce the order of magnitude of the input by two then it returns 1 like it should. Where does this numerical error come from/can it be avoided?

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 question about odds ratios vs. probabilities in terms of a contingency table (studying an exposure/disease). I know that once I have found an odds ratio, I can also find the probability by taking the odds ratio and dividing it by one plus the odds ratio.   However, I want to understand what exactly that probability represents ... is it a conditional probability? The probability of an individual having the disease given exposure?

I'm somewhat new to using logistic regression, and a bit confused by a discrepancy between  my interpretations of the following values which I thought would be the same:    exponentiated beta values  predicted probability of the outcome using beta values.    Here is a simplified version of the model I am using, where undernutrition and insurance are both binary, and wealth is continuous:  Under.Nutrition ~ insurance + wealth   My (actual) model returns an exponentiated beta value of .8 for insurance, which I would interpret as:     "The probability of being undernourished for an insured individual is .8 times the probability of being undernourished for an uninsured individual."   However, when I calculate the difference in probabilities for individuals by putting in values of 0 and 1 into the insurance variable and the mean value for wealth, the difference in undernutrition is only .04. That is calculated as follows:   Probability Undernourished = exp(β0 + β1*Insurance + β2*Wealth) /                              (1+exp(β0 + β1*Insurance + β2*wealth))   I would really appreciate it if someone could explain why these values are different, and what a better interpretation (particularly for the second value) might be.     Further Clarification Edits As I understand it, the probability of being under-nourished for an uninsured person (where B1 corresponds to insurance) is:  Prob(Unins) = exp(β0 + β1*0 + β2*Wealth) /               (1+exp(β0 + β1*0+ β2*wealth))   While the Probability of being under-nourished for an insured person is:  Prob(Ins)= exp(β0 + β1*1 + β2*Wealth) /            (1+exp(β0 + β1*1+ β2*wealth))   The odds of being undernourished for an uninsured person compared to an insured person is:  exp(B1)   Is there a way to translate between these values (mathematically)? I'm still a bit confused by this equation (where I should probably be a different value on the RHS):  Prob(Ins) - Prob(Unins) != exp(B)   In layman's terms, the question is why doesn't insuring an individual change their probability of being under-nourished as much as the odds ratio indicates it does?  In my data, Prob(Ins) - Prob(Unins) = .04, where the exponentiated beta value is .8 (so why is the difference not .2?)


I am creating a task scheduler from c# code using         Microsoft.Win32.TaskScheduler library.  Following is my code:  TaskDefinition taskDefinition = taskService.NewTask();  Principal.UserId = "NT AUTHORITY\\SYSTEM"; Principal.LogonType = TaskLogonType.ServiceAccount;  RegistrationInfo.Description = erpTaskSchedulerModel.SchedulerName;  taskDefinition.Triggers.Add(SetTrigger(erpTaskSchedulerModel));  taskDefinition.Settings.DeleteExpiredTaskAfter = new TimeSpan(0, 1, 0);  taskDefinition.Actions.Add(new ExecAction(erpTaskSchedulerModel.ExePath, erpTaskSchedulerModel.ExeParameters, null));  taskService.RootFolder.RegisterTaskDefinition(erpTaskSchedulerModel.SchedulerName, taskDefinition);   I am getting following error from the last line of code.:  Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))  Because of this my task is not getting scheduled.  This issue occurs in IIS hosted site.  How can I remove this issue?  Let me know if more details are required.

I have an ASP.NET website (in C#) that takes in user data and then attempts to create a windows scheduled task.  Of course, this works great on the DEV machine, but fails to run on the server.  I'm trying to figure out what permission(s) are required on the ASPNET user (or anonymous web user) to create tasks.  The error is:  Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))  Stacktrace:      at MyScheduler.NewWorkItem(String TaskName, Guid& rclsid, Guid& riid, Object& obj)      at MyScheduler.CreateTask(String name)   I've done some searching, and the suggested resolution is to use the web.config 'impersonate' flag to force the application to run as a user with sufficient permissions, as opposed to the ASPNET account which may not have those permissions.  Example:  <system.web>     <identity impersonate="true" /> </system.web>    Unfortunately, this does not seem to resolve the issue.  From the documentation I read, this should run as the anonymous web user, but it seems that user does not have enough permissions.  I altered the setting to specify a specific domain user that happens to be an administrator on the machine.  Example:  <system.web>     <identity impersonate="true" userName="WindowsDomain\YourUserName" password="YourPassword" /> </system.web>    Doing this allowed the application to successfully create the Windows Scheduled Task.  So, obviously, with the correct set of Windows 2003 permissions I can get the app to perform as it does in the development environment.  However, I'm not about to place the network or machine administrator account's user credentials in plain text on a Web.config file.  Does anybody happen to know what permissions exactly need to be set in order to get the ASPNET account to behave as desired?  EDIT:  The Win32 API is being used to create scheduled tasks.


I want a word that contains every vowel aeiou in a CONTIGUOUS fashion.   Bonus points if it ends with y. ;)

"Jealousy" contains most of the vowels but lacks 'i'. Is there a word in the English language that contains every vowel (and preferably 'y')?


The badge notification is because it wants me to upgrade to Catalina. I never want to upgrade to Catalina because my hardware is too old to be run under any newer version of MacOS than I already have.  How can I dismiss this particular notification or otherwise make the notification badge go away?  I tried System Preferences --> Notifications, to see if I could disable all badge notifications from the System Preferences app, but that doesn't appear to be an option. And really, I don't want to disable all notifications from System Preferences, I just want to tell it to to stop nagging me about the Catalina upgrade.

I keep the "System Preferences" app icon in my dock in Mojave. I recently checked for updates, and found one, but I'm not ready to install it just yet and the red notification dot over the settings app is really bothering my obsessive-compulsive self.  To make things worse, there's no way to disable the notification for the settings app, from the settings app.  How can I banish the notification icon until I'm ready to deal with doing updates?  (Note: this a the red notification badge/dot over the System Preferences app, not the App Store one. It is also not the big textual one that will appear in the upper right corner of the screen. And, unlike all the other questions I found while searching for this, I am in Mac OS rather than iOS.)  The closest thing I found was , which was about iCloud security problems rather than software updates. My question isn't why, but how to ignore a software update for a while.


I was wondering if there is a site or something where I can find announcements for all (most of) the special issues of journals (upcoming and past) . For example of Springer, IEEE, Elsevier, ...   If I search for this now, I find scattered call for papers. Also, I can't seem to find this on wikicfp.

How can I find information about upcoming special issues related to a special field of study? There are good websites for upcoming conferences but I could not find any place to search for special issues.


How can one prove that $e^\pi>\pi^e$ ? Should I use logarithms or something like that? Or is there a gentle smart way of proving so?

How can I  compare (without calculator or similar device) the values of $\pi^e$ and $e^\pi$ ?


Can anyone please highlight the process behind the formation of words ending in -cial/-tial? For instance,  finance is the root for financial  but,  different is the root for differential substance is the root for substantial  Is there some general rule to apply?

I'm doing some verb to derived word conversions and I'm struggling with keeping the T or converting it to a C in some verbs ended with T:  Exhibit -> Exhibition Perfect -> Perfection Benefit -> Beneficial  I have done a bit of research on beneficial and , no common patterns at all. Is there any rule to make this conversion?


I assume it will be harmful to the baby if a woman smokes while pregnant. How about the situation where the woman smokes, gets pregnant and then stops? Does the smoking in the period until the pregnancy affect the baby? How long before a pregnancy does a woman need to quit smoking in order to insulate the baby from the negative effects of smoking?

In what way does smoking cigarettes by the mother affect the child and the mother during the pregnancy? What are further consequences it might have during the pregnancy and delivery of the baby?


If A is a given matrix n order matrix and $u_0 \in \mathbb{R}^n$ . Then $u(t) = e^{tA}u_0$ solves the initial value system of ODE $u'(t) = Au(t)$ with $u(0) = u_0$ in $(0,\infty)$. Prove the converse as well. To show $u(t) = e^{tA}u_0$ is solution of given system is not difficult. But for converse part I am not sure what to do. Either to show this has unique solution in $(0, \infty)$ then it follows that any solution coincides with $u(t) = e^{tA}u_0$ by uniqueness and we are done. Is my reasoning correct ? Is there any other way ?

Just had a quick question regarding the uniqueness of the general solution of first-order differential equations:  For $x'(t)=Ax(t)$ where $A$ is an $n\times n$ matrix. and initial condition $x(0)=x_0$, the unique solution is $x(t)=e^{tA}x_0$.  The proof for showing that the solution is unique involves differentiating the matrix product $e^{-tA}x(t)$.  Could someone please explain why we always multiply by $e^{-tA}$.   Many thanks, Best.


I am having hard time figuring out how the CX (controlled-NOT) gate is represented in the matrix representation.  I understood that tensor product and the identity matrix are the keys, and I understood how the matrix representation works for single-qubit matrices. For example, if we have a circuit with a quantum register q composed of 3 qubits, the operation X q[1] has the matrix representation 1 $$I_2 \otimes X \otimes I_2 = \begin{pmatrix}  0&0&1&0&0&0&0&0 \\ 0&0&0&1&0&0&0&0 \\ 1&0&0&0&0&0&0&0 \\ 0&1&0&0&0&0&0&0 \\ 0&0&0&0&0&0&1&0 \\ 0&0&0&0&0&0&0&1 \\ 0&0&0&0&1&0&0&0 \\ 0&0&0&0&0&1&0&0 \\ \end{pmatrix}.$$  Obviously, I am aware of the matrix representation of the CX gate: $$\begin{pmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&0&1\\ 0&0&1&0\\ \end{pmatrix}$$  Taking back our quantum register q, applying CX to the second (control) and third register (target) (CX q[1], q[2]) gives us the matrix representation 2 $$I_2 \otimes CX = \begin{pmatrix} 1&0&0&0&0&0&0&0\\ 0&1&0&0&0&0&0&0\\ 0&0&0&1&0&0&0&0\\ 0&0&1&0&0&0&0&0\\ 0&0&0&0&1&0&0&0\\ 0&0&0&0&0&1&0&0\\ 0&0&0&0&0&0&0&1\\ 0&0&0&0&0&0&1&0\\ \end{pmatrix}$$  The problem comes when we try to apply the CX gate to other pairs of qubits:   I suspect the matrix representation of CX q[2], q[1] (applying a CX gate with the third qubit of the system as control and the second qubit of the system as target) to be $I_2 \otimes CX^r$ where $$CX^r = \begin{pmatrix} 0&1&0&0\\ 1&0&0&0\\ 0&0&1&0\\ 0&0&0&1\\ \end{pmatrix}$$ but I am not sure. I really don't know how CX q[0], q[2] (applying a CX gate with the first qubit of the system as control and the third qubit of the system as target) would be represented.    To summarise, my question is "how does the CX (or more generally multi-qubit gates) is represented as a matrix when there are more than 2 qubits in the system?".  1 Computed with Python and numpy:  import numpy as np X = np.array([[0, 1], [1, 0]]) ID2 = np.identity(2) print(np.kron(np.kron(ID2, X), X))   2 Computed with Python and numpy:  import numpy as np CX = np.array([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]]) ID2 = np.identity(2) print(np.kron(ID2, CX))

In a three-qubit system, it's easy to derive the CNOT operator when the control & target qubits are adjacent in significance - you just tensor the 2-bit CNOT operator with the identity matrix in the untouched qubit's position of significance: $$C_{10}|\phi_2\phi_1\phi_0\rangle = (\mathbb{I}_2 \otimes C_{10})|\phi_2\phi_1\phi_0\rangle.$$ However, it isn't obvious how to derive the CNOT operator when the control & target qubits are not adjacent in significance: $C_{20}|\phi_2\phi_1\phi_0\rangle.$ How is this done?


The binomial distribution can be interpreted as $n$ independent and identically Bernoulli "trials". If $X_1, X_2, \dots, X_n$ is a sample from a Bernoulli distribution, how is that different from a binomial distribution?

How should I understand the difference or relationship between binomial and Bernoulli distribution?


I want to show that the gcd of $( 8n+19 , 3n+7 ) =1$  $\forall n \in \mathbb{Z}$. I would like to prove this through mathematical induction and generalize it for the set of all integers. Base Case: $n=1$ $$gcd(8+19,3+7) = gcd(27,10) = 1 $$ Assume $n = k$ holds. WTS it is also true for $n=k+1$. $$gcd(8k+27,3k+10)=1$$ I am stuck here, please let advise me on how to continue from here. Also I am not sure if mathematical induction is the right approach. If a more elegant approach exists, please let me know.

I'm having problems with an exercise from Apostol's Introduction to Analytic Number Theory.     Given $x$ and $y$, let $m=ax+by$, $n=cx+dy$, where $ad-bc= \pm 1$. Prove that $(m,n)=(x,y)$.   I've tried to give a proof, but I suspect it's wrong (or at least not very good). I would be very thankful for any hints/help/advice!  My proof:     We observe that since $ad-bc= \pm 1$, $ad=bc \pm 1$, and $(ad,bc)=1$.   Now, $(a,b) \mid m$ and $(c,d) \mid n$ but      $$(a,b) = ((d,1)a,(c,1)b)=(ad,a,bc,b)=(ad,bc,a,b)=((ad,bc),a,b)=(1,a,b)=1.$$      Similarly, we determine $(c,d)=1$. So, $1=(a,b) \mid m$ and $1=(c,d) > \mid n$. But $(x,y)$ also divide $m$ and $n$. Since $(x,y) \geq (a,b)=(c,d)=1$, this implies that $(x,y)=m,n$. Hence   $(m,n)=((x,y),(x,y))=(x,y)$.


Sorry guys i went wrong in my previous question , actually my question is what is the minimum possible absolute temperature in the universe of what ever substance...?

The third law of thermodynamics states that nothing can reach to absolute zero temperature. What is the lowest possible temperature that can be in the universe? Has any experiment reached to a billionth of a Kelvin? Is there any restriction on how low it can be? Is $10^{-1000}\;\rm K$ possible? Or is there a lowest quantum of temperature?


Which program can I use to take a screen cap or take video of my screen? Maybe it's a simple (silly) question, but I can't find a good solution.

How can I take a screenshot in X.org?  I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it.


Let $R$ be a unitary ring and let $a,b \in R$ such that $ab=1$.  Does it imply that $a$ is invertible?  The definition of invertible element requires that $ab = ba = 1$, so I guess it doesn't imply that a is invertible, but I didn't manage to find a unitary ring in which this happens.

Can I have a hint on how to construct a ring $A$ such that there are $a, b \in A$ for which $ab = 1$ but $ba \neq 1$, please? It seems that square matrices over a field are out of question because of the determinants, and that implies that no faithful finite-dimensional representation must exist, and my imagination seems to have given up on me :)


I've got an expression like this:  /* pierwszy */  using System;/* drugi */   and I want to match all comments in this line.  But this regex:  \/\*(.*)\*\/   is unfortunately not working, because it matches that:  pierwszy */  using System;/* drugi   So, as you can see, it matches the whole expression. Anybody knows how to write a regex to match subgroups, not the whole expression?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I want to force people to pass a certain string after getting prompted: while [[ ! ${task} =~ "up|down" ]]; do     echo $task     read -p "Task to conduct? [up|down] " input     task=$input done  Although passing the correct string I am still getting the prompt: Task to conduct? [up|down] down down Task to conduct? [up|down] up up Task to conduct? [up|down]   What do I miss?

The following code  number=1 if [[ $number =~ [0-9] ]] then   echo matched fi   works. If I try to use quotes in the regex, however, it stops:  number=1 if [[ $number =~ "[0-9]" ]] then   echo matched fi   I tried "\[0-9\]", too. What am I missing?  Funnily enough,  suggests this should work.  Bash version 3.2.39.


I have the following problem that I can't solve:  I have this form into an HTML table:  <th width = "8.33%">     <form id="actionButton" action="salwf.do?serv=1" method="post">         <button name="accept" value="Accept" type="submit" class="acceptButton">ACCEPT ICON BUTTON</button>         <button name="cancel" value="Cancel" type="submit" class="cancelButton">CANCEL ICON BUTTON</button>         <button name="sap" value="SAP" type="submit" class="sapButton">SAP ICON BUTTON</button>         <input id="testId" name="test" type="hidden">     </form> </th>   As you can see this form contain 3 JQuery button element and an hidden input tag.  I need to create a Javascript that do the following operations: when the user click on one of the previous 3 buttons it take the value of the clicked button (Accept or Cancel or SAP) and submit it (in a POST request).   Can I do something like this using JavaScript? How can I implement it?

I have two submit buttons in a form. How do I determine which one was hit serverside?


I assign new id to a button. this is my code  $("#update").click(function(){     $("#update").attr('id', 'cancel'); });   and i after changing the id. i want to use it to be functional again in jquery to revert it back to update. having this code.  $("#cancel").click(function(){     $("#cancel").attr('id', 'update'); });   my problem is, after it changed the id attribute when i click the cancel nothing happens. what is the problem of my code.? thank you in advance.

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


I showed that if $(x)$ is  prime in $\mathbb{Z}[x]$, then since  $\mathbb{Z}[x] /(x)$ is isomorphic with $\mathbb{Z}$ and $\mathbb{Z}$ is not a field, so $(x)$ is not maximal. But when I want to show that $(x)$ is prime in $\mathbb{Z}[x]$ I've got stuck... How could I show? The old proofs doesn't give any isomorphic function! my question is a particular case, not a theorem (just for more info)

In a set of old lecture notes, I came across this corollary:  Corollary: Any maximal ideal is a prime ideal.  While I do not have the proof for this, what immediately comes to mind is whether this corollary is predicated on the fact that...  Theorem: For any commutative ring $R$ and ideal $A$, $R/A$ is an integral domain iff $A$ is a prime ideal Theorem: For any commutative ring $R$ and ideal $A$, $R/A$ is an field iff $A$ is a maximal ideal  Recall: Any finite integral domain is a field. So, from the two theorem above, we can reconcile the fact that a maximal ideal is a prime ideal (and vice versa) on the supposition that the integral domain in question is finite. Or is there another proof for the claims in my notes?


In the derivation for ρgh we consider the weight above a given area to give pressure but because of it pressure should only be in vertical direction why is it found in every direction possible and in every direction it is equal to ρgh, for two opposite nonvertical directions it could have taken any value since at the end Net force is zero in any direction.

I have a final exam tomorrow for fluid mechanics and I was just looking over the practice exam questions. They do not provide solutions. But pretty much I have to define pressure at a point and also say why pressure is scalar instead of a vector.  I am thinking pressure at a point is $P=\lim_{\delta A \to 0} \frac{\delta F}{\delta A}$. Please let me know if I am wrong.   But I do not know at all why pressure is a scalar instead of a vector. I know it has something to do with $d \mathbf{F}=-Pd \mathbf{A}$


I have created a view, with few exposed filter in it. It is working fine, but I when I filter view using some exposed filter, it appends query string to URL ie  mysite.com/search?field1=value_1&field_2=value2   Instead I wanted to make it SEO friendly like,  mysite.com/search/value_1/value2   Please guide how should I proceed. I have searched for it, but didn't get any solution or I have missed something.  Thanks for your time.

When I used an exposed filter the filter selection is passed as name/value pair in the url, for example:  members?field_a=valuea&field_b=valueb   How can I set it up to use more of a "pathauto" style url:  members/valuea/valueb


I'm using TexWorks to write a document, but everytime I open my document some characters aren't read, and the result is this:    How can I solve this problem?   Ps: The language I'm using is portuguese.

How do I enter Unicode characters in LaTeX?  What packages do I need to install and what escape sequence do I type to specify Unicode characters in an ASCII source file?


I have a C# application which calls a exe file. Below the code I used for calling the process:  System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false; proc.StartInfo.FileName = "ContasillabeGame"; proc.StartInfo.Arguments = numeroSillabe + " " + numeroToken; proc.OutputDataReceived += new DataReceivedEventHandler(OutputToTextArea); proc.Start(); // Start the asynchronous read of the sort output stream. proc.WaitForExit();   And here the method used for getting data retrieved from the process.  private void OutputToTextArea(object sendingProcess, DataReceivedEventArgs outLine) {     // Collect the sort command output.      if (!String.IsNullOrEmpty(outLine.Data))     {         System.Console.WriteLine(outLine.Data);     } }   With this code i launch app ContasillabeGame but i don't have any result from that app. Why? For send message from ContasillabeGame i use this code  Sample code for send message:  System.Console.WriteLine("pippo");

I'm developing an Windows Forms application that requires me to call a separate program to perform a task.  The program is a console application and I need to redirect standard output from the console to a TextBox in my program.    I have no problem executing the program from my application, but I don't know how to redirect the output to my application.  I need to capture output while the program is running using events.    The console program isn't meant to stop running until my application stops and the text changes constantly at random intervals.  What I'm attempting to do is simply hook output from the console to trigger an event handler which can then be used to update the TextBox.  I am using C# to code the program and using the .NET framework for development.  The original application is not a .NET program.  EDIT: Here's example code of what I'm trying to do.  In my final app, I'll replace Console.WriteLine with code to update the TextBox.  I tried to set a breakpoint in my event handler, and it isn't even reached.      void Method()     {         var p = new Process();         var path = @"C:\ConsoleApp.exe";          p.StartInfo.FileName = path;         p.StartInfo.UseShellExecute = false;         p.OutputDataReceived += p_OutputDataReceived;          p.Start();     }      static void p_OutputDataReceived(object sender, DataReceivedEventArgs e)     {         Console.WriteLine(">>> {0}", e.Data);     }


Does there exist a secure file exchange tool for Windows and Mac? It would be nice if it could communicate via local network (e.g. WiFi), but with one important caveat: we have two routers connected via LAN cable, one of these has OpenVPN running.  So Windows and Mac machines can be connected to different routers, and therefore reside in different logical networks (as one will be in a VPN)  There are cloud-based file exchange services, but for my purposes these are both unsecure and potentially slow (some of the files to be exchanged can be quite heavy).  Thanks!

Is there anyway we can read the files in a Mac laptop using a Windows laptop?  Like I have a movies folder in Mac and I want to view those movies in my Windows laptop (without having to transfer those files through my USB thumb drive of course)


I defined my recycler view and I'm still getting a null pointer exception when I try invoking methods on it, but it was working before  My layout is activity_main.xml      <android.support.v7.widget.RecyclerView         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:id="@+id/recyclerView"         android:layout_marginTop="8dp"         android:visibility="gone"/>   My java MainActivity.java(on create)   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     recyclerView = findViewById(R.id.recyclerView);      LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);     recyclerView.setLayoutManager(linearLayoutManager);     recyclerView.setHasFixedSize(true);  }   FULL LOGCAT: FATAL EXCEPTION: main     Process: com.example.atry, PID: 31310     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.atry/com.example.atry.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3115)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3258)         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)         at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)         at android.os.Handler.dispatchMessage(Handler.java:106)         at android.os.Looper.loop(Looper.java:214)         at android.app.ActivityThread.main(ActivityThread.java:7058)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference         at com.example.atry.MainActivity.onCreate(MainActivity.java:84)         at android.app.Activity.performCreate(Activity.java:7327)         at android.app.Activity.performCreate(Activity.java:7318)         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3095)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3258)          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)          at android.os.Handler.dispatchMessage(Handler.java:106)          at android.os.Looper.loop(Looper.java:214)          at android.app.ActivityThread.main(ActivityThread.java:7058)          at java.lang.reflect.Method.invoke(Native Method)          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

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?


A previous question "" suggests that a Druid could use a summoned animal as a mount.  However, how might this work in combat?  Would the conjured animal act and be controlled like any other mount?    Furthermore, could a conjured animal act as a mount for another party member?  Per the spell (emphasis mine):     The summoned creatures are friendly to you and your companions. Roll   initiative for the summoned creatures as a group, which has its own   turns. They obey any verbal commands that you issue to them (no action   required by you). If you don't issue any commands to them, they defend   themselves from hostile creatures, but otherwise take no actions.   Could the summoned animal be controlled as a mount by the other party member?  What if the druid commanded the conjured animal to obey the commands of the other party member, or ask as a mount?  Do summoned fey spirits act like the animals form they take?

Is it possible to use the animals that are summoned using Conjure Animals as mounts?  As an example: Summoning Giant Eagles to carry a group up the mountain or over a wall.


Years ago I knew the distinction between "this book is different from that one" and "this book is longer than that one."  How do you choose?

As someone who learned English later on in life, I was taught that different from is the correct grammar to use: this is different from that. However, it seems these days everyone uses different than instead. I know it's incorrect usage, but does the language evolve if the majority wins?  Edit: Some commented different than is American English and different from is British English, both are OK. IMO, this isn't like color versus colour, though.   Than is used after a comparative adjective, e.g. taller than, whiter than. The word different isn't a comparative adjective, unless used in more different than. Logically, it makes no sense to say different than.


I want Ubuntu to always use Unity2D by default. I am using the latest version (12.04 LTS).

When autologon is active, lightdm will start the Unity 3D session, not the 2D (or any other shell that I want to auto-login to).  Is there a way to start the shell I want automatically (autologon)?  Anyway, if autologon is disabled, the last used session is launched, and that's fine. I just want to choose which is default with autologon.


The lambda function is:  lambda x: x.split('=')   the partial function would look something like:  str.split('=')

How can I bind arguments to a Python method to store a nullary functor for later invocation?  Similar to C++'s boost::bind.  For example:  def add(x, y):     return x + y  add_5 = magic_function(add, 5) assert add_5(3) == 8


My 2017 13inch MacBook pro is randomly shutting down.  The battery is 82% or higher.  when I try to turn it back on I get a screen with a battery that looks like it needs charging.  I have to connect to power to turn it back on.  when I do this the battery has the same charge of 82%. Is my computer dying after only 3 years?

I have a MacBook Air, 2009, with a recently replaced Apple battery in December 2012. Recently, when power cord comes off, the computer shuts down. Also, it usually will not restart unless power cord is attached.


In the past, many names, objects and ideas in the Star Wars universe were canon merely because Lucas said so, particularly somewhere in an interview (i.e., never appeared in the films, scripts, production notes or even novels).  As  states, Lucas was "word of God" but now Disney owns the franchise and dictates canon.  The idea I'm particularly curious about is the meaning "bring[ing] balance to the Force."  (the natural state of the Force is the Light Side and the Sith are destroyed) while the , being completely ambiguous. Are we to take Wookieepedia at face value, or has anyone at Disney or the LSG chimed in?

For all types of derivative works, namely:   Movies Novels Comic books Other written works (including RPG materials) Cartoons Video games Derivative movies (such as the infamous Ewok movies and even more infamous )   According to what rules does something become "canon" and who is responsible for the evaluation of a published work?


I would like to watch a process on my system, to see what files it writes to. Is there a way of doing that?  I am on a Windows 7 machine.

Is there a utility for Windows that operates similarly to iotop for Linux?  I'm looking for simple tool that can tell me what applications are writing to disk and how much they're actually writing.


If $(x_1,\cdots,x_n)$ is a sample from a $\mathcal{U}(\theta_1,\theta_2)$ (uniform) distribution with $$\Omega=\{(\theta_1,\theta_2)\in\mathbb{R}^2:\theta_1<\theta_2\}$$ determine the MLE of $(\theta_1,\theta_2)$ without using calculus. OK, I know that, $$f(x|(\theta_1,\theta_2))=\frac{1}{(\theta_2-\theta_1)}$$ and $$L(\theta_1,\theta_2)=\prod_{i=1}^n\frac{1}{(\theta_2-\theta_1)}=\frac{1}{(\theta_2-\theta_1)^n}$$ Now I need to maximize the $\theta_2$ and minimize the $\theta_1$ values in order to miximize the likelihood. I know how to find those value using LL (Log likelihood function) and partial derivatives. But how to find them without calculus? I have no idea where to start.

Let $X_1, X_2, \ldots , X_n$ be a random sample from a distribution with the following pdf  $$f(x|\theta) =  \begin{cases} 1/(\theta_2−\theta_1), &\quad\text {for}\quad \theta_1 \leq x\leq \theta_2\\ 0 &\quad\text { otherwise}\quad \end{cases}$$ Suppose that $\theta_1$ and $\theta_2$ are unknown.  How would I go about writing the likelihood function for this distribution on $\theta_1$ and $\theta_2$.


For ECB, CBC, and CFB, padding is required when the plaintext does not fill out a complete multiple of the block size. However, I have heard that is good practice to pad all messages, even if the plaintext does fill out a complete multiple of the block size. What benefit does doing such a thing have? Does it increase security in any way?

I'm trying to understand the SSL Poodle Attack and I'm wondering why the last block of a CBC Record can be full of padding? Wouldn't that mean that the useful data was already a multiple of the key size?  Maybe I'm misunderstanding something else here, as it would seem like you can pad by any number of full blocks of padding. Just don't see why an SSL Library would do that.  Thanks!


This may be silly question, but why does a helium ballon rise? I know it rises because helium is less dense than air. But what about the material of the ballon. It is made up of rubber/latex which is quite denser than air. An empty ballon with no air in it falls, so why does a helium filled balloon rise?

Hydrogen is the lightest element, so it's cable of lifting the most weight in out atmosphere (probably not the best terminology there, but you get the picture)  Would hot hydrogen (in the same sense as hot air) be able to lift even more mass? Would a higher or lower density of hydrogen in a ballon lift more? If you could have a balloon which had nothing in it (it was a vacuum inside) would that lift more than a hydrogen balloon?  Basically what are the physics to balloons and lifting?  (really not sure what to tag this, so if someone else could that'd be great)


I have a text box on my website. When you click on the text in this text box, I want it to copy the value in the text box.  <input id="link" type="text" value="<?php echo $link ?>" disabled>

What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData("Text", text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");         const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using :


It's been a while in Stack Overflow, and I have seen so many times that an actual answer was provided as a comment to the question. Later, I see a list of answers repeating the same thing.  Yes, I know, usually the comment is voted up, however, the poster who actually commented with the perfect answer, ethically waits for OP's reply. And then, what we see is a series of answers on the basis of the previous comments.  The poster providing the correct answer through comment, should be encouraged to post it as an answer when majority of us think so.

I'm trying to go through and provide answers to every unanswered question (search "closed:0 answers:0"), somewhat following the spirit that was blogged about at  .  However, I'm finding this much more difficult than it needs to be, as many of the questions have already been answered without the use of an "answer" - but instead, in the form of a comment by either the OP or another poster. I wouldn't mind reading through and skipping these, as long as there was some appropriate action I could take to at least assist with preventing these questions from being seen again from the same query - either by myself or another SO member.  Is there such an appropriate action?  Should we vote to close?  If so, using what reason? Even if I vote to close, what are the chances that 4 other users will also view the question and also vote to close?  (i.e., will my individual vote even do any good?  Is there any report to show recent close votes, so that others may also review and contribute supporting close votes?) Should we post some sort of an answer - even just something to the effect of "this was already answered by the OP's own comment to his answer (above)"? Would something like this be appropriate to flag for moderator attention, and let the moderators deal with it?  (Or would this be considered too trivial?) Should we rename the question title to something standard that can be used in a search exclusion?  (Maybe "SOLVED:"?)  Basically, how can I help to denote questions as "This question is no longer in active search of an answer - though better answers may still be appreciated."? I've already reviewed , which was closed as a duplicate of  - but this requires effort on part of a user who may very likely no longer be active. Otherwise, is there something I should be doing to improve my search to filter out these types of questions? I've run across this many times, so I don't consider it to be a rare issue.  However, the last question like this I just ran across, prompting this question, was .  In this case, the question was self-answered by the OP in the form of a comment, this question is the OP's only question, the OP has no other visible activity on SO, and the OP hasn't been seen on SO since he registered and posted the question 5 months ago. Another one I just ran across is .  However, here the "answer" comment was posted by a reputable and recently active SO member.  Should I leave a comment directed at him, asking him to re-post his comment as an answer, or should I post my own answer echoing his comment?  (Or something else?) Yet another is .  Interestingly, the OP actually self-edited the question to include the "SOLVED:" prefix on to the question, instead of posting his resolving comment as an answer (and ideally accepting it) as he was asked to do by another comment.  This brings up another good idea - is there a "standard" we should use to rename the titles on these "resolved but unanswered" posts that could be used as a search exclusion?  (Also added to the above list.)


Please give me some hint to proceed. I'm clueless:     Show that, $\lim\limits_{n\to \infty}n\sin(2\pi en!)=2\pi$

I tried and got this   $$e=\sum_{k=0}^\infty\frac{1}{k!}=\lim_{n\to\infty}\sum_{k=0}^n\frac{1}{k!}$$ $$n!\sum_{k=0}^n\frac{1}{k!}=\frac{n!}{0!}+\frac{n!}{1!}+\cdots+\frac{n!}{n!}=m$$ where $m$ is an integer. $$\lim_{n\to\infty}n\sin(2\pi en!)=\lim_{n\to\infty}n\sin\left(2\pi n!\sum_{k=0}^n\frac{1}{k!}\right)=\lim_{n\to\infty}n\sin(2\pi m)=\lim_{n\to\infty}n\cdot0=0$$  Is it correct?


I am trying to check wether a file exists or not: This works as expected:  if [ -e "/tmp/test.*.lock" ]; then   echo "exists!" fi   This does not:  if [[ -e /tmp/test.*.lock ]]; then   echo "exists!" fi   The filename could be something like /tmp/test.123.lock  I could not find a way to make it work with the "[[" version. Can someone explain me why and how to make it work?

I am trying to write an if statement to test whether there are any files matching a certain pattern. If there is a text file in a directory it should run a given script.  My code currently:  if [ -f /*.txt ]; then ./script fi   Please give some ideas; I only want to run the script if there is a .txt in the directory.


Here is my program:  import datetime  b=input() a = datetime.date(b)-datetime.datetime.now().date()  print(a)   When I enter the date 2015,2,2, or some another, I have a problem  Traceback (most recent call last):   File "", line 4, in <module>     a = datetime.date(b)-datetime.datetime.now().date() TypeError: an integer is required   How to input the date right? I tried 2015-2-2 and 2015.2.2 and 2015-2-2 and other versions. But nothing works :(

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I've got PSD file with vector logo (smart object). I need to save it as SVG for website use. I don't see such option directly in Photoshop though.  Can anyone shed some light on the process? Is it possible?

I have a set of Photoshop files which consist of a base image with a series of layers with colored overlays. The overlays are labeled using the layer names.  My task is to get these overlays as SVG paths, somehow preserving the labels. (If I can preserve the fill colors as well, that would be cool, but we can define arbitrary fill colors if needed.)  So far we have tried exporting the layers as Illustrator paths, and then exporting to SVG from Illustrator. This gets us reasonable SVG paths, but (a) we lose the labels, and (b) if a layer has more than one discrete section in its overlay, it is separated into several paths.  Is there a way to get these layers into SVG while retaining the labels? Or should we do our Export > Illustrator > SVG  route on a layer-by-layer basis?  We're working with CS5, if that's important.  ETA to answerers: We've long since finished this project and delivered the job, so I can't accept an answer, but feel free to pitch in your potential solutions for others.


Recently I started to learn HTML/CSS and jQuery so I was trying to make a little web game. here is the code of HTML:    function playGame() {         var theLine = "
";          for (var i = 0; i < 9; i++) {             theLine = theLine + "<button class=\"ticButton\"> chose </button>";         }          theLine = theLine + "
";         var instr = "
 choose wisely
";          $("body").append(instr);         $("body").append(theLine);     }      $(document).ready(function () {         $("#game").click(function () {             alert("be aware");             $("#game").hide();             playGame();         });          $(".ticButton").click(function () {             alert("you won");         });     });  <!DOCTYPE html>             <title> Play </title>      <link href="style.css" rel = "stylesheet" type="text/CSS" />
 Welcome
  <button id="game"> play </button>                 so my purpose is, after clicking the play (id = game) button, there should appear 9 new buttons and after clicking any of them the alert should be raised saying: you won. But what happens is: after 9 new buttons appear, nothing happens when you click them. Any suggestions? I want to mention that there is a question about event listeners, which doesn't work after dynamic creating but that question and its answers was not helpful for me.

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 have two different regular files:  myscript2 and myscript3 with word 'dash' inside. I want to grep them, but because of '-r' addition to grep I got hidden files as well. I tried to use 'grep -v' after pipe to get rid of hidden files. I failed. Why? What to do to solve my problem?  $ ls myscript2 myscript3 $ cat myscript2 dash $ grep -r -l 'dash' | grep -v '^.*'

I have a directory (e.g., abc/def/efg) with many sub-directories (e.g.,: abc/def/efg/(1..300)). All of these sub-directories have a common file (e.g., file.txt). I want to search a string only in this file.txt excluding other files. How can I do this?  I used  grep -arin "pattern" *, but it is very slow if we have many sub-directories and files.


I've created this change password interface, but for some reason it doesn't seem to be updating the password in the database, which means something is wrong with my code. Could someone please take a look, thanks! The problem is not comparing strings, as I have corrected that and it is still not working, so can I please have this question reopened, thanks :)  ChangePassword.html  <!DOCTYPE html>      <meta charset = "UTF-8">  <title>Change Password</title>        <form action ="NewPassword" method = post>
Change Password
     Enter Old Password:
     <input type = "password" name = "oldpassword" size = "20">

     Enter New Password:
     <input type = "password" name = "newpassword" size = "20">

     Confirm New Password
     <input type = "password" name = "confirmpassword" size = "20">

     <input type = "submit" value = "Update Password">

     </form>.      NewPassword.java  import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*;  public class NewPassword extends HttpServlet {      protected void doPost(HttpServletRequest request, HttpServletResponse response)             throws ServletException, IOException {                  response.setContentType("text/html;charset=UTF-8");                 PrintWriter out = response.getWriter();                  String oldpassword = request.getParameter("oldpassword");                  String newpassword = request.getParameter("newpassword");                  String confirmpassword = request.getParameter("confirmpassword");                   HttpSession session = request.getSession(false);                 String employeeid = "";                   if(session != null) {                      employeeid = (String)session.getAttribute("employeeid");                  }                  boolean st = false;                  try {                      Class.forName("com.mysql.jdbc.Driver").newInstance();                      Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/payroll_system", "root", "");                      PreparedStatement ps = con.prepareStatement("SELECT pwd FROM payroll_system.employee_login WHERE employeeID = ?");                     ps.setString(1, employeeid);                     ResultSet rs = ps.executeQuery();                      st = rs.next();                      if(st) {                           String currentpassword = rs.getString("pwd");                          if((currentpassword.equals(oldpassword)) && newpassword.equals(confirmpassword)) {                              PreparedStatement pd = con.prepareStatement("UPDATE payroll_system.employee_login SET pwd = ? where employeeID = ?" );                              pd.setString(1, newpassword);                             pd.setString(2, employeeid);                             ResultSet rd = pd.executeQuery();                              st = rd.next();                              if(st) {                                  out.println("successfully updated password");                             }                         }                       }                 }catch(Exception e)                  {                      e.printStackTrace();                  }                out.close();        }    }

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 am new to ReactJS and I found a curious thing about Object.assign():    const B = {     k1: 'b',     k2: 'bb',     treedata: [{         children: ['g']     }] }  var A = Object.assign({}, B); A.treedata[0].children = [1]; console.log(B)     As you can see, after Object.assign(), changing object A will also change object B. Why does this happen and how can you avoid this?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


Why is gravitational force only a pull force ? And why does any force even exist between two uncharged particles . Shouldn't the positive negative attraction be nullified by the positive - positive and negative - negative repulsion ?

Why is the gravitational force always attractive? Is there another way to explain this without the curvature of space time?   PS: If the simple answer to this question is that mass makes space-time curve in a concave fashion, I can rephrase the question as why does mass make space-time always curve concavely?


Let $T: V \rightarrow V$ linear transformation in finite dimension  why is it true that $(im(T^*))^{\perp}=KerT$  and what does even $im(T^*)$ means?

How can I prove that, if $V$ is a finite-dimensional vector space with inner product and $T$ a linear operator in $V$, then the range of $T^*$ is the orthogonal complement of the null space of $T$?  I know what I must do (for a $v$ in the range of $T^*$, I have to show that $v\perp w$ for every $w$ in $\ker(T)$ and then do the opposite), but I don't know how to show that this inner product is zero.


How do I construct an injection from rational numbers $\mathbb{Q}$ to integers $\mathbb{Z}$?  I need to write a proof and I'm not sure how to format it.

I want to prove that $\mathbb{Q}$ is countable. So basically, I could find a bijection from $\mathbb{Q}$ to $\mathbb{N}$. But I have also recently proved that $\mathbb{Z}$ is countable, so is it equivalent to find a bijection from $\mathbb{Q}$ to $\mathbb{Z}$?


I have read many subject about async arrow functions, but I could not understand exactly why and where i need to use an async arrow function in another arrow function?  Sample usage:  const x = (data, callback) => async (dispatch, getState) => {}   In this thread  i seen you can provide a closure.  In my case this code snippet from a react-redux application i have sharing function body on below, that is in the action.js  export const loginUser = (data, callback) => async (dispatch, getState) => {     const response = await api.ajax.login.retrieve(data);     let decodedJSON = Buffer.from(response.json, 'base64').toString('ascii');     decodedJSON = JSON.parse(decodedJSON);     dispatch(handleAccountProperties(decodedJSON));     if (decodedJSON.authenticated) {         console.log("data.history::"+ JSON.stringify(data.history));         data.history.push('/customer-account');     } };   You can sense from the code the data variable has a value like "this.props.history" in this code i have seen my data.history object is good relax with its value but history.push does not navigate the page. I couldn't find a technical explanation

I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!)


Giving the following question:  A and B flips a cion, alternately. A starts. The one who gets H first, wins. Let X be a random variable denotes the number of flips at the end of the game. Calculate: $P(X is even)  I found two approached that yields two difference solutions:   Let A flips a coin , and Let B flip a coin. (Assume A didn't win)  I'll call it a round. $round_i$ is independent. By a Tree, $P(A)_{head} = \frac{1}{2}$ and $P(B)_{head} = \frac{1}{4}$ When $X$ is even, it's $B$'s round and therefore answer is $\frac{1}{4}$.  Second approch is simply:  $\sum_{i=1}^\infty (\frac{1}{2})^{2i} \approx \frac{1}{3}$ For each 2 flips, or for each round, we have a probability of $\frac{1}{2}$ to get X even.  What is the right approach? If none of the above, that is the right approach? Thanks in advance.

A fair coin is tossed until a head comes up for the first time. The probability of this happening on an odd number toss is?  How do i approach this problem ?


Is it possible to insert PDFs into Stack Exchange posts, or do I have to convert them to images first?  Specifically, I'd like to insert a PDF on . My latex code (.tex) compiles to PDF and I want to display both in a post (so I'm not interested in uploading the file and having it as an attachment to my post).

I posted a question and a couple of respondents asked for the source code. I could only post portions of the code.  If attachments were allowed I could have uploaded a .zip file with the whole application.  Will this be a feature in SO?


I just do update and upgrade, but I miss close, minimize and maximize button along with top border title bar after that.   I did metacity --replace and unity --reset, It didn't work for me.   Also, I set in the gconf-editor default metacity>general to close, minimize, maximize:  and it didn't work.   The last, I unchecked windows decoration in Compiz, and it didn't work too.  Any help will be highly appreciated, and I attach a screenshot of a window without the title bar as one example of my problem.

I was playing around with compizconfig. I don't remember what exactly I clicked. Since then, the close/minimize buttons and the sidebar vanished. I use 12.10 version. Please help me out.


So I set up my business email via g suite which created the domain name via godaddy. I have heard bad reviews on godaddy and was looking at a different host for my website. Do I have to host on godaddy since that is where I bought the domain from?  thank you

Recently I registered for a domain name and bought it. I had failed to check their hosting plans first :(. They charge a lot for hosting a website. I am thinking of hosting it under some free web hosting provider. How do I host my website with another web hosting provider which is not the provider I registered the domain with?


So I'm suppose to prove that $\sum 1/n^2 \le 2$. Should I use induction?

I need to prove that the sequence $a_n=1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}$ converges. I do not have to find the limit. I have tried to prove it by proving that the sequence is monotone and bounded, but I am having some trouble:  Monotonic:  The sequence seems to be monotone and increasing. This can be proved by induction: Claim that $a_n\leq a_{n+1}$ $$a_1=1\leq 1+\frac{1}{2^2}=a_2$$  Need to show that $a_{n+1}\leq a_{n+2}$ $$a_{n+1}=1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}+\frac{1}{(n+1)^2}\leq 1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}+\frac{1}{(n+1)^2}+\frac{1}{(n+2)^2}=a_{n+2}$$  Thus the sequence is monotone and increasing.   Boundedness:  Since the sequence is increasing it is bounded below by $a_1=1$. Upper bound is where I am having trouble. All the examples I have dealt with in class have to do with decreasing functions, but I don't know what my thinking process should be to find an upper bound.   Can anyone enlighten me as to how I should approach this, and can anyone confirm my work thus far? Also, although I prove this using monotonicity and boundedness, could I have approached this by showing the sequence was a Cauchy sequence?  Thanks so much in advance!


These are the screen shots of the issue I am having.  Google please fix this issue.

Being at  I enter a desired username (without @gmail.com which is supposed), and I get error:     "That username is taken. Try another."   But when I try to login into Google with that xxx@gmail.com at  it fails with:     "Sorry, Google doesn't recognise that email."   How that can be?  P.S.: I want that username still.


Show that if $\sigma=(a_1,a_2,\dots,a_m)$ and $\tau$ is any element of $S_n$, then $\tau\sigma\tau^{-1}=(\tau a_1,\tau a_2,\dots,\tau a_m)$.  I'm not quite sure how to start this.  The solution starts off by saying that  $$\tau\sigma\tau^{-1}(\tau(a_i))=\tau\sigma(a_i)=\begin{cases}\tau(a_{i+1})&i<m\\\tau(a_1)&i=m\end{cases}$$  but I don't see why.

The problem: let $(x_1, x_2, ..., x_r)$ be an r-cycle in $S_n$. Show that for every $h \in S_n$, $h \circ (x_1, x_2, \ldots, x_r) \circ h^{-1} = (h(x_1), h(x_2), \ldots, h(x_r))$


Why isn't there just a generic off-topic flag?  This question really should be flagged as such, but it would be too bothersome to flag with a custom reason:

I really like the new option structure when flagging - I have in particular missed the "Minimal understanding" option. However, I think that one option is missing. If we look at , it has many issues. I ended up flagging it as too broad, but I would think that it is simply, well, just off-topic. So that's where I started. Hmm:  It isn't about general computing hardware/software. It certainly isn't about code problems. It could be about not demonstrating a minimal understanding of the problem - but suggesting this guy should elaborate on what he did to try to change his birthday doesn't seem right. It isn't about server and networking. It isn't really asking for recommendations. It certainly doesn't belong anywhere else on SE.  In this case, as mentioned, I flagged as too broad even though VLQ might also have been appropriate. However, if we assume that the question only contained the first sentence, and was actually well-formed, but totally off-topic such as:  How can I change my birthdate in Facebook? I looked in the FAQ and tried  but now it is locked and I cannot change it anymore.  Isn't that off-topic? Would “Minimal understanding” really be the proper selection here? As far as I can see, I can't just select “off-topic”, but have to select one of the above options. Or should those kind of posts go directly to mods every time? Edit:  of what I believe is just off-topic, but doesn't apply to any of the options given in the off-topic dialog, and which hence has to go by the mods. Edit 2:  - which I personally flagged not as OT, but as unclear. As official OT it is still a prime example where none of the generic options apply. The question (with the title included) says:  It is possible to play the DRM formatted song in Custom player like AVAudioPlayer and MPMoviePlayer [on hold] I have tried to play directly in the AVAudioPlayer or MPMoviePlayer, but the song isn't playing.  to which the SO official response is:  You may be able to get help on Super User.  Seriously? We really want him to ask this question at Super User? Edit 3: And  that I ended up flagging as unclear - although I'd say it is a prime, generic off-topic question. From Al Everetts comment below:


In the curr directory, I have folder certs. certs   - a    - b    - c  /another/location may or may not contain certs(a,b,c) folder already. Problem: mv certs /another/location gives error - directory already present if certs are already present. One workaround is:    rm -r /another/location/certs     mv certs /another/location   My Question: But I don't want to use rm and delete already present things, I just want to overwrite certs folder if already present otherwise just certs should be moved normally. PS: I don't want to use rsync as it has to be installed explicitly and may not be present in all machines.

I would like to know how could I move all files from a folder to another folder with a command line.  Let's say I'm in my Downloads folder and there are a 100 files that I would like to move to my Videos folder, without having to write all the files name.


Hi im trying to display customer orders that are added to a 'table' class from another class  public class PaymentScreenController {       public ArrayList<Customer> allcustomers; // Defining allcustomers Arraylist         public Table tbl; // Creating instance of Table class       @FXML     public void initialize() {          allcustomers = tbl.getCustomers(); // Error seems to come from here when i assign allcustomers to the getcustomers method of table         System.out.println(tbl.getCustomers());          System.out.println("test");         for (Customer customer : allcustomers) {              System.out.println(customer.getCustomerorder());         }       } }   any help would be appreciated thanks  ** More code*  public void submitorder(ActionEvent actionEvent) throws IOException {         //create a new UNIQUE customer to store that customers menu items         Customer cust = new Customer();         //add items to customer         cust.getCustomerorder().addAll(order);         // Adds the customer order to the table class         tbl.getCustomers().add(cust);         System.out.println(tbl.getCustomers());         //clear menu choices screen         lvOrder.getItems().clear();          // Once added the desired number of customers move to next screen         //extra customer was being added as a customer was put into the ArrayLust after the check happened.         if (tbl.getCustomers().size() == noOfDiners) {             Window mainWindow = btnSubmitOrder.getScene().getWindow();             Parent newRoot = FXMLLoader.load(getClass().getResource("payment_screen.fxml"));             mainWindow.getScene().setRoot(newRoot);         }      }   So the customer adds stuff to their order, and then the customer is added to the table class

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


I am taking a course on multivariate statistics and I enjoy it pretty much. But I feel the course focuses too much on procedures and not on answering "why" some things are the way they are.  So let me be more specific. The course is about: - Exploratory and confirmatory factor analysis - Principal Component Analysis - Cluster Analysis - MANOVA - Canonical Correlation Analysis - Discriminant Analysis - Logistic Regression  We are currently following the book "Applied Multivariate Techniques" by Subhash Sharma. I would like to read a book which explains "why" things are the way they are. For example, instead of just saying "We apply the following test", I would like to know what the test statistic means and how we found it. I hope this makes sense.  It can be very mathematically rigorous, I don't mind. It doesn't have to be very proofy (although that would be neat!), but I would like to get to know "why" and not only "how".

I need a graduate level, mathematically rigorous textbook on multivariate analysis and inference to enhance myself. I've been reading the  and doing the problems within, but I need a book with other focuses. Topics like famous distributions (Wishart, Wilks lambda, etc.), hypothesis testing, some theory on estimation (point, interval), and other more modern materials are welcome. I've checked , but the OP there was looking for something useful for his psychological analysis, which is not exactly what I want here. Currently I have the , so I would also like to hear the comments about this book and its exercises. Thank you.


I am not a native speaker and would like to know the difference between these two:  1. Profile was removed  2. Profile has been removed  Yes I know it is Past Simple vs Present Perfetc. For me, the second one is better because there is a consequence but in some cases also first one is used. Why?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


Can you please tell what version of ubuntu suitable for Intel(R) Pentium(R) 4 CPU 2.80 GHz , 2.79 GHz ,504 MB of RAM computer.

I have very old Computer  What's the Best Operating System for Old Computer?


I'm writing a computer program that finds prime numbers. It currently loops through a number (n) and starts at 2 (k). It checks if n is divisible by k. If so,  it declares the number as not prime and moves on. If not, 1 is added to k and the division is repeated. This goes on until k is equal to half of n.   Is there a more efficent way to do it?

Given a random number, what would be the quickest possible way of finding out whether it was prime?  Obviously, one could just iterate through the number in order to see if it was divisible by anything, but can you implement quicker ways of finding a given number?