Plural-active, singular-active or another voice when writing a paper by yourself?

I'm working on a draft paper which will likely have no coauthors. I'm wondering how to phrase my paper, and the abstract especially, in terms of voice. Which of the following should I prefer?   "We present XYZ ..." "This paper/this work presents XYZ ..." "I present XYZ ..."   The former sounds a bit too "royal", the second is the passive voice which I tend to avoid, and the third seems overly presumptuous.  What should I go for? Or - am I missing a fourth option?  Note: In case it matters, the paper is in some branch of applied Computer Science.


When is the need for a moderator's attention determined with low quality questions?

During my daily check of SO, i came across  question,   So naturally i flagged it as low quality since such questions are impossible to answer. But for some reason the moderator reviewing the flag declined it.   The question at hand here, when is a question worthy of flagging for a moderator's attention, should we simply ignore such questions in the future? If not then what would be the appropriate way to deal with the situation?


I'm trying to use MigLayout for my project but i'm struggling to understand the logic.  I'd like to place 2 labels on top and at the bottom of a certain panel with a margin of 20px between the labels and the ends of the panel.  Moreover, he labels must be centered horizontally.  Any ideas on how to do this ?


How does "curved space" explain gravitational attraction?

They say that gravity is technically not a real force and that it's caused by objects traveling a straight path through curved space, and that space becomes curved by mass, giving the illusion of a force of gravity.  That makes perfect sense for planetary orbits, but a lot less sense for the expression of gravity that we are the most familiar with in our day-to-day lives: "what goes up must come down."  Imagine that I hold a ball in my hand, several feet off the ground, with my fingers curled around it, and my hand is above the ball.  Then I open my fingers, releasing my grip on it, being very careful to not impart any momentum to the ball from my hand as I do so.  An object at rest remains at rest unless acted upon by an outside force.  If the ball is not moving (relative to my inertial reference frame), it has no path to travel that's any different from the Earth's path through space.  It should remain at rest, hanging there in the air.  And yet it falls, demonstrating that an outside force (gravity) did indeed act upon it.  How does curved space explain this?


Reduce laptop screen brightness below minimum in Ubuntu 13.10

My laptop configuration is Dell Inspiron 1440. I want to reduce my laptop screen brightness in Ubuntu below the minimum level that can be set using system settings. I usually set my screen brightness to an ultra low level, as it hurts my eyes.   I have already searched for the solution online and found related posts:     – I have already tried the solution mentioned in that article.    The problem is that in my case the screen brightness value in the file /sys/class/backlight/acpi_video0/brightness is already 0.   I have tried installing backlight and setting it to 0, and overwriting the value again as described in one of the posts above. However, none of it helps. I am currently using the latest version of Ubuntu 13.10. Thanks,


I am a beginner in java programming. I am trying to develop a program but when I ran my program which is posted below and it came back with this error:     Exception in thread "main" java.lang.NullPointerException       at dist.main(dist.java:13)   import java.lang.Math; class Point {      int x;   int y; }  public class dist {     public static void main(String[] args) {             Point[] pt = new Point[3];         pt[0].x = 40; pt[0].y = 40;         pt[1].x = 40; pt[1].y = 30;         pt[2].x = 26; pt[2].y = 30;  for(int i = 0 ;i < pt.length ; i ++){          pt[i] = new Point(); }           int ux = pt[0].x - pt[1].x;         System.out.println("ux:" + ux);          } }


What is the correct answer to this expression:    $26^{32}  \pmod  {12}$    When I tried in Wolfram Alpha the answer is $4$, this is also my answer using Fermat's little theorem, but in a calculator the answer is different, $0.$


Why in these matrices are $AB=BA$ not equal? What is the logic behind them?

We know that in matrices AB=BA.Why in this Matrices $A=\begin{bmatrix} -1 & 3\\  2 & 0\end{bmatrix}$, $B=\begin{bmatrix} 1 & 2\\ -3 & -5\end{bmatrix}$ are not equal to $AB=BA$. WHY? This is matrix  of order $2\times 2$ for both $A$ and $B$.


How to clear the pre-login screen in Redstone 4 (Win 10 ver 1803) of all the "tips"?

In Redstone 3, which I still run on some machines, the pre-login screen, i.e. the screen on which you tap or click so you get the password box to pop-up is just an image. In Redstone 4, Miscrosoft added some "useful" tips to this screen, along the lines of "do you like this image?" or "get entertainment from the Windows store" (or something like that). I don't know how take a screenshot of this pre-login screen, but if you doubt me, I can probably take a photo with my camera. Anyway, is  there a way to stop Redstone 4 from giving all these tips on the pre-login screen? When you actually click/tap somewhere other than on the tips, they do go away and the password box pops in. But I dislike the visual clutter these tips provide.  N.B.: after a bit more googling, it looks like the official name for this pre-login screen is the "lock screen".


So  i have a scene with a few objects, and a water simulation in the scene. However I want to animate the camera turning around in the scene, while the water simulation is frozen in time. So something like a time freeze effect. But when ever I try to render an animation it renders the water simulation too. I just need one frame of the water simulation. Is there a way to do this?


How to put marker on vector layer with lat/lon on QGIS

I have a vector layer, and bunch of lat/lon values. I want to put markers on the vector layer for each lat/lon pair. I have never used QGIS, would you help with it.


Parametric Equation of a Circle in 3D Space?

So, my dilemma here is... I have an axis. This axis is given to me in the format of the slope of the axis in the x,y and z axes.  I need to come up with a parametric equation of a circle. This circle needs to have an axis of rotation at the given axis with a variable radius.  I've worked on this problem for days, and still haven't come up with a solution.  I'm using this circle to map the path of a satellite, programmed in C.  And help would be greatly appreciated.  Thanks!


I have seen several instances of this over the last week and wanted to get a viewpoint from the higher-ups.  This question addresses the corollary to this    Please consider the following prototypical (context free) thread...  Question Title:  How to make my doodlies fit? Text:  I can't make all my doodlies fit, can anyone help?  Answer: Move some of them over there. Comment:  WOW! that really worked!  But now I have humpers            on the carumpers!  How to fix that?   In essence, the person got 'unstuck' and proceeded with his project only to encounter the next problem that appeared on his awareness horizon.  And this is sometimes in a completely new area all together, hence the 'Russian Doll' metaphor.  I have left indicative commentary, but this seems to be ineffective.  Flag?  D/v?  Retag?  Edit the question?


5h ago steam was running well, but now there's an error occuring when i try to launch steam: [0913/173803:WARNING:proxy_service.cc(958)] PAC support disabled because there is no system implementation  I have my system upgraded.  Any ideas?


Identification of a science fiction book about a private eye,

I'm hoping you can help me find a book's title and author. It was a book I had seen before but didn't buy.   The plot followed a private detective set in a future where all people lived in segregated communities based on their similar interests. So for instance, scientists would live in a district where others were like-minded in their pursuit of knowledge, etc. This private detective lived in a district where people were fascinated by displaying and observing the vibrant spectrum of colours. I'd like to express my thanks in advance for any help you can give me.


I want to make a pretty lean phone validation - digits, hyphens and spaces, no less than 6 symbols.    \d+[- ] does what I want but I want to check the length too. Obviously, (\d+[- ]){6,15} doesn't work but I imagine it to be something similar. I'd like to limit the length of the whole string too.    Some things I'd like to be valid: - 0123456789 - 1-800-555-2468 - 1 234 4567


Lets suppose I have a listener for a Button  public class Visualizer1 implements ActionListener {         public void actionPerformed(ActionEvent a) {             try {                 Runtime rt2 = Runtime.getRuntime();                 Process p = rt2.exec("visualizer/vis1.exe");                 InputStream in = p.getInputStream();                 OutputStream out = p.getOutputStream();                 InputStream err = p.getErrorStream();                  p.destroy();             } catch (Exception exc) {/* handle exception */             }   the "vis1.exe" will execute without any problem and it will open up but if I have an application with a ".bat" extension like if it was(vis1.bat), it won't open up.  Note: .bat extension is an executable file


Why is cross chaining 'bad', but 1x is OK?

When you run 1x, aren't you basically force to cross chain?


Does absolutely convergent trace series imply that the operator is of trace class?

Let $\mathscr{H}$ be a separable Hilbert space and let $T\in B(\mathscr{H})$ be such that $\displaystyle \sum_{j=1}^\infty\langle T\xi_j,\xi_j\rangle$ is absolutely convergent for any choice of orthonormal basis $\{\xi_j\}$. Does this imply that $T$ is trace-class?  The converse is true and easy to prove. It is a question from Conway's book on Operator theory.


Proving If $k \le \left\lfloor \frac{n}{2} \right\rfloor$ then $\binom{n}{k-1} < \binom{n}{k}$

So I'm trying to do a proof for this problem:  If $\displaystyle{k \le \left\lfloor \frac{n}{2} \right\rfloor}$ then $$\displaystyle{\binom{n}{k-1} < \binom{n}{k}}$$  I can do it algebraically but my professor asked for a combinatorial proof.  How would one does it?


Probability of seeing a certain sequence of results within a larger set of event results

If I have an independent event E with two possible outcomes x and y with their own probabilities p(x) and p(y) and I then repeat event E a certain number of times (n), how can I calculate the probability of that sample of n events containing at least one sequence of consecutive identical results at least L occurrences long?  So for example, if I roll a fair 6 sided die each morning and consider it a "win" when I roll 5 or 6, how do I calculate the chances that if I do this for a year, I will have at least 9 "wins" in a row at some point?  So in my above example:  E: Rolling a fair six-sided die x: Rolling 5 or 6 y: Rolling 1, 2, 3 or 4 p(x): 1/3 p(y): 2/3 n: 365 L: 9   Can I show for any values of these variables how to determine the probability of there being at least one instance of L consecutive occurrences of x within my n quantity of trials of E?


Why does the electric field of an infinite line depend on the distance, but not on an infinite plane?

I understand that with an infinite plane, as you get closer, the infinitesimal contributions to the electric field become greater in module. The direction of the vectors become less perpendicular to the plane as you get closer, hence reducing the overall electric field in the perpendicular direction. Both effects offset each other such that the electric field is the same at whatever distance.  However, wouldn't this same argument apply to an infinite line? Gauss's law shows that the electric field of an infinite line depends on the distance, but supposedly the same would happen as with the infinite plane, and yet it doesn't.  Does anyone have an explanation for this?


Let $G = U(n)$ be the Liegroup of $n \times n$ unitary matrices and $\mathfrak{g}$ the corresponding Lie algebra.  Now $G$ can act on $\mathfrak{g}$ by the Adjoint-action. Since $G$ is a subgroup of $\mathbb{C}^{n \times n}$ the adjoint-action is just   $$G \times \mathfrak{g} \to \mathfrak{g}, \ (X, A) \mapsto XAX^{-1}=XA\overline{X}^T.$$  I know, that $G_A = \{X \in G | XAX^{-1} =A\}$. Is then the Lie algebra of $G_A$ given by  $\mathfrak{g}_A = \{X \in \mathfrak{g} | [X,A] = XA-AX =0\}$?


How to /testfor snowball a snowball hitting the ground or mobs?

I decided to make a snowball grenade, but I stuck at how to /testfor the snowball when it hits a mob or the ground. Is there a scoreboard command that can help me? For example   /scoreboard players set @e[type=snowball] hit 1 {onground:1b}


Palindrome regex unintentionally ignoring case

I need to check a string for all (case sensitive) substrings which are palindromes between 2 and 7 characters with space being the separator (i.e. "aba abbbbba daba" returns "aba" and "abbbbba" but not "daba") in Javascript. This is my code.  var regex= /\b(\S?)(\S?)(\S)\S\3?\2?\1?\b/g  It works for tests I've thrown it to work so far, except for case matching. "abbA CdDc" is throwing up a match but I can't work out why since I haven't included the i flag. I'm assuming that something in my capture groups or backreferences is telling it to ignore case, but I can't work out what or how to fix it.


What would be pure energy ?An example of pure energy?

Is electron a form of pure energy . What would be pure energy,or what could be referred as the original form of energy. From where all things begin.Has this been found out. Or the universe is thought to exist just by itself??


Connect New MacBook (USB-C) to Apple Cinema Display 30" (Dual-Link DVI)

Because Apple Thunderbolt Display reflects the whole room, I still use the matte 30" Apple Cinema Display. (Two cables are required for 2560 resolution due to some obscure technical constraints!)   MacBook Air (Mini DisplayPort + USB)  Apple Cinema Display 30" (DVI)   How do I connect the MacBook (USB-C) to the 30" screen with 2560 resolution?   MacBook (USB-C) (What goes here?) Apple Cinema Display 30" (DVI)


I have a datable code to generate a string, which is sb.ToString().  DataTable dt = dbaccess.GetDataTable("TEST"); // get datatable List<DataRow> drlist = dt.AsEnumerable().ToList(); // each row only has one element. StringBuilder sb = new StringBuilder();  foreach (DataRow row in drlist) {     foreach (string str in row.ItemArray)     {         sb.Append(str);     } }   The datatable is   NULL 0 138 337 1666 1680 2511 8113   You see that there is "NULL" to cause the error "Unable to cast object of type 'System.DBNull' to type 'System.String'.  How to fix it?


I am new on Ubuntu, and am running it off a pendrive on a Asuspro laptop. I cannot get the wireless to work, I cannot "enable wifi" even though I click on it.  I have read the other threads were others have similar problems, but they don't seem to work for me.  ubuntu@ubuntu:~$ rfkill list all 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 1: acer-wireless: Wireless LAN     Soft blocked: yes     Hard blocked: no 2: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no  ubuntu@ubuntu:~$ lspci 00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Device 0a2e (rev 09) 00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09) 00:14.0 USB controller: Intel Corporation Lynx Point-LP USB xHCI HC (rev 04) 00:16.0 Communication controller: Intel Corporation Lynx Point-LP HECI #0 (rev 04) 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-V (rev 04) 00:1b.0 Audio device: Intel Corporation Lynx Point-LP HD Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 1 (rev e4) 00:1c.2 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 3 (rev e4) 00:1c.5 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 6 (rev e4) 00:1d.0 USB controller: Intel Corporation Lynx Point-LP USB EHCI #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation Lynx Point-LP LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation Lynx Point-LP SATA Controller 1 [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation Lynx Point-LP SMBus Controller (rev 04) 02:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b) 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)


I searched all over the internet but didn't find a formal proof for this , so here is my attempt:  $\exists x[P(x)\implies \forall yP(y)]$  Let $x=x_0$. Thus $P(x_0)$ is given.  Let $y$ be arbitrary. So we have to prove $P(y)$.  $y$ being arbitarary means that either $y=x_0$ or $y\ne x_0$.  So now we prove $P(x_0) \lor P(z)$ where $z$ is arbitrary and $z\ne x_0$.  $P(x_0)$ is given. So the paradox is true. $\square$  Is this correct ? If not what is wrong ?


Colon before list. What is used after the list?

If my list is at the middle of sentence:     3 proteins: albumin (ALB), catalase (CAT), and epidermal growth factor (EGF)*** were digested with enzymes and mixed with ...   , what should I use at ***?


For any real t and sequence $|x_n|\rightarrow0$, can always find $k_n \in \mathbb{Z}$ s.t. $k_n |x_n| \to t$?

I came across the claim* that given a sequence of positive numbers that converges to zero, it is always possible to find a sequence of integers, so that the product sequence converges to any desired real number. I.e. given $\{ x_n \}$, $x_n>0$, $x_n \to 0$, and $t\in \mathbb{R}$, $\exists$ $\{ k_n \}$, $k_n\in \mathbb{Z}$ such that $k_n x_n\to t$.  I am having a bit of difficulty showing this, any tips? Thanks!  *Appears in lemma 3.43 of Brian C. Hall - Lie Group, Lie Algebras, and Representations.


Safely remove a USB drive using the Win32 API?

How do I remove a USB drive using the Win32 API? I do a lot of work on embedded systems and on one of these I have to copy my programs on a USB stick and insert it into the target hardware.  Since I mostly work on the console I don't like to use the mouse and click on the small task-bar icon hundred times a day.   I'd love to write a little program to do exactly that so I can put it into my makefiles, but I haven't found any API call that does the same thing.  Any ideas?


The title says it all, I guess. Why $$\sum_{i=0}^{w-1}{2^i} = 2^w - 1$$


How to solve "Can't connect to local MySQL server through socket" error?

I kept getting this following error every time I tried to restart MySql. It was working fine before I changed the default data directory.       ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib                                                                                /mysql/mysql.sock' (111)   I know there are other solutions posted by others but none of them worked for me.


After catching my starter Pokémon I've not encountered any more Pokémon, is it entirely random when Pokémon pop up or is there some kind of indicator for me to be on the lookout for?


I attempted to update through the terminal, but it responded with errors I haven't encountered with before.  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   EDIT: I used      sudo apt-get update


I’m looking at Feynman diagrams for attractive forces and I'm thoroughly confused. Below are three diagrams from HyperPhysics:     These all illustrate instances where the forces are attractive. However, why are they drawn exactly as if they were repulsive? Take the first diagram between the electron and the positron. The electron moves to the right while the positron moves to the left, a photon is exchanged, and… the electrons starts moving left while the positron moves right? They move away from each other due to their attractive force? I’m sure I’ve gotten some concepts confused, so I’d be grateful to receive some help here.


How and in what context are polynomials considered equal?

There's two notions of equivalent polynomials floating around, one saying that $f = g$ iff they're equivalent as maps, and the other saying $f = g$ iff they're equal on each coefficient when written in standard form.    I'm interested in polynomials over a finite field, irreducible polynomials and factoring so what type of equivalence should I use?  For instance if we take map equivalence, then there are only a finite number of polynomials.  And that makes a huge difference!  Please explain when it's okay to use what.


Material design - buttons raise, not depress

There is some discussion of this  but I haven't found a more comprehensive discussion of it.  With Material Design, objects that wish to convey being pressed appear to rise up towards the user, rather than get depressed away, as normal buttons do. ()  Why? As pointed out in the original link, it's contrary to what we usually expect, and more importantly, it's contrary to what happens in real life (which is what material design is supposed to represent)  On one of my own sites, at the time this was originally posted, I specifically designed the social media buttons in the footer (and most other buttons) to appear satisfyingly  when active


I gave him 10 iPads and Computers Does this mean I gave him 10 ipads and 10 computers or Computers + Ipads = 10? Sources if any?


How to resize a partition on a server without a display?

I've recently run into an issue where I need to resize a partition on a server, but the issue is, it has no GUI so I cannot use gparted. What should I do in this case?  So I get it that you should use parted. However, how exactly do you use the parted command? What does it mean by start and end?


My requirement  A table needs to maintain a status column.  This column represents one of 5 states.   initial design  I figured I can just make it an integer column and represent the states using a numeric value.   0 = start 1 = running 2 = crashed 3 = paused 4 = stopped   Since I don't want my app to maintain the mapping from the integers to their string description, I plan to place those in a separate state description table (relying on a FK relation).  Then I discovered that MySQL has an ENUM type which matches my requirement exactly. Other than a direct dependency on MySQL, are there any pitfalls with using the ENUM type?


I can't figure out why this value doesn't change

Here is part of my code that I'm messing around with:   import java.util.Scanner; public class Hwk12 { public static void main(String args[]) {     final int ARRAY_SIZE = 100;     int numberElements = 0;     char[] array = new char[ARRAY_SIZE];     getInfo(array, numberElements);     System.out.println(array);     System.out.println("1");     System.out.println(numberElements);     System.out.println(array.length); } public static void getInfo(char[] letters, int numberElements) {     Scanner keyboard = new Scanner(System.in);     System.out.print("Please enter some letters or -1 to quit: ");     String input = keyboard.nextLine();     char characterInput = input.charAt(0);     while(!input.equals("-1") && numberElements < letters.length)     {         letters[numberElements] = characterInput;         numberElements++;         System.out.print("Please enter some letters or -1 to quit: ");         input = keyboard.nextLine();         characterInput = input.charAt(0); }   When I run it and input things, this is the output:       Please enter some letters or -1 to quit: a      Please enter some letters or -1 to quit: s      Please enter some letters or -1 to quit: d      Please enter some letters or -1 to quit: f      Please enter some letters or -1 to quit: s      Please enter some letters or -1 to quit: a      Please enter some letters or -1 to quit: d      Please enter some letters or -1 to quit: f      Please enter some letters or -1 to quit: a      Please enter some letters or -1 to quit: s      Please enter some letters or -1 to quit: df      Please enter some letters or -1 to quit: d      Please enter some letters or -1 to quit: -1      asdfsadfasdd      1      0      100     Why does it display numberElements as 0 when I clearly changed it by increamenting it during the while loop in the getInfo() method?


Newbie question. In Python 2.7.2., I have a problem reading text files which accidentally seem to contain some control characters. Specifically, the loop  for line in f  will cease without any warning or error as soon as it comes across a line containing the SUB character (ascii hex code 1a). When using f.readlines() the result is the same. Essentially, as far as Python is concerned, the file is finished as soon as the first SUB character is encountered, and the last value assigned line is the line up to that character.  Is there a way to read beyond such a character and/or to issue a warning when encountering one?


How to restrict an SSH user to only allow SSH-tunneling?

How can I restrict a user on the SSH server to allow them only the privileges for ? i.e. So they cannot run commands even if they log in via SSH.  My Linux servers are Ubuntu 11.04 and OpenWrt.


Prove gcd is one of the following {1, 3}

Prove that if $\gcd(a, b) = 1$ then $\gcd(2a + b, a + 2b) \in \{1, 3\}$   I can get up to: $\gcd(2a + b, a + 2b) | 3(a + b)$  But I am unable to move forwards. I would like a hint?  BY Bezout's, there exists integers $x, y$ such that $ax + by = 1$.   $d = \gcd(2a + b, a + 2b) \implies (2a + b)u + (a + 2b)t = d$ for integers existing $u, t$.  But this isn't helping much. What can I do?


Source has multiple authors, but only one is listed?

How come authors go missing in my bibliography? It happens for some articles, but never for books or incollections.    This is test.bib  %%% WORKS @article{zarrinbakhsh:improving,  author = {Zarrinbakhsh, Nima and Mohanty, Amar K. and Misra, Manjusri},  year = {2013},  title = {Improving the interfacial adhesion in a new renewable resource-based biocomposites from biofuel coproduct and biodegradable plastic},  pages = {6025--6038},  volume = {48},  number = {17},  journal = {Journal of Materials Science} }  %%% DOESN'T WORK @article{schmid:autoxidation,  author = {Schmid, Manfred and Ritter, Axel and Grubelnik, Andreas and Zinn, Manfred},  year = {2007},  title = {Autoxidation of medium chain length polyhydroxyalkanoate},  pages = {579--584},  volume = {8},  number = {2},  journal = {Biomacromolecules} }   This is test.tex  \documentclass{scrreprt}  \usepackage[     backend=bibtex,     natbib=true,     defernumbers=true]{biblatex} \addbibresource{test.bib}  \begin{document}      This should have more than one author~\citep{schmid:autoxidation}.      This has more than one author~\citep{zarrinbakhsh:improving}.      \printbibliography  \end{document}


You have a six-sided die. You keep a cumulative total of your dice rolls. (E.g. if you roll a 3, then a 5, then a 2, your cumulative total is 10.) If your cumulative total is ever equal to a perfect square, then you lose, and you go home with nothing. Otherwise, you can choose to go home with a payout of your cumulative total, or to roll the die again.  My question is about the optimal strategy for this game. In particular, this means that I am looking for an answer to this question: if my cumulative total is $n$, do I choose to roll or not to roll in order to maximize my cumulative total? Is there some integer $N$ after which the answer to this question is always to roll?  I think that there is such an integer, and I conjecture that this integer is $4$. My reasoning is that the square numbers become sufficiently sparse for the expected value to always be in increased by rolling the die again.  As an example, suppose your cumulative total is $35$. Rolling a $1$ and hitting 36 means we go home with nothing, so the expected value of rolling once is:  $$E(Roll|35) = \frac 0 6 + \frac {37} 6 + \frac {38} 6 + \frac{39} 6 + \frac {40} {6} + \frac{41}{6} = 32.5$$  i.e.  $$E(Roll|35) = \frac 1 6 \cdot (37 + 38 + 39 + 40 + 41) = 32.5$$  But the next square after $35$ is $49$. So in the event that we don't roll a $36$, we get to keep rolling the die at no risk as long as the cumulative total is less than $42$. For the sake of simplification, let's say that if we roll and don't hit $36$, then we will roll once more. That die-roll has an expected value of $3.5$. This means the expected value of rolling on $35$ is:  $$E(Roll|35) = \frac 1 6 \cdot (40.5 + 41.5 + 42.5 + 43.5 + 44.5) = 35.42$$  And since $35.42 > 35$, the profit-maximizing choice is to roll again. And this strategy can be applied for every total. I don't see when this would cease to be the reasonable move, though I haven't attempted to verify it computationally. I intuitively think about this in terms of diverging sequences.  I recently had this question in a job interview, and thought it was quite interesting. (And counter-intuitive, since this profit-maximizing strategy invariably results in going home with nothing.)


How to Achieve this Requirement ???Can i use Jave Script , CSS and Visual force page?

Can any one help me out , based on quote line items can we create a layout like by prepopulating items, price & qty and next 6 qtrs. Example below 2 part numbers are  in quote line items, also default the price from quote line item.  Upon saving ,it should save as detailed record for each quarter. Creating a custom object  and calling them in Visual force page or by using JavaScript and CSS .Any suggestions plz.I shall appreciate your help.  i tried previously in this way   <apex:page standardController="CustomLineItem__c"  sidebar="false" showHeader="false">  <apex:form >   <apex:pageBlock >     <apex:pageBlockButtons location="top">       <apex:commandButton value="SAVE" action="{!SAVE}"/>       <apex:commandButton value="SAVE&MORE" action="{!SAVE}"/>       <apex:commandButton value="CANCEL" action="{!CANCEL}"/>     </apex:pageBlockButtons>     <apex:pageblockSection title="Schedule">       <apex:inputField value="{!CustomLineItem__c.ProductPartNumbers__c}" label="Product"/>        <apex:inputField value="{!CustomLineItem__c.Year__c}" label="Year"/>        <apex:inputField value="{!CustomLineItem__c.PricingRequestsQuarterNos__c}" label="Quarter"/>        <apex:inputField value="{!CustomLineItem__c.Quantity__c}"/>        <apex:inputField value="{!CustomLineItem__c.Price__c}"/>    </apex:pageblockSection>   </apex:pageblock>  </apex:form> </apex:page>


Why can't we define $0^0=1$, just like we did with $0!=1$?

$\bullet$ The $0!$ is something is pre-defined, and when even a calculator returns that it is because it is programmed to do so and doesn't actually do the calculation. It also cannot be expressed in the standard form of writing down the factories; i.e;  $$n!=n(n-1)(n-2)...2*1$$  Because if you do so you get $$0!=0$$ and also this is create an infinite series of products (But doesn't matter because $0*n=0$)  $\bullet$ And also if we look at this pattern that is; $$n! = \frac{(n+1)!}{(n+1)}$$  And aply this to $0!$ we get,  $$0!=1$$  So we could have chosen $0!=0$, but chose the latter. But I'm also not here to state that we could have chosen $0!=0$, but another similar problem.  **  $\bullet$  Let's assume that $n^0=1$ for $n∈\Bbb R$. This is true for all numbers but when it comes to $n=0$, we get $$0^0 = 1$$  $\bullet$  Let's assume that $0^n=0$ for $n∈\Bbb R$. This is true for all numbers but when it also comes to $n=0$, we get $$0^0 = 0$$  So using two common laws in exponents to zero, gives contradictory results. This is much similar to the case that we have seen in $0!$ above. So we need to choose one to be pre-defined. But which one? Here we also have another entity;  $$\lim_{n\to 0}n^n=1$$.  So if $n=0.000001$, we get; $$0.000001^{0.000001} = 0.9999 ≈ 1$$  And also most calculators show up that $0^0$ is 1. But I have yet to see this used in conventional formulas and other places. The fact that I'm so adamant about this is that this can open up a lot of opportunities. For example, this could help in formulating a neat expression for the  for which the existing one is;  $$sgn(n) = \begin{cases} \frac{|n|}{n},  & \text{if $n$ ≠ 0} \\[2ex] 0, & \text{if $n=0$} \end{cases}$$  So what are your opinions on this?


I am a complete noob to linux. And I have installed ubuntu on my laptop.  My concern is Security. A lot of sources online say I don't need any anivirus software, can someone explain why this is? I relaise people dont make as much linux malware but is this enough of a reason?  If I should get something what should I get?  Also is it worth to get a sandboxed browser or a fully fledged VM for surfing (this can include going)  Finally should I uninstall windows 7 (dual booting via partition) and no longer use it (is it a sfatey concern?) I was only going to keep it for emergencies


java.lang.NullPointerException is getting generating

Why is below happening and how can i use this under the EnglishHomepage ?  my code(not working) :  public class EnglishHomepage {      WebDriver driver = null;       public Actions action = new Actions(driver);      By login_button = By.xpath("//*[@id=\"wrapper\"]/div[1]/header/div[2]/div[1]/div/a[15]");       //constructor of EnglishHomepage     public EnglishHomepage (WebDriver driver) {          this.driver = driver;      }      public void clickFogotPassword() {         driver.findElement(login_button ).click();     }       public void clickDropdownValue() {          action.doubleClick(driver.findElement(xpath2)).perform();         } }   code (working)  public class EnglishHomepage {      WebDriver driver = null;       By login_button = By.xpath("//*[@id=\"wrapper\"]/div[1]/header/div[2]/div[1]/div/a[15]");       //constructor of EnglishHomepage     public EnglishHomepage (WebDriver driver) {          this.driver = driver;      }      public void clickFogotPassword() {         driver.findElement(login_button ).click();     }       public void clickDropdownValue() {          **Actions action = new Actions(driver);**         action.doubleClick(driver.findElement(xpath2)).perform();         } }   I can use public Actions action = new Actions(driver); under the clickDropdownValue method and test is working fine as expected.   however,  when i move public Actions action = new Actions(driver); under the class, could see java.lang.NullPointerException.   exception      at java.util.Objects.requireNonNull(Objects.java:203)     at   org.openqa.selenium.interactions.Actions.(Actions.java:65)  at   pages.EnglishHomepage.(EnglishHomepage.java:12)     at   testcases.Tc4_Market_status.click(Tc4_Market_status.java:27)  at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at   org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)     at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:584)     at   org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:172)     at   org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)     at   org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:804)     at   org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)     at   org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)     at   org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)     at java.util.ArrayList.forEach(ArrayList.java:1257)     at   org.testng.TestRunner.privateRun(TestRunner.java:770)     at   org.testng.TestRunner.run(TestRunner.java:591)    at   org.testng.SuiteRunner.runTest(SuiteRunner.java:402)  at   org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396)  at   org.testng.SuiteRunner.privateRun(SuiteRunner.java:355)   at   org.testng.SuiteRunner.run(SuiteRunner.java:304)  at   org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)  at   org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)   at   org.testng.TestNG.runSuitesSequentially(TestNG.java:1180)     at   org.testng.TestNG.runSuitesLocally(TestNG.java:1102)  at   org.testng.TestNG.runSuites(TestNG.java:1032)     at   org.testng.TestNG.run(TestNG.java:1000)   at   org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)     at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)     at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)


I am writing a lengthy paper. So far I have been using \label{...} and \eqref{...}. This makes the counter of the referenced equations to be increased by one across all sections and subsections. But what I want, is that the counter of the references equations begins with the associated section and subsection number.


Any ideas how to display a PDF file in a WPF Windows Application?     I am using the following code to run the browser but the Browser.Navigate method does not do anything!  WebBrowser browser = new WebBrowser(); browser.Navigate("http://www.google.com"); this.AddChild(browser); // this is the System.Windows.Window


Why should an action integral be stationary? On what basis did Hamilton state this principle?

Hamilton's principle states that a dynamic system always follows a path such that its action integral is stationary (that is, maximum or minimum).  Why should the action integral be stationary? On what basis did Hamilton state this principle?


Only left brace or bar in math equations

I wanna insert only a left bar like \left | without the closing right bar.  Why? I want to use it as separator of calculation hints.  $a * b = c | :b\\ a = \frac{c}{b}$  and so on.   It must be a left bar and not only | or \vert so that it is scaled in height.


14.04 - Login screen stuck in glitchy loop

My computer, with Ubuntu 14.04 on it, will only boot to the login screen, after what looks to be a graphical glitch--the screen flashes with red-green-blue stripes and then goes black before the login screen appears.  When I attempt to login another graphics glitch occurs and the login screen appears again.  This started after I began having errors when trying to access the shared documents of another computer on my LAN network--this computer also has Ubuntu 14.04 on it--when I tried to enter, the usual confirmation box popped, on clicking OK, three more confirmation boxes appeared, after closing all of the boxes and restarting the other computer I tried again and had the same problem. I noticed at that point that Ubuntu wanted to update, figuring that this might solve the problem I let it do so, the update completed fine and asked to reboot, so I did and that is when the login glitch started.  I have been unable to login since then, I can however access the harddrive from another Ubuntu 14.04 installed on another harddrive.  I have tried this solution to no avail:   I don't know if this is related or not, but for months now, on boot-up a brief terminal message appears with something about the nvidia graphics card, unsure if this is an error message or not.  Thank you for any help!  UPDATE:  After installing a kernel update on another computer it began having the same problem, however on that computer I managed to regain access to it by booting it into the second-newest kernal. It seems there must be a problem with the latest kernel.  On the first computer I tried the same but to no avail.  It seems I have the same or a similar problem as in this question:


How to be sure API calls are using TLS 1.2

We are using .Net to make web service calls the Salesforce API. Is there a way to know for sure that the calls are using TLS 1.2? Are there any API logs or records of the protocol is use in Salesforce we can review to be confident the change is working?


Is it known who originally introduced the term "machine" used in terms like   machine learning, support vector machine or gradient boosting machine?   Could it be defined as an "algorithm that fits a statistical model"?  OLS could then be called "least squares machine"...   Is there an official definition of the word "machine" in statistics?


Unable to read file although member of group with read permissions

How is it possible I am not able to read the AS file below?  note that I have logged out and in back again since my addition to group nkaramol   akaramol@Andromeda:~/alex$ ls -al total 16 drwxr-xr-x  3 akaramol akaramol 4096 Νοε   3 21:20 . drwxr-xr-x 21 akaramol akaramol 4096 Δεκ  29 13:25 .. ----r-----  1 akaramol nkaramol   12 Νοε   3 21:20 AS dr-x------  3 akaramol akaramol 4096 Δεκ  21 19:15 nick akaramol@Andromeda:~/alex$ groups akaramol  akaramol : akaramol nkaramol akaramol@Andromeda:~/alex$ whoami  akaramol akaramol@Andromeda:~/alex$ cat AS  cat: AS: Permission denied


Why does this lambda require *arg, what difference does it make?

I came across a pretty clever little function that takes two functions, applies one on top of each other given an argument x:  def compose(f,g):     return lambda *x: f(g(*x))   Now my issue is with *x, as I don't see it really doing anything here. Why couldn't it be simple x (without the asterisk)?  Here are my tests:  >>> def compose(f,g): ...   return lambda *x: f(g(*x)) ...  >>> this = lambda i: i+1 >>> that = lambda b: b+1 >>> compose(this,that)(2) 4  >>> def compose(f,g): ...   return lambda x: f(g(x)) ...  >>> compose(this,that)(2) 4  >>> def compose(f,g): ...   return lambda *x: f(g(*x)) ...  >>> compose(this,that)(2,2) TypeError: <lambda>() takes exactly 1 argument (2 given)


"They've raised their hand" vs "They've raised their hands"?

Consider these two phrases:     “They've raised their hand”   “They've raised their hands”   Does object have to agree with subject? To make the question more clear, let's assume all of them have raised their right hand/hands(?). Now we have five people and five raised hands.  I've changed the original question which used idiom "to show one's true colors" as example, which was giving the idea that my question was about usage of the specified idiom. I apologize for my poor choice of example.


We are working with the following question for an exercise:   We got the definition: A subset $K$ in a metric space $(M,d)$ is called precompact if for every $\epsilon > 0$ there exist finitely many points $x_1, \dots , x_p \in K$ such that $K \subset B_\epsilon(x_1) \cup \dots \cup B_\epsilon(x_p)$.  We then have to show that a subset $K \subset\Bbb R^n$ in the space $\Bbb R^n$ (with Euclidean metric) is precompact if and only if it is bounded.


Implicit conversion causing error part of the time

I have been scratching my head about this one for the last day or so - I just can't see why a procedure works in one environment, but then fails in another due to a conversion error (same data, same code).  The plan for (a heavily cut down version of) the working server is here:   (This doesn't seem to be working, so I've uploaded the plan XML to pastebin here: )  A bit of background for the relevant columns causing the problem:  The propertyInst table holds a column called ValueStr, which is an nvarchar data type. The GeneralLedgerCode table has a column id of data type int. Our developers are attempting to join between the two tables. The ValueStr column holds text data, XML data, int data, decimal data etc. As a matter of course we decided to add a function to ensure only integers are parsed (ISNUMERIC(ValueStr) = 1). What we didn't realise is that this would then also try to convert any decimal values - this is causing a conversion error in production of the nature:  Conversion failed when converting the nvarchar value '0.1' to data type int.  My question here is, given that the Table Scan of the propertyInst table will be picking up all numeric values including decimals, why is the implicit conversion in the scalar operator then not failing with the same conversion error? The output of the ISNUMERIC query returns some of these decimals. I can't see how the attached plan is working at all.  Does an implicit conversion operator never fail outright, and is the conversion error coming from the probe residual in the hash match operator? Then again, how could the value even make it to the operator when it would fail the implicit conversion?  As a small assistance, the plan image is here, with the Compute Scalar I'm asking about circled.    In addition, I can see that there are no actual rows logged against the scalar operator - does this mean the engine decided not to use that particular operator at runtime due to the conversion error?    Any help would be appreciated.


I  have  general  question  on  Riemann  Zeta  function.  How  can  I  improve  knowledge  on  Riemann  Zeta  Function  theory  up  to  research?  For  example ,  what  are  the  best  books  on  Zeta  Function  theory? I  wish  to  learn  this  theory  as  deep  as  possible... Thanks


I hold a string '484792' length but i can't use all characters of this string

There is I have a function   function DisplayPDF(varData) {    console.log(varData.length) // 484792   window.open("data:application/pdf;base64," + varData);  }   when i get this varData to windows.open() it doen't replace all string in here.


The land and forests encompassing Amon Lac appear to have been constantly part of the realm of the Silvan Elves from the start of the First Age until the second millienium of the Third Age. Aside from some bands of woodsmen, the race of Men seem to have avoided, or at least ignored the area, as it lay outside the reach of Numenor (later, of Gondor or Arnor). The same seems true of the Dwarves, who besides building a trade road through, preferred to stay in their mountain halls.  Then suddenly into the tale appears the Fortress of Dol Guldur Was it a mini-Barad-Dur, or a hole in the ground there lived a corrupted Maiar? It IS described as a 'fortress', it had dungeons, and was large enough to serve as a garrison for a force of orcs strong enough to threaten both Lorien and the Woodland Realm simultaneously. Did Sauron and his servants construct a new entity, or simply occupy an existing one dating from earlier history?


Add a confirmation before moving comments to a chat

When a comment chain is too long, new comments have to be loaded through the add / show 1 more comments link. After clicking on this link, I can add a reply:  After quickly misclicking on the textarea, a new chat is created. Without any confirmation...  I've experienced this [at least three times][2]. Can a confirmation dialog be added, so that chatrooms cannot be created by accident?


How do I add vehicles to dispatch teams?

So I've just completed the Battle Gear and I want to set it to work as well as add some of my other extracted vehicles to increase my teams' fighting ability. Problem is I can't find the option to add vehicles anywhere in the interface.


Feynman's Path Integral Approach: The Complex Exponentiated Action

I'm working on a project covering Feynman's Path Integral Approach. I'm having trouble intuitively grasping what motivates the introduction of the expression $e^\frac{iS}{\hbar}$, where S is the action.   All the resources that I have seen (Feynman's book, 1948 article, Shankar's book) don't seem reason this assertion. They simply mention it as a postulate.   Can someone refer me to a good resource that explains the introduction of the term? I'm sure Feynman must have sound reasons to conclude that the complex number one is after has to be of this form!


I want to execute stat command in my unix shell /usr/bin/ksh:  Input:  /bin/date +%Y%m%d%H%M%S -d "$(/usr/bin/stat -c %x find.txt)"   And the output:  /usr/bin/ksh: stat:  not found   My system: SunOS 5.10 Generic_150400-23 sun4v sparc sun4v


What is $\lim\limits_{n\to {\infty}} (\frac{n}{1+n})^n$?

What is $\lim\limits_{n\to {\infty}} (\frac{n}{1+n})^n$.  Is it possible to write the function $f(x)=x^n$ and since we know $\frac{n}{1+n}\to 1$, so $f(\frac{n}{1+n})\to 1^n=1$. So the limit it $1$. Is it correct. If so, is there an easier way to do it?


Mysterious LEDs glowing in spike buster without switching on

I have a spike buster at my hostel to power my laptop charger, monitor, phone chargers etc... It has a Line Indication system which shows the status of the supply using 3 LEDs.   Under the "All Ok" condition, only the 1st and 3rd LEDs are supposed to glow. They do that just fine. When it is powered off and the plug is removed from the socket all the lights go out (they can't run on their own). But, when the plug is inserted and the switch is not turned on yet, a strange thing happens. A few LEDs light up! I haven't:   Turned on the switch Connected any devices (this doesn't seem to change the output)   Slow motion video for the switched ON state :   Slow motion video for the switched OFF state:   What could possibly be the reason behind this?  NOTE - Our hostel has a really poor power supply. There's a lot of fluctuation. I have observed the voltages change from 185V to 220V within a few seconds. There can probably be a lot of harmonics in the power supply due to the usage of lots of SMPS (a laptop charger for each and every one of 400 students!) Could this have anything to do with my situation?


I am a rank novice in TeX. I read an earlier TeX question about how to display Chinese characters but it seemed to be in context of an article entirely in Chinese.   My document is an English article in TeX, and I only want to insert three Chinese characters. Can someone tell me how to format it?


Hello, please, can you put the numbering of my expression to the end of a row after the fraction. Thanks in advance  \begin{equation} \label{eq1} \begin{split} t_{j,\text{same rode}} = \ & \frac{\pm\sqrt{2\cdot accel_j \cdot d^{connection}_{j} + speed_j^2} - speed_j}{accel_j} = \\          = &  \frac{\sqrt{2\cdot accel_j \cdot d^{connection}_{j} + speed_j^2} - speed_j}{accel_j} = \\         = &  \frac{\sqrt{2\cdot accel_j \cdot \sqrt{\biggr(y_0 \pm r - (y_j \pm d_j^{\text{while waiting 0}})\biggl)^2} + speed_j^2} - speed_j}{accel_j}  \end{split} \end{equation}


How can I disable Ctrl+Q shortcut in Ubuntu?

How can I disable Ctrl+Q shortcut to close the current app in Ubuntu?  I have seen the top answer under:  which suggests assigning Ctrl+Q to /bin/false/.  I don't think this should be an accepted answer since some apps that use Ctrl+Q like IntelliJ IDEA won't work with this shortcut anymore.  gsettings get org.gnome.desktop.wm.keybindings close produces only Alt + F4  I use Ubuntu 18.04


Electric Current in Classical Electrodynamics derived as Noether current

I'm looking for a derivation of the often quoted fact that the conservation of electric(!) current $j^{\mu} = (c \rho, \vec{j})$ in relativistic classical electrodynamics is an explicit consequence of Noether theorem. In other words that that the electric current $j^{\mu}$ is a Noether current with respect gauge transformation $A_{\mu} \to A_{\mu} + \delta A_{\mu}= A_{\mu} + \partial_{\mu} \chi$ where $\chi$ is any twice differentiable scalar function that depends on position and time. Recall from classical Electrodynamics $S = \int_V \mathcal{L} dV dt$ with Lagrangian $$\mathcal{L} := -\frac{1}{c} A_{\mu} j^{\mu} -\frac{1}{16 \pi}F^{\mu \nu} F_{\mu \nu}$$ with field tensor $F_{\mu \nu} = \partial_{\mu} A_{\nu}- \partial_{\nu} A_{\mu}$ and in context of variational calculus of action functional $S$ the conserved function, also called Noether current for action $\phi \to \phi + \delta \phi$ on Lagrangian $\mathcal{L}(\phi, \dot{\phi}, t)$ is defined by $$J^{\mu} := \frac{\partial \mathcal{L}}{\partial \dot{\phi}} \delta \phi$$ Now I not see why in context of relativistic classical electrodynamics and gauge transformation of the $4$-potential $A_{\mu}$ (that is $\phi := A_{\mu}$ and $\delta \phi = \partial_{\mu} \chi$ the obtained Noether current $J^{\mu} $ coinsides exactly with classical electric current $j^{\mu} = (c \rho, \vec{j})$? Does anybody know where I can find a derivation of that? My attempts: By equation of motion and definition Maxwell-Lagrangian we have $\frac{\partial F^{\mu \nu} F_{\mu \nu}}{\partial \dot{A_{\mu}}}= -4 F^{\mu \nu}$, so $\frac{\partial \mathcal{L}}{\partial \dot{A_{\mu}}}= \frac{1}{4 \pi}F^{\mu \nu}$ and $\delta A_{\mu}= \partial_{\mu} \chi$. Why does it imply $J^{\mu} = (c \rho, \vec{j})$. I not see it. Although I found in PSE some questions dealing which similar problem I nowhere found a source containing a full complete derivation of the claim, but on the other hand incountable many sources using this a fact.


I have this (simplified) scenario:  @Test public void testSameThread() throws InterruptedException {     ReentrantReadWriteLock rwlock = new ReentrantReadWriteLock();     rwlock.readLock().lock();     {         if (rwlock.writeLock().tryLock(50, TimeUnit.MILLISECONDS)) {             // long-running op             Thread.sleep(100);             rwlock.writeLock().unlock();         } else {             fail();         }     }     rwlock.readLock().unlock(); }   First, I acquire a read lock, then on the SAME thread I try to acquire the write lock. My assumption is that as I am on the same thread, the write lock should be acquired.  First, what is wrong with my assumption? Then, what pattern (standard Java locking mechanism) can be used to allow arbitrary nested read/write locks for the same thread?


What is the origin of the word “optics” that's prevalently used now in politics?

Here’s an example from RealClearPolitics:     But the optics bode well for a party whose chances of winning the White House depend on attracting many more Hispanic voters than it did four years ago. [emphasis added]


Non empty Perfect set with only irrational numbers

I encountered this question in Abbott's Understanding Analysis. The problem asks to construct a nonempty perfect set with no rationals. It starts with enumerating the rationals $\mathbb{Q}=\{r_1,r_2,...\}$. At first we start with an open set  $O:=\bigcup_1^\infty V_{\epsilon_n}(r_n)$ where $\epsilon_n:=1/2^n$ and $V_{\epsilon_n}(r_n)$ is open neighborhood of $r_n$ with radius $\epsilon_n$. Then $F:=O^c$ is obviously closed and nonempty (since lengths of the open intervals add up to 2) and $F$ obviously contains only irrationals also $F$ does not contain any open intervals since it does not contain any rational so $F$ is totally disconnected as well. But it is not possible to know that $F$ is perfect, since it may have isolated points. How do I modify the above construction to make $F$ as a perfect set??  Edit: I have seen similar questions here but with different constructions of different sets. Here the question asks for a very specific modification of a given construction.


How to see if incoming HTTP requests are successful (view the responses) on Linux?

I'm really new to managing servers, and I've discovered that I can run ngrep and see connections from Google to our site (which is currently getting thousands upon thousands of 5xx errors and "crawl anomaly" errors in search console).  My question is how can I see if the connections are successful (if google is actually receiving a 200 response code, or not). Also, does Connection: close. mean that the connection was closed and they did not receive a response?   Example of output from ngrep.  $ sudo ngrep -il -d eth0 -W byline "Chrome/41.0.2272.96 Mobile Safari/537.36" port 80  GET / HTTP/1.1. Host: subdomain.com.example.com. User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) X-Middleton/1. Accept: text/html,application/xhtml+xml,application/signed-exchange;v=b3,application/xml;q=0.9,*/*;q=0.8. Amp-Cache-Transform: google;v="1..3". Cookie: BLAH. From: googlebot(at)googlebot.com. If-Modified-Since: Mon, 04 May 2020 15:51:07 GMT. X-Forwarded-For: IP, IP. X-Middleton: 1. X-Middleton-Ip: IP. X-Real-Ip: IP. X-Snipe: BLAH. Accept-Encoding: gzip. Connection: close.


Probability density function of sum of random variables

Assume $X_i$ probability density function is : $$f(x,\lambda)=\Bbb{I}_{(0,\infty)}(x)\lambda \exp(-\lambda x)$$  how to find the probability density function of $\sum X_i$ ? The result is $$\Bbb{I}_{(0,\infty)}(x)\frac{1}{(n-1)!}\lambda^nx^{n-1} \exp(-\lambda x)$$  But I don't know how to find it.  where $\Bbb{I}_{A}(x)=\begin{cases} 1, & x \in A \\ 0, & x\not\in A \end{cases}$


With a class in Python, how do I define a function to print every single instance of the class in a format defined in the function?


How can I break equations in smaller pieces?

Instead of writting very long lines to create complex equations it would be great to use variables to substitute smaller chunks...  A simple example:  \[ \frac{ \sqrt{ \mu(i)^{ \frac{3}{2}} (i^{2} -1) } } { \sqrt[3]{\rho(i) - 2} + \sqrt[3]{\rho(i) - 1} } \]   It would be done something like this:  A = \sqrt{ \mu(i)^{ \frac{3}{2}} (i^{2} -1) } B = \sqrt[3]{\rho(i) - 2}  C = \sqrt[3]{\rho(i) - 1}  \[ \frac{ A } { B + C } \]   And the result would be the same but the code easier to read with more complex examples.  How can I define easily these substitutions or parameters? or using any  specialized package?  PD: there are other questions at Tex.StackExchange asking how to split an equation in several lines, but this is not the same.


Here is my JavaScript:   var states = new Array(); var st = {'FL':{'profit':150}}; states.push(st);  alert(states[0]['FL']['profit']);   The problem with this is that I want to access variable like this  alert(states['FL']['profit']); , meaning without [0] index... But that [0] index is added by default by "push" method. And I really need to append array into array this way because I am assigning through the loop. So is there way to append to array without assigning that index [0] ?


Why are out-dated Ubuntus so difficult to upgrade

Recently a friend asked me if I could help him with his Ubuntu as he faced some weird problems. Looking up his version made me realize he fell a bit out of time a few years ago: He had Ubuntu 13.04  A few updated-commands later I was bombed by "Ign" and "404" errors and had quite a hard time finding useful information how to move that old software into modern times. In most forums it was suggested to just ditch it and just install a fresh Ubuntu. (The problem was solved after the Live-USB suggested to do the whole upgrade)  What should I have done in that situation and why is it so difficult to bring such old systems up to date?  Edit: No, I am not interested in how to upgrade the old Ubuntu. I just want to know why a simple update/upgrade/dist-upgrade command doesn't work any more (If moving to the archive servers it just remains as it is, but a reasonable update is not happening). Why is also do-release-upgrade not doing any useful job?


How to move a window to another space without using the mouse?

I use spaces for having multiple desktops, but often need to move a program from one space to another.  I am aware of the various ways to do that with a mouse:   Click-and-hold on the title bar of window and drag to edge F8 to show all Spaces and drag to desired location Click-and-hold on the title bar, and use Ctrl+# or Ctrl+Scroll Arrow   But have not been able to find a keyboard-only method. I use Linux for one of my primary workstations which has this ability and I would LOVE to use it with OSX as well.


Prove A ∩ ( B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C )

I was trying to prove Distributive law ie A ∩ ( B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C ).  I tried to prove it in traditional way:     Let X ∈ A ∩ ( B ∪ C ). Then X ∈ A and X ∈ B ∪ C. Then X ∈ A and X ∈ B $or$   X ∈ C.     [ Here $or$ is used in inclusive way]   After this I am not able to solve it. What can I infer from X ∈ B $or$ X ∈ C? Do I consider X belongs only to B or X belongs only to C or X belongs to both B and C?


How can I get around the drow's light sensitivity?

My friends and I are trying to come up with ways to get around the drow's sunlight limitations. We thought of using spells, but Darkness makes it impossible to see, which would defeat the purpose.  The best I've been able to come up with is lashing a large patio umbrella to a mule and making it follow the drow everywhere. Would this work, at least for a low level melee character?  What other options does our drow have?  This question is about what I can do as a player to take advantage of RAW; the players in my group don't mind being munchkin-y. Telling the GM to make the campaign take place at night isn't an option.


Disable Windows from automatically connect to a network when network is lost by option or setting the auto-connection option to off (by default)

I work with different routers, I want my laptop to stop connecting to various wireless networks when a wireless connection is lost. Is there a way to prevent my computer from doing this?  Bonus: If windows could only re-connect with the network it had before, that would be perfect.    Operating system: windows 7


Why are both the zero and definite articles used with these phrases?

How can the same noun take/miss a "the" in the following sentences.  (A) The Food and Drug Administration intends to authorize emergency use of the vaccine on Friday. (B) The country is expected to authorize the emergency use of the vaccine. (C) Two runoff elections in Georgia will determine control of the Senate. (D) The Georgia Republican is facing a runoff election that could determine the control of the Senate. (E) Production of renewable diesel is up 7 percent this year. (F) Energy companies are increasing the production of renewable diesel.  I wonder how to use or omit the definite article "the" in these instances. Is any semantic difference produced by using the definite article? At first glance, I have a vague idea that (B) and (C) are more appropriate than (A) and (D), respectively; although, I cannot explain why. I believe that "the" should be omitted in (E), as it is actually, while I am unsure about the reasoning behind the use of "the" in front of the noun "production" in (F). All of the sentences are from a major U.S. newspaper, so they are, apparently, grammatical. Yet, I suspect some subtle difference in meaning. Explain the logic behind the use of "the."


Some directories make sense to be sorted by date modified, while others make more sense to be kept sorted alphabetically.   How can I make it so that finder will apply a specified sort by selection on a per-directory basis?   If no such feature exists (In which case I hope somebody at APPL is paying attention), I suppose using/remapping the keyboard shortcuts (Defaults being Cmd+Ctrl+5 for Modified and Cmd+Ctrl+1 for Alphabetical by Name) is the next best thing.


Convert concatenated characters (char) to String literal in Java

public class Tester{   public static void main (String args[]){    String word="sandwich";   char newWord[]=word.toCharArray();    System.out.println(word.equals(transform(newWord)));   if (word.equals(transform(newWord))){       System.out.println("same");}       else{         System.out.println("not");       }    }   public static String transform(char [] newWord){     for(int i=0; i<newWord.length;i++)     {       System.out.print(String.valueOf(newWord[i]));       //System.out.print(""+newWord[i]);      }    return "";   }     }   RESULT>> sandwich false          sandwich not  Is there a way to convert a concatenated 'string' of characters to a string literal?


Why are there sometimes darkened scenes in new anime?

In the first Shingeki no Kyojin opening, I've seen some scenes with lower contrast or brightness, something like this:    And later, in the same sequence, a scene appears without that contrast change:    I've seen this kind of contrast change in the HxH remake as well, and the first thing that comes to my mind is that legendary Pokemon episode where a lot of kids suffered of photosensitive epilepsy attacks in Japan thanks to Pikachu and Co.  Does it has some relationship with that or there is another reason? Maybe a new law in Japan related to these flashy images on TV?  It seems this change appears only in new anime (I don't remember seeing something like this before last year). Any clue around that time?  ===UPDATED===  It's not just in the opening; here are more examples:  One of many scenes where the image is normal:    Then comes the darker scenes. Maybe it cannot be appreciated in the snapshots, but all are a full sequence of images appearing quickly with a bright background:      And then it returns to normal:    This is from the last HxH episode. At first, the image looks fine:    Then comes an attack and the image looks darker. Maybe the effect is not so intense as in Shingeki no Kyojin, but it is still there. Look, all these bright flashes coming from the hits seem not as bright as they should be:      And then the image looks normal again - compare the smoke color before and after:    As @JonLin notes, maybe it could be some kind of TV censorship, despite that there's nothing to censor besides all these flashy lights. Is it just me being paranoid or is there something more behind all this?  ==UPDATE 2==  I've found a Blu-ray rip of the Shingeki no Kyojin opening (no subtitles, no credits) and I took some shots of the same frames that I already put. To the left, the TV version and to the right, the BDRip version (click for more detail):        So it is not an effect to make things more dramatic, but rather an effect included only on TV. I suppose the same applies to the other shots (at least in SnK).    So my question comes again, why, lately, are there some anime with darkened scenes? My conspiracy theory is that it is related to those bright changes and possible photosensitive attacks. If that's true, why is this being applied lately? And why doesn't it appear on DVD/BD? If not, what else it could be?


My table has values with quotes and other unescaped characters, and when I   $sometitle = "Ra's al Ghul"; SELECT * from mytable WHERE title='{$sometitle}'   ofc I got an error.  How can I solve this issue?


Python: why assigning a literal to multiple variables in a suite results in their pointing to the same address?

Similar to   But still not quite the same as it's not just for small values.  >> a = 1234; b = 1234; id(a); id(b); a is b 9447736 9447736 True >>> a = 1234 >>> id(a) 9447616 >>> b = 1234 >>> id(b) 9447688 >>> a is b False >>> a = "abcd"; b = "abcd"; id(a); id(b); a is b 140282436530560 140282436530560 True >>> a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; b = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; id(a); id(b); a is b 140282436951600 140282436951600 True >>> a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; b = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; id(a); id(b); len(a); a is b 140282436951600 140282436951600 74 True >>> a = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; b = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; id(a); id(b); len(a); a is b 140282436951600 140282436951600 74 True >>>


Full stop missing in MnSymbol - replacement renders brackets with cdots - Why?

I'm close to give up  for MnSymbol in unicode-math. I realized I already replaced so many missing and faulty characters, that there is barely something left of MnSymol. So probably I will just go the other way around in the future, use a different math font and replace the symbols I don't like with MnSymbol.  However, please allow one last question before I carry MnSymbol to his grave: Obviously the full stop is missing in MnSymbol: $\Bigg[\bigg(\big[ 42 \big]\bigg)\Bigg].$   When I replace the full stop with a different font, all brackets get followed by a \cdot: \setmathfont[range={"002E} ]{XITS Math}    which won't happen if I replace the whole math font: \setmathfont{XITS Math}    Besides looking for a solution, I actually would like to know Why? I'm replacing a certain unicode character and others are affected as well, that does not make any sense?  Full MWE: \documentclass[a4paper]{article} \usepackage{amsmath} \usepackage{fontspec} \usepackage{unicode-math}  \setmathfont{MnSymbol} \setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Minion Pro} \setmathfont[range={"005B,"005D,"0028,"0029,"007B,"007D} ]{XITS Math} % brackets  \begin{document}  $\Bigg[\bigg(\big[ 42 \big]\bigg)\Bigg].$ \setmathfont[range={"002E} ]{XITS Math} $\Bigg[\bigg(\big[ 42 \big]\bigg)\Bigg].$ \setmathfont{XITS Math} $\Bigg[\bigg(\big[ 42 \big]\bigg)\Bigg].$  \end{document}   For future reference: A full solution can be found , but \Udelcodenum`.=1073741824   needs to be changed to \Udelcodenum`.=0


How can I use the unapproved comments list as a block?

The unapproved comments list (available at /admin/content/comment/approval) allows me to perform bulk operations on comments such as deletion (which also gives me the option of reporting to Mollom) and publishing. I'd really like to have this on the dashboard itself — is there a way to replicate this admin page as a block so I can do so?  This is under Drupal 7.12.


GeoJSON data visible in browser but not showing on map

I am using OpenLayers, GeoServer and Shapefiles.   I have published the shapefile to GeoServer and under layer preview I can see JSON data in browser when I select GeoJSON option from the dropdown for that file.  Problem is I cannot get the data to display on the map in OpenLayers.    And here is my code:  <!doctype html>         <title>OpenLayers example</title>          <link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
My Map

            I also read somewhere that I need to load features from URL dynamically using AJAX calls. If so, how would I do that? I didn't find anything beginner friendly on the subject.


How can I make an unencrypted file self-destruct after 30 days of use?

My friend wants to email a certain file to another person, and allow that person to use the file for 30 days, after which it will automatically delete itself. Is this even possible?


Apparently, there's a theorem stating that the two circuits shown below are equivalent;  The current through resistances of the same values are also equal. How can this be derived?


Given a string $A$.  Definition: Two strings are said to be equal if after applying following operation, they become equal(equivalent).  Operation: Given two strings, you can swap any characters in the string at most one time in any string. eg - $abc$, $bac$ are equal(equivalent) since in $bac$, we can swap $b$ with $a$.  Now we need to calculate the number of "ordered pairs" after permuting the $A$ string such that they are two strings that are not equal.  Note: Characters in string can be repeated.  Example: Let string A is $abc$. No of permutation of string $A$ is 6 which are $abc$,$acb$,$bca$,$bac$,$cab$,$cba$. There is no $ordered$ $pair$ of strings such that both string are not equal(equivalent). Like in pair ($acb$,$bac$) both can be made equal(equivalent) because we can $c$ with $b$ in $abc$ and $a$ with $b$ in $bac$. So answer is $0$.   Thanks


Skyrim crashes as soon as I boot up into the menu. How do I fix this?

Whenever I boot up Skyrim, it crashes as soon as it reaches the main menu with no dialog or anything. I thought this was related to my using dual monitors somehow, but I disconnected the other monitor and the game still crashed. I tried running the game in different resolutions, both full-screen and windowed, at various quality settings; no dice. My computer does meet the minimum requirements to play Skyrim.  How do I fix this problem?


Generic question regarding Python-code.  How can I most effectively locate the worst parts of my Python-code with respect to memory usage?  See e.g. this small example  def my_func():     a = [1] * (12 ** 4)     return a  def my_func2():     b = [2] * (10 ** 7)     return b  if __name__ == '__main__':     a1 = my_func()     a2 = my_func2()   How can I in an automated way tell that a2 is much larger that a1 in size? And how can I - still automated - root this back towards my_func1() and my_func2()?  For C/C++ code I would use valgrind --tool=massif, which can directly locate the heavy-weights regarding memory usage - but for Python I need your help.  appears to give some of the answer, but not nearly as good as massif does for C/C++.


Using multiple attributes feature for symbology in ArcMap?

I am trying to make a map using US census data showing vacant housing to total housing on the same map.   I came across the "multiple attributes" feature under the symbology tab and wondered if this is the way to go and, if so, how to use it?   I have only been able to get one type of symbol, the gradient feature to appear.   I'm using ArcGIS Desktop 10.


Can TeXstudio be configured to highlight labels in custom commands?

TeXstudio helpfully applies special formatting to the argument(s) of \ref{}, \pageref{}, etc., recognizing them as references to labels.  I have a custom command, \Eq{}, which accepts a single argument and produces a \ref with appropriate syntax for various journals, e.g. "Eq. 5", "(5)", etc.  Of course, TeXstudio doesn't recognize that the argument to \Eq{} should be treated as a reference, hence it doesn't apply any formatting, bring up a list of options, check whether the reference is valid, etc.  This seems like a long shot, but I'll ask anyway: is there any way to get TeXstudio to treat my \Eq{} command like \ref{}, at least in terms of special formatting?


I have drawn a broom in Illustrator and cant apply any brushes or strokes to it. I just don't get it. What do I have to do? Here is a screenshot:


PHP program does not display mysqli queries properly

I am using MySQL Workbench, my database is set to UTF-8 ("utf8 - utf8_unicode_ci"), inside it characters display correctly, so does the website (i use this tag; <meta charset="UTF-8"> ) displays them correctly. When I hardcode it to the HTML or when I echo it in php there is no issue.   When I query it in the database the special characters appear differently. For example, Workbench shows "geçmiş" and query that I send with mysqli returns "ge�mi?" on the page.  mysqli_set_charset($link, 'utf8mb4'); solved my problem.


Egoroff's theorem in Royden Fitzpatrick (comparison with lemma 10)

Hi math stackexchangers,  I have a question about the difference between two math statements (for reference they can be found in Royden Fitzpatrick pages 64-65).     Egoroff's Theorem: Assume $E$ has finite measure. Let $\{f_n\}$ be a sequence of measurable functions on $E$ that converges pointwise on $E$ to the real-valued function $f$. Then for each $\varepsilon > 0$, there is a closed set $F$ contained in $E$ for which   $$\{f_n\} \to f\text{ uniformly on }F\text{ and }m(E \setminus F) < \varepsilon.$$      Lemma 10: Under the assumptions of Egoroff's Theorem, for each $\eta > 0$ and $\delta > 0$, there is a measurable subset $A$ of $E$ and an index $N$ for which   $$|f_n - f| < \eta\text{ on }A\text{ for all }n \geq N \text{ and }m(E \setminus A) < \delta.$$   My question is this. What is the difference between Egoroff's Theorem and Lemma 10? Am I misunderstanding uniform convergence? To me it looks like Lemma 10 provides uniform convergence. Is the difference that Egoroff's Theorem ensures that $F$ is closed but Lemma 10 doesn't ensure that $A$ is closed?  Thanks


What is a word for doing something that you don't want to do?

I am reading Of Mice and Men, and I am trying to come up with a word that describes how George manages to shoot Lennie at the end of the book.  I have come up with Self Discipline, and Overcoming Weakness, but none of those really seem to suffice.  Any suggestions would be great!


Applications not showing when clicking applications

I have installed the trial Ubuntu on my Mac Air. When I click in applications explore it can't find any. How can I work this please?


How to write a parenthetical plural when the noun pluralizes irregularly?

What happens if you have a written phrase like     We were looking at the same poster(s).   but with a noun that has an irregular plural? E.g. with baby/babies, would this be the correct form?     We were looking at the same baby(ies).   Or, as a more exotic case:     We were looking at the same matrix(???). (plural is matrices)   Is there a rule or guideline for this?


Prove that if $n$ is an odd integer, then $n^2-1$ is divisible by $8$.

I have it proved for when k is odd, but when k is even, I get 8[q(2q+1)]. Is it correct to state that 8(Integer) proves that n^2-1 is divisible by 8?


Multiple Users on Apache and Linux and Invalid permissions

I have a RedHat setup with Apache and multiple users.  I gave each user a dir in /var/www/html to host their sites.  Sites are served, but cannot write files (eg. log files, uploads, cache files).  I have all the users as members of the group apache and the dir's have write access for the group.  Anything that I am forgetting to do here?  EDIT: Adding some details. Apache runs as 'apache' with group 'apache'.  All the users are in the apache group, as the user apache is in the users groups.


How to study/prepare for the Salesforce ADVANCED Developer Certification?

After reading the overwhelming responses to the question , I decided to ask the same question but for the Advanced Developer Certification!  I have more than one year of experience as a Salesforce Certified Developer. I am planning to study and pass the Advanced Developer Certification to hone my skills into an advanced developer. Again, exactly as mentioned in the aforementioned question/post, the official page has little information and the study guide gives too broad a description of the topics in the examination. Hence, if you can give us some information, resources, practice examinations, hints, tips, or advice, it will be of great help!  An added advantage is that I have access to online Salesforce Partner Premier Training. What online training topics should I go though?  Edit: And perhaps any topics which everybody would not be doing in their day to day work?


Does a sphere projected into 2D space always result in an ellipse?

My intuition has always been that when any sphere is projected into 2D space that the result will always mathematically be an ellipse (or a circle in degenerate cases).  In the past when I was actively doing my own graphics programming and brought this up with other people they were adamant that I was wrong. If I recall correctly they believed the result could be something vaguely "egg shaped".  Who was correct?    Since there is already one answer submitted, I don't wish to totally change my question but I realize I left out important details due to losing familiarity with the field over the years.  I intended to ask specifically about perspective projection where the projection is a linear application.  The other projections are of course interesting for many uses so I wouldn't want them removed at this point. But it would be great if answers could have perspective projection as their most prominent section.


I have the following:  DATE_FORMAT=YYYY-MM-DD HH:mm:ss const differenceInDays = require('date-fns/difference_in_days');  const newDateNow = () => {     const date = new Date();     return formatDate(date, process.env.DATE_FORMAT); };  const isValid = (expdate) => {   today = newDateNow();   differenceInDays(expdate, today) >= 0; };   Now in a method I have:  const c = isValid(a);   this returns false, where I would expect true. Logging the variables I have:  today = 2019-12-12 17:55:48 expdate = 2020-10-09T22:00:00.000Z   So they have different date formats, which might be the reason isValid returns valid even though it should be true (given that a is further into the future than date).  How can I make this work? Should I perhaps transform the date format of a to something similar of date? (but how to do that?)


I have an HP laptop dual booted with windows 10 and Ubuntu16.04 LTS. WiFi on Windows works just fine but when I switch to Ubuntu, the network which was showing strong connection in Windows shows weak in Ubuntu. Sometimes it also refuses to connect. Can you please help?


How can Poisson GLM work with non-count data (rate data)?

My question is related, but not the same as the following question:    Here's some fake data:  ### some fake data x=c(1:14) y=c(0,  1,  2,  3,  1,  4,  9, 18, 23, 31, 20, 25, 37, 45) y_rate <- y / 1000   I'm going to use a Poisson GLM with a log link to predict y_rate:  ### model pois_mdl <- glm(y_rate ~ x, family=poisson(link="log")) summary(pois_mdl)   Plot the fit:  ### plot plot(x, y_rate) lines(x, pois_mdl$fitted.values)   I am surprised that Poisson glm() allows for non-integer values in the dependent variable. Draws from a Poisson distribution are always integers (regardless of the value of the mean parameter). Why doesn't glm() blow up?


"Two are better than one" or "Two is better than one"?

I just came across the phrase "Two are better than one", but I had always heard it in my head as "Two is better than one". This is partially due to the Boys Like Girls song. Which one of these is actually correct?


Are there any plans for Docs.SO to come to some of the other SE sites?

In my opinion, maybe SF, Unix.SE and SU could profit from Docs.SO quite well.  I suspect it could also be useful on at least some of the non IT-related sites.  From another point of view, there are some extra features which exist only on SO (jobs, +2 new review queues, etc). So maybe Docs.SO is planned as an SO-only extra feature, too.  It is also possible, that the core communities of some sites simply won't need such an extension.


Per-pixel (statistical) calculations on a raster stack using GDAL

In R, it's relatively trivial to perform per pixel calculations based on a raster stack (e.g., get std.dev for each pixel on a 12 layer GeoTIFF). Unfortunately, the speed is less than desirable when working with large rasters.  Recently, I've been trying to use GDAL for this purpose, but I can't seem to get the expression down. I've tried the following, but it doesn't seem to work as advertised (or how I think it should work):  gdal_calc.py -A tmean_monthly_1980.tif --calc="std(A)" --outfile=tstdev_1980.tif --allBands=A --calc="std(A)" --NoDataValue=-9999   In the above example tmean_monthly_1980.tif is a raster composed of 12 layers (Jan-Dec) of mean monthly temperatures in 1980 (stacked using gdal_merge). Although the GDAL command produces an output, the results are definitely not the standard deviation per pixel.  Another option might be to use single band files, but gdal_calc.py appears limited to "only" 26 inputs (A-Z; i.e., "-A file -B file -C file etc."), and the resulting command line/script would be fairly cumbersome when working with large, multi-layered rasters (e.g., time series).  Is there a specific syntax for performing per-pixel raster calculations on a multi-band image using GDAL? If only individual files/bands can be specified using gdal_calc.py, please provide a scripted example using Bash, Python, etc.  Specifically, my goal is to calculate the standard deviation and cv for each pixel in a multi-layer raster stack, or using individual files that make up the same raster stack.  Note: I'm holding out for a GDAL specific answer, but other FOSS solutions are welcomed and will be upvoted, especially if they are relatively compact and adaptable to large number of inputs.


How can I restart a network interface? I have a vm that doesn't update its IP address correctly when switching between home and work. The vm runs Ubuntu server and uses a bridged network adapter.


Otherwise stable Ubuntu machine have an issue since installing that is critical freezing without apparent reasons. There are high probabilities that the issue been caused by NVDIA videocard.       sudo blkid output:  /dev/sda2: UUID="0E5C95E45C95C73D" TYPE="ntfs" PARTUUID="1ef0523b-02" /dev/sda5: UUID="16EA-1372" TYPE="vfat" PARTUUID="1ef0523b-05" /dev/sda6: UUID="fe90c52c-c1b7-4845-971e-e7ed5cb45ac4" TYPE="ext4" PARTUUID="1ef0523b-06"   /etc/fstab:  # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point>   <type>  <options>       <dump>  <pass> # / was on /dev/sda6 during installation UUID=fe90c52c-c1b7-4845-971e-e7ed5cb45ac4 /               ext4    errors=remount-ro 0       1 /swapfile                                 none            swap    sw              0       0 /dev/mapper/cryptswap1 none swap sw 0 0   /etc/crypttab:  cryptswap1 UUID=f09a516a-22c0-475c-b749-31ffed5c7bda /dev/urandom swap,offset=1024,cipher=aes-xts-plain64   ls -alh /swapfile:  -rw------- 1 root root 2.0G May  3 13:31 /swapfile


GRUB rescue problem after deleting Ubuntu partition!

After I deleted my Ubuntu partition, I rebooted my computer and I only get a prompt:   grub rescue >   The command ls lists   (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)   I check them one by one:  ls (hd0,msdos5)/ ls (hd0,msdos1)/   But I cannot find the right partition.


doubts about the Linux filesystem hierarchy

I'am trying to learn about the filesystem hierarchy but I can't get my mind wrapped around some of the concepts.   /mnt: What do I put here? In theory, is a place for mounting temporary file systems so, where do I mount the 3 extra hard-drives that are in my computer? /usr: here is where all the programs that are not a part of the OS go (Thunderbird, Gimp,...) so, why is useradd command in /usr/sbin? Isn't user management an intrinsic part of the OS? if all the software that is not part of the OS is intalled in /usr (/usr/bin, /usr/lib,...), why the configuration files are in /etc? shouldn't they be in /usr/etc/? /opt: What's the difference between /opt and /usr?   EDIT:  I do not see, in the post indicated, the answers to:   where do I mount the 3 extra hard-drives that are in my computer?  why is useradd command in /usr/sbin? Becasue in /bin only goes what's necessary for starting up the system.  why the configuration files are in /etc? shouldn't they be in /usr/etc/? What's the difference between /opt and /usr? I've already found the answer to this one. /opt is for software that is not part of the distro nor the official repository.


How do I get Ubuntu working on a Nexus 7 (2013)?

Can anyone tell me whether the information at "" still holds for the 2nd generation Nexus 7?  I'm thinking that there may be new compatibility issues, since the hardware/chipset changed.  If the images don't work for Nexus 7 (2013), are there any plans to migrate to and support this device?  Thanks for any help and advice.


I have Windows 8 Pro activated with kms. when I open windows store, it doesn't show "win8.1 available". clicking on ms-windows-store:WindowsUpgrade just brings me to windows store main screen  slmgr /dli shows volume_kmsclient channel  I can upgrade it to WMC. Laptop is W8Pro WMC and update is available, it's retail channel  Is W8 for KMS clients delayed or what?


I have    Input:           NISHA =\455     Output:   NISHA = 455   I want to remove \ from output. I tried to use command sed "s/[\]//g" P but it is not working and it flags an error:  character found after backslash is not meaningful


arcpy add rasters using raster calculator

what I want to do is add multiple raster layers stored in FGDB together using the raster calculator in arcpy   To start off I have seen this question   this is what it would look like in arcgis raster calculator   'remap1'+'remap2'+'remap3'+'remap4'+'remap5'+'remap6'+'remap7'+'remap8'+'remap9'+'remap10'+'remap11'+'remap12'+'remap13'+'remap14'+'remap15'+'remap16'+'remap17'+'remap18'+'remap19'+'remap20'+'remap21'+'remap22'+'remap23'+'remap24'+'remap25'+'remap26'+'remap27'+'remap28'+'remap29'+'remap30'+'remap31'   now in Python   import arcpy from arcpy.sa import * arcpy.env.workspace=env reclass1 = '+'.join(["Raster("+"r'{}'".format(x)+")" for x in arcpy.ListRasters() if x[:5]=='remap' if int(x[5:]) < 14 ]) print reclass1   which prints out to    Raster(r'remap1')+Raster(r'remap2')+Raster(r'remap3')+Raster(r'remap4')+Raster(r'remap5')+Raster(r'remap6')+Raster(r'remap7')+Raster(r'remap8')+Raster(r'remap9')+Raster(r'remap10')+Raster(r'remap11')+Raster(r'remap12')+Raster(r'remap13')   now how do I execute this command and save it to new Raster file?   b=Raster(reclass1) b.save("blah")  Traceback (most recent call last):   File "R:\Data\LUCZ_2017\ConservationPriorityAreas\cons.py", line 36, in <module>     Raster_Calculator(env2)   File "R:\Data\LUCZ_2017\ConservationPriorityAreas\cons.py", line 34, in Raster_Calculator     b=Raster(reclass1) RuntimeError: ERROR 000732: Input Raster: Dataset Raster(r'remap1')+Raster(r'remap2')+Raster(r'remap3')+Raster(r'remap4')+Raster(r'remap5')+Raster(r'remap6')+Raster(r'remap7')+Raster(r'remap8')+Raster(r'remap9')+Raster(r'remap10')+Raster(r'remap11')+Raster(r'remap12')+Raster(r'remap13') does not exist or is not supported   update  reclass1 = [Raster(x) for x in arcpy.ListRasters() if x[:5]=='remap' if int(x[5:]) < 14 ] print reclass1  print sum(reclass1)   use the regular python sum tool??  Traceback (most recent call last):   File "C:\Users\Desktop\abid.py", line 19, in <module>     print sum(reclass1) RuntimeError: ERROR 999998: Unexpected Error.


Downgrade database from SQL Server 2012 to 2008

Hi guys got a problem with a database.  I've been asked to perform some indexing and delete queries on a live database, so first of I wanted to get the database to our dev server so I can test out some things before I commit to live.  Unfortunately the dev is SQL Server 2008 and the live is SQL Server 2012. So I've had to try and downgrade the database.  Database is a lovely 33gig. and I've started to use the generate script wizard to create a 2008 version.    Problem is it gets so far then errors on random tables. So far I have no idea what to do to solve the issue. In the advanced settings of the wizard I select schema and data (yup going to be huge)  Error is due to my pc running out of disk space. I have a problem, how do I recreate this DB in 2008 that's both fast and easy? generating the script like that hasn't worked.  Open to ideas guys!


Is "if __name__ == '__main__'" required in a __main__.py?

In a project that has a __main__.py, rather than  # __main__.py # def main...  if __name__ == "__main__":     main()   ...is it OK to just do:  # __main__.py # def main...  main()   Edit:  @user2357112-supports-Monica's argument made a lot of sense to me, so I went back and tracked down the library that had been giving me issues, causing me to still be adding the if __... line. It's upon calling python -m pytest --doctest-modules.   Maybe that's the only place that makes a mistake in running __main__.py? And maybe that's a bug?  Reproduced by putting the first example in the  in a __main__.py:  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― package/__main__.py ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― package/__main__.py:58: in <module>     args = parser.parse_args() /usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py:1755: in parse_args     args, argv = self.parse_known_args(args, namespace) /usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py:1787: in parse_known_args     namespace, args = self._parse_known_args(args, namespace) /usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py:2022: in _parse_known_args     ', '.join(required_actions)) /usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py:2508: in error     self.exit(2, _('%(prog)s: error: %(message)s\n') % args) /usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py:2495: in exit     _sys.exit(status) E   SystemExit: 2 --------------------------------------------------------------------------------------- Captured stderr --------------------------------------------------------------------------------------- usage: pytest.py [-h] [--sum] N [N ...] pytest.py: error: the following arguments are required: N  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  Results (4.23s):


Prove the positive definiteness of Hilbert matrix

This is so called Hilbert matrix which is known as a poorly conditioned matrix.  $$ A =        \left(\begin{matrix}         1 & \frac{1}{2} & \frac{1}{3} & ... & \frac{1}{n} \\         \frac{1}{2} & \frac{1}{3} & \frac{1}{4} & ... & \frac{1}{n + 1} \\         \vdots & \vdots & \vdots & \ddots & \vdots \\         \frac{1}{n} & \frac{1}{n + 1} & \frac{1}{n + 2} & ... & \frac{1}{2n - 1} \\         \end{matrix}\right) $$  The task is to prove that matrix A is positively definite.   A possible way to go is to look at the scalar product:   $$(f, g) = \int_0^1f(x)g(x)dx$$   within the space of polynomials of degree not higher than $(n - 1)$. There our form $(\cdot, \cdot)$ is bilinear, symmetric and positively defined thus our polynomials' space with that form is, in fact, an euclidean space of degree $n$.   Now let's take the following basis: ${1, x, x^2, ..., x^\left(n - 1\right)}$. It's easy to see that matrix A is a Gram matrix for this basis.   But is there another approach?


How could I explain mathematically, that the winding number of a closed curve $\gamma$  around $a$ ($a \notin \gamma$) gives always an integer value. $$ W(\gamma,a)=\frac{1}{2\pi i} \int_{\gamma} \frac{dw}{w-a} $$  where $W(\gamma,a)\in \mathbb{Z}$


Is it legal to audio or video tape professors while they are lecturing?  Why or why not?


Is there a Google play store apk available somewhere?

Everyone keeps telling me that such apk has never been published by Google. Is that so?  I need to put Google Play Store on a Chinese mobile, but I cant root nor flash it with a custom recovery ROM. I wanted to use the Open Gapps zip but all of those require custom recovery. Any ideas?  Thanks a lot in advance!


Fine tuning the agsm bibliography style, and adding links

Lovely day. I am quite new to LaTeX but picking things up fast. One area which is confusing me greatly is getting my bibliography to work just how I like it.  I have settled on the agsm style and the natbib citation management issue, but there are still some issues.    The volume number of a journal is set in bold. (blue in pic) I want it to just be plain (un-bolded). The journal titles have apostrophes around them. (red in pic) I want to get rid of the apostrophes.   This image added highlights these problems.    Lastly, for the electronic copy, I would like it so the journal identifiers (DOIs) are highlighted blue, so you can click on them and it takes you to the website of the journal article. (green in pic)  Help on any / all of the above would be greatly appreciated. I have searched online for about 8 hours and finally need to ask the lords of TeX.  Edit: This is my bibliography code so far I forgot to add:  \documentclass[11pt,a4paper]{report} \usepackage[numbers]{natbib} \renewcommand\harvardyearleft{\unskip, } \renewcommand\harvardyearright[1]{.}  \bibliographystyle{agsm} \usepackage{hyperref} \begin{document} \cite{ref1} \bibliography{bibFile} \end{document}   Note - that \renewcommand I found from this forum; it gets rid of brackets around the year field which I didn't want.


The separation between the two plates of a capacitor is increased

I had the following question on a quiz recently:     A capacitor consisting of two parallel plates, separated by a distance $d$, is connected to a battery of EMF ε. What happens if the separation is doubled while the battery remains connected?    The correct answer was "The electric charge on the plates is halved." However, we were previously given a question in which a circuit consists of a capacitor of 6 μF and a resistor of 300,000 Ω connected to a battery, and the separation between the plates of the capacitor is quadrupled. However, in this circumstance, the charge on the capacitor immediately after the plates are separated remains the same, and the potential difference across the capacitor increases.   I am confused as to why these questions have different answers to them, despite having an extremely similar setup. My best guess is that the circuit in the second question also has a resistor, but I am not sure, and help would be greatly appreciated.


I am going to replace my bent hub on my MTB. The hub is Novatec D042SB and the rim which I am going to order is Sun Ringle Inferno 25 29er. Since my hub is not so popular there are not any default dimensions available in online spoke calculator databases. I cannot take apart all the stuff on the wheel for precise measurements and that's why I have to ask for your help. I have used several calculators and all of them gave me different result ranging from 290mm to 294mm.   Here are the dimensions of my hub in Novatec's official website.  Flange to Flange 58.4mm  Flange Diameter 58mm  Over Locknut 135mm  Offset of centers 6.8 mm  Rim ERD 602 mm  If anyone has experience with building a wheel, please help me to determine the exact length of the spoke  Thanks in advance


Why is 'binary access meaningless on UNIX systems'?

I am learning C from the K&R handbook. I know (and read) that 'b' in a fopen call signals binary access. The book then goes on to say that this (binary access) is meaningless on UNIX systems.  The inference is that it is meaningful on Windows.  My question is, why does Windows make this distinction between text and binary and UNIX doesn't. Also, what is the distinction?  I found some things that come close to answering it, but still don't quite satisfy me:      Thanks in advance.


Was using Umbridge's fireplace to get to the Ministry of Magic an option?

In Order of the Phoenix, there were multiple examples that show that Umbridge's fireplace was connected to the Floo Network.  Later on, we know the trio and some DA members wanted to get to the Ministry of Magic to try to rescue Sirius. The only option that came to mind was using Thestrals.  Was using Umbridge's fireplace also an option? If so, was it not considered only because it didn't come to mind?