Escaping single quote in PHP when inserting into MySQL

I have a perplexing issue that I can't seem to comprehend...  I have two SQL statements:   The first enters information from a form into the database. The second takes data from the database entered above, sends an email, and then logs the details of the transaction   The problem is that it appears that a single quote is triggering a MySQL error on the second entry only! The first instance works without issue, but the second instance triggers the mysql_error().  Does the data from a form get handled differently from the data captured in a form?  Query 1 - This works without issue (and without escaping the single quote)  $result = mysql_query("INSERT INTO job_log (order_id, supplier_id, category_id, service_id, qty_ordered, customer_id, user_id, salesperson_ref, booking_ref, booking_name, address, suburb, postcode, state_id, region_id, email, phone, phone2, mobile, delivery_date, stock_taken, special_instructions, cost_price, cost_price_gst, sell_price, sell_price_gst, ext_sell_price, retail_customer, created, modified, log_status_id) VALUES ('$order_id', '$supplier_id', '$category_id', '{$value['id']}', '{$value['qty']}', '$customer_id', '$user_id', '$salesperson_ref', '$booking_ref', '$booking_name', '$address', '$suburb', '$postcode', '$state_id', '$region_id', '$email', '$phone', '$phone2', '$mobile', STR_TO_DATE('$delivery_date', '%d/%m/%Y'), '$stock_taken', '$special_instructions', '$cost_price', '$cost_price_gst', '$sell_price', '$sell_price_gst', '$ext_sell_price', '$retail_customer', '".date('Y-m-d H:i:s', time())."', '".date('Y-m-d H:i:s', time())."', '1')");   Query 2 - This fails when entering a name with a single quote (for example, O'Brien)  $query = mysql_query("INSERT INTO message_log (order_id, timestamp, message_type, email_from, supplier_id, primary_contact, secondary_contact, subject, message_content, status) VALUES ('$order_id', '".date('Y-m-d H:i:s', time())."', '$email', '$from', '$row->supplier_id', '$row->primary_email' ,'$row->secondary_email', '$subject', '$message_content', '1')");


Expected of number of discrete uniform variables whose sum is bigger than k (from characteristic function of discrete Irwin–Hall distribution?)

The problem  Imagine we keep uniformly drawing $n$ integers $X_i$ from {0, 1, ..., 9} so that their sum is more than $10$. For instance, one draw would be {1, 0, 2, 5, 3}, hence $n=5$, and repeat this procedure over and over. What would the expected value of $n$ be (analytically calculated)? By simulation (over 10 million trials), it is 3.063577.  Apparently, if that were uniformly drawn from $[0,10]$, this expected value would be equal to the Euler number $e$.  [I very recently asked it  and am waiting for answers (and will post them here), but I thought maybe it may be more suitable for CV. Sorry if that makes it off-topic.]  What I have been trying to do  Consulting the paper  by Caiado & Rathie (2007), I suspect (given $Y = \sum_{i=1}^{n}X_i$) the characteristic function of the distribution of $Y$ is something of the following form (Equation 2.3 in the paper)  $$ \Phi_Y(t) = \left( \sum_{p=0}^{k} \frac{e^{i.t.p}}{k+1} \right)^n , \forall t \in \mathbb{R}, i=\sqrt{-1} $$  If I understand it correctly, $k$ should be equal to 9 (right?)  If I have been correct, I tried calculating the inverse Fourier transform of $\Phi_Y(t)$ for $k=9$ and calculate its expected value but it is getting too complicated—and I suspect I'm very wrong here.  I went through multiple "similar" questions on SE (e.g., , , , , , and ) but I'm too confused to infere something useful from them.  Is there an answer to my question?  Many thanks in advance!    Some R code for numerical estimation  This is the R code I used to calculate it numerically (edited since the first submission):  N <- 1e+7 s.list <- n.list <- rep(NA, N)  for(i in 1:N){   s <- 0   n <- 0   seed <- i   while(s < 11){     s <- s + (sample(10, 1, replace = TRUE) - 1)     n <- n + 1   }   if(!(i %% 10000)) print(paste("At iteration", round(i/1000,1), "K, s is", s, "and n is", n))   s.list[i] <- s   n.list[i] <- n }  answer <- mean(n.list)


My approach: Non-square matrices (m-by-n matrices for which m ≠ n) do not have an inverse. However, in some cases such a matrix may have a left inverse or right inverse. If A is m-by-n and the rank of A is equal to n, then A has a left inverse: an n-by-m matrix B such that BA = I. If A has rank m, then it has a right inverse: an n-by-m matrix B such that AB = I.


are or is after plural but prior to singular

Which sentence is correct in this case?         Class conflict and class exploitation are the prime moving force in history of mankind   Class conflict and class exploitation is the prime moving force in history of mankind?


Python combinations with list and items in other lists


Notation: What does the tilde below of the expectation mean?

I am reading about variational auto encoders, and there is the below loss function:  $$l_i(\Theta,\phi) = - {\mathbb{E}}_{z\sim q} \left[\log p_\phi(x_i|z)\right] + KL(q_{\phi}(z_i|x)||p(z))$$  What does the notation $z\sim q$ under $\mathbb{E}$ mean? I just have seen notations like $E(X)$ or $ \langle X\rangle $ for expected value, $\mathbb{E}$.  What does this notation generally mean when using $\mathbb{E}_{x\sim y}$ for some $x$ and some $y$?


I have two hypotheses in which there is 1 independent variable (2 separate samples). I want to find out if the outcome of each of the 2 dependent variables is affected by the independent variable. Would it be appropriate to conduct a two-sample t-test, once for each dependent variable? Or, would it be appropriate to conduct a one-way ANOVA, even though there are only 2 separate groups?   EX:  Younger participants will have more positive attitudes toward eating pizza than older participants. (hypothesis 1)  &  Older participants will have greater perceptions of stigma associated with eating pizza than younger participants. (hypothesis 2)


how to handle floating point imprecision?

I am converting an array of bytes to a 32 bit floating point. Sometimes the numbers are slightly off.  Example:  10.1 becomes 10.100000381469727 when I serialize the value in RapidJSON. How can I normalize this?  I can't share that code. What I can share is this to prove it:  std::string BytesToHexString(     unsigned char* data,     size_t len ) {     std::stringstream ss;     ss << std::hex << std::setfill('0');     for (size_t i = len - 1; i >= 0 && i < len; --i)         ss << std::setw(2) << static_cast<int>(data[i]);     return ss.str(); }  std::string FLOATvalueToHexString(     float value ) {     union FloatToUChar {         float f;         unsigned char  c[sizeof(float)];     };      FloatToUChar floatUnion;     floatUnion.f = value;      return BytesToHexString(         floatUnion.c,         sizeof(float)     ); }  int main() {     std::string sFloatValue = "10.100000";      float fltValue = atof(sFloatValue.c_str());      std::string strHexFloatValue = FLOATvalueToHexString(fltValue);      std::cout << sFloatValue << " " << fltValue << " " << strHexFloatValue << std::endl;      return 0; }   It prints: 10.100000 10.1 4121999a The debugger says fltValue is 10.1000004.  If I convert 4121999a then this confirms that the internal storage is indeed off:    10.100000381469727  How can I normalize the floating point so I can at least get the correct hexadecimal value?


Situation: Windows Server 2003 R2 running HP Data Protector Client Port 5555 is blocked. Telnet to Server:5555 from the network fails but works from the machine itself. Firewall is disabled. AV is disabled/uninstalled. Disabled the Data Protector client. Installed SSH server with port 5555 and 5556. Port 5556 works as expected. 5555 is blocked. Performed Winsock reset. Connected second NIC and tried with that. This machine was infected and problem occurred a few weeks after cleaning up that unknown virus.  I'll take any ideas at this point. Sacrifice 2 chickens and a gerbil?


Accessing and recovering files in C:\found.001\disk0001.chk

Files disappeared from my computer. On running a system search, they were found in C:\found.001\disk0001.chk  I want to go in there and have a look, if there are other files there too, but it gives me an access denied message. I ran chkdsk but it said no problems.   Ideally I would want to run a recovery utility (not the ones for deleted files) that would restore them all to the respective locations. Though I am lucky, I still have them at this weird place.   I am on windows 7.


What are the conditions on $\text{tr}(AB) \leq \text{tr(A)} \text{tr(B)}$ to be true?

Let $A$ and $B$ be two arbitrary matrix with proper dimension for multiplication.   Consider this trace inequlaty which is trace of multiplication of two matrices versus their individual traces  $$\text{tr}(AB) \leq \text{tr(A)}  \text{tr(B)}$$   1- Do we have result for rectangular matrix that satisfy this inequality?  2- If they were square matrices what are the conditions?  3- Is there any specific name for this inequality?


Extrusion of 2d building footprints according to heights using python

I have 2d building footprints as polygonz geometries and building heights as attribute. I want to extrude them according to height values and generate building surfaces and polyhedral building records.   For this purpose in python I copy vertices of footprint and increase z values of coordinates according to heights then add these new vertices to my vertice list. So finally I achieve 8 points that represents corners of block shaped building as you can see in the picture.     How can I triangulate using these points and create triangles that represent surfaces of building using python?   Can I use a triangle library although it uses only 2d points as arguments?


Build a proper Cycles shadow pass in the compositor

I am working on a project that requires me to have control of shadows in the compositor (specifically, to darken or lighten them.) In BI, I would simply take the shadow pass and ramp it, them multiply it back in. But my scene involves mesh lights, and the Shadow pass only has Lamps and Environment lighting.  It seems that it should be possible to get the info I need for mesh lights from Direct Passes, and for indirect light from Indirect passes. But I am stuck on how to do this without also getting too much other info from those passes. From googling around, I've seen that others have run into this problem, but I couldn't find anybody that had actually tried to solve it.  Does anyone know a way to do this? Or can it be confirmed that it cannot be done for some reason?  EDIT: It is not enough to get shadows cast on other objects, which is covered by some other answers. I need the shading on each model itself as well. This is not for a shadow catcher, it is for isolating both cast shadows and shading so they can be worked with.


If the function $f$ satisfies the equation $f(xf(y)+x)=xy+f(x)$, find $f$

Question     Let the function $f:\mathbb R\to\mathbb R$,and such   $$f(xf(y)+x)=xy+f(x)$$      Find all $f(x)$   Let $x=1,y=1$,then $$f(f(1)+1)=1+f(1)$$ let $f(1)=t$,then $$f(t+1)=1+t$$  So I guess $$f(x)=x$$ is such it, and I found $f(x)=-x$ is also such it?   Can you help?  I found this simaler problem：(BMO 1997, 2000) $$f(xf(x)+f(y))=y+(f(x))^2,f:R\to R$$ this answer $f(x)=x$ or $f(x)=-x$,  the full solution can see


What does null pointer exception mean in error messages?

There are many articles asking to help with their code but not many actually answer what this means. Java doesn't use pointers on the user side but I get a null pointer exception error in my Java code sometimes and it made me wonder.. Does Java use pointers behind the scenes?  Or is this just a term that is used to describe a definition error.


Okay, so I'm trying to grasp how the human eye will perceive the real image created for example by a convex lens. Take the upper image in this picture for example.    If you were to place a screen at the focal plane, you'd see the projected image, and the size relative to the original object would be as the arrows suggest. What would I see if I was standing in the focal plane? Would I see the image with the same size change? Would I see anything?  If I stood much farther away, would I see a "virtual image" (I know it wouldn't actually be virtual), that is would it look to me as if the object actually was in the focal plane, and was of the size of the arrow in it?


How to read scientific notation output (numbers that include "e")?

After running the lm regression model using R, sometime one is bound to get very small P values or values in the covariance matrix. Something of the sort: -1.861246e-04 for example in a covariance matrix. My question is how do you read this? how could I perform calculations on it manually? I needed to multiply this covariance matrix out with a vector but since I do not know how to manipulate those numbers, I am lost.


Please read through question before marking it as duplicate.  I have gone through the  in this forum but could not find the solution working.  Please refer to my configurtion below  <log4net> <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">   <file type="log4net.Util.PatternString" value="${ALLUSERSPROFILE}\FileManager\Logs\Log_" />   <appendToFile value="true" />   <rollingStyle value="Date" />   <datePattern value="MMddyyyy'.log'" />   <staticLogFileName value="false" />   <preserveLogFileNameExtension value="true" />   <maxSizeRollBackups value="3" />   <layout type="log4net.Layout.PatternLayout">     <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] – %message%newline" />   </layout> </appender> <root>   <level value="ALL"/>   <appender-ref ref="RollingFileAppender"/> </root> <logger>   <level />   <appender-ref /> </logger>     I ran my application for more than 3 days but it didn't remove old log files.  My screenshot of logs


My client has asked that I use the ENGRAVERS MT font for the website

I have downloaded the font for free on a website. How would I go about implementing it to use it? And, would it be supported with other browsers et etc.


Do I need an ESTA to enter the US with the Victoria Clipper ferry?

I am thinking of visiting Victoria, BC in Canada and then going to Seattle, WA in the US, with the .  I am a national of a country under the Visa Waiver Program. I think that if I enter by air, I need to fill an ESTA form. If I enter by car, I don't need one, I can fill a form when crossing the border.  With the ferry, what is the procedure? Should I necessarily have an ESTA?


There are several topics on Stack Overflow which are closed due for different reasons, e.g. "not constructive", etc.   I think some of them would be important for lot of people, and because they are closed, they won't be up to date after a while, because science is always changing; there are new discoveries, new improvements in every year.  I know, that closing a topic is for good reasons, but I think it would be beneficial if the Stack Overflow community should consider (for example 100 votes for reopening would reopen the topic automatically), that a closed topic is worth reopening, or not.


Citizens of the USA naturally refer to themselves as Americans and refer to the country as America.  When speaking to a person from Canada, he argued that it was incorrect to call the country America. Instead, I should be saying the United States (of America).  Is it incorrect to refer to the country as America? And even if it is, won't people from around the world understand that the USA = America?


SUID-bit not working for executables within /tmp directory

Printing the value of getuid() and geteuid() from an executable with SUID-bit (chmod +s) turned-on, seems to result with the original caller ID instead of the owner id if the executable is located within the /tmp directory.  When compiling the exact same code to home directory (and executing chmod +s), this seems to work as expected.  I've searched a lot and could not find any reference to such behavior.  Does anybody know why is this happening?  this source is simple as that:  #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h>  int main(){     printf("%d\n%d\n", getuid(), geteuid());     return 0; }


Can I use lens brand X on interchangeable lens camera brand Y?

I've got some lenses of brand X, but I've just got a new camera of brand Y. How can I tell if it's possible to use my lenses on my camera? I accept that I may lose a lot of automatic functionality like autofocus, aperture control and metering when using an adapter to connect the two.


I am redesigning the core navigation of a brand site.  We are now including a "Community" section. This will be hosted in a subdomain like "community.brandname.com".  It's an important section and needs to remain prominent. Does it makes sense to add this link to the first level nav in our header or in the meta navigation - smaller nav elements just above?  Any best practices on that?  Thanks!!


Finding the limit of a $f(x)$ where $ \lim_{x \to \infty} (f(x)+f'(x)+f''(x))=C$

Let $ f: [0,\infty) \to \Bbb R$ be a function of class $C^2$ (twice continuously differentiable on $\Bbb R$) such that $$ \lim_{x \to \infty} (f(x)+f'(x)+f''(x))=C$$ Then prove that $\lim_{x \to \infty} f(x)=C$ My attempt: Let us take the auxiliary function $g(x)$ defined as, $g(x) = e^x(f(x)+f'(x))$. Then we have $g'(x)=e^x(f(x)+ 2f'(x)+f''(x)$. If we use Cauchy's MVT to the functions $g(x)$ and $e^x$ on any interval $[N, 2N]$, then there exists $\mathcal E \in (N, 2N)$ such that $$ \frac{ g(2N)-g(N)}{e^{2N}-e^N}=\frac{g'(\mathcal E)}{e^{\mathcal E}}$$ $$ \implies \frac {e^{2N}(f(2N)+f'(2N))-e^N(f(N)+f'(N))}{e^{2N}-e^N}=\frac{e^{\mathcal E}(f(\mathcal E)+2f'(\mathcal E)+f''(\mathcal E))}{e^{\mathcal E}} $$ $$ \implies \frac {(f(2N)+f'(2N))-e^{-N}(f(N)+f'(N))}{1-e^{-N}}= f(\mathcal E)+2f'(\mathcal E)+f''(\mathcal E)$$ Now let us take the limit of $N$ as $N \to \infty$ (this also implies $\mathcal E \to \infty$), $$  \implies \lim_{N \to \infty} {\frac {(f(2N)+f'(2N))-e^{-N}(f(N)+f'(N))}{1-e^{-N}}}= \lim_{\mathcal E \to \infty} {f(\mathcal E)+2f'(\mathcal E)+f''(\mathcal E)} \space \space \space \space \space \dots \space (1)$$ Now assume $\lim_{x \to \infty}{f(x)}=k$ and $ \lim_{x \to \infty} {f'(x)}=l$ and , then from $(1)$, we would have $$ k+l=C+l$$ $$\implies k=C$$ So it shows  $\lim_{x \to \infty} f(x)=C$. I have a doubt regarding my proof. I had to assume that  $ \lim_{x \to \infty} {f'(x)}$ exists and is finite (This also deduces $\lim_{N \to \infty}{e^{-N}(f(N)+f'(N))}=0$) . Is it possible to proceed without that assumption? What are the modifications in this proof it would bring then?


Unable to install flash player on Ubuntu 16.04.   I tried locating on Software Center. Didn't help.   Tried updating Ubuntu. Didn't help.  Tried going through the process of downloading .tar.gz from Adobe. That didn't help either. I tried all three steps on wikihow. Didn't worked for me.   What should I do?  [Update:] This might help. When I tried running command  sudo apt-add-repository multiverse && sudo apt-get update, I get the following message: N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension


How many five-digit numbers can be formed using digits $0, 1, 2, 6, 7, 8,9$ which are divisible by $3$ and $5$?

How many five-digit numbers can be formed using digits $0, 1, 2, 6, 7, 8$ and $9$ which are divisible by $3$ and $5$, without any of the digits repeating? For the number to be divisible by $5$ it must end with $0$ (or $5$, but we don't have it in the given problem). So we have $V_6^4$ numbers which are divisible by $5$ but how can we exclude those which aren't divisible by $3$?   $120$


I get a   Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Hex   when i execute my code.   I have looked through a number of examples on this exception on stack overflow but nothing seems to help. My pom.xml looks like this  <dependency>   <groupId>commons-codec</groupId>   <artifactId>commons-codec</artifactId>   <version>1.10</version> </dependency> <dependency>   <groupId>junit</groupId>   <artifactId>junit</artifactId>   <version>3.8.1</version>   <scope>test</scope> </dependency>   </dependencies>   <build>     <pluginManagement>       <plugins>         <plugin>           <groupId>org.apache.maven.plugins</groupId>           <artifactId>maven-shade-plugin</artifactId>           <version>2.4.3</version>           <executions>             <execution>               <phase>package</phase>               <goals>                 <goal>shade</goal>               </goals>             </execution>           </executions>         </plugin>          <plugin>           <groupId>org.apache.maven.plugins</groupId>           <artifactId>maven-compiler-plugin</artifactId>           <version>3.0</version>         </plugin>         <plugin>           <groupId>org.apache.maven.plugins</groupId>           <artifactId>maven-surefire-plugin</artifactId>           <version>2.12.4</version>         </plugin>       </plugins>     </pluginManagement>      <plugins>       <plugin>         <artifactId>maven-compiler-plugin</artifactId>         <configuration>           <source>1.8</source>           <target>1.8</target>         </configuration>       </plugin>     </plugins>   </build>   Code to reproduce it looks like this  package com.mypackage; import java.util.*; import java.io.*; import java.security.*; import org.apache.commons.codec.binary.Hex;  public class Test{     private byte[] m_key;   private static String resourceFolder = System.getenv("SEABED_HOME").toString() +  "/testing" + "/resources"; public static void main(String[] args) { Test t = new Test(); t.readKey(); }     public byte[] generateKey()   {     SecureRandom scr = new SecureRandom();     byte[] key = new byte[32];     scr.nextBytes(key);     return key;   }    private void readKey()   {      BufferedReader br = null;     try{       br = new BufferedReader(new FileReader(resourceFolder + "/.seabedkey"));       m_key = Hex.decodeHex(br.readLine().toCharArray());     }     catch(Exception e)     {        if(e instanceof FileNotFoundException)       {         System.out.println("Key not found, generating now");         writeKey(generateKey());         readKey();         return;       }       e.printStackTrace();     }     finally     {       if(br != null)       {         try         {           br.close();         }         catch(IOException e)         {           e.printStackTrace();         }       }     }    }    private void writeKey(byte[] key)   {     try{       FileOutputStream fos = new FileOutputStream(resourceFolder + "/.seabedkey");       fos.write(key);       fos.close();     }     catch(Exception e)     {       e.printStackTrace();     }   } }   I execute it like this  java -cp target/mypackage-1.0-SNAPSHOT.jar:~/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar com.mypackage.Test   It compiles but then at runtime it looks like the class cannot be found. I tried changing the scope of the dependency to provided but apparently that is not the right way to use it so I switched back to the default which is compile. I can find the jar in my .m2 folder so I am sure it is there.


How to write an email to request a dataset to a professor

I'm interested in a dataset used in a scientific article, but I am not able to find this dataset on the Internet, I guess it is because the dataset was provided by NSTAR (an energy company) that no longer exists (it has merged with Eversource).  I have thought of requesting it to the corresponding author of the article, but I have never sent anything to a MIT visitant professor (female, just for the record) and I have never called a teacher of mine by its title. I think that there is not such a strict culture in Spain of calling everyone by its title. Can anyone help me in writing the letter? Will it bother her if I send such request? How should I start? What should I say about myself? How should I end the letter?


number of integral solutions of the equation

Find the number of integral solutions of $\large 2x + y + z = 20$ with $x, y, z \ge 0$ ?       I saw a method of generating function but i donot have knowledge about generating function  any alternative way to solve this  , answer = 121


MySQL replication of single DB to same server

I have a DB Server running CentOS 6.4 and MySQL 5.5 from RPMs (not source).  I have dozens of databases but one of them is being hit quite hard with large selects which locks out other updates which in turn locks out other selects (at least I think this is what's happening!)  To alleviate this I would like to replicate one of the databases onto the same server so that the writes can write to the "master" and reads can be done on the "slave". I don't have the luxury of additional hardware.  I have found a lot of guides on the internet describing how to replicate to a different server, and one () describing how to replicate to the same server but it doesn't seem to be geared towards retrofitting this functionality to an existing database with 10s of GB of data in it already. It also talks about compiling MySQL from source.  Does anyone know how I can retrospectively convert my MySQL 5.5 config to replicate one of my databases on the same server?  My existing DB runs on port 3306 so I feel it should be as easy as firing up another instance of MySQL on port 3307 and making some changes to my.cnf but not sure what changes.  Thanks in anticipation.


Use division algorithm and then induction to show 3|(n³+2n) for all ℕ.

For division algorithm, would I do something along the lines of n³+2n = 3q+r and go from there?  For induction, I did the base case, which is true, and so then I moved on to the k+1 case, in which I did (n+1)³ + 2(n+1) to get n³+3n²+5n+3, which isn't all the way divisible by 3. WHat step did I do wrong here?


Finding all objects that have a given property inside a collection

I have some complicated object, such as a Cat, which has many properties, such as age, favorite cat food, and so forth.    A bunch of Cats are stored in a Java Collection, and I need to find all the Cats that are aged 3, or those whose favorite cat food is Whiskas.  Surely, I can write a custom method that finds those Cats with a specific property, but this gets cumbersome with many properties; is there some generic way of doing this?


Open terminal from nautilus by right click

I use nautilus as my default file manager. Is there any way that I can customize it so that right click anywhere in the window gives an option to open the current directory in terminal. I have seen same feature in dolphin, wish I could do the same in nautilus too.


What is the variable that contains the source file name?

I am writing a package that saves information to an external file. I would like to name that file according to the source one; something like  foo.tex -> foo.bar But I cannot find any variable that contains 'foo'. I am pretty sure that there must be one because the table of contents is saved to foo.toc.  Any pointers?


In what order should I watch Flash and Arrow TV Shows?

The two TV shows  and  cross over (or so I'm told).  I've only been watching Arrow so far, and Barry Allen has . Do I need to start watching Flash episodes?  What order do I need watch these shows in?


the need for the formal definition of a limit

The intuitive definition for $\lim\limits_{x \to a} f(x) = L$ is the value of $f ( x )$ can be made arbitrarily close to $L$ by making $x$ sufficiently close,  but not equal to, $a$.  the formal definition of limit:For every real ε > 0, there exists a real δ > 0 such that for all real x, 0 < | x − a | < δ implies | f(x) − L | < ε.  Why we need the formal definition of a limit? Does the intuitive definition has some flaw ?  I understand the intuitive definition quite well, but I don't understand much about the formal one.  P.S.I must declare I only have some basic knowledge of limit ,I started to learn calculus a few days ago .  , This post is not good ,because it covered more than one question , I picked one question from it ,so we can discuss it more  targeted .


How to install ubuntu in a windows 7 operating system

Pls explain in detail. I am downloading x63 iso file..  Pls tell me all the steps after i download this file


I'm looking to install 32-bit windows with IIS to dual-boot with my 64-bit edition of windows on a laptop. I have a ten gig partition on my harddrive - is this large enough for a simple Windows install and a few programs?   I've never dual booted before, so I'm not quite sure how easy it is to mess up the process. Can you recommend any tutorials on how to set up a dual-boot configuration on Windows?


I have the following colorbar drawn with pgfplots:  \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \begin{document}  \begin{tikzpicture} \begin{axis}[     hide axis,     scale only axis,     height=0pt,     width=0pt,     colorbar horizontal,     point meta min=0,     point meta max=1,     colorbar style={         width=8cm,         xmin=0,         xmax=1,         xtick={0,0.1,...,1}     }]     \addplot [draw=none] coordinates {(0,0)}; \end{axis} \end{tikzpicture}  \end{document}   I expected to have x ticks from 0 to 1 in 0.1 increments, but pgfplots omits the tick at 1:  As a quickfix one can just write 2 instead of 1, then pgfplots draws the tick at 1, but can anyone explain what I did wrong in the first place?


After plugging in a memory stick, the laptop can take up to 2 minutes to discover and show up in explorer. I have tried 3 different makes of stick so far, Transcend, Kingston & Corsair. All are USB 2.0 compliant. All work fine in various other boxes. All of them contain nothing but data (MS docs, pdfs, images & text files). No autoruns, clever encryption or utilities. All are eventually discovered and usable.  Laptop is an ASUS X71Q running Windows 7 32-bit Home Premium, 3GB of RAM. (Out of warranty) Norton Internet Security is installed, however, with it temporarily disabled I still get the delay.  I am not asking about data transfer rates. There is no problem with USB mice or keyboards. This happens at any time, not just straight after booting. There is no "installing device drivers" message. I have removed or stopped all ASUS bloatware/utilities. It happens on all USB ports. USB drivers are from MS (recommended by ASUS) and have been removed/reinstalled. It makes no difference if it is running on battery or adapter. It also happens in safe mode. Memory usage is sat at 1-1.25GB before I plug in the stick and doesn't change after. Disk cache increases by 6MB when the stick is recognised and drops back down when it's removed. None of the sticks are readyboost compliant. Defrag of the HDD has made no difference. There is no delay when using a Kubuntu LiveCD


Can anyone explain what's wrong with this?


Is it possible to save programs you download from the "repository" in some kind of "setup" format, so you can install them in the future offline?

Downloading programs with one line of code from this magical place called the repository sounds good in theory, but I really feel the need to have my programs somewhere safely stored in some kind of setup.exe format in case I have no access to the internet, or if the repository service goes down.  My newest problem is  I want to get a version newer than  if possible, and save it for the future without having to go through the hassle of enabling fishy repositories.  Isn't there some kind of website with setup.exe (for linux) files that you can save and unpack in your ubuntu 16.10?


Where May I (legally) get a Mac OS X .iso File to Virtualize OS X?

I want to virtualize a Mac (the latest, 10.9) on my Mac (MacBook Air). I prefer to use VirtualBox. After setting up the OS X guest, I need to provide a .iso file from which VirtualBox will install OS X. Where can I (legally) get such a .iso file? My Mac didn't come with installation media so I can't just create one from a disc.


May I ask for the reason of downvoting to the voters?

May I simply know the exact reason of downvoting from the voters? It could be helpful to anyone who is new at this community.  Thanks.


If $a,b\in\mathbb R$ with $a<b$, then there is some rational $r$ with $a<r<b$.

How do you prove this question? I was thinking proving contrapositive. But I was stuck..Thanks guys.


What word or phrase adequately describes a series of words which may have a distinct meaning, but fail to adhere to normal grammatical rules? In particular, they might not have any finite verb or even proper noun.  "Morphine 20mg prn."  "God almighty!"  "Sleepy now: less tired later"  "Implacable November weather."  Nominal group is the closest I can come up with, but I'm not sure that this is quite accurate. More generic terms such as "chunk", "phrase" or "segment" also feel inappropriate.


Can interrogative who be substituted by whom?

Who are the letters for? (James Joyce, Ulysses)   It seems that who is moved forward to make an interrogative sentence, from after for. Then can you use whom instead of who, for the latter would be ‘whom’ when it comes after ‘for’?


Can I withdraw 90% of my 401k funds (I'm under 59 years of age) under the new stimulus bill that was signed in December 2020? Even though the CARES act expired, according to this article  it says: Similar to the CRD provisions under the CARES Act, qualified disaster distributions:   Are not subject to the 10% early distribution excise tax under Section 72(t) of the Internal Revenue Code; Will not be treated as violating any distribution restriction under the tax-qualified retirement plan or IRS; May be repaid to a tax-qualified retirement plan or IRA by the participant within three years, and such repayment will be treated as a tax-free rollover; Will result in income spread over three years, unless elected otherwise by the participant (and unless recontributed and rolled over); and Will not be treated as eligible rollover contributions for purposes of mandatory income tax withholding and notice requirements.


Different wordpress 404 template for different post type

I want to have different 404 template for each custom post type.  eg. I have post type name event and the link will be domain.com/event/my-event-name  but if it link to page that not have post domain.com/event/xxxxxxx   then it will show 404 page, but I want it different from 404.php template, I try get post type in 404.php but it can't because it not have a post to get from.


Let $m(x) = \min_{t\in[a, x]}f(t)$. $f(x)$ is continuous on $x\in[a, b]$. Prove $m(x)$ is continuous.

Let $f(x)$ be a continuous function on $x\in[a, b]$. Let:   $$ m(x) = \min_{t\in[a, x]}f(t)\\ M(x) = \max_{t\in[a,x]}f(t) $$   Prove both $m(x)$ and $M(x)$ are continuous.   This statement seems so obvious, but I was not able to write down a formal proof.   There is a couple of trivial facts I've figured out so far. First by definition of $\min x$ we know it is monotonically decreasing. Also $f(x)$ is bounded and by Bolzano-Weierstrass there exists $x_0\in[a,b]$ such that: $$ f(x_0) = \inf_{[a, b]}f $$  So we might only consider the interval $[a, x_0]$, because $m(x)$ is going to be constant for $x \ge x_0$. Similar facts are true for $M(x)$.  I've also been playing around with the following inequalities without any success: $$ \min_{x\in[a,b]} f(x) \le \min_{t\in[a, x]} f(t) \le f(x) \le \max_{t\in[a, x]} f(t) \le \max_{x\in[a,b]} f(x) $$  What would be a way to prove the statement?


Why are lower p-values not more evidence against the null? Arguments from Johansson 2011

Johansson (2011) in "" (here is also ) states that lower $p$-values are often considered as stronger evidence against the null. Johansson implies that people would consider evidence against the null to be stronger if their statistical test outputted a $p$-value of $0.01$, than if their statistical test outputted a $p$-value of $0.45$. Johansson lists four reasons why the $p$-value cannot be used as evidence against the null:        $p$ is uniformly distributed under the null hypothesis and can therefore never indicate evidence for the null.    $p$ is conditioned solely on the null hypothesis and is therefore unsuited to quantify evidence, because evidence is always   relative in the sense of being evidence for or against a hypothesis   relative to another hypothesis.   $p$ designates probability of obtaining evidence (given the null), rather than strength of evidence.   $p$ depends on unobserved data and subjective intentions and therefore implies, given the evidential interpretation, that the   evidential strength of observed data depends on things that did not   happen and subjective intentions.      Unfortunately I cannot get an intuitive understanding from Johansson's article. To me a $p$-value of $0.01$ indicates there is less chance the null is true, than a $p$-value of $0.45$. Why are lower $p$-values not stronger evidence against null?


Why does Unanswered show Answered questions?

Possible Duplicate:        When I click 'Unanswered' in the menubar, I get a list of questions, all of which have been answered. Does it just mean there's no accepted answer? If so, can we make that more obvious? Can we get some way of finding really unanswered questions?


Changing minecraft playerdata when transferring a saved game (open to LAN)?

Player A created a Single Player game in Minecraft, hosted on his laptop, and opened to LAN at my house with about 4 people in total, including myself, Player B. Player A's laptop was soon struggling with the hosting responsibilities, and we wanted to transfer the saved game to Player B's desktop.  We transferred the file onto my computer, and loaded it. The world seemed to be the same, but when I logged in as Player B, it loaded the player data for Player A; I was in his spot, with his items, and had his experience.  Upon digging, I believe that the reason for this is because the way that the game's playerdata saved his player had something to do with him being the host. Now, since I'm the host, it must be assigning me the player with the previous host attributes.  I have not yet logged him (Player A) in while I (Player B) am hosting on the desktop, but I assume he would have my credentials?  Also, another player, who was on the server last night while Player A was hosting, logged in while I started hosting, and her character was the same; she had the same items, was in the same location as last night, etc.  Why am I logged in as the previous host, Player A, but it seems everyone else has their correct credentials? Is there a way I can change this so that I'm logged in as Player B while hosting?


Many  around the internet is using "X-NginX-Proxy"  Nowhere can I find a proper description of its purpose or why one would use it, apart from that it relates to using nginx as a proxy?  Example:  server { listen 80;  server_name forum.example.org;  location / {     proxy_set_header X-Real-IP $remote_addr;     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;     proxy_set_header X-Forwarded-Proto $scheme;     proxy_set_header Host $http_host;     proxy_set_header X-NginX-Proxy true; ...


getchar() causes error while scanf don't

#include<stdio.h> void main() { char ch; ch=getchar(); printf("%d",ch); }   This gives me error NZEC (non zero exit code) but when I use-  #include<stdio.h> void main() { char ch; scanf("%c",&ch); printf("%d",ch); }   No execution error and accepts solution What's wrong with getchar() ?  I am quite new to C so don't know much I checked few answers on difference between scanf and getchar but I could not understand. Please help me in understanding this behaviour.  Solution: I did not know that my query is related to this question:   Moreover both of these are working-  #include<stdio.h> void main() { int ch; ch=getchar(); printf("%d",ch); }   changing char to int and-  #include<stdio.h> int main(void) { char ch; ch=getchar(); printf("%d",ch); return 0; }   changing void to int


How to test if a bitmap file has a transparent background?

I created a bitmap with transparent background but in the Windows Picture Viewer I see the white background and even if I reopen it in Photoshop CS3. how do I make sure the white colour in bitmap is really transparent or see if contain any transparent colour?


How do I discard unstaged changes in Git?

How do I discard changes in my working copy that are not in the index?


Apply central limit theorem to solve probability

I am asking to use central limit theorem to solve this quesion. In an election between two candidates, A and B, one million individuals cast their vote.  Among these, 2000 know candidate A from her election campaign and vote unanimously for her. The remaining 998000 voters are undecided and make their decision independently of each other by flipping a fair coin.  Approximate the probability pA that candidate A wins up to 3 significant figures. I got my mean = np = (1000000-2000)  * 0.5 = 499000, my sd =$\sqrt {np*(1-p)}$= $\sqrt {998000*0.5*(1-0.5)}$, then apply CLT, my new sd = $\frac{sd}{\sqrt{998000}}$, and X = $\frac{1000000}{2}$+1-2000 = 498001. Then apply normal distribution. Am I right?


Does mutual fund front-load fee count toward IRA contribution limits?

I want to max out my IRA and I am investing in a mutual fund with 5% front-load fee.  Does that mean that I can contribute $5,500 max for IRA but have real IRA balance $5,500 less $275 = $5,225 as a result?  Or, can contribute $5,789 so my after fee balance becomes $5,500?  Our financial adviser said that first case is how it works, but he was not able to point me to any IRS documentation confirming it.


Definition of symmetric probability mass function

Consider the random variables $Y$ characterised by a probability mass function (PMF) as follows: $$ Y=\begin{cases} -2 & \text{ with probability $\frac{1}{2}$}\\ 2 & \text{ with probability $\frac{1}{2}$}\\ 10 & \text{ with probability $0$} \end{cases} $$ Is this PMF considered symmetric around zero? I'm confused because  if I picture it it looks symmetric around zero (the last mass point does not appear as it has probability mass zero). However, from reading the , it does not seem so.


Using 240v mains on/off as input to microcontroller

I have a light switch that switches 240v (UK) mains. Instead of using that to directly control a light, I want to use it as an input to a controller board so I can also automate the lighting. (It's low voltage LED lighting driven via a transformer although that doesn't really affect my question).  My question is what is the best and safe way to use switched 240v mains power as an input to a low voltage microcontroller circuit? It would be best to use the existing switch to switch a low voltage control signal but I can't change the wiring at at this time so the only input I have to my control is a switched 240v mains power line.  I have other power available where the controller is so I'm not intending to power this via the original light power, I just want to see if I can use it as a control line without extensive rewiring work for now.


Proofs of $\sum_{n=1}^\infty \frac{1}{n^n}=\int_0^1 \frac{1}{x^x}dx$

Prove that $\sum_{n=1}^\infty \frac{1}{n^n}=\int_0^1 \frac{1}{x^x}dx$. This comes from this question .


Need help how to calculate the analysis of an algorithm  I understand the concept of Big O and know the difference between the types of cases there are.  public int examplecode(int[] data) {     int n = 0;     int counter = data[0];      for(int j = 1; j < n; j++)     {         if(data[j] > counter)             counter++;     }      if(data[j] > counter)         counter++;      for(int j = 1; j < n; j++)     {         for(int k = 1; k < n; k++)         {             if(data[k] > counter)                 counter++;             counter += 3;         }     }      return n; }   I expect n^2 + 9n


In the superpopulation framework of causal inference, what is the necessity of assuming the outcomes, treatment and covariates are jointly iid?

In the textbook "Causal Inference for Statistics" by Rubin and Imbens, the following argument is made on pg. 39:     "In part of this text we view our sample of size N as a random sample   from an infinite super-population. In that case we employ slightly   different formulations of the restric- tions on the assignment   mechanism. Sampling from the super-population generates a joint   sampling distribution on the quadruple of unit-level variables (Yi(0),   Yi(1), Wi, Xi), i = 1, . . . , N. More explicitly, we assume the   (Yi(0), Yi(1), Wi, Xi) are independently and identically distributed   draws from a distribution indexed by a global parameter."   I am wondering why the bolded portion is needed to be assumed. In the context of observational studies what happens if 1) we have dependence, and 2) if the tuple is not jointly identically distributed.   Is this a general assumption that can be relaxed? Where do we really need it? Specifically:  1) What happens if we have dependence?  2) What happens if they are NOT identically distributed?


I am getting this error when running jar file on linux - Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger

I created a java project and when I run it from NetBeans it runs correctly and does what is supposed to but when I move it on the Linux server it gives me this error:   Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger     at arhivare.Arhivare.<clinit>(Arhivare.java:29) Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger     at java.net.URLClassLoader.findClass(URLClassLoader.java:382)     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)     ... 1 more   It has to to with log4j library which I included in the project (it runs in Netbeans). What am I missing ?


Diagonalizability of an involution over a Field

Suppose $A$ is a matrix over a field $F$ of characteristic $\neq 2$, with $A\cdot A=I$. Show that $A$ is similar to a diagonal matrix whose entries are either $1$ or $-1$.


Windows 10 K&N Edition Anniversary update - Media player update not working

I own a Windows 10 K or N Edition which doesn't include the media player package. My problem is: I want to have preview thumbnails in the explorer for my MP3s and videos.  I had the issue before when I updated to Win10 but there  saved me. Since the Anniversary update they are gone again.   Now I can install the old update but I still don't get the media player nor the preview images.  I tried most of the things Microsoft offers me but they are either not installable or don't work.  Any ideas what might be the correct update package?  Thx!  Ron


In New Zealand English, is it usual to pronounce the words "women" and "woman" the same?

For example,  in  video from 2:00 onwards,  the Prime Minister of New Zealand says "woman/women" several times.   The context shows clearly that she means the word to be plural,  but she says "woman" every time - or to look at it another way,  she pronounces the plural the same way that "woman" would usually be pronounced.  My question is,  is it usual for the two words to sound indistinguishable in NZ English,  or is this perhaps just a particular local dialect?  Also,  do New Zealanders sometimes write "woman" when they're referring to the plural  (in the same way that "sheep" and "deer" are the written plurals),   or is this just a pronunciation characteristic that doesn't show up in writing?


I have been refused a Schengen tourist visa reason being the information submitted regarding the justification for the purpose and conditions of the intended stay was not reliable.I don't understand because I provided a cover letter explaining my intention for the trip together with my itinerary.Someone kindly advise what I should do in case I decide to reapply.Thanks.


Idiom/phrase which means "to pretend not to understand or know"

Sometimes (well, often) people pretend not to understand what's going on (or pretend not to understand what the other person means, etc.) when in fact they do perfectly well.   For example, Person A is hoping that his friend Person B would let him crash at his place for a couple of days, but, so as not to appear too intrusive, he wants Person B to invite him instead of asking directly. So, he says to his friend:     Hey, Person B! I've just been kicked out of my house and I have nowhere to go. I really have to figure out where to stay the next couple of days.    Person B understands that Person A is hoping that he would offer him to stay at his place. But he chooses to pretend not to understand, and, instead of saying sorry and explaining why Person A cannot stay at his place, person B says:     There's a nice hotel near here, and it's not very expensive. I can give you the address.   Another example. Person B has secretly stolen the wallet of Person A. Person A has figured out that it was person B and when they meet, he says:     My wallet was stolen the other day.   Person B says:     Really? Oh, that's so unfortunate!    What idioms in English would one use to describe the behavior of Person B in the sample situations? I.e. pretending to be stupid or pretending not to understand something rather obvious, or pretending not to know something that you know; in other words, consciously imitating ignorance, indifference, or innocence.  In Russian, the idiom is to pretend to be a fire hose (прикидываться шлангом) or to pretend to be a boot (прикидываться валенком). The Armenian idiom is to pretend to be a donkey (իրեն էշի տեղ դնել). For me, these phrases are not quite unimaginative and cause a certain amount of amusement. I am hoping to find an English equivalent (or equivalents) that would be informal and/or sound funny(-ish), but that's not essential.  Naturally, I tried to look up the translation in the dictionary before asking, but to no avail, presumably because the phrases mentioned above are rather informal.


Prove that for an integer n larger than or equal to 2, the period for the decimal expression of the rational number $\frac{1}{n}$ is at most n -1.

I am currently working my way through "A Concise Introduction to Pure Mathematics" by Martin Liebeck, and have been stuck on an excersise for a couple of days now. The question reads:  "Show that for an integer n $\geq2$, the period of the decimal expression for the rational number $\frac{1}{n}$ is at most $n-1$."  I've been trying to solve this without making any substantial progress. And yes, I have seen explanations that when performing a long division the decimal expression either terminates to $0$ or eventually repeats. But I haven't seen any proof of this that I've been satisfied with, even less do I know how to formalise this type of proof. I've tried to write out long division with arbitrary digits, but that obviously turns out to be too much of a hassle and basically impossible to draw any conclusions from.


Textboxes are rectangles which can contains text and other stuffs. I was wondering if there is some package that allows to create textboxes with arbitrary shapes.   I mean, can I obtain something like this?    Hope tags are correct.


can someone explain =+ operator for me in javascript?

I saw some code that happened in javascript:  var date = +new Date(); //same as 'var date =+ new Date();'   and it gave me a number: 1441863253753 The previous programmer was using this to store unique ids  when I remove the + :  var date = new Date();   it gave me: "Thu Sep 10 2015 01:36:13 GMT-0400 (Eastern Daylight Time)"  can someone tell me what's going on?  I've seen +=, but never =+


How prove this inequality $[f(x)]^2+[f'(x)]^2\le \max{(A,B)}$

let $f(x)$ be two derivable on $R$,give the two postive  numbers $A,B$ and such   $$[f(x)]^2\le A$$   $$[f'(x)]^2+[f''(x)]^2\le B$$   show that   $$[f(x)]^2+[f'(x)]^2\le \max{(A,B)},\forall x\in R$$   I think maybe well know inequality：  $$|f'(x)|\le2\sqrt{|f''(x)||f(x)|}\le |f''(x)|+|f(x)|$$ $$\Longrightarrow [f'(x)]^2\le (|f''(x)|+|f(x)|)^2\le\dfrac{1}{2}([f''(x)]^2+[f(x)]^2)$$  if $A\ge B$ then I can't $$[f(x)]^2+[f'(x)]^2\le A$$  Maybe this idea can't usefulll?


How can I increase the line spacing in a matrix?

I'm trying to create a pmatrix whose components are rather complicated fractions (Christoffel symbols), and the line spacing is too small making the whole thing a bit cramped and hard to read.  Is there any easy way to increase the spacing (about 1.5 the default would be perfect)?


What could be causing cable signal to be lost?

One tv stopped working while all the others in the house work.  Comcast guy claims the cable in my wall behind my fireplace went bad.  They told me that before and were wrong.  How can I check if there is no signal from the cable?  He has another cable unsightly running across the fireplace.


why can't `_` be exported to the environment of bash?

In bash, why can't _ be exported to the environment of the shell?  $ export _ $ export | grep _= $   output nothing. Or do I miss something?   How can I export _ into the environment?  See also . Thanks.


What about someone use "receives 6 spam or offensive flags:−100" rule?

What if a bunch of jealous bad guys just want to interfere with SE Community and they decide to cast 6 spam flags on an innocent person? Will the poor guy lose 100 hard earned reputations?


Combine serveral images into one Live-USB

I wanted to know if it's possible to combine at least two systems into one image :  Example :   I have a Debian image (.iso) and a Clonezilla image (.iso) and I want to make one image and the GRUB (installed into the image) let me choose between Clonezilla or Debian.  Is it something easily doable or should I make a fully custom image ?


HP Deskjet 3634 doesn't communicate - Ubuntu 20.04

I've been using the printer for 5 years without problems on Ubuntu 16.04 LTS. I recently installed Ubuntu 20.04 LTS and now the printer doesn't communicate. I've been searching for many hours, and did everything in , without success, I am desperate. Printer is working, is detected, but doesn't respond to print commands or test pages, generating answers such as  Device communication error  (in HP Device Manager) or  error: 'DeskJet_3630' Printer is either Powered-OFF or Failed to communicate.  (in HP doctor) or error: Unable to communicate with device (code=12): hp:/usb/DeskJet_3630_series?serial=CN66S3P7YR06GP error: Device not found"   (hp-setup). Also tried installation (before installing hplip, as well as after removing all hplip-stuff) via printer installation, same result. Tried USB, tried network... DeskJet_3630 ------------ Type: Printer Device URI: hp:/usb/DeskJet_3630_series?serial=CN66S3P7YR06GP PPD: /etc/cups/ppd/DeskJet_3630.ppd warning: Failed to read /etc/cups/ppd/DeskJet_3630.ppd ppd file PPD Description:  Printer status: printer DeskJet_3630 is idle.  enabled since zo 30 aug 2020 21:01:52 error: Unable to communicate with device (code=12): hp:/usb/DeskJet_3630_series?serial=CN66S3P7YR06GP error: Device not found error: Communication status: Failed  Any help much appreciated! Update: I managed to delete some files (hplip.conf e.a.), ran the whole hplip installation again, and now everything works fine, thanks N0rbert


What websites allow users to quickly and simply convert mathematical equations into SVG without having to install or run any software?


How to interpret autocorrelation plot in MCMC

I am getting familiar with Bayesian statistics by reading the book Doing Bayesian Data Analysis, by John K. Kruschke also known as the "puppy book". In chapter 9, hierarchical models are introduced with this simple example: \begin{align} y_{ji}   &\sim {\rm Bernoulli}(\theta_j)  \\ \theta_j &\sim {\rm Beta}(\mu\kappa, (1-\mu)\kappa)  \\ \mu      &\sim {\rm Beta}(A_\mu, B_\mu)   \\ \kappa   &\sim {\rm Gamma}(S_\kappa, R_\kappa) \end{align} and the Bernoulli observations are 3 coins, each 10 flips. One shows 9 heads, the other 5 heads and the other 1 head.  I have used pymc to infer the hyperparamteres.  with pm.Model() as model: # define the          mu = pm.Beta('mu', 2, 2)     kappa = pm.Gamma('kappa', 1, 0.1)     # define the prior     theta = pm.Beta('theta', mu * kappa, (1 - mu) * kappa, shape=len(N))     # define the likelihood     y = pm.Bernoulli('y', p=theta[coin], observed=y)      # Generate a MCMC chain     step = pm.Metropolis()     trace = pm.sample(5000, step, progressbar=True)     trace = pm.sample(5000, step, progressbar=True)   burnin = 2000  # posterior samples to discard thin = 10  # thinning  pm.autocorrplot(trace[burnin::thin], vars =[mu, kappa])   My question is regarding the autocorrelation. How shall I interpret autocorrelation? Could you please help me to interpret the autocorrelation plot?    It says as the samples gets further from each other the correlation between them reduces. right? Can we use this to plot to find the optimum thinning? Does the thinning affect the posterior samples? after all, what is the use of this plot?


How to round float to one decimal point without using DecimalFormat class in java?

I was reading my old notes and found a question where a number with two decimal point is converted to a single decimal point. I looked around for answer and couldn't find it. I cannot keep it string as I have to return as a float and compare it.  Math.round was rounding it bad and ceil and floor was giving me error.  I came up with this solution.   public class floatRounding{  public static void main(String[] args){   //System.out.println(temperature((float)32.34));  // System.out.println(temperature((float)32.35));   if (temperature((float)32.34)<temperature((float)32.35)){      System.out.println("Here");    } }  public static float temperature(float t){   float newt;   //newt=Math.round(t);    String tem=String.format("%.1f",(t+.009));   newt=Float.parseFloat(tem);   System.out.println(newt);   return newt; } }   Is there a better solution if I am not using decimal format like in this solution   Thanks in advance. Please forgive if its a dumb question.


Problems converting matlab figures to pdf using /psfragfig

I am trying to include MATLAB figures as pdf files in my thesis. However after reinstalling my OS this doesn't work anymore and I am desperately trying to find a solution...  What I do: I use the function matlabfrag.m to export the .fig files to .eps and .tex files. This works perfectly fine. Then I create a temporary .tex file. This file contains the command  \psfragfig{figurename}   which replaces the standart MATLAB font with latex commands formulas etc. specified in the figurename.tex file. This temporary .tex file is then used to create a .pdf file with the command   pdflatex -shell-escape --src -interaction=nonstopmode tempfilename.tex    So far so good. Before I reinstalled my OS everything worked fine. Now I get the Error:     Package pstool Warning: Execution failed during process:     ps2pdf -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImag   eFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dPDFSETTINGS=/prepress "70   00_CFC60_acc_single-pstool.ps" "7000_CFC60_acc_single-pstool.pdf"   This warning occurred on input line 16.      LaTeX Font Info:    Try loading font information for T1+aett on input line 16.   (/usr/share/texlive/texmf-dist/tex/latex/ae/t1aett.fd   File: t1aett.fd 1997/11/16 Font definitions for T1/aett.   )   runsystem(echo "   === pstool: end processing ===   ")...executed.      runsystem(rm -- 7000_CFC60_acc_single2.oldaux)...executed.      [1   Non-PDF special ignored!{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]   (./7000_CFC60_acc_single2.aux)      LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.      )   (\end occurred when \ifx on line 16 was incomplete)    The .ps file looks perfectly alright. As the error suggests the problem must be .ps >> .pdf. I also stripped down the .tex file to a bare minimum, however only encountered other errors. Here is my temporary tempfilename.tex file:  \documentclass[11pt, oneside]{article} \usepackage{graphicx} \usepackage{amsmath} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage{ae} \usepackage{psfrag} \usepackage{color} \usepackage[crop=pdfcrop]{pstool} \pagestyle{empty}  \begin{document}   \begin{figure}       \centering       \psfragfig[width=\textwidth]{7000_CFC60_acc_single}   \end{figure}  \end{document}   I hope someone can help me :)


Gauss brackets with double vertical lines

I would like to have commands for left- and right gauss brackets which have a double vertical line, but otherwise behave exactly like \lfloor and \rfloor. In particular, they should come in various sizes and other things should stay unchanged.  I found two candidates, which are both not optimal, unfortunately:   \llfloor and \rrfloor in the package  stmaryrd. Unfortunately they do not understand preceeding \left and \right commands. My impression is they are fixed size. \lFloor and \rFloor in the package nath. They come in different sizes, but the problem is that including the package nath introduces automatic sizing behaviour of all symbols of parantheses-type. This might be interesting, but for the moment this change is just too radical for my taste.


How can I see what changes malware made to a virtual machine?

I want to know if I can open a virtual machine (VMware , Virtual Box ...) and (for example) install windows 7 + some programs (chrome,Word,antivirus....) and then save the current stat (i don't have any idea how i can) then execute a malware after that i want to know if it's possible to know the modified files and the new registry keys that they've added to the VM (All the modifications) after the first saved stat (just for malware analysis) and then i want to be able to return the VM to the first stat (in some tutorials on youtube i saw them saving the new modification in files like "Virus.VMEM" )  How can i do that on linux (Debian) I've already installed VMware and  I'm ready to install any other tool could help me ?  I know it's difficult but please help with any idea :)


Do I need a license to create pdf files?

I hope this is the correct place where I could ask this question. My mother is an accountant with a degree in economics. She works as a freelancer and she needs some licenses for her job.  The biggest problem is adobe acrobat standard, which costs 400€, quite a lot. I want understand if she must buy it to create pdf files or she can use some free (even for commercial use) programs that she has because of her job (the chamber of commerce provide some advantages to accountants).  She is actually using PDFCreator, which as I can read is free for business usage (open source also!!):   Thanks for any suggestion


Can someone help me prove this. It is a proof of the sum and difference of the greatest common denominator.  Given: x and y are integers with a GCD of 1.   Prove: that the GCD of x + y and x − y is either 1 or 2.


Why is the range of inverse trigonometric functions defined in this way?

My question is really simple, why is the range of the $\sin^{-1}(x)$, $\cos^{-1}(x)$ and $\tan^{-1}(x)$ defined as $[-\pi/2,\pi/2]$, $[0,\pi]$ and $[-\pi/2,\pi/2]$ respectively? Is there some particular reason? We could choose another range for each inverse trigonometric function. For example, we can pick $[0,\pi]$ to be the range of $\sin^{-1}x$.  EDIT  I've understood why the range of the sine and cosine has to be $[-\pi/2,\pi/2]$ and $[0,\pi]$ respectively. I'm still wondering why can't we define the range of the tangent as $[0,\pi]$


A general rule for scaling combat encounters depending on the number of heroes

Let's say I have an adventure, involving four 4-level heroes.  From the CR description I can assume that one CR 4 monster would be a decent challenge for them, in terms of a combat encounter. Can one CR 4 monster be replaced with four CR 1 monsters or two CR 2 monsters? (I guess it doesn't work like that, it is just an example)  And what if my party has only 3 players (and 3 heroes), how can I scale down the encounter? Should it be a CR 3 monster, or (respectively) three CR 1 monsters?


Prove $m=2^n + 1$ then $n$ must be of the form $2^i$ if $m$ is a prime

I need to find the proof of expression given in the title. There are primes of the form $2^2 + 1$, $2^4 + 1$ and so on. So I'm thinking if $m$ is the prime then it must be of the form $m=2^{2^i} + 1$. I probably need more details for the proof.


I am thinking of buying a 3DS when the price drop comes into place in America, however I live in Australia. Will Australian 3DS games work on a North American 3DS?


The impact panel seemed off/different to me lately, and that's because, well, it is.    There's a new Impact panel* and I feel it can use some adjustments.       OLD            NEW    There's all of this extra empty whitespace which looks very odd.  I think we should add back in the horizontal rule and provide a bit more spacing between the edits, flags and votes. (Like the way it was before)  I'm guessing that it's related to the .  *This change was implemented across all sites


Elements that make action potential to conduct quicker?

The texts, online materials describe the velocity of conduction of action potential depends on axon's length and cross sectional area e.g. short length and large diameter decreases the resistance. Myelin sheath increases the speed of conductivity as well.    Can someone explain why chemical synapses allow quicker conduction than regular arrangement of sodium fast channels along the axon? Can regular arrangement of Na channels help in propagation of AP (I guess it's referring to the nodes of Ranvier)? What's the difference between fast sodium channel and a 'normal' sodium channel?  The question is: Of the following, which allows action potentials to conduct quicker? 1. Chemical synapses 2. Regular arrangement of sodium fast channels along the axon 3. Small axon diameter 4. Depolarisation suppression through the majority of the axon's length  I picked 2, but the answer is 1. I want to know the reason behind me being wrong and that being correct. 1 doesn't make sense at all to me. Come to think of it, I see that 4 could be the most relevant.


jQuery setinterval is not working. How to resolve?

jQuery:  $(document).on('mouseover', '.image_slider', function() {     setInterval(slider(this), 10000); }); function slider(that){   console.log(that); }   Anyone can please tell me Why this function is not working and How can I resolve it?


Adding spatial reference to many shapefiles in loop using ArcPy?

AST folder has 5 shapefiles. This code tries to pass the 2100 coordinate system to these shapefiles. But it gives error 999999:  arcpy.env.workspace = r"C:\Users\user\Desktop\roads\AST"  for i in arcpy.ListFeatureClasses():      sr = arcpy.SpatialReference("EPSG:2100")      arcpy.DefineProjection_management(i, sr)   How to make it work?


apt installing more packages than specified as dependencies

I was trying to install texmaker from the repository. For installing the texlive I followed the . For this the control file I used is . It has the file texlive-binaries in it.  Then I tried to install texmaker from apt. It has the dependency listed as   # apt-cache depends texmaker texmaker   Depends: libc6   Depends: libgcc1   Depends: libpoppler-qt4-3   Depends: libqt4-network   Depends: libqt4-xml   Depends: libqtcore4   Depends: libqtgui4   Depends: libqtwebkit4   Depends: libstdc++6   Depends: zlib1g   Depends: texmaker-data   Recommends: aspell   Recommends: ghostscript   Recommends: netpbm   Recommends: psutils     texlive-local   Recommends: texlive-latex-extra     texlive-local  |Recommends: <hunspell-dictionary>     myspell-fr     myspell-ru     hunspell-an     hunspell-ar     hunspell-be     hunspell-da     hunspell-de-at     hunspell-de-at-frami     hunspell-de-ch     hunspell-de-ch-frami     hunspell-de-de     hunspell-de-de-frami     hunspell-en-ca     hunspell-en-us     hunspell-eu-es     hunspell-fr     hunspell-gl-es     hunspell-hu     hunspell-kk     hunspell-ko     hunspell-ne     hunspell-ro     hunspell-ru     hunspell-se     hunspell-sh     hunspell-sr     hunspell-sv-se     hunspell-uz     hunspell-vi     myspell-et     myspell-lv     myspell-pl  |Recommends: <openoffice.org-spellcheck-de-de>     hunspell-de-de     myspell-de-de  |Recommends: <myspell-dictionary>     myspell-de-de-oldspell     myspell-fr     myspell-ru     hunspell-kk     myspell-af     myspell-bg     myspell-ca     myspell-cs     myspell-da     myspell-de-at     myspell-de-ch     myspell-de-de     myspell-en-au     myspell-en-gb     myspell-en-us     myspell-en-za     myspell-eo     myspell-es     myspell-et     myspell-fa     myspell-fi     myspell-fo     myspell-fr-gut     myspell-ga     myspell-gd     myspell-gv     myspell-he     myspell-hr     myspell-hu     myspell-hy     myspell-it     myspell-ku     myspell-lt     myspell-lv     myspell-nb     myspell-nl     myspell-nn     myspell-pl     myspell-pt-br     myspell-pt-pt     myspell-sk     myspell-sl     myspell-sw     myspell-th     myspell-tl     myspell-uk   Recommends: hunspell-en-us   Recommends: asymptote   Recommends: ibus-qt4   But when I tried to install texmaker from apt is shows  # apt-get install texmaker Reading package lists... Done Building dependency tree        Reading state information... Done The following extra packages will be installed:   asymptote asymptote-doc ed freeglut3 ibus-qt4 libgraphite3 libibus-qt1   libptexenc1 libqtwebkit4 libruby1.9.1 libsigsegv2 libyaml-0-2   python-imaging-tk ruby ruby1.9.1 tex-common texlive-binaries texlive-common   texmaker-data   Why is it so?  I had no problem installing tex-studio and texworks.


Getting NullPointerException while testing a java class using PowerMock

I have a junit + powermock test which is giving me NullPointerException after execution.  Error:  Running com.ebayenterprise.publicapi.events.dao.EventLogDaoTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.36 sec <<< FAILURE! - in com.ebayenterprise.publicapi.events.dao.EventLogDaoTest testGetNextEventIdSequence(com.ebayenterprise.publicapi.events.dao.EventLogDaoTest)  Time elapsed: 0.05 sec  <<< ERROR! java.lang.NullPointerException: null     at com.ebayenterprise.publicapi.events.dao.EventLogDaoTest.testGetNextEventIdSequence(EventLogDaoTest.java:27)   EventLogDaoTest.java  public class EventLogDaoTest {      private final DataSource dataSource = Mockito.mock(DataSource.class);     private final PlatformTransactionManager txManager = Mockito.mock(PlatformTransactionManager.class);     private static final long MOCK_EVENT_ID = 1001;     private JdbcTemplate jdbcTemplate;     private EventLogDao eventLogDao;      @Before     public void setup() {         eventLogDao = new EventLogDao(dataSource, txManager);     }      @Test     public void testGetNextEventIdSequence() {         when(jdbcTemplate.queryForLong("select next-seq-value from table")).thenReturn(MOCK_EVENT_ID);         long eventId = eventLogDao.getNextEventIdSequence();         assertTrue(eventId == 1001);     }  }   EventLogDao.java  @Repository public class EventLogDao extends BaseEventLogDao {      public EventLogDao(DataSource dataSource, PlatformTransactionManager transactionManager) {         super(dataSource, transactionManager);     }  }   BaseEventLogDao.java  public abstract class BaseEventLogDao {      protected final JdbcTemplate jdbcTemplate;     protected final PlatformTransactionManager transactionManager;      public BaseEventLogDao(DataSource dataSource, PlatformTransactionManager transactionManager) {         this.jdbcTemplate = new JdbcTemplate(dataSource);         this.transactionManager = transactionManager;     }  public long getNextEventIdSequence() {         long eventIdSeq = jdbcTemplate.queryForLong(SELECT_EVENT_LOG_SEQUENCE_SQL);         System.out.println("eventIdSeq = " + eventIdSeq);         return eventIdSeq;     }  }


I overstayed for 1 day in South Africa and got 'undesirable' but I have to transit through the Johannesburg airport

I have been classified as undesirable in South Africa on September 30 but I have to go through Johannesburg airport on October 18 back from Botswana to Malaysia. Will I be allowed to transit through the country?


Prove by induction that an expression is divisible by 11

Prove, by induction that $2^{3n-1}+5\cdot3^n$ is divisible by $11$ for any even number $n\in\Bbb N$.  I am rather confused by this question. This is my attempt so far:  For $n = 2$ $2^5 + 5\cdot 9 = 77$ $77/11 = 7$ We assume that there is a value $n = k$ such that $2^{3k-1} + 5\cdot 3^k$ is divisible by $11$. We show that it is also divisible by $11$ when $n = k + 2$ $2^{3k+5} + 5\cdot 3^{k+2}$ $32\cdot 2^3k + 5\cdot 9 \cdot3^k$ $32\cdot 2^3k + 45\cdot 3^k$ $64\cdot 2^{3k-1} + 45\cdot 3^k$ (Making both polynomials the same as when $n = k$) $(2^{3k-1} + 5\cdot 3^k) + (63\cdot 2^{3k-1} + 40\cdot 3^k)$  The first group of terms $(2^{3k-1} + 5\cdot 3^k)$ is divisible by $11$ because we have made an assumption that the term is divisible by $11$ when $n=k$. However, the second group is not divisible by $11$. Where did I go wrong?


Update failed. First exception on row 0 with id **********; first error: TEMPLATE_NOT_FOUND,

I am facing the below error Exception Details: Update failed. First exception on row 0 with id *************; first error: TEMPLATE_NOT_FOUND, The record couldn't be saved because it triggered an email alert that failed. Please contact salesforce.com Customer Support.: [] The scenario is that we have a WF Rule on the Invoice object which fires the Email Alert after Registration. The Invoice Template is a VF Page. I researched for it and most of the folks suggest checking the permissions of the fields referenced in the Email template. I do that but still, I am getting the same error. It's the second time I am facing this particular issue. The first time it was resolved by giving permission to a new field added on the Invoice object. But this time it happens suddenly without adding any new field. Please suggest a way to resolve it Thanks.


Generating random number based on random samples

I have a bunch of samples ~500 from a continuous distribution. The objective is to generate new random samples from this distribution. How to approach this problem? Can someone give me a pointer. I am using Python so I got numpy etc.


Question about the proof of $GCH$ holds in $\mathbf L$

I have a question about the proof of the following:     (Lemma 37) Assume $\mathbf V = \mathbf L$, and let $\kappa$ be a cardinal. Then   $\mathcal P (\kappa ) \subseteq L_{\kappa^+}$.   Assume we have proved the following:      (Claim 38) There exists a finite subset $T$ of $ZF + (\mathbf V =  \mathbf L)$ such that whenever $x$ is transitive and $\langle x, \overline{\in} \rangle \models T$ then there exists $\gamma \in  \mathbf{ON}$ such that $x = L_\gamma$.      (Lemma 35) Let $\alpha \in \mathbf{ON}$ and $x, a_0, \dots , a_{k-1}  \in L_\alpha$ and let $\varphi(z, a_0, \dots ,a_{k-1})$ be a formula   of $L_S$. Then there exists a $\beta > \alpha$ such that for every $z  \in x$: $$ \langle L_\beta , \overline{\in} \rangle \models \varphi  [z, a_0 , \dots, a_{k-1}]  \hspace{0.5cm} \text{ iff } \hspace{0.5cm}  \mathbf L \models \varphi [z, a_0 , \dots, a_{k-1}] $$     The proof in the book starts as follows: Suppose $\mathbf V = \mathbf L$ holds, let $\kappa$ be as in the assumptions of lemma 37 and suppose $\kappa \in \mathcal P ( \kappa )$. Fix an ordinal $\alpha > \kappa$ such that $y \in L_\alpha$. Since the theory $T$ of claim 38 is finite we can form the conjunction $\varphi$ of all sentences in $T$.   Question: But what is $T$? I know that it's the theory from claim 38 but it's not clear to me how we can use an unknown theory to prove lemma 37. And why do we take the conjunction over $T$?  Then the proof proceeds: By lemma 35,    Question: How does $\gamma < \kappa^+$ follow from $(2)$?  Many thanks for your help.


I am helping to correct some errors in a game manual not originally written in english. I've come across a bit that I'm not sure what to do with.  The game consists of several 90-minute matches.  My question is whether this is correct or if the line should read:  The game consists of several 90-minutes matches.  I feel like the original version is correct, though I only base this off of the fact that is "sounds" right to me. I've done a bit of searching and found a blog post about something similar . It doesn't provide a definitive answer though.


Electric charge neutrality of the Universe: evidences and theories

I've always wondered why the number of protons in the Universe exactly matches the number of electrons. They are such different particles with totally different cross sections. So, first of all, is this true? And, secondly, how could it be that they have been produced in the same amount after the Big-Bang?


20.04 / Gnome: How to reset all configurations of a user

I have been running Ubuntu for years now with only LTS upgrades. root and /home are separate partitions so I have always kept /home and that served me fine until now. There is only the one user, myself. Since the upgrade to 20.04, there are multiple issues with this user though. Sleep mode is wonky and unreliable, the NVIDIA graphics driver can't be installed since a kernel update, some audio settings don't last beyond a restart. When I create another user, then everything works just fine over there. I strongly suspect that some old config files from way back when are causing me issues, especially since Snaps are a thing. Now, I could of course delete everything, create a whole new user for myself and then play everything back from a backup, which would take hours. Or is there a way to 'rejuvenate' the user settings so that it acts like a fresh system, except my personal files are still there? I have found a way to reset Gnome but apparently the issue lies deeper than that. I would appreciate any suggestions.


What is the difference between these two methods - pass by ref

What is the difference between the code below? Both methods achieve the same output of removing 4 from the list.  static void Main(string[] args) {     var list = new List<int> {1, 2, 3, 4, 5, 6, 7, 8, 9};     ModifyList(ref list);     Console.WriteLine(string.Join(", ", list));      list.Add(4);     ModifyList(list);     Console.WriteLine(string.Join(", ", list));      Console.ReadLine(); }  public static void ModifyList(ref List<int> list) {      list.Remove(4); }  public static void ModifyList(List<int> list) {      list.Remove(4); }


Why JavaScript return me a wrong result in this subtraction of decimals values?

I am pretty new in JavaScript and I have found a very strange situation doing an extremely simple mathematical operation: a subtraction.  So in a jQuery function I have this code:  saldoRicalcolato = finanziamento - variazioneAnticipoNumber;   Where finanziamento and variazioneAnticipoNumber are 2 numbers having decimal digits.  It works almost always good except for some specific values.  You can replicate the strange behavior performing this statement into the FireBug console:  2205.88 - 1103.01 1102.8700000000001   So in this case the result is substantially wrong because I obtain 1102.8700000000001 and not 1102.87 as I expected.   Why? What am I missing? Is it a JavaScript engine bug or something like this? Possible?


What approach for showing custom user fields on a node?

I've added a few custom user fields which users complete when registering.  What is the simplest approach to show these fields when viewing content that user has created?  For example, when viewing a blog entry I can see the 'submitted by..' and their name. I would like to use my custom user fields to expand that summary.  I've got no problem using views, or creating/modifying the theme etc, but I'd like some guidance on the easiest approach before I start out. (It's too easy to hack away on one approach in Drupal when there's a much easier solution!)


Given an integer $a$, suppose $d=\gcd(3a+5,\,5a+7)>2$. Determine $d$.

The only solution that I have been able to come up with is $d=1$, but because $d>2$, I can't seem to figure out how to find a solution.


How to hide (remove) a base class's methods in C#?

The essence of the problem is, given a class hierarchy like this:  class A {     protected void MethodToExpose()     {}      protected void MethodToHide(object param)     {} }  class B : A {     new private void MethodToHide(object param)     {}      protected void NewMethodInB()     {} }  class C : B {     public void DoSomething()     {         base.MethodToHide("the parameter"); // This still calls A.MethodToHide()         base.MethodToExpose(); // This calls A.MethodToExpose(), but that's ok         base.NewMethodInB();     } }   How can I prevent any classes that inherit from class "B" from seeing the method A.MethodToHide()?  In C++, this was easy enough by using a declaration such as class B : private A, but this syntax is not valid in C#.  For those interested (or wondering what I'm really trying to do), what we're trying to do is create a wrapper for for Rhino.Commons.NHRepository that hides the methods we don't want to expose to our group of developers, so we can have a cookie-cutter way of developing our app that new developers can easily follow.  So yes, I believe the "Is-A" test is valid for the whole chain (WidgetRepository Is-A BaseRepository Is-A NHRepository).  Edit:  I should have mentioned, for the sake of argument, that class A is an API class outside of our control.  Otherwise the problem gets considerably easier.


The additive group $\mathbb{G}_a$ over an infinite field $k$ is not a topological group

An algebraic group is not necessarily a topological group, since for an algebraic group, the product map $G \times G \to G$ is continuous when $G \times G$ is given the Zariski topology, which is finer than the product topology.   So does this tell you that the additive group $\mathbb{G}_a$ over an infinite field $k$ is not a topological group? The underlying variety of $\mathbb{G}_a \times \mathbb{G}_a$ is $\mathbb{A}_k^1 \times_k \mathbb{A}_k^1 = \mathbb{A}_k^2$, whose Zariski topology is the cofinite topology, where every open set is also open in the product topology (since $\mathbb{A}_k^1$ also has the Zariski topology).


Does a unused HDD have a longer lifetime than a used one?

Does a HDD lying in my desk degrade with age (or is its service life driven only by usage)?  If yes, are there publicly available statistics relating to any drive degradation when inactive for long periods, or engineering principles from which reliable estimates could be derived?


Is there a mass spectrometer software that can measure the mass of a hydrogen atom

For a school project I need to measure the mass of a hydrogen atom either as a lab experiment or with a computer simulation. Since I don't have the appropriate equipment for the experiment, does anyone know a mass spectrometer software that can find the mass of a hydrogen atom?  Thanks.


I'm writing a code and I display to the user a table with data from DB. The user can copy all the data manually, but I want to add a button that copy automatically the data to clipboard. How can I do this? Thanks!


What makes metal change its color during heating?

What happens on atomic and molecular level?  Is this true also for non-metals and metalloids?


I am new to Ubuntu. What is desktop environments, and how do I install them? I tried to install Gnome using Terminal but I couldn't.


Yesterday I downloaded El Capitan partly via the Appstore. I didn't have the time to finish the installation, so I cancelled the download. Today I want to resume, but the download buttons don't work, and in the update tab I see "waiting..." and a pause button that is greyed out. I restarted and tried again, but nothing changed.  Is there a way to reset this installation or to resume it?


Python 2.7- Subtracting two decimals (4.3 and 2.7) but not getting a specific answer

When I subtract 4.7 from 2.3, I get a number with 16 decimal places, instead of getting a specific number with one decimal place. How come it doesn't give you a specific answer?


finite set of countable sets is countable

I am trying to solve this using Hilbert's paradox.  Say I have a collection of countable sets: $A_1,...,A_n$.  I want to show that there is a bijective function from then union, $A=\cup{A_i}, 1\leq i\leq k$  to $\mathbb{N}$.  I'm thinking to map the elements from each  ${A_i}, 1\leq i\leq k-1$  to a prime number $p_i$ raised to a power according to the element's order in its group  ${A_i}$ (which can be ordered, since it's countable), and then use elements from group  ${A_k}$ to fill in the "gaps" in $\mathbb{N}$.  But then I have a problem with elements from ${A_k}$ whose image is a power of the prime numbers $p_1,...,p_k-1$ which I've used before. I could map them to powers of the prime $p_k$ but then I have the same problem with other elements whose image is a power of $p_k$...  How may I solve this problem (or maybe my approach is incorrect)?


What does this depiction of a black hole in the movie Interstellar mean?

I was expecting a whirlpool in 3D and the matter glowing from friction as it nears the center, as I expected a event horizon to be negligible visually.  How does this depiction work? How big is the central sphere? I am puzzled by the perpendicular circles. Are they the event horizons if they are both visible? What would be a path of a particle as it gets swallowed into the singularity?


I have been trying to install vlc media player on ubuntu 16.04 LTS but keep facing this problem.Can anyone suggest me something?

sudo apt-get install vlc Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  mysql-server : Depends: mysql-server-5.7 but it is not going to be installed  vlc : Depends: vlc-nox (= 2.2.2-5ubuntu0.16.04.4) but it is not going to be installed        Depends: libqt5x11extras5 (>= 5.1.0) but it is not going to be installed        Depends: libsdl-image1.2 (>= 1.2.10) but it is not going to be installed        Depends: libva-drm1 (>= 1.1.0) but it is not going to be installed        Depends: libva-x11-1 (>= 1.0.3) but it is not going to be installed        Depends: libvlccore8 (>= 2.2.0) but it is not going to be installed        Depends: libxcb-composite0 but it is not going to be installed        Depends: libxcb-xv0 (>= 1.2) but it is not going to be installed        Recommends: vlc-plugin-notify (= 2.2.2-5ubuntu0.16.04.4) but it is not going to be installed        Recommends: vlc-plugin-samba (= 2.2.2-5ubuntu0.16.04.4) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Interpreting steep histogram, fitting distribution

I'm trying  to fit the distribution to the data. I started with histogram. Note that y axis is in logarithmic scale since the histogram is very steep.   (source: )    How should proceed to find actual distribution. Should I modify my data first? Any guesses what could the actual distribution be?


Function field $K(C)$ isomorphic to $K(t)$

Let $C$ be a curve in $\mathbb{P}^2$ over a field $K$ defined by an equation of the form $f: y^2 - x^3 - ax^2$ with $a \in K$.  I want to show that the function field of $C$ is isomorphic to $K(t)$.  The function field $K(C)$ is the fraction field of $K[C] = K[x,y]/(f)$.   Since we're quotienting by $f$, I think that every $g \in K(C)$ can be written as $a(x) + b(x)y$, where $a,b \in K(x)$. Therefore $K(C) \cong K(x)[y]/(f)$. (This coincides so far with a comment on a similar question .)  However, I don't know how to get the last part.  Is there an obvious isomorphism I'm overlooking, or do I have to use the equation of the curve somewhere explicitly? (I've shown that there exists a singular point on $C$, but I don't see any use of this fact.)


Adding button zoom to map using OpenLayers 3?

I am a beginner in web programming using OpenLayers 3.   In my project i want to add a button to zoom in the map by clicking or selecting a part in the map using OpenLayers 3.


If $f'(x)\not = 1$ for all real numbers $x$, then $f$ has at most one fixed point

A number $a$ is called a fixed point of a function $f$ if $f(a)=a$.Prove that if $f'(x)\not = 1$ for all real numbers $x$, then $f$ has at most one fixed point.   This is an exercise in Stewart's calculus textbook. Do we need to suppose $f$ is continuous? Or the assumption, $f'(x) \not = 1$ for all real numbers $x$, guarantees that $f$ is continuous? What if $f'$ is not defined at some points? For example, when $f$ is an increasing piecewise function which has infinitely many intersections with the line $y=x$, $f$ has infinitely many fixed points and $f'(x) \not =1$ for all real $x$.


Finding "optional codes" using apt-get (17.10)

I want to install code that has optional support code. In prior versions of Ubuntu, I could view those support code options in a software installer app, like the Ubuntu Software app available now - but more general.   I have Canonical Partners checked in Software & Updates, but cannot find several codes I want; e.g., gfortran, paraview, vmtools . . .   So, if I want to install a code using "sudo apt-get install paraview" (say), is there a way to get a list of support codes (oe code options) for the target code? (paraview, paraview-dev, paraview-doc,paraview-python, libxdmf3 . . . )  I can get a list using apt-cache search, but I don't know how to install what code(s) I want.   Thanks, Tim


Portable installed ubuntu on a Pendrive that boots on UEFI and BIOS

There seem to be quite few tutorials for that but they are either for having both live and installed, or supporting old 32 bit systems and so on and have some complicated steps. I simply want to install it on a USB drive like I would install it on a HDD and have it boot on both UEFI (my macbook pro) and BIOS systems (desktop PCs).  I just tried that by booting from live install pendrive and installing to the other, but since the laptop had HDD with its own install, the installation process was offering to install on just that. When I choosed to do something else from the install, and selected the usb drive, it installed it but didn't work. I have no idea how to create the necessary partitions on my own, so that might be the reason. So, is there an easy way to do this since i'm really unexperienced?


Help me find the name of a space TV show from the early '90s

I don't recall much about the show, and I think I only ever saw one episode, and my Google Fu is not up to snuff today.  The episode, most likely the pilot, came out around the same time as Babylon 5 and then just disappeared.  From what I remember the show was about the (small) crew of a ship. The cockpit of the ship was a upright bed-like contraption, and the cast were investigating a ship that had a radiation leak or something adrift in space.  There was a cast member who could shape-shift, similar to Odo from Deep Space 9, and another member was a barbaric warrior.  There was some sort of mystic stuff, but I may be confusing that with Babylon 5.  Overall the show was very similar, in my memory, to Deep Space 9 and Babylon 5 so I may be confusing things, but I do remember how I saw the similarities in the show to those shows and knew it wasn't the same show.  Any help?


How can I get an Ubuntu 15.10 (Wily) Beta1 installer (if I'm ready to test it)?

Although Ubuntu 15.10 (Wily) Beta1 has been , I can't see a stand-alone image that I can try to install.  (I'm in particular interested in using ; therefore just  from an already installed system is not suitable for me.)


Do children have an alignment in Pathfinder?

Do Young monsters or humanoids (or babies) have a different alignment to adult versions of those monsters/humanoids/babies?  Do they have an alignment at all?  Are they capable of having a non-neutral alignment?


I have a formula in a cell which counts the values in 2 other cells. Normally, after entering in the values in these 2 other cells, the formula cell updates automatically when Enter is pressed or when the cells are clicked out of.  However, for some reason, the value calculated by the formula does not update automatically. I am having to click on the formula bar, then I have to click enter for the formula cell to do its thing.  Why is this happening?


What is the "best LaTeX practices" for writing equations with multiple steps?  Feel free to recommend packages that might help.  Do these methods work just as well within an enumeration?  Here is what I currently do:  \documentclass{article}  \begin{document}  \begin{enumerate}  \item Using the previous property, $|\mathbf{x} + \mathbf{y}|^2$  \( = (\mathbf{x} \cdot \mathbf{y}) \cdot (\mathbf{x} \cdot \mathbf{y}) \)  \( = \sum_{i=1}^k (x_i + y_i)(x_i + y_i) \) (by the definition of inner product  \( = \sum_{i=1}^k (x_i^2 + 2 x_i^{} y_i^{} + y_i^2) \)  \( = \mathbf{x} \cdot \mathbf{x} + 2 \mathbf{x} \cdot \mathbf{y} + \mathbf{y} \cdot \mathbf{y} \)  \( \leq |\mathbf{x} \cdot \mathbf{x}| + 2 |\mathbf{x} \mathbf{y}| + |\mathbf{y} \cdot \mathbf{y}| \)  \( \leq |\mathbf{x}| |\mathbf{x}| + 2 |\mathbf{x}| |\mathbf{y}| + |\mathbf{y}| |\mathbf{y}| \) (by Property 4)  \( = (|\mathbf{x}| + |\mathbf{y}|)^2, \)  and since both sides are $\geq 0$, we can take the square root.  \end{enumerate}  \end{document}   The main problem is that, because of the enumerate environment, I can't indent each step of the equality, so that first term looks sort of separate...


How do i make the icon show correctly on the desktop icon

I made a desktop link by creating a link in the desktop folder, which thin is displayed on the desktop. i selected the icon which then is correctly shown on the link in the folder but not on the desktop icon, even though the properties show it. (see pic) what do i need to add / change?


setworldspawn is not spawning players to the exact place

I am trying to make a Minecraft map but I can't set the world spawn. I did /setworldspawn then /kill and I ended up 10 blocks away then I tried again I was still 5 blocks away.   In the map it needs to keep updating your spawn point and having it not not working correctly is not an option. In one case I set the spawn, and then ended up in the next level of my map, which is clearly not intended.


Hide a launching minimized app icon from taskbar

I need to hide an app icon when it starts minimized from the taskbar, for example when you start a program minimized, how can you hide the app from the taskbar? Im not talking about tray icons on the right side with the ^, I'm talking about TASKBAR in the middle.


Is it correct to say : "What is the John's car's color ?" ? As non native speaker, this sentence seems weird to me. Would I say : "What is the color of the John's car ?"


Can the front page say if Community edited something or bumped it?

The  periodically bumps unanswered all posts (or something like that).  The annoying this with this is that it says that the question was Modified by Community. I look for what it modified and can't find anything. Then I realized that it was probably just bumped.  Can it just say "Bumped by Community" instead of "Edited by Community"?


Add top link on the bottom only on Mobile

I request a top ( ^ ) link to be available on the bottom (near paging links) only  on Mobile site. It will be used when scroll down until last question in page. It'll be useful mainly when loading 50 per page. This isn't a duplicate for  which is about adding it to left navigation bar This isn't an exact duplicate for  which is about adding it on browser, becauase my main issue is on mobile browsing


How to combine multiple commands in terminal?

I have the following commands.  cd import zcat urls1.sql.gz | mysql -u root -p urls cd /var/www/project1/ nano 1.php   As of now I'm executing it one by one.  Is there a way to combine those commands in one line?


Do Atmega328 chips have pseudo-unique IDs?

I'd like a couple of Atmega328s to run the same program, but they're going to interface with each other and need unique IDs. Is there any such ID or serial number hard-coded on the chip?


Does the Enterprise D advance into different galaxies more than once?

In the TNG episode "" the Enterprise-D enters another galaxy.  Does she ever go to another galaxy a second time?  Why am I aksing such a absurd question? The spoken opening text of TNG is quite different in the German translation. Translated back to English it goes something like:  Space - infinite vastnesses. We are in a distant future. These are the adventures of the new starship Enterprise, which is many light-years away from earth on its way, to discover new worlds, unknown lifeforms and new civilisations. The Enterprise thereby advances to galaxies, that no man has seen before.  Obviously the guy who did the German translation didn't know much about Star Trek, since travelling to other galaxies is, if at all, only a very minor part of what the series is about. But I grew up with this sentence and it made me wonder: Does the Enterprise D advance into galaxies where no-one (that is: no human) has been before? I already know of one example, where the Enterprise D entered another galaxy. But that's singular, while the opening text talks about galaxies (plural). Is there another example of the Enterprise D going to another galaxy, or is the German translation of the opening text not only misleading but plainly wrong about that?  For completeness, here is the original opening text:  Space: the final frontier. These are the voyages of the starship Enterprise. Its continuing mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no one has gone before.  And here is the untranslated German opening text:  Der Weltraum, unendliche Weiten. Wir befinden uns in einer fernen Zukunft. Dies sind die Abenteuer des neuen Raumschiffs Enterprise, das viele Lichtjahre von der Erde entfernt unterwegs ist, um fremde Welten zu entdecken, unbekannte Lebensformen und neue Zivilisationen. Die Enterprise dringt dabei in Galaxien vor, die nie ein Mensch zuvor gesehen hat.  (emphasis added)