Testing large dataset for normality - how and is it reliable?

I'm examining a part of my dataset containing 46840 double values ranging from 1 to 1690 grouped in two groups. In order to analyze the differences between these groups I started by examining the distribution of the values in order to pick the right test.  Following a guide on testing for normality, I did a qqplot, histogram & boxplot.       This doesn't seem to be a normal distribution. Since the guide states somewhat correctly that a purely graphical examination isn't sufficient I also want to test the distribution for normality.   Considering the size of the dataset and the limitation of the shapiro-wilks test in R , how should the given distribution be tested for normality and considering the size of the dataset, is this even reliable? ()  Edit:  The limitation of the Shapiro-Wilk test I'm referring to is that the dataset to be tested is limited to 5000 points.  To cite  concerning this topic:     An additional issue with the Shapiro-Wilk's test is that when you feed   it more data, the chances of the null hypothesis being rejected   becomes larger. So what happens is that for large amounts of data even   very small deviations from normality can be detected, leading to   rejection of the null hypothesis event hough for practical purposes   the data is more than normal enough.      [...] Luckily shapiro.test protects the user from the above described   effect by limiting the data size to 5000.   As to why I am testing for normal distribution in the first place:  Some hypothesis tests assume normal distribution of the data. I want to know whether or not I can use these tests.


In most scripts (but mainly bash) it's commonplace to see some arguments that are configured like so:  bash-4.3:$ command --longer-argument -la  Where did this originate from? I'm mainly just curious as to why this became effectively a unanimous standard. Is it mainly for readability?  Also, why not use something like  bash-4.3:$ command -longer-argument, where all CLI arguments are specified by only one dash?


I tried to run a Java Applet in my new computer, but I need to install the Java runtime environment, the Terminal window says:    jan@ideapad-100-15IBY:~/Bureaublad$ java -jar pressin.jar   Het programma ‘java’ kan gevonden worden in de volgende pakketten:     * default-jre     * gcj-5-jre-headless     * openjdk-8-jre-headless     * gcj-4.8-jre-headless     * gcj-4.9-jre-headless     * openjdk-9-jre-headless    Probeer: sudo apt install <geselecteerd pakket>     My question is: which of these options should I use, what are the differences? And what is the meaning of "headless" ?


Proof that the set of subsequential limits is closed

I have tried to prove the following result, but it looks a bit messy in my opinion. How can it be improved?     Proposition. Let $a_n$ be a bounded sequence with values in $\mathbf{R}$.   Let $A=\{l\in\mathbf{R} \mid \text{ there exists a subsequence of $a_n$ >converging to }l\}$. Then $A$ is closed.   Lemma: For each subsequence of $a_n$ which converges to $l$ it is true that $\forall {\varepsilon}>0$ $a_n\in B(l,{\varepsilon})$ for arbitrarily large $n$ -- that is, for each $m\in\mathbf{N} \; \exists M\geq m \mid a_M\in B(l,{\varepsilon})$.  Let $a_{k_n}$\,be such a subsequence. By definition, for each $\varepsilon>0 \; \exists N$ such that $\forall n\ge N \; a_{k_n}\in B(l,\varepsilon)$. Let $m\in\mathbf{N}$. Then $k_m\ge m$, since $a_{k_n}$ is a subsequence of $a_n$.   if $m\ge N$, take $M:=k_m$; if $m<N$, take $M:=k_N$.   Proof. Let $x$ be a closure point of $A$. By definition, $\forall \varepsilon>0 \; B(x,\varepsilon)\cap A\neq\varnothing$, which means that $\forall \varepsilon>0$ there exists a subsequence $a_{k_n}$ which converges to ${l}_\varepsilon\in B(x,\varepsilon)$.  This means in particular that for all $m\in\mathbf{N}$ there exists a subsequence $a_{k^{(m)}_n}$ that converges to $l_m\in B(x,1/2^{m+1})$ .  Define the sequence $x_n$ inductively:   $x_0=0$; $x_n=\min\{m>x_{n-1} \mid a_m \in B(l_m,1/2^{m+1}) \}$.    The sequence is well-defined, because there exists a subsequence converging to $l_m$, and by the lemma there are infinite indices for which the sequence lies in the neighborhood. So the set is not empty and by well-ordering there exists a minimum element.  It follows that for each $n\in\mathbf{N}$ $$x-1/2^{m}<l_m-1/2^{m+1}<a_{x_n}<l_m+1/2^{m+1}<x+1/2^{m},$$  so by squeeze theorem (strict inequalities imply non-strict inequalities) $a_{x_n}\to x$.


Books for particle physics and the Standard Model

I know classical physics, quantum mechanics, special relativity, and basic nuclear physics. I would like to get into some particle physics.   Where can I find a good introduction? It might be useful to segment books by whether they require quantum field theory or not.


Proving the number of even and odd permutations of a subgroup $H<S_{n}$ are equal, provided $H$ is not contained in $A_{n}$

Let $H<S_{n}$ and suppose $H$ is not contained in $A_{n}$. Write $H$ as $$H=E\cup O$$ where $E$ and $O$ represent the sets of even and odd elements, respectively. Let $E=\{{\alpha_1,...,\alpha_n}\}$ and $O=\{{\beta_1,...,\beta_m}\}$. Since $O$ is non-empty, it contains at least one element, say $\beta_1$. The same goes for $E$ because $e\in E$. Our goal is to prove $m=n$. The products $\beta_1\alpha_i$, $i=1,...n$, are all distinct elements in $O$, and it follows that $O$ has at least $n$ elements, i.e. $m\geq n$. In the case of strict inequality, $m>n$, add at least one extra odd element ($\beta_{n+1}$) to the list $$\beta_1\alpha_1,...,\beta_1\alpha_n,\beta_{n+1}$$  This is where I find myself stuck. Any help appreciated. Can this route work?


In what cases do I use malloc and/or new?

I see in C++ there are multiple ways to allocate and free data and I understand that when you call malloc you should call free and when you use the new operator you should pair with delete and it is a mistake to mix the two (e.g. Calling free() on something that was created with the new operator), but I'm not clear on when I should use malloc/ free and when I should use new/ delete in my real world programs.  If you're a C++ expert, please let me know any rules of thumb or conventions you follow in this regard.


Should I buy a Canon 55-250mm lens or 70-300mm for my Rebel T3i? I have the basic 18-55mm lens that came with my camera but I need a next step up that's not too expensive.   What are the most common types of photos shot with either lenses? Or what is each lens best for?


If $A$ and $B$ are connected, then $A\cup B$ is connected

I'm having some trouble solving the following exercise:  Let $A$ and $B$ be connected subspaces of a topological space $(X,\tau)$. If $A\cap B \neq \emptyset$, prove that the subspace $A\cup B$ is connected.  I was trying to do a proof be contradiction. I assumed that : $\exists D,F \in \tau_{A\cup B}: D\cap F = \emptyset \wedge D\cup F = A \cup B$. Because $D,F \in \tau_{A\cup B }$, then $\exists D',F'\in \tau: D = D' \cap (A\cup B) \wedge F=F' \cap (A\cup B)$, But I don't know how to proceed from now on. How can I proceed with my proof?


create an array of dates in bash scripts and match it with current date

Actually i want to create an array of dates and compare it to the today date if it match with the current date then execute test.sh file otherwise exit the loop in bash script. I did like this...  **#!/bin/bash**  cd /home/user1  current_date=$(date +%Y-%m-%d)  array=['2016-03-02','2016-03-010','2016-05-10']  for i in "${array[@]}" do      if [ $now -eq $i ]; then          echo "executing your bash script file"          ./myscript.sh      fi  done   when i execute above script then it gives error like ./sample.sh: line 6: [: 2016-03-02: integer expression expected


I do not want my text messages to sync between two iPhones

My text messages are also appearing on my husband's iPhone.  How do I get them to not sync?


Installed Ubuntu now i cant get to BIOS menu

I changed to Ubuntu ,started computer pressed F2 got to BIOS and installed from a USB, but i have been getting to many problems with this, i now have a USB with Windows but now hen i press F2 when starting the computer it does not go to the BIOS menu, i just want to know how to get to the BIOS menu, and why would this happen? I am using Ubuntu 19.04


Should operator<< be implemented as a friend or as a member function?

That's basically the question, is there a "right" way to implement operator<< ? Reading  I can see that something like:  friend bool operator<<(obj const& lhs, obj const& rhs);   is preferred to something like   ostream& operator<<(obj const& rhs);   But I can't quite see why should I use one or the other.  My personal case is:  friend ostream & operator<<(ostream &os, const Paragraph& p) {     return os << p.to_str(); }   But I could probably do:  ostream & operator<<(ostream &os) {     return os << paragraph; }   What rationale should I base this decision on?  Note:   Paragraph::to_str = (return paragraph)    where paragraph's a string.


While the normal pronunciation of "cursed" is in one syllable, I have seen it used as a two-syllable word, "curs-ed". The Cambridge dictionary lists this pronunciation as an alternative in UK only:   Is the two-syllable version valid for use in modern poetry, or is it restricted to real or simulated Early Modern text, like thee/thou usually are?


Resetting password when GRUB is not installed

I have installed Ubuntu 16.04 on Nvidia TX1 but forgot my root password.   Is there any way to restore or reset the password even though GRUB is not installed?  I tried pressing shift or ESC to go to recovery mode when booting but failed since GRUB is not installed.  If I can't reset the password, how can I format TX1 and reinstall Ubuntu on it without the root password?


I need font size = 14 in article document, but when I change  \documentclass[a4paper,11pt]{article}   to  \documentclass[a4paper,14pt]{article}   font becomes even smaller. How to change font size?


Syntax highlighting seems to have been broken recently. For example see the code example at:    All the attributes' first letters are black. Is this a bug?  ... or a feature?


Coordinates of intersections in axis environment (pgfplots)

In axis environment I have a curve and a line intersecting it. How can I get components of (intersection-1), (intersection-2) etc. in axis units?  \documentclass{minimal}  \usepackage{pgfplots} \usetikzlibrary{intersections}  \begin{document}   \begin{tikzpicture}  \begin{axis} \addplot[name path global=GaussCurve] gnuplot[domain=48.00:56.00,samples=100] {exp(-0.5*((x-52.64)/1.82)**2)/(sqrt(2*pi)*1.82)}; \path[name path global=HelperLine] (axis cs:48,0.13288) -- (axis cs:56,0.13288); \draw[dashed,name intersections={of=GaussCurve and HelperLine}] (axis cs:48,0.13288) -- (intersection-2); \fill[red] (intersection-2) circle (.1cm); \end{axis}  \end{tikzpicture}  \end{document}   e.g. how to get the x component of red circle (intersection-2)?  This code generated by program from some data, so I can't use the presented values, it's just example.


Fair Use of the thumbnail version of thousands of images from a third party?

I would like to include on my website the thumbnail version of thousands of images created by a third party, which I am trying to contact to ask permission, with no success. I would link from the thumbnail to the original version, hosted in the webservers of this third party, and I would be always citing the original author.  The images are generic landscapes, related to the topic of my website (Africa). I created a thumbnail version, resizing the original dimensions (1024x682) to a square 150x150 pixel cropped thumbnail. These thumbnails, with part of the original image, would be hosted in my webserver.  The third party created millions of images, and I've selected only a part of the original dataset, only those images related to the topic of my website. The purpose is offer information about Africa to the users of my website, linking these original images.  I wondered if this action could be considered as a 'Fair Use' of the contents, in order to avoid legal issues with this third party. I've reading , but I would like to know other point of views.


How to always allow Firefox to open files

I am quite new to Ubuntu and I was wondering how I could disable or remove the dialog that says 'Allow opening file':     Answer:  For anyone facing a problem with Firefox uninstall firefox and reinstall from the terminal like so sudo apt install firefox and everything should be working fine as it does with mine. Don't know why this is but it is a solution


What was the episode from British/American Anthology about husband buying a clone?

There was an episode of a Sci-fi/horror anthology. Either a TV series, or a series of movies. It was about a man whose wife is starved for affection, and overly attentive, trying to win his love. He buys a clone/robot to replace him so he can have some free time. On down time, the clone is kept in cold storage in the basement. The clone ends up being super romantic and treating the wife better than the husband did. They fight for her at the end of the episode.   Where is this story from?


How can I get help on terminal commands?

I often see things like     read man xyz   For more information read xyz's man page.   see info xyz    so I wonder:   How can I get help on terminal commands generally? What exactly are these man and info pages?   How can I find and view them?


Let $Y$ be an ordered set in the order topology with $f,g:X\rightarrow Y$ continuous, show that $\{x:f(x)\leq g(x)\}$ is closed in $X$

Let $Y$ be an ordered set in the order topology with $f,g:X\rightarrow Y$ continuous.  Show that the set $A = \{x:f(x)\leq g(x)\}$ is closed in $X$.  I am completely stumped on this problem.  As far as I can tell I've either got the task of proving $A$ gathers its limit points, or showing that there is a closed set $V \subset Y$ such that $f^{-1}(V)$ or $g^{-1}(V)$ is equal to A, which would prove $A$ closed since both $f$ and $g$ are continuous.  The latter strategy seems like the more likely to succeed.  Unfortunately I can't find any way of constructing this set $V$.  The fact that I don't know if $f$ or $g$ are injective means I keep running into the problem of having $f^{-1}(V)$ or $g^{-1}(V)$ give me extra points not in $A$.  And even if I were able to construct $V$ this wouldn't guarantee it was closed.   I suspect I may need to use the continuity of both $f$ and $g$ together in some way but I can't see how.  Can anyone give me some guidance on this problem? Thanks.


Application of Main Homomorphism Theorem

This is related to this .  I just didn't want a prolonged discussion in the comments.  Let $\phi: G \to G'$ be a homomorphism.  Let $G$ be a finite group.  Let $K \leq G$ be the kernel of $\phi$.  Let $I \leq G'$ be the image of $\phi$.  Let $H' \leq G'$.  Find a formula relating the order of $\phi^{-1}(H')$ in terms of $H', I, K$.    Attempt at a solution: $|\phi^{-1}(H')|=|H'\cap I|\cdot |K \cap \phi^{-1}(H')|$.  My justification for this is as follows.  $\phi^{-1}(H')/(K \cap \phi^{-1}(H'))\cong H' \cap I$


Suppose $n$ is an even positive integer and $H$ is a subgroup of $\mathbb Z/n \mathbb Z$. Prove that either every element of $H$ is...

Suppose $n$ is an even positive integer and $H$ is a subgroup of $\mathbb Z/n\mathbb Z$. Prove that either every element of $H$ is even or exactly half of its elements are even. (Gallian, Contemporary Abstract Algebra, Exercise 24, Chapter 3.)


How do I remove a green screen background in Photoshop?

How can I green screen in Photoshop? I am making a picture were I need to green screen, and it would be very helpful if someone could help me!


Sudden decrease in number of pages indexed in Google

One week ago, I updated the sitemap and pinged Google and other search engines to alert them to the change. However, the site now has lost like around 50 indexed pages (yes the site is my personal blog which i am only building up) in a week.   I have had done some research and came up with some possible contributing factors:    Google crawling had an issue (but this happened back in 2010-2011).   Something may have been wrong with the sitemap that was submitted to Google. (Although, I have checked this and there are no broken links.)   Can anyone point me as to what might be the reason for this? Also, how can I go about re-indexing the pages ?   This is similar to other questions on this site, but I have gone through  and  and neither addresses a situation like this.  Update : The site is continously going down in pages indexed and now it sits at a 100 pages less and in total there were only 300..:(


Will a USB 2.0 device charge faster plugged into a USB 3.0 port?

Fairly simple question, do USB 2.0 devices charge quicker if they are plugged into a USB 3.0 port rather than a USB 2.0 one. I’m not asking about a specific device I have, I just mean in general.  I know USB 2.0 can provide 500mA and USB 3.0 up to 900mA, but is the device able to draw the extra power the USB 3.0 port can provide and charge at 900mA, or will it draw up to 500mA and then not be able to draw any more?


Still can't upgrade? Is there a new delay?

As of 8/2 I'm still unable to upgrade from 16.04 to 18.04 using the do-release-upgrade command. Still "No new release found." I don't remember it ever taking this long before. And I'd rather not use -d , cause I want to stay on the LTS.  I know they said it'd be a few days, but it's been like a week.. Was there an unexpected delay or something?


Locating the file in which a dictionary word is stored

I misspelt the word "analogous", and I found that the system spellchecker offered "anbalagous" as a possible correction. As far as I can tell, "anbalagous" isn't a real word, so I figured I must have added it to the dictionary at some point by mistake. However, it seems that "anbalagous" isn't in ~/Library/Spelling/LocalDictionary, so it's a bit of a mystery. Out of curiosity, I would like to check which file the word "anbalagous" appears in. So:  where are the spell check dictionary file(s) located on a Mac?  is there any location other than ~/Library/Spelling/LocalDictionary where custom words are stored for the system spell checker?  if (as I suspect) the dictionary is stored in a binary file, is there a way to see the list of words in it?  (Probably not but might as well check) does a Mac's spell checker dictionary contain the word "anbalagous" by default?   In case it makes a difference I'm still on OS X 10.11.


Well, I have few directories have name contains hashes (#, eg: #abczxy). Now I can't to execute this cd #foo it will redirect me back to the root directory equal with this command cd  The question is, is this possible to do that or is there any tricks allow me do that?  Thanks.


Java - set custom commands for inputs on run

With String[] args, I can get input on run, But how to set custom parameter for each input like:  -c for cat name, -d for dog name  so that I can run java abc.jar -c myCat -d myDog or java abc.jar -d myDog -c myCat


Is it appropriate to use the word "most" to describe 60% of something?

A person watched 60% of a movie. Is it appropriate to say the person watched most of the movie?


Is energy content of a system different depending on the observer?

For the sake of simplicity, let's imagine that the entire universe is empty except for a single lump of (classical) matter with mass $m$. In its center of momentum frame, it is clear that the total energy is simply $E_\text{CoM}=mc^2$. However, in a frame moving relative to it with speed $v$, we have $E_\text{moving}=\sqrt{m^2c^4+p^2c^2}> mc^2$ for all nonzero $v$.  Are we to infer that the energy content of a system can be different relative to the observer? Does this not violate the first law of thermodynamics?


Why is the second order perturbative correction to the ground state energy always down?

What is the physical/deeper reason for the  shift of the ground state energy in time independent  to be always down?  I know that it follows from the formula quite straightforwardly, but I could not find a deeper reason for it even if if I took up examples like the linear Stark effect.  Would you please tell me why?


Why second order SGD convergence methods are unpopular for deep learning?

It seems that, especially for deep learning, there are dominating very simple methods for optimizing SGD convergence like ADAM - nice overview:   They trace only single direction - discarding information about the remaining ones, they do not try to estimate distance from near extremum - which is suggested by gradient evolution ($\rightarrow 0$ in extremum), and could help with the crucial choice of step size.  Both these missed opportunities could be exploited by second order methods - trying to locally model parabola in simultaneously multiple directions (not all, just a few), e.g. near saddle attracting in some directions, repulsing in the others. Here are some:   L-BFGS:  TONGA:  K-FAC:  saddle-free Newton:  my second order local parametrization:    But still first order methods dominate (?), I have heard opinions that second order just don't work for deep learning (?)  There are mainly 3 challenges (any more?): inverting Hessian, stochasticity of gradients, and handling saddles. All of them should be resolved if locally modelling parametrization as parabolas in a few promising directions (I would like to use): update this parametrization based on calculated gradients, and perform proper step based on this parametrization. This way extrema can be in updated parameters - no Hessian inversion, slow evolution of parametrization allows to accumulate statistical trends from gradients, we can model both curvatures near saddles: correspondingly attract or repulse, with strength depending on modeled distance.  Should we go toward second order methods for deep learning?  Why is it so difficult to make them more successful than simple first order methods - could we identify these challenges ... resolve them?  As there are many ways to realize second order methods, which seems the most promising?  Update: Overview of SGD convergence methods including 2nd order:   Update: There are criticized huge 2nd order methods, but we can work on the opposite end of cost spectrum: make tiny steps from successful 1st order methods, like just cheap  in single direction e.g. of momentum method for smarter choice of step size - are there interesting approaches for such 2nd order enhancement of 1st order methods?


no GridLayoutManager error after drag and drop

I am trying to write a program with Java swing in IntelliJ. I have designed a GUI with IntelliJ's drag and drop user interface. However, my Jlist does not appear in my Jscrollpane. IntelliJ says that I don't have a GridManager for my frame, but I tried adding a GridManager and it messed up my GUI format. Can somebody help me? Thanks!  import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.BoxLayout; import javax.swing.DefaultListModel; import javax.swing.GroupLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.ListSelectionModel;    public class GUIF {  private JButton button5; private JList list1; private JButton button1; private JButton button4; private JButton button2; private JButton button3; private JTextField textField1; private JPanel Panel; private JScrollPane scrollpane1;  public GUIF() {     this.listOps();     button1.addActionListener(new ActionListener() {     @Override     public void actionPerformed(ActionEvent e) {       String data = "";       if (list1.getSelectedIndex() != -1) {         data = "Item selected: " + list1.getSelectedValue();         textField1.setText(data);       }       textField1.setText(data);     }   }); }  private void prepGUI() {   JFrame frame = new JFrame("Store");   frame.setContentPane(new GUIF().Panel);   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);   frame.pack();   frame.setVisible(true);  }  private void listOps(){   DefaultListModel<String> items = new DefaultListModel<>();   items.addElement("chocolate");   items.addElement("milk");     list1 = new JList(items);   list1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);   list1.setSelectedIndex(0);   list1.setVisibleRowCount(10);   list1.setVisible(true);     scrollpane1.add(list1);    scrollpane1.setVisible(true);  }  public static void main(String[] args) {   GUIF guif = new GUIF();   guif.prepGUI();  }    }


How do I troubleshoot low wireless signal strength on my Dell Studio XPS?

My Dell Studio xps laptop has just started experiencing extremely low signal strength. I did set up a wireless printer the other day, so maybe I screwed something up in the process.   Here's what I have tried so far:    connecting to several different networks that all work fine for other computers, so it is most certainly my laptop. getting the latest driver, or at least I think I did. Some of the scanner software out there, like Software Informer, suggest there is a later one, but trying to apply the suggested update was not successful. Running a Dell diagnostic on the wireless lan card, which confirmed poor signal strength but not a suggested fix. It is quite lengthy so I have just put some of the seemingly more relevant info below.   Can someone help me troubleshoot this?  Dell diagnostic output:  **Signal Strength Test** Test Started        1/1/2012 4:22:55 PM Error Message:  Unable to locate any available networks because the radio for the interface is turned off.  1/1/2012 4:23:41 PM Error Message:  Unable to locate any available networks because the radio for the interface is turned off.  1/1/2012 4:23:42 PM Warning Message:    The network might not have been configured properly.    1/1/2012 4:23:49 PM Error Message:  Unable to locate any available networks because the radio for the interface is turned off.  1/1/2012 4:23:49 PM Test Finished:  Completed   1/1/2012 4:25:34 PM  **Wireless Connectivity Test** Test Started        1/1/2012 4:25:35 PM Test Finished:  Passed  1/1/2012 4:25:36 PM Wireless Signal Strength Test Test Started        1/1/2012 4:25:36 PM Warning Message:    Received Wireless Signal Strength: Low [16%].   1/1/2012 4:25:37 PM  **Network Card - Dell Wireless 1510 Wireless-N WLAN Mini-Card** MAC Address 00:24:2b:c9:e0:27 Adapter Connected   Yes Current Speed   19.50 Mbps IP Address  10.0.1.3 IP Mask 255.255.255.0 Gateway IP Address  10.0.1.1 DHCP Server 10.0.1.1 Adapter DHCP Enabled    Yes Driver Provider Broadcom Driver Version  5.10.38.26, 10-22-2008


Why did Cypher say they were going to kill Neo?

In the beginning of the first movie, in the first conversation, between Cypher and Trinity, he says:     Cypher: We're going to kill him, understand?   Trinity: Morpheus believes he is the One.   Cypher: Do you?   Why did Cypher said that? Was it a habit to kill potential red pills? Was Neo considered to be a threat, so he needed to be killed if he was not the One?


Celebrating the same new year several times over?

Is there a commercial service offered to general public that allows you to celebrate the new year several times?  The idea is that you would celebrate it in a time-zone and than move to the next one arriving there before new year. Of course this is relatively easy to accomplish by yourself if you're near the border of a country and you just move to the next one in a different time zone. Things probably get a bit more complex to do it 3 or more times.


PHP - Using self vs $this to access protected members from within a class?

Say I have a protected method in PHP, as shown below:  class Test {      protected function hello($x) {         echo "hello " . $x . "<br>";     }      public function __construct() {         $i = 2;         self::hello($i);         $this::hello($i);     } }  $test = new Test();   The output is hello 2 printed twice. So calling the protected method hello works via both self and $this. Which is the correct approach? My personal answer is self, since $this refers to the current object, and any object of this class shouldn't have access to its protected method. Am I right or wrong?  Edit: This question isn't a duplicate. The other question talks only about accessing static members members through self and $this. I am interested in protected members specifically.


Consider the sentence "What is the probability of Bob winning?"  What is the function of "Bob winning"? It's certainly acting as the object of the preposition, but I don't recognize this type of construction from any of my English courses. Is it even correct usage?


What is the meaning of speed of light $c$ in $E=mc^2$?

is the famous mass-energy equation of Albert Einstein. I know that it tells that mass can be converted to energy and vice versa. I know that $E$ is energy, $m$ is mass of a matter and $c$ is speed of light in vacuum.   What I didn't understood is how we will introduce speed of light?  Atom bomb is made using this principle which converts mass into energy; in that the mass is provided by uranium but where did speed of light comes into play? How can speed of light can be introduced in atom bomb?


I was reading some answers about ruby and there are a lot of links to _why's sites.  and took all his sites with him.  Almost every introduction question about ruby will include at least one or two links to one of his sites. Examples:          With a bit more effort I could probably find more questions with a lot of deadlinks.  My suggestion for discussion was, what would be a good way to solve deadlinks in the answers/comments? Not every site _why created has resurfaced somewhere else, but some could be replaced by new links.  But I wanted the discussion to go beyond this specific problem of deadlinks in the ruby answers, an automatic solution would be to let the links be scanned in a batch and when found dead be replaced by a google cache or webarchive version of the page, and perhaps mark it so that the community can replace the link with an alternative?


Why does this print statement slow down the rest of the code by a factor of 4?

Edit: This is not a general question about microbenchmarking. I know the garbage collector is unpredictable. I want to know how IN THIS SPECIFIC case it's possible that a single toString() of an array's .length property could so reliably cause such a change consistently on multiple JVMs.  Original question follows:  I'm a high school teacher. I was attempting to put together a little example to show my students that arrays of primitives are slightly more efficient than arrays of Integer objects. This sample program gives me unexpected output.  50000 objects...    sorted in 1377 ms. 50000 primitives... sorted in 2565 ms.   However, if I remove a single print statement (by toggling the boolean), I get:  50000 objects...    sorted in 1444 ms. 50000 primitives... sorted in 772 ms.   (The print statement in question is not inside the loop, of course.)  When the slowdown is in effect, changing the order of the tests (primitives first, then objects) makes it so that whichever happens SECOND slows down:  50000 primitives... sorted in 775 ms. 50000 objects...    sorted in 3640 ms.   Adding a delay between the two loops also "fixes" the slowdown.  I've tried adding System.gc() between instead of the delay, but it doesn't help.  I have also tried on multiple JREs, and I get similar output on Oracle's 1.8.0_31 and OpenJDK's 1.8.0_91. It times out on IDEOne because it takes longer than 5 seconds, but smaller array sizes don't exhibit the error on IDEOne.  public class PrintSlowdown {     public static void main( String[] args ) {         int[]     prims = new int[50000];         Integer[] objs  = new Integer[prims.length];         long start, stop;          boolean slowDown = true;         boolean compensate = false;          // initialize both         for ( int i=0; i<prims.length; i++ ) {             prims[i] = (int)(Math.random()*1000);             objs[i] = new Integer(prims[i]);         }          // Objects         if ( slowDown )             System.out.print(objs.length + " objects...    "); // WHY?!?         else             System.out.print("50000 objects...    ");         start = System.nanoTime();         for ( int i=0; i<objs.length-1; i++ ) {             int min = i;             for ( int j=i+1; j<objs.length; j++ ) {                 if ( objs[j].compareTo(objs[min]) < 0 )                     min = j;             }             if ( min != i ) {                 Integer temp = objs[i];                 objs[i] = objs[min];                 objs[min] = temp;             }         }         stop = System.nanoTime();         System.out.println("sorted in " + (stop-start)/1000000 + " ms.");          if ( compensate )             try { Thread.sleep(2000); } catch (Exception e) {}          // Primitives         System.out.print(prims.length + " primitives... ");         //System.out.print("primitives... ");         start = System.nanoTime();         for ( int i=0; i<prims.length-1; i++ ) {             int min = i;             for ( int j=i+1; j<prims.length; j++ ) {             if ( prims[j] < prims[min] )                 min = j;             }             if ( min != i ) {                 int temp = prims[i];                 prims[i] = prims[min];                 prims[min] = temp;             }         }         stop = System.nanoTime();         System.out.println("sorted in " + (stop-start)/1000000 + " ms.");     } }   Sorry for such long sample code, but any smaller and it doesn't trigger the weirdness. (I spent nearly two hours trying to reproduce with less code, and this was the best I could do.)  Any ideas?!? I'm going crazy here.


How can I test my site in IE6, IE7, IE8, IE9, IE10 and Internet Explorer 11

How can I reliably test my site on all old versions of Internet Explorer ranging from IE6 all the way up to version IE11?


How to upgrade my Ubuntu 15.04 to Ubuntu 16.04

I currently have dual boot with Windows and Ubuntu 15.04  When I try to upgrade using Software Updater, it shows that your software is up to date.  I do not want to do it directly using external cd/usb with ubuntu 16.04 image.  UPDATED IMAGE :     After clicking on upgrade button it closes and nothing happens.


i get these error  C:\Users\SDRav\AppData\Local\Temp\ccCy0RiX.o:driver.cpp:(.text+0x1b): undefined reference to BST<char>::BST()' C:\Users\SDRav\AppData\Local\Temp\ccCy0RiX.o:driver.cpp:(.text+0x1eb): undefined reference toBST::insert(char const&)' C:\Users\SDRav\AppData\Local\Temp\ccCy0RiX.o:driver.cpp:(.text+0x228): undefined reference to BST<char>::traversePreorder(BSTNode<char>*)' C:\Users\SDRav\AppData\Local\Temp\ccCy0RiX.o:driver.cpp:(.text+0x263): undefined reference toBST::search(char const&) const' C:\Users\SDRav\AppData\Local\Temp\ccCy0RiX.o:driver.cpp:(.text+0x32b): undefined reference to BST<char>::deleteNode(char const&)' C:\Users\SDRav\AppData\Local\Temp\ccCy0RiX.o:driver.cpp:(.text+0x419): undefined reference toBST::leafCount(BSTNode*)' C:\Users\SDRav\AppData\Local\Temp\ccCy0RiX.o:driver.cpp:(.text+0x47c): undefined reference to BST<char>::search(char const&) const' C:\Users\SDRav\AppData\Local\Temp\ccCy0RiX.o:driver.cpp:(.text+0x4d5): undefined reference toBST::getSiblings(char const&)' collect2.exe: error: ld returned 1 exit status  but i have no idea why.... my guess is linking but i have check the headers and i still cant see it   my driver.cpp(main)  #include <iostream>  #include <iomanip> #include "BST.h" using namespace std;  int main() {      BST<char> op1;     int action = 0;     int numInsert = 0;     char value;  cout<<"-------------------- MENU ----------------------"         <<endl<<"1. Insert node(s)"         <<endl<<"2. Traverse Preorder"         <<endl<<"3. Search BST"         <<endl<<"4. Delete node"         <<endl<<"5. Leaf Count"         <<endl<<"6. Sibling of a node"         <<endl<<"7. Quit"         <<endl<<"Please ent   switch (action)         {             case 1:                 cout << "\n How many values would you liek to insert to a BST? ";                 cin>>numInsert;                 for(int i =0; i<numInsert;i++){                     cout<<"What value would you like to insert to the list: ";                     cin >> value;                     op1.insert(value); //check                 }                     break;    ...  }   --- BST.h ---  #include <iostream> #include "BSTNode.h"  using namespace std;  #ifndef BINARY #define BINARY  template <typename DataType>  class BST {     public:         BST();         // ~BST();          bool empty() const;         /*------------------------------------------------------------------------             Check if BST is empty.              Precondition:  None.             Postcondition: Returns true if BST is empty and false otherwise.         -----------------------------------------------------------------------*/         void insert(const DataType & item);         void traversePreorder(BSTNode<DataType> * startPoint);         bool search(const DataType & item)const;         bool deleteNode(const DataType & item);         int leafCount(BSTNode<DataType> * startPoint);         DataType getSiblings(const DataType & item);         private:         BSTNode<DataType> * treeRoot;         typedef BSTNode<DataType> * BSTNodePointer;          void search2(const DataType & item, bool & found,  BSTNodePointer & locptr, BSTNodePointer & parent) const;   };   please help


List of unlinked pages on Stack Exchange sites

Here is a list of special, unlinked pages (they may be linked in questions and answers) on Stack Exchange sites. Most pages listed here are work in progress or legacy. Currently, this list is incomplete.  If you know more of them, add them to the answer.  Related


During my upcoming holiday to the USA I'm thinking about buying a new guitar as the exchange rate is extremely favorable. Excuse my naivety but I have never flown with a guitar before. What is a recommended way to go about this? Could I take it as carry on luggage or would it have to be checked? If checked luggage what kind of precautions should I take to keep it safe? Are there any problems with flying US budget carriers? If I do buy the guitar I'm expecting to have to make two flights with it, one domestic flight with Virgin America and an international flight with Air NZ.


Filling bar chart with patterns for black and white printing

I am trying to plot a bar chart like below:   \documentclass{standalone} \usepackage{graphicx} \usepackage{tikz} \usepackage{pgfplots} %\usepackage{subcaption} \definecolor{blues1}{RGB}{198, 219, 239} \definecolor{blues2}{RGB}{158, 202, 225} \definecolor{blues3}{RGB}{107, 174, 214} \definecolor{blues4}{RGB}{49, 130, 189} \definecolor{blues5}{RGB}{8, 81, 156}  \begin{document}  \begin{tikzpicture} \begin{axis}[  symbolic x coords={$\tau =5$,$\tau = 10$,$\tau =15$,$\tau =20$, $\tau =25$}, xtick={$\tau =5$,$\tau =15$, $\tau =25$}, %x tick label style={ %/pgf/number format/1000 sep=}, ylabel=$\mathcal{R}_{\max}$, ytick ={0.9, 0.92, ..., 1}, xlabel = Size of the Time Window, %enlargelimits=0.15, %legend style={at={(0.5,-0.1)},anchor=north}, legend style={at={(0.65,1)}, anchor=north,legend columns=-1}, ybar, bar width=5.8pt,] \addplot[style={fill=blues3,mark=none}]  coordinates {($\tau =5$,0.90) ($\tau =15$,0.91) ($\tau =25$,0.9011) };\addlegendentry{run=1} \addplot[style={fill=blues2,mark=none}] coordinates {($\tau =5$,0.9465) ($\tau =15$,0.925) ($\tau =25$,0.9314) };\addlegendentry{ run=2} \addplot[style={fill=blues1,mark=none}] coordinates {($\tau =5$,0.98) ($\tau =15$,0.977) ($\tau =25$,0.97) };\addlegendentry{run=3} \end{axis} \end{tikzpicture}  \end{document}   what I want is to fill the bars with some distinguishable patterns so that if the document is printed as black and white the figure will be understandable. How can I do that? Thanks.


Java NullPointerException in Retrieving data

I've been trying to retrieve the data from a preloaded database and I always getting an error of a NullPointerException. I'm trying to retrieve the data to a listview. I don't know the what the problem is. Please help me. Thanks.  public class Retrieve extends Activity {   Dbhelper dbhelper;   protected ListAdapter adapter; SQLiteDatabase db;   @Override   public void onCreate(Bundle savedInstanceState) {   super.onCreate(savedInstanceState);   setContentView(R.layout.ret_all_info);     String[] from = new String[] { "_id" };   int[] to = new int[] { R.id.studid};   dbhelper = new Dbhelper(this);   try {   dbhelper.createDataBase();   } catch (IOException e) {    // TODO Auto-generated catch block   e.printStackTrace();   }    Cursor c = dbhelper.getData();    adapter = new SimpleCursorAdapter(getApplicationContext(), R.layout.ret_all, c, from, to, 0);    ListView list = (ListView) findViewById(R.id.ListView1);    list.setAdapter(adapter);    list.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // TODO Auto-generated method stub  Intent intent = new Intent(Retrieve.this, RetrieveDetails.class); Cursor cursor = (Cursor) adapter.getItem(position); intent.putExtra("COMMAND_ID", cursor.getInt(cursor.getColumnIndex("_id"))); startActivity(intent);   }  }); }   }     Here is the Logcat  02-13 21:05:11.402: E/Trace(22808): error opening trace file: No such file or directory (2) 02-13 21:05:11.572: E/dalvikvm(22808): GC_CONCURRENT freed 314K, 9% free 6590K/7239K, paused 2ms+12ms, total 28ms 02-13 21:05:22.832: E/Trace(22895): error opening trace file: No such file or directory (2) 02-13 21:05:22.972: E/dalvikvm(22895): GC_CONCURRENT freed 305K, 10% free 6577K/7239K, paused 13ms+3ms, total 37ms 02-13 21:05:23.192: E/AndroidRuntime(22895): FATAL EXCEPTION: main 02-13 21:05:23.192: E/AndroidRuntime(22895): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tutsiroll/com.example.tutsiroll.Retrieve}: java.lang.NullPointerException 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.app.ActivityThread.access$600(ActivityThread.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.os.Handler.dispatchMessage(Handler.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.os.Looper.loop(Looper.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.app.ActivityThread.main(ActivityThread.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at java.lang.reflect.Method.invokeNative(Native Method)  02-13 21:05:23.192: E/AndroidRuntime(22895):    at java.lang.reflect.Method.invoke(Method.java:511)  02-13 21:05:23.192: E/AndroidRuntime(22895):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at dalvik.system.NativeStart.main(Native Method) 02-13 21:05:23.192: E/AndroidRuntime(22895): Caused by: java.lang.NullPointerException 02-13 21:05:23.192: E/AndroidRuntime(22895):    at com.example.tutsiroll.Retrieve.onCreate(Retrieve.java:43) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.app.Activity.performCreate(Activity.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java) 02-13 21:05:23.192: E/AndroidRuntime(22895):    at com.lbe.security.service.core.client.b.x.callActivityOnCreate(Unknown Source) 02-13 21:05:23.192: E/AndroidRuntime(22895):    ... 12 more


When I open the feed view on the iOS app, I can't see any icon for chat replies:        It would be great to draw something here.   App Version: 1.6.1.2 Device: iPad Air 2 (Wi-Fi) OS Version: Version 10.1.1 (Build 14B100)


Prove $\lim_{n \to \infty}$ $(1+\frac xn-o(\frac 1n))^n=e^x$

We know that $\lim_{n \to \infty}$ $(1+\frac xn)^n=e^x$. How to prove that $\lim_{n \to \infty}$ $(1+\frac xn-o(\frac 1n))^n=e^x$?  Attempt of the proof:   Let $\epsilon>0$ $\exists n_0$ such that $\forall n\ge n_0$ $|o(\frac 1n)|<\epsilon\frac 1n$ and $|n*o(\frac 1n)|<\epsilon$.   Thus  $(1+\frac{x+\epsilon}{n})^n>(1+\frac xn-o(\frac 1n))^n>(1+\frac{x-\epsilon}{n})^n$.  So $e^x*e^\epsilon \ge \lim_{n \to \infty}$ $(1+\frac xn-o(\frac 1n))^n \ge \frac{e^x}{e^\epsilon}$ $\forall \epsilon>0$.   Say $\lim_{n \to \infty}$ $(1+\frac xn-o(\frac 1n))^n=y$, it can not be that $y<e^x$, because if it is so, then $\exists \epsilon>0$ such that $e^\epsilon y<e^x$ and the second inequality above is violated. By the similar talking $y>e^x$ is impossible.   This completes the proof.


Why do I sometimes get 'sh: $'\302\211 ... ': command not found' in xterm/sh?

Sometimes when I simply type a valid command like 'find ...', or anything really, I get back the following, which is completely unexpected and confusing (... is command name I type): sh: $'\302\211...': command not found  There is some corruption going on I think. I don't use color in my prompt, I am using the Bash shell in POSIX mode as sh (chsh to /bin/sh and so on - $SHELL is sh). What is going on and why does this keep happening? Anything I can debug? I think this is more of an xterm issue than sh, or at least a combination of the two. Files, for context: My /etc/profile, as distributed with Arch Linux x86-64: # /etc/profile  #Set our umask umask 022  # Set our default path PATH="/usr/local/sbin:/usr/local/bin:/usr/bin" export PATH  # Load profiles from /etc/profile.d if test -d /etc/profile.d/; then         for profile in /etc/profile.d/*.sh; do                 test -r "$profile" && . "$profile"         done         unset profile fi  # Source global bash config if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then         . /etc/bash.bashrc fi  # Termcap is outdated, old, and crusty, kill it. unset TERMCAP  # Man is much better than us at figuring this out unset MANPATH  My /etc/shrc follows below. It's something I created as a way to have sh parse some file on startup, for a non-login shell; it is achieved using ENV variable set in /etc/environment with the line ENV=/etc/shrc: PS1='\u@\H \w \$ ' alias ls='ls -F --color' alias grep='grep -i --color' [ -f ~/.shrc ] && . ~/.shrc  My ~/.profile, I am launching X when logging in through first virtual tty: [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec xinit -- -dpi 111  My ~/.xinitc, as you can see I am using the system as a Virtual Box guest: xrdb -merge ~/.Xresources  VBoxClient-all  awesome &  exec xterm  And finally, my ~/.Xresources, no fancy stuff here I guess: *faceName: Inconsolata *faceSize: 10 xterm*VT100*translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)  xterm*colorBDMode: true xterm*colorBD: #ff8000 xterm*cursorColor: S_red  Since ~/.profile references among other things /etc/bash.bashrc, here is its content: # # /etc/bash.bashrc #  # If not running interactively, don't do anything [[ $- != *i* ]] && return  PS1='[\u@\h \W]\$ ' PS2='> ' PS3='> ' PS4='+ '  case ${TERM} in   xterm*|rxvt*|Eterm|aterm|kterm|gnome*)     PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'                                                              ;;   screen)     PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'     ;; esac  [ -r /usr/share/bash-completion/bash_completion   ] && . /usr/share/bash-completion/bash_completion  I have no idea what that case statement does, by the way, it does look a bit suspicious though, but then again, who am I to know.


What is the easiest way to add a string on the beginning of every line of the file from the command line?

I am looking for a way to add some string to the beginning of every line (same string for every line). Not something customizable but rather something that will be easy to remember and available on every POSIX-compliant platform (and every shell as well).


derivative calculation involving floor function $\left\lfloor {{x^2}} \right\rfloor {\sin ^2}(\pi x)$

I was asked to find when the function is differentiable and what is the derivative of:  $$\left\lfloor {{x^2}} \right\rfloor {\sin ^2}(\pi x)$$  Now, I am not sure how to treat the floor function. I'll be glad for help.


I read about fast connections and slow internet due to ISP's slow DNS, as a solution they recommended swithing to Google or other fast DNS.   Now, I am on 15 Mbps Internet connection and I would like to measure if my DNS is fast or slow.  How can I measure that?


So i'm trying to understand the proof of:  $\mathbb{Q}$ is not cyclic. So this is the proof:  We proceed by contradiction.  Suppose $\mathbb Q$ is cyclic then it would be generated by a rational number in the form $\frac{a}{b}$ where $a,b \in \mathbb{Z} $ and $a$, $b$ have no common factors. Also, $a,b \neq 0$.   The set $\langle\frac{a}{b}\rangle$ consists of all integer multiples of $\frac{a}{b}$.  Therefore, if $\mathbb{Q}=\langle\frac{a}{b}\rangle$, then $\frac{a}{2b}$ is an integer multiple of $\frac {a}{b}$  PROBLEM: Why is $\frac{a}{2b}$ an integer multiple? or how is it an integer multiple. I'm not seeing it because isn't $\frac{a}{b} \times \frac{a}{b}=\left(\frac{a}{b}\right)^2$  Anyways, here is the rest of the proof:  but if   $c \times \frac{a}{b}=\frac{a}{2b}$ then $c=\frac{1}{2}$ is not an integer.  Thus, $\mathbb{Q}$ cannot be generated by a single rational number and is not cyclic.   If anyone can clarify that would be great. Also, another problem I have is doesn't this show that $\mathbb{Q}-\{0\}$ is not cyclic because I thought $\mathbb{Q}$ under the operation multplication is not a group unless zero is removed.


1990s sci-fi series where humans in armed suits fight robots

I'm looking for the name of a sci-fi series, intended for children. Robots have control over the humans. There is a squad of humans who attack them. Every member in this squad has a badge on their suit, and when they touch this badge the suit becomes armed. This series was not cartoon series, it was performed by real people. The main robot character is very similar in style to Darth Vader in Star Wars. The series aired in the 1990s. I am sorry but I can't recall many details.


I have some binaries and some .c extension files in my directory.   Here the output using ls     arrays.c  basic0  basic0.c  fromfb  fromfb.c  oute  oute.c  segmen.c    simp  simp.c   Here i want to filter binary files only , so I use  ls |grep -v .c   This command list all files, Then using grep I get files, except those file not ending with .c  What I expect is   basic0 fromfb oute simp   But What i got   fromfb oute simp   basic0 binary file missing. What is the problem with this?


why does the second link click redirect to partial not dialog

I have an edit partial view to load in a dialog, which works the first time it's called, the edit then saves the data, great.   However if you don't refresh the page, which I don't want to have to do, and click 'edit' again, you are redirected to the partial page I am trying to load.  It looks like the AJAX is being ignored and the Action method in the controller is being called instead.  I have unobtrusive added through the bundles in my layout page, which the main view uses, the partial doesn't, but I don't believe it needs to.  I have also tried using preventDefault and different approached of return false; with no success, like the below:  editBtn.click(function (e) {             editDialogPlaceholder.load(this.href, function () {                 e.preventDefault(); //tried                 $(this).dialog('open');                 return false; //tried             })         return false;     });   How can I stop this?  AJAX/JS  $(function () {         var editBtn = $('.editLink');         var editDialogPlaceholder = $('#editDialogUI');          editBtn.button();         // build the dialog form         editDialogPlaceholder.dialog({             autoOpen: false,             modal: true,             resizable: false,             open: function (event, ui) {                 $(this).load('@Url.Action("Edit","Announcements")');             },             buttons: {                 "Save": function () {                     saveAnnouncement();                     fetchList();                     $(this).dialog("close");                 },                 "Close": function () {                     $(this).dialog("close");                 }             }         });         // on click load the dialog form, return false to stop redirect         editBtn.click(function () {             editDialogPlaceholder.load(this.href, function () {                 $(this).dialog('open');             })             return false;         });     });     //post data back to the controller to save to the db     function saveAnnouncement() {         $.ajax({             url: '@Url.Action("Edit","Announcements")',                 type: 'POST',                 data: $('form').serialize()             })         }          function fetchList() {             var aList = $('#announcementList');             aList.load('@Url.Action("Fetch")');         }   Edit action method  [HttpGet]         public ActionResult Edit(int id)         {                 var announcementModel = (from a in db.DbAnnouncement                            where a.Id == id                            select a).SingleOrDefault();                 return PartialView("Edit", announcementModel);         }   Html.ActionLinks being used to open the dialog - second time of clicking it redirects to the partial specified in the controller.  <div class="announcementTableCell">                     @Html.ActionLink("Edit", "Edit", new { id = Model[i].Id }, new { @class = "editLink" })                      @Html.ActionLink("Delete", "Delete", new { Model[i].Id }, new { @class = "dltLink" })                 </div>


I seem to misunderstand the Bash rule for creating a subshell. I thought parentheses always creates a subshell, which runs as its own process.  However, this doesn't seem to be the case. In Code Snippet A (below), the second sleep command does not run in a separate shell (as determined by pstree in another terminal). However, in Code Snippet B, the second sleep command does run in a separate shell. The only difference between the snippets is that the second snippet has two commands within the parentheses.  Could somebody please explain the rule for when subshells are created?  CODE SNIPPET A:  sleep 5 ( sleep 5 )   CODE SNIPPET B:  sleep 5 ( x=1 sleep 5 )


In order to change a settings file, i accidentally replaced all files and folders permissions in folder "sites/default" to 777. Do i have to change all files and folders to 555?


I'm the owner of three Samsung SyncMaster 245BW monitors (resolution: 1920 x 1200). I'm interested in getting a Mac Mini and was wondering if I'll be able to connect the Mac Mini to all three monitors such that I can have a separate desktop on each. Does the Mac Mini come with the hardware / software to do this? Thanks!


Picture/intuitive proof of $\cos(3 \theta) = 4 \cos^3(\theta)-3\cos(\theta)$?

Is there a nice geometric, intuitive or picture proof as to why the  identity $\cos(3 \theta) = 4 \cos^3(\theta)-3\cos(\theta)$ is true?  Note I'm not looking for a computational proof like the one linked to, more a proof without words or intuitive style proof, thanks.


Isomorphism between Hom and tensor product

I am looking for an explicit isomorphism $Hom(V,V^*)\rightarrow V^*\otimes V^*$ where $V$ is a vector space.  I thought of:  $\phi\rightarrow ((u,v)\rightarrow \phi(u)(v))$  But I'm not sure this works.  Does anyone have a suggestion?


Simple proof Euler–Mascheroni $\gamma$ constant

I'm searching for a really simple and beautiful proof that the sequence $(u_n)_{n \in \mathbb{N}} = \sum\nolimits_{k=1}^n \frac{1}{k} - \log(n)$ converges. At first I want to know if my answer is OK.  My try: $\lim\limits_{n\to\infty} \sum\limits_{k=1}^n \frac{1}{k} - \log (n) = \lim\limits_{n\to\infty} \sum\limits_{k=1}^n \frac{1}{k} + \sum\limits_{k=1}^{n-1} \log(k)-\log(k+1) = \lim\limits_{n\to\infty} \frac{1}{n} + \sum\limits_{k=1}^{n-1} \log(\frac{k}{k+1})+\frac{1}{k}$     $ = \sum\limits_{k=1}^{\infty} \frac{1}{k}-\log(\frac{k+1}{k})$ Now we prove that the last sum converges by the comparison test: $\frac{1}{k}-\log(\frac{k+1}{k}) < \frac{1}{k^2} \Leftrightarrow k<k^2\log(\frac{k+1}{k})+1$ which surely holds for $k\geqslant 1$      As $ \sum\limits_{k=1}^{\infty} \frac{1}{k^2}$ converges $ \Rightarrow \sum\limits_{k=1}^{\infty} \frac{1}{k}-\log(\frac{k+1}{k})$ converges and we name this limit $\gamma$ q.e.d


Is it correct to say "Yes, it happened for me and James"

In the context of a network issue some people were facing, a colleague asked:     My wifi dropped out and I have to use the network cable. Did that happen to everyone in the office or only me?   A colleague of mine responded with:     Yes, it happened for me and James   I didn't think this sounded right, and feel like it should be written as:     Yes, it happened for James and I   My colleague feels that his sentence composition is correct.   Is it correct to say:     Yes, it happened for me and James    Alternatively, should it be written as:     Yes, it happened to me and James


I am a minor with a UK Accompanied visa. Will I be allowed to travel without my parent, who is already in the UK?

I am supposed to be traveling to the UK tomorrow, but my visa is an accompanied visa by my mom. My mom is already in the UK (she had to leave early).  Will I be allowed in the airport to enter if my parent (that I'm accompanied by) is already in the UK (arrived before me and probably will be waiting at the airport)?


Visa Documentation to support 'Intent to Return Home' as a retired person

I am considering whether there is any paperwork I should be collecting for future tourist visa applications.   I am a British Citizen, US Permanent Resident, and my recent travel outside the US and EU has been group tours and cruises. I have been treated as having low risk of overstay etc. However, bureaucracy happens, and I want to be prepared.  The potential problem is that I am retired. No job, no school. A lot of visa granting seems to depend on jobs to prove monthly income and intent to return home.  I transfer a fixed allowance from an investment account to my checking account each month, and treat that as though it were my income. The investment account can go up and down in value quite dramatically over periods of months, because it contains stocks and bonds as well as cash equivalents.  I have no family in the US. I do have a house I like, and consider my home.  Is there any paperwork should I be collecting to maximize my chances of getting any tourist visas I might want in the future? Possible non-EU countries include Russia, Mongolia, and several countries in sub-Saharan Africa. EU may become an issue, depending on the terms of the Brexit divorce.  =======================================================================  I agree with the comments that I am likely to get most visas with no problem. That has been my practical experience. The question is what I should do to guard against exceptions, such as an excessively bureaucratic process requiring me to prove intent to return home.


how to reload the namepace in the python?

from math import sqrt def sim_distance(prefs,person1,person2):      si={}      for item in prefs[person1]:           if item in prefs[person2]:                si[item]=1      if len(si)==0: return 0      sum_of_squares=sum([ pow ( prefs[person1] [item] - prefs[person2][item],2)                   for item in prefs[person1] if item in prefs[person2]])      return 1/(1+sqrt(sum_of_squares))  reload(recommendations) recommendations.sim_distance(critics,'Lisa Rose','Gene Seymour')   And it's error  Traceback (most recent call last):   File "<pyshell#2>", line 1, in <module>     recommendations.sim_distance(critics,'Lisa Rose','Gene Seymour') NameError: name 'critics' is not defined   critics is a custom array


One server with multiple desktops "heads" with VNC

I am managing a system of kiosks.  Each kiosk currently is running a web browser with the application for the kiosk running in the browser.  Each kiosk needs to be able to display separate content.  At times, the application running in the web browser freezes.  Thus, I have to go out to the site to refresh the page.  I want to see if there is a way to have one central server that has multiple browser heads.  Then each kiosk would run a program like VNC to display one of the heads.  This way when the program freezes, I just have to login to the central server and refresh the page.  Getting VNC or another remote desktop software installed on the clients is no problem.  What I am looking for is a way to have VNC remote into a specific head of a head of a web browser.  Does such a thing exist?  Or do I have to run a VM for each kiosk to remote into?  Any advice, pointers, or solutions would be helpful.


What are the positives and negatives of periodic DFT codes that don't use plane-wave basis sets?

Most periodic density functional theory (DFT) codes use plane-wave basis sets in conjunction with three-dimensional periodic boundary conditions. In contrast, for molecular systems of finite size, Gaussian basis sets are often used. The former are quite efficient for periodic systems, but more expensive methods such as hybrid functionals become intractable for large system sizes. The latter is well-suited for finite clusters but rarely is appropriate for periodic systems.   uses a mixed Gaussian and plane-wave approach (GAPW) for periodic systems.  models periodic systems using atom-centered Gaussian functions.  expresses wavefunctions in real space, avoiding explicit basis sets.  What are some positives and negatives of these alternate approaches, when compared to more conventional periodic DFT packages?


How do I format paragraphs to make a pagebreak?

How do I format the paragraphs so that it skips to next page.  I would like each paragraph to be on a separate page, is something like this possible?


As a South Korean, would it be ok to stay after my Residence Permit expires?

I am a South Korean national, and currently hold a Aufenthaltstitle in Germany as a job seeker, which is expiring as of Dec. 24. I had previously worked in Germany for almost 3 years, then my employment ended on June 30 and I was able to extend my stay as a job seeker until Dec.24.  I have recently traveled to the US, and on my way back I got my passport stamped in Lisbon on Nov.15, and I am curious to know whether this allows me to stay in Germany longer (up to 90 days from Nov.15) than my Aufenthaltstitles' expiration date.     To add a bit...  My question is whether the entry stamp in Lisbon on Nov. 15 would still be valid, even if my residence is not expired at that point yet. Or do I need to exit the country and get another stamp after the Aufenthaltstitel is expired. Any clarification will be very much appreciated.


Which race in Star Trek universe was the first to invent Warp technology?

Humans look like late member of Warp Drive community. Klingons were capable of interstellar travel from the time of Kahless. Vulcans were in contact with Andorians from ancient times (ST: Enterprise).  Which one first invented warp capabilities: Klingons or Vulcans? Or, others?


How to restore the default chown permissions on a directory / file?

I am using Ubuntu 13.04 x86_64.  I wanted to own whole stuff in my home directory. So I executed these two commands.  sudo chown -RcH rootkea ~   sudo chown -RcL rootkea ~   Now due to those symbolic links linked to some other files in filesystem I have accidentally owned files which reside outside of my home directory. The immediate consequences which I noticed are:     sudo not working    $ sudo   sudo: effective uid is not 0, is sudo installed setuid root?  system has become so slow. It just gets hanged when I click on shutdown / reboot. Each time I have to manually power off the machine.   creates a log file /var/log/cups/error_log of indefinite size which consumes the last byte of my hard drive (after considerable time). Last time it was 17.8 GB! The content of the file was only these two lines repeated uncountably:   E [24/May/2013:02:27:52 +0530] File "/usr/lib/cups/notifier/dbus" has insecure permissions (0100755/uid=1000/gid=0).   W [24/May/2013:02:27:52 +0530] Notifier for subscription 531 (dbus://) went away, retrying!    So clearly cups program is screwed too.    Now I have no idea about how many other programs have gone to unusable state.    Is there any way to undo the effects of above mentioned two commands ? How can I restore the default permission settings to whole filesystem ?


How to do a generalized linear model with multiple dependent variables in R?

I have six dependent variables (count data) and several independent variables, I see that in a MMR the script goes like this:  my.model <- lm(cbind(DV1,DV2,DV3,DV4,DV5,DV6) ~ IV1 + IV2 + ... + IVn)   But, since my data are counts, I want to use a generalized linear model and I tried this:  my.model <- glm(cbind(DV1,DV2,DV3,DV4,DV5,DV6) ~ IV1 + IV2 + ... + IVn, family="poisson")   And appears this error message:  Error in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  :    (subscript) logical subscript too long`   Can anyone explain me this error message or a way to solve my problem?


How to interpret white noise test from Stata? Have a white noise means that a variable does not have autocorrelation.  Can I say here that all of my variables has a white noise (does not have autocorrelation)? How can I see it?   wntestq a   Portmanteau test for white noise  ---------------------------------------   Portmanteau (Q) statistic =    28.0682   Prob > chi2(40)           =     0.9221    wntestq b   Portmanteau test for white noise  ---------------------------------------   Portmanteau (Q) statistic =   162.3201   Prob > chi2(40)           =     0.0000    wntestq  c   Portmanteau test for white noise  ---------------------------------------   Portmanteau (Q) statistic =   162.6615   Prob > chi2(40)           =     0.0000    wntestq  d   Portmanteau test for white noise  ---------------------------------------   Portmanteau (Q) statistic =   192.8795   Prob > chi2(40)           =     0.0000    wntestq  e   Portmanteau test for white noise  ---------------------------------------   Portmanteau (Q) statistic =   182.2451   Prob > chi2(40)           =     0.0000    wntestq  f   Portmanteau test for white noise  ---------------------------------------   Portmanteau (Q) statistic =   126.0059   Prob > chi2(40)           =     0.0000


Here is the code  function SuperType(){     this.property = 'aa'; }  SuperType.prototype.property='aaa'  SuperType.prototype.getSuperValue = function(){     console.log("this===s : "+(this===s))     console.log("this===SuperType.prototype : "+(this===SuperType.prototype))     return this.property; }    var s=new SuperType(); console.log(s.getSuperValue())   My question is why this in getSuperValue refer to s ? In a normal sense,it should refer to 'SuperType.prototype'.  At first glance, getSuperValue() is called by s ,so this in getSuperValue scope should refer to s. However s.getSuperValue is actually s.__proto__.getSuperValue() that is why I think this in getSuperValue refer to SuperType.prototype  ==========================================  I studied all the answers in  and failed to find anything explain the question  I real reason is  s.getSuperValue() <=> Object.getPrototypeOf(s).getSuperValue.call(s) while I wrongly regard it as s.getSuperValue() <=> Object.getPrototypeOf(s).getSuperValue()  To those who concerns ,just put the answer here   ===============================================  Got some new understanding of this issue  even though the function reside in prototype  console.log(s.getSuperValue===s.__proto__.getSuperValue) //true   The lookup process is not related to how this is bound  console.log(s.getSuperValue()) // 'aa' console.log(s.__proto__.getSuperValue()) //'aaa'   this is only determined exclusively by where the function is called  =================== update ================  A more demonstrating example :  function merge(a, b){     if (a && b) {         for (var key in b) {             a[key] = b[key];         }     }     return a; }; var a={hello:"world"}  var aa={hi:function () {     console.log(this.hello) }} var aaa=merge(a,aa) aaa.hi()


Spaceship movie/TV-show where the villain appears as electric spark

I watched this English movie or TV show during 1980s in my childhood. The story was in a spaceship. Several people was in the spaceship, among whom the main character was a lady.  The villain appears as electric sparks near the ceiling of a room in the ship. He appears only when a lady remains alone. He then converts to a man in long black robe. He tries to penetrate his metallic long fingernail into her neck. The lady was so scared and tried to escape. One day he was successful to penetrate. Then her mind was converted and inclined to him. Then he took her away with a small space shuttle detached from the main spaceship.  He was driving the shuttle but suddenly he started to be melted down and finally destroyed. Then the lady went back to the main spaceship and met her friends.


Show that $\sum_{n = 1}^{+\infty} \frac{n}{2^n} = 2$. I have no idea to solve this problem. Anyone could help me?


Pronunciation of "-st-". When is it "sd" and when "st"?

I recently found some words but I got confused and don't know whether to say sd or st. I am sure the following are pronounced as st:   sister caster ancestor master   But the following are pronounced as sd:   mysterious destiny stable staple   Is there a rule for changing the pronunciation of t to d following an s?


Is the consciousness currently in oneself the same the the consciousness that used to be or in the future will be in oneself?

People seem to believe that one's consciousness is a "different" consciousness than that of others, but the "same" consciousness as the one that has been in one's body in the past and the one that will be in one's body in the future. How likely is this to be true and why?   Also, I have almost no knowledge about neuroscience, so please refrain from using neuroscience jargon if feasible.


Passwords in the Password/Encryption Keys program

I noticed that I have passwords in the Password/Encryption Keys program  . It appears that anybody who walked up to my computer could go look at all my passwords without needing a master password. Did I do something wrong or is this the default behavior? And if so, why?   and what if i lock my password is it get locked till i log out or for every time when i have 2to see password then i have to unlock keyrings . if then so how i protect my passwords from other . and why it is done so


How are the students at the Citadel recruited?

Can anyone enter as a student at the Citadel ? Or must one be recommended by Lords or a powerful institution?   Aemon Targaryen was a son of a King, so the Citadel would let him access without questioning. Samwell Tarly was sent by Lord Commander Jon Snow, from the Night's Watch. , a novice of the Citadel. A common born but it is not known how he entered the Citadel. We can notice that he is not a good student, but has not been fired.    I don't remember how the other Maesters were recruited, if they are always relatives of Lords, Kings... Can any lowborn commoner just "knock the door", and enter the Citadel?


Can one root server handle over 50M requests per month?

I am running a LAMP Application installed on one server, happily serving about 1M PI per month. Now I am looking into a potential partnership where my app might serve around 50-80M requests per month.   This is how my architecture looks like:   So images are served from static.domain.com while the application is served by www.domain.com. The API where 90% of the traffic comes from is under a seperate https domain api.domain.com but queries the mysql and solr stack.  Would one root server with 128GB RAM and SSDs in SW-Raid 1 with an Intel® Xeon® E5-1650 v3 Hexa-Core Haswell be able to handle that load? Most request will go against solr and deliver just a json feed, potentially not hitting the "disc".   Is this overkill with 128GB of RAM or will one server not even be able to handel that load? I could also go with 2 servers and load balance. Question is how within this architecture.  Thank you for any hint on this.


I am new to snap packages and all. I want to install 'pycharm community' snap package when I'm having a problem while using sudo install pycharm-community snap it says install: cannot stat 'pycharm-community': No such file or directory what should I do ?


For natural numbers $a,b$ the operation $a^b$ is defined as $a * a * a * a \cdots b$ times. However when you get to negative powers, complex powers, complex bases, polynomial expressions etc then this definition falls flat. So what exactly is exponentiation?


Is $\frac{(3n)!}{n!(n+1)!(n+2)!}$ integer for any integer $n \ge 3$?

Inspired by  and its comments, I suspect that:  $$\frac{(3n)!}{n!(n+1)!(n+2)!}$$  is integer for any integer $n \ge 3$, because I have run  at WolframAlpha.  I tried some binomial coefficient manipulation, like in the linked question, without success.  Any idea?


Just the other day, I was talking to my mom about how the people who had been brave enough to take part in world war 2 were people we should look up to. Just the other day, I was talking to my mom about how the people who have been brave enough to take part in world war 2 were people we should look up to.  Are both the above sentences grammatically correct? What's the difference in their meaning.


How to return array from label offset expression?

I am trying to set the x,y offset of layer labels based on a data defined override. What I'm trying is the following:  CASE WHEN name is 'Brooklyn Bridge' [3.5, 0] ELSE [-3.5, 0] END   However this does not seem to be the correct syntax to set x and y values simultaneously. How would you do this?


Which hook can I use to retrieve form values after submitting a webform?

As the title suggests, I would like to know what is the correct hook for retrieving datas after a submission. The goal is to do a task based on the value of a data. Any help would be appreciated.


What is the smallest possible Linux implementation?

What are the bare minimum components for a Linux OS to be functional, and that I can use as a base to expand and improve as I learn Linux and my understanding and needs grow?


Clarification on proof that for a linear map T, being continuous and being Lipschitz are equivalent statements

I know that in general for any function $f:V \longrightarrow W $ from a normed vector space $V$ to a second normed vector space $W$, being a Lipschitz function implies being continuous, is the second implication on my question the one I'm having troubles to understand.


We in see in end of Game of Thrones that Jon Snow has to go to Castle Black as part of his punishment for killing Daenerys. But then he goes with the wildlings beyond the wall. Why did he go with them and not stay at Castle Black?


My name is changed for whole network except for stackexchange.com

I have recently changed my name from Onurcan B. to onurcanbektas in the network, but while changing it, firstly I saved it for only math.SE by mistake and then right away I saved it for the whole community, but when I had checked the other website, my name wasn't changed, so I have entered the "edit profile" menu from physic.SE and changed my name and saved for the whole network and this changed my name for whole network except for the main stackexchange.com.  I have tested if I check the user , I redirects me to , and still the page shows my name as Onurcan B., so how can I solve this problem, and what is the reason for this problem ? Is this bug ?


iOS - Loading text from website has HTML tags in text view. Need to remove them

In my app, I have a table view with a detail view. The detail view loads blog posts from  and the detail view will display the text from that post. I almost have it working but I still need to figure out how I can fix the text (example below). Here is the code I have to pull the text from the website in the detail view:  -(void)viewDidLoad {                                           //self.url is from the table view where the link to the website is     NSURL *myURL = [NSURL URLWithString: [self.url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];     NSURLRequest *request = [NSURLRequest requestWithURL:myURL];      [self.webView loadRequest:request];      timer = [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(LoadText) userInfo:nil repeats:YES];  }  -(void)webViewDidLoadText {      NSString *textForBlog = [self.webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByClassName('paragraph')[0].innerHTML;"];      self.textView.text = textForBlog;  }


Why we need to use DML Statement in ‘after trigger’ and not in ‘before trigger’?  Thanks  KS Kumar


What is the CDF of the sum of weighted Bernoulli random variables?

Let's say we have a random variable $Y$ defined as the sum of $N$ Bernoulli variables $X_i$, each with a different, success probability $p_i$ and a different (fixed) weight $w_i$. The weights are positive and between ~0.001-1,000 with a handful of outliers.  If it would make the problem more tractable, it would be OK to discard both the very large and very small outliers.  Formally, $Y = \sum X_i w_i$   Where $\Pr(X_i=1)=p_i$ and $\Pr(X_i=0)=1-p_i$.  $N$ can range from ~10-10,000. I would like to quickly compute a approximation to $\Pr(Y<=k)$ (where $k$ is given).  The data I'm handling comes from real life bets, each with implied odds $p_i$ and wager $w_i$. Here are plots showing the rough distribution of the probabilities and weights:      One way to compute the approximation is through Monte Carlo simulation, but that can get slow for large values of $N$. One can also use the Central Limit Theorem to compute this for large $N$, but the accuracy is quite poor for small $N$ (or if there are a handful of large weights). Finally, there are ways to improve on the CLT approach by using asymptoptic expansions, e.g.:  Volkova, A. Y. (1996). A refinement of the central limit theorem for sums of independent random indicators. Theory of Probability and its Applications 40, 791-794.  However, as far as I've seen, the refined approximations only specify how to compute $Y$ if all weights $W_i$ are equal to 1 (a standard Poisson Binomial distribution). Is there a way to compute an answer that works for small and large $N$ with a smaller error than a pure CLT approach without having to resort to Monte Carlo Simulation? In other words, is it possible to extend the improved closed-form approximations to allow weights not equal to 1?  Some related questions that don't quite answer mine:    (Pure CLT is too inaccurate)  (No answer)  (The bounds mentioned in [Raghavan, 1988] are very, very wide for small N or when computing the CDF near the mean)


Academic affiliation on papers written while between jobs

There have been many questions in the past about choosing an affiliation to write on your papers. This one has a nuance that is a bit different from having two jobs.  I am currently between two jobs (PhD student and postdoc) and currently not academically affiliated to either. I am currently writing a paper and I am trying to figure out if I put my PhD affiliation or my postdoc affiliation.  The reason for the PhD affiliation is because a lot of the work was done there.  The reason for the postdoc affiliation is because then anyone could contact me for correspondence with respect to the paper.    I feel there must be a hard and fast rule to this, so I was hoping someone could enlighten me.   Thanks!


Energies and numbers of bound states in finite potential well

Hello I understand how to approach finite potential well (I learned a lot in my other topic ). However i am disturbed by equation which describes number of states $N$ for a finite potential well ( $d$ is a width of a well and $W_p$ is potential  ):   $$ N \approx \dfrac{\sqrt{2m W_p}d}{\hbar \pi} $$  I am sure it has something to do with one of the constants $\mathcal L$ or $\mathcal K$ defined this way:  \begin{align} \mathcal L &\equiv \sqrt{\tfrac{2mW}{\hbar^2}} &  \mathcal{K}&\equiv \sqrt{ \tfrac{ 2m(W_p-W) }{ \hbar^2 }} \end{align}  and the transcendental equations for ODD and EVEN solutions:  \begin{align} &\frac{\mathcal K}{\mathcal L} = \tan \left(\mathcal L \tfrac{d}{2}\right) &&-\frac{\mathcal L}{\mathcal K} = \tan \left(\mathcal L \tfrac{d}{2}\right)\\ &\scriptsize{\text{transc. eq. - EVEN}} &&\scriptsize{\text{transc. eq. - ODD}} \end{align}  QUESTION: Could anyone tell me where does 1st equation come from?


How do I sort the questions by the number of views?

The question is in the title, how do I sort the questions by the number of view?   If not that, I'd settle for any suggestion on how to view the "Most Viewed" questions.


How to install windows on Ubuntu Installed drive which i formatted using GParted Live CD

By mistake i formatted the drive in which Ubuntu 14 was installed by using GParted Live CD. Now i want to install Windows to it, but nothing is booting up. I tried DVD and USB. All my pc showing up is GNU Grub. I don't know what to do?? Please help. Thanks


I'm trying to get an accurate index pass for compositing. My geometry (a window in this case) consists of straight lines and it would be nice to have a perfect mask for color correction. As you can see Anti-Aliasing is enabled, but there are still some weird pixels:    Until now my workaround was to blur the image, but in this case straight lines are key to work with. How to achieve this? Is there a render setting to prevent the noise or make it less noisy?


Justifying $\,\Bbb{Z}[i]/\langle 2\rangle\cong \Bbb{Z}[X]/\langle X^2+1,2\rangle\cong \Bbb{F}_2[X]/\langle X^2+1\rangle$

I am asked to describe the quotient ring $\,\Bbb{Z}[X]/\langle X^2+1,2\rangle$ in two different ways. I would say that $\Bbb{Z}[X]/\langle X^2+1,2\rangle$ is isomorphic to $\Bbb{F}_2[X]/\langle X^2+1\rangle$ and $\Bbb{Z}[i]/\langle 2\rangle$ but I am not sure how can I justify that. Does we have $\langle X^2+1,2\rangle=\langle X^2+1\rangle\langle2\rangle$? I think the answer is no, because $\langle X^2+1,2\rangle=2P(X)+(X^2+1)Q(X)$. How can I justify the two isomorphism ?


When I parse an empty string from a textview, it says unknown int "" when I already set a conditional if that takes that case. Code as below.   else if (naqaBoolean) {                     int i;                     int durasiHaidh = 24;                     int tempohSebenar = 0;                     for (i = 1; i < 17; i++){                         TextView tvStatus = findViewById(getResources().getIdentifier("status" + i, "id", MainActivity.this.getPackageName()));                         TextView tvTempoh = findViewById(getResources().getIdentifier("tempoh" + i, "id", MainActivity.this.getPackageName()));                         TextView tvMenstruasi = findViewById(getResources().getIdentifier("menstruasi" + i, "id", MainActivity.this.getPackageName()));                         int hariIni = 0;                         String text = (String.valueOf(tvTempoh.getText()));                         if(text == "Seharian"){                             hariIni = 24;                         } else if (text == "-"){                             hariIni = 0;                         } else if (text == ""){                             hariIni = 0;                         } else {                             hariIni = Integer.parseInt((String) tvTempoh.getText());                         }                              tempohSebenar = tempohSebenar + hariIni;                     }                      Toast.makeText(getApplicationContext(), tempohSebenar, Toast.LENGTH_SHORT).show();                 }


Why is my adj.listIterator giving a null pointer exception in BFS?

Here I am using a different class to implement graph using adjacency List.I included almost everything that is there, but still i am getting this error     public class Breadth_first_Traversal {   Graph g; void BFS(int s,int v){     boolean[] visited=new boolean[v];      LinkedList<Integer> q1=new LinkedList<Integer>();     q1.add(s);     visited[s]=true;     while(q1.size()!=0){         s=q1.poll();         System.out.print(s+" ");         Iterator<Integer> i=g.adj[s].listIterator();         while(i.hasNext()){             int n=i.next();             if(!visited[n]){                 q1.add(n);                 visited[n]=true;             }         }     } } public static void main(String args[]){     Breadth_first_Traversal bfs=new Breadth_first_Traversal();     Graph gr=new Graph(4);     gr.addEdge(0, 1);     gr.addEdge(0, 2);     gr.addEdge(1, 2);     gr.addEdge(2, 0);     gr.addEdge(2, 3);     gr.addEdge(3, 3);     bfs.BFS(2, 4); }   Output  2 Exception in thread "main" java.lang.NullPointerException at Graph_data_structure.Breadth_first_Traversal.BFS(Breadth_first_Traversal.java:21) at Graph_data_structure.Breadth_first_Traversal.main(Breadth_first_Traversal.java:40)Picked up _JAVA_OPTIONS: -Xmx512MJava Result: 1BUILD SUCCESSFUL (total time: 1 second)   Please help.


Let $M$ be a closed subspace of a Hilbert space $H$. Let $P$ be the orthogonal projection on $M$. I was told to find the eigenvalues and eigenvectors of $P$ and moreover say when it is compact.  Since $M$ is closed we have $H\cong M\oplus M^\perp$ and this is an eigenspace decomposition so $P$ has eigenvalues $1,0$ and eigenvectors the elements of $M,M^\perp$ respectively. Is there any formal explanation I emphasize in the infinite dimensional case?  If $M$ is finite dimensional $P$ is finite rank so compact. I don't see anything but that...


How to Pin Firefox Development Version to Ubuntu Dock on Ubuntu 18.04?

How do you pin Firefox Development Version to the dock of Ubuntu 18.04?  When I ran it goes to the Dash board but a right click does not show option to add to favorites?


Displaying and storing Windows Batch file output

I've got a batch file written that runs a program we've developped, passing in a number of parameters. Whilst running the program in debug mode, a large number of debug messages are output, which it would be handy to review later, although I still want to be able to see the program running "live" as it were, within the cmd.exe window.  In a *nix environment I could use Tee to output to both the text file and stdout. Any suggestions?


Remove directory from a saving .gen file using grep command

I have used the grep command to match a pattern then the matching row has saved in a file. But when saved the result it's saved with the file directory. But I want to save only the row result not the directory. my command : grep -r 'rs689 ' $TMP_DIR/ >> $GEN_FILE  and output of the genotype file is like that: impute-out/tmp_impute2:SNP1298 rs689 2182224 A T 1 0 0 impute-out/tmp_impute2_info:SNP1298 rs689 2182224 A T 0.000 1.000 1.000 2 0.000 0.000 -1.000 impute-out/tmp_impute2_haps:SNP1298 rs689 2182224 A T -1 -1 impute-out/tmp_impute2:SNP4568 rs12722495 6097283 T A 0 0 1 impute-out/tmp_impute2:--- rs12722495 6097283 T C 0.250 0.500 0.250  I want to save the output in this file like : SNP1298 rs689 2182224 A T 1 0 0 SNP1298 rs689 2182224 A T 0.000 1.000 1.000 2 0.000 0.000 -1.000 SNP1298 rs689 2182224 A T -1 -1  Please suggest me how to remove the directory when saving the file. or Is there any regular expression to use in grep command which will remove directory during save the result?


I am using multiple nested for loops. In the last loop there is an if statement. When evaluated to True all the for loops should stop, but that does not happen. It only breaks out of the innermost for loop, and than it keeps on going. I need all loops to come to a stop if the break statement is encountered.  My code:  for i in range(1, 1001):     for i2 in range(i, 1001):         for i3 in range(i2, 1001):             if i*i + i2*i2 == i3*i3 and i + i2 + i3 == 1000:                 print i*i2*i3                 break


I cannot seem to properly configure my texprofile in TeXstudio to change to dark mode. I have downloaded the .txsprofile from , but upon following the instructions (saving the current profile and attempting to add the dark mode .txs file) nothing happens - I am still in the normal mode.  I am not sure what I need to post in order to better obtain help here. Could someone please advise me?  Thanks.


Can users with over 2000 rep suggest edits?

A lot of times I've seen a post and wanted to edit it, but I wasn't sure if it changed the original intent of the post, or would be helpful, so I held off, knowing that my edits would be binding unless someone edited them out or rolled back the changes.   In these situations, it would be great to be able to suggest an edit, to see if the rest of the community agrees with the edit. Instead of them having to undo a bad edit of mine, it would be better to have the edit rejected before it ever gets seen by other users. There are a few things that could be used in replacement for a >2k rep user suggesting edits, such as   Editing it anyway, but writing in the edit summary "I'm not sure if this changes the meaning of the post" Asking about the potential edit in a comment Going on chat and asking about it there Open a new browser and suggest an edit anonymously   However, all of these seem like workarounds. I think it'd be nice to at least have the edit approved by one other person if you're unsure about it. Perhaps a button on the edit window saying "Do you want this edit to go into the queue"?


could somebody help me with my APA references for my thesis? This is my code and all the packages that I include.  \documentclass[ 11pt,  english,  onehalfspacing  ]{MastersDoctoralThesis}  \usepackage[utf8]{inputenc} % Required for inputting international characters \usepackage[T1]{fontenc} % Output font encoding for international characters \usepackage{microtype} \usepackage{palatino}  \usepackage{multirow} \usepackage[table,xcdraw]{xcolor} \usepackage[backend=biber,style=apa,sorting=none,natbib=true]{biblatex} \usepackage[style=apa]{biblatex} \addbibresource{library.bib}  \usepackage[autostyle=true]{csquotes} \usepackage{datetime} \usepackage{pfnote} \usepackage{epstopdf} \usepackage{float} \usepackage{comment} \usepackage{subfig} \usepackage{graphicx} \usepackage{color} \usepackage{pdfpages} %\captionsetup[subfigure]{labelfont=rm} \captionsetup[subfigure]{margin=0pt, parskip=0pt, hangindent=0pt, indention=0pt, labelformat=parens, labelfont=rm} \printbibliography[heading=bibintoc]   <<-- here I always get the error: Undefined control sequence   I get a table with references, almost in the right way but unfortunately not alphabetically sorted and with "yearmonthday" in brackets instead of the year of publication.   Does somebody know my mistake? Thank you very much!


Tool comparable to Windows Paint that would run on Linux

I have Paint on Windows and I use it for combining images from different files. Say I have several pictures I want to combine into one. Is there any linux application that will do that?


Why are new icons inserted between locked icons (instead after locked items) in the Unity Launcher?

I have a launcher like this with a couple of locked items:     I use this feature a lot to use Super+[0-9] to quickly access recurring apps. Now if I open a new application the icon is inserted between the first and the second locked icon instead after all locked items. Say I open Thunderbird over Unity search:     Now it's inserted at position 2 which obviously breaks my Super+Num keys for any following locked item. The only thing to work around this would be to lock this icon as well, but that's not what I want to do. Standard behaviour anywhere else I know (Windows, MacOS) is that unknown apps are appended after all locked items.   Any help would be appreciated.


With React.createElement, how to play a sound when mousing over an image?

I have a working grid, with images and links, so when you click the image, it takes you to the link.   Here is the working Axios code. (Working means this const is part of the other code):  const grid_display = ({ url, key }) => React.createElement("div", { className: "image-item", key: key }, React.createElement("a", { href: "https://www.example.com"}, React.createElement("img", { className: "grid-img", src: url })));   So I need to add to that code, the following:   A mouseover / hover event Play a mp4 file (basically a link to a sound), via script function Keep same code, but just ADD the playing of sound NOTE: this code is all dynamic: all images, links, sounds are passed into this script from a database. Can't use any type of extra plugin . I'm looking to just add the correct line or syntax so the React.createElement statement works/adds the mouseover event or hover event.   As far as how the sound is played... any way that is fast, simple, uses minimal resources, etc. I'm thinking the sound clips will only be 5 seconds, 10 at max.  So, the better issue I'm having is, how do you put this solution...    ...in the React.createElement statements above?


Showing   $A \subset B \iff A\cap B=A$  How would I show this?  My proof  Assume  i. $A \cap B \subset A$  ii.$A \subset A \cap B$  Let $x$ be any element.  Assume $x \in A \cap B$. Then $x \in A$ and $ x \in B$. By hypthesis $x \in A \rightarrow x \in B$ Thus $x \in A$  ii.  Let $ x \in A$ By hypthesis $x \in A \rightarrow x \in B$   thus $x \in A \cap B$.  Part 2  $ A\cap B=A \rightarrow A \subset B$  But I find myself stuck here.


Table and Figure side-by-side with Table caption above, Figure caption below

A continuation of .  I'm fighting a page-limit in a single-column layout and I need to put a Figure and a Table side-by-side and provide them with independent captions. However, the style guide for the publishers (LNCS) wants Figure captions below and Table captions above (probably something to do with ).   =======================================================  If I adapt @lockstep's floatrow example from  accordingly to have a Table caption above ...  \documentclass{article}  \usepackage{floatrow} % Table float box with bottom caption, box width adjusted to content  %% ********************************** %% just adding \captop to original example %% ********************************** \newfloatcommand{capbtabbox}{table}[\captop][\FBwidth]  \usepackage{blindtext}   \begin{document}  \blindtext  \begin{figure} \begin{floatrow} \ffigbox{%   \rule{3cm}{3cm}% }{%   \caption{A figure}% } \capbtabbox{%   \begin{tabular}{cc} \hline   Author & Title \\ \hline   Knuth & The \TeX book \\   Lamport & \LaTeX \\ \hline   Knuth & The \TeX book \\   Lamport & \LaTeX \\ \hline   Knuth & The \TeX book \\   Lamport & \LaTeX \\ \hline   \end{tabular} }{%   \caption{A table}% } \end{floatrow} \end{figure}  \end{document}   =======================================================  The problem becomes clear ...    =======================================================  The floatrow doesn't correctly line up the Table and Caption. I reluctantly tried to use vspace to solve the problem, but it didn't work out.  Any suggestions on how to get these two to align? I'm happy to accept any alignment that ensures that the Table and Figure fit within the same "box".  (A similar-ish question was , but specific for subfig and with a very localised problem it seems.)


I have found during looking at the book Linear Algebra and its Applications (K. Nordstrom) some weird (for me) notation for belonging to the unit interval, namely, $\lambda \in \  ] 0,1 [$. Does it mean as always that $\lambda$ belongs to $[0,1]$ or something different?


I need to prove the following equality by induction: $$\left(\sum_{i=0}^nx^i\right)^{} =\frac{1-x^{n+1}}{1-x}$$ for every x except $$x\neq 1$$ Could anyone give me a hint about this? Thank you


I was watching a PHP tutorial and noticed that the teacher was adding varibles to his echo statements in a different way to me. This got me thinking, which way should I be using? Is one more correct than the other?  Here's what the teacher was doing  echo "Example " . $example;   Here's what I do  echo "Example $example";   My method works, but I don't want to get into any bad habits. Could someone please tell me which way I should be using (preferably with some evidence)?