I've made one server and client to send data one between another but that don't work and I don't know why...  A little earlier I have that error message from server:      java.net.SocketException: Broken pipe   and now I have null pointer exception from client on line 23:     java.lang.NullPointerException      at chat.Client.sendData(Client.java:23)   Here it's my code:  Server  public class Server {      private ServerSocket server;     public Socket socket;      public Server() {         try {             this.server = new ServerSocket(Port_and_address.PORT);             this.socket = server.accept();         } catch (IOException ex) {             Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);         }     }      public String reciveData() throws IOException, ClassNotFoundException {         ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());         String result = (String) ois.readObject();         ois.close();         return result;     }      public void writeData(String message) throws IOException {         ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());         oos.writeObject(message);         oos.close();     }      public void closeSocket() throws IOException {         socket.close();     }      public static void main(String args[]) throws IOException, ClassNotFoundException {         while (true) {             System.out.println("Waiting for client request");             Server server = new Server();             System.out.println(server.reciveData());             server.writeData("TEST SERVER");             server.closeSocket();         }     } }   Client  public class Client extends Thread {      Socket socket;      public void Client() {         try {             this.socket = new Socket("localhost", Port_and_address.PORT);         } catch (IOException ex) {             Logger.getLogger(Client.class.getName()).log(Level.SEVERE, null, ex);         }     }      public void sendData(String message) throws IOException {         ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());         oos.writeObject(message);     }      public String reciveData() throws IOException, ClassNotFoundException {         ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());         ois.close();         return (String) ois.readObject();     }      public static void main(String[] args) throws IOException, ClassNotFoundException {         Client client = new Client();         client.sendData("TEST CLIENT");         System.out.println(client.reciveData());     } }   From some reason the that line give null pointer exception:       ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());    So if anyone of you guys knows what I've do wrong here please tell me.  At the end I want to have one server how can receive any message from any client and response on it, theoretical  I can have a infinite number of clients how can send messages.  Thx for help :)


Why didn't Anakin/Darth Vader turn back to the light when he caused so much suffering?

In RoTS, Ani just wanted to 'save Padmé's life'. When he met Obi-Wan on Mustafar, he truly believed that he was in the right and that his friends were the traitors to the Republic (thanks to Palpatine's exquisite web of manipulation). So, after he harmed/killed so many beings, why didn't he figure out that something was dreadfully wrong and Palpatine was just seeking personal power? Was it that after discovering the power that came with the dark side he became addicted/wanted power for himself?


Is there any way to convert a track bike to a geared bike? I have a track bike with only the rails for the wheel but I've moved out of the city and there are more hills where I am now living so would like to convert to gears if possible and rather than buy a new bike, save some cash.


I would like to retrieve answers to old questions. Is there any way to search "only" on the questions I posted?


This problem is from John Lee's "Introduction to Smooth Manifolds"  1-4. Let M be a topological manifold, and let U be an open cover of M .  (a) Assuming that each set in U intersects only finitely many others, show that U is locally finite.  (b) Give an example to show that the converse to (a) may be false.  (c) Now assume that the sets in U are pre compact in M; and prove the con- verse: if U is locally finite, then each set in U intersects only finitely many others.  I think I have been able to successfully proof part a). I am stuck on part b) and c).  Any help is appreciated!


prove that the sum to n terms of the sequence is $n(n+1)/2(2n+1)$

Prove that the sum to n terms of the Sequence:  $1^2/(1×3),2^2/(3×5),3^2/(5×7),...$ is $  n(n+1)/2(2n+1).$  Im having trouble with this question, firstly ive begun by stating that p(n) denotes the statement.  Then to prove that p(1) holds where $n = 1$ $n(n+1)2(2n+1).$ = 1/3 and $1^2/1*3$ = $1/3$ therefore true  Now i know I have to show $n=k$ and therefore $n=k+1$ but how can i do this? I'm very tired so clear instruction would be great.


Obviously the opacity isn't what I want lol. I'm a little stuck on how to merge   Little bit closer, but it's still transparent...


Is it possible for an iPad to get a virus?

I was using Safari on my iPad and suddenly a pop up message saying "your device has a virus" appeared. I just clicked okay because that was the only option and then it redirected me to youradexchange.com. Is it possible for my iPad to get a virus?  I'm using iPad mini Retina with iOS 7 and it is not jailbroken.


Equation of the parabola which touches $x$ axis at $(a,0)$ and $y$ axis at $(0,b)$

Prove that the equation of parabola which touches $x$ axis at $(a,0)$ and $y$ axis at $(0,b)$ is $$\sqrt{\frac{x}{a}}+\sqrt{\frac{y}{b}}=1.$$


I've run into a practice problem where $Y = \cos(\pi X)$, and $X$ is uniform on $[0, 1]$, and I'm supposed to prove that the PDF of $Y$ is $1/(\pi\sqrt{1 - y^2})$. I know that for derived distributions, you plug in the the equation for $Y$ in terms of $X$ into the PDF of $X$, integrate up to $y$, and then differentiate with respect to $y$. However, when I do this, I get the PDF of $Y = -1/(\pi\sqrt{1 - y^2})$.   I'm sure that the problem here is that there's some property of the cosine and its inverse that I don't know, so if someone could point out how to do this, that would be great, thanks!


How to shorten the displayed directory in the windows 7 cmd prompt

I know that the PROMPT command can be used to alter the command prompt but sometimes the directory path gets too long. Most of the time I'm not interested in the entire directory, just the last folder (leaf). Is there any way of shortening it?


How to prevent xcolor from influencing algebraic sign spacing?

The xcolor package influences the spacing of the algebraic sign. How to prevent this behavior?  Screenshot    Mathematical background  The second example should be treated as a binary operator instead of an unary operator.  See:   MWE  \documentclass{scrreprt}  \usepackage{xcolor}  \begin{document} \(1 + 2\)  \(1 {\color{gray} + 2}\)  \end{document}   Workaround  By manually adjusting the spacing...  \(1 {\color{gray}\,+\,2}\)


Determine the convergence radius for $\sum_{n=1}^{\infty}\frac{(n!)^kx^n}{(kn)!}, \quad k\in\mathbb{N}.$

The ratio test gives $$|x|\cdot\lim_{n\rightarrow\infty}\left|\frac{((n+1)!)^k\cdot(kn)!}{(k(n+1))!\cdot(n!)^k}\right|=|x|\cdot\lim_{n\rightarrow\infty}\left|(n+1)^k\cdot\frac{(kn)!}{(k(n+1))!}\right|.$$  I'm having trouble simplifying $\frac{(kn)!}{(k(n+1))!}$, so far I have:  $$\frac{(kn)!}{(k(n+1))!}=\frac{kn(kn-1)...}{(kn+k)(kn+k-1)...(kn)(kn-1)...}=\frac{1}{(kn+k)(kn+k-1)...(kn+1)}.$$  This means that I have $$|x|\cdot\lim_{n\rightarrow\infty}\frac{(n+1)^k}{(kn+k)(kn+k-1)...(kn+1)},$$  since the highest power after expansion of the denominator and numerator are $1$ and $k^k$ respectively, the above is asymptotically equal to  $$|x|\cdot\lim_{n\rightarrow\infty}\frac{(n+1)^k}{(kn+k)(kn+k-1)...(kn+1)}\sim|x|\cdot\lim_{n\rightarrow\infty}\frac{n^k+\text{lesser powers}}{k^kn^k+\text{lesser powers}}=|x|\frac{1}{k^k},$$  thus the radius is $R=k^k$.  I feel really insecure here using these vauge arguments. Is it mathematically correct to reason like this?


I'm running Thunderbird 24.3 on Debian 7 and sometimes when I click on 'Write' and it opens up a new window it's not in focus and my keystrokes are sent to the main Thunderbird screen not the new Write screen. The Windows Manager I'm using is XFCE4.   It's happening for other users of the same system and I have yet to find a pattern to reproduce this.  I've also had this happen with firefox 27.0.0 and with Thunderbird whilst using thunderbird inline conversations plugin on one of the machines which doesn't start a new window.  What I've tried and I still have the problem   clicking on title bar Check error console Start a fresh profile (Move the .thunderbird directory and start completely fresh)   Update  Tried the thunderbird 24.4.0 and still have the problem.  Noticed that if I quickly hit Ctrl+n about 10 times I can re-enact the problem.


How to connect/forward HTTP proxy through ssh?

I have a PC A behind proxy server S. A can use the internet with browser + proxy login, or terminal + export http command.  Now I have another PC B that's connected to A. How can I access A's internet from another PC B, provided I can ssh between A and B?  Edit: In , what I understand is that the PC (A) is directly connected to internet. In my case, however, A has to login to another proxy server S before it can use internet. Can I make a tunnel for this?


If I Ready an action, can I then use my reaction for something else?

Merle the Wizard is fighting enemies with his friends on a bridge. He wants to cast a spell on the BBEG, but they are currently out of range and so he uses his action to ready a spell for when the BBEG is in range.  However, before that happens one of Merle's friends is knocked off the bridge. Can Merle ignore the spell he had readied and use his reaction to cast feather fall?


With a firmware password set on a Retina MacBook Pro, what are recovery options?

I am considering setting a firmware password on my Retina MacBook Pro for security reasons. If I do this and later lose the password (or other such extenuating circumstances), how can the data be recovered? Is it even possible?


Can something go faster than the speed of light in a medium?

Since some mediums have an index of refraction more than 1, light goes slower than in a vacuum. Does this mean it is possible for particles to go faster than the speed of light in these mediums? If so, is there any effects that arise from this?


How to find out what you can import in Python modules?

Hey folks quick question, how do I find out what is available for import from a library?  Everyone online who teaches this stuff always uses wildcards! Even when they tell you not to, they never tell you how to find out what there is to import!  So for tkinter, I can't figure out what I have to import to be able to specify self.topFrame.config(relief = RIDGE)  it only works if I import *  otherwise it says RIDGE is not defined. So how am I supposed to know where this RIDGE resides in tkinter library?  Thanks!


Can I install the latest version of Ubuntu

Processor: Intel(R) Pentium(R) M processor 1.70GHz 1.70GHz  32 bit operating system   36.3 free of 55.7 GB   Windows 7 HP Home Edition  HP pavallon dv1000.                    ( can i get the latest Ubuntu? )


has been tagged  but I really think its a bug. I just experienced this. TWICE  First time :     Second time :     And now again    SERIOUSLY, THIS NEED TO BE FIXED... :(    IS THIS BUG AFTER ME?    Can this bug be fixed???. Pls stop giving me false hope. I really thought I had +118 somewhere :)  What is going on?


Does material (density) affect falling rate of objects?

Suppose Galileo dropped a one-kilogram ball of cotton and one-kilogram ball of iron from the top of the Leaning Tower of Pisa, then which one will reach the ground first? Assume that the cotton ball is tightly wadded up and that initially the bottoms of the cotton ball and iron ball are at the same horizontal level.   The answer to this question apparently is the iron ball, but I don't see any reason why that'd be, considering that they have equal masses! Does density affect the rate at which an object falls?


Ubuntu 17.10 doesn't boot. Plymouth and intramfs prompt error

I recently installed some Plymouth themes by using this command:  sudo apt-get install plymouth-theme-*   Then I changed theme to ubuntu-budgie using this command and selecting the theme:  sudo update-alternatives --config default.plymouth   And then I updated configuration using this command:  sudo update-initramfs -u   And finally I rebooted my system and what I see, it shows me the bootup screen, then automatically reboots the system and then takes me to some black screen prompt mentioned BusyBox and initramfs in it. What should I do now? I can't boot into my system.


Is it possible to remove the profile cover once you've set one? Basically, have it revert to the initial "default" one of that particular account.


I've heard that the word Oriental, if used to people, is racism.  Is it true? And if it is, why?


I was trying to learn something else then i encounter with the following code.   class point{}; point p_; new (&p_) point(w.p_);   What does third line expression do, and what is intended ? Does it helps us to save time while copying or something. And is p_ somehow allocated dinamically? // I'm so confused.  The place I encountered ->>   //Second page of the document.


Why heroes of Tolkien novels didn't use birds to reach Mordor or Erebor?

First of all - I never read Tolkien novels, that's why my knowledge about this world is only from movies. Secondly, I have a rationalistic point of view on the whole universe and there is no place for magic. When I watch fantasy [I like it :)] I'm saying to myself, ok, it's magic, calm down, let it be. But sometimes I really don't understand some facts.   At the end of the first part of "The Hobbit" Gandalf called birds to save them from orcs. They flight to some rock and stopped. From that rock they saw Erebor.   The question is why they didn't use birds to fly to Erebor or Mordor at LOTR? Are there any limitations because of which they can't do that? Or it's a magic and let it be?


How to set up an entire hard drive as a shared drive in Samba

I am trying to set an entire hard drive as a share using Samba on our server running Ubuntu Desktop 16.04.  I have been able to successfully set up a shared folder, but I am having problems setting up the drive.  Here is what I have in the smb.conf file, where [share] is the shared folder and [share2] is what I have set for the hard drive:  [share] path = /home/craig/desktop/share available = yes valid users = craig-pc read only = no browsable = yes public = yes writable = yes  [share2] path = /media/craig/Seagate D1 available = yes valid users = craig-pc read only = no browsable = yes public = yes writable = yes   Another question I have is on the valid users statement, currently I have it set for only my windows 7 pc which is user craig-pc, when I wish to add additional users do I add them in the same line using a comma like valid users = craig-pc, bob-pc, etc.?  What is the correct method of adding additional valid users?   I deleted the Share2 info from my smb.conf file and then set up the hard drive as a share using the Samba GUI (system-config-samba), what follows is the information it placed in the smb.conf file for the share:  [Seagate D1] path = /media/craig/Seagate D1 writeable = yes valid users = craig-pc, craig, marcy     PLEASE NOTE: the path does not have the quotation marks around it because of spaces in it, so I am not sure if they are needed as suggested it should have by Terrance (BTW - Thank you for your comment).


For a finite commutative ring $R$, $a \in R$ is a root of $p(x)$ iff $p(x)$ can be written as $p(x) = (x-a)g(x)$

$R$ is a finite commutative ring with identity. Let $p(x) \in R[x]$, the ring of polynomials over $R$.   Show that $a \in R$ is a root of $p(x)$ if and only if $p(x)$ can be written as $p(x) = (x-a)g(x)$ with $g(x) \in R[x]$ of degree one less than the degree of $g(x)$.  The "if" part is trivial. I'm struggling with the "only if" part since $R[x]$ is not an Euclidean domain so we cannot use the Division Algorithm. $R$ may not even be an Integral domain, so I can't view $p(x)$ as a polynomial in its field of fractions.  Is there some other way to do it using finiteness of $R$?


Let $f$ be non zero symmetric bilinear form on $\Bbb{R^3}$.  Suppose that there exists linear transformation $T_i:\Bbb{R}^3\to\Bbb{R}$ ,$i=1,2$ such that $\forall a,b \in \Bbb{R}^3$ ,  $$f(a,b)=T_1(a)T_2(b)$$  Then  I) rank $f$=1  II)  dim$\{b\in\Bbb{R}^3 :f(a,b)=0 \forall a\in\Bbb{R}^3\}=2$  III) $f$ is positive semi-definite or negative semi -definite   IV) $\{a:f(a,a)=0\}$ is a linear subspace of dimension $2$


How to fix Windows 8 statup and remove Ubuntu 14.04

The Dualboot is not working, so I want to get rid of Ubuntu.  I think the problem has something to do with UEFI / Legacy, But I have given up now and acceptet that Ubuntu is still for IT Experts only.  My problem is that if I startup in boot manager, It will not startup Windows.


l am a young king, but l am king -- why no article in front of the second "king"?

From the movie  starring Leonardo DiCaprio who plays the role of the young King Louis XIV. d'Artagnan is responsible for security. Here's a short conversation between the two:     King Louis XIV: Perhaps l haven't met a woman with a heart like my own until recently.   d'Artagnan: Would that be Christine?   King Louis XIV: It is good that you watch me, but I fear you watch me too closely.   d'Artagnan: Did you send Raoul to the war so that you could be free to pursue her?   King Louis XIV: Do you question my honor?   d'Artagnan: No, I do not question your honor. It's you I care about.   King Louis XIV: Raoul will return soon. You have my word.   d'Artagnan: Thank you, Your Majesty.   King Louis XIV: I am a young king, but I am king.   d'Artagnan: Then be a good king, Your Majesty.   Can anyone explain why there is no indefinite article in front of the second "king"?


There are $12$ stations between A and B, in how many ways you can select 4 stations for a halt in such a way that no two stations are consecutive

How do we solve this question with permutation and combination? Can we solve this by Fibonacci Series? Is the answer (12-2)C4 {10 combination 4}?


Is it possible to take backup of certain table in mysql? Suppose I have 10 tables, and I want to take a backup of 8 tables through one command.   How can I do this?


Why are the applications repeated multiple times in the "Open With Other Application...." option?

I am using Ubuntu 11.04 Desktop and when I right click on a particular folder and select "Open With Other Application....", some of the applications are repeated multiple times. This is happening with more than one application. I was able to get rid of them from the "Edit Menu" option, but why does this happen and how to make sure it doesn't happen again?


Remove characters from a list of strings

I have a list of strings which has got some characters in it.   On viewing it in HTML viewer I get the following    I tried line.Replace() to remove some special characters but it doesn't work.


A $3 \times 3 \times 3$ cube has no Hamiltonian path starting at the corner.

We have a $3\times3\times 3$ cube which has $27$ cubes each $1\times1\times1$ stuck together as usual. $2$ cubes are neighbours if they have a common face. The corner cubes are the $8$ cubes at the corners of the big cube. Can the worm start from a corner cube and eat its neighbour cube, continuing until at the end the last cube eaten is the one in the center of the big cube which has 6 neighbour cubes?


What's that ship in the opening credits of 'Star Trek: Enterprise'?

In the Star Trek: Enterprise opening credits it seems to step through starship history up to the Enterprise NX-01.  After Cochran's Phoenix, there is a ship that we see almost only from behind, and then the Enterprise. Do we know what that ship is?


How to denote "undefined" as a predicate?

Let $P \subset \mathbb{N}$ be a finite index set and suppose that there is a partial function $f:P \to P$, which is undefined for some strict subset of $P$. Then, suppose I have a function $g: P \to \{ 0, 1 \}$ defined as $$ g(i) =  \begin{cases} 0 & f(i) \text{ is undefined} \\ 1 & f(i) \text{ is defined.} \end{cases} $$ What is the formally correct way to denote these predicates? Could $\not \exists f(i)$ and $\exists f(i)$ work?


I have been reading online about this, and some consider $0^0$ to be equal to $1$, and others say it's undefined. I can understand the undefined part but why do some assume it to be one?


Which function "loops" after deriving it $n$ times?

With looping I mean that the identity is returned after deriving a function $n$ times.  I know the following examples: n=1: $$f(x)= e^x = f'(x)  $$ n=2: $$f(x) = e^{-x} = f''(x) $$ n=4: $$ f(x) = \sin(x) = f''''(x)$$ with $$f''''(x) = f'''(\cos(x)) = f''(-\sin(x)) = f'(-\cos(x)) =\sin(x)$$  What about $n=3$ in particular? Do you know other loops that work?


can someone help me understand this problem: 12498512487499999 / 2 = 6249256243749999 1/2  when I try the above division in spyder, it does the below: 12498512487499999/2 and it returns => 6249256243750000.0  why is this happening? it won't return the correct result. is the number too large?


Do wizard familiars get skill points to distribute? REF#Sage’s Knowledge (Ex)

Nowhere in the wizard class page does it say that a familiar gets its 1 skillPoint/HD. However as was concluded in this thread about , a sage familiar would have to base its skills off of the base creature's which if you do the math used a sp/HD.     Sage’s Knowledge (Ex)    - A sage stores information on every topic and is happy to lecture its master on the finer points. A sage can attempt all Knowledge checks untrained and receives a bonus on all Knowledge checks equal to 1/2 its level. Additionally, a sage gains 2 skill ranks at each level.   So,   does a sage familiar get 2 or 3 sp/(hd or wizard level) does a regular old familiar actually get a sp/level, like a druids animal companion?   I kind of think its actually 2 to 1. and no to 2. With the sage archetype a familiar gives up a decent amount, alertness and the wizard's 8 skill point fed perception etc, to be able to put skill points in whatever it wants. Oh say.. Use Magic Device for instance. However if my planned Nosoi familiar can pop a point into UMD and use my score for the skill.... well, whoo hoo.


I want this python problem's output in a tuple format, but dont know how to format it?

My program is :  def question_fourth_solution(array_nums):     odd_len = len(list(filter(lambda x: (x%2 != 0),array_nums)))     even_len = len(list(filter(lambda x: (x%2 == 0),array_nums)))     print(odd_len,even_len)     return array_nums  question_fourth_solution([1, 2, 3, 5, 7, 8, 9, 10])   I want my output in tuple form like given below: (5,3)


90s novel, man reincarnates several times at a specific date and time after a heart attack, studies his condition with a woman who also experiences it

In the late '90's I read a book where the main character would constantly reincarnate and have a life 'do over' until an inevitable heart attack that would always occur at the same date and time. Each life would start a little later (he would re-inhabit his body at a slightly later stage). He meets a woman who is having the same experiences as him, and they have a relationship that spans lifetimes. Each new iteration of their lives they look for each other, sometimes having to wait until the other person reincarnates before continuing on their research into their condition again.


I was using Safari when I got a pop-up saying you got a virus(7) click on ok to delete this virus and I clicked on ok because I thought I really had a virus but it said type your phone number. Should I type my phone number in or not. I tried to look up how to find and delete viruses but it is mostly Android and Microsoft products.  My iPad is an iPad air. But is it possible to get a virus on a iOS device and if so how can I find it and delete it?


Data Extension read-access via Installed Packages Scope

With the new permission model for Marketing Cloud Installed Packages, there is a problem with the "Read"-Scope for Data Extensions.  If an installed package is granted the permission/scope "Data Extensions - Read" the API-Call fails with HTTP 403 "Forbidden".  How to provide read access to Data Extensions?  Related documentation:


How to run a process in background without typing & every time?

For some processes I use, I almost always run them as background processes by indicating that with "&" at the end. Is there a way to make this standard? Would it be possible to use the alias command in the .bashrc file to do this?


Installed Ubuntu alongside windows 10 but can't switch between os

I have installed Ubuntu into its own partition but when I boot my Acer laptop it takes me straight into windows I have checked boot menu nothing and I have checked the primary is and it only has windows  Can someone help me with a method on how to switch between Ubuntu and windows


Determine the orthogonal complement of x in span [p1, p2, p3].

Let vectors P1, P2, and P3 be defined as follows:  P1 = [1 2 3 4] $^{T}$, P2 = [4 -2 -6 -7]$^{T}$, and P3 = [3 4 -2 1]$^{T}$  Let $x = [1 \, 2\, 3\, 7]^{T}$  This question is compromised into two parts:  a. Determine the closest vector $\hat{x}$ in span [P1, P2, P3].   b. Determine the orthogonal complement of x in span[P1, P2, P3].  Part a. is simply the projection x onto the subspace spanned by those vectors: $A(A^{T}A)^{-1}A^{T}x$. However, I am unsure about part b. I know that $x - \dot{x}$ is the orthogonal complement to the subspace spanned by [P1, P2, P3], but how do I find the orthogonal complement of x $\textbf{in}$ span [P1, P2, P3]?


Proof that an ordinal number does not contain itself

Hrbacek and Jech gives the following definition for ordinal numbers:   However, the following proof seems to rely on the fact that an ordinal number does not contain itself (argument circled in red).   It isn't clear to me why the red circle is true. Why is it clear that an ordinal does not contain itself?


How to Get Vertical Timeline work in Beamer?

I am trying to reproduce the answer  about How can you create a vertical timeline? in Beamer (not OS X specific only).  I installed TeX By MacTeX.  I have these packages in OSX xcolor, colortbl and caption because Test code 1 works and verified also by Tex Live Utility.    Test code 1  Works:  \documentclass{report}  \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \usepackage[TS1,T1]{fontenc} \usepackage{fourier, heuristica} \usepackage{array, booktabs} \usepackage{graphicx} \usepackage[x11names]{xcolor} \usepackage{colortbl} \usepackage{caption} \DeclareCaptionFont{blue}{\color{LightSteelBlue3}}  \newcommand{\foo}{\color{LightSteelBlue3}\makebox[0pt]{\textbullet}\hskip-0.5pt\vrule width 1pt\hspace{\labelsep}}  \begin{document}  \begin{table} \renewcommand\arraystretch{1.4}\arrayrulecolor{LightSteelBlue3} \captionsetup{singlelinecheck=false, font=blue, labelfont=sc, labelsep=quad} \caption{Timeline}\vskip -1.5ex \begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}} \toprule \addlinespace[1.5ex] 1933 & LCMV, aseptic meningitis. Epidemic St. Loius encephalitis. \\ 1956 & Tacaribe virus.  \\ \end{tabular} \end{table} \end{document}    Test code 2  Does not work:  \documentclass{beamer}  - - same as above - -    Output  Latex Error: ./test_timeline.tex:11 LaTeX Error: Option clash for package xcolor.  Latex Error: ./test_timeline.tex:45 Package xcolor Error: Undefined color `LightSteelBlue3'.  Latex Error: ./test_timeline.tex:46 Package xcolor Error: Undefined color `LightSteelBlue3'.  ...     How can you get a vertical timeline in Beamer?


Prove that an annulus is not simply connected?

I don't have complex analysis at my beck and call, and I only have a low level of knowledge in topology, but I need to prove that this metric space (for any real $r$ and $R$ with $r < R$)$$ X = \{ (x, y) \in \mathbb{R}^2 \ | \ r \leq x^2 + y^2 \leq R \}$$  with the Manhattan metric $d((x_1, y_1), (x_2, y_2)) = |x_1-x_2| + |y_1-y_2|$ is not simply connected.  I've already prooven that it's path connected, and now I need to show there are some points $P$ and $Q$ with two paths between them such that one cannot be continuously 'morphed' into the other.  $ \ $  What I have so far is as follows:  I take $P = (0, r)$ and $Q = (0, -r)$, with $f_0$ being a path from $P$ to $Q$ going clockwise around the circle radius $r$ and $f_1$ being much the same but going counterclockwise.  Now I assume there is a function $g : [0, 1]^2 \to X$ such that:   $g(s, 0) = f_0 (s)$ $g(s, 1) = f_1 (s)$ $g(0, t) = P$ $g(1, t) = Q$   To get the final result, I need to show that this function cannot be continuous, but for the life of me I cannot.  For some context, these are the topics which have been visited during the course, roughly in order of recentness.   Multiple connectedness Simple connectedness Pathwise connectedness Interior points Boundary points Open sets Compactness Complete metric spaces Bounded metric spaces Totally bounded metric spaces Closed sets Closure of a metric space Limit points Cauchy sequences Convergence Continuity Metric space quivalence Metric equivalence   Edit: I might have an argument that works, though it's far from rigourous. We can shrink $R$ to be as close to $r$ as we want, so we can essentially constrain the annulus down to a circle and thus force any path from the left side of the circle to the right side to go through $P$ or $Q$.  So holding $s \in (0, 1)$ constant and varying $t$ must produce a path through $P$ or $Q$ for any $s$. If for some $s$ it passes through $P$ and for some other $s$ it passes through $Q$, then there must be $s_0$ such that $\forall \epsilon >0  \ \exists \delta \leq \epsilon$ st. $s_0$ produces a path through $P$ and $s_0 + \delta$ produces a path through $Q$.  Now we can consider the path $g(s, \frac{1}{2})$, and note that it must have a discontinuity at $s_0$.  Now consider the case where all $s$ produce paths through only one of $P$ or $Q$. WOLOG: $P$. Now, at $t = \frac{1}{2}$, $s$ arbitrarily close to $1$ are mapped away from $Q$, but $1$ is always mapped to $Q$ by definition, so $g(s, \frac{1}{2})$ has a discontinuity at $s=1$. Therefore $g(s, t)$ is not continuous.  This argument is definitely iffy to me, if no one has their own argument (using sufficiently low level concepts), then criticism on the above would be appreciated.


How can I handle the warning of file_get_contents() function in PHP?

I wrote a PHP code like this  $site="http://www.google.com"; $content = file_get_content($site); echo $content;   But when I remove "http://" from $site I get the following warning:     Warning:   file_get_contents(www.google.com)   [function.file-get-contents]: failed   to open stream:   I tried try and catch but it didn't work.


Real analysis MVT problem for twice differentiable function

Let $f$ be a twice continuously differentiable function, with $f (0) = f (1) = f'(0) = 0$. Then   $f''$ is the zero function.   $f''(0)$ is zero. $f''(x) = 0$ for some $x \in (0, 1)$. $f''$ never vanishes The question is which choice is correct in the above choices.I know 3 is correct.  I could not find counter example for 2.


Creating looping cloth animation for sprite

Helllo!  For a project that I am doing, I need to render the my model to a sprite sheet. This is all fine, except that the model has a cloak, which uses a cloth animation. I need to smoothly transition from the end of the cloth simulation to the start, so it doesn't just jerk back, but I can't find any way of doing this.  Thanks in advance.


Will GNOME 3.38 ever be in the official Ubuntu 20.04 repositories?

I know that GNOME 3.38 is a flagship feature of Ubuntu 20.10, but will we be able to install 3.38 on 20.04 so we don't have to give up the LTS status?


I would like the full label color back. I hate the small dots, I can't understand why apply more than one color tag in the same file. Where can I find the file that control this tags? I don't want install other program to control it, like xtrafinder or similar. Thanks!


How to put symbol around the equal sign?

In the question , there was an answer to how to place additional sign over the equal sign. And my question is, what if I also want to have some symbol/text under the equal sign? Or if I want to use \stackrel to label my equal sign that follows an tab alignment character (&=)?


As far as I know, dead as an adjective is simply the opposite of alive, or living. Which means that there is no element of level when describing a dead person. And yet I came across this phrases very dead too often when I hear the live game commentaries on Youtube. Plus, as I'm reading a book named A history of everyone who has ever lived, I see these sentences.     In a hole in the ground, a man lay extremely dead. He was either    left in this tomb by his family or perished right there, with no idea    that he was one of the more important people in millions of years.    What are these two phrases very dead and extremely dead supposed to mean?


Codomains and the definition of a function

A function $f$ is defined as a set of ordered pairs $(x, y)$ such that $(x,b), (x,c) \in f \Longrightarrow b=c$. Since $y$ is determined uniquely by $x$, it is customarily denoted $f(x)$.   One difficulty I am having with this definition is that it does not specify the codomain. In particular, $f:\mathbb{R} \rightarrow \mathbb{R}_{+}$  such that $f(x)=\exp(x)$ and $g:\mathbb{R} \rightarrow \mathbb{R}$ such that $g(x) = \exp(x)$ would be the same functions under this definition.   But this is absurd. One is bijective, the other is not.


Javascript issue with localstorage (value changing itself)

i'm currently trying to store data via localstorage on my website, and if for example I do so :   localStorage.setItem("vue",10206726906969851)   When I want to get the value back I get this result :   localStorage.getItem("vue") -> "10206726906969852"   So why does the value changes ? Thank you in advance for your help


ASUS UX31A - A required CD/DVD drive device driver is missing

I have a little issue with my ASUS UX31A. I just tried to do a clean install of Windows 7 64bit using a USB-Stick created using Rufus.  The laptop booted from the USB stick and opened the Windows installation, after a few clicks I got the message "A required CD/DVD drive device driver is missing. If you have a driver floppy disk, CD, DVD, or USB flash drive, please insert it now.".  I have tried literally every suggested trick (putting USB3 drivers on the stick, switching USB ports after error message...) but nothing works.  I have no idea how to proceed and would be happy for any helpful suggestions.


Proof of the identity $2^n = \sum\limits_{k=0}^n 2^{-k} \binom{n+k}{k}$

I just found this identity but without any proof, could you just give me an hint how I could prove it? $$2^n = \sum\limits_{k=0}^n 2^{-k} \cdot \binom{n+k}{k}$$  I know that $$2^n = \sum\limits_{k=0}^n \binom{n}{k}$$ but that didn't help me


Is there any actual written dialog for the astromech droids?

When R2-D2 and BB-8 converse in The Force Awakens for example, is there any written record of what the two characters were saying to each other?  I mean actual dialog, if it exists, and not something like ”BB-8 beeps excitedly”.


Why does AWS's Ubuntu AMI come with an "ubuntu" user instead of just allowing root login?

AWS's Ubuntu image gets bootstrapped with your credentials being added to a user called ubuntu. After the machine comes up, you can SSH into your new box with the ubuntu user.  This user is a sudoer, and based on the sudoers file, this user can do pretty much anything that root can, as long as you preface a command with sudo, without any password being entered. This negates  because there is no interactive password prompt. As far as I can tell, this also pretty much means that you should never run public-facing applications as this user, because if someone could find a way to execute shell commands via your application, they could take control of your system.  My real question is: why does this user exist? Why not just grant SSH access to the root account, with the expectations that someone would create unprivileged accounts to run an app? Doesn't having this ubuntu user just add confusion? I could see someone thinking "my systemd application isn't running as root, it's running as ubuntu, so I am safe".  Am I missing some purpose of this kind of user, which is not root, but is a passwordless sudoer?


Permutation of the grids:  If an Imaginary square shaped city has 9 horizontal streets and 16 vertical streets, A and B are the 2 diagonal points of the city, if I want to go from point A to point B, where all the streets which form this imaginary grid have distinct names, in how many ways can I walk from point A to B moving through different pathways? It is necessary to note that one has to choose the shortest paths, meaning that going opposite to the direction of destination is prohibited, However one is allowed all other freedoms like continuing on a horizontal or a vertical street till the edge of the grid city and so on and so forth.


I recently attended a talk on neutrinos, where the speaker said there are billions of neutrinos passes through our body every second, but in our lifetime the probability of alteast one neutrino interacting with our body is very low.  It is weakly interacting why? Is there any reason?


As a non-native speaker but a teacher of the English language I've come across the following question reading a pupil's report: Should she use the simple past or past perfect in her sentence?     Last week we came back from a class trip to New York. We planned (OR) had planned that trip half a year ago.   (meaning: half a year before NOW)   Although we teach that ago is a signal word for simple past, I would go for past perfect here, since the action of the second sentence clearly takes place before the first one and before the rest of what the report is about (the class trip itself).  How would a native speaker put it?


How can I install Ubuntu on my new desktop?

I am currently using a laptop and would like to keep my laptop running Windows 7. I want Ubuntu on my new desktop I just built because (at the moment) I don't have ~150 dollars to dish out for an OS. I don't have a disk drive, so I will be using USB. I know it involves burning a .ISO file to a USB , but I'm not sure how. Thanks!


What do these disk errors in syslog mean?

I just rebooted my monitoring server for the first time in a while, and the following starting filling the screen:  Jul 11 23:52:30 monit kernel: [   25.255908] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 Jul 11 23:52:30 monit kernel: [   25.256170] ata1.00: BMDMA stat 0x24 Jul 11 23:52:30 monit kernel: [   25.256278] ata1.00: failed command: READ DMA Jul 11 23:52:30 monit kernel: [   25.256410] ata1.00: cmd c8/00:c0:20:68:35/00:00:00:00:00/e0 tag 0 dma 98304 in Jul 11 23:52:30 monit kernel: [   25.256416]          res 51/40:9f:41:68:35/00:00:00:00:00/e0 Emask 0x9 (media error) Jul 11 23:52:30 monit kernel: [   25.256809] ata1.00: status: { DRDY ERR } Jul 11 23:52:30 monit kernel: [   25.256933] ata1.00: error: { UNC } Jul 11 23:52:30 monit kernel: [   25.304388] ata1.00: configured for UDMA/66 Jul 11 23:52:30 monit kernel: [   25.304430] ata1: EH complete  . . .   Jul 11 23:52:30 monit kernel: [   25.552451] sd 0:0:0:0: [sda] Unhandled sense code Jul 11 23:52:30 monit kernel: [   25.552462] sd 0:0:0:0: [sda]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Jul 11 23:52:30 monit kernel: [   25.552475] sd 0:0:0:0: [sda]  Sense Key : Medium Error [current] [descriptor] Jul 11 23:52:30 monit kernel: [   25.552490] Descriptor sense data with sense descriptors (in hex): Jul 11 23:52:30 monit kernel: [   25.552498]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00  Jul 11 23:52:30 monit kernel: [   25.552529]         00 35 68 41  Jul 11 23:52:30 monit kernel: [   25.552543] sd 0:0:0:0: [sda]  Add. Sense: Unrecovered read error - auto reallocate failed Jul 11 23:52:30 monit kernel: [   25.552559] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 35 68 20 00 00 c0 00 Jul 11 23:52:30 monit kernel: [   25.552587] end_request: I/O error, dev sda, sector 3500097 Jul 11 23:52:30 monit kernel: [   25.556607] ata1: EH complete   I already know I need to replace the HDD (Cost of Data > Cost of HDD), but I want to know for my own knowledge what's actually wrong with it.  Yes, our monitoring server has no RAID, just one HDD...  Don't look at me...


I frequently hear:     What am I doing wrong?   But shouldn't it be     What am I doing wrongly?   instead?  A quick ngram search reveals the latter is never used.  Why is there no -ly?  Isn't the former wrong?


Old calendar reminders continue to pop up on my iPhone 6

I have a fully updated iPhone 6. I continue to get old calendar reminders showing up on my iPhone. It routinely reminds me of a regular meeting that has been cancelled for two years in some cases.  I have gone into the Reminders app, but nothing shows there. None of these old meetings are on my calendar anymore.  How do I get rid of the old reminders?  Re:  The suspected dupe - As noted above, I have gone through the Reminders app. There is nothing there. The previous questions about reminders do not help me as they are not relevant.


What symmetry causes the Runge-Lenz vector to be conserved?

Noether's theorem relates symmetries to conserved quantities.  For a central potential $V \propto \frac{1}{r}$, the Laplace-Runge-Lenz vector is conserved.  What is the symmetry associated with the conservation of this vector?


From what I have been told, everything in mathematics has a definition and everything is based on the rules of logic. For example, whether or not .  My question is what the definition of a set is?   I have noticed that many other definitions start with a set and then something. A  with an operation, an equivalence relation is a set, a , even the  of other sets containing the empty set.  I understand that there is a whole area of mathematics (and philosophy?) that deals with . I have looked at a book about this and I understand next to nothing.  From what little I can get, it seems a sets are "anything" that satisfies the axioms of set theory. It isn't enough to just say that a set is any collection of elements because of various paradoxes. So is it, for example, a right definition to say that a set is anything that satisfies the ZFC list of axioms?


Can Mac OS X Messages support more than one apple id?

I have two Apple IDs, one for work and one personal. My iPhone's Messages settings are bound to my work id. When it receives messages, they pop up on my work computer pretty as you please.  I would like that to happen on my home computer too. If I open Messages > Preferences > Accounts on my home computer, I see my home Apple ID listed (along with AIM and Bonjour). I would like to add my work Apple ID as well.  When I click on +, I'm offered Google, Yahoo, Aol, and "other" as my choices. And under "other", the choices are "AIM", "Jabber", and "Yahoo"  I was able to add my work account under Settings > Accounts, but there doesn't seem to be a way to connect that to Messages.


Why there is time limitation/condition to accept our own answer?

When we ask any question and in some time span we got the answer somehow and now we don't need the answer of that question and I put the answer of that question for others help and click on submit answer it shows time restriction or we can say condition.  So my question is why there it is?


I want to transfer the following python code to javascript:  def conv_2c(val, bits):    return ((1 << bits)+val)    function conv_2c(val, bits){      return ((1 << bits)+val); }   In Python print(conv_2c(-944,64)) gives me 18446744073709550672 , while  in JS console.log(conv_2c(-944,64)); gives me -943 . Why is there a difference?? Is this something to worry about (do the numbers really differ?) or is it a thing of how Python or JS print negative/ two's complement numbers?


How is momentum conserved in this example?

Suppose a sticky substance is thrown at wall. The initial momentum of the wall and substance system is only due to velocity of the substance but the final momentum is 0. Why is momentum not conserved?


I know that First Order Logic is semi-decidable. However, if we work only with clauses is it correct to say that, due to the soundness and completeness of Resolution Principle, we achieved decidability ?


Unresolved External Symbol with Template Function Only When Used

I have been getting the :unresolved external symbol "public static int __cdecl Memory::Read (unsigned __int64,unsigned __int64_" for my declaration of a template function "Read"  It is defined in a class known as "memory" with the header file:   #ifndef MEMORY_H #define MEMORY_H  #include <string> #include "DataFuncs.h"  using namespace std;    class Memory {      public:         template <typename type>         static type Read(DWORD64 Address, SIZE_T size);         static bool Write(DWORD64 Address, uintptr_t Value, SIZE_T size);          };  #endif   Its .cpp definition is the following:  #include "Memory.h"  template <typename type> type Memory::Read(DWORD64 Address, SIZE_T size) {     return Data.Read<type>(Process_ID, Address, size); }  bool Memory::Write(DWORD64 Address, uintptr_t Value, SIZE_T size) {      if (Data.Write(Address, Value, size))         return true;     return false; }   The error does not occur until it is actually used in a different file. Its implementation is as follows:  #include "Memory.h" #include "Special_Functions.h"  __int32 Special_Functions::Test(){      __int32 x = Memory::Read<__int32>(0x20302, sizeof(__int32));     return x; }   If I take away the Memory::Read<__int32>(0x20302, sizeof(__int32)); line and just type return 53 then no compiling problems occur. Any idea why and how to fix it? Thanks!


$\pi(x)\geqslant\frac{\log x}{2\log2}$ for all $x\geqslant2.$

Let $\pi$ be the . Then     $\pi(x)\geqslant\log x/(2\log2)$ for all $x\geqslant2.$   Maybe I am missing something pretty evident, but, so far, I have proved that $\pi(x)\geqslant\log{\lfloor x\rfloor}/(2\log2)$ using a method Paul Erdős used to prove that there are infinitely many primes, however, I don't know how to prove the original inequality.  Any help is really appreciated!.


70s or 80s TV show, possibly post-apocalyptic with a massive train-like car

I seem to remember the intro to the show having the train-car traveling amongst some barren mountainous terrain.  I seem to remember that each section of the car-train had a different purpose, like the medical car, and the weapons car, etc. I don't think it ran for more than a season, possibly not even completing a full season. It was live-action. It was on US television, and I don't remember any accents, so I am guessing it was American.


Why my bottomsheetdialog interface is null

E/UncaughtException: java.lang.NullPointerException: Attempt to invoke interface method 'void mm.com..fragment.BottomSheetFragment$BottomSheetListener.onButtonClicked(java.lang.String)' on a null object reference                            at mm.com.blueplanet.videoclip.fragment.BottomSheetFragment$1.onClick(BottomSheetFragment.java:40)                            at android.view.View.performClick(View.java:5647)   This is RecycervieAdapter class  ((ItemViewHolder) holder).cmtText.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                 FragmentTransaction ft = ((DetailActivity) mContext).getSupportFragmentManager()                         .beginTransaction();                 BottomSheetFragment bottomsheet= new BottomSheetFragment();                 bottomsheet.show( ft, "BottomSheet");             }         });   This is bottomsheet  public class BottomSheetFragment extends BottomSheetDialogFragment {   Context mContext;   public BottomSheetListener mListener;    @Nullable   @Override   public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     View v = inflater.inflate(R.layout.custom_bottom_dialog, container, false);      mContext = getActivity();     ImageButton btn = (ImageButton) v.findViewById(R.id.cmt_btn);     final EditText edt = (EditText) v.findViewById(R.id.edt_cmt);       btn.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             mListener.onButtonClicked("" + edt.getText().toString());              dismiss();         }     });        return v;   }    public interface BottomSheetListener {     void onButtonClicked(String text);   }    @Override  public void onAttach(Context context) {     super.onAttach(context);     try {         mListener = (BottomSheetListener) mContext;     } catch (ClassCastException e) {         throw new ClassCastException(context.toString());     }   } }


Prove $\frac 1{x+1}<\ln\left(\frac{x+1}x\right)<0.5\left(\frac 1x+\frac 1{x+1}\right)$

I looking for help with proving the following inequality. Any relevant logarithmic identities would be great. Tried differentiating and taking limits and I'm lost as to how to approach this.   $$\frac 1{x+1}<\ln\left(\frac{x+1}x\right)<0.5\left(\frac 1x+\frac 1{x+1}\right)$$


How can i Prove that the gray area is the same as white area?

A circle is cut into 8 parts, each part has the angle 45 degrees from an arbitrary point. how to prove that the white area is the same as the Gray area?   I just want any hint for solving this question. how can I prove this?


I have 2 pcs with win xp and a wifi router ( without outgoing internet connection )...my job was to connect them over wifi to share some files. router was properly configured, both computers connected to wifi without problems, but when I tried to network them I could not see them in workgroup...i changed their names and added them to same workgroup but i couldn't connect pc1 to pc2 ( i could ping router from each pc but pinging other computer resulted in ping timeout) ..now i cant figure out why this is not working since I've done this before on more complex networks and it should work but...( maybe I have gremlins hiding somewhere..)    edit1: Firewall is down on both machines( I disengaged it in both control panel and in services) and folder sharing and permissions are ok.. edit2: I know about Ad Hoc network ( wlan-to-wlan, without router/switch ) but that's not what I am trying to accomplish here :)


Finding the value of $\sum_{n=1}^\infty\frac{n^2}{(n+1)(n+2)(n+3)(n+4)}$

Problem_     Find the value of $$\sum_{n=1}^\infty\frac{n^2}{(n+1)(n+2)(n+3)(n+4)}$$   It seems like I have to use the partial sum in order to get the exact value. But making it into the partial fractions was not that easy to me because of the numerator.  I tried to segregate the fraction by putting $A, B, C$ and $D$ as: $$\frac{n^2}{(n+1)(n+2)(n+3)(n+4)}={A\over n+1}+{B\over n+2}+{C\over n+3}+{D\over n+4}$$ By multiplying both hands with $(n+1)(n+2)(n+3)(n+4)$, I could get the values which are $A=1/6, B=-2, C=9/2$ and $D=-8/3$. Unfortunately, there were no significant properties among them.   I've also thought of dividing the numerator into two or more terms such as $$n^2=n(n+1) - n$$ However, this method also did not give me any hint to solve. Are there other ways to evaluate the series looks like that? Thank you for your interest.


Series which is in $\ell^p$ but not in $\ell^q$ for all $1\leq q<p$

Im looking for an element in $\ell^p$ which is not in $\ell^q$ for all $1\leq q<p$. Does anybody know such a series?


How to insure valuables in checked luggage?

This question was already asked here     ...but there were no satisfactory answers.   However that was from a few years ago.   Since that time we've had new restrictions put in on bringing laptop computers and cameras into the passenger cabin on flights from the ME to the US and UK, and there are heavy rumours that the US government is about to place such restrictions on all flights from Europe.  I travel for photography, so I routinely bring a pair of camera bodies (one for backup) and a bunch of lenses. (I also travel with a laptop)  I've always brought them on board as carry-on.    The total value of the gear I bring is typically $20K-30K, with maybe $6-10K of that my DSLR bodies.     The travel insurance companies I've contacted won't sell me anywhere near that much insurance for checked luggage.  What do people currently do traveling on routes from the ME to the US and UK, for example?


To get logs in between particular time-stamps using shell script


I'm trying to open the calculator app on my Windows 10 64 bit machine.  When I search for calc in the start menu and click it, I get an error      you'll need a new app to open this   I tried re-registering my windows ten apps by using this command  Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}   with a powershell running as administrator and the same issue still occurs.  How can I fix my calculator?


[Running Ubuntu Gnome 15.10]  I recently brought my computer from PST to EST in North America.  Once in EST my laptop did not update the timezone.  I tried toggling the "Auto Time Zone" switch which had no effect.  Finally, I rebooted the machine which also didn't have an effect.  Running /usr/lib/geoclue-2.0/demos/where-am-i doesn't return any result.


Remove duplicates from array and save it to another one

I have been tasked to make an array without duplicated values from another existing array. So I did it, but I want to know is there some other better way to do that. Example input/output Input: 1, 15, 1, 5, 1, 3 Output: 1, 15, 5, 3 My code #include <stdio.h>  int main(void) {   const int ARRAY_SIZE = 5;    int m[ARRAY_SIZE], p[ARRAY_SIZE];     for(int i = 0; i < ARRAY_SIZE; i++) {     printf("Enter number: ");     scanf("%d",&m[i]);   }   // k variable is used to be the new indexing of the array p;   int k = 0;    // if it has a duplication dup is changed to 1;   int dup = 0;      // Loops through the array.   for(int i =0; i < ARRAY_SIZE; i++) {     for(int j = i +1; j <ARRAY_SIZE ; j++) {         if(m[i] == m[j]) {             dup = 1;             break;         }     }     if(dup != 1) {       p[k++] = m[i];     }     dup = 0;   }    printf("The array without repeated values\n");    for(int i = 0; i < k; i++) {     printf("%d\n",p[i]);   }    return 0; }  I want some suggestions. Thanks in advance. :)


bash function cannot change the value of a local variable when called by $()

The following code works differently depending on which way Parse_Short_Switches() is called.  After calling the function 'Parse_Short_Switches' by using result=$(Parse_Short_Switches), the value of $error_flag is NOT set to -1 as I would expect.  After calling the function 'Parse_Short_Switches' by simply using Parse_Short_Switches, the the value of $error_flag is set to -1 as I would expect.  Any help would be greatly appreciated.  Thanks  #!/bin/bash  function Parse_Short_Switches() { echo "error_flag inside of the function= $error_flag" 1>&2 error_flag="-1" echo "blah blah ..." }  # --- MAIN --- error_flag="999" echo "error_flag= $error_flag" #result=$(Parse_Short_Switches) Parse_Short_Switches echo "error_flag= $error_flag"


I have a Hanlin V3+ e-book, unfortunately it crashes too often when reading mobi files, so I want to convert them first into pdf, and then read pdf on V3+. Is there any tool for converting mobi files to pdf files? Thanks.


Two divs bottom div to height adjust with browser window

I have a header div and a div underneath it. I need the div underneath the header div to adjust depending on the height of the browser window size.   In CSS, when I add height:100% it creates a scroll bar at the side of the page. When I adjust the percentage of the width, spacing at the bottom of the page constantly changes because it is done with percentages.   I would like the div below the header to always adjust with the window size in height with no spacing at the bottom.  How do I do this?  Here is the Fiddle   I am not sure why but in JSFiddle the bottom div is not extending height: 100%  here is the code: HTML
   Header

   Bottom Div
   CSS  .main { width:100%; height:60px; border: solid; }  .left { height: 100%; width: 300px; border:solid; }


Advanced statistics books recommendation

There are several threads on this site for book recommendations on  and  but I am looking for a text on advanced statistics including, in order of priority: maximum likelihood, generalized linear models, principal component analysis, non-linear models. I've tried  by A.C. Davison but frankly I had to put it down after 2 chapters. The text is encyclopedic in its coverage and mathematical treats but, as a practitioner, I like to approach subjects by understanding the intuition first, and then delve into the mathematical background.   These are some texts that I consider outstanding for their pedagogical value. I would like to find an equivalent for the more advanced subjects I mentioned.   , D. Freedman, R. Pisani, R. Purves. , R. Hyndman et al. , T. Z. Keith , Rand R. Wilcox , Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani , Hastie, Tibshirani and Friedman (2009)


How to post pictures with the mobile app?  I wanted to answer a question with a diagram on my mobile.  How should I do that?  I am currently on iPhone, using the Stack Exchange application.  If this feature is not present, I would like to request for it.


How do I remove "Ubuntu" in the bios boot menu? (UEFI)

See this   I have this on my Lenovo s205 too.   Is there some way to remove "ubuntu" from the menu? I don't even have it installed anymore.


Conserved Quantities And Lagrangian Mechanics

By Noether's Theorem we know that any conserved quantity can be associated with a continuous symmetry. I was reading Kepler's Problem and I saw that there can be conserved quantities like Laplace-Runge-Lenz vector which might not be obvious to figure out. So my questions are,   Are there any techniques to find all of the conserved quantities? How many conserved quantities can a system with $n$ degrees of freedom necessarily have?   Comments on the questions:   Suppose by observations I found some conserved quantities, how can I be sure that I have found all the conserved quantities?  Is there any necessary upper bound?


I understand the header file contains all the prototypes of every function contained in the implementation file; but what is the real purpose? Is it because when another program calls on the class, it only receives the information in the header file, and the implementation is kept hidden? What is the real purposes of this?


Query to find hierarchical relationship between objects

I want to execute a SQL query in PostgreSQL 10.6. I have two tables, A and B, that contain a common field, which contains a code. Each code has an inherited code and I want to build a hierarchical classification of these codes. TableA id | code --------- 1  | A 2  | B 3  | C 4  | D 5  | E  TableB id | code | origin | change_date -------------------------- 1  |  A   |   B    | 2020/01/01 2  |  B   |   C    | 2019/01/01 3  |  C   |   D    | 2018/01/01 4  |  D   |   E    | 2017/01/01  I want to get origin values for a defined code in a chronological order. For example with tableA.code = A : code A origin is B, code B origin is C, code C origin is D, code D origin is E In other words, for a code A : id | code | source ------------------------------ 1  | A    |  B -> C -> D -> E  I can write a basic query to find value(s) but how can I execute this query each time there is a result and with a dynamic variable for the where clause (= the result of my previous query) ? SELECT b.origin FROM tableB b JOIN tableA a USING (code) WHERE table a.code LIKE 'A'   SELECT b.origin FROM tableB b JOIN tableA a USING (code) WHERE table a.code LIKE 'B'   ...  I have seen examples with functions, DO, DECLARE, IF, LOOP, RETURN QUERY EXECUTE but I don't know what the best way to write this query.


Possible Duplicate:          According to many articles like , it says that windows is more vulnerable to virus. I recently installed wine on my Ubuntu to run some windows programs by sudo apt-get install wine It when I looked into the directory structure I got to know that the windows program regedit.exe has been installed along with other simple windows programs. As per my knowledge some of the windows viruses give network access to registry making windows vulnerable for attacks. I am worried that installing wine would make the system vulnerable. Is it so? Are there any solutions to this problem?


How to add features (attributes) from a CSV file without geometry to a polygon shapefile?

I would like to add attributes from a CSV file (that's one below )   to a polygon shapefile layer  (that's one)  in QGIS 2.10.   The problem is they have no corresponding fields which I could use for join.


What system monitoring tools are available?

I am looking for system monitoring tools which are GUI and CLI or web-based which include basic functions such as:   CPU Usage Ram Usage Swap Usage Disk Usage ( Space / I/O ) Heat Monitoring   I know there are many tools I can use, but I am looking for a single tool that has these basic functions.


Let $G$ be a group. The claim is that if $H = Z(G)$ (the center of $G$), then $Z(G/H) = 1$. I either have to prove or disprove the claim. My intuition says its false and I was thinking of using $G = Q_8$ (the quaternion group) as the counter example. Am I on the right track?


How to use pipes and stdin with commands that use - characters

I'm trying to curl a txt file and pipe it to pip.   Example:  curl -s URL | pip install -r -   It doesn't work beucase the last - is not the curl output as I'd expect. I often  have this issue with other commands too.  How to fix this with bash?


Designing backdrops at reduced file size

I'm designing some backdrops for a play using Illustrator, the printed dimensions are 18m x 11m.  What size should I make the document so that it looks clear but isn't a huge file size?


Visual Studio default implementation for GetHashCode():  class Animal {     public int Id { get; set; }      public override int GetHashCode()     {         return 2108858624 + Id.GetHashCode();     } }   Why "2108858624" is added to Id for GetHashCode compute?  Video: (Gif)


How do I drive a MOSFET when I have an 11.1v power-supply and an arduino

I am trying to use a irlb3034 as a switch to power an airsoft motor and control it with an arduino. I am using a diode between the source and the drain and a 2.2k resistor between the gate and the source. Do you have any idea how I can control the mosfet with the arduino? Many thanks, Thomas


how to grab data-value from li tag with jquery after ajax success

For grabbing a value from a li tag and putting into an input filed  i use the data-value. My list tags look like this:
grab value
   The js:  $(".set-value").click(function(){                   var s = this.dataset.value;                                 $(".set-input").val(s); });   My input field looks like this:  <input class="set-input" type="text" value="" />   When click on grab value it puts test in to the input.! That works  fine!  When i do submit the value, i use an ajax call. After the ajax call, all li tags are dynamically reloaded. Problem is: when i click again on test, sending the value to the input field does not work anymore. After a hard refresh, it DOES work again. I checked the following after the ajax:   jquery core file is still loaded the js is still in the DOM    So why it does not work anymore for the second time?


NullPointerException in Shortest Path Program

public static void computePaths(Vertex source) {     source.minDistance = 0.;     PriorityQueue<Vertex> vertexQueue = new PriorityQueue<Vertex>();     vertexQueue.add(source);      while (!vertexQueue.isEmpty())     {         Vertex u = vertexQueue.poll();          ///////////////////////////////         // This is where the error is happening         ///////////////////////////////         for (Edge e : u.adjacencies)         {             Vertex v = e.target;              double weight = e.weight;             double distanceThroughU = u.minDistance + weight;              if (distanceThroughU < v.minDistance)             {                 vertexQueue.remove(v);                 v.minDistance = distanceThroughU;                  v.previous = u;                  vertexQueue.add(v);             }         }     } }   I'm getting the Runtime Error  Exception in thread "main" java.lang.NullPointerException at Dijkstra.computePaths(Solution.java:69) at Solution.main(Solution.java:141)   The program works fine with hard-coded vertices and paths, however the problem is going to be tested through file input, so I'm assuming it has to do with when I am taking in those values, but I can't find anything that would cause that error.  below is from where I take in the values  for (int i = 0; i < plans; i++)     {         vs[i] = new Vertex(scan.next());         destinations[i] = new Vertex(scan.next());         weights[i] = scan.nextInt();         scan.nextLine();     }      for (int i = 0; i < plans; i++)     {         vs[i].adjacencies = new Edge[]         { new Edge(destinations[i], weights[i]) };      }      Vertex[] vertices = new Vertex[plans];      for (int i = 0; i < plans; i++)     {         vertices[i] = vs[i];     }      // starting vertice     String start = scan.next();     // ending vertice     String end = scan.next();      Dijkstra.computePaths(vs[0]);


I noticed that one of my answers was deleted by a moderator (without comment) and I never got any notice of the occurrence.    If we get notifications in our dashboard for things as small as single upvotes, it would nice to also be notified if answers we create are deleted, so we can respond to the occurrence (fix it up, etc.)


Why Zero divided by Zero is undefined and not Infinity

apologize in advance if this is a duplicate, but I found a lot questions related to this but none answering this specific question.  My logic is: let's consider division the opposite of multiplication. So if I have   x / y = z. then that means that  z * y = x  i understand that when y = 0 there can be so such z that would make the equation true for x if x is not zero. But if both x AND y = zero, then there is literally an infinite amount of numbers that can be z. e.g  1 * 0 = 0  2 * 0 = 0  3 * 0 = 0  4 * 0 = 0  So again, why is this undefined instead of infinity.   (s/n: after typing out this question i realize it may be my misconception of the true definition of infinity but alas I'm deciding to post this anyway)


Theoretical reasons for charge quantization

I'm aware of Millikan's oil drop experiment and I've read that quarks have fractional eletric charge, but I was wondering if there's any theoretical argument that makes us believe charge is quantized.  I've also read about Dirac's famous work in which he demonstrated that if a magnetic monopole exists then electric and magnetic charge have to be quantized.  But if it doesn't exist? Is there any other theoretical reason for the charge to be quantized or is that the only way we know?


If I have a list like this:  MyList = [1,2,3,4,5,'hi', 6,7, 'hi', 8, 'hi', 9]   how can I remove all the items 'hi' from the list? I have tried the method remove() but it works only once:   MyList.remove('hi') >>>> MyList [1,2,3,4,5,6,7,'hi',8,'hi',9]   Yes, I could do something like this:   while 'hi' in MyList:     MyList.remove('hi')   but does anyone know any more elegant way than iterating n-times the same instruction?


What characters are valid to use in filenames?

I seems like it is possible to create filenames in unix with just about any valid character.  touch \; && touch \\ && touch \" && touch $'\n' && touch $'\t' && touch $'\v' && touch $'\23' && touch $'\13' && echo "DONE!"   The only characters I have found that does not work are / and NUL:  touch / touch $'\0'   Are there any other characters that are invalid or impossible to use in filenames?


I bought a used bike but I hate its color and I want to repaint it. I saw some videos on youtube on that. However I found the stuff too expensive. I went to Amazon and I found a black matte paint spray for 5 euros and my idea is to clean the bike and then just spray the frame.  So my questions are:  1- What happens if I simply do that without removing the rust or removing the old painting? Wouldn't the new painting simply cover everything? Bascially the steps on youtube is to first remove the old painting and remove the rust and then spray a coat (I don't know what a coat is but I think it costs extra 7 euros for the bottle) and then spray with the black matter paint. So what is the effect of not following those steps and directly use the black matter spray? Because the youtube steps would cost me 24 euros or so.  2- The Crankset also lost its color, so I'm thinking to spray that too with the black matte. Is that wrong or bad in anyway?!  Here are the pics of my bike:        So yeah I actually want to spray all of that with simply the black matte spray paint that cost 5 euros because I'm a poor student. (I hope that wouldn't make it uglier!)


It seems as though, by the time of A New Hope Darth Vader's real identity was unknown by most people. Were Anakin and his alterations kept secret from everyone? Who knew who Darth Vader really was?  As far as I can tell these are the few:   Vader (of course) Obi-Wan Yoda Palpatine   I can't think of anyone else who specifically knows.  Who else knew, and was Vader's true identity (and past life as Anakin) kept secret?


Should I acknowledge the source of a problem in a math assignment?

For a math assignment that I am giving my students, I have included a problem from Spivak Calculus. I have the following two issues and I do not know what I should do:   If I do not acknowledge the source, it seems that I have committed plagiarism.  And if I acknowledge the source, then the students will go and perhaps find the solution manual and give the same solution as in the solution manual.   Can anyone please discuss what is the best thing to do in my case?


What kind of punctuation should be used here?

What type of punctuation should be used in the sentence "What is Stonehenge you might ask"?


Status link gets confused on migrated questions

I saw this on the ScienceFiction&Fantasy.SE homepage, and it made me cock my head; the link on questions that typically says "asked X minutes ago" or "modified Y minutes ago" or whatever, doesn't know what happened to this question.    Clicking into the question, it was originally asked on RPG.SE, and migrated to SFF.    There's another, similar case from much earlier; this one is missing both the "action" ("asked", "modified", etc.) and the user who performed the action:    This one was migrated from Movies&TV.SE, and asked by a user who doesn't have an SFF account to link:    Although I can't personally confirm it, one of the Mods on OpenSource.SE confirms that he sees this a lot when handling migrations on that site:     I deal with migration to and from Open Source frequently, being a moderator there, and I see this every time.


Add a reply to comment button or @ autocompletion when using Chrome on Android

Currently there is no comment button or @ autocompletion when writing a comment in reply to another comment on Stack Exchange for mobile Chrome  on Android. It would be a good time saver to have this feature.


I wanted to divide the integer and store it in an array  For Ex:1000000000000 into two indexes  arr[0]=1000000 arr[1]=000000  but arr[1] stores it as 0 instead of 0000000.  I wanted to perform some operations with it,so i needed 7 zeros in it ,instead of 1 zero.  Is it achievable in some way ?


How can I use asymmetric encryption, such as RSA, to encrypt an arbitrary length of plaintext?

RSA is not designed to be used on long blocks of plaintext like a block cipher, but I need to use it to send a large (encrypted) message.  How can I do this?


This may be obvious to some, but not to me. I am an IC design engineer, as such I rarely do any practical work.  This morning I had to fix some electronics which were custom made by a third party for my company. On removing the front panel I saw this gray box clipped to a bundle of wires (images below), I have no idea what it is or what it does. After 10 minutes of fruitless googling for "gray box clipped to wires" I find myself here asking this question. The inside looks like some type of metal or ceramic. I thought it might be magnetic but it is not.  So can anyone identify it and tell me what it does?  I fixed the problem, which was not related to the wiring.


Paper reflects all the lights of the spectrum so it looks white. But mirror also does that then why is not white?


VAADIN - User is able to login after logout

I've implemented a sample spring boot application with vaadin-flow. I implemented an in-memory authorization with two roles (User, Admin). When login at the first time the system ask for the credentials as expected. I requested "/my/logout" url to logout, After that I can still access restricted content without providing the user credentials (user login is not prompted).  Following is my web security config  http.csrf().disable().             authorizeRequests()             .anyRequest().authenticated()             .antMatchers("/VAADIN/**", "/PUSH/**", "/UIDL/**", "/login", "/login/**", "/error/**", "/accessDenied/**", "/vaadinServlet/**").permitAll()             .and().httpBasic()             .and().logout().logoutUrl("/my/logout")             .permitAll();


I was reading about the Rutherford atomic model which said that electrons revolve around the nucleus the way the Earth and other planets revolve around the sun.  This model was,however,shunned as it did not accommodate the fact that when charged particles accelerate,they emit radiation,lose energy and fall into the nucleus.This does not happen in the case of the earth as it is electrically neutral.  But it does comprise  charges.   So why don't the individual charges emit radiation ?  What difference does it make if the charges are moving alone or in vicinity of other charges?  How can charges differentiate if they are moving with or without charges?(Which would lead them to either emit or not emit radiation)  P.S- A simple answer would be appreciated as I am not familiar with Maxwell's theory of EM radiation.


Expected result of vertical Michelson-Morley Experiment

What would the result of a vertical variation of the Michelson-Morley experiment be?  I.e., if one were to compare light traveling along a horizontal arm with light traveling along a vertical arm (perpendicular to the surface of the Earth), what would the result be?  My understanding is that light traveling along each arm will both travel at c and consequently the result of such a variation of the experiment will be exactly as all of the previous (fully horizontal) versions of the experiment.  Namely, that there is no directional dependence in the speed of light.  Is this understanding correct?


Is there a rule of integration that corresponds to the quotient rule?

When teaching the integration method of u-substitution, I like to emphasize its connection with the chain rule of integration. Likewise, the intimate connection between the product rule of derivatives and the method of integration by parts comes up in discussion.      Is there an analogous rule of integration for the quotient rule?     Of course, if you spot an integral of the form $\int \left (\frac{f(x)}{g(x)} \right )' = \int \frac{g(x) \cdot f(x)' - f(x) \cdot g(x)'}{\left [ g(x)\right ]^2 }$, then the antiderivative is obvious. But is there another form/manipulation/"trick"?


If $\gcd(n,a)=1$, and $\gcd(n,b)=1$ prove $\gcd(n,ab)=1$

If $\gcd(n,a)=1$, and $\gcd(n,b)=1$, prove $\gcd(n,ab)=1$


Meaning of the phrase "dipole moment of the combination"

Here is a question I came across in a book:      Three point charges $-q$,$-q$ and $2q$ are placed on the vertices of an equilateral triangle of side length $d$ units.What is the dipole moment of the combination?   I had learnt that the dipole moment is defined for 2 point charges only with equal magnitudes but opposite character.I am in a bit of a fix regarding what the author means by that phrase in bold.Thank you in advance!  Edit:I just noticed theoretical physics has been merged here;I sincerely apologise if the question is unbearably stupid.


We submitted for security review yesterday,and they have sent a mail saying few reports are not being uploaded like ZAP and also few Composite piece(s) of your application was not accessible  What does that composite pieces mean?We have uploaded a document of credentials and components along with endpoint URL of our web service and their authentication credentials.we have also uploaded a PPT about our product along with that..what does that composite pieces refer to actually?  ZAP Scanner Clarification to submit for security Review??: Since our product involves web services,when trying to scan our Endpoint URL alone directly in ZAP.It says Handshake failure??How are we supposed to resolve that??


Schengen visa refused as a security and health threat

I am from Pakistan and I travelled to the Schengen area two times in 2015 on business. The visa was issued by the Embassy of Hungary.   When I applied again in 2017, for the same business trip, the Hungarian Embassy refused and give reason nunber 6.         One or more member state(s) consider you to be a threat to public policy, internal security, public health as defined in Article 2(19) of Regulation (EC) No 562/2006 (Schengen Borders Code) or the international relations of one or more of the member states).      After that, I travelled two times to Turkey and I also have Turkish temporary residence permit.   Can I apply to Italy for a Schengen tourist visa? Does the earlier reason for refusal have an affect on this application? If I wanted to apply for a transit visa would it be approved or refused?


Use of different fonts such as malayalam,hindi etc in a website

I am new to PHP. I am developing a news website in different languages.I am using ML-TTKarthika font for malayalam. My problem is that this font is not supported in all browers (Chrome,Opera). How I solve this problem. In my site Hindi,Tamil fonts are also needed. Please  anyone give me an answer..Thanks in advance.


Weird null pointer exception when trying to access a StackPane JAVA

I am receiving a null pointer exception and I am not sure why. I have this function that is called when a button is pressed:  @FXML private void handlePlayButton(ActionEvent e) {      for(Node child:getCenterPaneUndirectedNonWeightedGraph().getChildren()) {         if(child instanceof StackPane) {             StackPane vertex = (StackPane) child;             System.out.println(vertex == null);             bfs.fillVertexTransition(vertex);         }     }  }   My print statement 'System.out.println(vertex == null);' prints false.  I get the null pointer exception at the line:  bfs.fillVertexTransition(vertex);   The method 'fillVertexTransition' is defined by:  public void fillVertexTransition(StackPane vertex) {     Circle circle = (Circle) vertex.getChildren().get(0);      FillTransition ft = new FillTransition(Duration.millis(3000), circle, Color.RED, Color.BLUE);     ft.play();  }     In my application the StackPanes are circles with a label on top of the circle.  Any way I can fix this?  Thank you.


I can't believe I missed this three times. I went back to the beginning of AoT in episode 1 and noticed these scenes that occurred at the beginning of the episode. Eren is having some type of daydream or nightmare before waking suddenly with Mikasa leaning over him. Here are the still shots of it.                 What exactly were these visions? Were they some type of compressed/hidden memories? What was the farm house we saw? I am also pretty sure this wasn't in the anime but manga answers are welcome also. ;)  Note: I couldn't find a video link to give but there is a animated GIF version of it that I made . Also helpful but it is quite easy to see the scene if you want to since it occurs straight after the opening of AoT in episode 1.


How can I best independently study physical cosmology?

My background : I'm currently in my junior year in college majoring in astrophysics. I have taken GR, and some intro cosmology here and there, but nothing in great depth.   I had my heart set on taking a full physical cosmology class this spring. As luck would have it, I can't take the physical cosmology class due to scheduling conflict ! I intend to proceed to graduate school in astrophysics, so I would have to take the graduate level cosmology then, but in the mean time, I was thinking of teaching myself undergrad cosmology out of Barbara Ryden's book.   My question is : any advise for undergrads teaching themselves this subject matter ? Are there any "go to" resources? is Ryden a good choice?


Why, with Springer's  svmono template, do the letters written with the \mathcal font change? It seems that \mathcal becomes \mathscr.  Edit: Look at this image:    With the svmono template \mathcal returns the first alphabet and not the (classical) latter.  Here the packages I use in my document:  \documentclass[envcountsame,envcountchap]{svmono}  \usepackage{subfiles} \usepackage[utf8]{inputenc}  \usepackage{mathptmx} \usepackage[bottom]{footmisc} \usepackage{microtype} \usepackage{stmaryrd}    \usepackage{amsmath} \usepackage{courier} \usepackage{mathrsfs}  \usepackage{amssymb}  \usepackage[all,cmtip]{xy} \usepackage{faktor} \usepackage{graphicx} \usepackage{mathdots} \usepackage[colorlinks={true},linkcolor={blue},citecolor={blue}]{hyperref} \usepackage[frame,width=15truecm,height=23.5truecm,center]{crop}   With this settings I have the above strange behavior of \mathcal.


Number of solns of $x^6+x=a$ in $\mathbb{F}_{2^m}$, where $m\geq 3$ is odd is same as number of solns of $x^2+ax+1=0$

I am reading a proof that narrows down to the following statement:      It is easy to see that the number of solutions of $x^6+x=a$ in $\mathbb{F}_{2^m}$, where $a\in \mathbb{F}_{2^m}$ and $m\geq 3$ is odd, is same as number of solutions of $x^2+ax+1=0$ in $\mathbb{F}_{2^m}$.   Why is this true? They say that $x^7=1$ for $x \neq 0$, which I also don't see. Thank you!


CSS change body background-color on button hover?

For my Website, I have a set background-color of the body, for example  body { background-color: #FFFFFF; }   I also have a button defined in the .html-File (Let's say it has the ID "button1"), and I want the Background-Color of the body to change (to for example #000000;) when the button is beeing hovered over with a mouse and change back when the mouse isnt on the button anymore. Is there a way to do this?  I am a new webdeveloper and am still looking at/learning JavaScript.


Generalized Least Squares vs Ordinary Least Squares under a special case

This question regards the problem of . Vectors and matrices will be denoted in bold.  Premises. Let $N,K$ be given integers, with $K \gg N > 1$. The transpose of matrix $\mathbf{A}$ will be denoted with $\mathbf{A}^T$. Suppose the following statistical model holds $$ (*) \quad \mathbf{y} = \mathbf{Hx + n}, \quad \mathbf{n} \sim \mathcal{N}_{K}(\mathbf{0}, \mathbf{C})  $$ where $\mathbf{y} \in \mathbb{R}^{K \times 1}$ are the observables, $\mathbf{H} \in \mathbb{R}^{K \times N}$ is a known full-rank matrix, $\mathbf{x} \in \mathbb{R}^{N \times 1}$ is a deterministic vector of unknown parameters (which we want to estimate) and finally $\mathbf{n} \in \mathbb{R}^{K \times 1}$ is a disturbance vector (noise) with a known (positive definite) covariance matrix $\mathbf{C} \in \mathbb{R}^{K \times K}$. The  (ML) estimate of $\mathbf{x}$, denoted with $\hat{\mathbf{x}}_{ML}$, is given by $$ (1) \quad \hat{\mathbf{x}}_{ML} = (\mathbf{H}^T \mathbf{C^{-1}} \mathbf{H})^{-1} \mathbf{H}^T \mathbf{C}^{-1} \mathbf{y} $$ and this is also the standard formula of Generalized Linear Least Squares (GLLS). Consider the standard formula of Ordinary Least Squares (OLS) for a linear model, i.e. $$ (2) \quad \hat{\mathbf{x}}_{OLS} = (\mathbf{H}^T \mathbf{H})^{-1} \mathbf{H}^T \mathbf{y} $$ As a final note on notation, $\mathbf{I}_K$ is the $K \times K$ identity matrix and $\mathbf{O}$ is a matrix of all zeros (with appropriate dimensions). Now, for the problem at hand, assume that $\mathbf{C}^{-1} = \mathbf{I}_K + \mathbf{X}$, where $\mathbf{X} \in \mathbb{R}^{K \times K}$ is a symmetric, invertible matrix (and, for the formalism to make sense, $\mathbf{X}$ is such that $\mathbf{I}_K + \mathbf{X}$ is invertible and the inverse is positive definite). In this case, it can be proven (using matrix inversion lemma) that $$ (3) \quad (\mathbf{H}^T \mathbf{C^{-1}} \mathbf{H})^{-1} \mathbf{H}^T \mathbf{C}^{-1} = (\mathbf{H}^T \mathbf{H})^{-1} \mathbf{H}^T + \mathbf{Q} $$ where the expression for the matrix $\mathbf{Q} \in \mathbb{R}^{N \times K}$ can be found (I will omit it here). Now, finally,  Proposition 1. If $\mathbf{H}^T\mathbf{X} = \mathbf{O}_{N,K}$, then equation $(1)$ degenerates in equation $(2)$, i.e., there exists no difference between GLLS and OLS.  The proof is straigthforward and is valid even if $\mathbf{X}$ is singular. Now, my question is  Question: Can an equation similar to eq. $(3)$ (which "separates" an OLS-term from a second term) be written when $\mathbf{X}$ is a singular matrix?  I am not interested in a closed-form of $\mathbf{Q}$ when $\mathbf{X}$ is singular. But I do am interested in understanding the concept beyond that expression: what is the actual role of $\mathbf{Q}$? In which space does it operate?  I found this problem during a numerical implementation where both OLS and GLLS performed roughly the same (the actual model is $(*)$), and I cannot understand why OLS is not strictly sub-optimal. I found this slightly counter-intuitive, since you know a lot more in GLLS (you know $\mathbf{C}$ and make full use of it, why OLS does not), but this is somehow "useless" if some conditions are met. What are these conditions?  As a final note, I am rather new to the world of Least Squares, since I generally work within a ML-framework (or MMSE in other cases) and never studied the deep aspects of GLLS vs OLS, since, in my case, they are just intermediate steps during the derivation of MLE for a given problem.  If the question is, in your opinion, a bit too broad, or if there is something I am missing, could you please point me in the right direction by giving me references? Preferably well-known books written in standard notation.


Prove that between every two rational numbers a/b and c/d that there is a rational number and there are an infinite number of rational numbers

So the full problem is  Prove that between every two rational numbers $a/b$ and $c/d$ that:  There is a rational number There are an infinite number of rational numbers   I am having some trouble on which approach I should use, but I tried to solve part 1. Part 1) So I believe I proved that between every two rational numbers $a/b$ and $c/d$ that there is a rational number I have my base case as $a,b,c,d$ all being integers. My solution: For some number $x$, $$ x = \frac{\dfrac a b + \dfrac c d}{2} = \frac{ \dfrac{ad}{bd} + \dfrac{cb}{bd}} 2 = \frac{ \dfrac{ad + cb}{bd} } 2 = \frac{ad + cb}{2bd} $$ I concluded that ad + cb must be an integers because addition/subtraction of integers leads to an integer. Same case for $2db$. Not sure if this is correct though Part 2) Prove that there are an infinite number of rational numbers I am confused onto how to solve this part, where to start, and how to use the answer from part 1 into this problem. I've been toiling over this, so your input is greatly appreciated. :)


Installing Ubuntu 13.04 on Samsung Chromebook 550

Is it possible to install Ubuntu 13.04 and later releases on a Chromebook 550 like you would on a Windows laptop etc? I'm thinking of getting one of these Chromebooks to do this and run it alongside Chrome OS or maybe replacing Chrome OS. Thanks all!


How to add any plugin to ckeditor manually?

I'm trying to add a new plugin ckwebspeech in ckeditor module. Here is the  which I want to add.    So, that the final editor will look like mentioned in screenshot. Is there any way to add this manually?


I want to install Windows 10 because I want to play some games and on Ubuntu is not that playable so I downloaded a iso file from Microsoft page and now I don't know how to install! I mounted the iso file and ran Setup.exe but it says      Windows installation cannot be started from the current operating   system. To install Windows, boot from the installation media, or   upgrade from a supported operating system and restart the   installation.   Is there any other way to boot Windows 10 iso from Ubuntu?


Installing pure android to Huawei Ascend P6

Is it possible to install pure (not manufacturer modified, without Emotion UI) Android version (4.2 to 4.4) to Huawei Ascend P6? If above is possible, is it possible to recover original Huawei Android version (with Emotion UI)?


Find the number of 2's between 0 and n?  The way I thought is to count how many 2's are there of length k(number of digits in n).  This is similar to find all permutation of digit[0-9] of length k that have at least one 2 in it.  Is there a better way to do this?


Arxiv status from 'on hold' to 'submitted'

I submitted a paper to arxiv. At first, the status was submitted, then it became on hold for one week and now the status again became submitted. What does this mean?


NOTE: These triangles are being generated en masse so moving the labels manually is not an option.  New to Tikz, trying to label angles of a triangle but am getting some strange (seemingly) inconsistent formatting problems. For example, my latex for one triangle looks like this  \documentclass{article} \usepackage{gensymb} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture}[thick] \coordinate (A) at (0,0); \coordinate (B) at (2,3); \coordinate (C) at (4,0); \draw (A)--(B)--(C)--cycle; \tkzLabelPoints[left=2pt](A) \tkzLabelPoints[above=2pt](B) \tkzLabelPoints[right=2pt](C) \tkzLabelSegment[above=2pt](B,C){\textit{3}} \tkzLabelSegment[above=2pt](A,B){\textit{3}} \tkzMarkAngle[size=1.5cm,opacity=.4,color=red,line width=3pt](C,A,B) \tkzMarkAngle[size=1.5cm,opacity=.4,color=red,line width=3pt](B,C,A) \tkzLabelAngle[size=0.8cm](C,A,B){$x$} \tkzLabelAngle[size=0.8cm](B,C,A){56\degree} \end{tikzpicture} \end{document}   and generates the following triangle     However, another triangle with the following latex  \documentclass{article} \usepackage{gensymb} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture}[thick] \coordinate (A) at (0,0); \coordinate (B) at (3,7); \coordinate (C) at (6,3); \draw (A)--(B)--(C)--cycle; \tkzLabelPoints[left=2pt](A) \tkzLabelPoints[above=2pt](B) \tkzLabelPoints[right=2pt](C) \tkzLabelSegment[above=2pt](B,C){\textit{3}} \tkzLabelSegment[above=2pt](A,B){\textit{4}} \tkzMarkAngle[size=2cm,opacity=.4,color=red,line width=3pt](C,A,B) \tkzMarkAngle[size=2cm,opacity=.4,color=red,line width=3pt](B,C,A) \tkzLabelAngle[size=0.8cm](C,A,B){$x$} \tkzLabelAngle[size=0.8cm](B,C,A){83\degree} \end{tikzpicture} \end{document}   looks like this    with the 83 outside of the angle. Is there a way I can force the label to be inside the angle? Why does this happen for seemingly no reason?


Why are network interfaces not in /dev like other devices?

I'm mostly curious, but why aren't network interfaces in /dev? Are there any other kinds of devices that aren't represented as a node under /dev?


It is ethical and common that a professor ask the student to write their own recommendation letter?

I am in a unique situation. My supervisor and two other professors I approached for recommendation letter have asked me to write the my own recommendation letter and they will sign it.  Is it ethical and common practice?  How can I handle this situation? I already requested three of them multiple times, but always received same response that they are busy and will sign the letter which I sent them.


Prove that either $(2^{10500} + 15)$ or $(2^{10500} + 16)$ is not a perfect square.  how should I solve this problem? what is the idea for solving this kind of problems?  Thank you so much


If a human is stranded with beer but no water, should they drink it?

TL;DR: At what percent (if any) will alcohol dehydrate you more/faster than drinking nothing?  Let's contrive a situation for dramatic effect...  A human goes out on a boat for a nice sail in the sea. But oh, the sea was angry that day, my friends. The weather turns, and the sailboat is tossed asunder. Luckily, our survivor grabs hold of some debris and is washed onto a deserted island.   Lo and behold, the debris that floated with the survivor to the island is a cooler, and it is filled with beer! There are no other food or water sources on the island. What should our survivor do in regards to the beer to stay alive for as long as possible?  The crux of the situation and my question: will drinking the beer help hydrate the human, keeping them alive longer? Or would the effect of the alcohol as a diuretic actually dehydrate them, causing an earlier demise?  Details and follow up questions: Let's assume this is an average beer ~4% alcohol. However, I know there must be a breaking point. Some kombucha or ginger beer with .5% alcohol should surely be imbibed. But should this beer still be drunk? What if instead it was a 7% IPA? Or a 14% quadruple IPA like I have in my fridge? What about wine, whiskey, or gin?  How would the situation change for a caffeinated beverage like coffee? Or what if the cooler was filled with energy drinks?  I look forward to your answers!  EDIT: The linked question, while similar, does not answer my question. It links to one 1996 study that talks about the effect of alcohol on rehydration, but not the specifics of yes, probably ok to drink at about this percent ABV, and no don't drink at above this percent. It also doesn't discuss rate of intake, changes based on body weight, etc. which are all things I would surmise have an impact on this. I understand there isn't going to be a hard and fast STOP percent level, but I would like to understand more about the underlying mechanisms and factors that change things.


"...[b]etween rich and poor" and "...[b]etween the rich and the poor"

My colleague and I were discussing a student's paper.      We agreed that according to our experiences and knowledge of English, the following sentence is grammatically correct: "The difference between the rich and the poor in our city stems from..."     But, another colleague claimed that it would be acceptable to say, "The difference between rich and poor in our city stems from..."     While searching for examples of each, we found ourselves befuddled.  Why are both versions seemingly acceptable?


Strange warning about operation may be undefined for var++

I am new to C but I'm currently working on a project and I am hitting a strange problem.   I have the following piece of code:  int insertID = 0; asprintf(&inboundSql, "INSERT INTO DataTable VALUES (%i, %i, '%s', '%s', %i),"         "(%i, %i, '%s', '%s', %i), (%i, %i, '%s', '%s', %i), (%i, %i, '%s', '%s', %i),"         "(%i, %i, '%s', '%s', %i), (%i, %i, '%s', '%s', %i)",         dataRow, D_DATE, callLogSearchData[dataRow].date, epochBuffer, insertID++,         dataRow, D_TIME, callLogSearchData[dataRow].time, epochBuffer, insertID++,         dataRow, D_APARTY, callLogSearchData[dataRow].aParty, epochBuffer, insertID++,         dataRow, D_BPARTY, callLogSearchData[dataRow].bParty, epochBuffer, insertID++,         dataRow, D_DURATION, durationBuffer, epochBuffer, insertID++,         dataRow, D_RESULT, callLogSearchData[dataRow].cleardownCause, epochBuffer, insertID++);   When I compile the code, I get the following:  warning: operation on insertID may be undefined  Even though I get the above warning, my code is working as expected so I don't understand what the problem is. I guess it thinks there's something wrong with doing insertID++ but I can't see why that should be a problem.   Thanks for your help.


I have two desktops (one of which I'm using as a server), my main machine has a weaker i5 cpu, my server has a stronger i7 cpu. On my main machine I am experiencing stutters because the CPU often runs at full load under regular use (strangely, I also use upwards of 10GB of RAM, no joke... The heaviest program I'm running is google chrome).  I was wondering if there was any possible way to share a cpu from one machine over network to another machine as an emulated processor, which could be used by the client machine in a similar sort of fashion as virtual machines use or "borrow" their host's cpu.  This way I could offload work onto the server's cpu when the main cpu is under full load to prevent annoyances like stutter, and possibly combine both of them for more intense tasks (like decryption, compilation, archiving or other multithreaded stuff)  Does this sort of software exist, or has anyone at least tried to make it? If not, is it feasible?  (This sort of program would also ideally be able to offload data onto the server's RAM for faster processing, since the now common gigabit connections get to have nearly the same speeds as a standard HDD this doesn't sound far fetched either)  To reiterate, what I am primarily looking for is the ability to offload work from a system's main cpu when it is under too much load and forwarding it to another computer's cpu over network.


How to bulk rename files to add modification date?

I have these files, which were modified today and yesterday, respectively:  a.txt b.png   And I want them renamed to:  2020-02-01.a.txt 2020-01-31.b.png   How to do that in a single Bash command?