Function (sample code) to extract raster value per polygon in R

I have a raster image (Sentinel-2 band 4) and a shapefile covering the same area than the image (same projection and extension). The shapefile has different polygons which are agricultural fields.   I want to create a new file where, for each polygon, the mean value of the pixels that are inside it is calculated.  Could you please help me to find an appropriate R code for that?


How to invert colors of a specific application, or monitor on multi-monitor setup?

As in topic. How to invert colors of a specific application, or monitor? Windows magnifier inverts colors on whole desktop.  This article:  does not answer my question.


When I write my notes, (I actually use lyx but that does not matter) I like to add a header with the name of file and the date the file was compiled. This I do using fancyhdr package and   \pagestyle{fancy} \lhead{\texttt{\jobname}} \rhead{\textsf{\today}}   (to tell the truth in lyx I have to use \jobname.lyx, but, again, this does not matter).   The point is that it would be much more useful (at least for me) to be able to print the date when the file was first created. Is there a way in TeX/LaTeX to access the time information of a latex file? I can understand the answer might be OS dependent. I am actually using a linux distribution. I looked in many other forums/FAQ but could not find the answer so far.


command `atq` demonstrate couple of tasks days ago

When I review the queue by command atq  $ atq 28  Wed Oct 31 10:23:00 2018 27  Tue Oct 30 21:20:00 2018 25  Tue Oct 30 21:19:00 2018 29  Wed Oct 31 10:42:00 2018 26  Tue Oct 30 21:20:00 2018 20  Tue Oct 30 18:25:00 2018 23  Tue Oct 30 18:28:00 2018 19  Tue Oct 30 15:43:00 2018 21  Tue Oct 30 18:27:00 2018   The yesterday tasks are still  pending there  atq     lists the user's pending jobs, unless the user is the superuser; in that case, every-              body's jobs are listed;   However, yesterday has gone.  What's the reason atq demonstrate such a outdated list.


What happens if light/particles exceeded the speed of light for a particular medium?

While the speed of light in vacuum is a universal constant ($c$), the speed at which light propagates in other materials/mediums may be less than $c$. This is obviously suggested by the fact that different materials (especially in the case of transparent ones) have a particular .  But surely, matter or even photons can be accelerated beyond this speed in a medium?  If so, what are the effects?


“as essential a part of the weekly shop”

To the Dutch, milk and cheese are staples, as essential a part of the weekly shop as rice is for a Chinese shopper or teabags are for an Englishman.  This is the sentence from CNN's one article. I don't understand why it is not "an essential part of the weekly shop".  Can you tell me about any rules or grammar in this phrase, please?


Having trouble with Windows XP Read Only Settings on a folder

I am having trouble with a folder that needs to be read-write for iTunes to open. For a while it was read-write, but it seemingly inexplicably changed to read-only now. When I try to change it back from that, it says it does it, but as soon as I try to open iTunes or the properties for the folder it will be listed as read-only again.  If anyone knows how I can change the folder from read-only so that it will be permanently read-write it would be incredibly helpful.  How can one change the properties of a file/folder from read-only to read-write in Windows XP?


Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"?

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.?    function myJsFunc() {     alert("myJsFunc"); } Run JavaScript Code     or    function myJsFunc() {     alert("myJsFunc"); }  Run JavaScript Code


Kaiser Rule to select best principal components

Is the Kaiser rule (choosing only PCs with eigenvalues >1) a suitable method to select the best principal components?


Let $(f_n)$ be a sequence of continuous real valued functions defined on a metric space $(X,d)$, and suppose that $(f_n)$ converges uniformly to a function $f$. Prove that  $$\lim_{n\to\infty}f_n(x_n)=f(x)$$  for every sequence $(x_n)$ in $X$ with $x_n\to x$.  These are what I know that might be useful in the proof:   Since $(f_n)$ converges uniformly to $f$, for every $\epsilon>0$, there exists $N$ such that $n\geq N\implies|f_n(x)-f(x)|<\epsilon$ for all $x\in X$. $f$ is continuous. Since every sequence $(x_n)$ in $X$ with $x_n\to x$, we have for every $r>0$, there exists $N$ such that $n\geq N\implies d(x_n,x)<r$.   My questions are :  From point 1 above, since it applies for all $x\in X$, can we easily conclude $\lim_{n\to\infty}f_n(x_n)=f(x)$ since $x_n\in X$ and $x\in X$?  And $x_n$ already converges to $x$ as given in the question, so there is really nothing to prove?  I don't quite understand how to relate the convergence of $x_n$ and of $f_n$ in order to write the proof. Any ideas?  It is quite intuitive that the statement to be proven is correct, but I'm just wondering how to write it down by using those basic definitions of convergence of sequence and function and to relate them.  I have a very rough idea like this: Since $x_n\to x$ then $f_n(x_n)\to f_n(x)$ because $f_n$ is continuous and $f_n(x)\to f(x)$, combining the two we got $f_n(x_n)\to f(x)$. I am really not sure whether it is correct?  Thanks for the help!


Is it possible to find duplicate files on my disk which are bit to bit identical but have different file-names?


I set up hlatex (the package for compiling in Korean) but when I build the file, I end up getting ?? instead of 안녕. How do you fix this?  MWE:  \documentclass{article} \usepackage{hangul} \begin{document} testing 안녕 \end{document}   No errors come up. The word "testing" comes up, but "안녕" does not.


Show that if $G$ is a finite group and ${\rm Aut}(G)$ is cyclic, then $G$ is abelian.

This question seems a little too straightforward, so I'm just suspicious that I'm overlooking something. I know that if $G/Z(G)$ is cyclic, then $G$ is abelian ($Z(G)$ being used to denote the center of $G$). Moreover, I know that if $H\leq G$, then $G/C_G(H)$ is isomorphic to a subgroup of ${\rm Aut}(G)$ ($G/C_G(H)$ being the centralizer of $H$ in $G$). Since every subgroup of a cyclic group is cyclic, $G/C_G(G)=G/Z(G)$ is cyclic and so $G$ is abelian. Am I just psyching myself out on this one?


Interpreting output from anova() when using lm() as input


Can anyone tell me if an interrogative negative question is always answered in positive or can it also be answered in negative?


It's been asked a lot, and for 2 days, I've tried to resolve, with no success. I am running TFS 2012 Express, on Win7. I have installed VS Express edition on that machine. I can check in fine. I am trying to set up a Continuous Integration build.  But, when I force a build on the build server, I get the following error:     Unable to create the workspace '2_1_Server' due to a mapping conflict.   You may need to manually delete an old workspace. You can get a list   of workspaces on a computer with the command 'tf workspaces   /computer:%COMPUTERNAME%'.      Details: The path C:\Builds\Finance is already mapped in workspace   1_1_Server. (type MappingConflictException)   (Not sure where it gets "C:\Builds\Finance" from....)  I then try what it says on my dev machine, and it asks me for my login credentials on the build server. I enter them, and it tells me:    That seems fine, no?  On the server, I check my Build Agent working folder:     d:\Builds\$(BuildAgentId)\$(BuildDefinitionPath)   I am not sure where the conflict is.  Interesting, if I load a different team project on the same server, it builds. I just created a build definition for this project, and it seemed to build successfully. I think it has something to do with the Build Definitions, as these projects were moved from another TFS server.....   Can anyone assist?


Is there a proof of the time-dependent Schrödinger equation?

In many books, we find the proof of the time-independent Schrödinger equation which can be derived from the wave equation and the expression of de Broglie wavelength.  But what about the time-dependent equation? In ion-atom collisions, there is a way to prove the eikonal equation which is similar to the TDSE where the starting point is TISE, if we consider that the projectile ion does linear trajectories, time can be embedded and we prove the eikonal equation that very known in a semiclassical treatment of ion-atom collisions. Is there a similar proof for example, and how time is introduced?


If I use the [hang] format of the titlesec package (using a quite recent version of titlesec, namely 2016/03/15 v2.10.1, and TeX Live 2015), the section is not numbered. It seems that the [hang] option disables the numbering.  MWE (taken from , the image there shows my expected outcome):  \documentclass{article} \usepackage{tgtermes,tgheros} % use your preferred ones for the fonts \usepackage{lipsum} % this is just to produce some text  \usepackage{titlesec} \titleformat{\section}[block]   {\fontsize{12}{15}\bfseries\sffamily\filcenter}   {\thesection}   {1em}   {\MakeUppercase} \titleformat{\subsection}[hang]   {\fontsize{12}{15}\bfseries\sffamily}   {\thesubsection}   {1em}   {}  \begin{document}  \lipsum[1]  \section{A section title}  \lipsum[2]  \subsection{A subsection title}  \lipsum[3]  \end{document}   Is this a bug in the titlesec package?


Is "each" an adverb, pronoun, determiner, or what else?

What do Online Dictionaries Say?  says each is used as an adverb in the following examples:  There are five leaflets – please take one of each. Each of the brothers has a different personality. It’s 500 miles each way. The bill comes to $80, so that’s $20 each   says each is a determiner and a pronoun in the following  each one of us was asked what went on (determiner) Derek had money from each of his five uncles (pronoun)  's entry for each states it is an adjective,  A rope was tied to each end of the boat. Each student had a different explanation.  a pronoun,  He took shot after shot, each missing by inches  and an adverb  They cost 50 cents each. We were allowed two tries each.  But  tells me that each is an indefinite pronoun  Each of the players has a doctor  and  (which btw I really like) says that each is an indefinite adjective  An indefinite adjective is used to describe a noun in a non-specific sense. The most common indefinite adjectives are: any, each, few, many, much, most, several, and some. They are often used to describe a noun to show an element of uncertainty. Indefinite adjectives should not be confused with indefinite pronouns. Indefinite adjectives modify nouns or pronouns. Indefinite pronouns are standalone pronouns   Examples  I gave my friends a book each I gave each a book I gave each of my three friends a book I gave a book to each one of my friends Each one of my friends received a book Each friend of mine received a book  I believe that all the sentences above are grammatical. If any are considered non-standard in English, please please tell me! QUESTIONS  For sentence No. 1, I cannot find a satisfying "tag" to place on each. Since the word "each" is placed at the end of a sentence, I suppose it must be an adverb but it feels like a quantifier to me because it tell me how many books, i.e. to each of my friends. Is each in No.1 an adverb? Why?  Sentence 2 is definitely a pronoun.  For sentences 3, 4, and 5 "each of" and "each one of" can be substituted with all of, with no loss in meaning. But are each of and each one of pronouns? If we use a pronoun to replace a noun phrase or a noun, then how can each in: each (one) of my friends be a pronoun? And I imagine it can't be an indefinite pronoun because we know exactly "how many" people in sentence 3. Oxford Dictionaries suggest that each of is a pronoun but each one of is a determiner.  In sentence 6 each is an adjective/determiner/indefinite adjective because it tells us something about the number of friends. Right?


Currently, I have menu button for toggle purpose. User can switch between original web view, or striped down mobile view.    Currently, we are in original web view    On action bar, I'm showing a phone icon, which is used to tell user, "By clicking on me, you are going to switch to mobile view"    Currently, we are in mobile view    On action bar, I'm showing a web browser icon, which is used to tell user, "By clicking on me, you are going to switch to original web view"    I was wondering, for a toggle button, should the icon telling   What will be the next state if user clicks on me?   A phone icon indicates if user clicks on me, view will switch to mobile view. A web browser icon indicates if user clicks on me, view will switch to original web view.  OR, should the icon used to indicate what is current state?   A phone icon indicates current state is mobile view. A web browser icon indicates current state is original web view.


I was asked to do a Billboard design that is 10 X 22 feet for a fashion brand that I'm interning for. I do not have experience in this kind of stuff, I use AI for fashion flats and vector illustrations, I don't do print work. I did do 2 posters for the internship, but that was easy because I used a template and just added the art work, they came out beautiful!  However, this time, I was unable to find a 10 X 22 billboard AI template. How to set up the document, what numbers do I plug in and do I use inches or centimeters?   Also the images I'll be using is a 150 resolution, is that ok? Don't they need to be 300 dpi?


Where did the thin, smooth plastic spatulas go?

20 years ago, the most common type of rigid spatula (or "turner") was smooth, thin (as in 3mm or less with a sharp edge), and generally made of nylon.  These spatulas were not very durable (leading edges tended to melt), but they were very very good for making eggs and other delicate non-stick-pan dishes.  And they were dirt cheap ($1 or so).  Here's pictures of the kind of spatula/turner I'm talking about:    By 10 years ago, these excellent egg turners had completely vanished from store shelves.  At this point, I can't find them, even at thrift stores.  Today's plastic turners are thick, blunt-edged, and rough ... absolutely terrible for crepes or omlettes.  I'm down to my last 2 hoarded smooth thin plastic turners.  I've searched online, and I can't find any kind of health scare, trend or other information on what would have caused manufacturers to universally change how they made plastic turners.   I also can't find anywhere to buy the old style.  So, this question is two-fold:   Why did manufacturers stop making thin, smooth plastic turner spatulas? Where, if anywhere, can I buy this style of spatula?   AMENDED PER ANSWER BELOW: I am not talking about melamine spatulas, which are rigid.  Both of the spatulas in the picture are semi-flexable.  Amended for more clarity: Per the discussion below, I did some actual measuring. The spatulas in question are sharp edged at the front, around 1-1.5mm on the edge, and no more than 3mm in the center.  FOR THE BOUNTY: either tell me where I can buy a new spatula like the ones pictured, OR explain why they're no longer available ... with a reference.  Thanks!


I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality.  I recently saw SimpleXML but I haven't tried it yet. Is it any simpler? What advantages and disadvantages do both have? Any other parsers you've used?


How Can I Strengthen Bicycle Trailer Axles?

I own a bicycle trailer and the stock parts are terrible at best.    (Aosom Elite II.)  Where can I find high quality bearings, axles shafts, axle sleeves? Can I source them or will they have to be custom made?   I would also like to know how can I change to a nutted axle instead of one held on by a C-clamp.  Here are some pics, supposedly, these are actually parts to a wheel chair axle.  In other words how can I swap out the wheel chair parts for high quality bicycle parts.  Here are some pics.


My question is simple and might even be dumb (forgive me!). But what is exactly the difference between diffraction and interference?


The president is said to have warned Prime Minister Benjamin Netanyahu that he could put off growing pressure from the international community for only so long.  I have loved you for so long.   In sentence 1, "so long" seems to mean "a limited time", while it(so long) means "a very long time" in sentence 2. Am I right? If then, why is that? Does the word "so" have different meanings in these two sentences?


What's the difference between static and non-static enum in Java? Both usages are same.  Is it correct that all static ones are loaded on memory on startup, and non-static ones are loaded on demand? If yes, then which method is better? Keeping some data always in memory or using server resources to load them each time?  public class Test {      public enum Enum1 {         A, B     }      public static enum Enum2 {         C, D     }      public static void main(String[] args) {         Enum1 a = Enum1.A;         Enum1 b = Enum1.B;          Enum2 c = Enum2.C;         Enum2 d = Enum2.D;     } }


In older versions of Firefox there was an option to switch off loading of graphics. Now, in 28.0 I can no longer find it. It used to be in  [Edit] -> [Preferences] -> ...   Is there a simple way to avoid loading graphics in current versions of Firefox?


I am trying to find and then change the screen DPI (dots per inch) setting in 12.04 and 12.10. However, I can't seem to find any app or config file that can do this. Is there any app or conf file for this?  Note that this is for 12.04+ so the following will not work:        Moreover, they are basically changing the font size, not the actual screen DPI.


Can a massless object have a charge associated with it?

So I've been stuck with this thought for a few days and have not been able to find an answer which can clear this doubt.  Is it necessary for an object to have certain mass associated with it if it has some electric charge?   I sure know that in the case of it's converse, surely an object with some mass may not have a charge associated with it.  Any help would be appreciated!


Let $(G, .)$ be a finite abelian group, $G=\{x_1, ..., x_n\}$ and let $x=x_1. \cdots. x_n$.   Show that $x^2=e$ Suppose $G$ has no element of order $2$ or that $G$ has more than one element of order $2$. Show that $x=e$. Suppose $G$ has a single element $y$ of order $2$. Show that $x=y$.   Progress: I have done part $1, 3$, and I shown that if $G$ has no element of order $2$ then $x=e$. For this part, It's easy since as $x^2=e$ and $o(x)\neq 2$ then $x=e$, but I'm stuck in the second part of part 2. Can someone help me?


How to check whether ASP.NET button is clicked or not on page load

How can I check whether a particular button was clicked or not in ASP.NET?  I think I need to perform some operation on Page_Load. This shouldn't be entering to Button_Click event to find. Is there any way that I can find where it was clicked or not on Client Side and take it to Page_Load?


Bug when edit values of nested list that generated using multiplication

Welcome All 😊 I try to make list using python named mylist with 3 element each element contain other list contain 2 element like these 👇 [[None,None]]*3  When try to edit first nested list items in my list by set mylist[0][0] = 1 and mylist[0][1] = 2 Then try to print mylist This is output : [[1, 2], [1, 2], [1, 2]] It edit all list items. However when create it manually like mylist = [[None, None], [None, None], [None, None]] then try to make my edit edition done correctly. First Case Code : mylist = [[None,None]]*3  mylist[0][0] = 1 mylist[0][1] = 2  print(mylist)  First Case Output: [[1, 2], [1, 2], [1, 2]]  Second Case Code : mylist = [[None, None], [None, None], [None, None]]  mylist[0][0] = 1 mylist[0][1] = 2  print(mylist)  Second Case Output: [[1, 2], [None, None], [None, None]]


Driver for Validity Sensors Fingerprint scanner

prakhar@pr3d4tOr:~$ lsusb -s 001:003 -v  Bus 001 Device 003: ID 138a:0018 Validity Sensors, Inc. Fingerprint scanner Couldn't open device, some information will be missing Device Descriptor:   bLength                18   bDescriptorType         1   bcdUSB               1.10   bDeviceClass          255 Vendor Specific Class   bDeviceSubClass        17    bDeviceProtocol       255    bMaxPacketSize0         8   idVendor           0x138a Validity Sensors, Inc.   idProduct          0x0018 Fingerprint scanner   bcdDevice            0.78   iManufacturer           0    iProduct                0    iSerial                 1    bNumConfigurations      1   Configuration Descriptor:     bLength                 9     bDescriptorType         2     wTotalLength           46     bNumInterfaces          1     bConfigurationValue     1     iConfiguration          0      bmAttributes         0xa0       (Bus Powered)       Remote Wakeup     MaxPower              100mA     Interface Descriptor:       bLength                 9       bDescriptorType         4       bInterfaceNumber        0       bAlternateSetting       0       bNumEndpoints           4       bInterfaceClass       255 Vendor Specific Class       bInterfaceSubClass      0        bInterfaceProtocol      0        iInterface              0        Endpoint Descriptor:         bLength                 7         bDescriptorType         5         bEndpointAddress     0x01  EP 1 OUT         bmAttributes            2           Transfer Type            Bulk           Synch Type               None           Usage Type               Data         wMaxPacketSize     0x0040  1x 64 bytes         bInterval               0       Endpoint Descriptor:         bLength                 7         bDescriptorType         5         bEndpointAddress     0x81  EP 1 IN         bmAttributes            2           Transfer Type            Bulk           Synch Type               None           Usage Type               Data         wMaxPacketSize     0x0040  1x 64 bytes         bInterval               0       Endpoint Descriptor:         bLength                 7         bDescriptorType         5         bEndpointAddress     0x82  EP 2 IN         bmAttributes            2           Transfer Type            Bulk           Synch Type               None           Usage Type               Data         wMaxPacketSize     0x0040  1x 64 bytes         bInterval               0       Endpoint Descriptor:         bLength                 7         bDescriptorType         5         bEndpointAddress     0x83  EP 3 IN         bmAttributes            3           Transfer Type            Interrupt           Synch Type               None           Usage Type               Data         wMaxPacketSize     0x0008  1x 8 bytes         bInterval               4   I have searched high and low but I cannot get this to work. All questions related to 138a:0018 are either unanswered or old. Any help guys?


No essential singularity at infinity implies polynomial

Suppose $f(z)$ is holomorphic in the whole plane, and that $f(z)$ does not have an essential singularity at $\infty$. Prove that $f(z)$ is a polynomial.   Since $f(z)$ does not have an essential singularity at $\infty$, it has either a removable singularity or a pole. If it has a removable singularity, we can define $f(\infty)$ in such a way that $f$ is holomorphic in the extended plane. Having a pole at point $a$ usually means that we can write $f(z)=\dfrac{g(z)}{(z-a)^k}$ where $g(z)$ is holomorphic. I'm not entirely sure what a pole at infinity means in this case.


Prove the Mordell's equation $x^2+41=y^3$ has no integer solutions

Why does $x^2+41=y^3$ have no integer solutions?  I know how to find solutions for some of the Mordell's equations $(x^2=y^3+k)$ (using $\mathbb{Z}[\sqrt{-k}]$, and arguments of the sort). Still, I can't find a way to prove this particular equation has no integer solutions.   I know it doesn't because there are lists of solutions for $k \in [-100,100]$, like this one  and for what I've seen, the argument one uses to say a given Mordell equation has not solution is based on congruences, like in .  Still, I can't seem to figure out why the one with $-41$ (meaning $x^2=y^3-41$) has no solutions. There's a theorem in the Apostol book (p191) that says that such an equation has no solution if $k$ has the form $k=(4n-1)^3-4m^2$, with $m$ and $n$ integers such that no prime $p\equiv -1 \pmod 4$ divides $m$. I've tried with this but can't find $m$ and $n$.  Any ideas?


Dual Booting Ubuntu Alongside Windows 8.1

So I had Windows 7 and tried to dual boot and ended up writing over my Windows 7 bootloader, but I really wanna try to dual boot with Ubuntu. I now have Windows 8.1 and want to try dual booting with Ubuntu again. Is there anyone that could walk me through this? I don't wanna mess up again.  Edit: So i read up on wubi, it does not work on windows 8. I can install using it, but i cannot then reboot into, it doesnt do grub right or something.


Curse of dimensionality: is there a benchmark test set?

I am working on the curse of dimensionality (theoretical models) and would like to test an algorithm on it.  What I haven't found is a standard dataset that could be used to compare different approaches.    Is there such a thing?  Or... related: what is the most well-known failure due to the curse of dimensionality?


Why are characters outside my capturing parentheses included in matches from my RegExp?

Working in JavaScript I have strings that might contain words prefixed by an "@". The string might look like this @one two @three. I want a RegExp that finds the words prefixed by the "@" but I don't want to include the "@" itself.   I created a RegExp looking like this /@(\w+)/g but when I match it against my strings the "@" is indeed included. Why is this? I assumed that if I wanted to include it then the "@" would be inside the capturing parentheses like this /(@\w+)/g  var s = '@one two @three' var matches = s.match(/@(\w+)/g) // matches is now [ '@one', '@three' ] but I want [ 'one', 'three' ]   Note with the result I currently get, there is of course no problem in getting the array I want, I can just remove the first character of each string. But what I want to know is:  Is it possible to change my RegExp to get the desired result? And: Why are characters outside my capturing parenthesis included in the result? I find it intuitive that only the characters inside the parenthesis should be included.


Can the null hypothesis be **more** true than the alternative hypothesis or vice versa?

As the title says, my question is can the null hypothesis ($H_0$) be more true than the alternative hypothesis ($H_1$) or vice versa? For example, if the statistical power is really high (extremely let us say $0.99$) then by the definition of statistical power, the type 2 error is $0.01$, which means that we will reject $H_1$ (false null hypothesis) almost always, i.e., $H_0$ is more likely to be true. But does it mean that $H_0$ is more true than $H_1$? It sounds a bit odd to me, so I ask this question here (sorry if this question is not a proper question in here). If we cannot say "$H_0\;/\;H_1$ is more true than $H_1\;/\;H_0$", can you explain why we can't say this?


Run sshd on multiple ports but different domains

I want to run my sshd server on multiple ports but different domains.  The server should be reachable as following:  ssh -p 12345     example.com ssh -p 22    git.example.com   I tried to modify /etc/ssh/sshd_config like this:  Port 12345 ListenAddress 0.0.0.0 ListenAddress git.example.com   But that's not working.


What are the major advantages of actively managed mutual funds over index funds?

provides insight on the average performance of actively managed mutual funds from ~5 years ago:     Growth fund managers fared even worse, with just 6% of growth funds beating their benchmark -- the worst such result since at least 1991. The average margin of underperformance reached a whopping 3.5 percentage points.   If it becomes harder and harder to beat the large indexes, why would one still go with actively managed mutual funds? My understanding is that they are also more pricey, expense ratio-wise, and come with more tax hurdles. Furthermore, I'd assume that modern technology like robo-advisors is going places.


How do I get Javascript object key as string without field

I am fairly new to Javascript and one question dawned on me... If I ever wanted to get the string of a Javascript object key without getting the field at the same time, how would this be done? I tried searching the web, but it seems like I am using the wrong terminology as I didn't find anything about my question after the first 20 or so links. So how would this be possible? I am learning the in and outs of the language and I am genuinely curious, any help is appreciated.


Is the flair tab working correctly?  It is counting aproximately 3 times more points and over 2 times more bronze badges at the time I'm posting it.


I'm am making a bunch of liquor bottles and i have too much reflection on the transparent image on the outer part of the transparency.  My first material is the glass node,  my 2nd material is the transparent image on the section of the bottle I need it on.  I am thinking it needs to be all one material but i cant find the correct node set up if that is the case.  Do you have a node set up that will help him achieve less reflection.


PPA & Packaging: Having versions of packages for multiple distros

(quote from chat)     Got a PPA on launchpad for source packages for an IRC bot project I'm associated with (since its all the intermediate packaging for the stuff between releases, it's classified as an "experimental" PPA). Question: I've already packaged the stuff for a lucid build. Any clue how I'd be able to create the same packaging, except package it for maverick, and put it up to the same PPA that I've put the lucid packaging to?


Training a decision tree against unbalanced data

I'm new to data mining and I'm trying to train a decision tree against a data set which is highly unbalanced. However, I'm having problems with poor predictive accuracy.  The data consists of students studying courses, and the class variable is the course status which has two values - Withdrawn or Current.   Age Ethnicity Gender Course  ... Course Status   In the data set there are many more instances which are Current than Withdrawn. Withdrawn instances only accounting for 2% of the total instances.  I want to be able to build a model which can predict the probability that a person will withdraw in the future. However when testing the model against the training data, the accuracy of the model is terrible.  I've had similar issues with decision trees where the data is dominated by one or two classes.  What approach can I use to solve this problem and build a more accurate classifier?


What should I do if one leg of my travel plan is cancelled by the airline?

I have following legs of flight travel I have to cover in December:   Delhi to Milan (MXP), Air Italy, dep. Monday 6am India time  Milan to Rome (FCO), Air Italy, dep. Monday 5pm Italy time Rome to Athens (ATH), Ryanair, dep. Tuesday 10am Italy time   First two are under ONE TICKET. There's a similar return route while returning as well.   Air Italia sent me an email today telling that the DEL>MXP flight on Monday has been cancelled. They are offering the same flight next day but with that, I will miss Rome>ATH flight despite keeping original time margin of over 14 hours. The flight is non-refundable.   What should I do to ensure that:   I don't lose money because I booked flights with an airline that is losing money I don't miss visiting beautiful ancient cities of Europe


Let $f(x)\in\mathbf Q[x]$ and let $K$ be the splitting field of $f(x)$. How is the discriminant of $K$ (as a number field) related to the discriminant of $f(x)$? Are they divisible by the same primes? Does one divide the other?


How to solve "dpkg: error processing archive /var/cache/apt/archives/libvlccore9_4.0.0~rc1~~git20171225+r73378+113~ubuntu16.04.1_amd64.deb (--unpack)"

Getting errors running sudo apt-get -f install:  "Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   gstreamer1.0-plugins-base:i386 libcdparanoia0:i386 libdbusmenu-qt2:i386 libgstreamer-plugins-base1.0-0:i386 libgstreamer1.0-0:i386 libopus0:i386 liborc-0.4-0:i386 libqt4-opengl:i386   libqtwebkit4:i386 libtheora0:i386 libvisual-0.4-0:i386 libvlccore8 libxss1:i386 libxv1:i386 linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic linux-headers-4.4.0-96   linux-headers-4.4.0-96-generic linux-headers-4.4.0-97 linux-headers-4.4.0-97-generic linux-headers-4.4.0-98 linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic linux-image-4.4.0-96-generic   linux-image-4.4.0-97-generic linux-image-4.4.0-98-generic linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-generic linux-image-extra-4.4.0-98-generic   sni-qt:i386 vlc-plugin-notify vlc-plugin-samba vlc-plugin-video-splitter vlc-plugin-visualization Use 'sudo apt autoremove' to remove them. The following additional packages will be installed:   libvlccore9 The following NEW packages will be installed:   libvlccore9 0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded. 14 not fully installed or removed. Need to get 0 B/472 kB of archives. After this operation, 1,240 kB of additional disk space will be used. Do you want to continue? [Y/n] y     (Reading database ... 462617 files and directories currently installed.) Preparing to unpack .../libvlccore9_4.0.0~rc1~~git20171225+r73378+113~ubuntu16.04.1_amd64.deb ... Unpacking libvlccore9:amd64 (4.0.0~rc1~~git20171225+r73378+113~ubuntu16.04.1) ... dpkg: error processing archive /var/cache/apt/archives/libvlccore9_4.0.0~rc1~~git20171225+r73378+113~ubuntu16.04.1_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libvlccore.so.9.0.0', which is also in package libvlccore8:amd64 3.0.0~~git20171210+r73147+99~ubuntu16.04.1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Processing triggers for libc-bin (2.23-0ubuntu9) ... Errors were encountered while processing:  /var/cache/apt/archives/libvlccore9_4.0.0~rc1~~git20171225+r73378+113~ubuntu16.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)"   Tried several options and could not fix it. Any help appreciated!  Thx


The tree on the left is always purple, whenever I try anything, like changing the material, texture etc. it always turns out purple.    It's fine in cycles:    I've been following a tutorial by CG Geek on youtube and have had no problems up to about 1:01:39. But now when I try to follow along my left tree always appears purple as shown in the picture. The tutorial is .


What is the "regional Pokémon" for south America?

The question:  does not address South America (hereby referred as SA), basically because at the time of the posting the game had not launched in South America (SA).  The question linked above was posted before South America launch, and does not address if the north america Pokémon can be caught in South America too. Therefore, not a duplicate.  Tauros is the Pokémon for North America? Is it the same for SA?  If not, is there any hard evidence of some of the "regional" Pokémon being caught in SA?


9-speed system to 11-speed drivetrain upgrade?

I am currently upgrading my bike from a 9 speed to an 11 speed system.  I am currently using shimano 105 components and will continue to use them within the new system.  Current bike has a shimano 105 rear derailleur but does not specify if it is unique to a 9 speed system.  Will I need to buy a new rear derailleur?


Prevent mounting of a specific volume when connecting an external drive

I've got an external drive with 3 volumes on it. All of them are mounted upon connecting the external drive to my Mac.  I want one of these 3 volumes to not be mounted when I connect it. Is that somehow possible?


How do you export a blender file as an .avi file in Blender 2.74?

I am working on a video file in Blender. I have saved it as a .blend file already, but I want to save it as an .avi file.  How do I do this? I have watched multiple tutorials and have no idea what to do. I am using Blender 2.74.  Thanks.


Delete incompatible ScreenFlow version from MacOS Sierra

I logged into my iCloud account from a fresh install of macOS Sierra. I had a very old version of ScreenFlow (from 2011) under Purchases in the App Store. Installing it worked. When I try to open it (from the App Store or from Spotlight), it says it's incompatible and offers me to search for a newer version.   Now how do I remove this old installed version? The App Store only shows me an "Open" button under Purchases, but I can't click on the icon to take me to a details page with an option to uninstall it.  It's harmless to just leave it there, but besides taking up a little disk space for nothing, it pollutes the Spotlight search index and just makes me feel my computer a little "dirty".


How to draw the dc motor diagram in Tikz?


What would happen to a body in an astronaut suit over time if floating free?

I'm not sure if this is best in Biology or Physics, but on Earth we decay to skeletons and then eventually to dust.  What would happen in space in a space suit?


Click event doesn't work after appending html from ajax

Here is the code to fetch a bunch of  tags which contains ID's and those ID's are use to fetch more data from the same file.. So to make this short as possible  index.html  var strURL ="co.php";         var req = getXMLHTTP();         if (req) {             req.onreadystatechange = function() {                 if (req.status == 200) {                     document.getElementById('content').innerHTML=req.responseText;                 }             };             req.open("GET", strURL, true);             req.send(null);         }   with that code I get my external file which contains something like this.  co.php
 Link 1 Link 2 Link 3 Link 4
    and thats all that is for the co.php file... I can see the links but the script just doesn't work... and I wonder why... now that script is prefer to be in the index.html and not in the co.php file... but the result is the same.. if the script is in index.html it doesn't work, so how can I make it work? ... like I said I prefer that      be in the index.html and make it work with the file that is from pull with ajax...


Installing ArcGIS Python API with ArcGIS Pro

I am new to the world of ArcGIS and I come from a data science background. I recently installed ArcGIS Pro with a Single User license from my organization. I would like to use it with the Python API for deep learning.  Can anyone tell me how to get my setup properly working. I am confused as to how to login with the GIS() object in Python.  I would like to be able to perform tasks similar to this example:


What's the value of $\sum\limits_{k=1}^{\infty}\frac{k^2}{k!}$?

For some series, it is easy to say whether it is convergent or not by the "convergence test", e.g., ratio test. However, it is nontrivial to calculate the value of the sum when the series converges. The question is motivated from the simple exercise to determining whether the series $\sum\limits_{k=1}^{\infty}\frac{k^2}{k!}$ is convergent. One may immediately get that it is convergent by the ratio test. So here is my question:     What's the value of $$\sum_{k=1}^{\infty}\frac{k^2}{k!}?$$


Sci-fi/fantasy TV pilot from the 90s about a frontier doctor

I remember watching something on TV that seemed like it was the first episode of a TV series.  It might have just been a pilot of something that got cancelled, or I guess it's also possible it was a miniseries or made-for-TV movie.  I believe this was in the mid-90s, but definitely at some point in the 90s, when I saw it.  I'm guessing that's also when it was made, because the production quality seemed decent to me at the time--nothing special, just didn't seem dated.  Anyway, there was a young doctor just arriving fresh for his first post, in some backwater or frontier planet or region--I remember some sort of contrast between his training and equipment and their (wooden?) housing.  I think he was resentful about the post.  It also turned out to be quite dangerous.  The locals suffer periodic attacks from riders on horseback who emerge from some sort of rift--like a tear in space/time sort of portal.  So there's some sort of sci-fi frontier medicine vibe going on.  Finally, I also remember there was some surgery and/or combat scenes with a bit of blood.  I was young and it was too much blood for me at the time, so I changed the channel and never managed to find this again...  Any ideas what this was?


How to trim off the ".java" from a Java file when running in Bash script?

I have a few Java tests that I'd like to run by doing java <test-name>.  But, all of the files are either .class or .java.    How do I trim off the end in a Bash script or in the terminal so that the command reads java <test-name>?


What canonical momenta are the "right" ones?

I'm doing some classical field theory exercises with the Lagrangian $$\mathscr{L} = -\frac{1}{4}F_{\mu \nu}F^{\mu \nu}$$ where $F_{\mu \nu} = \partial_\mu A_\nu - \partial_\nu A_\mu$. To find the conjugate momenta $\pi^\mu_{\ \ \ \nu} = \partial \mathscr{L} / \partial(\partial_\mu A^\nu)$, I can use two methods.  First method: directly apply this to $\mathscr{L}$. We get a a factor of $2$ since there are two $F$'s, and another factor of $2$ since each $F$ contains two $\partial_\mu A_\nu$ terms, giving $$\pi^\mu_{\ \ \ \nu} = -F^\mu_{\ \ \ \nu}.$$  Second method: get $\mathscr{L}$ in terms of $A$ by expanding and integrating by parts, yielding $$\mathscr{L} = \frac{1}{2}(\partial_\mu A^\mu)^2 - \frac{1}{2}(\partial_\mu A^\nu)^2.$$ Differentiating this gets factors of $2$ and gives $$\pi^\mu_{\ \ \ \nu} = \partial_\rho A^\rho \delta^\mu_\nu - \partial^\mu A_\nu.$$  These two answers are different! (They do give the same equations of motion, at least.) I guess that means doing the integration by parts changed the canonical momenta.  Is this something I should be worried about? In particular, I have another exercise that wants me to show that one of the canonical momenta vanishes -- this isn't true for the ones I get from the second method! Plus, my stress-energy tensor is changed too. When a problem asks for "the" canonical momenta, am I forbidden from integrating by parts?


Solutions of $f(x)\cdot f(y)=f(x\cdot y)$

Can anyone give me a classification of the real functions of one variable such that $f(x)f(y)=f(xy)$? I have searched the web, but I haven't found any text that discusses my question. Answers and/or references to answers would be appreciated.


Use batch to only start a jar java application if it's not already running

For the close everything crowd: This is not a duplicate of the question  because there may be multiple java.exe processes running (as they are in my case) and I need only to check for the specific jar. That's why I have written jar java application in the title.    I have a "Minecraft server" icon on my desktop that starts Spigot minecraft server. I use such run.bat file to do the job:  :start java -Xmx1024M -Xms1024M -jar spigot-1.8.7.jar pause goto start   It's infinite loop to make server restarting simpler. Now it sometimes happens that I, or somebody else who's using the computer, try to start the server while it's already running. I would like to prevent this from happening. Something along:  IF spigot_server_running (     echo The server is already running. If you can't connect, try to check the console window for errors.     echo if all else fails, terminate the java process from task manager.     pause     exit 1 )   What can I do to detect it? I guess list of running processes can be parsed similarly to what Linux's grep does. But isn't there some command line tool for this distributed along with java JRE or JDK? I wouldn't install extra program for this task but I would prefer official Java API. But remember it must work with batch or Windows CScript files.


I have 2 RAM slots in my motherboard. In Slot#1 I have a 2 GB DDR3 800Mhz RAM. I am planning to add 2 GB RAM more to Slot#2 of my computer. But online stores only has 1333Mhz RAM to buy. So my questions is that Can I use a 800Mhz RAM with a 1333Mhz RAM.  Regards,  A Computer Enthusiast


bash script to read a paragraph, print it in $fg_color, then read another paragraph, print it in next $fg_color, etc... in a loop until CTRL-C

Looking to read a paragraph from the attached textfile.txt, set $fg_color, print the paragraph, then read another paragraph, set the next $fg_color, print the paragraph, etc... and then loop to the top of the file again until CTRL-C is pressed. Would also like a switch to set the print speed. I found the following but couldn't figure out how to read a paragraph then print it, and read the next paragraph in the same file.. etc. for fg_color in {0..$(tput colors)}; do tput setaf $fg_color printf "Color $fg_color  " done textfile.txt contains the following: Lorem ipsum dolor sit amet, id cum perpetua vulputate? An nec sumo regione! Id nostro ocurreret dignissim quo, vel in modo mutat sadipscing, ex vix voluptua adipiscing. Pro et viderer copiosae, sit ne case rebum hendrerit? Repudiare gloriatur vituperata sea ex, eos ad adversarium liberavisse?  Mel alii periculis deterruisset ei, ut sea vero assum inciderint! Scripta omnesque in eos, an mundi clita per. Et pro quando menandri, nostrum interpretaris ad est? Quando semper oblique ex vel, vel id dicant constituto!  Sit tamquam persius maiorum ut. Has solum qualisque ad? Duo justo nullam in? Est an graeci evertitur, no cum tractatos principes, fugit zril detraxit eum in?  Alia regione ex vis, summo accusamus sed te, dolore facilisi vel no? Cu vis decore tamquam? Mel ne aliquid fuisset! Id corrumpit cotidieque vel, justo regione est ei. Id graece equidem reformidans ius, quo saperet phaedrum ut, nonumy verear albucius mel ut! No tibique probatus adolescens eam. Ne mea ignota equidem.  Et cum elit exerci singulis, cu velit cotidieque eos! Quo eu viris ubique gubergren, no has esse debet persecuti? Usu ei stet definitionem, vel ad ipsum mentitum! Malis sensibus perpetua sed eu, vis ei legimus inermis? Sed ex verear ornatus gubergren, duo ei duis sapientem. Porro legimus efficiendi est in.  Lucilius adolescens his id, eu nec habemus oporteat! Tacimates inimicus contentiones ut mel, has omnis consul sententiae cu. Quo te veritus definitionem, veri mollis numquam vis in, te quo mentitum electram iudicabit. Sea et quis mutat, in autem debet dicant per, voluptua recusabo philosophia nec ei?


Intuitive explanation of the rank-nullity theorem

I understand that if you have a linear transformation from $U$ to $V$ with, say, $\operatorname{dim} U = 3$, $\operatorname{rank} T = 2$, then the set of points that map onto the $0$ vector will lie along a straight line, and therefore $\operatorname{nullity}T = 1$.   Can anyone offer an intuitive explanation of why this is always true?


How can I restrict various roles with limit in creating nodes of a particular content type?


Infinite while loop passing a string as a while argument on Java, the variable value doesn't change

Apologize for the nob question. I tried unsuccessfully to go through other similar questions but most of them were way more complex.  The problem I have is within the while loop. Even though I write "test" which is supose to be the end of the loop statement, stucks on it. Does anyone know what I'm doing wrong? Thanks in advance!      public static void main(String[] args) {     Metodos consulta = new Metodos();     int x;     String a=null, b=null;     Scanner n;        while(true){         while(a!="test")         {             System.out.println("Escriba la unidad de persistencia con la que quiere trabajar/n");             n = new Scanner(System.in);             a = n.nextLine ();             consulta.nombrePersistencia(a);             System.out.println("The value of a is: " +a);         }   Note: The command shows the value of a is test. This even cross me more!.


I have 3 view blocks on my page which show a list of blogs(nodes) with a pager. The issue is that whenever I click the 'next' or any link on the pager, all the blocks change, not just the one Im clicking on. Is there some option which unties the paging from the other blocks??


What happens when an unconscious creature fails their saving throw against a Banshee's Wail?

A  (MM, p. 23) has the Wail action:  Wail (1/Day). The banshee releases a mournful wail, provided that she isn’t in sunlight. This wail has no effect on constructs and undead. All other creatures within 30 feet of her that can hear her must make a DC 13 Constitution saving throw. On a failure, a creature drops to 0 hit points. On a success, a creature takes 10 (3d6) psychic damage.  If someone was already at 0 hit points (for example, having failed their saving throw against a different Banshee's Wail), what would happen if they fail their saving throw against this Banshee's Wail (assuming they still need to make a saving throw)?  The unconscious creature takes one step towards death, as though they took damage (thus making the saving throw meaningless, since they'd take a step towards death either way); The unconscious creature just dies (unlikely, but in case there's something written that would imply this hidden in the rules somewhere); Nothing, since this isn't damage, its just an effect (meaning the unconscious creature would be better off failing this save than passing in this case!) Something else...


Prove that the circumradius of $\triangle PAB$ is constant

Given two circle $\omega_1$ and $\omega_2$ which intersect at points $X$ and $Y$. Let $P$ be an arbitrary point on $\omega_1$. Suppose that the lines $PX$ and $PY$ meet $\omega_2$ again at $A$ and $B$ respectively. Prove that the circumcircles of all triangles $PAB$ have equal radius.    What I tried is not worth adding here.


Let $P$ be a $n\times n$ matrix, if there is $k\in \mathbb Z^+$ such that $P^k=O$, prove that $P^n=O$.   I have thought about characteristic polynomial, but it doesn't give me much information. So I think, base on the problem conclusion if there is $k$ such that $P^k=O$, then we see $\det(P)=0$. $P$ must have rank $< n$, and I have to show that every time I multiply $P$ to $P^m$, the rank of $P^{m+1}$ must less than $P^m$, how can I show this?


I'm trying to show that a continuous function $f:(a,b) \to \mathbb{R}$ with the mid-point convexity property is convex.  Midpoint convexity is $f((x+y)/2) \leq \frac{1}{2}f(x) + \frac{1}{2} f(y)$. Convexity is $f(tx + (1-t)y) \leq tf(x) + (1-t)f(y)$ for all $t \in [0,1]$.  Starting with $f((x_1 + x_2)/2) \leq \frac{1}{2} f(x_1) + \frac{1}{2} f(x_2)$, I could show   $$f((x_1 + x_2+ x_3 + x_4)/4) \leq \frac{1}{4} f(x_1) + \frac{1}{4} f(x_2)+ \frac{1}{4} f(x_3)+ \frac{1}{4} f(x_4)$$  Using induction I get for all $n$  $$f\left(2^{-n}\sum_{j=1}^{2^n}x_j\right) \leq 2^{-n}\sum_{j=1}^{2^n}f(x_j). $$  I can see that continuity lets me take a limit inside $f()$, but I'm not sure how to continue to prove the general property.


Is 220 V, 50 A equally dangerous for a person as 1A, 11000 V?

The question is self-explanatory. I'm a high school student so feel free to use scientific terms.


In 2019 we plan to give $25,000 to our 26 yr old grandchild.  All of our ready cash is in joint checking and savings accounts, with both names on the checks.  Can we write one $25,000 check as a gift without having to file the gift tax return?  If we have to write separate checks, must they be of equal amount.  Is there anything relevant in the timing of the gifts if two checks must be written?


How could it had happened vs How could it have happened

What is the difference between      How could it had happened   and      How could it have happened   It would be better if anyone can show its usage in some kind of situation.


We all know Snape was a double agent (Death Eater and working with Dumbledore), but in the Sorcerer's Stone, he had no idea that Voldemort had latched himself onto Quirrell. This is evidenced in that that Snape is suspicious about some of the actions that he linked to Quirrell, and also confronts him about. But in the scenes that we see them talking privately, they never talk about Death Eater stuff.  I have not read the books and maybe there are talks of it in there, somewhere. But I think it would ruin the whole 'Snape is actually a good guy' plot line, so is that the only reason Voldemort did not expose himself to Snape?  Snape was also one of Voldemort's 'trusted' followers, because he let him get the teaching job at Hogwarts to spy on Voldemort (according to my sources).  It just did not make sense to me after looking a little into the Harry Potter series and re-watching the movies and this was the first thing that struck me as odd.   Why didn't Quirrell tell Snape about Voldemort?


In a table generated by pgfplotstable, how can I highlight for each column or row the cell with the minimum value (e. g. displaying the corresponding entry in bold face)?  Example:


Years ago, when I lived in Greece, I saw crows from a close distance, but never with this peculiar colouration. Today I saw two individuals, both with these gray parts.   Location: Austria, Vienna. Pretty much in the city centre. Specifically Altes AKH Hof 2 near the rear yard of the department for East Asian studies.  Time: I am not sure. Probably before my lecture (around 10am) or after it (12am). I'll see, whether I find the timestamp of the picture anywhere.  Size: Now, at this I am really bad. I would say roughly the length of my boot, which is a 47-48 European continental size.   Behaviour: nothing interesting. Two of them came, stalked around the benches, did not make sounds and as far as I remember were gone quickly. They were not afraid of people.    My guess is  , but I have always been bad at identifying birds.  EDIT: Unfortunately, I didn't see the linked answer. But had I seen it, I would probably have assumed my bird wasn't Corvus cornix. The plumage  in the linked answer looks significantly more colourful. Whether you want to mark it as duplicate or not, I am fine with your decision, since I have little practice in identification. However, I find the answer here more detailed when it comes to differentiating C. cornix from other corvids. The linked answer only states the results. The answer here teaches us what to look for!


I've started learning LaTeX recently from  and I'm using  to compile the LaTeX code.  I'm having a simple document with 3 sections         Contents   Abstract   Introduction      \documentclass{article}  \begin{document} \tableofcontents  \begin{abstract} Abstract goes here... ... \end{abstract}  \section*{Introduction} This is introduction \end{document}   Which looks like this    How can I made these three sections(Contents, Abstract, Introduction) appear in separate pages in my document.


What is the maximum value of $x^2+y^2$, where $(x,y)$ are solutions to $2x^2+5xy+3y^2=2$ and $6x^2+8xy+4y^2=3$. (calculus is not allowed). I tried everything I could but whenever I got for example $or$ $x^2+y^2=f(y)$ or $f(x)$ the function $f$ would always be a concave up parabola, so I could not find a maximum for either variable. However, I also don't see how you could solve it if you leave both variables on one side. And by the way I know that you can solve for $x$ and $y$ using the quadratic formula and get $4$ different solutions but I am looking for a much more efficient way than that.   This question came from a math competition from the Math Honor Society, Mu Alpha Theta.


JavaScript regex to match any of several terms

I seem to have confused a lot of people with this question so let me state what I want to do as simply as I can.  I want to search a text string for words that begin with "mak", "mind" and "mass" and end with either nothing extra or "e" or "er". That would be "mak", "make", "maker", "mind", "minde", "minder", "mass", "masse", "masser".  I am trying to match certain words in a text if they start with specific letters and end with specific letters. I am using the following regex:  aray = ['mak','mind', 'mass']; for(i=0; i < aray.length; i++){     searchTerm = new RegExp(         "\\b" + aray[i] + "\\b|" +         "\\b" + aray[i] + "en\\b|" +         "\\b" + aray[i] + "er\\b");     word = testText.match(searchTerm, "gi"); }   The problem is that when the first instance is matched the other instances are not searched for. Could someone point me in the right direction. Any help would be greatly appreciated.  This question has been flagged as a duplicate but the other question does not answer the points I am having difficulties with.


Making a deep copy of a struct with arrays in it?

After googling I've learned that it's not possible unless you do it manually. Take this code for example:  public struct SEverything {     public int[] arrayOfHouseNumbers;     public string nameOfOwner; }   I only know of a very cumbersome way to copy it and that's to create a new struct and do it like this:  private void CopySEverything() {     sEverythingCopy = new SEverything();     sEverythingCopy.nameOfOwner = sEverythingOriginal.nameOfOwner;     sEverythingCopy.arrayOfHouseNumbers = new              int[sEverythingOriginal.arrayOfHouseNumbers.Length];      for (int i = 0; i < sEverythingCopy.Length; i++)     {         sEverythingCopy[i] = sEverythingOriginal[i];     } }   I'm using a much more complicated struct and it would be really annoying to do the above for a big struct, not to mention that if the structure of the struct is changed, the code has to be rewritten. Any advice is very welcome.  e: is serializing and deserializing a good option?


A meaningful distinction between determinism and causality

Causality is generally accepted to be a fundamental physical principle. But quantum mechanics is acausal (e.g. there is no 'why' as to the result of a measurement of the position of a particle in an infinite 1D square potential well). In which case what is a distinction between causality and determinism, that has a meaningful non-acausal definition of causality.  It seems to me that "causality = determinism + quantum mechanics". It seems that it doesn't provide any new concepts, it's just a flawed attempt to reconcile determinism with the arbitrary probabilistic nature of QM, which are ultimately unreconcilable. Does anyone agree with this idea? If not, I would like someone to try and convince me that I'm wrong.  I am fully aware that a lot of threads barking up this tree, and I have tried reading many of them, but none seem to crystallize my problem very well.


How to make Chrome save websites for offline use automatically

I was using Chrome when the power went off and the internet was cut for about 10 mins. So I was wondering if there was an app that automatically saved the websites I visited in Chrome, and made them available for offline use. May be an extension or procedure?


Placing spheres in a perfect circle on a ring

I am trying to place multiple spheres on a circle ring but am finding it really hard to get them into position. Is there an quick method to accomplish this or is there a tutorial that teaches such stuff.  Below is a quick illustration of what i want to achieve


How can I see previews of images, if I want to attach a file to a mail in thunderbird?  My "file open" dialog looks like this:    There are several images files with file extension ".jpg".   I would like to see the preview of all images file at once.  I am using Ubuntu 18.04  If I use nautilus, I see the previews. That's how I would like it to be:


Drawing arrows from one side of a rectangle to other nodes without suitable anchors

I'd like to draw dashed lines from the right (east) border of one rectangle to the west anchor of two other rectangles, but the line should be horizontal. Is there an elegant way to decide where the line should start? See the following image as a clarification: the delta node should have two horizontal arrows pointing to the a_h and a_l boxes. I've played around with angles, which is almost impossible to get right because I can only estimate the correct value and it's unlikely to serve as a perfect match for the starting point of the arrow.  Current example code:  \begin{tikzpicture}     [         inverter/.style={rectangle,draw,inner sep=2pt,minimum size=6mm},         dot/.style={circle,inner sep=0pt,minimum size=0.5mm,draw,fill=black}     ]     \node (x) at (0,0) {$x$};     \node (delta) at (1,0) [shape=rectangle,draw,minimum height=18mm,minimum width=6mm] {$\delta$};      \node(ah)     at ( 2,  0.5) [inverter] {$a_h$};     \node(al)     at ( 2, -0.5) [inverter] {$a_l$};      \draw [->,dashed,dash pattern=on 1pt off 1pt] (delta.58.75) -- (ah);     \draw [->,dashed,dash pattern=on 1pt off 1pt] (delta.-58.75) -- (al); \end{tikzpicture}   This code is clearly ugly and broken. It is easy to see that at least the upper arrow is by no means perfectly horizontal. How do I do it correctly?


call on dynamic added html elements a jQuery method

my have some trouble to call a JavaScript/jQuery 1.9.1 method on dynamic added html-elements.  Here is my JS-code:  $(".download").live("click", function() {     var buttonId = $(this).attr("id");     alert(buttonId); });   My dynamic HTML code:    var html = "";     for(var i = 0; i <daten.length; i++) {        html += "<input id='" + daten[i].pfad + "' class='download' type='image' width='25px' height='25px' src='/download.png'/>";     }   $("#table").append(html);   I get no error message, but the method is besides not calling, what is here not correct?


Need help getting this color effect look

I've been trying to get a similar look as the photos in this image with the different color effects. I've tried messing with different blending options and even tried different gradient maps. However, I can't seem to get it quite right. Does anyone know what I'll need to do to achieve this one color effect for each photo?


Like a dummy I deleted the Ubuntu partition on my hdd and restarted my computer. Now when it boots up I get   Error: no such partition Grub rescue>   I don't have a asus repair disk nor a Ubuntu disk I'm using my iPhone as I don't have anything else. Am I screwed or is there a fix?


when initializing view in fragment i got a nullpointerException at getcontext()

I'm initialing imageview at DailyCardView.java which are called by a fragment. But it keeps showing nullPointerException. I really don't know where went wrong... Guys help me><  I tried getRootView() to get view of Fragment so i can code:iv=(ImageView)getRootView().findViewById(R.id.iv); But it still not work.  **//Fragment** @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     View view = inflater.inflate(R.layout.home_fragment, container, false);     dailyStackLayout = (DailyStackLayout)view.findViewById(R.id.dailyStackLayout);     dailyStackLayout.setDatas(dailyFoodList);     return view; }  **//DailyStackLayout** public DailyStackLayout(Context context) {     this(context, null); } public DailyStackLayout(Context context, AttributeSet attrs) {     this(context, attrs, 0); } public DailyStackLayout(Context context, AttributeSet attrs, int defStyleAttr) {     super(context, attrs, defStyleAttr);     init(); }  public void init() {     params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);     scaleY = DensityUtil.dip2px(getContext(), BASESCALE_Y_VALUE); } public void setDatas(List<DailyFood> dailyFoodList) {     this.dailyFoodList = dailyFoodList;     if (dailyFoodList == null) {         return;     }     for (int i = index; index < i + STACK_SIZE; index++) {         dc = new DailyCardView(getContext());         dc.bind(dailyFoodList.get(index));     } }  **//DailyCardView** public DailyCardView(Context context) {     super(context, null); } public DailyCardView(Context context, AttributeSet attrs) {     this(context, attrs,0); }  public DailyCardView(Context context, AttributeSet attrs, int defStyleAttr)  {     super(context, attrs, defStyleAttr);     init(context); }  public void init(Context context) {     if (!isInEditMode()) {         inflate(context, R.layout.item_daily_card, this);         iv = (ImageView)findViewById(R.id.iv);     } } public void bind(DailyFood dailyFood) {      if (dailyFood == null) {return;}     if (!TextUtils.isEmpty(dailyFood.getId())) {         Glide.with(**iv.getContext()**)  // **NullPointerException**!                 .load(Constant.Daily_URL+dailyFood.getId()+".jpg")                 .into(iv); }   I expect to load the image right but it went wrong at getContext().


SEO for importing the page header with JavaScript rather than PHP

My website has the same header/sidebar/footer on every page, so I have been importing them using PHP. To do this I forced all html files to be processed through the apache servers PHP handler via htaccess. I have come to understand that is not necessarily the best thing to do and so found out how to do everything I need using simple JavaScript. I also store a variable in the initial page that then gets used in the imported html.  Questions: By switching from:  <?php include "_header.html";?>   to  <script type="text/javascript" src="_header.js"></script>   I am noticing that the "view source" shows the header.js link, whereas the PHP method will show the source as if the html had been there all along. Will search engines recognize the html in the JavaScript just as they would when loaded with PHP?  I understand it is bad practice to alter the page contents -after- it is downloaded, but this doesn't fall into that category does it? That would detail things like after a wait function, or after user interaction, correct?  Are there any other foreseeable downfalls to switching to JavaScript and turning off the forced PHP processing?


How can we explain, from quantum mechanics, why do we see light rays bend when light goes from one medium to another?

Refraction: I want a qualitative Quantum Mechanical explanation of why do we see light rays -in the classical picture- bend when light goes from one medium to another. I read that it is due to conservation of energy and momentum, but haven't found an explanation about the reason of the change of angle. Reflection: again a qualitative explanation of why the angle of incidence is equal to the angle of reflection.    EDIT 1: what I am looking for is really an explanation about what interactions are the photons going through(like absorption and emission by molecules for example) that when we take all the photon's interactions into account give us the macroscopic picture of how light reflects and refracts.    EDIT 2: I really want an answer containing the reason for why we get the angle of incidence is equal to the angle of reflection and why the angle if refraction is as it is.


barrel shifter using multiplexer: how to go about it

I am trying to under stand how to build a barrel shifter using multiplexers. I understand how the barrel shifter works but I don't get how you decide the number of multiplexers to use, and how the shifting is done with the multiplexer basically.  So far wikipedia doen't help much. And the best I have so far is   But it does not really answer my question.


How to add date criteria to query function?

I am using query function to copy all data from sheet1!A2:B10 to Sheet2 if B column is equal to specific data/time. Lets say A1 = 5 April 2021 A2:A10 names B2:B10 has Timestamp And I used this formula Query(sheet1!A2:B10," select * where B=A1+31/24",0) which means query all data if B = 6 April 2021 07:00 But query doesn't accept such format. Any thoughts? one Idea to create a column C where I put the date/time static (6 April 2021 07:00) and use query(sheet1!A2:C10,"select * where B=C",0) but seems I have to convert column C to text as well..


How do I resize pngs with transparency in PHP?

I'm attempting to resize pngs with transparent backgrounds in PHP and the code samples I've found online don't work for me. Here's the code I'm using, advice will be much appreciated!  $this->image = imagecreatefrompng($filename);  imagesavealpha($this->image, true); $newImage = imagecreatetruecolor($width, $height);  // Make a new transparent image and turn off alpha blending to keep the alpha channel $background = imagecolorallocatealpha($newImage, 255, 255, 255, 127); imagecolortransparent($newImage, $background); imagealphablending($newImage, false); imagesavealpha($newImage, true);  imagecopyresampled($newImage, $this->image, 0, 0, 0, 0, $width, $height,  $this->getWidth(), $this->getHeight()); $this->image = $newImage;   imagepng($this->image,$filename);    Update By 'not working' I meant to say the background color changes to black when I resize pngs.


Audio and video segments are not the same length

I have a bunch of videos recorded from a Samsung Galaxy S6. They all have a resolution of 3840x2160 and are supposed to be at 30fps. The weird thing is, some of the clips have video segments twice the length of the audio. In Blender my project's framerate is set to 30fps.  Looking at the source files in VLC, all the video framerates are about 30fps. Why is it that some of the files imported have video segments twice the length they should? For example, the video segment will be 400 frames, and the audio will be 200. I can set Blender's expected frame-rate to 60, which causes the a/v to line up. But then the video plays back poorly (since it was not 60fps to begin with, something is messed up).  Note the following information reported by VLC.  Codec: H264 - MPEG-4 AVC (part 10) (avc1) Resolution: 3840x2178 Display resolution: 3840x2160 Frame rate: 29.981651 Decoded format: Planar 4:2:0 YUV


What is the difference between the probabilistic and non-probabilistic learning methods?

What is the difference between the probabilistic and non-probabilistic learning methods for different situations? When is one considered more appropriate than the other? Can you give me examples?


Recover deleted pictures from the partition of a formated hard drive

How do i recover the deleted pictures from the partition of a formated hard drive. I have an old hard drive that has a partition where I hid my pictures after I formated the hard drive but how do I do this?


What’s the difference between these two “she saw”, “she has seen”?

I want to ask you what is the difference between these two sentences:     She has seen the real meaning in these messages      She saw the real meaning in these messages   And to know if both of them are grammatically correct. I know that saw is standalone word and seen is used alongside has, had, have etc. But what’s the difference between these two?


Can we have ternary operator in DIV tag -- LWC

Can we write  ternary operator in DIV tag on LWC as below.  <div class = if:true= {showleftDiv} ? slds-size_4-of-6 : slds-size_4-of-6 >


Site being repeatedly hacked: any useful tips for tracking down entry point?

I'm suffering from a spam hack where my site periodically starts to show Viagra spam to Google and other spiders. The method of the hack is basically that my .htaccess file gets modified to route all requests through a file called "common.php", which is a big chunk of base64 encoded evilness.  I've noticed it happening on a weekly basis: every time I remove the hacked files, it pops back up a few days later. These are the steps I've already taken to secure things:   Changed my FTP password Scanned my (shared hosting) directories for world-writable (777) files/folders and changed them to 755 or something more appropriate Removed old copies of Wordpress from unused directories (the site itself is a custom-written PHP CodeIgniter app) Downloaded the entire site to my local box and scanned the directories for occurences of strings like "base64" and ".ru" (spam domains?).   I'm a little uncertain what to do next as the problem still seems to be there. Is there some smart shell command I can run to figure out how these files are being uploaded? When I last checked, the .htaccess file was edited today by my own FTP user despite me changing the password a week ago and logging out any logged-in users. I don't leave it logged in on public machines, and a few other administrators of the site haven't been given the new password yet.  Any tips / ideas gratefully received. I'm happy to provide the output of any specific commands as needed.  Matt


Probability in QM: derivation or interpretation?

It is known that coordinates $C_k\in\mathbb{C}$ of the QM-state vectors $|\psi\rangle$ has an interpretation as probability weights $p_k$ in the whole state through the formula like $|C_k|^2=p_k$. We thus have the two (independent) math operation on the coefficients: making a modulus $C_k\to |C_k|$ and their squaring $|C_k|\to|C_k|^2$. Does anybody know a derivation of that transition, i.e., $C_k\to |C_k|^2=p_k$, from plausible/forceful physical arguments? The key words in the question are 'derivation' and 'forceful'. In other words, can we throw out the word 'interpretation' in the context and derive the rule $|C_k|^2$ is a probability weight? And reversely, the probability weight is exactly $|C_k|^2$ and only this formula?  I've knew right now about the 2005 paper by Aaronson but observed there the following. He begins there with a norm of the space, not with a scalar product of two independent vectors of $H$. The problem here, in my view, is that I prefere the object $(\psi,\phi)$ to be more fundamental (in the QM context) than $(\psi,\psi)$. This is because the derivation of the former requires some extra/exotic arguments on properties of the norm (polarization procedure). Consideration in the reverse direction does not. So, one could rephrase the question about 'interpretation/derivation' of $|(\psi,\phi)|^2$, not about $|(\psi,\psi)|^2$.


Find files with matched whole lines from a file

I have a file with this content: $ cat compromised_header.txt some unique string 1 some other unique string 2 another unique string 3  I wanted to find all files that have all the lines of above file exactly in the same order and those lines have no intermediary lines in between. Example input file: $ cat a-compromised-file.txt some unique string 1 some other unique string 2 another unique string 3 unrelated line x unrelated line y unrelated line z  I tried using below grep: grep -rlf compromised_header.txt dir/  But I wasn't sure it will give the expected files as it will also match this file: some unique string 1 unrelated line x unrelated line y unrelated line z


How to determine what filesystem a directory exists on?

I have an NFS share which is shared across about two other machines. I recently realized that one of the servers isn't sharing the directory and is keeping files all for itself. Is there a way to see if the NFS share is mounted in the directory I think it is in?


Is there a ubuntu server minimal installation? or is just 4gb/6gb base of installation without the packages, other feature installation?


I took out a Pork Roast that was completely frozen solid (double wrapped) and set on counter. Forgot about it until 6 hours later but it was still frozen. Just started feeling a bit soft on top but not deep - just barely - just surface. Is it still safe to eat? I put it in fridge overnight to complete the thawing process.


For the circuit given below the voltage across the resistor is definitely 5V. If we add more than two sources the voltage will remain same as before.   If we try to analyze the circuit with superposition then first we have to make one of the source inactive. If we make one voltage source inactive then we can find the voltage 0V.  After that we have to make inactive the another source. At that time the voltage remains 0V.   So if we add the two voltages according to superposition theorem the voltage across the load is 0V. How???


I want to play cricket 2002 using wine or play on Linux?

I want to play one specific game EA sports Cricket 2002 using wine or play on Linux,This game runs properly only in Windows 98 or Windows XP .Do anyone knows on which particular wine version I can play this game and how to install that version of wine.Which repositories of wine are currently open to play this game.Edit:I am not able to play on current releases of Wine and play on Linux it hangs when i try to run executable 'exe' file,I've tried changing settings using configure wine and winconsole cmd with parameter --nointro.Though I am successful in playing one more game swat3 demo using wine and call of duty?


I was doing some queries on the Data Explorer and I noticed that the post Body is stored in HTML format instead of Markdown like I expected.  I'm interested in parsing this HTML () to convert to a different markup language.    For this parsing, it would help to know if a particular subset of HTML tags are used.  (i.e. <b> is never used, or something similar)  Is there a listing of such tags?


How to find all the available tools in mac terminal?

I am trying to setup a bunch of development projects in my Mac. I have to run various tools like python, ruby, scala, groovy etc.  To see if a tool is available I use options like   ruby --version.    Instead I would like to see all the list of tools available in Mac terminal via a single command. What is the command/options for it?


How to create text as a link in the comments?

I want to display my text as a hyperlink in the comments. How can this be achieved?


What's the purpose of programming to an interface?

I have surprisingly never understood the purpose of doing this:  Map telephoneNumbers = new HashMap(); List<Object> list = new ArrayList<Object>();   instead of doing this:  HashMap telephoneNumbers = new HashMap(); ArrayList<Object> list = new ArrayList<Object>();   ?


I need both quadratic and linear coefficients in a GLM with binary response. What's the best option?

I have three predictors and one response. What can I do if my response variable is binary?


I'm trying to submit an article to a journal with an automated system that requires a list of references in plain text. Is there some way of automatically converting my bbl file into plain text (something that I can just copy and paste into a text box, without ligatures etc)?


I am can't install ubuntu on my windows xp Dell Inspiron laptop. I keep getting the error message saying I need to look at this file, which I can't locate: C:\docume~1\russla~1\locals~1\temp\wubi-14.04-rev286.log. I have downloaded the relevant files. What can I try next?


I have a proof of a result in number theory, shorter than the existing proofs. Can such results be published and how?

Actually I'm proving that ∀n∃p∈P|n<p<en. Which is a result similar to Bertrand's Postulate, but with a shorter proof. Should I publish my result? If so, as I'm not affiliated with any Research Institute how do I do that?  Edit  Since yesterday I've improved my proof: ∀n∃p∈P|n<p<2n. This means I'm proving Bertrand's Postulate with a simpler and shorter proof. So, which is the most appropriate Journal to publish this result?


I have observed that many big and well-known game developers often develop their own engines. Examples include Valve, Crytek, Ubisoft, Epic Games and Square-Enix.  Could it simply be because they can, or is it likely that existing engines do not meet enough requirements, so we would develop our own? I can hardly imagine a game that requires a specific engine. The likes of of Unity or Unreal are simply enough to make any kind of game; even if not, they have source code, which can be modified to satisfy even some extraordinary needs.    Why would a game developer write their own engine instead of using existing ones?


How can we get access token url and authorize url in rest console oAuth authorization?

I am new i rest api and salesforce. I am trying to connect rest console with salesforce. For setting oAuth authorization i need access token url and authorize url. Where would i get these values from ? I have attached the screen shot. plz help..


I've got a .txt file like this:    I want to get it like this:    I'm thinking I need to replace /(beginning of line)(new line character)/.


How do I trace an image and place it over a different background?

Warning: Total photoshop newb!  I recently got a cool image of my fiancee and I holding hands and showing off her engagment ring. The backdrop is the beach:    I tried to trace an image using a combo of the laso and magic wand tools to select my target. Then I used that to pull out the target as another layer.  I then pasted in a background gradient.     Ended up with a really lame photoshoped looking picture. Notice the white lines where I didn't get the arms close enough and the choppy spots where I got too close.    So what's my main problem here?   Is their a way to bet a better cutout? Is their a blending tool that will make the background look more natural? both   I tried a dozen or so tutorials I found in google searches but they just don't blend these types of images together in any of them. Thanks in advance.


The order of a non-abelian group is $pq$ such that $p<q$. Show that $p\mid q-1$ (without Sylow's theorem)

The order of a non-abelian group is $pq$ where $p$ and $q$ are primes such that $p<q$. Show that $p\mid q-1$ (without anything to do with Sylow's theorem).    How to start? I tried already some number theoretic approach using Bezout's identity. But, nothing worked out with me.


Search Linked List with User Input - Java

I have created my linked list and I wish for the user to enter a Station and then the output is the number stored for that station.      LinkedList myList = new LinkedList();                myList.addFirst("London", 5);                   myList.addNode("Manchester ", 10);        myList.addNode("Liverpool", 20);       myList .addNode("Birmingham", 50);   This is the input for the user to enter.            String name;                             name = JOptionPane.showInputDialog("Enter Station: ");      StringNode  temp;         temp = mylist.head;         if (temp.Station == (name)) {              System.out.println("Yes");          }   The rest of the methods are just adding a new data and printing.  Thanks


Most efficient way to concatenate strings?

What's the most efficient way to concatenate strings?


I posted  on meta.math.SE, for some reason not realizing that this might be relevant to the entire network. I'll repeat the question here, with rephrasings to suit.  I have successfully reproduced the bug on a (now deleted) comment to this very post, so the bug seems to be network-wide.    The comment editing functionality recently underwent a cosmetic change. When pressing the "edit" button, instead of (at least seemingly) replacing the original comment with a text box for editing, it now makes the text box appear below the comment. It felt strange at first, but I've since grown accustomed to it. I don't know why such a change was needed, but it's fine, and that's not what this post is about.  This post is about the fact that the "edit" button doesn't disappear after you click it and the textbox appears. And it doesn't stop functioning either. Thus you can open multiple text boxes. I cannot imagine that this is intended design.  Below is a picture of what happened after pressing the "edit" button on a comment in the original thread four times.    I have tried to edit that same comment using one of the boxes (one of the ones with the comment text already placed in it and with a "Save Edits" button next to it). The comment stayed unedited. As far as I can tell, pressing any of the "Save Edit" buttons or "cancel" buttons will close all the boxes.  In case this is browser dependent, I am on Chrome Version 68.0.3440.84, on Windows 7.


I see a CONFIGURE, autogen.sh and a makefile but I can't seem to figure out how to install this.   Can someone help explain what I need to do to install this?


if B is n square matrix anad invertible then $\text{rank}(AB)=\text{rank}(A)$

If $B$ is $n$-square matrix and invertible , how can we show that   $\text{rank}(AB)=\text{rank}(A)$ for every $m\times n$ matrix $A$?


Pipe all input and output of terminal to file

I do not know if this is even possible or not, but in an attempt to keep track of many changes I am about to make to my system I want to track all input I type and all output from a terminal I'm working with to a file. I've been messing around trying to do this and here is what I have so far:  bash > /tmp/output.txt  This has some quasi success. I tested this with something simple: sudo apt-get update && sudo apt-get upgrade which dumped the normal output to the file, but not what I typed in.   Additionally I'd like to be able to see the output as well as have it stream to my output file, just for readability. (This can be worked around with a second terminal running tail -f, but it'd be nice to have it in one place).


How to find number of prime numbers between two integers

I have two integers, x and y so that x < y. How many prime numbers are there between x and y (exclusive). Is there a formula or algorithm to compute?


Changing the username in terminal in Ubuntu 14.04

I recently purchased a second hand Dell Latitude laptop with Ubuntu 14.04 installed in it. After playing around with it, I've managed to change the hostname of the computer, such that it displays my name as the hostname. I mean- when I open the terminal, I get: user1@Manish_Giri:~$   My question is - how do I change the part which says "user1"? I'm not sure if this part is the "username", because my username as displayed in System Settings > User Accounts > My Account is something else. Here's a screenshot.    I'd rather have my name displayed as the username part in terminal, instead of "user1". I've no idea how to modify this. Can someone please help?  Many thanks.


Local Noetherian ring, Krull dimension n > 1

Let $A$ be a Noetherian local ring such that your Krull dimension is greater than 1, show that $Spec(A)$ has an infinity many points. I have been trying with the following idea; I take a chain of ideals in it, there must be a maximal $Max_A$ and a minimal $Min_A$, and ideals between them, I suppose there is a finite number of these, but I still can't arrive the conclusion. I would like to get some recommendation or other way for the proof. Thanks for all.


Is there a way of updating blender with all of my files contained?

I want to update blender to the latest version, 2.77, I'm currently using 2.75, and I know you can update blender by reinstalling the program, but my only concern is that would my files be imported into the next version.   And if not, how would I do so?


Question about definition of random sample

In my statistics class, we're just beginning to talk about (point) estimation. I have a small question that might actually be due more to notation/definition than anything very conceptual:  Say you have a population $P$ of students in a classroom and you want to find the mean height by randomly selecting $n$ students $s_1,...,s_n$ in $S\subseteq P$ to measure. My book calls $X_1,...,X_n$ a random sample. I'm just a little confused as to what $X_i$ is defined to be (what $X_i$, as a random variable, is mapping from). In this example, my book would say {$X_1,...,X_n$} are the respective heights of the $n$ randomly selected students. Just to make sure I have the right picture in my head: $S$ is the ("first") sample space and $X:S\to\mathbb{R}$ is a random variable ($X$ is the "height" function defined on $S$). We denote $X_i$ as the restriction of $X$ to the $s_i$-th student in $S$. That is, we define $X_i:${$s_i$}$\to\mathbb{R}$ so $X_i(s_j)$ is not defined for $i\neq j$, and:   $X_1(s_1)=X(s_1)=x_1$  $X_2(s_2)=X(s_2)=x_2$  $.$  $.$  $.$  $X_n(s_n)=X(s_n)=x_n,$ where $x_1,...,x_n$ are the respective heights of the $n$ students. Then $Range(X)=${$X_1(s_1),...,X_n(s_n)$}$=${$X_1,....,X_n$} is considered the new sample space that we define the pmf/pdf $f$ on, where $f:\mathbb{R}\to\mathbb{R}$ and $f\circ X(s_1)=f(x_i)$.   Is this the right idea?


Rigid Body animation just falling (not colliding)

I have followed this tutorial at the end of the video to a T and when I play the animation, the bullets just fall straight to the ground and land with literally no change. In the tutorial they start to "float" in different directions as they fall which makes them scatter once hitting the ground. I have all the settings exactly the same so no idea where I went wrong. Any ideas??? See photo of after I play the animation. This is the tutorial. Fast forward to about 2 hours.


Why is elliptic curve cryptography not widely used, compared to RSA?

I recently ran across elliptic curve crypto-systems:    (Brown University)  (Wikipedia)  (IEEE)  (RSA.com)   It seemed to me to be great alternative to RSA as the de-facto cryptosystems to be used in banking and financial systems and in the public key infrastructure for certificates, but is not used! If someone can explain why this is not done, it would be very helpful. A comparison between traditional RSA and an elliptic curve cryptology would be helpful.  To begin with:  Advantage of RSA:   Well established.   Advantages of elliptic curve:   Shorter keys are as strong as long key for RSA (see the IEEE paper) Low on CPU consumption. Low on memory usage.


Whoa! The search results just gave me a book!

So, the latest question here on Meta prompted me to do a quick search for . Everything looked all fine and dandy until I switched to the votes tab, where I was prompted with this nice book of text on my screen:           What did I break? o.o I'm pretty sure I'm not supposed to be presented with that much text.


Flux through a sphere due to a charge outside of it

A point charge of $\rm+5.00 μC$ is located on the $x$-axis at $x=\rm5.00m$ , next to a spherical surface of radius $x=\rm4.00m$ centered at the origin.  According to Gauss's law, the net flux through the sphere is zero because it contains no charge. Yet the field due to the external charge is much stronger on the near side of the sphere (i.e., at $x=\rm4.00m$) than on the far side (at $x=\rm-4.00m$). How, then, can the flux into the sphere (on the near side) equal the flux out of it (on the far side)?  My Thoughts:  I know that the flux should be zero. I drew a picture, with the charge to the right of the sphere and drew lines radially from the point. However, I can't seem to wrap my head around why the net flux is zero. If I go through adding up all the $\rm\vec{E}.d\vec{A}$'s, does it have to do with the $\rm d\vec{A}$ being the opposite direction of the field on the close side to the particle, so flux is negative, but on the top, bottom, and left (front and back as well) sides of the sphere, the field is in a similar direction so flux would be positive?


The number of subsets of a set of cardinality $n$

Please help with this question. Show that for a finite set $A$ of cardinality $n$, the cardinality of $P(A)$ is $2^n$, where $P(A)$ is the power set of $A$. Thank you in advance for any help that is given.


Increase Windows taskbar thumbnail/preview size

Is there a way to increase the size of the mouse-over thumbnail size for Windows 7 task-bar items?  Ie, if I have multiple file explorers open and mouse-over them it would be nice to have larger, higher detailed thumbnails that were more indicative of the contents of each.  I do know that if you mouse-over them, the desktop shows you which one it is by fading the rest of the windows but I would still like to be able to increase the thumbnail size.


Mint 18.2 64b Cinnamon 3.4.3   This is running in a VM on my machine so I'm not worried about login security. I've been looking around on the Mint forums and only found a lot of threads about troubleshooting problems with autologin.   The setting is not in the Login Window settings screen.   The setting is not in the Users and Groups settings screen.   Where is this setting located now?


Move \tag to right side of line in align* environment

I am currently trying to label an line in an align* environment using \tag; however, the tag appears on the left side of the line instead of on the right. How do I move this label to the right side?  Thank you!   %latex \documentclass{amsart} \usepackage{amsmath} \usepackage{amssymb} \usepackage{pgfplots}  \begin{document} \begin{proof}     We begin by formulating the profit maximization problem and taking the first order condition.     \begin{align*}         \max_q \left(pq-C(q)\right) \\         \max_q \left(pq-10q-q^2 \right) \\         \frac{\partial \pi}{\partial q}=p-10-2q=0 \tag{First-Order Condition}     \end{align*}     We then formulate market balance by substituting $nq$ in for $Q$.     \begin{align*}         p=100-6Q \\         p=100-6nq \tag{Market Balance}     \end{align*}     Lastly, we write the expression for profits for a firm and set this equal to zero.     \begin{align*}         pq-C(q)=0 \\         (100-6nq)q-10q-q^2=0 \tag{Equilibrium Entry}     \end{align*} \end{proof} \end document


I have a special page for floats (i.e., with [p]). In my real code it is a longtable in a table. Because of space issues I want to change the margins of the page with that float. How do I set a new geometry only for the float pages?  This is not a duplicate of the linked question as that solution does not work in the case of a float page.  An MWE with a \hrule to indicate the margins of the float page:  \documentclass[a4paper]{article} \usepackage{geometry} \usepackage{lipsum} \begin{document} \lipsum[1]  \begin{figure}[p]     \hrule     \caption{A horizontal rule.} \end{figure} \end{document}


What are the benefits of paying for SSD storage when it comes to webhosting? I know that SSDs have better read speeds is that necessarily better or is it negligible?  I have sites that use databases with php so will it really benefit me to pay extra for SSD storage? I read somewhere that SSDs increase fetching times from the db but also read stuff that are contrary to it and the fact that I can cache mysql results using apc or memcached so kind of confused, can someone shed some light please?


Can you change the default layer color codes in Illustrator?

For some of my daily tasks, I work on white in a template with 6 default layers, and the default seventh color is a bright yellow that clashes hard with white, kind of impossible to focus on. Is it possible to either  A) remove yellow and other light colors from the queue of colors Illustrator uses for layers? B) specify which colors I want it to cycle through?  Or do I just have to stick with the workaround - keep a yellow-coded layer inactive strictly so it will cycle to the next color (grey, which is also less than ideal)?


How to use tcolorbox with ieeeaccess.cls?

Whenever I try to use tcolorbox with ieeeaccess.cls, the main title and section topics disappear!! anyone know what the problem is? Thank you in advance.   Here, without using tcolorbox.   Here, using tcolorbox.  Here is an example code.   \documentclass{ieeeaccess} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{graphicx} \usepackage{textcomp} \usepackage{longtable}  \usepackage{flexisym}  \usepackage{graphicx} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{mathtools} \usepackage{algorithm2e} \usepackage{algpseudocode} %\usepackage[breakable]{tcolorbox} %when this package is used, the main title and section topics disappear.  \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em   T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} \begin{document} \history{Date of publication xxxx 00, 0000, date of current version xxxx 00, 0000.} \doi{10.1109/ACCESS.2017.DOI}   \title{Preparation of Papers for IEEE ACCESS}   \begin{abstract} abstract. \end{abstract}   \titlepgskip=-15pt  \maketitle   \section{Introduction} \label{sec:introduction} \PARstart{T}{his} first section  \subsection{subsection} subsection   \section{Second Section} This is the second section \section{Third Section} This is the third section   \EOD  \end{document}   Please note: 1- Unfortunately, ieeeaccess.cls requires IEEEtran.cls class, so to compile this example you need IEEEtran.cls to be in the same directory with ieeeaccess.cls. You will get both classes when you download the official LaTeX template for IEEE Access.   2- Another option is; you can down the official LaTeX template for IEEE Access from the official website, then add the package  \usepackage[breakable]{tcolorbox} to see the problem.   Click  for the official website for IEEE Access LaTeX template


Let $X_1, X_2, \cdots,X_n$ be independent and identically distributed random variables having an exponential distribution with mean $\frac{1}{\lambda}$.  Let $S_n=X_1+X_2+\cdots+X_n$ and $N = \text{inf}\left\{n \geq \ 1:S_n > 1\right\}$. Then $\operatorname{Var}(N)$ equals   1 $\lambda$ $\lambda^2$ $\infty$   I don't understand the question and only thing I could deduce from the question is that $S_n$ has variance $\frac{n}{\lambda^2}$. Can somebody please explain what the question demands.