Why does it show NullPointerException when I take a File Array as the method arguments in this program?

I am learning the Java I/O, and there is one exercise that finding the maximum and minimum files in the directory      C:\Windows   I wrote the following program, while the compiler complains:  Exception in thread "main" java.lang.NullPointerException at file.TestFile.compareFile(TestFile.java:25)  at file.TestFile.compareFile(TestFile.java:27)  at file.TestFile.compareFile(TestFile.java:27)  at file.TestFile.main(TestFile.java:18)   This is my code:  package file;  import java.io.File; import java.io.IOException;  public class TestFile {     static double MaxSize = 0;     static double MinSize = Double.MAX_VALUE;     static File MaxFile = null;     static File MinFile = null;      public static void main(String[] args) throws IOException {         File f = new File("C:\\Windows");         File[] fs = f.listFiles(); //      System.out.println(fs[10]); //      if (true) //          return;         compareFile(fs);          System.out.printf("The maxi file is %s, its size is %,d bytes", MaxFile.getAbsolutePath(), MaxSize);         System.out.printf("The mini file is %s, its size is %,d bytes", MinFile.getAbsolutePath(), MinSize);     }      public static void compareFile(File[] files) {         for (File x : files) {             if (x.isDirectory())                 compareFile(x.listFiles());             if (MaxSize < x.length()) {                 MaxSize = x.length();                 MaxFile = x;             }             if (MinSize > x.length() && x.length() != 0) {                 MinSize = x.length();                 MinFile = x;             }         }     } }   What I am confused is when I add the 3 lines of debugging code (comment out here), the fs is not a null pointer. It can get the File element


Can someone give an explanation using the definition of convergence in partial sum to show how the above infinite sum converges to 1?  Thanks


How can I send an email from within iCloud.com using a different email address?

I have my own private domain hosting solution with email, for example, test@test.com.  When I am using the iCloud.com website from my browser, let's say for creating a spreadsheet, I will want to shed that with other people, however, I don't want to send it from my iCloud email address, instead I want to be able to send emails from within iCloud.com using my other email address, e.g., test@test.com, how can I do this?  Please note I am NOT asking to be able to send from iCloud from Mail, this is different. I believe my question is not the same as "Can I use a non "me.com" address to send email with iCloud".  If I am logged onto iCloud.com through my browser, I want to be able to use the mail part to send emails from my test@test.com address and not my name@icloud.com address.  I have checked the settings within iCloud and was not able to find anything.


how to prove this equality $||f||_{L^p}^{p}=p\int_0^{+\infty} \lambda^{p -1}\mu(E^f_\lambda) d\lambda$

Let $(X,B(X),\mu)$ be a measure space, suppose there is a function f that is measurable  Define the distribution function ${\mu(E_\lambda^f): {\mathbb R}^+ \rightarrow [0,+\infty]}$   How to prove this equality :$$||f||_{L^p}^{p}=p\int_0^{+\infty} \lambda^{p-1} \mu(E^f_\lambda) d\lambda$$ ?  My attempt:  We know that :$||f||_{L^p}^{p}=\int_X |f| d\mu$  By the Chebyshev inequality: $\lambda\mu(E_\lambda^f)<\int_X |f|dx$  And then? I don't know how to solve this exercise  Any help is appreciated


Avoid coalesce() or case when in where clause

I'm trying to avoid case when or coalesce in where clause and below is the current situation where col= coalesce(@var,col)  How can I write this condition so that I can avoid colesce() uses in where clause but at same time able to handle the null case


Let $ n \geq 3 $. By factorising $ n $ or $n + 1 $ (as appropriate), show that $ \mathbb{Z}[\sqrt{-n}] $ is not a UFD.   My thoughts so far:  Define $ N(a + b \sqrt{-n}) = a^2 + n b^2 $.  Suppose $ n $ is odd. Then $ n + 1 $ is even, say $ n + 1 = 2k $. Now $ N(2) = 4 $, and the norm of an element in this ring can never be 2, so we have that 2 is irreducible. Now note that $ 1 + n = (1 + \sqrt{-n})(1 - \sqrt{-n}) $. Is $ 1 + \sqrt{-n} $ irreducible? Well, if $ 1 + \sqrt{-n} = z_1 z_2 $, then $ N(z_1)N(z_2) = 1 + n $. So $ N(z_i) \leq \frac{n+1}{2} < n $. But this means both $ z_i$ must be purely real, which clearly can't be the case. Similarly, $ 1 - \sqrt{-n} $ is irreducible. Neither of these factors are equal to 2, and so 2 appears in one factorisation but not another. Hence for $ n $ odd, we don't have a UFD.  What about $n$ even? How can I factorise $ n $ other than as $ 2k $ for some $k $?  Thanks  EDIT: I overlooked $ n = \sqrt{-n} ( -\sqrt{n}) $!


Why "Winter Hats" are given not using user's local time?

I have received a new winter hat, which is given on vote/post on 25 December:    but in my country it is yet 24 December:    Should not be the hat given using user's local time?


Shell Script - syntax error near unexpected token `else'

With the following shell script, why I am getting errors   syntax error near unexpected token `else'   Shell Script   echo "please enter username" read user_name echo "please enter password" read -s pass echo ${ORACLE_SID} SID=${ORACLE_SID} if ["${ORACLE_SID}" != 'Test'] then sqlplus -s -l $USER_NAME/$PASS@$SID <<EOF copy from scott/tiger@orcl insert EMP using select * from EMP exit EOF else echo "Cannot copy" fi


Proof a $2^n$ by $2^n$ board can be filled using L shaped trominoes and 1 monomino

Suppose we have an $2^n\times 2^n$ board. Prove you can use any rotation of L shaped trominoes and a monomino to fill the board completely.  You can mix different rotations in the same tililng.


When the good ship Serenity is traveling in deep space, the crew experiences what looks like an Earth-normal (or Earth That Was-normal) level of gravity. Is it ever explained how the ship is able to generate artificial gravity? The ship doesn't spin, so  is out.  is a possibility, but I think the gravity in the ship pulls in a direction that is perpendicular to the direction the ship is usually traveling in, not opposite, like this method would require.   So: how does she pull it off?   Extra credit: how does she pull it off in the episode ? Serenity's engine is totally dead, to the extent where not even life support systems are online. Yet Mal still has to valiantly haul himself around on the floor to replace the compression coil, so whatever creates the artificial gravity on Serenity is clearly still going. How?


Multiple MX records pointing to multiple servers for a single domain

Is it possible to have multiple MX records pointing to multiple mail servers for a single domain? Must all mail accounts be identical on each of those servers, or is it possible to have email1@mydomain.com set up only on one mail server, and email2@mydomain.com set up only on the other mail server?  The reason for this is the need to use two different email service providers but still keep everything at a common domain.  My understanding of MX record functionality tells me this scenario won't work, that each server will respond with "mailbox not found" errors for the accounts not on that particular server. Help?


Determining convergence of series when terms are decreasing by factor less than 1

Suppose that $a_n > 0$ and that, for n sufficiently large, $$\frac{a_{n+1}}{a_n}\leq 1- \frac{c}{n}$$ for $c>1$  Prove that the series $\displaystyle \sum_{n=1}^{\infty}a_n$ converges.  Hint supplied : Prove the inequality $log(1-x)<-x$ for $0<x<1$  I'm not entirely sure how to approach this, the ratio test fails and I'm trying to show the series is Cauchy but to no avail.


why not classify organisms based on genetic distance?

When learning about "families of animals" in mid-primary school, my son asked me if there is not a better way to classify animals than by looking at them (they were taught that animals are grouped into families based on what covers the skin (hair, feathers, nothing), number of legs, the way they breathe, etc.).  He was wondering if there would be a more quantifiable way of grouping them (this is my wording). I told him that since all animals share the same genetic coding principles, we could try to calculate how different their genetic material is, and derive a "distance". This would allow grouping animals in possibly novel ways, and maybe have some of them cluster in "families" (possibly different from the existing ones).  After having played my role of super-hero-dad, I now wonder if this makes sense? (and if so - is it used? and if so - why still using some classifications from centuries ago?)


URL reference width continues after margin

does anyone has this problem or can solve it, please? I added the references through Mendeley application desktop. Everything is fine except the URL width size. If it is too big it continues across the page size and margin size.  \bibliographystyle{IEEEtran} \bibliography{/home/Thesis.bib}    Thanks


I wrote a javascript function to extend an object with a property(s) that follow this sort of notation: "a.b.c". The function works flawlessly (so far) but I couldn't quite understand after looking back over my code why it worked. I'm assuming there is a javascript scope explanation, maybe the for loop? but I was wondering if anyone could explain this to me properly.  var extend = (target, targetProperty, value) => {   var targetProperties = targetProperty.split(".");    for (var i = 0, len = targetProperties.length; i < len; i++) {     var part = targetProperties[i];      if (i == len - 1) {       target[part] = value;       break;     }      if (!target[part]) {       target[part] = {};     }      target = target[part];   } }  var myObject = {myProperty: "Hello"};  console.log(myObject);  extend(myObject, "a.b.c", "World");  console.log(myObject);   It is pretty straight forward, I understand that "target" is coming in by reference because it is an object, the part that I don't understand is how on the line target = target[part]; the original object being passed in is not completely overwritten by the newly created empty object on this line target[part] = {};.  Thanks!


Does the following have an analitical solution?

I have the following equations: \begin{equation} {1\over f(x,y)} {\partial f(x,y) \over \partial x} \alpha(x,y) + {1\over f(x,y)} {\partial f(x,y) \over \partial y} \beta(x,y) = \gamma(x,y) \end{equation} Where $\alpha(x,y)$, $\beta(x,y)$ and $\gamma(x,y)$ are exactly known functions. What I need to find is $f(x,y)$. Can anyone help me find a solution? Or are there any assumptions (other than $f(x,y) = g(x)h(y)$ that will allow me to solve this analytically? Is it a standard equation that I haven't come across? If no analytical solution exists can it be solved numerically - if so how would I go about doing that?


Switching inputs on my monitor requires me to unplug and replug my MacBook Air USB-C Cable

My monitor has 2 inputs, an HDMI input (which is plugged into my Windows machine) and a USB-C input (which is plugged into my Macboook Air). I switch between these inputs often, but everytime I switch into to the USB-C input mode mode (which again, is plugged to my macbook) it blanks the screen. I need to unplug and replug the usb-c cable to get the screen working.  When I switch inputs to the Windows Machine, it works consistently. I can switch back and forth between HDMI and USB-C, and the HDMI mode will always show my Windows Desktop. It's just the USB-C input that's troublesome. Switching out of USB-C to HDMI, and then back again causes the screen to just blank.   Mac recognizes the two displays however, but my monitor just says there's no USB-C input. I need to manually unplug and replug the cable each time I switch inputs for it to work as expected.  Additionally, The USB-C cable from my monitor charges my macbook and provide additional USB ports, all of which work fine. It's just the video feed that drops each time


I am running Ubuntu on VirtualBox and I can't access Su.   When I type su and enter my password it says permission denied. I want to create and edit files through terminal so I need to do this.


Managing Ubuntu 14.04 clients alternative landscape

We are migrating some Windows pc's to Linux (Ubuntu 14.04). For Windows we have a tool to manage those devices:   checking invetory on pc's (which software is installed) pushing software to the clients (batch / bash scripts) taking over the pc's   I saw that Ubuntu has a tool called landscape. Is there a free opensource alternative for this? Which is capable of the things I described?


Prime but not maximal ideal in k[x,y] is principal

Prime ideal in $k[x,y]$, which is not maximal, is generated by one element. ($k$ is a field)   Why it is true? I know that dimension of $k[x,y]$ is equal 2 and also that $k[x,y]$ is UFD. I have problems to connect these two facts. I would like any hint.


Is there a way to explicitly state what the ticks on a TikZ/pgfplots picture should say (ie 10.000 rather than 10)?

I'm trying to show that my graph has 5 significant figures on the y-axis. But I can't seem to get TikZ/pgfplots to show the trailing zeros though. I tried to get TikZ/pgfplots to show the extra zeros by using the ytick option, but it doesn't seem to work.  \documentclass[letterpaper,12pt]{article} \usepackage{pgfplots} \usepackage[margin=1in]{geometry}  \begin{document} \begin{tikzpicture}     \begin{axis}[     xticklabel={\pgfmathprintnumber\tick\%},     xmin = 0, xmax = 20,     ymin = 10,    ymax = 10.3,     xlabel = Concentration,     axis x line = bottom,      ylabel = Mass (g),     axis y line = left,      xtick = {0,5,10,15,20},     ytick = {10.000,10.100,10.200,10.300}, % My attempt thus far     grid = major,     width = \textwidth - 1in,     tick align = outside     ]         \addplot coordinates{         (5,10.012)         (10,10.180)         (15,10.230)         };     \end{axis} \end{tikzpicture} \end{document}   And here's what the document currently looks like:


Deleted Ubuntu from dual boot system, now can't boot into Windows

Can't boot into Windows after Ubuntu partition was deleted.  did not solve the problem. Cannot figure out what the actual problem is.


How to "find and replace" in a PDF on OS X?

I need to "find and replace" text in a PDF file on OS X Yosemite.  It would be better if there was a "replace all" feature. How can I do this on OS X?


How to create a relative frequency histogram

I am trying to create a normalized frequency histogram. A minimal working example is adapted from  by @Jake (see code below). I know I can switch add density to hist={} but that is not doing what I want. I want to divide the frequency of the specific interval by the total number of observations (here it is 10). The goal is to always have a y-axis that is scaled between 0 and 1. I get    but I want (note the epic hand drawn paint zeros on the y-axis :D).   \documentclass[border=5mm]{standalone} \usepackage{filecontents} \usepackage{pgfplots, pgfplotstable} \usepgfplotslibrary{statistics}  \begin{filecontents}{data.csv} dist 0.00 0.15 0.15 0.25 0.25 0.25 0.40 0.40 0.40 0.40 \end{filecontents}  \begin{document} \begin{tikzpicture} \begin{axis}[     ybar,     ymin=0,     ymax=4 ] \addplot +[     hist={         density,         bins=4,         data min=0.0,         data max=0.4     }    ] table [y index=0] {data.csv}; \end{axis} \end{tikzpicture} \end{document}


Is "Had you anything", as a whole sentence, grammatically correct?

I saw someone said "Had you anyone specific in mind" in an old English drama. How am I supposed to understand this sentence?


probability that all balls are white given that two randomly drawn balls are found to be white

A box contains five balls, two are drawn at random and are found to be white. If probability of all balls in urn are white is $k$ then the value of $k$ is--  I tried by letting $y$ denote the number of white balls in the urn.Then the given problem is equivalent to $$P(\text{all balls white}|\text{two balls white})P(\text{two balls white})=P(\text{two balls white}|\text{all balls white})P(\text{all balls white})$$  Now $$P(\text{two balls white})=\frac{\binom{y}2}{\binom52}$$.Also $$P(\text{two balls white}|\text{all balls white})=1$$ And $$P(\text{all balls white})=k$$ Also $$P(\text{all balls white}|\text{two balls white})=\frac{y-2}{3}$$.I cannot however figure out how to eliminate $y$ and find out $k$.I am in search of a analytical answer which uses conditional probability. Any ideas? Thanks.


In what sense is the forgetful functor $Ab \to Grp$ forgetful?

One sometimes hears about "the forgetful functor $Ab \to Grp$." Given that the image of an object under this functor is still abelian, in what sense is this "forgetful"?


Why is the output "false2", when the condition at the if block is 1 which is true?

Why is the output "false2", when the condition at the if block is 1 which is true ?     #include<stdio.h> int main(){ int x=0; if (x++) printf("true1"); else if (x==1) printf("false2"); return 0;}


datediff is always 1 number less than I need

I have the following which seems to work perfectly, except that it's always 1 less than the count I need:  DECLARE @start_day DATETIME; DECLARE @end_day DATETIME; DECLARE @start_time DATETIME; DECLARE @end_time DATETIME;  SET @start_day = '2013-06-03'; SET @end_day = '2013-06-07';  PRINT   DATEDIFF(d, @start_day, @end_day)       - DATEDIFF(wk, @start_day, @end_day) * 2       - CASE              WHEN DATEPART(dw, @start_day) != 7 AND DATEPART(dw, @end_day) = 7 THEN 1              WHEN DATEPART(dw, @start_day) = 7 AND DATEPART(dw, @end_day) != 7 THEN -1              ELSE 0         END    I should be getting   `5` for `2013-06-03` to `2013-06-07` but it's giving me `4`. `5` for `2013-06-03` to `2013-06-08` but it's giving me `4`. `5` for `2013-06-03` to `2013-06-09` but it's giving me `4`. `6` for `2013-06-03` to `2013-06-10` but it's giving me `5`.   So my question is:  How do I get:  `2013-06-03` to `2013-06-07` to equal 5 `2013-06-03` to `2013-06-08` to equal 5 `2013-06-03` to `2013-06-09` to equal 5 `2013-06-03` to `2013-06-10` to equal 6     Please note, adding +1 to the end does not solve the problem!!!


(Auto)Convertion from point-coordinates (postgres)

When loading data from my postgres-db (where I can only read from, so not my own db) the field with the point-coordinates like .. 'POINT(390002.1610814564 6001433.406049595)'  .. are getting (auto)converted into .. 0101000020E964000022936245FEDA1741A4A29D5E0DE85641  Working with coordinate-systems is rather new to me, so can anyone tell me how this converted coordinate is called or how I can convert it back into the previous format? Don't know if this information is helpful, but I'm using django (python) with the following code: try:     with connections['db_second'].cursor() as cursor:         cursor.execute("SELECT * from ...")         row = cursor.fetchall() except Exception as e:     cursor.close()


What are the possible ways to send salesforce records to SFTP if we want to send the data in a text file? What tools can we use to connect to SFTP. Any help would be much appreciated.


Is it possible to prevent the browser from following redirects when sending XMLHttpRequest-s (i.e. to get the redirect status code back and handle it myself)?


Parts of scene are cut off in the camera's view

Because the ground in my scene is very large a big portion is being cut off in the camera view.     When I adjust the scale the camera other mesh cut from the scene.    I do not want to change the angle of the view. The ground is huge yet its not visible in the camera. Any suggestions on how to resolve this would be appreciated.


How do I change the color of the following line in bibliography?  \bibitem{Alexander} J. W. Alexander, \textit{Functions which map the interior of the unit circle upon simple regions}, Ann. of Math., \textbf{17}(1915-1916), 12-22.


$a_n > 0$ and $\sum_\limits{n=1}^{+\infty} \frac{1}{a_n}$ converges. Prove $\sum_\limits{n=1}^{+\infty} \frac{n}{a_1 + \cdots + a_n}$ is convergent.  I find that this may have something to do with Stolz Theorem which says that if $\{\frac{1}{a_n}\}$ is convergent then  $$\lim_{n \rightarrow +\infty} \frac{n}{a_1+\cdots +a_n} = \lim_{n \rightarrow +\infty} \frac{1}{a_n}$$ This may implies that $\frac{n}{a_1+\cdots +a_n}$ and $\frac{1}{a_n}$ have the same declining speed so leads to the answer of the question.  However, I don't know how to turn this into correct proof.


What is the chronological list of D&D 3(.5)e material?

The ring of the darkhidden wondrous item has been published in both MoF and MIC. I assume Magic of Faerûn was printed before Magic Item Compendium, but I want to know for sure. There is a similar , so why not 3(.5)e? The reason that I say 3(.5)e instead of 3e or 3.5e is because some people are willing to allow/use (unupdated) 3e material in their 3.5e game, and , like Savage Species and Book of Vile Darkness. I am particularly interested in 3.5e. The reason that I say "material" is I don't assume that all crunch/rules/mechanics (and things that may-be-more-fluff-but-may-have-an-effect-on-crunch) were printed in books. For example, magazines and web articles may not be considered books.  So, can we have a chronological list of 3(.5)e material?


How did the notation "ln" for "log base e" become so pervasive?

Wikipedia :     The natural logarithm of $x$ is often written "$\ln(x)$", instead of $\log_e(x)$ especially in disciplines where it isn't written "$\log(x)$". However, some mathematicians disapprove of this notation. In his 1985 autobiography, Paul Halmos criticized what he considered the "childish $\ln$ notation," which he said no mathematician had ever used. In fact, the notation was invented by a mathematician, Irving Stringham, professor of mathematics at University of California, Berkeley, in 1893.   Apparently the notation "$\ln$" first appears in Stringham's book Uniplanar algebra: being part I of a propædeutic to the higher mathematical analysis.  But this doesn't explain why "$\ln$" has become so pervasive. I'm pretty sure that most high schools in the US at least still use the notation "$\ln$" today, since all of the calculus students I come into contact with at Berkeley seem to universally use "$\ln$".  How did this happen?


Was the Emperor himself xenophobic? Or was that merely a political point?

It's well known that the Empire was xenophobic and "human-firster" in general (I can provide relevant Wikia links if someone has doubts).  But did there exist Emperor Palpatine's (or rather Darth Sidious') personal xenophobia?   Or was Empire's Xenophobia merely a political tool to both involve/placate/attract xenophobic humans on Coruscant and other Core worlds; as well as a general Nationalistic-like "against the Others" tool, which many Earth human states relied on successfully?  Please note that I'm speaking of a generic "humans are better than non-humans" xenophobia, and NOT Palpatine's dislike for specific individual races such as Caamasi which happened for a reason (e.g. explicitly or implicitly standing in the way of his power).  I'm looking for canon (any canon, not only G-) references only, not speculation.  As counterpoints to Emperor being xenophobic, one can consider Thrawn or Xizor.


Move boot partition from one internal hard drive to another

I recently bought an SSD and installed Windows 7 on it, however it didn't install exactly how I intended - it still requires my HDD to be plugged in to boot onto the SSD.   Hopefully the following image explains my situation a bit better. My SSD is the C: drive, and the old HDD is D: - this drive has a 100MB partition which contains the boot sector that requires the HDD for booting into Windows.    From what I've found out, booting from the Windows 7 install DVD and running startup repair will resolve the issue. However, as every situation is different (and I'm particularly paranoid I'll somehow brick my system), I wanted to be sure this was correct.  So, what's the best way to get my SSD to boot without requiring the HDD to be present?


What is the injective envelope of $\mathbb{Z}/n\mathbb{Z}$?

In the category of $\mathbb{Z}$-modules, what is the injective envelope of $\mathbb{Z}/n\mathbb{Z}$?   I was hoping to find a divisible group containing $\mathbb{Z}/n\mathbb{Z}$ such that it is also an essential extension. We already know that $\mathbb{Z}/n\mathbb{Z} \rightarrowtail \prod_{i \in \lbrace 1,\ldots,n \rbrace}(\mathbb{Q}/\mathbb{Z})_i  $. But is this an essential extension? I can't prove or disprove it.  Guessing by the 'size' of it ($\prod_{i \in \lbrace 1,\ldots,n \rbrace}(\mathbb{Q}/\mathbb{Z})_i   $), i don't think that it is the right answer.  Also, is there an algorithm sort of thing for finding injective envelope for modules over arbitrary rings.


Creating Salesforce Person Accounts via Visualforce

I have recently activated and configured Person Accounts in our salesforce org. We will be using these within the service console and also integrating Postcode Anywhere for address lookups. To integrate PA in the console, it has to be done via a visualforce page as there is no sidebar to load the app. To resolve this, I have created a Visualforce page that covers all account record types, including Person Accounts and have overridden the 'new' and 'edit' buttons to call the VF page.  So far so good. Now, when editing accounts, everything works currently, all fields show and PA works fine. BUT, when creating a NEW Person Account, the Salutation, First Name and Last Name field so not show on the page and so the record cannot be saved (as Last Name is required to create an account).  Having spoken to Salesforce about this (as this is quite a fundamental issue), they claim the those 3 fields have no API field definitions and so cannot be called via a VF page. That's obviously no correct as they work fine in edit mode (having created a person account using the standard page) and they are also listed in the WSDL file.  Having Google'd a LOT, I believe the problem is there because the isPersonAccount boolean field is not set at the point of creating the account (in VF) and therefore the page does not allow the name fields to render.  So on to my question (I've not had much experience with VF or controllers), is it possible to somehow set the isPersonAccount field to true using a controller extension or something similar, when creating a person account via VF. Or can the page be somehow saved before presenting it to the user so the field gets set and the name fields then render?  Any help with this would be massively appreciated as Salesforce aren't being exactly helpful and I can't be the only person in the world that needs to create a person account via a visualforce page?


Switch the default shell by another interpreter

So I have some experience with linux and I was always wondering if it is possible to modify the terminal so that it executes a different interpreter (like python) rather than the default shell interpreter (like sh or bash).  (Note that this is not just "" or "".  This is about running things that are not shells, per se, but are interpreters.  I give python as an example to make things clearer, but I could have easily said php or any other interpreter.)  Is this possible, and if so, how would I do it?


I have been playing cities skylines for a while now and every now and again my city goes through the 'plague', where pretty much the entire city falls sick (see image below).   My water pollution is 0% and have more than sufficient crematoriums to accommodate the dead.   A few google searches point to water pollution but that is not the issue here... Any ideas what could be going on?


Given $f$ defined at $G$ and $f^3,f^2$ holomorphic at G prove $f$ holomorphic My try: $f^3-f^2$=$f^2(f-1)$ because the LHS is holomorphic so does the RHS and then we get that $f-1$ is holomorphic and $f$ is holomorphic, is this right?


How can I search and install Windows Updates through the command-line?

I need to automate the task of search and install Windows 7 and 8 updates through the command line(it could be over cmd, vbs or powershell), there is some way?  Thanks in advance.


This skull was found in the mountains/woods of extreme southwestern Virginia (Dickenson County). There is not (to my limited knowledge) any animal native to this area that has this type of skull. Anyone have any idea what it could be? Sorry, no teeth or lower jaw were found. The backbone seems to come directly out from the back of the skull and the nose/beak/front area seems to be flared on the sides.


Where does the feather come from in the trailer for Game of Thrones S8?

In the  we see a feather which is being held in Lyanna's statue's hands which falls to the floor as Jon walks past it.      Jon does turn to look behind him when the feather hits the floor as well.   We then see the feather being the first thing to start to freeze as the cold, and possibly the White Walkers, approach.    That is the last we see of it, however, a lot of focus is put on this feather. So, where did it come from and considering its focus in the trailer is there any significance to it?


Equivalent implementation of Array.prototype.map using for loop

I am trying to implement a version of map that is equivalent to Array.prototype.map using "for loop" and it works similarly yet in the end, it gives me something unusual.  My code is as below:  // the global Array  1. var s = [23, 65, 98, 5];  2. Array.prototype.myMap = function(callback){ 3.   var newArray = [];  4.  console.log(this); // prints 23,65,98,5 which is correct 5.  for(let element in this){ 6.    console.log(this[element]); // this line and the push doesn't work well 7.    newArray.push(callback(this[element])); 8.    console.log("element: " + newArray); 9.  } 10.    console.log("final: " + newArray); 11.  return newArray; 12. };  13. var new_s = s.myMap(function(item){ 14.     return item * 2; 15. });   `  The output of the code is as below:  23,65,98,5 23 elem: 46 65 elem: 46,130 98 elem: 46,130,196 5 elem: 46,130,196,10 function (callback) {   var newArray = [];    window.__console.log(this);   for (var element in this) {     window.__console.log(this[element]);     newArray.push(callback(this[element]));     window.__console.log("elem: " + newArray);   }   window.__console.log("final: " + newArray);   return newArray; } elem: 46,130,196,10,NaN final: 46,130,196,10,NaN   If you look, the final array is printing NaN because of adding the function(callback), but the strange thing is that after the line of declaring a newArray, which I am logging "this"(line 4), the function(callback) is not added. Can somebody please explain what happened and why it is added?  If instead of the for loop, I add the forEach loop it works properly, only with the for loop is that it acts weirdly. (this.forEach(a => newArray.push(callback(a)));)


When Baymax and Hiro find Abigal in the portal she is in deep sleep. She's been there for years so how did she not die of hunger?


Question on proving Primitive Pythagorean triples using Diophantus method?

See the below image (I'm not allowed to embedd the image yet). The reading before this exercise in my course gives the proof for the following corollary: Every Pythagorean triple is similar to one arising from the Babylonian method.


Should superscript and subscript be upright in this case?

What do you think which notation is better to read?  The set $B^{high} = {b_1, \ldots, b_n}$ should indicate the set of all buildings which are high and $B^{low} = {b_1, \ldots, b_n}$ all buildings which are low. Now I have the following options to write this down:   $B^{high}$ seems to be wrong, because Tex treats each letter like it was a variable $B^\mathit{high}$ maybe correct $B^\text{high}$ correct if the word high is descriptive and is not part of the letter for the set (but I'm not sure if this is the case) $B^\textnormal{high}$ same as above, but better if the math mode could be in a surrounding italic text or similar   For a concrete element of the set I would write $b_i \in B^high$. Would you leave both b and i in italic or should the subscript be upright?


Show that $n>(\log n)^k$ for sufficiently large values of $n$

How do you show that $n>(\log n)^k$, $k \in Z_+$ for sufficiently large values of $n$? This is a part of a larger problem that I want to solve, so I would be thankful if someone could show me the method.


Positioning an item at the bottom of a fluid container

I'm having an issue with my html / css. I want to have a "learn more" box in every one of my three sections, located at the bottom middle of each one.    CSS  #learn {     position: absolute;     margin-left: auto;     margin-right: auto;     bottom: 0;     background-color: rgba(255, 255, 255, 0.6);     z-index:1;     margin-bottom: 20px;     left:50%;     width: 150px;     margin-left: -75px;     text-align: center;     line-height: 50px; } #learn a {     color: black;     font-weight: bold; }   It seems to work fine in the top box:
Learn More  However in the section below I use pretty much the same code:

Learn More
   However this time the learn more box doesn't appear. What is it I am doing wrong? I have played around with position: relative without much luck.  TLDR: The learn more box should be at the bottom middle of the header and sections, it only appears in the header.  P.s I tried to strip down my code and css but didn't want to strip out any more as I believe its inclusion will highlight which options will / wont work.


Which is correct:     I have been asked by attorney Smith to inspect the documents.   or     I have been asked by Attorney Smith to inspect the documents.


Inconsistent behaviour with tikz and xcolor monochome option

When xcolor is loaded with the monochrome option, colour is disable for only some, but not all tikz operations.   Why is this? Is it possible to disable colour for all operations? is it possible not to disable colour for any operations?   MWE  (Without the monochrome option, everything is drawn in red.)  \documentclass{article} \usepackage[monochrome]{xcolor} \usepackage{tikz} \usetikzlibrary{positioning}  \begin{document} \textcolor{red}{Red}% black  \begin{tikzpicture}[node distance=1pt]   \node (a) [text=red] {Red};% red   \node (b) [fill=red,below=of a] {};% red   \node (c) [draw=red,below=of b] {};% red   \node (d) [above=of a] {\textcolor{red}{Red}};% black   \draw [red] circle (1);% black   \path [draw=red] circle (1.2);% red \end{tikzpicture}  \end{document}


Optimize webserver to handle huge load spikes

Our application is growing fast so now we need to scale the infrastructure to don't slow down the entire website without worrying on how many users we have  The backend system is based on many curl calls lasting 1-10 seconds and they need to be executed in parallel  We currently have a 4GB ram 4 core vps but sometime we get 503 error when all the 50 channels start in parallel (we setup 50 cron job) that execute 5 curl call/each  These numbers are going to increment fast so we need to find a solution to don't let the end user wait more than a minute to get his things done  Do we need a dedicated server, or it won't make much difference? Or set up aws lambda functions with sns queue? Amazon would be the best solution because whatever amount of sns messages we put in the queue and instantly they will get processed by enabling the trigger, but the lambda function currently don't support PHP so we would to rewrite all the code in Python  How would you manage this situation to improve the performance?


Using ArcPy to zoom to selected feature?

Is there a way to zoom to the extent of a selected feature using the ArcPy module in ArcGIS Desktop 10.


Was Daenerys actually trying to hatch the eggs?

I was reading @Aegon' s response   and I realized that I've never been clear on whether Dani was intentional in her pyre building to do blood magic and wake the dragons, or if she was just grieving Drogo and killing Mirri and her statement about "only death can pay for life" was a slap in the Maegi's face, since in the end she sacrificed her unborn child for the husk of Drogo.    I know she had tried baking the eggs previously and had felt like they could hatch then, but was clearly disappointed and chastised herself for foolishness when they did not. I don't recall inner monologue or statements after that where she said, "ya know what I should have done..."   I guess what I'm asking is whether there is evidence outside her statement to the Maegi that she was intentional in her blood magic rite or if the miracle was a happy accident?


What is the coefficient of the term $a^i b^j c^k$ in the expansion of $(a+b+c)^n$?

What is the coefficient of the term $a^i b^j c^k$  in the expansion of   $(a+b+c)^n$ ?   Given solution:     Before collecting like terms, each term in the expansion is a product   of $n$ factors each  of which is $a, b,$ or $c$.  Those terms which   have exactly i a’s, j b’s and k c’s can be combined into   the single term $a^i b^j c^k$ and the number of such terms will be   equal to the number of n letter strings containing i a’s, j b’s and k   c’s, which by the Mississippi rule is $\frac{n!}{(i!\times j! \times  k!)}$.   I understand that this problem is actually about the derivation of the coefficient of the multinomial theorem,but I am not sure about the combinatoric reasoning,what I mean is that I understand the analogy problem but what I couldn't is how the analogy holds here,Could anybody explain this to me?


Why does Newton's third law exist even in non-inertial reference frames?

While reviewing Newton's laws of motion I came across the statement which says Newton's laws exist only in inertial reference frames except the third one. Why is it like that?


Circuit for free energy from radio waves

Has anybody tried this circuit? this circuit supposedly takes radio waves and turns them into a voltage. My questions are what are the peak voltages? and what current could i possibly hope to get if i run a 5v circuit with say a voltage regulator or a buck-boost converter


How do I install the latest stable version of Firefox?

I want to install the latest Firefox on my Ubuntu (64bit) box.  What is the best way to do this? Is there a specific update site or should I download the binaries manually? If doing manually, in which directory should I put the files? In my home directory, or is there a better place?


Cardinality of ring having more than one left inverse for some element!

Suppose $R$ is a  ring with unity $1$ and for some $a\in R$  there exists  more than one left inverse of $a$ in $R$. Show that $R$ has infinitely many left inverses of $a$.  I am trying to define a map $f:X\to X$ which is one-to-one but not onto or vice versa where $X=\{x\in R\mid xa=1\}$. That will directly imply that cardinality of $X$ can't be finite. But I don't have exact idea of proceeding further.   Edit:Given Ring is non commutative.


physical block size is 2048 bytes Linux says it is 512 bytes

I tried to attach a 1TB WD Passport external and got the message:     Warning: The driver descriptor says the physical block size is 2048   bytes, but Linux says it is 512 bytes.   I decided to run the following command:   sudo dd if=/dev/zero of=/dev/sdc bs=2048; sync   It's been running for 2 days straight and haven't completed  Did I use the wrong command to fix the block size? If so, how can I safely exit and start over?   I would like to use the external drive to transfer and store files from different systems  edit: Since I wasn't sure if interrupting would be bad, I let it finish but got error     dd: error writing '/dev/sdc': No space left on device   Note: several people marked this as exact duplicate and linked to  but that's not what I'm looking for. Not looking to create live usb.


Fresh install of Ubuntu 12.10 won't boot on Asus X101CH Eee PC

I did a fresh install of Ubuntu 12.10 in my Asus X101CH Eee PC, using a live usb which I made using startup disk creator, replacing Ubuntu 12.04. The installation ran smoothly, but when I boot, it goes to a purple screen for a second, then a lot of text like the following shows up in sequence:  Starting crash report submission daemon                        [OK] Starting CPU interrupts balancing daemon                       [OK] Stopping save kernel messages                                  [OK] _   And the cursor just keeps blinking for hours. I can't log in. Pressing Alt + F2 did not bring me to console mode.  I thought it might be a partition problem so I formatted the whole disk, by creating a new partition table using gparted in Ubuntu 12.04 live USB. I noticed that I can't try Ubuntu using 12.10 live USB either; it just went to a blank screen when I hit the 'try ubuntu' button.   But the same problem arose. I even changed the pen drive for the live USB a couple of times.  I happened to know that the Intel Atom N2600 Cedar Trail CPU in my computer is not well supported in Linux, I managed to install its drivers in Ubuntu 12.04, although the computer went blank during the installation.


Which is correct "I wished I was a painter" or "I wished I were a painter"?  I've seen in several places that "I wish I were a painter" and "I wish I was a painter" are both correct (e.g. ), but I have not been able to find a solid answer to past tense "wished".


$f(r,\theta)=(r\cos\theta,r\sin\theta)$ Then  $1.$ $Df(r,\theta)$ is always nonzero for any $(r,\theta)\in\mathbb{R}^2,r\ne 0$  $2.$ $f$ is injective on $\{(r,\theta):r\ne 0\}$  $3.$ On any neighborhood of $(r,\theta):r\ne 0$, $f$ is one one.  $4$ $Df(r,\theta)=r^2I\forall (r,\theta):r\ne 0$  I have calculated that $Df(r,\theta)$ is the matrix $$\begin{bmatrix} \cos\theta &-r \sin\theta \\ \sin\theta & r\cos\theta \end{bmatrix}$$ so its determinant is r which is nonzero.so by inverse mapping theorem $3$ is true, $1$ is true also, I don't know about $2$ and $4$, could any one tell me how to prove or disprove , for $4$ I have taken $(r,\theta)=(r,\pi)$ and saw the contradiction.


Is it possible to create an iron door which responds to levers on both sides

In order to protect a portal in the nether I have an obsidian room with an iron door, which works off a switch in the room. The problem is that if I leave the room and someone else on the server closes the door from the inside I can't get back to that portal.  Powering red stone on the outside of the door doesn't seem to work, as the switch inside is already powering it, so I'm guessing something like an XOR gate will be the solution, however I am finding it difficult to see how to make this work in practice.


How would you search a log file for a date range?  Log file looks like this:  01/14 00:00:01  INFO:     received connect request from 10.10.10.10    I need to condense the log to 10 minutes starting at 8:25 and going until 8:35  When I use the following egrep I find too many results, such as00:08:25 01:08:25 ... 08:25:00..  How can I just get 08:25:00 through 08:35:59  What I've tried  cat foo | egrep "08:2[5-9]|08:3[0-5]" cat foo | egrep "08:2[5-9]:??|08:3[0-5]:??" cat foo | egrep "08:2[5-9]:[0-9][0-9]|08:3[0-5]:[0-9][0-9]"


I put my shell script inside /etc/cron.daily  I was hoping everything that in that folder would be run daily but my script is not being ran.


First of all I'm acknowledging you that I am a completely newbie in this field. The field I'm referring to is the summation of these things:   Accessing files on different computers or over the internet programmatically or this PHP + MySQL Upload some files through the internet hosted for free Uploading files using FTP Other common internet protocols   (I don't know what to call to them)  I have already uploaded some files in the free web host I chose and created a database there using phpMyAdmin v2.11.4  Also, I have Googled first this question before posting this here but I don't understand some rules and I need a clarification.  The exact error I get from viewing my uploaded file(index.php) is this:  Warning: mysqli_connect() [function.mysqli-connect]: (HY000/1130): Host '31.170.160.98' is not allowed to connect to this MySQL server in /home/a6400350/public_html/subdomains/index.php on line 7   Domain name of free web host I'm using is   And my php code for connecting to host is:  <?php  $host = "sql10.000webhost.com"; //or "31.170.160.98" $username = "a6400350xxxxxx"; $password = "••••••••";  $con = mysqli_connect($host, $username, $password);  ?>    I also check if the server is down  or it's just me There was also no previlege section in phpMyAdmin page as other suggest   Don't I have any permission to connect programmatically to this host as I am just a free user?  Edit     I'm also thinking of uploading the whole XAMPP in the server so I   could do the things I'm imagining.


Can't expand Ubuntu VM's hard drive space

Running df -h returns:  Filesystem      Size  Used Avail Use% Mounted on /dev/sda1       3.9G  3.7G  1.8M 100% / none            4.0K     0  4.0K   0% /sys/fs/cgroup udev            2.0G  4.0K  2.0G   1% /dev tmpfs           396M  880K  395M   1% /run none            5.0M     0  5.0M   0% /run/lock none            2.0G   76K  2.0G   1% /run/shm none            100M   48K  100M   1% /run/user   For some reason Ubuntu says I only have 4GB hard drive space, but in VirtualBox, under Storage > Controller: SATA it says I have Ubuntu.vdi (Normal, 11.72 GB).  I've tried running resize2fs as well, and it returns:  sudo resize2fs /dev/sda1 resize2fs 1.42.9 (4-Feb-2014) The filesystem is already 1048320 blocks long.  Nothing to do!   Running fdisk returns:  sudo fdisk -l  Disk /dev/sda: 12.6 GB, 12582912000 bytes 255 heads, 63 sectors/track, 1529 cylinders, total 24576000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000ac43a     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048     8388607     4193280   83  Linux /dev/sda2         8390654    16775167     4192257    5  Extended /dev/sda5         8390656    16775167     4192256   82  Linux swap / Solaris   How do I increase disk space of my VM?


Objects disappear when zooming in in perspective view?

When I am in my camera view, I can see my scene objects fine. But when I go to the user perspective and zoom in on those objects, they disappear. How can I fix this?


What is this symbol that looks like a parallelogram?

it says "180ohm at 100MHz" next to it. So I'm guessing that it's a non-air-core inductor. It seems to fit this:  - except that the symbol is slightly different than what's in that answer. Wanted to confirm.  this is part of Atmel at91sam3d (ARM SoC) schematic.


Which short story involves intelligent people being put in an institution?

Basic Plot: a dystopian future wherein all the productive, intelligent people are committed to a "mental institution" where they more or less keep the world running.  I read it in the early 1970's, in a science fiction anthology that I can't seem to locate in my collection. It may very well be “The Marching Morons”, but I don't think it is.


How to inject Javascript in WebBrowser control?

I've tried this:  string newScript = textBox1.Text; HtmlElement head = browserCtrl.Document.GetElementsByTagName("head")[0]; HtmlElement scriptEl = browserCtrl.Document.CreateElement("script"); lblStatus.Text = scriptEl.GetType().ToString(); scriptEl.SetAttribute("type", "text/javascript"); head.AppendChild(scriptEl); scriptEl.InnerHtml = "function sayHello() { alert('hello') }";   scriptEl.InnerHtml and scriptEl.InnerText both give errors:  System.NotSupportedException: Property is not supported on this type of HtmlElement.    at System.Windows.Forms.HtmlElement.set_InnerHtml(String value)    at SForceApp.Form1.button1_Click(Object sender, EventArgs e) in d:\jsight\installs\SForceApp\SForceApp\Form1.cs:line 31    at System.Windows.Forms.Control.OnClick(EventArgs e)    at System.Windows.Forms.Button.OnClick(EventArgs e)    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)    at System.Windows.Forms.Control.WndProc(Message& m)    at System.Windows.Forms.ButtonBase.WndProc(Message& m)    at System.Windows.Forms.Button.WndProc(Message& m)    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)   Is there an easy way to inject a script into the dom?


integer number division to decimal number in bash script

in bash script i have to change the value of $R , so i have to division to decimal number but it's impossible  R=$((R/(15.6))) #for convert move in millimeter to second    i try to   R=$((R/(156/10))) #for convert move in millimeter to second   but it doesn't work too


Allow people to answer protected questions if they have earned at least some amount of combined SE rep

The purpose of protected questions is, according to the message presented on such a question, "to prevent 'thanks!', 'me too!', or spam answers by new users." The more verbose  agrees on the purpose. And the  says this is why protected questions exist:     Some questions are protected because they are expected to attract   either spam or users -- often new users -- who may mistake the site as   a traditional forum, posting "noisy" answers such as "Thank you" or   "This worked for me" or "I'm also having this problem".   Considering this, shouldn't a user be able to answer protected questions if they have gained at least 10 rep on any stack exchange site? If they've already demonstrated one site that they are familiar enough with the SE Q/A format to not be a drive-by useless answerer, shouldn't that confidence in them carry over to other SE sites?  Or maybe at some level of combined SE rep this restriction should be waived. I find it silly that at 15k+ combined network rep, I'm unable to answer a protected question on a SE site I've just started using.


Please can anyone explain what's happening here? $num1 = 37.29; $num2 = 29.83; $exp1 = round(($num1-$num2)*100); // 746.0 => OK $exp2 = (($num1-$num2)*100); // 746.0 => OK $exp1 == $exp2; // false => expected TRUE 746.0 == 746.0; // true => OK  OK, perhaps it is the broken floating point math, but I need the most suitable function anyway. I'am trying to round_up prices in this way: 1.2345 Eur = 1.24 Eur 1.2567 Eur = 1.26 Eur but this behavior does me serious headache. Or is there any better way to round up the values? I need this function: function round_up(float $price, int $decimalPlaces = 2): float {...}  EDIT: I also try the ceiling() function (): $num1 = 37.29; $num2 = 29.83; ceiling(7.46, 0.01); // 7.46 => OK ceiling($num1-$num2, 0.01); // 7.47 => wrong!!!  EDIT2: This works but it's not very intuitive and do the math this way in the whole application would be bad: ceiling(ceiling($num1, 0.01) - ceiling($num2, 0.01), 0.01); // 7.46 => OK  Thanks


If X ∼ N(µ, σ2 ) find the pdf of Y = e ^ X.

Help? I am stuck on this homework question and finding very difficult to answer


How can I compute the following limit? $$ \lim_{n\to\infty}\frac{\dfrac{n}{1}+\dfrac{n-1}{2}+\dots+\dfrac{2}{n-1}+\dfrac{1}{n}}{\ln(n!)} $$  I have tried lots of methods, I can't get the answer. Although I think the limit is $0$, I don't know how to explain it. Please, if someone could help me it would be fantastic.


I am looking to move to Las Vegas to try and find work but I will initially go just on an ESTA. I realise I can stay in the states for a maximum of 90 days?  If I haven't found a job and need to leave, what countries can I go to before I can come back to Vegas? I was thinking Mexico or Canada for a week?  What time period would I have to be out of the states? Around a week?  Is is possible to get an extension visa?


Installing a Honeywell Wifi thermostat and need a C wire connection

My current thermostat is wired as follows and the wires are from my Separate heater and separate AC air handler:  W - From my heat R - From my heat  Rc - From my AC Handler Y - From the compressor  G - From the AC Handler  Do I need to add a wire for the C connection but am unsure whether I need to do that how and where to connect it. Our can I do something else with the G wire? I have attached a pi of my current schematic, can anyone please help?


Make real ubuntu installation on usb stick

I made a live usb with ubuntu on it. I can test ubuntu with it but if I want to install it onto the SAME usb stick it is not possible. How can I make a REAL installation of ubuntu onto an usb stick without requiring another usb stick? Is it possible to install ubuntu on the same usb stick you are running the live version on? If not can I somehow run it in a virtual machine with access to the usb stick and install it from there (I tried Linux live usb creator, but it didnt work). Or can I dual boot and then install on the usb stick and delete the linux partition afterwards? If there are other/better options please let me know.  Thank you for your help


I've been pondering a lot about this whole citation business. Does anyone here have ideas on how one would measure the quality of different citations? Objective answers only, of course.


Prove 24 divides $u^3-u$ for all odd natural numbers $u$

At our college, a professor told us to prove by a semi-formal demonstration (without complete induction):   For every odd natural: $24\mid(u^3-u)$   He said that that example was taken from a high school book - maybe I din't get something, but I really have no idea to prove that without using complete induction.  Any idea of smart demonstration?  Thanks for your help. (Excuse my bad English.)


when to use ( end point/date - start point/date + 1) , and when to use end point /date - start point /date?

This is a simple question on difference. I have seen the following situation -  for example how many day you spend on a travel when the travel date was 14-Aug-2014 till 25-August-2014. The answer for this is 25-14+1, which is 12 days. However, if I would have just subtracted, then the answer would have been 11, which is wrong. Now, the question, when I should do the difference + 1, and when I should just subtract. What is the idea behind it? How to identify when to apply what? The date part I know is just by experience, but I am worried I might fail in a similar situation where the application is different. Can someone please explain me this in detail?


\documentclass[12pt]{article} \begin{document}  Inductive step-\\ Assume the statement holds for $n \in \left\{ 1, 2, ... n\right\}$  \end{document}   Changing the 12pt in documentclass to something bigger doesn't change the size. Any idea what's wrong?    Am I the only one who thinks that the default font size is too small and the margins are too big?


Do key collisions for symmetric ciphers exist?

I'm not sure if I'm calling the thing (key collisions) correctly, and that's probably why I couldn't find any information about it on Google. Still, my question is as follows. Note that I don't work with encryption right now and I'm not going to implement anything based on this knowledge; this is a purely theoretical question which I found very interesting.  Suppose that you have a key K and a plain text P. Then you use some symmetric algorithm A like one of AES variants to obtain a ciphertext C = A_encrypt(P, K). Is it possible that some key K* != K exists which can be used to get back the plain text out of the same ciphertext, i.e. P = A_decrypt(C, K*)? How it depends, if it does, on the type of the cipher (block vs stream), on the exact algorithm and on the size of the key and the size of the plain text? My intuition suggests that impossibility or, at least, improbability of such thing is the reason of existence of symmetric ciphers, but still this is not stated explicitly anywhere I could find.  What surprises me that I couldn't find anything which answers such question directly; moreover, I couldn't find anyone asking such question. All I could find are questions  which seem to be related but not exactly the same as my question, and questions like "how to generate two keys to decipher the same data" which are somewhat opposite to my question.


How do I stop LaTeX from splitting the rows of my nx15 matrices onto more than one line?


Prove normal matrix is 4th power of some self-adjoint matrix

Let $A\in\mathbb{M}_n(\mathbb{C})$ be a matrix of order $n\geq 2$. Let $p_A(x) = (x-\lambda_1)\cdots (x-\lambda_n)$ be the characteristic polynomial of $A$ such that all $\lambda_i$ are positive real numbers.  Suppose that $A$ is a normal matrix. Prove that one can write $A=G^4$ for some self-adjoint matrix $G$.  My thinking is that since $A$ is normal, by Principal Axis Theorem, we have $A=UDU^\ast$, where $U$ is a unitary matrix and $D$ a diagonal matrix. However, I fail to see how to proceed. Could anyone help me out?


Add combo (switch and outlet) with only two wires out of wall for the current light)

I probably have this diagram for my project. Or problem.  Facts:   a) only 2 wires out of wall, B & W;  b) switch ON, lights ON  Ceiling electrical box:   One black and one white connects to the ceiling light fixture.     Project: I need to add a combo switch/outlet  UPDATE after suggestions  Grey= Neutral Is this right? If it is, it seems to me receptacle will be ON at all times, right?


'no wifi adapter found' Broadcom wifi driver problem

I have a very old Dell Vostro 1015 laptop, and just installed Ubuntu 18.04.3 LTS on it. The problem is that I cannot use wifi, in the wifi settings it says "no wifi adapter found" (the bluetooth has the same issue). The internet works with ethernet cable though.  I did extensive research here in the forum but none of the solution options worked, I suppose each case is specific:) Therefore I run the wireless-info script command, please see the result in the linked Ubuntu Pastebin site  What I've done? I've tried to update the system, nothing; to restart the network manager, nothing; and to install the most up-to-date driver for my wifi adapter according to this  nothing. Please, help me! thanks a lot!!!!


I have to solve the following problem by prooving using Contradiction. The problem is:  Show that for any nonnegative real numbers $a$ and $b$ we have: $\frac {a+b}2 ≥ \sqrt {ab}$  (Sadly, i dont even know where to start for this question)


Properties of the composition law $a @ b= ab + b + a$ on the real numbers

The operation $@$ is defined on the real numbers as $a @ b= ab + b + a$  a) Show that $0$ is an identity for the operation.  b) Show that some real numbers have inverses under the operation.  c) Find a counter-example to show that, for this operation inverses do not exist for all the real numbers.  I have so far came to understand as far as: $a, b,c \in \mathbb{R}$ Identity: Ia= aI= a @ b I= @ b + b + I I @ b = I b + b + I


How do you explain the value of native files to an uneducated client?

If you design a piece for print. It gets reproduced several times over the course of a few years. Then the client doesn't return for any work for a few more years. And suddenly you are contacted asking for native files (Indesign, Illustrator, Photoshop). As the client puts it, "We just want to be able to make minor changes, we aren't designers."  Now, there is absolutely value in the native files. They are my "secret recipe" as a designer and anyone asking for that recipe should provide compensation for the ease of reusing, repurposing, and altering the recipe.  How do you explain to this client that there is value in the native files?  How do you counter the "But we already paid for the design." argument?  Note: I know I own the files. I know my contract states I own the files. Heck even without a contract, US Copyright law states I own the files.  What I'm seeking is an elegant, less argumentative, method of explaining the file ownership to the uneducated client. Reciting legal statutes and contract clauses doesn't often make for friendly client relations. My goal is to find a method of explaining so it is fully understood by the client without the appearance of a contract clause which forces them to do something against their will. I want the client to respect and not resent these types of contract clauses.


What's the best way to re-enable PPAs/repos after an upgrade?

When I upgrade from 11.10 to 12.04, what's the best way to re-enable my PPAs and added repositories?


Evaluate $ \lim _{x \to 0} \left[{\frac{x^2}{\sin x \tan x}} \right]$ where $[\cdot]$ denotes the greatest integer function.

Evaluate $$\lim _{x \to 0} \left[{\frac{x^2}{\sin x \tan x}} \right]$$ where $[\cdot]$ denotes the greatest integer function.  Can anyone give me a hint to proceed?  I know that $$\frac {\sin x}{x} < 1$$ for all $x \in (-\pi/2 ,\pi/2) \setminus \{0\}$ and $$\frac {\tan x}{x} > 1$$ for all $x \in (-\pi/2 ,\pi/2) \setminus \{0\}$. But will these two inequalities be helpful here?


How to align all the $\rightarrow$s so that that all come in a line and not in a zig zag manner?  The MWE:  \documentclass{article} \usepackage[english]{babel} \begin{document} \begin{enumerate} \item hello $\rightarrow$ world \item sample $\rightarrow$ test \item Mathematics $\rightarrow$ Physics \end{enumerate} \end{document}


If $a$, $b$ and $c$ are sides of a triangle, then prove that $a^\text{2}(b+c-a) + b^\text{2}(c+a-b) + c^\text{2}(a+b-c)$ $\leqslant$ $3abc$

Let $a$, $b$ and $c$ be the sides of a triangle. Prove that $$a^\text{2}(b+c-a) + b^\text{2}(c+a-b) + c^\text{2}(a+b-c) \leqslant 3abc$$   SOURCE: BANGLADESH MATH OLYMPIAD (Preparatory Question.)  I am very new and novice at this problem. I did a little try but couldn't succeed because I was unable to substitute the left term of the inequality into formula. I know a formula that   $a^\text{3} + b^\text{3} + c^\text{3} - 3abc$ = $(a+b+c)(a^\text{2} + b^\text{2} + c^\text{2} - ab -bc - ca)$. But how to use this formula in that case isn't known to me. And how to show the relation of the both side and when they will become equal?  A small help will be enough for me. Thanks in advance.


I'm taking my day and a half brined chicken breast out of the brine today.  Unfortunately I can't cook them for 2 days since I won't be home.  Is it okay to cook brined meat at a later date?


During recent discussions at work, someone referred to a trampoline function.  I have read the description at .  It is enough to give a general idea of the functionality, but I would like something a bit more concrete.  Do you have a simple snippet of code that would illustrate a trampoline?


Change alertblock content in beamer in a new frame

I'm looking for a method to change the content of an alertbox in beamer when the user moves to the next frame.  A solution is of course to generate two frames:  \documentclass{beamer} \begin{document} \begin{frame} \begin{alertblock}{Foo} Bar1 \end{alertblock} \end{frame} \begin{frame} \begin{alertblock}{Foo} This is a very long text that should be displayed on two or more lines, as a result, the alertblock will enlarge and thus cause the audience to focus more on the box than the content that is of course the important part of the presentation. \end{alertblock} \end{frame} \end{document}   The problem with this approach is however that if Bar2 has not the same vertical span width as Bar1, the box is repositioned resulting in an ugly visual effect.  As a result in the first slide, an alertblock is displayed containing Bar1 but already has the size to show This is a very..., in the second slide This is a very... is displayed starting at the top-left of the alertblock.


How to top align text and image in table?

I am facing some problem in aligning (top-aligned) image and text in a table.  \documentclass[11pt,table,a4paper]{article} \usepackage{array,ragged2e} \usepackage{graphicx} \usepackage[top=2cm, bottom=3cm,right=1cm, left=1cm, headsep=26pt]{geometry} \usepackage[T1]{fontenc} \usepackage{fancyhdr} \usepackage[table]{xcolor} \usepackage{sidecap} \usepackage{longtable} \usepackage{helvet} \renewcommand{\familydefault}{\sfdefault} \begin{document}                          % End of preamble and beginning of  text. \arrayrulecolor{gray} \begin{center} \newcolumntype{M}[1]{>{\arraybackslash}p{#1}}  \renewcommand{\arraystretch}{2.0}\begin{longtable}{M{5cm}|M{6cm}|M{6cm}} \hline \rowcolor{gray}    \textbf{ Col1} &  \textbf{Col2} &  \textbf{Col3} \\ \hline  \vspace{0pt} \large{ABC} & \includegraphics[width=0.15\textheight, width=0.15\textwidth]{Europe_regions.png} \hspace{.1cm}    \includegraphics[width=0.15\textwidth]{male-female.png} &  \vspace{0pt} XYZ.   \\ \hline    \end{longtable} \end{center} \end{document}             % End of document.     How can i top-align image and text?


How do I remove the shortcut arrow emblem from application launcher icons in desktop on Ubuntu 20.04?

My Ubuntu version is 20.04 LTS. How can I remove the shortcut arrow emblems from the icons?


How to see what's going on during Windows shutdown/logging off process?

Windows 7 msconfig lets users select the options No GUI boot and OS boot information to have a list of drivers being loaded during boot. Is it possible to have similar detailed messages during shutting down/restarting/logging off? Here's the screen I want disable or give me more details:


No root filesystem is defined while installing Ubuntu 18.04

I want to install Ubuntu 18.04 alongside Windows 10 using a USB flash drive on an Asus K401UQ laptop - i7 6th gen, 8GB RAM, 1TB HDD + 24GB SSD.  I have left enough unallocated space to install Ubuntu using the - diskmgmt.msc - Windows 10 application.  The problem is I can't find the hard disk when I try to install it as shown in the below screenshots.


I'm in a beginner SQL class using Microsoft SQL Studio. This is a very stupid question, I apologize but I can't figure it out. I'd like to know the proper syntax in order to do this, preferably in multiple ways because I know in SQL there isn't only one way to do things.  We haven't done any joins/subqueries so I'm not sure I should be using those, again this is a very basic intro class...  Where I need to do: Show INVENTORY table: Price, Part, Description (columns) Instructions: Display the Part, Description, and Price for the highest and lowest Priced parts in INVENTORY.  Here is what I have:    SELECT TOP(1) Price, Part, Description FROM INVENTORY   ORDER BY Price DESC;   This shows the highest price but how do I get the lowest price as well? Using AND doesn't work  I also did    SELECT MIN(price),   SELET MAX(price),   part,   description   from inventory   But it tells me that Description and Part aren't in aggregate functions.  I tried doing GROUP BY after WHERE as in GROUP BY part but then it says that description isnt in an aggregate function. So then I do GROUP BY part, description and then every result shows up when I only want the min and max.  So it looks like:   SELECT MIN(Price),   MAX(Price),   Part,   Description   FROM Inventory  GROUP BY Part, Description   But then it displays every result. I just want the highest and lowest results and using TOP with AND doesnt work.  Can someone help me with my syntax? What am I doing wrong? I'd appreciate two ways to show this, one using TOP and one using MIN/MAX if possible. I've been researching over an hour and even posted this to 4chan to ask for help.


Which wars does the title "Star Wars" refer to?  Are they:   the struggle between the Rebels and the Empire? the Clone Wars (mentioned as early as the first half hour of A New Hope)? the age-old conflict between Jedi and Sith? the war between good and evil in general? all of the above? none of the above, in which case the title was chosen just to sound cool and/or alluring?   When Lucas wrote down the phrase "Star Wars", which events in the Star Wars universe was he referring to, if any?


Present Perfect Usage of “Think” for Recent Past

In such phone conversation context below , instead of "thought" is present perfect form "I've thought it was Frank on the line" acceptable?  Matt: Hi John John: Hi Frank Matt: Oh, this is Matt speaking not Frank. John: Sorry Matt. I thought it was Frank on the line .You sound very similar.  John's mixing up the voices happens in very recent past(seconds ago) and it has relevance with the present. Why do we generally prefer simple past tense when using the verb "think" in such contexts? In British English present perfect is used commonly for recent past actions and events such as "have told", "has said", "has happened", "have shown" etc. Does it sound natural and acceptable to use present perfect in such phone conversation context? Can you explain please any linguistic differences?


In a badminton singles tournament, each player played against all the others exactly once and each game had a winner. After all the games, each player listed the names of all the players she defeated as well as the names of all the players defeated by the players defeated by her. For instance, if A defeats B and B defeats C, then in the list of A both B and C are included. Prove that at least one player listed the names of all other players.


When I was 17, I applied for a UK visa with my friend who was noted as my company (since she’s older than 18). On my visa, it specifically says that I can only enter the UK if I am accompanied by her. Now I have turned 18 and would like to travel to the UK alone. Would it be allowed for me to travel without my former company even though it says her name on the visa? Or would I have to wait till my visa runs out and apply for a new one?


How to prove that triangle inscribed in another triangle (were both have one shared side) have lower perimeter?

This question looks really simple, but to my (and my co-workers) frustration we were not able to prove this in any way. I tried all triangle formulas known to me but I feel I'm missing the point, and proof will be or much simpler or much more complicated than what I tried.  So, the question:  Given a triangle ABC and point P inside that triangle, prove that for triangle APB the following inequality holds: |AB| + |BC| > |AP| + |PC|  (Actually it doesn't matter for me if it's > or >=).


Is "There were a large number..." or "There was a large number..." correct?

Is the sentence "There was a large number of students in the auditorium," or "There were a large number of students in the auditorium," correct? I am unsure because I believe if you consider, "... a large number..." which is singular, then you would use "was," but if you considered "students," which is plural, then you would have to use the plural verb "were". Is "was" or "were" correct in this sentence?


Different presentations of $\mathfrak{su}(2)$ (Lie algebras)

I have just started learning about Lie algebras and got confused with this: Some sources say the generators are $J_0,J_1$ and $J_2$ and some use $J_0,J_+$ and $J_-$. Which set is correct? Or if both are correct what key concept am I missing here? My understanding is that if have certain commutation relations then we know that Lie Algebra is such and such. But if we have two such choices then this understanding falls apart? How do I figure out what is $\mathfrak{su}(2)$ Lie Algebra in general?


Transformation methods : cumulative distribution function

Let $x_1, \ x_2$ be independent random variables.   The probability density function $f(x_i)= 2x \ \ \ \ for \ \ \ \ 0<x_i < 1 $ and $f(x_i)=0 \ \ \ \text{otherwise}$     Then, the density function $f(x_1,x_2)=4x_1x_2$ for $0< x_1, x_2 < 1$  And Y is defined as $Y=X_1+X_2$   What is the distribution function $G(Y)$? Solve by using distribution function method(graph method)     What I did is as follows:   $G(Y)=P(Y \le y)= P( X_1+X_2 \le y)=\int \int f(x_1,x_2) dx_2 dx_1$   And I draw the plot of $Y=X_1+X_2$. But I'm stacking  here. Please show me.


Find the value of this combinatorial sum. $\sum_{k=4}^{100}\binom{k-1}{3}$

How to compute this sum without laboring?  $$\sum_{k=4}^{100}\dbinom{k-1}{3}.$$  Is it possible to reduce this to a single combinatorial term?


Suppose $X_1, X_2 ...X_n$ are non-correlated and Gaussian random variables, all with mean value $\mu=0$ and variance=$\sigma$.  Is there an expression for the distribution of $Z=\max(X_1, X_2, ... X_n)$? If not, can we find its expected value $\textrm{mean(Z)}$ and $\textrm{variance(Z)}$?  Thanks a lot!


Difference between road pedals and MTB pedals

I am interested in buying some pedals I can clip into for my bike. I currently ride a mountain bike/hybrid but I ma looking to get a road bike next year some time.   What are the differences between road pedals and mountain bike pedals? Are road pedals suitable for my hybrid/MTB if I am only riding on roads?


Do I need a transit vsa in Kuwait; what about checked baggage?

I am traveling to India from Athens on Aegean Airlines and transiting in Kuwait for the onward flight on Kuwait Airlines. The layover is about 4.5 hours.   Do I need a transit visa? How will I collect my checked luggage from Aegean Airlines. Will the staff provide help if the baggage counter is after immigration?


Why didn't the Jedi/Sith use Force pull/push in the generator complex?

When on the bridges/catwalks, why did neither the Jedi nor the Sith use the Force to push/pull their enemy to their death? The Jedi may have had a purpose, but why didn't the Sith use it?   Every Jedi Knight player would have done that! (Especially in a place like Nar Shaddaa streets.)  Furthermore, although I think this one is simply a bug in the movie, at one point, he even seems to step backwards to make some room for the Jedi jumping over his catwalk.    Even with or without this, is there any in-universe explanation why they didn't just use Force push/pull?


Let $A,B \in {C^{n \times n}}$ and ${\sigma (A + B)}$ is spectrum of $(A+B)$.  Suppose   $M = \left\{ {\lambda  \in C:\lambda  \in \sigma (A + B),\left\| B \right\| \le \varepsilon } \right\}$ $F(A) = \left\{ {{v^*}Av:v \in {C^n},{v^*}v = 1} \right\}$ $K = \left\{ {\lambda  \in C:dist(\lambda ,F(A)) \le \varepsilon } \right\}$ ,where ${dist(\lambda ,F(A))}$ denotes the distance between $\lambda $ and  $F(A)$.   Why does $M \subseteq K$?


Creating java.sql.Array as an array of integers for use in prepared statement

I have a need to use a prepared statement to use an array of integer in my SQL statement.   When I try to create the array, and when I read the  It only shows the creation of an array of strings. I have to search for a lot of table key ids in one call (previously iterating through them one at time resulted in 22k queries) So I need all of the results at one time.   A piece of my query string looks like this   AND A.KEY in (?) order by KEYID DESC   Here is where I build my query (via using java.sql.Array with my list of IDs)  StringBuilder query = new StringBuilder(Query);               PreparedStatement stmt = connection.prepareStatement(query.toString());  java.sql.Array array = connection.createArrayOf("varchar", Ids.toArray()); stmt.setArray( 1, array);  ResultSet results = stmt.executeQuery();   I tried to run them through as strings, as the sql.Array uses strings, but I NEED to send them as ints.   My ids come through as an ArrayList<Integer>, this is the key to why this is not a duplicate question I need to send the sql statement a list of integers - my way works for strings.  edit when i run through my program sending one int at a time, it works fine.  How can I solve this to send the SQL statement with integers in place of my? In the sql query?


Automatically Give All Custom Post Types a Pre-Set Category

I am building a site with 5 different custom post types on and would like to create an archive page that pulls in all of these posts and then sorts them by the standard WP date order.   Instead of adding this 'all' category manually each time I add a custom post type post, is there anyway of giving a custom post type a custom taxonomy that is created / assigned each time a new post is created? I would then add any additional custom taxonomies manually when I do a post.  To show this 'all' taxonomy I would add a custom taxonomy archive page that would then show all of the custom post types.  Any help would be wonderful.


How to grep on files less than a size and limit to extension

I want to recursively grep on all files in subdirectories with extension csv but select only those files that are less than 4M in size. Is this correct way to do? find . -type f -size -4M | grep --include \*.csv 'pattern'  This command selects all the files with .csv, basically doesn't limit to less than 4M in size, although find alone correctly finds all files less than 4M.


Can more than one person share PhD thesis?

I have a PhD research proposal and I came up with this proposal idea while discussing machine learning with my brother who is in the same field as me and has same degrees as me.  my question is can we (my brother and I) submit this proposal for the university so we both share the research?  do we have to provide 2 seperate research thesis?


Oracle stored procedure with parameters for IN clause

How can I create an Oracle stored procedure which accepts a variable number of parameter values used to feed a IN clause?  This is what I am trying to achieve. I do not know how to declare  in PLSQL for passing a variable list of primary keys of the rows I want to update.  FUNCTION EXECUTE_UPDATE   ( <parameter_list>    value IN int)   RETURN  int IS BEGIN      [...other statements...]     update table1 set col1 = col1 - value where id in (<parameter_list>)       RETURN SQL%ROWCOUNT ; END;   Also, I would like to call this procedure from C#, so it must be compatible with .NET capabilities.   Thanks, Robert


Variance of Wilcoxon Rank-Sum Test (no ties)

$\newcommand{\E}[1]{\mathbb{E}\left[#1\right]} \newcommand{\r}[1]{r\left(#1\right)} \newcommand{\P}[1]{\mathbb{P}\left(#1\right)} \newcommand{\Var}[1]{\text{Var}\left[#1\right]}$  Given two sets of data $X$ with $m$ points and $Y$ with $n$ points, unioned (keeping duplicates) to create a data set $Z = \{Z_i\}$ with $m + n = N$ data points, the Wilcoxon Rank-Sum Test Statistic is given by \begin{equation*} T = \sum\limits_{i=1}^{N}r(Z_i)\cdot \mathbb{I}(Z_i \in X)\text{,} \end{equation*} where $\mathbb{I}(Z_i \in X)$ is $1$ if $Z_i \in X$, $0$ otherwise. ($r(\cdot)$ denotes the rank of the data point.)  Suppose there are no ties. Then  \begin{align*} \E{T} = \sum\limits_{i=1}^{N}\r{Z_i}\cdot \E{\mathbb{I}(Z_i \in X)} &= \sum\limits_{i=1}^{N}\r{Z_i}\cdot\P{Z_i \in X} \\ &= \dfrac{m}{N}\sum\limits_{i=1}^{N}\r{Z_i} \\ &= \dfrac{mN(N+1)}{2N} \\ &= \dfrac{m(N+1)}{2}\text{.} \end{align*} This comes out to what it says in the book Nonparametric Statistical Inference, 5th ed., by Gibbons and Chakraborti.  Now for $\Var{T}$: \begin{align*} \Var{T} &= \Var{\sum\limits_{i=1}^{N}\r{Z_i}\mathbb{I}(Z_i \in X)}\\ &= \sum\limits_{i=1}^{N}\left[\r{Z_i}\right]^2\Var{\mathbb{I}(Z_i \in X)} \\ &= \sum\limits_{i=1}^{N}\left[\r{Z_i}\right]^2\P{Z_i \in X}\left[1-\P{Z_i \in X}\right]\\ &= \left(\dfrac{m}{N}\right)\left(1-\dfrac{m}{N}\right)\sum\limits_{i=1}^{N}\left[\r{Z_i}\right]^2 \\ &= \left(\dfrac{m}{N}\right)\left(1-\dfrac{m}{N}\right)\left[\dfrac{N(N+1)(2N+1)}{6}\right] \\ &= \left(\dfrac{m}{N}\right)\left(\dfrac{N-m}{N}\right)\left[\dfrac{N(N+1)(2N+1)}{6}\right] \\ &= \left(\dfrac{m}{N}\right)\left(\dfrac{n}{N}\right)\left[\dfrac{N(N+1)(2N+1)}{6}\right] \\ &= \dfrac{2N+1}{N}\left[\dfrac{mn(N+1)}{6}\right] \end{align*} The answer should be $\dfrac{mn(N+1)}{12}$. What did I do wrong?


How do I show this equation involving the Gaussian pdf?

Im reading this  momentarily, and there is one equation (9) in section 3.1. that I just can't wrap my head around yet: \begin{align}     \mathcal{N}(\textbf{y}_d;\textbf{0},\pmb{\Phi \Phi}^T + \tau^{-1}\textbf{I}_N) = \int \mathcal{N}(\textbf{y}_d;\pmb{\Phi}\textbf{w}_d, \tau^{-1}\textbf{I}_N) \mathcal{N}(\textbf{w}_d; \textbf{0}, \textbf{I}_k) d\textbf{w}_d, \end{align} where $\pmb{\Phi \Phi^T}$ is our covariance function of a Gaussian Process, $\pmb{\Phi}$ is our feature matrix, $(\textbf{X,Y})$ our data with $\textbf{W}_2 = [\textbf{w}_d]_{d=1}^D$ and $\textbf{w}_d \sim \mathcal{N}(\textbf{0}, \textbf{I}_K)$, with a constant $\tau$. If I would want to show this equation mathematically, I would use the pdf of the joint normal distribution: \begin{align} \mathcal{N}(\textbf{y}_d;\textbf{0},\pmb{\Phi \Phi}^T + \tau^{-1}\textbf{I}_N) = \frac{1}{\sqrt{(2\pi)^D \text{det}(\pmb{\Phi \Phi}^T + \tau^{-1}\textbf{I}_N)}} \exp \left(-\frac{1}{2}(\textbf{y}_d - \textbf{0})^T (\pmb{\Phi \Phi}^T + \tau^{-1}\textbf{I}_N)^{-1}(\textbf{y}_d - \textbf{0})\right)  \end{align} and then actually I don't know how to proceed to end up on the left side.. I also tried starting from right to left, but similarly I get stuck.. Anyone has an idea how to go about showing this equation? Cheers EDIT: I tried showing the equation from right to left: \begin{align} &\int \mathcal{N}(\textbf{y}_d;\pmb{\Phi}\textbf{w}_d, \tau^{-1}\textbf{I}_N) \mathcal{N}(\textbf{w}_d; \textbf{0}, \textbf{I}_k) d\textbf{w}_d \\ &= \int \left( \frac{1}{\sqrt{(2\pi)^D \text{det}(\tau^{-1}\textbf{I}_N) }} \exp \left( -\frac{1}{2}(\textbf{y}_d - \pmb{\Phi}\textbf{w}_d)^T (\tau^{-1}\textbf{I}_N)^{-1} (\textbf{y}_d - \pmb{\Phi}\textbf{w}_d)   \right) \\ \cdot \frac{1}{\sqrt{(2\pi)^D \text{det}(\textbf{I}_K) }} \exp \left( -\frac{1}{2}(\textbf{w}_d - \textbf{0})^T (\textbf{I}_K)^{-1} (\textbf{w}_d - \textbf{0})   \right) \right) d\textbf{w}_d \\  &= \int \frac{1}{\sqrt{(2\pi)^{2D} \cdot N \cdot \tau{-1} }}  \exp \left( -\frac{1}{2}(\textbf{y}_d - \pmb{\Phi}\textbf{w}_d)^T (\tau \textbf{I}_N) (\textbf{y}_d - \pmb{\Phi}\textbf{w}_d) -\frac{1}{2}\textbf{w}_d^T \textbf{I}_K \textbf{w}_d \right) d\textbf{w}_d \\ &= \int \frac{\sqrt{\tau}}{(2\pi)^D \cdot \sqrt{N}} \exp \left( -\frac{1}{2}\tau\textbf{y}_d^2  + \frac{1}{2}\tau2\textbf{y}_d\pmb{\Phi}\textbf{w}_d - \frac{1}{2}\tau\pmb{\Phi}^2\textbf{w}_d^2 - \frac{1}{2}\textbf{w}_d^2 \right) d\textbf{w}_d \\ &= \frac{\sqrt{\tau}}{(2\pi)^D \cdot \sqrt{N}} \exp \left( -\frac{1}{2}\tau\textbf{y}_d^2  + \frac{1}{2}\tau2\textbf{y}_d\pmb{\Phi}\textbf{w}_d - \frac{1}{2}\tau\pmb{\Phi}^2\textbf{w}_d^2 - \frac{1}{2}\textbf{w}_d^2 \right) \\ &\cdot \frac{1}{\frac{1}{2}\tau2\textbf{y}_d\pmb{\Phi}} \cdot \frac{-1}{\tau\pmb{\Phi}^2\textbf{w}_d} \cdot \frac{-1}{\textbf{w}_d} \end{align} All correct so far? And now?


How do I download an app from another country?

I have a Samsung Galaxy S4 Mini and when I go to download certain apps and it will not let me because 'it is not available in my country', however other people within my country have these certain apps and I am confused.


Can I perform 'sudo' actions with different password other than my login password?  Is there any way to achieve this?


Do I have a chance at an MSc in Machine Learning/AI with low grades?

I am currently applying to a Master's programme at a strong university in the UK and began doubting my chances of getting in.   I completed my Bachelor's degree in Mathematics at a large research university in the UK a few years ago but my grades were below the 2:1 UK grade minimum for this course by a few percent. I have since worked at a large company doing data science and research and really enjoyed the work. I have been doing well here, getting some strong programming skills as well in Python and R. I also published an application paper on machine learning at a conference and presented at some others as well and have experience working on research projects.   However, I am worried that my chances are low because my grades have not been the greatest and that they will overlook my work experience. Do I still have a chance?


What should I do if my question has already been asked, but the answers don't help me?

As the sites become older, more and more questions are being answered already. Stack Overflow (and all Stack Exchange sites) have a "strict" policy against duplicate questions, often closing them faster than anyone can react (it seems :P).  However, quite often I stumble now on questions that I want to ask - which are answered already. However, when looking through the answers I don't "understand" the answers, I'd like to question those answers. "Why is it so?" questions.  Now obviously I could post a comment. - However, those are often ignored by the general public. And with older questions, the one who answered that question may have left the sites already, or at least not care about the question anymore.  So what to do now? - Ask a duplicate question and clearly indicate the reasoning (as I did here)? - Or are there better manners?


Twin hand crossbow Fighter: is this build valid?

The Sharpshooter feat includes an interesting feature: you can choose to take -5 penalty to hit with a ranged weapon attack to increase its damage by 10. Normally, I'd dismiss the trade-off as too situational, but I've only just thought of combining it with the Archery fighting style (+2 to hit with ranged weapon attacks).  After building a sample character using these features, the end result looks quite effective. My questions are: Is this build valid? Have I interpreted the rules correctly? If so, how well does it compare against other damage-focused builds?  5th level variant Human Fighter:   Ability Scores (via point buy): Str 10, Dex 16, Con 16, Int 9, Wis 12, Cha 10 HP: 47, AC: 17 (or 18 with disadvantage on Stealth) Weapons: Hand Crossbow x 2 Fighting Style: Archery Martial Archetype: Battle Master (with the Precision Attack maneuver) Feat (variant Human): Crossbow Expert Feat (4th level ability score improvement): Sharpshooter   The end result is a fighter capable of hitting targets 120' away, behind 1/2 or 3/4 cover, or engaged in melee with him, all without penalty. Normally, he can make 3 such attacks per round (Attack action + Extra Attack + Crossbow Expert's bonus attack). Once per short rest he can make 5 attacks per round via Action Surge (Attack action 1 + Extra Attack, Attack action 2 + Extra Attack, Crossbow Expert's bonus attack).  His normal attack bonus is +8 (3 proficiency, 3 Dexterity, 2 Archery fighting style), and normal damage is 1d6+3. Not amazing damage, but nice accuracy and flexibility (attacks can be focused on one target, or spread around; works equally well in melee and ranged combat).  The real winner is his ability to take -5 on any of these attack rolls to increase the damage by 10, to an average of 16.5 per shot (excluding crits). If he lands his usual 3 attacks, that's ~47 damage; 5 attacks is ~83. While the -5 to hit seems imposing, he's still got superiority dice: he can increase his attack roll by 1d8 after seeing the result, up to 4 times per short rest. And even without the superiority dice, his attack bonus is still an acceptable +3; ok for hitting low AC targets, or those granting advantage on attack rolls (e.g. surprised or prone + adjacent).  With a decent AC, a Fighter's HP, and the Second Wind feature, he can also take a decent amount of damage. He'll also have decent Strength, Dexterity, and Constitution saving throws.  This build seems almost too well rounded. Unlike a blaster, he only requires short rests to recover his big hitters. Unlike a brawler, he can target just about anything on the field at a moment's notice. Have I missed any rules, or overlooked any drawbacks?


Passive POE: Need 5V @ 2A at the destination

Having a bit of trouble finding the right information on google, and I'm worried I might fry some cables so I thought it best to ask some far more knowledgable than myself.  I want to connect 2 or more devices, giving them 5V/2A plus networking between them.  I figured to do so with the least amount of cables, Passive POE would be a good choice. The distance isn't far, probably maximum 20ft, as each device will be somewhere in a car, connected in to the boot/trunk area.  I'm looking at splitters and injectors, from what I've read its not as simple as just injecting 5v and it'll work? I have to worry about loss and also heat.  So my questions are, what is the best way to get 5V with max 2A current to the destinations? Do I need to send higher voltage to ensure it doesn't drop below 5, then use a regulator to ensure 5V? If I do that, the power will also be higher therefore more heat, is that ok?  Studying Wikipedia page I've read "Category 5 cable uses 24 AWG conductors, which can safely carry 360 mA at 50 V according to the latest TIA ruling"  50v * 0.36a = 18W, so if I were to send 9v * 2a = 18W. Then I could use a regulator to drop the ~9V(allowing for loss) down to 5V. Does that sound reasonable?  Many thanks


"A of B" or "B A" Noun Adjunct vs. Prepositional Phrase

English, having originated as a germanic language, uses premodifier noun adjuncts (is this the right terminology?) to form compound nouns like "science fiction writer". However, English also says "table of contents", where "of contents" is a prepositional phrase I would think. Now, I write texts or translate and get corrected by reviewers and proof-readers, who are English and serious people, while I am not. For example, recently I wrote "density of water" and was corrected to "water density". It gets worse, I feel, when there are several premodifiers e.g. I wrote "plant of the Cimenterie Nationale d'Haïti" and was corrected to "Cimenterie Nationale d'Haïti plant".  What is the rule? Is there a recommended limit to the number of premodifiers? Perhaps not more than two? Science fiction writer sounds OK. What is the correct terminology talking about this issue?  With many thanks!


So in theory i have two html pages, and one js file.  I want to save a variable that i get from the first html page (in the form of a data attribute) and then use it in the other html page.  Think of it like this — there is a link and when I click on it, it takes me to the other page but also saves a data-attribute and then uses it in that next page.  Sorry if everyone hates me because I didn't post code,  but I figured this was a straight forward enough question.


I'm trying to identify a Young Adult novel I read when I was, well, a young adult, so it must have been around 1970 (though of course it could have been written much earlier). Two friends visit a carnival where one of the sideshows boasts a live dinosaur. It turns out to be the real thing, brought to the present by the sideshow owner who has a magic ring that enables him to travel in time. There's some sort of accident (possibly a fire) which injures the dinosaur, and the friends use the ring to take it back to its natural time. Most of the novel takes place in the prehistoric past, though I don't recall what exactly happened to them - or indeed why they had to take the dinosaur back, when a modern vet might have been more useful. One thing that sticks in my mind is that the dinosaur was a Cynognathus, whose pet name was 'Nog'.


Can we differentiate equations without changing the solutions?

Suppose we have $x^2+4x+3=0$  We differentiate both sides to get $2x+4=0$.  So $x=-2$  But $(-2)^2+4(-2)+3=0$   $4-8+3=-1$ is not equal to $0$.  Which tells that we cannot differentiate equalities. But in many proofs, like in integral calculus, differentiating both sides occurs. So, where is the fallacy?


I have a SharePoint 2013 instance that I would like to modify the default email template.  I want to put my company's logo as a header and the company contact info as a footer on every email that is sent from SharePoint.  Is there any way to force SharePoint to use my message template?  If there is an event receiver that I can tap into, that would also work.   I am a C# developer, so if there is some custom code required, I'd actually prefer it.


Proving that Unit Intersection is NP-complete

I am extremely stuck on how to go about this problem and any help would be so appreciated. We are told to consider the following combinatorial problem:     Unit Intersection: Let X = {1, 2,...,n}. Given a family of subsets $S_1,...,S_m$ of X,   determine whether there is a subset T of X such that for all i,|T ∩ $S_i$| = 1 ?   I am then trying to prove that Unit Intersection is NP-complete using a reduction from Exactly-One-3SAT. In the Exactly-One-3SAT problem, we are given a 3CNF formula, and need to decide whether there is an assignment to the variables such that every clause contains exactly one true literal. In a 3CNF formula, every clause has at most three literals. A clause in a 3CNF formula may contain repeated literals.  I've been working for hours trying to find a way to even start this problem, but am so stuck right now. Thank you in advance for any help.


I got the result from wolfram alpha: $\sum\limits_{i=k}^n {{i-1}\choose{k-1}} = \frac{(n+1-k){{n} \choose {k-1}}}{k}$, but I can't see how it derived it. The expression could be slightly simplified: $\sum\limits_{i=k-1}^{n-1} {{i}\choose{k-1}} = \sum\limits_{i=m}^{n-1} {{i}\choose{m}}\ ;\ m=k-1$. But I still can't see a solution.


it says 'comparison of Fixnum with nil failed' and i dont know why

A = [5,3,1,4,2]  4.downto(1) do |i|   0.upto(i) do |j|     #here i am making the actual buble sort      if A[j] > A[j + 1]       tmp = A       A[j + 1] = A[j]       A[j] = tmp     end   end end  #just printing the array A.each do |i|   print i end  gets()   Does someone know why does it happen? I just don't know where is the nil element.  I've tried everything, I know but I'm learning and I can't find the error.   Thanks for your help, also there is another little problem, when I try to make the for loop it doesn't work, it's not a big deal because there are more than one way to make the same thing, but still...


C++ using size_t vs using an unsigned integer example

I saw an example recently that looks like the following:  const size_t NDim = 3;   double coords[NDim];   My question is straight forward. When does one use size_t vs an int or unsigned int? In this particular case, wouldn't the following be the equivalent as the above:  const unsigned int NDim = 3;   double coords[NDim];


Improving MSE: Feed forward network predicting only same output within batches (MSE error)

I am training a feed-forward network on a regression problem (MSE error) to predict a scalar value 1x1 given an input of size Nx1. My batch size is 400 (though this problem is robust to multiple batch sizes).   My problem is that the optimizer always converges to a solution where it predicts the same value for every element of the batch. For example, my real labels (for a batch of 400) might be:  [34, 50, 12, ... , 23, 45, 22] (size = 1x400)  And what it predicts will be something like this:  [29, 29, 29, .... , 29, 29, 29] (size = 1x400)   I think I get why it is doing this and it has to do with using MSE. Basically, MSE is computed over a whole batch and so that is the signal the optimizer receives to update the weights. The signal is not informative of the fact that predicting the same value for every element of the batch is a sub-optimal solution.   I have tried a couple solutions to this but all of them run into the same problem above. For example, I have tried adding a penalty for the variance prediction not matching the variance of the labels. Basically matching second moments. i.e. instead of,  $$ loss = (\hat y-y )^2$$ I do, $$ loss =  (\hat y-y )^2+ (var(\hat y) -var(y) )^2 $$  And it still does the same thing.   Reading some other questions it seems that this is to be expected with MSE and I am just wondering if anyone has tried something different or a different variation of MSE or batching that solves this problem. I get that this is a difficult problem but given the limitations of softmax classification on a regression type problem I think it is a very worthwhile one to solve.   Anyone else encountered this or have a solution for it?  (I am using tensorflow and a setup with 4 GPUs if it makes a difference.)


xfce4-terminal Color Settings for 'ls' in NTFS Partition Mounted by fstab

I have Xubuntu 14.04, and I have an NTFS data partition that mounts at startup via fstab. How could I adjust the color settings for xfce4-terminal beyond the GUI options? For example how could I set up specifically the color or font-weight of directories or files for 'ls'? Most importantly for now, I would like to make my partition directories appear exactly as they do in my Xubuntu partition (or at least remove the highlighting). Screen shot posted here. Much thanks in advance.


How to automatically run "ssh-agent bash" and "ssh-add" when log in?

I have a scenario where, whenever a user logs into a CENTOS machine via SSH, I need to have the following commands run:  ssh-agent bash ssh-add  [This other thread explains why I am using those commands:   ]  I have tried putting those into .bashrc, but then when I log in via Putty, it seems like the log in hangs.  I have also tried putting the two commands in a shell script, and then running the shell script manually after logging in, but that is not working (it looks like only the "ssh-agent bash" is run).  So is it possible to get those 2 commands to be run when the user logs in?  And if so, how can I do that?  Thanks, Jim


How to show there exist a unique $x_o$ in X such that f($x_o$)=$x_o$?

Let $(X, d)$ be a compact metric space. Let $f:X\rightarrow X$ be such that  $d(f(x), f(y)) < d(x, y)$ for all $x, y\in X$ with $x$ not equal to $y$. Show that $f$ has a fixed point, that is, there exists $x_0\in X$ such that  $f(x_0) = x_0$. Is the fixed point unique? My work: first i prove that $f$ is uniformly continuous on $X$ and if possible $f(x) \neq x$ for all $x \in X$ Considering a function $x\rightarrow d(x,f(x))$. Then i showed that this function is continuous by sequential criteria of continuity. Since it is continuous on a metric space then it is also uniformly continuous and attains it's infimum at some point $x_1 \in X$ so $d(x_1,f(x_1))>0$. But after that I cannot proceed. I think it will contradict the given condition. But ran out of ideas how to show that.


I'm trying to create a footer like this:  but i don't know how to position the footer__inner block in the center    .container {     width: 100%;     max-width: 1200px;     margin: 0 auto; }  .footer {     background: url(../assets/pay_me/payme_background.jpeg)     center center ;     height: 350px; }  .footer__inner {     display: flex;     justify-content: space-between;     align-items: center; }

                     Lorem ipsum dolor sit amet, consectetur adipisicing elit,                     sed do eiusmod
 tempor.incididunt ut labore et dolore magna                      aliqua.

                  Contact us