I need a GeoJSON file that simply has the coordinates of the polygons for the boundaries of the provinces of Canada. I have a GeoJSON file but it has multipolygons and my software does not support multipolygons. How can I convert the multipolygons to simple polygons? Of course, if the geometry of the province consists of disconnected regions with pieces of other provinces in the interior of a given province, then it wouldn't make sense to try to convert it to a single polygon. However, I am not aware of Canadian provinces having pieces of other provinces in their interior. I have seen posts with what looks like SQL server code; I don't know what application they are using. I do not have SQL server on my machine.

I see a lot of questions going from Polygons to MultiPolygon, but is there some easy way to go the other way around? It would also be useful to preserve the attributes from the MultiPolygon to apply to the new Polygons.


Is it somehow possible to get better audio quality sound when Bluetooth headphones are on hands-free mode?  When it is audio only, sound quality is good (16-bit 44 kHz) but when I talk through the microphone, audio quality is changed to poor (16-bit 8 kHz) like an old radio. Or I do not hear something through headphones. I have Creative Sound Blaster Jam.  Simple, have set Bluetooth Audio Renderer (Bluetooth stereo audio), for playing, with Bluetooth Audio Input Device (Bluetooth Hands-free audio), for recording?

I have a Plantronics BackBeat Sense SE bluetooth headset. When Connecting it to Windows 10, it installs two profiles in Playback devices list:    PLT_BBTSENSE Hands-Free. PLT_BBTSENSE Stereo.   The Second one (Stereo) is set to be the "Default Device" and the "Default Communication Device" on the system.   At this point the sound works great and normally. The problem happens when I want to use the mic. When I start any program that uses the mic (recorder, chat, VoIP Calls, gaming, etc.) The sound suddenly stops working And I can only use the mic until I stop the recorder or the call.   The thing that kind of fixes the problem is setting the (Hands-Free) as the default device. I can hear the sound when I do that and it works with the mic but it becomes Very bad quality.  What I became to understand is that bluetooth had different profiles for sound and mic: A2DP and HSP. The first handle the voice(High Quality) but the latter handles the mic and reduces the sound quality.  Is this really the case? Is there anyway to make them work simultaneously? Is there any solution to this problem at all?


I have a problem : How to prove $$\dfrac{d}{dx}e^x=e^x\;?$$  My answer is \begin{eqnarray} \dfrac{d}{dx}e^x&=&\lim\limits_{h\to 0}\dfrac{e^{x+h}-e^x}{h}\\ &=&\lim\limits_{h\to 0}\dfrac{e^{x}e^h-e^x}{h}\\ &=&e^{x}\lim\limits_{h\to 0}\dfrac{e^h-1}{h}\\ \end{eqnarray} But I don't know to find $\lim\limits_{h\to 0}\dfrac{e^h-1}{h}$. So how to find it?  Note:  I cannot use L'Hospital rule.

I was messing around with the definition of the derivative, trying to work out the formulas for the common functions using limits. I hit a roadblock, however, while trying to find the derivative of $e^x$. The process went something like this:  $$\begin{align} (e^x)' &= \lim_{h \to 0} \frac{e^{x+h}-e^x}{h} \\ &= \lim_{h \to 0} \frac{e^xe^h-e^x}{h} \\ &= \lim_{h \to 0} e^x\frac{e^{h}-1}{h} \\ &= e^x \lim_{h \to 0}\frac{e^h-1}{h} \end{align} $$  I can show that $\lim_{h\to 0} \frac{e^h-1}{h} = 1$ using L'Hôpital's, but it kind of defeats the purpose of working out the derivative, so I want to prove it in some other way. I've been trying, but I can't work anything out. Could someone give a hint?


Have a look at following code:  #include<stdio.h>  struct Node {   int data;   struct Node* nxt; };  int main() {     int a = sizeof(struct Node);     int b = sizeof(int);     int c = sizeof(int*);      printf("size of Node: %d\nsize of int: %d\nsize of int*: %d",a,b,c);      return 0; }   following is output of above code:  size of Node: 16 size of int: 4 size of int*: 8   my question is size of integer is 4 byte and size of integer pointer is 8 byte. So sum of these 2 should be size of struct.  But why compiler (GCC) says it occupies 16 bytes?

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I understand some set $X$ is countable if one can define a bijection between it and the set of natural numbers. In notation, is $f:X\rightarrow\Bbb{N}$ permissible, or must one write $f:\Bbb{N}\rightarrow X$? Or does this not matter? I find the latter notation more intuitive.

Using the fact that for any $A$, $A$ is countably infinite if there exists a bijection $f: A \rightarrow \mathbb{N}$, how do I prove the statement:  $A$ is countably infinite if and only if $\exists$ bijection $f: \mathbb{N} \rightarrow A$?


In older versions iTunes played automatically the entire songs in an albume when I selected and pressed the play button. Now it only plays the first song then stops. What do I need to do to play the whole album?

I noticed that a few tracks from an album appear gray.    The tracks are downloaded, I can play them if I double click them explicitly, but they don't play as part of the album. If I click the album's "play" button, they're skipped (1 gets played, then 3, then 4, etc.)  Why is this happening and how can I prevent it?    I saw a similar question, , but that's not what I'm experiencing — for me, the songs do get downloaded and everything appears to be OK, they just get skipped when playing the album.


Haven't seen this kind of error on askubuntu yet.  Did everything as it says here:   After sudo ./AdobeAIRInstaller.bin shows this image: dropbox.com/s/wg6cv03h5n1tqgr/adobe_air.png  Meanwhile terminal shows a bunch of such messages:  (setup:2579): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",   Nothing is installed. Those murrine - it showed another code before ( another than setup:2579) - I googled it, installed something, it showed another code - I googled it, installed something, etc. Doesn't seem to affect installation anyhow.

I am a heavy user of certain applications that are built on AIR.   It appears that AIR has discontinued support for Linux. Even the older versions in the Adobe AIR Archives seem to support only 32 bit Linux distributions and I am on 64 bit currently.  Is there even a slight possibility that I could run AIR in these conditions? If so, can you please tell me where can I get a detailed step by step installation for this?


"Let $R$ be a Unique Factorization Domain and $(a,b)=(c)$ for $a,b,c \in R$. Show that $R$ is a Principal Ideal domain."  To be honest I found this very hard, here is my naive try:  Lets assume $R$ is a Unique Factorization Domain and $(a,b)=(c)$ $\Rightarrow c$ is gct of $a$ and $b$ then $\Rightarrow (b)\subseteq (c)$ and $(a)\subseteq (c)$ . Since this is true for every pair of Elements of $R$ we can construct a series $(a_1) \subseteq (a_2)\subseteq (a_3) ... \subseteq(a_n)$ in $R$. Because $R$ is a Unique Factorization Domain there is a $N$ with $a_N \in R$ and $(a_i)=(a_N)$ for $i \geq N$.  Let $I$ be an Ideal but not a Principal Ideal, so $I=(d,e,f,...z)$ with $d,e,f,...z \in R$. Then $I= r_1 \cdot d + r_2 \cdot e + r_3 \cdot f ... r_j \cdot z$ for all $r_i \in R$. But because $d,e,f,...z \in R$ and $(d),(e),(f),...,(z) \in (a_N)$, so $d,e,f,...z \in (a_N)$ so there are $\alpha, \beta, ..., \omega $ so that $d=\alpha \cdot a_N$, $e=\beta \cdot a_N$,..., $z=\omega \cdot a_N$. This means:  $$ \begin{align*} I &= r_1 \cdot d + r_2 \cdot e + r_3 \cdot f \ldots r_j \cdot z \\ &= r_1 \cdot \alpha \cdot a_N + r_2 \cdot  \beta \cdot a_N + \ldots r_j \cdot \omega \cdot a_N \\ &= a_N(r_1 \cdot \alpha + r_2 \cdot  \beta \cdot + \ldots r_j \cdot \omega) \in (a_N) \end{align*} $$  I know that I am wrong somewhere, but I don't really know how to show it. Maybe there is a way to show that $R$ is an Euclidean Ring?

I am looking for a reference which has a self-contained (elementary, that is, at the "undergraduate algebra level") proof of the the fact that any one-dimensional Noetherian UFD is a PID. Does anyone know such a reference?   (Note: I have looked at the similar questions on this website but don't find them particularly useful).


I have been feeling lately that there are a lot of trigger happy people on SO. Everyone is eager to click on the downvote button rather than leaving comments to improve QnA or justify their downvotes. I guess some people have taken this as a habit.  I am not sure but I wonder if it would be better to make it mandatory for members to leave a comment for downvotes. In that case, if the reason for downvoting is also downvoted, the downvote by this individual should be lifted.  I am not sure how it works, but lately any question that I ask, everyone talks about providing a working example and are ready to close vote or downvote the question, though I try to provide the context and a code snippet. I don't think this should be a criteria for downvoting.   I am just getting so frustrated people bringing down other people's reputation on SO for small issues which can be requested as clarification in comments section.  For e.g. if I am asking a question about a 3rd party control in used in Delphi, it is not possible for me to provide a working example for me as I am a .Net guy and I do not have a license for the TPA.   I might even get a downvote for asking this question. I am hesitant to ask questions now on SO.  Anyways, please explain your downvotes.

Possible Duplicate:    OK, I've just got downvoted for an answer that was previously upvoted. I'm pretty sure my answer wasn't the best, yet not the worst. It was also not a subjective question and I got a little upset because... One of the reasons I'm participating on discussion forums or hybrids like StackOverflow is that I want to get some feedback for what (I think) I know. But, there are occasions in here where you have no idea why your response was bad and thus downvoted. I mean, a question is not about who gives the best answer, it is about learning from each other. If you downvote me, give me a reason for it. Don't be a coward or a selfish person that keeps all the knowledge for himself. I've been searching on uservoice and any proposal to enforce some feedback when downvoting was rejected so I believe giving feedback for a downvote should be basic netiquette in here. If the system can't enforce it the we should rely on common sense. So... When you downvote, please give feedback:  Say, "Hey, I downvoted you. It was me, ok? Now you know." Say, "Hey, -1 because you said that." Say, "Hey, that what you said is actually the other, -1"  It's not that funny to offer free consultation letting ghosts assess your knowledge. I'm doing this for free so I expect this to be a fair trade by receiving real feedback for free. I'm also convinced I'm not the only one having this problem, so please share your opinions. Edit: I'm a little bit shocked. Within a minute after posting this "question" some people downvoted almost all of my questions (no subjective questions and I may say pretty hard to answer). So, some people are very touchy today although I didn't point the finger at anyone... I wouldn't have believed this could happen.


Im not sure how to print this statement every minute, or a certain time limit. I wanted to search about it online but I thought people on SO were more relevant.  I have no idea in what to do lol  import time while True:      print("This prints once a minute.")      time.sleep   I want it to print every second or minute

I want to repeatedly execute a function in Python every 60 seconds forever (just like an  in Objective C). This code will run as a daemon and is effectively like calling the python script every minute using a cron, but without requiring that to be set up by the user.  In , the solution appears to effectively just  for x seconds. I don't need such advanced functionality so perhaps something like this would work  while True:     # Code executed here     time.sleep(60)   Are there any foreseeable problems with this code?


I want to use linear regression to predict a continuous int variable using some continuous int predictors and some categorical predictors.The categorical column is not ordered.Consider toy data as:  a <- sample(1000:10000000,60 , replace = T) b <- sample(1:90 , 60 , replace = T) c <- c("a#" , "b$" , "c*" ,"d@") c <- rep(c,15) d <- sample(1000000:10000000 , 60 , replace = T) data1 <- as.data.frame(a,b,c,d) head(data1)  #I want column a , b , d to be numeric,I don't know why they are'nt so: data1$a <- as.numeric(data1$a) data1$b <- as.numeric(data1$b) data1$d <- as.numeric(data1$d)  #since predictor c is categorical i use factor() myformula <- d ~ a + b + factor(c)  data1.glm <- glm(myformula , family = gaussian("identity") , data=data1)  summary(data1.glm)  Call: glm(formula = myformula, family = gaussian("identity"), data = data1)  Deviance Residuals:   Min       1Q   Median       3Q      Max   -30.150  -11.637   -0.127   13.564   35.662     Coefficients:         Estimate Std. Error t value Pr(>|t|)     (Intercept) 24.17925    7.91775   3.054   0.0035 **   a            0.16155    0.13370   1.208   0.2322      b            0.09038    0.20147   0.449   0.6555      factor(c)b$ -8.09679    6.78098  -1.194   0.2377      factor(c)c*  3.16806    6.36775   0.498   0.6208      factor(c)d@  2.12224    6.75855   0.314   0.7547      ---   Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    (Dispersion parameter for gaussian family taken to be 302.7604)    Null deviance: 17995  on 59  degrees of freedom   Residual deviance: 16349  on 54  degrees of freedom   AIC: 520.73    Number of Fisher Scoring iterations: 2   I have some questions regardless of the P_Value amount(It's a toy data not my exact data)  1)Have I Done the regression correctly? 2)I can't find the coefficient for a# level in c column. even with the code bellow:    View(as.data.frame(data1.glm$coefficients))   3)What do the coefficients for categorical predictor exactly mean?I mean if i want to check the response(d column) when (a ,b, c) are respectively (20,2, b$) ,Is it correct to use the code bellow ?   x <- 20*.16154566 + 24.17924999 + 2*.09037666 - 8.09679131

I will give my examples with R calls. First a simple example of a linear regression with a dependent variable 'lifespan', and two continuous explanatory variables.  data.frame(height=runif(4000,160,200))->human.life human.life$weight=runif(4000,50,120) human.life$lifespan=sample(45:90,4000,replace=TRUE) summary(lm(lifespan~1+height+weight,data=human.life))  Call: lm(formula = lifespan ~ 1 + height + weight, data = human.life)  Residuals: Min       1Q   Median       3Q      Max  -23.0257 -11.9124  -0.0565  11.3755  23.8591   Coefficients:              Estimate Std. Error t value Pr(>|t|)     (Intercept) 63.635709   3.486426  18.252   <2e-16 *** height       0.007485   0.018665   0.401   0.6884     weight       0.024544   0.010428   2.354   0.0186 *   --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   Residual standard error: 13.41 on 3997 degrees of freedom Multiple R-squared: 0.001425,   Adjusted R-squared: 0.0009257  F-statistic: 2.853 on 2 and 3997 DF,  p-value: 0.05781   In order to find the estimate of 'lifespan' when the value of 'weight' is 1, I add (Intercept)+height=63.64319  Now what if I have a similar data frame, but one where one of the explanatory variables is categorical?  data.frame(animal=rep(c("dog","fox","pig","wolf"),1000))->animal.life animal.life$weight=runif(4000,8,50) animal.life$lifespan=sample(1:10,replace=TRUE) summary(lm(lifespan~1+animal+weight,data=animal.life))  Call: lm(formula = lifespan ~ 1 + animal + weight, data = animal.life)  Residuals: Min      1Q  Median      3Q     Max  -4.7677 -2.7796 -0.1025  3.1972  4.3691   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept) 5.565556   0.145851  38.159  < 2e-16 *** animalfox   0.806634   0.131198   6.148  8.6e-10 *** animalpig   0.010635   0.131259   0.081   0.9354     animalwolf  0.806650   0.131198   6.148  8.6e-10 *** weight      0.007946   0.003815   2.083   0.0373 *   --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   Residual standard error: 2.933 on 3995 degrees of freedom Multiple R-squared: 0.01933,    Adjusted R-squared: 0.01835  F-statistic: 19.69 on 4 and 3995 DF,  p-value: 4.625e-16   In this case, to find the estimate of 'lifespan' when the value of 'weight' is 1, should I add each of the coefficients for 'animal' to the intercept: (Intercept)+animalfox+animalpig+animalwolf? Or what is the proper way to do this?  Thanks Sverre


I have to harden a Linux desktop as an assignment in my college. But I got stuck at a specific problem: I have to control the outgoing traffic with iptables.  It should be possible to prevent a specific application (like LibreOffice) to access the internet. My professor said "look for the 'match' option". But I can't figure out how to do it. I thought of setting a rule which drops all packets of a specific group id with the -m owner --owner-gid option. But how can I configure my applications to run under this particular group? Or is this just the wrong way to do it?  The OS is Debian 7.

Is it possible to block the (outgoing) network access of a single process?


I'm trying to install Windows as a dual-boot on an Asus P8H67-V (Socket 1155) PC running Elementary OS (Debian).  Here's my configuration:   Intel Core I5-2500K Samsung 840 Pro SSD   This previously had Windows 7 x64 installed. I've cleaned it; now I'm trying to install Windows on it from scratch.  Samsung 850 Evo SSD   This is where I have Elementary OS installed.  Multiple WD Red (≥ 2 TB) 2 × Zotac GeForce GTX 660 BIOS set to AHCI for boot   I consider switching back to IDE in BIOS not to be an option.    I'm trying to install Windows by booting from the following devices:   External DVD/BR Drive using a verified Win7_x64 Disc (this has worked on other machines) Samsung USB Stick (128 GB, 8 GB Partition for Win10_x64)   I get this error message:  Load Driver  A required CD/DVD drive device driver is missing. If you have a driver floppy disk, CD, DVD, or USB flash drive, please insert it now.  Note: If the Windows installation media is in the CD/DVD drive, you can safely remove it for this step   This message appeared for Windows 10 and Windows 7.  The installers boot like a charm, as does Elementary OS.  I have tried:   Using both a USB 3 port and a USB 2 port. No success over here. Somehow I was able to boot both devices in IDE Mode – still it wouldn't let me install... Same message. Assuming that it has something to do with AHCI instead of IDE in SATA Mode inside BIOS Configuration, I downloaded AHCI Drivers from Intel (chipset manufacturer) and ASUS (motherboard manufacturer) but none of them worked. The drivers were shown as applicable for the hardware (Windows 10 Setup), but I was still not able to continue the setup process.   Question:   Is there a possibility to determine which exact driver is missing? The error message is not what I would call conclusive as it does not really state more than "It's not working, I don't know why." Is there something I missed? Any other drivers to try? Any preparation for the Samsung 840 needed I missed?

I have an Asus R500VD laptop which came with the preinstalled Windows 8. As actually this computer will be used by my grandmother (and she's only using win 7) I'd like to downgrade it.  Thanks to other thread here, I was able to successfully boot computer from Windows 7 USB stick, but unfortunately during install I got a message:  A required CD/DVD drive device driver is missing. (...)   and I can't get pass it... This is what I've done:   I've downloaded all drivers from Asus Website (), unzip and copied to visible location for windows 7 installation - I've picked each one of them, none has helped. As I belive it's some kind of problem with SATA/RAID/AHCI drivers I went to Intel site and downloaded various "Intel Rapid Storage Technology" drivers - a lot of them were recognized by win7, but none of them helped.   Does anyone have an idea what can I do next? Any help would be really appreciated.


I have been stuck on this problem and am not quite sure where to begin. Based on my readings I am aware an analytic function exists, but I am not sure how that is derived. How would one go about showing the two spaces are homeomorphic?

I already asked a question here  I am trying to prove that $\mathbb{R}^2 \cong  \{(x,y)\in \mathbb{R}^2|x^2+y^2<1\}$ The function that apparently solves this is $$f(z)=\frac{z}{||z||+1}$$ for $z\in \mathbb{R}^2$.  In order to show this, I need to prove that $f$ is a continuous bijection. Continuity is obvious, but I see no reason why this is a bijection-- I also see no reason why it should have a continuous inverse. Can someone explain this to me/point me in the right direction? Thanks


I am trying to center a table within a div but the table can be of varying length. The code looks something like this:  <div>      <table>      <tr> .... </tr>      </table> </div>   The div element is of course display:block and of course takes up the entire horizontal space on the page but I cannot figure out how to set the padding to auto and just center the table in the div  Can anybody help me with this?

I want to show a table of fixed width at the center of browser window. Now I use  <table width="200" align="center">    But Visual Studio 2008 gives warning on this line:  Attribute 'align' is considered outdated. A newer construct is recommended.  What CSS style should I apply to the table to obtain the same layout?


I want to know about the disadvantages of starting a website with a .company TLD instead of .com, .net and the like. I've read some opinions suggesting not to use it because of SEO but there were no further explanation, can anyone explain the disadvantages ?

I've noticed .com is the standard top-level domain, but when should I not use .com? What are the most common alternatives? If someone has foo.com registered, should I choose a different domain or register foo.somethingelse?


I´m looking for a book with the proof of the result that says the associated Lie algebra of a Lie group $G$, let be $G_{Lie}$, is isomorphic to the tangent space $T_e(G)$, where $e \in G$ is the neutral element.  Let me said the chapter or theorem, not only the book, please.  Thank you all

Define the Lie algebra $\mathfrak{g}$ of a Lie group G to be the set of all left-invariant vector fields of $G$. I want to prove that   $$          f: \mathfrak{g} \rightarrow T_eG \\              X \mapsto X(e) $$ is a linear isomorphism.  The only thing that I have left to prove is surjectivity.Letting $v\in T_eG$, we set $X\in \mathcal{X}(G)$ such that $\forall x\in G,\,X(x)=L_{x_{*,e}}(v)$ (I still have to show that such an $X$ is indeed a vector field on $G$). We get that  $$ f(X)=X(e)=L_{e_{*,e}}(v)=v $$  where the last equality holds because  $$       L_{e_{*,e}}(v)f = v(f \circ L_e) = v(f \circ id_G) = v(f) $$ for any $f\in C^\infty(G)$. (I am thinking of the tangent vectors as derivations).  Now all we have left to do is prove that such an $X$ is left-invariant, and it is therefore an element of $\mathfrak{g}$, but I do not know how. I tried to prove that  $$            \forall f\in C^\infty(G),\, L_{{x}_*,y}(X(y))f=X(L_x(y))f $$ but with no success.


I have an question about synchronized static methods. If i invoke a synchronized static method, does it mean i lock this class and other method (including static or no static) can not be accessed before the synchronized static method end?  When A synchronized static method is locking class object, why the other static method can be invoked at the same time?  class Y {     static synchronized void staticSleep() {         System.out.println("Start static sleep");         try {             Thread.sleep(2000);         } catch (InterruptedException e) {         }         System.out.println("End static sleep");     }     static void staticSleepNoSyn() {         System.out.println("Start static NoSyn sleep");         try {             Thread.sleep(2000);         } catch (InterruptedException e) {         }         System.out.println("End static NoSyn sleep");     } }   public class X {     public static void main(String[] args) {         for (int i = 0; i < 2; ++i) {             new Thread(new Runnable() {                  public void run() {                     Y.staticSleep();                 }             }).start();         }          for (int i = 0; i < 10; ++i) {             new Thread(new Runnable() {                  public void run() {                     Y.staticSleepNoSyn();                 }             }).start();         }     } }   the output:     Start static sleep   Start static NoSyn sleep   Start static NoSyn sleep   Start static NoSyn sleep   Start static NoSyn sleep   Start static NoSyn sleep   Start static NoSyn sleep   Start static NoSyn sleep   Start static NoSyn sleep   Start static NoSyn sleep   Start static NoSyn sleep   End static sleep   Start static sleep   End static NoSyn sleep   End static NoSyn sleep   End static NoSyn sleep   End static NoSyn sleep   End static NoSyn sleep   End static NoSyn sleep   End static NoSyn sleep   End static NoSyn sleep   End static NoSyn sleep   End static NoSyn sleep   End static sleep

The Java documentation says:      It is not possible for two invocations of synchronized methods on the   same object to interleave.   What does this mean for a static method?  Since a static method has no associated object, will the synchronized keyword lock on the class, instead of the object?


I'm trying to delete some unwanted data from my datastore with Java and found some code using the DatastoreService that I modified to delete as many entries as possible in 10 seconds:  DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); Query query = new Query("PostalCodes"); long starttime = (new Date()).getTime(); for (Entity entity : datastore.prepare(query).asIterable()) {         datastore.delete(entity.getKey());         if ((new Date().getTime()) > (starttime + 10000))                 break; }   It seems to work when I run this. I check the console's data viewer and the Kind I'm trying to delete ("PostalCodes") is gone, but the day after I do this, the whole thing has been restored. Am I missing a call to flush or commit or something?!?  Is there a better way to do this?

I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records.


Periodically I need to help a person who has an older iPhone or iPad, and I cannot see their device. Is there a program or web page available that simulates the Settings app in different versions of iOS? I found  but there were no replies.

Frequently when offering technical assistance, I either want to follow along with my own instructions to make sure they are correct, or provide a screenshot to demonstrate my instructions visually. Often, it is sufficient to do so on my own device, but there are a number of problems that can come up with this method:   If my device is running a different version of the operating system, what I see is likely different from what the user sees. If it is an area of Settings that shows sensitive information, I need to either use a Guest account without personal information or censor it later. The former is not possible on iOS without buying a dedicated device for it, and censoring images takes time. Getting a screenshot from an iOS device to my computer is fairly simple, but the time adds up when compared to doing the same on macOS. If there are device-specific settings, and I don't have a device with those capabilities (for example, none of my devices support Force/3D Touch), I won't be able to help.   Using Xcode's iOS Simulator is almost never a viable alternative, as its Settings app is greatly pared down and only includes a handful of options.  Does there exist some Mac app whose purpose is to simulate the Settings or System Preferences app of various devices and OS versions?


I backup my LAMP server using RSync over SSH.  Currently, it's on an hourly incremental schedule.  From a 14GB full backup, it's backing up a further 15~MB hourly.  Looking at the files it's backing up again, I think most of these haven't changed.  Does the file last accessed time attribute mean the file has technically changed and would be re-backed up?

How does rsync know which files are changed and which are not?  Does it log its data anywhere in the file?  Because I want to do incremental backups, but first it will transfer all files.  So my main question is: if I upload the initial files via FTP but not by rsync. Will rsync still skips those existing files or it will upload everything on the first run.


can anyone tell me why a label texture might not show up in a render (full render or viewport preview render), whilst it seems completely fine in the texture/material viewport?  I followed a tutorial for this in another project and did it successfully yesterday and have copied the nodes from there exactly / followed the tutorial again. But I cannot seem to find what might be missing.   I am using cycles. There is light in the scene, the viewport seems to have the UV mapped correctly. It is not mapped to the inside of the bottle. I have recalculated normals. I have used File -> External Data -> Find Missing Files. I have reloaded / saved the texture file as a different name and mapped it anew.   Print:   Thanks

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).


I'm new to c++ and I have 'actually' learned a lot these past days. I just learned how to link multiple files today or what I think is called, using "headers".  My question is related to headers and linking files.   1. I was taught that you are supposed to "define" classes, structures, or functions in the header file. Then in the corresponding c plus plus file you set the definitions? Here is what I am doing, and here's where I read to do it :   Header.h file code  #ifndef HEADER_H #define HEADER_H class simple_math{ public:     int add( int, int);      int subtract( int, int); };  #endif   extras.cpp file code  #include "header.h"  int math::add( int x, int y){     return (x + y); };  int math::subtract( int x, int y){     return( x - y ); };   Why don't we just do everything in the actual .cpp file? Why do we post the declarative code in the header file, then create (excuse me if I'm using wrong terms) prototypes in a separate .cpp file?     It seems kind of odd to me. That some how these functions or class methods get defined in a .cpp file that isn't even "#included"(I guess) in the header. Instead, the header is included in the .cpp file and the code still gets executed properly.

Why does C++ have header files and .cpp files?


I have a function which has got data from the API. I want to run this function in every day at a specific time. I have used below code for achieving this, but the blow of run every min. I am using this code on the 5min interval for scheduled tests. My API code is, too much long. I am using just test purpose example code there.  register_activation_hook(__FILE__, 'my_activation'); add_action( 'wp', 'my_activation' );  function my_activation() {     if (! wp_next_scheduled ( 'my_hourly_event' )) {     wp_schedule_event(time(), 'hourly', 'my_hourly_event');     } }  add_action('my_hourly_event', 'do_this_hourly');  function do_this_hourly() {     // do something every hour     $t          = time();     $user_login = 'test-'.$t;     $user_email = 'test-'.$t.'@yahoo.com';     $user_pass  = '123456';      $userdata = compact( 'user_login', 'user_email', 'user_pass' );     $user_id = wp_insert_user( $userdata ) ;      // On success.     if ( ! is_wp_error( $user_id ) ) {         echo "User created : ". $user_id;     }else{         echo "
User already exsist
";      } }  register_deactivation_hook(__FILE__, 'my_deactivation');  function my_deactivation() {     wp_clear_scheduled_hook('my_hourly_event'); }

I have a site on my webhotel I would like to run some scheduled tasks on. What methods of achieving this would you recommend?  What I’ve thought out so far is having a script included in the top of every page and then let this script check whether it’s time to run this job or not.  This is just a quick example of what I was thinking about:  if ($alreadyDone == 0 && time() > $timeToRunMaintainance) {    runTask();    $timeToRunMaintainance = time() + $interval; }    Anything else I should take into consideration or is there a better method than this?


What is the difference between   and  (formerly known as Programmers SE)?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I ran a Java applet, and it used over 200% of my CPU....    It actually rose to over 400% after I took the screenshot.  How is this possible? Can someone explain why Activity Monitor shows a task as using more than 100% of my CPU?

Several responses to a question  suggested I try Opera kiosk mode, so I decided to download it and give it a try. Once the download had completed and the disk image was being verified, Safari hung for over a minute and there were periods where Safari used a very high %CPU:    In Mac OS X 10.5, I was accustomed to seeing Safari freeze, but it never used up more than 200% CPU (2 cores x 100%). Is this a bug in Activity Monitor? Or does this mean that %CPU is now more akin to ?


I am trying to automatically add a slide to the end of a beamer presentation, but when I show notes on a second screen the text of that added slide does not appear on the slide. Here is a MWE:  % !TeX program = xelatex \documentclass{beamer}  \AtEndDocument{     \begin{frame}{At End}         Goodbye.     \end{frame} }  \usepackage{pgfpages} % must come after \AtEndDocument{...} \setbeameroption{show notes on second screen} % (*)  \begin{document} \begin{frame}{First Slide}     Hello. \end{frame}  \end{document}   The above latex produces a PDF with the last slide having a title of "At End" but no text (i.e. "Goodbye." does not appear). Oddly, "Goodbye." does appear in the small copy of the slide that is displayed on the notes part.  For font reasons I must use xelatex, however this problem disappears when using pdflatex. Also if line (*) is commented out the problem disappears.  How can I make "Goodbye." appear on that last slide?  I am using XeTeX 3.14159265-2.6-0.99998 (TeX Live 2017/W32TeX).  Update (2018-04-02)  I have realized that this has nothing to do with \AtEndDocument. For example, the following seems closer to a true MWE:  % !TeX program = xelatex \documentclass{beamer}  \usepackage{pgfpages} \setbeameroption{show notes on second screen} % Both  \begin{document}  \begin{frame} \end{frame}  \begin{frame} %\color{black} Sometimes disappears \begin{itemize}     \item an item \end{itemize} \end{frame}  \end{document}   Note that this issue only appears if all of the following conditions are met:   The document is compiled with xelatex (as opposed to pdflatex) Notes are displayed on the second screen The text that vanishes is on the second slide or later The text that vanishes is at the top level (and not in an itemize environment, for example)   As @samcarter points out it seems to be a foreground color issue since explicitly setting the foreground makes the text visible again. I found the following answer solved my problem:  (although it is clearly a bandaid).

I'm using beamer with xelatex to prepare a talk.  If I switch on notes on right I'm experiencing strange behaviour:  When using csqoutes in the title, all normal text afterwards becomes invisible (or white). The text selectable in the output pdf. Note that the text is also visible in the small preview on the note page.  This does not happen when using pdflatex or lualatex.  MWE:  \documentclass{beamer} \usepackage[autostyle=true,german=quotes]{csquotes}  \usepackage{pgfpages} \setbeameroption{show notes} \setbeameroption{show notes on second screen=right}  \begin{document}    \begin{frame}         \frametitle{\enquote{Enqouted Title}}     \end{frame}      \begin{frame}         \frametitle{This is the second slide}         Lorem ipsum dolor sit amet, consectetuer adipiscing elit.     \end{frame} \end{document}   Update:  csqoutes is not the culprit. Seems to be a general problem when using xelatex and beamer with notes enabled.  New MWE:  \documentclass{beamer}  \usepackage{pgfpages} \setbeameroption{show notes} \setbeameroption{show notes on second screen=right}  \begin{document}     \begin{frame}         \frametitle{First Slide Title}         Here be text     \end{frame}      \begin{frame}         \frametitle{This is the second slide}         Lorem ipsum dolor sit amet, consectetuer adipiscing elit.     \end{frame} \end{document}


When I updated my windows laptop, long ago, from 8.1 to 10 I have since then always 2 operating systems 8.1 and 10 which means Windows 8.1 has its own folder on C drive named as Windows.old.  Now I decided to delete the old windows, so according to many websites it is just about deleting the folder like any other folder with granting the permission to the current user which I tried. However, I couldn't ever delete it as it prompts always permission is needed or access denied even when trying to open explorer with admin permission or even when trying to do the deletion using cmd with admin permission too!  How could I delete the folder then, could you suggest some methods please?  NOTE: I tried also to log-in in safe mode but didn't worked too.

I used to run Windows 7 32 bit, but installed the 64 bit version because of a RAM upgrade. During the installation I got this message:      The partition you selected might contain files from a previous Windows installation. If it does, these files and folders will be moved to a folder named Windows.old. You will be able to access the information in Windows.old, but you will not be able to use your previous version of Windows.   The C:\ drive now has two (2) Windows folders:   Windows (15.3 GB) Windows.old (15.7 GB)     Don't see why I need the Windows.old taking over 15GB of space on my hard drive so I tried to delete it. It didn't work.  How can I safely delete this folder?


Based on domain knowledge and preliminary variable selection, we have decided a set of 10 variables as predictor variables for building regression models. What are the general approaches to identify the interaction terms from these 10 variables. It seem that it is not a good idea to build interaction terms in a combinatorial way. Any suggestions will be highly appreciated.

Other than literally testing each possible combination of variable(s) in a model (x1:x2 or x1*x2 ... xn-1 * xn). How do you identify if an interaction SHOULD or COULD exist between your independent (hopefully) variables?   What are best practices in attempting to identify interactions? Is there a graphical technique that you could or do use?


Sometime ago I used  to install Nginx+Pagespeed on my VPS. I would like to update it to the newest version, but the latest packages from Kura aren't so recent and I'm thinking about downloading them by myself (Nginx + Pagespeed), compiling them and using them instead of the ones provided by the PPA.   I wonder what is the right process to do this. Do I have to remove the Kura packages and then compile and install the latest, official ones, or can I just compile and install those ones and they will substitute the PPA packages?

I installed nginx a while ago using the ubuntu PPA repository.  Now I want to compile nginx from source so I can compile in and use the geo-ip module.  I know how to compile the new nginx from source.  How can I remove the nginx binary which was installed by the package?  I want to leave all the configs and logs and upstart stuff etc untouched.  I really just want to remove the old binary.  How can I do this?


Let $X$ be a compact metric space, and $(C(X),d_{\infty})$ the space of continuous functions. Let $D\subset{X}$ be a dense subset, and $\{{f_n\}}_{n \in N}$ a equicontinuous sequence of functions from $C(X)$. Show that if $\exists f\in C(x)$ such that $f_n(x)\rightarrow f(x)$ pointwise $\forall x\in D$, then $f_n(x) \rightarrow f(x)$ uniformly.  As $X$ is compact, $f$ is a uniform continous function. Then for $\varepsilon/3$ the exist a $\delta_1$ such that if $d(x,y)<\delta_1$ then $d(f(x),f(y))<\varepsilon/3$ for all $x,y \in X$.  For the same reason, and using the equicontinuity of $\{{f_n\}}_{n \in N}$, there exist a $\delta_2$ such that if $d(x,y)<\delta_2$ then $d(f_n(x),f_n(y))<\varepsilon/3$ for all $x,y \in X$ and for all $n$.  Taking $\delta=min\{{\delta_1,\delta_2}\}$ then, considering compactness $X$ can be written as a finite union of $B(x_i,\delta)$ with $i=1,2,...,m$ and for each $x_i$ we can choose a $q_i \in D$.  Then, using pointwise convergence for each $q_i$ we can find $n_i$ such that for all $n>n_i$ $d(f_n(q_i),f(q_i))<\varepsilon/3$    Finally taking $n_0=max\{n_1,n_2,...,n_m\}$ for all $n>n_0$, $d(f_n(x),f(x))<\varepsilon$ for all $x\in X$.  I am not sure if its right or clear :S. I know that pointwise convergence, equicontinuity and a compact set implies uniform convergence. But I am not sure how to deal whit point wise continuity over a dense subset. Thanks!

I know that   If $\{f_n\}$ is an equicontinuous sequence,  defined on a compact metric space $K$, and for all $x$, $f_n(x)\rightarrow f(x)$, then $f_n\rightarrow f$ uniformly.  I'm having trouble proving this.  I see the same problem  but am having trouble following the proof, particularly with part (3).  Can someone guide me through a proof of this result?


One of benefits of Page Compression or ColumnStore Archive is reduced storage space requirements Here I have two questions:  When compressed data is read from disk to buffer pool, in the buffer pool it is stored in compressed form, too ? Does compression help to reduce memory (buffer pool) requirements as well ?  If answer to first question is "yes", then when compressed data is read from buffer pool by application over network, is it decompressed before sending to client ? Or it is sent over network in compressed form ?

Does anyone know a tool like this page  where one can determine if a table is a good candidate for row or page compression. Also I am trying to understand the benefits of compression. I have been reading about it, but still have these questions.  Will compression make more 8KB fit in the buffer cache? When does data become uncompressed i.e. in a select? will backups become faster? Is the reason that compression ads cpu overhead because e.g. inserts need to be compressed before the insert? Is there any good reason to compress tables without investigating how the tables is being used (i.e. static vs. volatile).  A colleague has started to compress many tables (page). I don't know the analysis behind this decision. I know we sometimes have resource semaphore waits during some peak hours. I actually don't think he knows what he is doing. I can see that our sos scheduler yield waits have gone slightly up. I think the compression is causing more harm and it seems that maintenance tasks overshoot more now (e.g. backups, checkdb...).


I was wondering about the way JavaScript handles floating points.  I.e. suppose I set 5 variables to (no decimal numbers):  var a = 1/2, b = 1/3, c = 1/12, d = 1/12, e = 0;   Is the sum of these guaranteed to be 1?  The attached answer does not answer my question, I want to distinguish declaring variables of decimal number with defining them as stated above (0.5 vs. 1/2)

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I can put those about to be executed functions in to functions_results.  I get print out the results, but I couldn't get the functions itself name.  For example,   functions_results = [     schedules(),     schedules("2014-06-01", "2015-03-01"), ]  list_of_functions_heads = [x for x in functions_results] for i in list_of_functions_heads:     # this is what I want to get     # print(i.FUNCTION_NAME) # 'schedules()'      print(i.head())   name not work in my case     print(i.name)       (type(self).__name__, name)) AttributeError: 'DataFrame' object has no attribute '__name__'

In Python, how do I get a function name as a string, without calling the function?  def my_function():     pass  print get_function_name_as_string(my_function) # my_function is not in quotes   should output "my_function".  Is such function available in Python? If not, any ideas on how to implement get_function_name_as_string, in Python?


Gravity is explained in general relativity as curved spacetime. Can the other forces (electromagnetic and weak/strong nuclear) also be explained by this?

After reading many questions, like   and , I wonder:   Is it possible to consider the other fundamental forces too, the electroweak interaction and the strong interaction or ultimately the unification of these, to be fictitious forces like gravity in the framework of general relativity?   If we want a final unification of all fundamental forces, hasn't this feature of gravity to become a feature of the other forces as well?


You are given the sides of a triangle $a,b,c$ Prove that: $a^2(b+c-a)+b^2(c+a-b)+c^2(a+b-c)\le 3abc$ I was just doing the question above and solved it in the following manner: $a^2b+a^2c-a^3+b^2c+b^2a-b^3+c^2a+c^2b-c^3-3abc\le 0$ $(a-b)(b-c)(c-a)+2b^2c+2ac^2+2a^2b-a^3-b^3-c^3-3abc\le0$ And this is where I got stuck. Could you please explain to me how to finish it off from here?  I realise that this question has been asked before, but my main query, is how my train of thought could be used to finish off the question

Suppose that $a,b,c$ are the lengths of the sides of a triangle. Prove that $$a^2(b+c-a)+b^2(a+c-b)+c^2(a+b-c) \leq 3abc.$$   Attempt  It's hard to do much simplification here so we are going to have to use that $a > b+c, b>a+b, c>a+c.$ Using that fact we obtain that $$b^2(c-b)+c^2(b-c) > a^2(b+c-a)+b^2(a+c-b)+c^2(a+b-c).$$ Then should I use AM-GM to finish it or what inequality?


I am using String Builder from another answer, but I can't use anything but alpha/numeric, no whitespace, punctuation, etc.  Can you explain how to limit the character set in this code?  Also, how do I insure it is ALWAYS 30 characters long?       Random generator = new Random();     StringBuilder stringBuilder = new StringBuilder();     int Length = 30;     char tempChar ;     for (int i = 0; i < Length; i++){         tempChar = (char) (generator.nextInt(96) + 32);         stringBuilder.append(tempChar);   I have looked at most of the other answers, and can't figure out a solution to this. Thanks.  Don't yell at me if this is a duplicate.  Most of the answers don't explain which part of the code controls how long the generated number is or where to adjust the character set.  I also tried stringBuilder.Replace(' ', '1'), which might have worked, but eclipse says there is no method for Replace for StringBuilder.

I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string.  In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated).    Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".


In Dummit & Foote's Abstract Algebra (2nd ed.), Corollary 20(2) states the following:     $(\mathbb{Z}/2^n\mathbb{Z})^\times$ is the direct product of a cyclic group of order 2 and a cyclic group of order $2^{n-2}$, for all $n\geq2$.   For the proof, it says "it directly follows from Exercises 22 and 23 of Section 2.3." From these exercises, I learned that $5$ is an element of order $2^{n-2}$ in $(\mathbb{Z}/2^n\mathbb{Z})^\times$ for $n\geq2$, and that $(\mathbb{Z}/2^n\mathbb{Z})^\times$ is not cyclic for $n\geq3$. But I don't see how these imply that $(\mathbb{Z}/2^n\mathbb{Z})^\times$ is a product of two cyclic groups of order 2 and $2^{n-2}$.

How to prove that $U_{2^n}$ is isomorphic as group to $\mathbb Z_2 \times \mathbb Z_{2^{n-2}}$ for $n \ge 3$ ?


I am an international student in the US. I have a job interview invite from an organization in France.  I understand that I need to obtain a short-term visa from the French consulate. I was wondering what classification of visit purpose (tourism or business) I should choose from.

I am travelling to Austria for a job interview (for 2 days). Which type of visa should I apply for?  My home country is India and the visit to Austria will be be sponsored by the inviting company. The company will also provide me with an invitation letter.


I was born in Amsterdam, Holland. I learnt Dutch from my parents and in school. Around the age of 5-6 I started learning English. I watched English television and had English conversations with my mother and we also had frequent English speaking guests in our home, with whom I spoke English. I spoke English well before I started learning it in school around the age of 11.  When I was 13 I moved to Denmark and lived in an all-English speaking community for 9 years. I also continued my schooling in English as well as further studies.   Now I speak English as my first language. I still speak Dutch, but it's not quite as fluent as English. These days people assume I'm American when they hear me speak. I work in English, I speak English at home, I read English fiction for leisure, etc. I also tend to find grammatical and typographical mistakes very quickly, and I speak better English than most people I know, including slang.  So now I'm interested to know if English is really my first language, and if I am a native English speaker.

Who is considered a native speaker of English? I am a little confused by the various answers found online.


We say charge is discrete because it always has the form $q = n e$, where $n \in \mathbb Z$.   Similarly, I can say that $m = n N_a \mu$, where $n$ is number of moles, $N_a$ is avogadro's constant and $\mu$ is the mass of one atom/molecule of that element.  Since $nN_a$ is the number of atoms/molecules, it will not make sense to have $\pi$ atoms or $1.5$ atoms, so $nN_a$ is a natural number.   By this mass is clearly discrete like charge. However, my textbook says the following     One of the main differences between charge and mass is that mass is continuous and charge is not.

Why do we have an elementary charge $e$ in physics but no elementary mass? Is an elementary mass ruled out by experiment or is an elementary mass forbidden by some theoretical reason?


I've two problems:  I took my old HDD and put it in a hard-drive enclosure. Then I connected this to an notebook which is running on Windows Vista. I also connected a USB stick with Ubuntu 14.04 with the notebook. Next step was to install Ubuntu on the external HDD. After the installation I had to make a restart to start with Ubuntu. I turned off the notebook and changed the BIOS to boot on the external HDD. I turned it on and. Nothing happened. Okay, I decided to boot the internal HDD from the notebook. Then a purple window from Ubuntu appeared asking if I wanna start Ubuntu or Windows Vista. I choose Ubuntu and it worked. After that I did the same and chose Windows. It worked as well. BUT now I can't boot the internal HDD without having the external HDD connected to the notebook. It says something like error grub rescue. That is problem one.    Problem two is that I wanna use my HDD in the hard-drive enclosure also without this notebook. I wanna connect it to other computers. What can I do?

I had Ubuntu 12.04 Beta installed on my computer. When 12.04 was finally released, I made a bootable USB Flash Drive using Startup Disk Creator.  Then I decided to check if this drive works properly and to reinstall the system on my desktop. I must add, my desktop behaves a bit strange when it comes to bootable USB's, it recognizes them as HDD.  In BIOS I changed priority of boot so USB Flash Drive (recognized as HDD) was first. Successfully booted, I installed Ubuntu. Everything worked fine, but...  Now I cannot boot from my real HDD. Every time I want to boot, I put the USB Flash Drive into my computer, boot, safely remove it and everything works.  What do I need to do to repair boot?


Suppose we have a depolarizing channel operation $$E(\rho)=\frac{p}{2}\textbf{1}+(1-p)\rho$$ acting on a Spin$\frac{1}{2}$ density matrix of the form $\rho=\frac{1}{2}(\textbf{1}+\textbf{s}\cdot\textbf{$\sigma$})$. I have found the Kraus operators to be: $$E_1=\sqrt{\left(1-\frac{3}{4}p\right)}\textbf{1}, E_2=\frac{\sqrt{p}}{2}\sigma_x,E_3=\frac{\sqrt{p}}{2}\sigma_y \text{  and  } E_4=\frac{\sqrt{p}}{2}\sigma_z$$ I am now supposed to find the unitary matrix U such that the Operation can be expressed in a bigger system i.e. after adding a System S. As far as I understand it, the new operation can be written as: $$E(\rho)=\sum_kE_k\rho E_k^\dagger=\text{Tr}_S(U\rho\otimes\rho_EU^\dagger)$$ Supposing the new system S is prepared on a state $|e_0\rangle$, How do I find the correct unitary matrix? I appreciate your cooperation.  Crossposted to qc:

Given a completely positive and trace preserving map $\Phi : \textrm{L}(\mathcal{H})\to\textrm{L}(\mathcal{G})$, it is clear by the Kraus representation theorem that there exist $A_k \in \text{L}(\mathcal{H}, \mathcal{G})$ such that $\Phi(\rho) = \sum_k A_k \rho A_k^\dagger$ for all density operators $\rho$ on $\mathcal{H}$. (I'll consider the special case $\mathcal{H} = \mathcal{G}$ for simplicity.)  If we use then the system+environment model to express this action as $\Phi(\rho)=\text{Tr}_{\mathcal{H}_E} (Y\rho Y^\dagger)$ for an isometry $Y$ from $\mathcal{H}$ to $\mathcal{H}\otimes\mathcal{H}_E$, where $\mathcal{H}_E$ is an ancilla modelling the environment, what is an explicit construction for a unitary $U$ that has the same action on inputs of the form $\rho\otimes\left|0\right>\left<0\right|_E$? That is, how can I construct an explicit dilation of the map to a unitary acting on a larger space? I understand that this is possible by Steinspring's dilation theorem, but actually constructing an explicit form for the dialated unitary I have had much less success with.


Basically simple question: is it possible to install 32-bit libraries on my 64-bit Ubuntu 14.04 LTS box? I need to run an app which requires 32-bit support.  The information found on this forum is all about older versions, and I as not able to filter out all static.  If those libraries are still supported, how do I then get those installed on my box? So far what I tried only led to errors like "Package 'ia32-libs' has no installation candidate" or "Failed to fetch".

I have a 64-bit version of Ubuntu 13.10.  I want to run a 32-bit version of a program.  However I see ia32-libs is not included in 13.10.  Is there a replacement package for this or what?


Everything seems alright in edit mode, however; when I render the pill, it looks distorted. What did I mess up?

I was following  on creating a watch and noticed that when I rendered the watch, some pieces were messed up.  I'm new to 3D modeling and I've just learned Blender, I can't explain it well, so here's a picture:    Other examples:     I don't know if it's a problem with my World texture, the object, or the object's texture/material, so I can't even guess how to fix it. What causes this? Is it possible to fix it?


For example on Hartshorne p.271, given a closed point $x$ of nonsingular varieties $X,Y$ over an algebraically closed field $k$. We have $k(x)\cong k$. And we can tensor $k(x)$ to get $\Omega_{X/Y}\otimes k(x)$. Here $\Omega_{X/Y}$ is a sheaf while $k(x)$ is a field. I wonder what the formal definition of $\Omega_{X/Y}\otimes k(x)$ is? To me it means at the stalk, it's the tensor product of the stalk of $\Omega_{X/Y}$ with $k(x)$, but what's the formal definition?

Let $S$ be a scheme over a finite field $\mathbb{F}_q$ and $\mathcal{L}$ an invertible sheaf on $S$.   In Pink's article (, see section 1.4 on page 13), he states that:  For any section $\ell\in \mathcal{L}(S)$ and any point $s\in S$ we let $\ell(s)\in \mathcal{L}\otimes_{\mathcal{O}_S}k(s)$ denote the value of $\ell$ over the residue field $k(s)$ of $s$.  My question is: what is the definition of $\mathcal{L}\otimes_{\mathcal{O}_S}k(s)$?  We know we can define the tensor product of two $A$-modules or of two $\mathcal{O}_X$-modules, but what is the tensor product of an $\mathcal{O}_X$-module and a field?


I am a British citizen travelling from Dubai to Stansted with a stop in Istanbul. I will have 5 months validity on passport. Will this be acceptable. I am not leaving the airport.

I have an Indian passport and am planning to visit Germany with a valid visa. To book a flight for Germany (Mumbai – Dusseldorf), I came across some connected flights that stop at Istanbul.  Do I need to have visa for Turkey?  This is the first time I am travelling outside my country, and any information on this will be helpful.


I am administrator of an openSUSE linux server which is used by many people in our company.  Today we find out that yesterday one of the users use too much of bandwidth and its important for management department to notice which user have done this.  I've searched in different website and forums etc the all I find was ifconfig or ifstat which are just show the whole network usage. and also I install a tool vnstatto start network monitoring and logging for any further problem might happen in future.  Finally, I wonder is there any solution to find out network usage in a specific time in past per user. or is there a log file in linux responsible for traking network usage by users.

I'm looking to monitor how much bandwidth different users consume on a server.  Effectively, I'm looking for something like UserIPacct (), where I can get a print-out like:      User       Sent       Received     Flags     root       401364     401421     news       2143       2210     lf         221462     348287   Sadly, useripacct is not available for the 2.6 kernel series.


In One Piece, is there a Devil Fruit that makes you a great swimmer? It seems impossible since eating a Devil Fruit makes you unable to swim. Does the series ever address this?

If all Devil Fruit users in One Piece anime are not capable of swimming, what about a Devil Fruit user whose ability is to control water? Can such a person able to swim or evade the Devil Fruit's curse?


When I try to adduser or useradd it says command is "not found".  Some sources suggest adding /usr/sbin to PATH, but it's already there.  Some sources suggest first logging on as root, but su returns "user root does not exist".  For background, I'm trying to do stuff with my Asus router, which is running Linux version 2.6.36.4brcmarm (root@asus) (gcc version 4.5.3 (Buildroot 2012.02)

I was browsing through some Linux questions and saw this interesting question.   What steps to add a user to a system without using useradd/adduser?  The one possible way that comes to my mind is,   Add an entry for the user in /etc/passwd file.  Add an entry for the group in /etc/group file.  Create the home directory for the added user. Set the new user password using the passwd command.    I tested the above approach and it worked fine.   Is this the only possible way or is there any other work around to achieve this?


Ubuntu will not load past the purple screen.  Not sure how to fix.  My brothers laptop had the same thing happen not long ago.  Both need fixed.  They are thinkpads.  Thanks!

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Does anyone know the difference between affect and effect? The definitions I have found online are confusing and I don't understand them. If someone could define it that would be great!

I've noticed that some people use effect and affect interchangeably. What are the differences between these two and when are the proper situations to use each of them?


I would like to have a zigzag decoration around a box created with mdframed.  Minimal example:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \usepackage[framemethod=tikz]{mdframed}  \begin{document} Some text.  \begin{mdframed}[tikzsetting={draw=black,decorate,decoration=zigzag}] Some boxed text. \end{mdframed}  Some other text. \end{document}   This is the result:   As you can see, the zigzag is not fully displayed.  I tried playing with the options of mdframed (skipabove, skipbelow, leftmargin and rightmargin) but I could not get what I wanted. As a workaround I also tried with the zigzag options (amplitude and segment length) but to no avail.  I am pretty sure the answer lies in setting a particular margin in mdframed but I cannot find which one.

I want to number the lines in a  environment with the line numbers appearing on the left of the frame, outside of it.  \documentclass{article} \usepackage[framemethod=latex]{mdframed}  \newdimen\linenumbersep  \newcommand{\linenumber}[1]{%   \linenumbersep 4pt%   \advance\linenumbersep\mdflength{innerleftmargin}%   \advance\linenumbersep\mdflength{innerlinewidth}%   \advance\linenumbersep\mdflength{middlelinewidth}%   \advance\linenumbersep\mdflength{outerlinewidth}%   \advance\linenumbersep\mdflength{linewidth}%   \makebox[0pt][r]{{\rmfamily\tiny#1}\hspace*{\linenumbersep}}}  \begin{document}  \ttfamily  \begin{mdframed} \linenumber{1}(define fact\\ \linenumber{2}  (lambda (n)\\ \linenumber{3}  (if (= n 0)\\ \linenumber{4}  1\\ \linenumber{5}  (* n (fact (- n 1)))))) \end{mdframed}  \end{document}   After typesetting this document, I get    as expected. But when the tikz method is used for drawing the frame by changing the second line of the source document  \usepackage[framemethod=tikz]{mdframed}   the line numbers are not visible anymore, giving    Is it possible to make this example work with the tikz method?  I want to use something like this in a package I am writing to typeset a program listing with the help of Pygments. The line numbers would be generated automatically.


In problem 5 of my math homework I'm trying to typeset I'm having a gap in my knowledge about how to go about aligning the "Rule" justifications when I move from each step in my equation proof.  Is there a command I can use to just align everything right justify even if I'm trying to work with a centered/anchored equation in the flalgin* space?  \documentclass[12pt]{article}  \usepackage[margin=1in]{geometry}  \usepackage{amsmath,amsthm,amssymb,mathtools,amsfonts, enumitem, fancyhdr, color, comment, graphicx, environ, caption, subcaption} \pagestyle{fancy} \setlength{\headheight}{65pt} \newenvironment{problem}[2][Problem]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2}]}{\end{trivlist}} \newenvironment{sol}     {\emph{Solution:}     }     {     \qed     } \specialcomment{com}{ \color{blue} \textbf{Comment:} }{\color{black}}  %for instructor comments while grading \NewEnviron{probscore}{\marginpar{ \color{blue} \tiny Problem Score: \BODY \color{black} }} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \lhead{A Curious LaTeX Student}  \rhead{MAT 4170 \\ 9.8.19 \\ HW 2}  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{problem}{5} Let $S$ be the set of symmetries of an equilateral triangle.  We developed the following short list of rules that can be used to calculate any combination of elements of $S$.     \begin{itemize}         \item Rule 1: $F^2=R^3=I$         \item Rule 2: $FR=R^2F$         \item Rule 3: $AI=IA$ where $A$ is any symmetry in $S$         \item Rule 4: $A(BC)=(AB)C$ for any 3 symmetries $A,B,C$ in $S$.         \item Rule 5: For each $A$ in $S$ there is a symmetry $A^{-1}$ in $S$ so that $AA^{-1}=A^{-1}A=I$     \end{itemize} Simplify the following expressions using the rules above.  Be sure to justify your steps using the rules.  \begin{enumerate}[label=(\alph*)]     \item $F(FF)(FR)RR=$     \item $F^2(RF)^3F^{-1}(R^2)^{-1}F^3=$ \end{enumerate} \end{problem}  \begin{sol} \begin{enumerate}[label=(\alph*)]     \item \begin{flalign*}             F(FF)(FR)RR &= F\textcolor{red}{(F^2)}(FR)RR\\                         &= F\textcolor{red}{(I)}(FR)RR \hspace{2cm}\textrm{(Rule 1)}\\                         &= F(FR)RR \hspace{2.55cm} \textrm{(Rule 3)}\\                         &= \textcolor{red}{(FF)}\textcolor{red}{(RRR)} \hspace{2.3cm} \textrm{(Rule 4)}\\                         &= (F^2)(R^3)\\                         &= \textcolor{red}{(I)(I)} \hspace{3.55cm} \textrm{(Rule 1)}\\                         &= \textcolor{red}{I}.      \hspace{4.3cm} \textrm{(Rule 3)}\\              \end{flalign*}     \item \begin{flalign*}             (F^2)(RF)^3F^{-1}(R^2)^{-1}F^3 &=            \end{flalign*} \end{enumerate} \end{sol}  \begin{problem}{6} Prove the following statements using Rules 1 through 5 above.  Be sure to include all steps and justify each step.     \begin{enumerate}[label=(\alph*)]     \item $(RF)(RF)=I$     \item $F=RFR$ \end{enumerate} \end{problem}  \begin{sol}  \end{sol} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Do not alter anything below this line. \end{document}

I have a table of formulas, some have a description next to them, I want the equations to appear left flush and the text between parentheses right flush. I was writing it in the following way.  \documentclass[letterpaper,10 pt,twocolumn,fleqn]{article} \setlength{\columnsep}{2.5cm} \usepackage[inner=2.5cm,outer=2.5cm,bottom=2.5cm,top=2.5cm,landscape]{geometry} \usepackage{nopageno,array,graphicx,amsbsy,amsfonts}  \usepackage{amsmath}  \begin{document}        \[{\bf P} = \int_{t_i}^{t_f}{\bf F}\,dt = \Delta{\bf p}\mbox{\hspace{7mm} (Impulse) }\] \[\frac{dA}{dt} = \frac{l}{2\mu}=cte \mbox{\hspace{7mm} (Kepler's Second Law) }\] \end{document}   but the alignment is different for each equation.


I have a web app where I do updates constantly.  All my js files for a web pages are in this format to force no cache from browser:  <script src="./js/scripts.js?v=1.1"></script>   where ?v=1.x is incremented on each modify of my js.  The problem is that sometime some users tell me the page doesn't work (like form not submitted after fields check: stuck and other problems...). I tell him to reload page with CTRL+F5 and try again.... all works great.  I've read already some post about caching and this is the method used from all people: querying with ?v=....  But in my case some browser seems to not view this changed url and reload js from cache instead reload it. Why?  Why the browser doesn't reload all my js when url is changed??

I have noticed that some browsers (in particular, Firefox and ) are very zealous in using cached copies of .css and .js files, even between browser sessions. This leads to a problem when you update one of these files, but the user's browser keeps on using the cached copy. What is the most elegant way of forcing the user's browser to reload the file when it has changed? Ideally, the solution would not force the browser to reload the file on every visit to the page.  I have found  and  suggestion to be useful. It turns out there is a term for this: auto-versioning. I have posted a new answer below which is a combination of my original solution and John's suggestion. Another idea that was suggested by SCdF would be to append a bogus query string to the file. (Some Python code, to automatically use the timestamp as a bogus query string, was .) However, there is some discussion as to whether or not the browser would cache a file with a query string. (Remember, we want the browser to cache the file and use it on future visits. We only want it to fetch the file again when it has changed.)


I encountered a very strange situation with a bunch of directories: user1$ ls -l example/ ls: cannot access 'example/a.txt': Permission denied ls: cannot access 'example/b.txt': Permission denied total 0 -????????? ? ? ? ?            ?  a.txt -????????? ? ? ? ?            ?  b.txt  user1$ sudo ls -l example/ total 12345 drw-rwxr-x 2 user1 user1    4096 Jul  7  2018  ./ drwxrwxr-x 7 user1 user1   54321 Dec 14 12:15  ../ -rw-rw-r-- 1 user1 user1 2444333 Mar 17  2018  a.txt -rw-rw-r-- 1 user1 user1 1333222 Mar 17  2018  b.txt  With sudo, I can read the files successfully, change the permissions, etc. Without it, there is no way I can access those files. I tried to sudo chown user1:user1 the files, as well as sudo chmod a+r them: the commands succeed, but nothing changes. What could possibly have happened to those files? How do I make it possible to access them?

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


Such questions are inevitable. Technology makes guns, and questions on how to use them follow. How do I shoot [targets] [birds] [other people] [my own foot]?  It's no surprise that we all see "how do I do the inadvisable" on many different subjects on the many variations of Stack Exchange. So how should you respond to someone asking how to shoot themselves in the foot?  Most/all of us immediately want to find out why the OP is asking. This is mainly prudence guarding against accidents. But it isn't always possible for an OP to answer that question of "why". They've spent days analyzing it and the logic that led them to ask this question isn't simple to explain without pages of work. Or more commonly they're a little unclear themselves, and are unable to explain why they want something, just that they really really want it and could someone tell them how please.  I've seen multiple ways of responding such questions, including but not exclusively:   Ignore the question. Move on and let the tumble weed deal with the OP. There's no shame in it. Assuming the OP has an XY problem and answering an entirely different question the OP didn't ask. This frequently frustrates the OP as they've put some thought into the fact that shooting themselves in the foot really is what that want. Endless lectures on the dangers of guns, both in comments and answers.  Also frustrating to the OP. See above. Down voting the question.  Even though the question is clear, well formed and posted on the right site for the subject. If one person has asked how to do it, then chances are that another will want to as well. Simply giving the answer to their question explaining how to load, aim and pull the trigger. I mildly prefer this but it does lead to concerns that future readers will fail to realize that an ambulance and hospital will be required.   These are merely my observations of what others do. I was wondering if the community has any ideas of best practice:   How do we satisfy the OP and protect future readers? Do we need to do both these things? Should such questions be worthy of down voting? Is it better to leave such questions unanswered, even if the technical answer is simple enough to give?

If someone asks how to do XYZ, and you think doing XYZ at all is a Bad Idea™, is it valid to post an answer saying so? You aren't answering the question, but instead, arguing the question's validity.  You could do this in a comment, but I don't think comments carry enough weight on occasion.  For example, I came across this today ; for those not wanting to link away:     I would like to build a wiki based website about professors, so that students can share information and check the reputation of the professor before working for him.   and I really wanted to post an answer that said, "I think this is a very bad idea". (In fact I did anyway, despite awareness that it could get myself flamed.)  Was I wrong? What should I have done instead?


I have a T-SQL query, which pulls details from several locations (Something like below):  IF OBJECT_ID('tempdb..#mytable') IS NOT NULL DROP TABLE #mytable;  CREATE table #mytable     ([Locno] varchar(6), [Stories] varchar(6), [Type] varchar(13)) ;  INSERT INTO #mytable     ([Locno], [Stories], [Type]) VALUES     ('54', '2', 'TH'),     ('65', '5', 'OB') ;  SELECT * FROM #mytable  Locno | Stories | Type 54    | 2       | TH 65    | 5       | OB   I want to bring all the rows into a single row. It's not a PIVOT or CONCATENATE, but something like below (I might have n number of locations):   Locno_1 | Stories_1 | Type_1 | Locno_2 | Stories_2 | Type_2     54  | 2         | TH     |  65     | 5         | OB   Can someone guide me how to do the same?  TIA

How can I pivot the following SELECT statement:           SELECT sc.CID,                 sc.CodeName     as OverviewText,                 scRAG.CodeName  as RAGStatusText             FROM StatusCode      sc LEFT OUTER JOIN ProjectOverview po               ON sc.CID          = po.ProjectOverviewCID              AND po.ProjectId    = 180 LEFT OUTER JOIN StatusCode      scRAG               ON po.RAGStatusCID = scRAG.CID           WHERE sc.SCID         = 18   Such statement yields the result set that follows:  CID OverviewText    RAGStatusText --- ------------    ------------- 153 Cost            Green 154 Requirements    Yellow 155 Schedule        NULL 156 Technical       NULL 157 Testing         NULL   But, I want it to return one single row with 10 values, as shown bellow:   ----------------------------------------------------------------------------------------------  | Cost | Green | Requirements | Yellow | Schedule | NULL | Technical | NULL | Testing | NULL |  ----------------------------------------------------------------------------------------------   Can I pivot on CID?


I'm trying to install Ubuntu to USB so I can use it like a fully functional, persistent OS on multiple computers if need be (also, I am planning on switching my HDD soon).  I've tried mounting the official Live/Installer Ubuntu distro to the USB with rufus, but once I booted it up, if I try installing Ubuntu, it will only recognize my HDD partitions, but not the USB drive.  Next, I've tried using Unetbootin, but after installing that one I once again got a live USB, not a full Ubuntu install.   Do you have any suggestions on how I could install it directly to the flashdrive from my PC without needing a spare DVD/USB?  Before marking it as a duplicate, please read the question you're marking this as a duplicate of and the answer. I specifically said those sollutions do not work, and presented another issue.

I'm having a rough time getting Ubuntu to run from a 250 GB USB hard drive.  I booted Ubuntu 9.10 from a CD and ran the regular "install" to the attached USB drive. I used the "advanced" option on the drive partition question to put the boot loader on /dev/sdb (the USB disk) but when I boot the machine it doesn't recognize there's a boot loader on the USB drive (it offers to boot from 2 other devices but not the USB disk).  I also tried booting from the Ubuntu CD and using usb-creator-gtk to set up the USB drive. Seems to me this is meant to work with flash drives. I got a bootable USB disk but it looked and worked like the CD, i.e. it gave me options of "live CD" operation, installing, memtest, etc. That's not the way I want to run the system.  Some help in installing Ubuntu, bootable into a "full" running system on my USB drive would be appreciated.


I read this book, when I was young, about a kid getting trapped in an alternate universe. The alternate universe was a mirror image of the real world, but in black and white. The kid remained in colour, and I vaguely recall the colour being a crucial part to getting back home.  In the real world, there was some sort of catastrophe, where a group of children all went missing. It turns out they were trapped in the black and white dimension, but had been trapped for so long that they also lost colour.  I remember there was some sort of twist, but I can not remember what that twist was. I remember that one of the trapped kids managed to escape, but it was not who the main character suspected it to be; I do not think that was the 'big' twist, because I recall that in the last moments, the good ending went sour.  The book would have been around in the mid 90s, and it was in English. I am sure I borrowed it from a library, I'm Australia, should that mean anything. I was only a kid, when I read it, but I do not want to discount books you would not expect a kid to be reading; I was a bit more advanced than other kids of my age, in regards to reading and literature.

I remember in school reading some stories, but I don't remember the name of them. The first story is like a goosebumps story. The setting is Highschool, and it took place in a modern setting (modern at the time the story was written). I remember that the characters felt one of the girls in Highschool was extremely superficial because she always had to apply her make-up on every so often. At some point in the story they end up in a black-and-white world made up of a handful of highschool students who in turn are black-and-white themselves (Imagine the world looking like a black-and-white photo and that's what it looked like). Anything exposed to the world would slowly turn gray. They used lipstick to get back to their world (because the cap on the lipstick prevented it from turning gray and it allowed them to return back to their own world). While in the world they learn that the girl they thought was superficial was in fact one of the highschool students who ended up in the black-and-white world and she continues to apply make-up to cover up her now gray skin. The characters make it in time to get their class photo taken, but the guy taken the photo is in fact the guy who used his magical camera before to send the characters to the black-and-white world, and they get sent back to that world. That's all I remember about the book, I remember being short and I think it was less than 200 pages long.


I try launch project on server and send query to him:  similar to:  #!/bin/bash  java -jar patch/p-SNAPSHOR.jar curl -d localhost/go/param   the script launches p-SNAPSHOT.jar and stops - waits for a request. I can did him from another console, or remote. But in this case I need did that in next string.    How can I make it possible for run a project and send a request to it?

I need to run Firefox browser from terminal. Browser works fine, but terminal still waits for Firefox to return and if I do CTRL+C, it terminates Firefox. How to run command to make Firefox work independently from terminal?


There is a problem in the exercise $6.8$ of Casella and Berger which says that the order statistics $T(X) = (X_{(1)},X_{(2)},X_{(3)}..,X_{(n)})$ will be the sufficient and no further reduction possible, but I can find a counter example. Since this proposed best sufficient statistic is of dimensional $n$ and in the shifted exponential distribution with parameter $\mu$, $T(X) = (X_{(1)})$ is a sufficient statistic which is of one dimension only/ How come this different behaviors of shifted exponential from proposed one?

In Casella & Berger Statistical Inference,in exercise 6.8, we're asked to prove that, for any distribution belonging to the location family, the order statistics are minimal sufficient.  How does one prove this? I have no idea on how to tackle this exercise.  Any help would be appreciated.


I'm doing a bit of 3D primitive fugures using this code:  \documentclass[tikz,10pt]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{mathptmx} \usetikzlibrary{arrows,shadows,calc,shapes,backgrounds,intersections,positioning}  \newcommand{\Grid}[2]{ \draw[white] (0,0)--(#1cm,0)--(#1cm,#2cm)--(0,#2cm)--(0,0); \draw[very thin,color=gray] (0,0) grid (#1,#2);  \foreach \j  in {0,...,#1} {       \node[] at (\j,0) {$\j$};     }   \foreach \j  in {0,...,#2} {       \node[] at (0,\j) {$\j$};     }} \begin{document}  \begin{tikzpicture}[line width=1pt,node distance=.1cm] \tikzset{drawstyle1/.style={draw=cyan,fill=brown!50}} \tikzset{drawstyle2/.style={draw=black,fill=cyan}}  %GRID %+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \Grid{8}{10} %=================================================================== %Brown parr \coordinate (A) at (0,2); \coordinate (B) at (0,7); \coordinate (C) at (0.3,7); \coordinate (D) at (0.3,2); \def\Anf{60} \newcommand{\parr}[7]{ \draw[#7] (#1,#2)--(#1,#2+#3)--(#1+#5,#2+#3)--(#1+#5,#2)--cycle;  \draw[#7] (#1,#2+#3)--++(#6:#4)--++(0:#5)--(#1+#5,#2+#3)--cycle; \draw[#7](#1+#5,#2+#3)--(#1+#5,#2)--++(#6:#4)--++(90:#3)--(#1+#5,#2+#3)--cycle; } \parr{0cm}{2cm}{5cm}{3cm}{0.3cm}{45}{drawstyle1} \parr{.3cm}{2cm}{.5cm}{3cm}{7cm}{45}{drawstyle2}  \end{tikzpicture} \end{document}   This is what I got:   My problem is that I can not found right way to close paths? I close path in drawing rectangles by points like this:  \draw[#7] (#1,#2)--(#1,#2+#3)--(#1+#5,#2+#3)--(#1+#5,#2)--cycle;   But when I start to draw another rectangle touching first, there is a problem with lines at corners.  What is the simple or complex way to close paths correctly? Should I use clip somehow?

Am trying to draw a simple rectangle and there seems to be minor issue with two of the endpoints (f and d in the following). I tried line cap=rect as suggested by  but that did not seem to work.  The resulting image:    \documentclass{standalone} \setlength\PreviewBorder{5pt}%  \usepackage{tikz}  \newcommand*{\Width}{2.0} \newcommand*{\Height}{3.0} \newcommand*{\Depth}{1.0}  \begin{document} \begin{tikzpicture}%     \coordinate (A) at ( 0,       0,     \Depth);%     \coordinate (B) at (\Height,  0,     \Depth);%     \coordinate (C) at (\Height,  0,      0);%     \coordinate (D) at (\Height, \Width,  0);%     \coordinate (E) at ( 0,      \Width,  0);%     \coordinate (F) at ( 0,      \Width, \Depth);%     \coordinate (G) at (\Height, \Width, \Depth);%     \coordinate (H) at ( 0,       0,      0);%     %     \draw [blue, ultra thick,line cap=rect]%         (A) -- (B) -- (C) -- (D) -- (E) -- (F) -- cycle;%     \draw [blue, ultra thick,line cap=rect]%         (B) -- (G) -- (F) -- (E) -- (D) -- (G) -- cycle;%      \path (D)  [right] node {$d$};% Problem Point 1     \path (F)  [left ] node {$f$};% Problem Point 2 \end{tikzpicture}% \end{document}   This problem about  seems related, but I do not understand how to adapt that to my problem.


I am an undergraduate student who is majoring in physics and computer science (two majors) at Baylor University, but had a bad first semester while taking Elementary Chinese, Calculus I, General Physics I, and Introductory Chemistry I. I withdrew from Calculus I, but received a B- in physics and a C in both Chinese and Chemistry. In the summer before beginning at the university, I took Calculus I twice at a junior college during 6-week courses, receiving an F the first time and a C the second, but began it again under recommendation from the math department until realizing that I lacked the time management skills necessary to complete all the courses successfully in the first semester. After receiving an A in every class after the first semester at the university, will these first grades harm my image in the eyes of graduate school admission boards or employers? I am seeking admission with universities such as MIT and the University of Chicago for graduate school, so I would like to know what is thought about this problem.

I'm studying Computer Science with a double major in Math at a public university. I hope to attend a private school like Vanderbilt (Nashville, USA) to pursue an MS or PhD. My GPA is still above a 3.0, however:   I have received a U (unsatisfied, incorrectly submitted work) as a final grade in a single credit course that is part of an honors college program during my first semester in college. I also had one terrible score (D) in a 200 level maths course during the same semester.   Will these early blemishes on my transcript affect my chances of getting into graduate school?


This annoying app called "dragon branch ads" was installed on my PC and I have no idea how or what installed it on my PC. My question is.. Does anyone know how "dragon branch ads" may have been installed on my PC?   I also read through the question  but could not find any mention of "dragon branch adds" or what third party app "installs" "dragon branch adds"  Steven's answer has instructions on how to remove "dragon branch adds" from a PC. It doesn't directly answer my question but did point me in the direction of a YouTube downloader program.  After looking further into this, I think, don't know with certainty, but I think this “Free YouTube Downloader” program published by HOW Inc is the application that also installed "dragon branch adds" on my PC.  I think this Free YouTube Downloader is the culprit, two days ago I manually removed "dragon branch adds', last night I uninstalled the “Free YouTube Downloader” and I have not seen “dragon branch adds" since so..  I do not know for sure that this "Free YouTube Downloader" also installed "dragon branch adds" but it sure seems like thats where it came from

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I have tried all the ways i can think of to break this loop, but none have worked. I was wondering if anyone can help.  import java.io.*; import java.util.*; public class Tester {     public static void main(String args[])     {       int j;         for(j=5;j>4;j++)         {             Scanner kbReader = new Scanner(System.in);             System.out.print("Type in a sentence and press ENTER. ");             String a = kbReader.next( );             String b = a.toUpperCase();             System.out.println(b);             if( b == "EXIT" )                 break;         } } }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I have problem finding, how to solve this integral $$ \int _0 ^{\frac{\pi}{4}} \frac{3 \sin x + 2 \cos x}{2 \sin x + 3 \cos x}dx $$  This I can rewrite as  $$ \int _0 ^{\frac{\pi}{4}} \frac{12 \sin ^2 x - 5 \cos x \sin x - 6}{4-13 \cos ^2 x}dx = $$ $$ = \int _0 ^{\frac{\pi}{4}} \frac{12 \sin ^2 x}{4-13 \cos ^2 x}dx - \int _0 ^{\frac{\pi}{4}} \frac{5 \cos x \sin x}{4-13 \cos ^2 x}dx - \int _0 ^{\frac{\pi}{4}} \frac{6}{4-13 \cos ^2 x}dx $$ But from this point, I can't get any closer to the answer. Can you, please, help me?

Indefinite Integral with sin/cos  I can't find a good way to integrate: $$\int\dfrac{3\sin(x) + 2\cos(x)}{2\sin(x) + 3\cos(x)} \; dx $$


For example, if   Plane 1: $2x+y+z=1$  Plane 2: $x-y+z=2$  Plane 3 : $4x-y+3z =5$   How to check if these planes intersecting at a single point? I want to check the coordinates of intersection , from scalar triple product or solving from normals of the planes .

To show whether or not the 3 planes $$x+y-2z=5\tag 1$$  $$x-y+3z=6 \tag2$$  $$x+5y-12z=12 \tag 3$$ all have a common line of intersection.  Can I do $(3)-(2)$ to get the line $6y-15z=6$ and $(1)-(2)$ to get the line $2y-5z=-1$ which is $6y-15z=-3$ , and say that as these aren't the same line, they don't have a common line of intersection?  Another thing that is confusing me is that if instead of eliminating $x$, I chose to eliminate $z$, I would get different lines in terms of $x$ and $y$. But how can I get the equations of two different lines by eliminating from the same pair of plane equations? There's only one line of intersection between any pair of planes, so surely I should only be able to get one unique line if I eliminate a variable from a pair of planes?  Any help would be appreciated


I'm not able to compile a simple test program using clang++ on MacOS. I'm probably making a very simple mistake, but I can't figure it out. Thanks in advance for the help. Here's my error after running 'make' in the VS Code terminal: Undefined symbols for architecture arm64:   "Vector<char>::Vector(int)", referenced from:       _main in ch6.o   "Vector<char>::size() const", referenced from:       _main in ch6.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [ch6] Error 1  Here's my Makefile: # Makefile for ch6 executable  CXX = clang++ CPPFLAGS = -std=c++17 -I /Users/user/Developer/learn/cpp -arch arm64 -Wall  ch6: ch6.o Vector.o     $(CXX) $(CPPFLAGS) -o ch6 ch6.o Vector.o  Vector.o: Vector.cpp Vector.h     $(CXX) $(CPPFLAGS) -c Vector.cpp  ch6.o: ch6.cpp Vector.h     $(CXX) $(CPPFLAGS) -c ch6.cpp  clean:     rm *.o  Here's Vector.h: // Vector.h  #ifndef _VECTORH #define _VECTORH  template<typename T> class Vector {     private:     T* elem;     int sz;      public:     explicit Vector(int s);     int size() const; };  #endif  Here's Vector.cpp // Vector.cpp  #include "Vector.h"  template<typename T> Vector<T>::Vector(int s) {     elem = new T[s];     sz = s; }  template<typename T> int Vector<T>::size() const {     return sz; }  and here's ch6.cpp // ch6.cpp  #include <iostream>  #include "Vector.h"  int main() {     Vector<char> vec(10);     vec.size();      return 0; }

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Before this is marked as a duplicate, I have already looked at the answers  and .  I believe my question is different because I want to do this proof directly from the definition. The proof given at the first link uses the property of compactness, Lipschitz continuity and derivatives to support the argument. However, my professor's real analysis approach has not been that of metric spaces and, additionally, Lipschitz continuity has not been discussed yet so I'd like to avoid them for now and attempt this proof directly from the definition. I'm interested in a proof similar to the second answer given on the first link but, unfortunately, there are no comments on whether or not it is correct.     The question is to determine whether or not $f(x) = x \sin{\frac{1}{x}}$ is uniform continuous on $(1,2)$.   I present my own attempt:  Given $\epsilon>0$, let $\delta= \frac{\epsilon-1}{2}$ Then $|x-y|<\delta \implies$ $$\left | f(x)-f(y)\right | =\left | x\sin \left(\frac{1}{x}\right)-y\sin \left(\frac{1}{y}\right) \right|= \left |(x-y) \left( \sin \left(\frac{1}{x}\right)+\sin \left(\frac{1}{y}\right) \right) -x\sin \left(\frac{1}{y} \right)+y\sin \left(\frac{1}{x} \right)\right| \leq \left |(x-y) \left( \sin \left(\frac{1}{x}\right)+\sin \left(\frac{1}{y}\right) \right)\right| + \left|-x\sin \left(\frac{1}{y} \right)+y\sin \left(\frac{1}{x} \right)\right|$$  $$\leq \left |x-y \right| \left |\left( \sin \left(\frac{1}{x}\right)+\sin \left(\frac{1}{y}\right) \right)\right| + \left|-x\sin \left(\frac{1}{y} \right)+y\sin \left(\frac{1}{x} \right)\right|$$  $$\leq 2\left |x-y \right|+1 < 2\cdot (\frac{\epsilon-1}{2})+1=\epsilon$$  Any help is appreciated.

For the $f(x) = x \sin{\frac{1}{x}}$ for $x \neq 0$ and $f(0) = 0,$ my text book asks the following questions.  (b) Why is $f$ uniformly continuous on any bounded subset of $\mathbb{R}$?   (c) Is $f$ uniformly continuous on $\mathbb{R}$??  The graph for the function is this.    For the question (b), if I take subset between $[0.2,0.6]$ or the subset where the slope is steep, I don't think the function is uniformly continuous because I think for a given $\epsilon>0$, there is no unique $\delta >0$ for the bounded subset. Therefore, it also cannot be uniformly continuous on $\mathbb{R}.$ However, the questions sounds like the function is uniformly continuous and the book says that it is uniformly continuous. The answer on the book says something but I need more explanation. Thanks.


I'm in a similar situation as this user:   However, I have yet to create the CDN.  My question has 2 parts:  Part 1: I think I may have found an issue with the accepted answer in the question above regarding duplicate content with images. You see, Google has stated that they don't look at rel=canonical on images.  As stated here:   So my fear here is that I would have duplicate content with all my images, hosted on the CDN. What can be done to avoid this?  Part 2: On an nginx server, how can I make site-wide canonical links?

I have created a subdomain and a CNAME record which points to the domain root. The subdomain www.static.example.com is actually a copy of the entire website www.example.com and it is supposed to act as an CDN and serve static content in order to improve speed. However, all of my content can be accessed via subdomain aswell, so Google has indexed it all and now I am dealing with duplicated content.  How could I deny access to crawlers for the subdomain baring in mind that I do not have different subfolder for subdomain, so I can't create a separate robots.txt file?


rmse = sqrt(mean_squared_error(y_val,y_pre)) print('Val RMSE: %.3f' % rmse)      Val RMSE: 1.825    I got this value for RMSE value but not sure what this number means

Suppose I have some dataset. I perform some regression on it. I have a separate test dataset. I test the regression on this set. Find the RMSE on the test data. How should I conclude that my learning algorithm has done well, I mean what properties of the data I should look at to conclude that the RMSE I have got is good for the data?


I have a reversing camera in my car that I wish to:   switch on whenever the reverse lights come on turn off when reverse lights go off.     Problem is, my car's computer will periodically send these short (let's say 100 ms) 12V pulses to the reverse lights to test whether they are present (simple resistance test).  These pulses are too short to light up the bulbs, but they are short enough to switch on an electronic circuit.  Q. Can I use a 555 timer to ignore those short pulses?  I know I can probably do it with a RC setup, and I realise that I'll end up have resistors and capacitors around the 555 circuit. A delay in switching on the reverse camera is OK.  Cheers!

Let's say I have a 5V pulse train that varies between 0 and 75000 pulses per second. Pulse width, let's say, is 5 microseconds. How could I calculate or determine the best way to filter out all pulses less than 4 microseconds in width?