Particle in infinite potential well which is doubled in size at $t_0$

I am currently studying for an exam in Quantum Mechanics and came across a solution to a problem I have trouble with understanding.  The Problem:  A Particle sits in an infinite potential well described by  \begin{align} V(x) &= 0, & 0 \leq x \leq L \\ V(x) &= \infty, & \text{otherwise} \end{align}  We know that the energies are given by $E_n = \dfrac{n^2 \pi^2 \hbar^2}{2 m L^2}$ and $\Psi(x) = A_n \sin(n \pi x /L)$.  At time $t_0$ the potential well is suddenly doubled in size, such that the potential is now  \begin{align} V(x) &= 0, & 0 \leq x \leq 2L \\ V(x) &= \infty, & \text{otherwise} \end{align}  So the energies are now given by $\tilde{E}_n = \dfrac{n^2 \pi^2 \hbar^2}{2 \cdot 4 m L^2}$ and $\tilde{\Psi}(x) = \tilde{A}_n \sin(n \pi x /2L)$.   If the particle is in the ground state of the potential well before the change, what is the probability to find the particle in the ground state of the new potential after the change?   This is absolutely clear to me. We find a non vanishing probability as a result. But now it gets tricky:   What is the expectation value of the energy of the particle directly after the change? How does the expectation value of the energy evolve in time?   The solution suggests that the expectation value of the energy does not evolve in time, which is clear to me, since the Hamiltonian is time independent and thus energy is conserved. But it also suggests that the expectation value does not change after we double the width of the potential wall which I understand from the argument of energy conservation but not in terms of quantum mechanics. If the probability that the particle is in the state $\tilde{\Psi}$ does not vanish the particle could have the energy $\tilde{E}_n$ which is lower than $E_n$ and this would mean that the expectation value of energy could change (with a given probability).  What am I missing here, where is my mistake? Any help is appreciated!


What's a word that means intentionally gullible?

I'm looking for a word to describe someone that is easily persuaded to believe things that they are aware is likely to be too good to be true. Something along the lines of an optimistic cynic, perhaps? More specifically, someone who expects the worse but wants to believe in things so badly that they allow their gullible side to override their common sense.   EDIT: To clarify, this differs from  in that this person isn't necessarily worldly wise and is not pretending to be naive; their gullibility arises more from desperately hoping their belief will be justified. There is no intention to deceive others into thinking that they are more gullible than they actually are.   EDIT 2: Having looked at various answers linked in the comments, further clarification is needed; the person in question is not Pollyannaish in that they are aware that what they are believing in might not be logical, but because they are hoping against hope that this is true, the end result is a sense of gullibility.


Subdivision Surface not making things smooth as they are in the tutorial I am following

I am currently trying to develop my modeling skills, and following a tutorial found on YouTube. The tutorial teaches how to create an anvil. At 19:10 or so into the video, a subdivision surface modifier is used to create a smooth, soft look.  However, when I do the same, mine looks very sharp and generally bad.  Any ideas why? I will include the blend file below, I appreciate your time and suggestions.    This is his when he subdivides, which is very different from mine when I do the same at the same settings. (I cannot post more pictures because I am new, but if you check the blend file I attached, you should be able to see the difference.   This is what it looks like when I subsurf without the base face.


I am getting output from a program that first produces one line that is a bunch of column headers, and then a bunch of lines of data. I want to cut various columns of this output and view it sorted according to various columns. Without the headers, the cutting and sorting is easily accomplished via the -k option to sort along with cut or awk to view a subset of the columns. However, this method of sorting mixes the column headers in with the rest of the lines of output. Is there an easy way to keep the headers at the top?


Find $a$ in $a^2 \equiv 1 \pmod b$ given $b$ where $a < b-1$

Given the equivalence $a^2 \equiv 1 \pmod b$ (where $b$ is known) is there an efficient way to determine if an answer other than $a = 1$ exists? Is there an efficient way to find the answer(s), especially the greatest possible value of $a$? The only constraint is $1 < a < b - 1$.


#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h>  #define LENGHT 20  typedef struct {     unsigned id;     char name[LENGHT];     char genre[LENGHT];     char nazionality [LENGHT];     int year_carrier_started;     bool check; }Artist;  void print(Artist *arr, int *i); void addOne(Artist *arr, int *i);  int main(void) {      int index = 5;     Artist *array = malloc(sizeof(int)*index);     for (int i=0;i<index;i++)     {         printf("Insert a number:\n");         scanf("%d",&array[i].id);     }     do     {         addOne(array,&index);         print(array,&index);     }while(1);      system("pause");     free(array);     return EXIT_SUCCESS; }   void addOne(Artist *arr, int *i) {     realloc(arr,sizeof(Artist)*(*i)+1);     printf("Insert another one:\n");     scanf("%d",&arr[*i].id);     *i = *i +1;     print(arr,i); }   void print(Artist *arr, int *i) {     for (int j=0;j<*i;j++)     {         printf("Number: %d position %d\n",arr[j].id,j);     } }   Hi guys, I got this struct from a piece of my program, what I need to is to realloc everytime the user wants to add a new Artist. After adding like 10/15 more users, it crashes for no reason (at least for me there is not). What am I doing wrong? (Dat *i is passed by reference, it counts how many artists are there already).


Convergence of $\sum \frac{\lambda^y}{y!}$ to $e^\lambda$

How can I show that   $$ \sum_{y=0}^\infty \frac{λ^y}{y!} = e^λ $$?  I only get so far as to show that the series will converge (by ratio test), but not further, I'm not even sure where to start.


How to keep audio and video synced rendering an animation?

I am doing a voice over for my video. It’s suppose to be my first dev log. So my audio and video is completely separate. Why does the video render faster than the audio, how do I fix this? I am using blenders 2.8 video editor.


A while ago I flagged  as "not an answer". However, my flag got the status:  declined - a moderator reviewed your flag, but found no evidence to support it  Which I find a bit interesting. I think that the answer should be a comment to Deep's answer considering he is the only one who mentions a getV method.  Why was this flag declined? Is it just me who thinks it should be a comment to Deep's answer? Am I missing something here?


How to convert Salesforce Date Time to Unix format

Please let me know how to convert salesforce datetime() to Unix format in apex.  Thanks


How do you differentiate the likelihood function for the uniform distribution in finding the M.L.E.?

There is a classic problem:  Suppose that $X_1,\ldots,X_n$ form an i.i.d. sample from a uniform distribution on the interval $(0,\theta)$, where $\theta>0$ is unknown. I would like to find the MLE of $\theta$.  The pdf of each observation will have the form: $$ f(x\mid\theta) =  \begin{cases} 1/\theta\quad&\text{for }\, 0\leq x\leq \theta\\ 0 &\text{otherwise}. \end{cases} $$ The likelihood function therefore has the form: $$ L(\theta) = \begin{cases} 1/\theta^n \quad&\text{for }\; 0\leq x_i \leq \theta\;\; \text{for all }i,\\ 0 &\text{otherwise}. \end{cases} $$ The general solution is usually that the MLE of theta must be a value of $\theta$ for which $\theta \geq x_i$ and which maximizes $1/\theta^n$ among all such values.   The reasoning is that since $1/\theta^n$ is a decreasing function of $\theta$, the estimate will be the smallest possible value of $\theta$ such that $\theta\geq x_i$.  Therefore, the mle of $\theta$, $\hat{\theta}$, is $\max(X_1,\ldots,X_n)$.  Here, I do not understand why we cannot just differentiate the likelihood function with respect to theta and then set it equal to $0$?  Thanks!


Famous puzzle: Girl/Boy proportion problem (Sum of infinite series)

Puzzle  In a country in which people only want boys, every family continues to have children until they have a boy. If they have a girl, they have another child. If they have a boy, they stop. What is the proportion of boys to girls in the country?  My solution (not finished)  If we assume that the probability of having a girl is 50%, the set of possible cases are:  Boy (50%)  Girl, Boy (25%)  Girl, Girl, Boy (12.5%)  ...  So, if we call G the number of girls that a family had and B the number of boys that a family had, we have:  $B = 1$  $P(G = x) = (1/2)^{x+1}*x$  So  $G = \Sigma (1/2)^{x+1}*x$  I feel like the sum of this infinite serie is 1 and that the proportion of girls/boys in this country will be 50%, but I don't know how to prove it!  Thanks!


Putting char into a java string for each N characters

I have a java string, which has a variable length.   I need to put the piece "<br>" into the string, say each 10 characters.   For example this is my string:  `this is my string which I need to modify...I love stackoverlow:)`   How can I obtain this string?:  `this is my<br> string wh<br>ich I nee<br>d to modif<br>y...I love<br> stackover<br>flow:)`   Thanks


Does it make sense to say that a number is larger than every member of the empty set?

Can any number be said to be larger than every member of the empty set? I have been asked to compare a positive integer to the empty set, but I'm not sure how to compare...


I'm particularly interested why N appears in the denominator for the formula of population variance, but (n-1) appears in the denominator for the sample variance, where N is the total number of elements in the population and n is the total number of elements in the simple random sample?  Basically, the (n-1) seems less intuitive to me.  I'd love to know the reasoning behind this, as well as seeing any mathematical derivations that back up that reasoning.


Whenever I use the command sudo apt-get update I get the following error:  W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>   Please help me I am very new to all this.


Combinatorics question about Taking Days Off

A cashier wants to work five days a week, but he wants to have at least one of the Saturday and Sunday off.  In how many ways can he choose the days he will work?  So, in this case, what should I count first?  How do I start?  I know how to solve this if the cashier doesn't want a weekend off, but what do I do if the cashier do?  Thanks!


Show that $S^{-1}A = B$ for integral domains and $S = \{x\in A\setminus\{0\}: x^{-1}\in B\}$

Let $A \subset B$ be commutative integral domains with $\operatorname{Quot}(A) =  \operatorname{Quot}(B).$  Now consider the multiplicatively closed subset $S = \{x\in A\setminus\{0\}: x^{-1}\in B\}$.   I want to show that $S^{-1}A = B$. I would appreciate any help.


How to convert specified byte array to Point Array for displaying image in Java

I have a Base64 encoded String: iQA8AJ4ANwCjADYAqQA1ALAANAC7ADMAyAAyANUAMQACATEAEwEyACMBNABDATkAUwE8AGIBQABwAUQAfgFIAIsBTQCYAVEApQFVALIBWQC+AVwAygFgANcBYgDjAWQA8AFmAPwBZwAIAmcAFQJmACECZAAsAmMAOAJgAEMCXQBNAlkAVgJWAF8CUgBnAk4AbgJKAHUCRgB7AkIAgAI+AIQCOwCIAjgAjAI1AI8CMwCSAjIA  My system is required to Base64 decode this value. The decoded data is a series of 2 byte x 2 byte y coordinates (low order byte 1st). i.e. (-1,-1) or (0xFFFF, 0xFFFF) denotes a pen up.  How can I convert Based64 encoded to Point Array in Java?


Is there a TSQL command or another way to rename AOAG (Always On Availability Group)?

We have an AOAG named with "space" and I need to rename it to not have "spaces". It was created before my time. The 3rd party vendor tool does not work with AOAG that has spaces. There are about 40 databases in the AOAG (SharePoint).  The property is greyed out in SSMS. Is there another option? As this is production, I am looking for a solution with minimal downtime.  Thanks much, Debbie


Importing a Single Symbol From a Different Font

Is there a general way to change the font of a particular symbol without switching packages?  For example, suppose I'm using Computer Modern for my entire document, but I want the "subset" operator to look as it does in mathabx.  How can I redefine it to appear in this way?


What happened to the Nautilus feature "Create Link" in Ubuntu 16.10 and newer?

I have upgraded from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS. I was surprised to see that the context menu entry "Make Link" (keyboard shortcut Ctrl+M) in Nautilus doesn't seem to exist anymore. It used to appear upon right mouse click on a file or folder and allowed the user to create a symbolic link.


Inspired by a paper (from 2001) entitled :  Why is $\pi$ = 3.14... instead of 6.28... ?  Setting $\pi$ = 6.28 would seem to simplify many equations and constants in math and physics.  Is there an intuitive reason we relate the circumference of a circle to its diameter instead of its radius, or was it an arbitrary choice that's left us with multiplicative baggage?


Does installng Ubutun overwrite windows?

Will my Window OS overwrite after Ubutun OS downloaded and installed ?  Thanks and Best Regards Jacky Loh


My initial guess would be no, as infinity is not a point.  Using the same definition of a limiting point from  , and say for the sequence of negative integers $s_n=${-1,-2,-3,-4...}.  $\lim_{n \to \infty }s_n = -\infty$ and since $-\infty$ is not a point in the negative integers I am guessing that means (negative)infinity is a limiting point of $s_n$. So what would be the correct interpretation here? Is infinity a (divergent)limit of the sequence or a limiting point?


How to translate custom labels into other(sweedish, german,.......) languages?

I have an issue with translation of custom labels...  How to translate custom labels into other(sweedish, german,.......) languages.. Default language for my org is ENG.  How to get the translation text for custom labels?? For Ex: i have one custom label  Online Help ... how to translate these custom label into german?????  Any one can help me how to translate????


How to round a number in a big way in Java? I have to get an answer z = 5.  int x=82; int y=20; int z; z= x/y.


Ethics of publishing received peer reviews

What are the ethics of publishing (on the web, etc.) peer reviews received for a paper? Does your answer change if the paper was accepted or rejected?  I am specifically interested in the  "one-shot" case typical of computing science conferences, without rebuttals, where there is no or limited dialogue between an author and the reviewers.  This is quite distinct from  as here I am talking about reviews I have received, not those I have written - the reviews' authors retain their anonymity, and presumably the paper would be included alongside those reviews.  Vijay's response below includes a summary of much of the other responses and my comments on those.


I actually have a Macbook Pro with Snow Leopard (I plan on upgrading to Lion).  I may have to buy an Mac mini in order to have a full dual screen (external identical screens) layout (see my ).  So I will work on a Mac Mini and a Macbook Pro, most of the time on the same LAN.  How to get everything completely synchronised, as fast as possible? (I don't know if iCloud can)  I am talking about every file/data on my computer:   applications application preferences mails calendar iPhoto/aperture libraries lots of small files (web development...) files out of my account (apache server files, php/libraries) ...   I don't want to manage 2 computers and do everything twice (installing something, configuring the system, etc...).


Merge point features within a given radius

I have a file in QGIS with 5000 points. Some of the points are really close to each other (5m). How can I cluster the point features to one point feature if they are within 5m? The new points should be centroids from the given points.


Do holders of refugee documents need a transit visa for the Schengen area?

I will be traveling to Ghana, but I will have a layover in the Netherlands. As the holder of a Canada travel document, do I need a transit visa? I already have a Ghanaian visa.      I do have a Canadian permanent resident permit. My flight route: Vancouver transit Schipol-Accra. Returning: Accra-transit in Paris-Vancouver. I have a Ghanaian visa in my travel document because Ghana is my destination


I am having trouble inserting chapters into my document. When I use:  \chapter{My Chapter}   the pdf simply displays 'My Chapter' in normal font, with no "Chapter 1" etc etc.  My document is set out as :  \documentclass[12pt]{article} \usepackage{booktabs} \usepackage{setspace} \onehalfspacing \usepackage[english]{babel} \usepackage{grffile} \usepackage{fancyhdr} \usepackage{hyperref} \usepackage[demo]{graphicx} \usepackage{floatrow} \usepackage[font=small,labelfont=bf]{caption} \usepackage[options]{algorithm2e} \usepackage{filecontents}% http://ctan.org/pkg/filecontents \usepackage{listings}% http://ctan.org/pkg/listings \usepackage{hyperref} \pagenumbering{arabic} \newcounter{qcounter} \let\centering\relax \usepackage{color, colortbl} \definecolor{name}{system}{definition} \definecolor{Gray}{gray}{0.9} \definecolor{LightCyan}{rgb}{0.88,1,1} \usepackage{tabularx} \usepackage{caption} \usepackage{tikz} \usepackage{babel} \usepackage{graphicx} \usepackage{csquotes} \usepackage{fancybox} \MakeOuterQuote{"} \usepackage[utf8]{inputenc} \usepackage{amsmath, amsthm, amssymb} \begin{document}   \chapter{My Chapter}  \end{document}    what am I doing wrong?


What book had a blind prisoner escape using a device that allowed him to see what animals saw?

I'm trying to remember a book I read in the mid to late 90's (but which I think was written in the 60's or 70's) in which the hero was a spy that got captured by his rivals, blinded and put in a prison.  There he somehow manages to build a device that allows him to see what nearby animals can see, with a dial to select between animals.  He uses this to attempt an escape.  I don't remember much else except that the planet that captured him had a strict Lutherian communist economic structure in which the local currency was something like 'an hour', representing precisely the amount of time you worked to get that amount.  Anyone remember the author and title of this book? I never owned a copy. I lived in a shared house at the time and I no longer have contact with the house mate that leant me his copy to read.


How do you remove ghost menu items in Windows 7?

I often have trouble with menu options staying on-screen after I click them. How to solve?


How reduce result set to every nth row in ASP.NET Linq to Entities

I need to do basically what is done   SELECT t.id, t.key FROM (     SELECT id, key, ROW_NUMBER() OVER (ORDER BY key) AS rownum     FROM datatable ) AS t WHERE t.rownum % n = 0    ORDER BY t.key   but using Linq to Entities. I just can't figure out how. A method ROW_NUMBER is not known and using an index in the where clause gives me an error.  Query.Where((s, i) => i % n == 0);   Edit: more precisely  Query.Select((s, i) => new { index = i, data = s } ).Where(s => s.index % n == 0).Select(s => s.data)   The only solutions that worked for me so far is to temporarily run the SQL (toList) and filter it afterwards. This however slows down my server significantly.


Is there a unique cyclic submodule for every factor dividing the order of a cyclic module?

Suppose $\langle v\rangle$ is a cyclic module over a PID of order $a$. Then there is a cyclic submodule of order $b$ for any  $b$ dividing $a$. Namely, $\langle cv\rangle$, where $c$ is such that $bc=a$ in $R$.   I know that a finite cyclic group has a unique cyclic subgroup for each divisor of the order of the group. For cyclic modules over a PID, is it still true that a cyclic submodule of order dividing the order of the given module is also unique? If so, why?  Any submodule of $\langle v\rangle$ necessarily has form $\langle rv\rangle$ for some $r\in R$. If $\langle cv\rangle$ and $\langle rv\rangle$ both have order $b$, then it follows that $$ b=\frac{a}{\gcd(c,a)}=\frac{a}{\gcd(r,a)} $$ so $\gcd(c,a)=\gcd(r,a)$ but I can't tell if $\langle cv\rangle=\langle rv\rangle$.


[Firmware Bug]: TSC_DEADLINE disabled due to Errata - what should I do about this?

I saw several bugs and error messages when I was looking by chance into the tool called "logs".  Being a newbie in Ubuntu I have no idea how to deal with these bugs, where to report them or how to fix them.  Any help to guide me here?  The bug I have (which is listed under important) reads:  [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0x52 (or later)


Will WhatsApp deliver a message that was accidentally sent while data was off?

I'm using Whatspp on a Moto G (1st Gen) mobile. Today I've accidentally sent a message to my friend while my mobile data was in off mode. I have deleted that message immediately. Now will the message be delivered to my friend if i turn on the mobile data?


I am trying to adapt an existing code to a 64 bit machine. The main problem is that in one function, the previous coder uses a void* argument that is converted into suitable type in the function itself. A short example:  void function(MESSAGE_ID id, void* param) {     if(id == FOO) {         int real_param = (int)param;         // ...     } }   Of course, on a 64 bit machine, I get the error:  error: cast from 'void*' to 'int' loses precision   I would like to correct this so that it still works on a 32 bit machine and as cleanly as possible. Any idea ?


Why are some mass storeage devices read only?

I have a card reader in my laptop. Today I needed to copy some files to the SD card.  Unfortunately, Ubuntu said it's read only. It wouldn't let me set permissions for the SD card in nautilus either.  It copies files to USB sticks and phones but not to the SD.  How do I fix this?


Texturing each object separately VS all in the same texture file

I am making a blender model of a Living room. Inside of this Living room, I have several objects that can be used not only in that Living room, but in other kind of rooms. For example, I have:   LivingRoom.blend ==> Basic walls structure, floor, ceiling. Television.blend ==> A complex model of a TV. Statue.blend ==> In this blend file, I sculpted a Statue. Couch.blend ==> The design of a couch And so on... (Lamp.blend, Fan.blend, Painting.blend, Extinguisher.blend, ... you get the point!)   The main file, as you guessed, is LivingRoom.blend, inside of which I will be appending all the others. As I said before, I did it this way because those other objects will be reused in other parts of the house (like in the Kitchen or in the Basement, for example).  I need to Unwrap AND create a Diffuse Map + Normal Map + Specular Map for each object.  But I am presented with an elementary question: should I UV Unwrap + Texture all files in separate Texture files? These objects are to be used in a Game Engine like Unity. So I have two options:   Creating an Albedo.jpg, Normal.jpg and Specular.jpg for all objects. Downside of this method? I would end up with 3 maps for each objects, and the number of textures would increase quickly (in this case, I would have 3*8=24 texture JPG files). UV Unwrapping + Texturing all files ONCE they are inside of the same .blend file. Drawback of this method? I would end up with an extremely messy UV Map and giant Texture files. Furthermore, I think I would lose quality/control over each element separately later on (although with Texture Painting I think this last problem is under control).   I want to clarify this question is a possible duplicate of  of mine, where I didn't get any quality/useful answer. PLUS, this other question includes texturing also.  Thank you!


Apologies up front if this has been addressed somewhere but I feel like a clarification about the domains of each Stack Exchange site should be posted . I am always confused by the . What algorithm do you guys use to decide where to ask your question? Some recent examples of my conundrums:  I am looking for an app/shell script that would let me control individual volume of my apps on my Mac/Linux on an app-by-app basis with location/time & WiFi-name based profiles. Should I ask this question in , ,  (since a script would do too),  or ? I ended up asking the question  but I feel it could have been equally valid/cross-posted to either of these places?  I also have some questions regarding some game that I am developing in HTML5 but I also want it to embed it in a mobile app (specifically Android). I am really confused - should I ask the question in ,  or .  The above game itself is a simple puzzle game - you are given a NxM matrix where some cells are "good" and some cells are "bad" and you are tasked to draw the minimum number of vertical or horizontal lines that cover all "bad" cells in the matrix. If I want to inquire about an efficient algorithm to solve such a puzzle. Should I post my question on  or  or  sites? I know that what I am asking for is essentially , so I can conceivably also ask my question in  or  sites too. Since these sites are relative desert town compared to , I will probably end up asking my question in Stack Overflow itself but I feel guilty of ignoring all these places...   I am not looking for specific answers to my above problems but I am looking for some general guidance to follow so I do not have to spend time thinking or looking through the list of sites to decide which is the correct place to post my question. It should be trivially obvious to me where I should post my questions or at least let me cross post?


How big is the known Star Trek universe?

In Star Trek: Voyager, there is a big deal made about them warping far beyond contact with any Federation bases, beause they're all the way out in "the Delta Quadrant".    To me, this indicates that there is a finite area of space that has been explored in the Star Trek universe up to this point.    So, including for the sake of this question the Delta Quadrant that they were lost in, and all of explored Space up to that point in the series, how much of Space is included in the Federation-explored region of the Star Trek Universe?    Actual units of measurement would be ideal, but are not required if a general idea would better describe the size of the known universe.


Is it bad to cook frozen meat without thawing it?

I wonder if it is bad to cook frozen meat (chicken, fish, beef,...) without waiting for it to thaw?  Sometimes, I realize I forget to take meat out of my freezer beforehand, when I am too hungry already.


Big O Time Complexity of Code Snippets Python

I'm fairly new to Python, so I'm still not that good at determining Big O time complexities of some programs. I would like to ask for some help. Here are some code snippets that I had a hard time knowing what the Big O is, and what I think the Big O is: Code 1: O(n) def foo(n):    i = 0    k = 0    for i in range(0,len(n)):       for j in range(0,k):          n[i] = k + 1          k = 0    k += 1  Code 2: I actually have no idea here def bar(x,i,j,y):    if j >= i:       foo = (i+j) // 2       if x[foo] == y:          return foo       elif x[foo] > y:          return bar(x,i,foo-1,y)       else:          return bar(x,foo+1,j,y)    else:       return -1  Code 3: O(m) def count(a,b):    # Let len(a) = m    # Let len(b) = n    count = 0    for char in a:       if char in b:          count += 1    return count  And if you would, kindly drop some tips on finding the Big O of programs similar to these code snippets. Any help would greatly be appreciated. Thank you!


Find the process that opened the webpage

So every here and there, a webpage with the url "" will open on my computer.  This happens maybe once a day (I haven't really been recording it, but that's my estimate).  (I recently reinstalled Windows, and it's been there since the beginning)  So I'm trying to figure out the cause.  Things I've considerred:   Of course, I've gone through all autoruns.exe entries and couldn't find anything suspicious. I'm familiar with all processes, services, tasks, etc. I'm using Google Chrome as my default browser. Since Chrome manages it's own processes for each new tab, I can't get any meaningful information from the tab process parent PID.  (I think this is what most or all modern browsers do) Using procexp.exe, I've searched for parts of the URL in the memory strings of anything that might have something to do with it, but to no avail. I have found some similar questions online, but nothing that has gotten me closer.   The only thing I can think of is, that it might have something to do with KMSpico, which I have installed.  Although, I've has this installed before and currently have it on other computers, but  never came across this issue.  Any other ideas?


Best way to count 1's of a binary number

Doing a question on codility and was Asked to take two numbers and get the product. Then get the binary repesentation of that number and count the number of one's that are in the binary number.  My code is      return method(int a, int b)     {     int count=0;     int num;     num = a* b;     while(num>0)     {        if(num %2 ==1)        {            count++;        }      num = num >> 1;     }   return count;   }   Yet it only gives 50% correctness. Can anyone explain this. Is there something i missed that i should be aware off.


I don't mean why is it important. I mean why can't we just define the "selector function" like $S\colon \mathbb{F} \to A, $ such that $S(X) = x \in X$, without an axiom?  Why can't we do that but we can, for example, take some set that satisfies a condition from an uncountable family?


I have got error in eclipse Exception in thread "main" java.lang.NullPointerException at Course.main(Course.java:7)

public class Course {      public static void main(String[]args) {         String name="",course="",marks="";         System.out.println("Enter the name");         name=System.console().readLine();         System.out.println("Enter the course");         course=System.console().readLine();         System.out.println("Enter the marks");         marks=System.console().readLine();         System.out.println("the Name is"+name);     } }   But it works fine if compiled with cmd


I can compute and use a determinate, but I have no idea what it actually is. What does it express geometrically, algebraically, or in some other way?


There's an 80% probability of a certain outcome, we get some new information that means that outcome is 4 times more likely to occur.  What's the new probability as a percentage and how do you work it out?  As I remember it the question was posed like so:     Suppose there's a student, Tom W, if you were asked to estimate the   probability that Tom is a student of computer science. Without any   other information you would only have the base rate to go by   (percentage of total students enrolled on computer science) suppose   this base rate is 80%.      Then you are given a description of Tom W's personality, suppose from   this description you estimate that Tom W is 4 times more likely to be   enrolled on computer science.      What is the new probability that Tom W is enrolled on computer   science.   The answer given in the book is 94.1% but I couldn't work out how to calculate it!  Another example in the book is with a base rate of 3%, 4 times more likely than this is stated as 11%.


How to alter Sequence in PostgreSQL with specific max(id) from a table?

I need to get following SQL script syntax right. In postgres, you can't really chain "alter sequence" with "select max(id)". So what's the right way to write script in a way that PostgreSQL accepts it?   Here is the script so you can have an idea what I need:   alter SEQUENCE notification_settings_seq START with (select max(id) from game_user)


Theorems with an extraordinary exception or a small number of sporadic exceptions

The  gives an example of an extraordinary exception: a very general statement holds except for one very specific case.  Another example is the : a very general statement holds except for very few (26) sporadic cases.   I am looking for more of this kind of theorems-with-not-so-many-sporadic-exceptions      (added:) where the exceptions don't come in a row and/or   in the beginning - but are scattered truly .   (A late thanks to Asaf!)


Pros and cons of AppSettings vs applicationSettings (.NET app.config / Web.config)

When developing a .NET Windows Forms Application we have the choice between those App.config tags to store our configuration values. Which one is better?  <configuration>    <!-- Choice 1 -->   <appSettings>     <add key="RequestTimeoutInMilliseconds" value="10000"/>   </appSettings>    <!-- Choice 2 -->   <configSections>     <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5612342342" >         <section name="Project1.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5612342342" requirePermission="false" />     </sectionGroup>   </configSections>   <applicationSettings>     <Project1.Properties.Settings>       <setting name="TABLEA" serializeAs="String">         <value>TABLEA</value>       </setting>     </Project1.Properties.Settings>   </applicationSettings>  </configuration>


How to create a new tag on the Stack Exchange app?

I know how to create a new tag on the SE website, if I have enough reputation. But yesterday, I asked a question through Stack Exchange android app. I needed two tags for my question. One was available, so I just searched it & added. The other one I wanted to create (I have reputation to create new tags on site). But I could not do so on the android app.    How to create a new tag while on the Stack Exchange Android app? If this is currently not supported, then can this be added in the newer update?


If I submit a poster to ICDE, can I submit the full version of paper to another conference?

I received an opportunity to make a poster submission to ICDE, i.e. IEEE International Conference on Data Engineering. I want to know if I submitted the poster, can I submit the full version of paper, with almost the same content, but much extended, to another conference?  I found a similar question, but I look forward to a detailed answer for my specific question. That question discusses the general case for Computer Science. Its answer says for different domain, the rule is different. I hope to know the rule for ICDE, because the deadline is 4 days later and I have to make a decision on whether submitting the poster. If submitting the poster will disable me to submit the full paper to another conference, then I will cancel the submission. Otherwise I will make the poster submission.  Thank you all for helping me!


I have 5 different designs in Altium Designer, each with a PCB. I would like to put all PCBs together in a single panel, how could I do that?There are examples for Kicad, however I use Altium Designer.


sql select calculation return long decimals

I have a SELECT query with the arguments below to fill in a DataTable. The fields OpeningQuantity, QtyIn & QtyOut from tbWHProduct are all in MS Access Double format. Sometimes when calculating decimals is involved, somehow the POSBalance returns a long string of decimal points:  e.g. 0 + 2565.4 - 2515.1 returns -50.3000000000002  query = "SELECT ProductID, ProductName, Caption, UOM, RetailPrice, DiscPercent, DiscSum, MinimumSellingPrice, OpeningQuantity+QtyIn-QtyOut AS POSBalance, Location FROM tbWHProduct WHERE Disable = FALSE ORDER BY ProductName";   Please help me understand what caused this odd calculation quirk and how I would go about avoiding such problem. Thank you.


Integral of $\sin x \cos x$ using two methods differs by a constant?

$$ \int \sin \theta\cos \theta~d \theta= \int \frac {1} 2  \sin 2\theta~ d \theta=-\frac {1} 4  \cos 2\theta$$ But, if I let  $$ u=\sin \theta , \text{ then }du=\cos \theta~d\theta $$ Then $$ \int \sin \theta\cos \theta~d \theta= \int u ~ du =\frac { u^2 } 2 =\frac {1} 2 \sin^2 \theta $$ Since $$ \sin^2 \theta =\frac {1} 2 - \frac {1} 2 \cos 2\theta$$ The above can be written as $$ \int \sin \theta\cos \theta~d \theta= \frac {1} 2 \sin^2 \theta =\frac {1} 2 \left( \frac {1} 2 - \frac {1} 2 \cos 2\theta \right)=\frac {1} 4-\frac {1} 4 \cos 2\theta   $$ Why are the two results differ by the constant $1/4$? Thank you.


Why do you ask for 'real name' on Area51?

The autobiographer badge conditions  because some fields were a bit too 'personal'; a specific reason in that post is:     A lot of the fields felt too personal to many people. "Age" and "Real Name" in particular rubbed some people the wrong way as a "requirement" for anything, even something as silly as a badge.   Which is kind of true, and seeing as SE acknowledges this fact, can we get rid of the mandatory 'real name' field when committing to a proposal?  I know I can just enter anything, like my username - but I shouldn't have to lie to commit to a proposal I think.


Why is the height of a tetrahedron of side length a equal to sqrt(2/3)a

I know it has something to do with triangle medians and pythagorean theorem since there's a 2/3 and a square root in there, but I don't exactly know why.


I am working on an application. That application should get the resume from the users, so that I need a code to verify whether a file exists or not.  I'm using ASP.NET / C#.


I try to install IntelliJ IDEA on Lubuntu. I've downloaded and unpacked the archive. But when i run idea.ch i get this error:  Start Failed: Failed to initialize graphics environment java.awt.AWTError: Assistive Technology not found:    org.GNOME.Accessibility.AtkWrapper at java.desktop/java.awt.Toolkit.newAWTError(Toolkit.java:472) at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:488) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1608) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:532) at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:613) at com.intellij.ui.AppUIUtil.updateFrameClass(AppUIUtil.java:155) at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:94) at com.intellij.idea.MainImpl.start(MainImpl.java:20) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at com.intellij.ide.plugins.PluginManager.lambda$start$0(PluginManager.java:75) at java.base/java.lang.Thread.run(Thread.java:844) Caused by: java.lang.ClassNotFoundException: org.GNOME.Accessibility.AtkWrapper at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:374) at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:485) ... 20 more   It seems like Lubuntu is lacking some required component. What should I do?


I'm beginning to program in C# 2.0, so I have never used lambda expressions, but, why so much fuss about it? Are them just syntactic sugar around anonymous delegates, or is there something more which I can't see?


Measuring line length, using \hfill to justify text, wrapping and right justifying if space too small

I am a lecturer and have an issue when compiling test and exam questions. The questions will be in an enumerate environment and look something like this, where the marks shown in brackets are right justified on the last line of the problem:   Determine the reactions and draw the shear force and bending moment diagrams. Hence determine the maximum bending stress experienced by the component. \hfill(10 marks)   Using \hfill works fine when there is sufficient space on the line. In the case where there is insufficient space on the line to accommodate the marks bracket, the text wraps to the start of the next line. In order to right justify it on the next line I use the rather crude code \\ \hfill\makebox{\hspace{13.3cm}(10 marks)} to get the mark bracket right justified on the succeeding line, but have to play with the hspace length to get it to look right.  Is there a way to measure the remaining space on a line and simultaneously measure the length of the marks bracket, then, in the case where the marks bracket length is larger than the remaining space get the marks bracket to right justify on the succeeding line? Note that the exact length of the marks bracket varies (consider the lengths of "(1 mark)" and "(20 marks)" and the exact text of the last line is not known until the text is compiled.  Thanks in anticipation!


I want to test mean differences between 4(0,1,2,3) groups for 6 different cell-types. In other words, I would have 6 comparisons to do for each cell-type (0-1,0-2,0-3,1-2,1-3,2-3). I have run a repeated-measures ANOVA before but it only gives me the main effects and interactions. To correct my t-tests for multiple comparisons, I would use Bonferroni, does SPSS let me do that, I just cannot seem to find it except as part of the means-testing using ANOVA? Or do I have to do it manually and how would i do that? alpha-level here is 0.05.Thanks


Setting a QA practice in an organisation

We have around 8 projects and 8 testers in our organisation. The testers are usually aligned to the Development manager and report to him.  There is no proper process by which the testing can be stream lined. What happens is the developer managers forces the tester to test according to the developers schedule and the manager comes to defend them.  How can a process be set up in a small organisation which ensures good utilization of testers and also helps testers to learn new technology.


Getting BibTex to work in the first place

I've been writing my thesis for a month now, and haven't gotten any further than fighting with bibliography-related issues. I've boiled down all the problems I'm having into something very simple with BibTex.   It seems I can't get BibTex to work at all. To test, I've done a very basic LaTeX document, a very basic bibliography file. Please find attached screenshots of them.   I'm using TeXworks (what else is there for Mac?). In the screenshots you can see that the PDF I get is unable to connect my citations from the .tex file to the .bib file. Why is this?


I recently moved my website to a new domain but seems like the link values are not passed till yet. I researched it a bit and found on Moz documentation that it may take sometime before the link values are passed to the new domain. Any ideas on how much time it can take? Any way to expedite it?


When working in a 2D coordinate system you could say that X is the horizontal axis and Y is the vertical axis.  Extending this to 3D, is there a similar word for the Z axis?  (I'm aware of Width, Height and Depth, but obviously horizontal and vertical aren't synonymous to width and height, which is why I don't want to call the Z axis the depth axis.)


How do you get descriptions of the available `shopt` options?

What is the canonical way for accessing the local documentation on any available Shell Options builtin with shopt?  I'm using Ubuntu 12.04 and can run help shopt to get a description of what shopt does:  shopt: shopt [-pqsu] [-o] [optname ...]     Set and unset shell options.     ...   I can list the various Shell Options and their values (shopt or shopt -p). But how do I find out what each one actually does without leaving the comfort of my Linux box? I'm not looking for . Is there a man page or something I'm missing?


Is there a new automatic redirect for duplicate questions?

I feel like this has happened to me several times today, though  is the only example I have saved a link for.  Recently, when I click on a question on a site's main page that's been marked [duplicate], I seem to be getting an auto-redirect to the original question. If this is intentional, I think it's sub-optimal. Not every question that gets closed as a duplicate is an accurate closure, and even if they were: if I want to view the duplicate why can't I? We've always been able to in the past, and this completely eliminates the ability for regular users to reopen (I assume mods on a given site wouldn't be redirected, as is true for other redirect functionality on SE).   So... Is something strange going on, or is this an intentional change? If so, what's the reasoning behind it, and can we please put it back the way it was?


Mysql Query data between date on joined table

Am trying to query data from two joined tables with a date as criteria using the query below but it brings nothing, can someone please show me what I did wrong.  SELECT Journal_T.GL_ID as Akaunti       ,coa_t.gl_name_vc       ,SUM(Amount_NU) as YTD FROM  Journal_T        JOIN coa_t           ON journal_t.gl_id = coa_t.gl_id WHERE CAST(date_dt AS DATE) BETWEEN '25/08/2017' AND '25/08/2017'        AND bs_category_vc='Rev' GROUP BY coa_t.gl_name_vc       ,Journal_T.GL_ID


Binomial random variable multiplied by a positive constant

Suppose we have $$X \sim Bin(n, p)$$ Let $Y \equiv \frac{X}{n}$ such that $n>0$ What's the distribution of $Y$? Using expectation and variance properties we got that: $EY = p$ $VY = \frac{p(1-p)}{n}$ Is also $Y$ binomial?


How to get cash in Europe (ATM cards and taking cash) coming from United States

Can someone recommend a good ATM card to obtain for an American going to Europe.  Specifically, I'm going to England/Wales if that makes a difference.  To give back, I mention that I have a Amazon Prime Rewards Visa that is extremely good for credit card transactions in Europe (no fees!).  I used it exclusively in France.  However, I feel it's sometimes necessary to get cash and the ATM cards I have charge something like $10 minimum + 3-5% transaction fee PLUS whatever the local ATM machine charges.  The Amazon card also charges considerable fees if used as a debit card at an ATM.   I do plan to take some cash with me, but I don't like to carry huge amounts.  As an aside, if someone has recommendations how to get British pounds before the trip, please let me know also.  I currently use Chase Bank.  Many thanks! Dave


What size power supply do I need to connect two 5 meter LED strips?

I want to buy 2 of these  to make a 10 meter run.   What power supply do I need to have to avoid voltage drop? what controller do I need? How do I connect those 2 LED strips?


Terraria: pre-hardmode bosses in hardmode

Can you summon pre-hardmode bosses in hardmode?   Just need to know if I should fight all pre-hardmode bosses before defeating the wall of flesh.


Differentiating an integral with dependent limits

How would one reasonable differentiate the integral of the form $\int_{f(x)}^{g(x)} h(x) dx$, provided $h$ is continuous? Does this even make reasonable sense? The main point is that the integrand is also a function of $x$.


Software testing: a first step to development?

I've been testing Ubuntu daily builds for QA since last month.  I wasn't too confident in learning development yet, because I didn't feel familiar with encountering a bunch of code. But I want to write code and develop software one day.   So far, I see QA work as active testing, communication via mailing lists, and reporting bugs.   In what ways is quality assurance testing a first step into development?  Thanks for your time.


jQuery validate not working with dd-M-yy format of datepicker

I am using JQuery's DatePicker API to select value from text box.  Here is call to DatePicker  $(".datefield").datepicker({                 changeMonth: true,                 changeYear: true,                 dateFormat: 'dd-M-yy'             });   and I am also using jQuery.Validate to validate user input as below  $("#form_assetDetails").validate({                  // Specify the validation rules                 rules: {                     Make: { required: true, maxlength: 30 },                     ModelName: { required: true, maxlength: 30 },                     WarrantyDetail: { required: true, maxlength: 100 },                     Capacity: { maxlength: 90 },                     WarrantyEndDate: { required: true, date: true },                     Quantity: { required: true, number: true, range: [1, 999] },                     PurchaseOrderNumber: { required: true, maxlength: 20 },                     InvoiceNumber: { required: true, maxlength: 20 },                     InvoiceDate: { required: true, date: true },                     AdvanceAmount: { required: false, number: true, range: [0, 9999999] },                     FinalAmount: { required: true, number: true, range: [0, 9999999] }                 },                  // Specify the validation error messages                 messages: {                     //Make: "Please enter asset make"                 },                  submitHandler: function (form) {                     form.submit();                 }             });   for those control that are meant to take date as input, every validation works fine in chrome but when it comes to IE11, it always fails validation.   I tried different format i.e dd/mm/yyyy and it works but why it does not work with current format?


When I try to change a counter in an \edef using \stepcounter, I get a whole lot of error messages ("Missing \endcsname inserted"). When I try to do the same with \addtocoutner I get no error, but the counter remains unchanged within the \edef.  The following MWE produces "E, EE, F". If you remove the %, the errors will appear.  \documentclass{article}  \newcounter{testcount} \setcounter{testcount}{5}  %\edef\foo{\Alph{testcount}\stepcounter{testcount}\Alph{testcount}} \edef\bar{\Alph{testcount}\addtocounter{testcount}{1}\Alph{testcount}}  \begin{document}  \Alph{testcount} , \bar , \Alph{testcount}  \end{document}   Why is this and how can I achieve the effect that one would expect \foo and \bar to have?


I am a beginner and I am using Ubuntu 14.04 LTS with text entry given by English International with dead keys.  Everything works well but instead of getting "ç" I get "ć".   Yes, the key that I have in my keyboard is apostrophe and not accent.   I have found some solutions in , but they assume that you are able to find a file /usr/lib/gtk-2.0/2.10.0/gtk.immodules, but I am not able to do that.  Can someone help me?


Is there a preferred programming language for working with webdriver?

I see there are a number of options from C# to Ruby to Python to Javascript.  For a newbie to programming which language would you recommend I choose for this situation (webdriver and newbie programmer) ?


How is this sentence correct? "How does this machine work?"

Which is the correct one, and why?   How does this machine work? How does this machine works? How this machine works?


Let $f: I \rightarrow R$ differentiable and $a \in I$ such that's :   $$ \forall (x_n),(y_n) \in I, x_n \neq y_n, x_n \rightarrow a, y_n \rightarrow a \rightarrow lim_{n\to \infty} \dfrac{f(y_n)-f(x_n)}{y_n-x_n} = f'(a) $$   Prove that $f'$ is continuous.   I have taken  $z_n \rightarrow a$ but I cant prove that  $f '(z_n)$ converges for $f' (a)$. Thanks for read, exists another post but the solution I do not understand


function $f(x)=x^{-(1/3)}$ , please check whether my solution is correct?

Let $f(x)=x^{-(1/3)}$ and $A$ denote the area of region bounded by $f(x)$ and the X-axis, when $x$ varies from -1 to 1. Which of the following statements is/are TRUE?   f is continuous in [-1, 1] f is not bounded in [-1, 1] A is nonzero and finite     I try to explain :    graph is  :     False , since left limit is not equivalent to right limit. True , since  f(x) rises to $infinite$ at $x=0$. True , since we can calculate it by doing integrating the function


How shall I get the message in "Sorry, Ubuntu 14.04 has experienced an internal error" in text?

When I start 14.04, I get a dialog, with message of foldable bullets inside. I want to get the message in text, so that I can post it in a question (now I post it  ). How can I get the message in text? Thanks.


Finding Bijection between subgroups of group $G = NU$.

Let $N \unlhd G$ and $U \le G$ with $G = NU$. Then there exists an inclusion-preserving bijection from the set of all subgroups $X$ with $U \le X \le G$ on the set of all $U$-invariant subgroups $Y$ with $U \cap N \le Y \le N$.   A subgroup $V \le G$ is called $U$-invariant for some subgroup $U \le G$, if $V^g = V$ for each $g \in U$.  It guess the map might be $\varphi(X) = X \cap N$, I could show injectivity by using the so called Dedekind identity (*) by which if $X \cap N = Y \cap N$ and factoring $X = U(X\cap N), Y = U(Y\cap N)$ we have $$ X = U(X\cap N) = U(Y\cap N) = Y. $$   But how to show surjectivity?  (*) The Dedekind identity as I know it goes like this, let $G = UV$ for two subgroups $U,V \le G$. Then every subgroup $H$ with $U \le H \le G$ has a factorisation $H = U(V\cap H)$.


In the sentence: "Drinking and driving IS dangerous", why does the verb "to be" need to be singular?

In the sentence: "Drinking and driving is dangerous". Drinking and driving are both subjects and the word dangerous is the object (I think) but why do I have to use the verb to be in singular?


$\lim_{x\to0} \frac{(1+x)^a-1}{x}  $ I really stuck, because $a$ is not an integer. If it is, I can solve it, but here I totally stuck


Is this computer compatible with Ubuntu 20.10?

I want to buy a new computer - this computer  Is Ubuntu suitable for it in terms of video card, network card, sound card and the like? Thank you!


I'll admit I'm completely stumped. This is one of those bugs you will only get from a language like c++.  I've got a struct array that I am modifying the member data for. Just normal assignment really. I've got one function that gets some of the member data, the function then calls another function which will get other member data. When I use the Visual Studio debugger to step through, all the assignment seems to go by fine. I watch the variables change in the debugging window at the bottom. But once the second function goes back up to the calling function, the data vanishes. it goes back to unallocated gibberish. Any Idea's?  Edit: Do not mark this question as a duplicate of a value/reference discussion. It should either be deleted for uniqueness, or left alone. Far too many answers on this site are marked as duplicate simply because an answer somewhere else might answer the question, even though the questions are different. If the questions are different, they should be separate.  The two functions:  void GetTestData(Student* students, int numStudents, int numTests) {   // Loop through the i students and all j tests   for (int i = 0; i < numStudents; ++i)   {     // get test scores     for (int j = 0; j < numTests; ++j)     {         cout << "What was " + students[i].Name + "'s score for test #" + to_string(j + 1) + "? ";         cin >> students[i].Tests[j];     }      CalcGrades(students[i], numTests);   } }  void CalcGrades(Student student, int numTests) {   double sum = 0;    // add up all the scores   for (int i = 0; i < numTests; ++i)   {     sum += student.Tests[i];   }    // calculate the average and store it in the members   student.Avg = sum / numTests;    // grade assignment tree   if (student.Avg >= 91)   {     student.Grade = 'A';   }   else if (student.Avg >= 81)   {     student.Grade = 'B';   }   else if (student.Avg >= 71)   {     student.Grade = 'C';   }   else if (student.Avg >= 61)   {     student.Grade = 'D';   }   else   {     student.Grade = 'F';   } }


Solve the given differential equation $p²-py+x=0$

Solve this differential equation for $X$: $$p²-py+x=0$$ This is how I tried it: $$Y=p+(\frac{x}{p})$$ Then differentiaing wrt $x$, $$p=\frac{1}{p}+1-\frac{x}{p²}\frac{dp}{dx}$$ Then $$\frac{dp}{dx} = \frac{(p²-1)p}{p²-x}$$ I can't proceed further. Please help. Thanks in advance :).


To convert my USD$ in to Euro in my country of origin or in Paris?

Hi everyone :) I live in Australia. I have a remaining money(2,000USD) from my previous trip in the US. Me and my husband are planning to visit Paris maybe in September. I'm not sure whether to convert all the remaining USD$ to Euro here in Australia or in Paris as I would also like to get better rates. Any suggestion/s are welcome :)


Can the product $AB$ be computed using only $+, -,$ and reciprocal operators?

Can the product of $A, B$ be computed using only $+, -,$ and reciprocal operators using a calculator? You can use calculator's memory function (multiply and divide are broken though).  Additional: I should have mentioned earlier, in addition to the 3 operators, the numberpad of the calculator can be used so yes 1 can be used.


how to enable numlock at login screen on ubuntu 14.04 lts (when you type password)

Just that question. How to keep it on?  My pwd has numbers and it is weird to not type them on the numpad for me (tried and retried numlockx properly on many ways found on the net, no success) p.s. on the bios everything is as it should (i have pwd on win 7 and numlock is on automatically).


Access pictures from Pictures app in my android app

Just like the iPhone has a UIImagePickerController to let the user access pictures stored on the device, do we have a similar control in the Android SDK?  Thanks.


Why does "cd.." work in the Windows command line?

When typing cd.. without a space between cd and .. the Windows command prompt will happily switch to the parent folder. Is there an explanation for this behaviour? The command does not follow the standard format of command<space>arguments    Also, why does this not create consistent results?


Loop through list with both content and index

It is very common for me to loop through a python list to get both the contents and their indexes. What I usually do is the following:  S = [1,30,20,30,2] # My list for s, i in zip(S, range(len(S))):     # Do stuff with the content s and the index i   I find this syntax a bit ugly, especially the part inside the zip function. Are there any more elegant/Pythonic ways of doing this?


I am working with a sharelatex template for AIP and use this document class command:  \documentclass[%  aip,  jmp,%  amsmath,amssymb, %preprint,%  reprint,% %author-year,% %author-numerical,% ]{revtex4-1}   when I give the command \date{sth} I get in the pdf: (Dated: sth). How can I change the way \date{sth} displays the  date? For instance I would like it to be: (The date: sth), or without parenthesis.  Thanks for your help. Sorry if my language is not precise.


Tag formatting doesn't hide with spoiler quotes

The tag doesn't hide:      Spoiler Quote    Look, not hidden!


According to the , you can harden a MySQL server by adding passwords, or removing the anonymous accounts.      If you want to prevent clients from connecting as anonymous users   without a password, you should either assign a password to each   anonymous account or else remove the accounts.   Before hardening, my users table looked like this.   mysql> select user,host,password from mysql.user; +------------------+-----------+-------------------------------------------+ | user             | host      | password                                  | +------------------+-----------+-------------------------------------------+ | root             | localhost | *F3A2A51A9B0F2BE246XXXXXXXXXXXXXXXXXXXXXX | | root             | gitlab    |                                           | | root             | 127.0.0.1 |                                           | | root             | ::1       |                                           | |                  | localhost |                                           | |                  | gitlab    |                                           | | debian-sys-maint | localhost | *95C1BF709B26A5BAXXXXXXXXXXXXXXXXXXXXXXXX | | myuser           | localhost | *6C8989366EAF75BB6XXXXXXXXXXXXXXXXXXXXXXX | +------------------+-----------+-------------------------------------------+   I've remove all anonymous accounts, so that the user table now looks like this.  (I'm using puppet to manage the users, but puppet effectively performs a DROP USER command).   mysql> select user,host,password from mysql.user; +------------------+-----------+-------------------------------------------+ | user             | host      | password                                  | +------------------+-----------+-------------------------------------------+ | root             | localhost | *F3A2A51A9B0F2BE246XXXXXXXXXXXXXXXXXXXXXX | | debian-sys-maint | localhost | *95C1BF709B26A5BAXXXXXXXXXXXXXXXXXXXXXXXX | | myuser           | localhost | *6C8989366EAF75BB6XXXXXXXXXXXXXXXXXXXXXXX | +------------------+-----------+-------------------------------------------+   Why is it that I am still able to login to my test system without a username or a password? What do I need to do to prevent any unwanted users from logging in?   root@gitlab:~# mysql Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 98 Server version: 5.5.32-0ubuntu0.12.04.1 (Ubuntu) .... mysql>    Update:  I've also just discovered that I can login as root, without entering a password.  Update2: I found  which has some good information, but does not solve the issue.   There are no anonymous users.  mysql> select user,host,password from mysql.user where user=''; Empty set (0.00 sec)   I login as root@localhost.  mysql> select USER(),CURRENT_USER(); +----------------+----------------+ | USER()         | CURRENT_USER() | +----------------+----------------+ | root@localhost | root@localhost | +----------------+----------------+    I do not have a default password, or skip-grant-tables defined in my.cnf  root@gitlab:~# cat /etc/mysql/my.cnf |grep -i 'skip-grant-tables'|wc -l 0 root@gitlab:~# cat /etc/mysql/my.cnf |grep -i 'pass'|wc -l 0   Update3:  I have tried performing these steps with puppet, (which should perform a flush privileges automatically). I have also manually flushed privileges and also tried restarting mysql.   Update4: I've also tried changing the mysql root password and flushed privileges. No luck, I can still log in as any user without a password.


Why does the humidifier "really" make a stove's flame orange?

I answered this question-  and earned 300 rep points for it as an "accepted" answer, but serious doubts have arisen about its correctness.   Doubt is also thereby cast on the legitimacy of the rep I earned.   For this reason I am hereby re-asking the question and will place those 300 rep points in play as a bounty for whoever can settle the question with an experiment.  In your answer, please include enough procedural details so others can replicate your experimental results, and discuss those results in light of known physics.


Listing abstract classes within a Java package

Is there any way to list all abstract classes within a java package? For example, in java.lang package.


Passive Voice : Does it always have to have verb to be ?

I found this Headline article below :      Lingerie Retailer Criticized for Image of Model That Appears to Be   Edited   Shouldn't retailer be "Retailer was Criticized" ?   Thanks,


Record all terminal interaction in a file (like a journal)

I am currently preparing for a pentesting project. My question is: Is there a way to log all interactions within a terminal in a file (e.g. for later examination). This is not about the typical redirection with > or >> or tee command.  I want for example log into a mysql shell from a bash terminal and record every input and output during the interaction into a file. Opening this file at the end of the process should show me every step within the bash shell, every inserted command in the mysql shell and every printed output of bash and mysql.  Any idea how this could be done?


Macros passing arguments of different data types

I'm new to LaTeX and quite impressed with this program! So, I'm willing to concede not being entirely certain that the issue I'm having has to do with data types, or just using \includegraphics{} quirks, but here's my dilemma.  I have looked at  regarding \includegraphics but it didn't sort-of solve my issue.  I have a document using the memoir class:  \documentclass[a5paper, 11pt, onecolumn, openany]{memoir}   I use a custom style .sty file:  \usepackage{KeysToLife}   I wish to use a UDF (\imgpb = image plus page break)  that I define in the .sty with a couple of arguments. The first argument is the name and path of the image file, which would be in the form of "./img/Flourish.png". The second argument is the scale value for that image, which could in the the form of 0.6 or .8 or something along those lines. Here is the \newcommand code I came up with:  \newcommand{\imgpb}[2]{ \begin{center} \includegraphics[scale={#2}]{#1} \end{center} \pagebreak }   This typically would get called from within the document in this manner:  \imgpb{./img/Flourish02.png,0.6}   The error in TexMaker states "Paragraph ended before \Gin@ii was complete. \par  I'm at a bit of a loss how to proceed. When I call the function with just one argument:  \imgpb{./img/Flourish02.png}   it executes just fine... just appears to have a problem with the second argument. Which is of data type double, in Python terms. Am I barking up the wrong tree?  The full document (with issues) is here as a zip file:    Edited to Announce as SOLVED:  Thanks to Marmot and Werner who pointed out the solution. You send arguments, instead of comma-delimited, as separated in curly-brackets:  \imgpb{./img/Flourish02.png}{.6}   Sorted.  I will endeavour to do due diligence in researching the question before I ask the next one.


Grant group traversal rights on a folder

I have a folder named Dog with these permissions:   dr--r-- 2 rich boys 4096    What is the shell command for it


What is the order of execution when a module is installed?

I have a question and I don't know how the execution order is established when a module is installed.  If I install a custom module, which one is installed first?  a)  1.- The config/install folder  2.- Hook install  b)  1.- Hook install  2.- The config/install folder


How to change the font style of elements in KOMA-Script?

Is there a possibility to change the font-style in the table of contents? Everything I wrote down in my document was written with Times. However, the ToC does not have the same font family. Is there a way to change the font of the ToC to Times New Roman? Thank you : )    \documentclass[a4paper, fontsize=11pt]{scrbook} \usepackage{geometry} \geometry{a4paper, top=25mm, left=25mm, right=25mm, bottom=20mm, headsep=10mm, footskip=12mm}  \usepackage[ngerman]{babel}  \usepackage[T1]{fontenc}        \usepackage[latin1]{inputenc} \usepackage{acronym}      \usepackage{anyfontsize}  \begin{document}  \tableofcontents  \chapter{Test} Is there a possibility to change the font-style in the table of contents? Everthing I wrote down in my document was written with Times. However, the ToC does not have the same font family. Is there a way to change the font of the ToC to Times New Roman?  \end{document}


JS closures and creation of execution context

can you please clear up my misunderstanding below?  If the execution context of functions in JS is created when a function is invoked/called and not when it is declared, then in the below code, is inner a closure? If so, why? inner has not yet been invoked and since execution context is created upon invocation there is no way that inner can store a reference to i.  function foo(i) {    function inner() {        return i;    }    return inner; } var f = foo(3);   When does inner have a reference to foo's execution context? When it is invoked or when it is defined? In the above code I have not yet invoked inner.  Also, I appreciate if you explain what JS does when it sees a function definition (in contrast to a function invocation/call)  Thanks,


How can I install aclocal from the autotools bundle in Ubuntu 11.04? I tried to find it to no avail:  sudo apt-get install aclocal   sudo apt-get install autotools-dev    apt-cache search aclocal   dpkg -S aclocal


LaTeX List of listings name in front of number

I am having problems  with LaTeX specifically using listings package.  The first one is I want to add the word "Código" in front of number of Listing in List of Listings. For example     List of Listings      Código 1. function1.m ........... page 1      Código 2. Function2.m ........... page 2   And the second one is: If I use  the option "title"  in \lstset, these titles do not appear in the List of Listings but it do appear at the top of  each listing. How  can I make titles appear in the List of Listings?


Decrease amount of memory used by Exchange?

I know that Exchange Information Store (store.exe) is indeed a memory hog. So much so that it doesn't always seem to respectively release memory when other applications need it - causing the machine to be sluggish.  This is SBS 2011 Standard SP1 with Exchange 2010. There are about 30 computers on our network, most of which use Outlook to connect to Exchange. We also utilize SharePoint. There are 3 SQL Server instances, and I know SQL Server can also use up a lot of RAM - but they're already capped at 2GB, and don't even reach that limit. All 3 SQL Server instances combined use about 2.5GB.  What is very strange though is our SharePoint site gets extremely sluggish, and when I check it out, there's only a sliver of memory available (like under 1GB). This was with 12GB of RAM. So we just upgraded it to 32GB of RAM - but now Exchange uses about 20GB of it. We still have the issue where everything gets sluggish after it's been running for a while.  What I understand is that there's no option to put any cap on what memory Exchange uses. But with 32GB of RAM available to the machine, surely it shouldn't really need 20 of it. It's still leaving under 1GB available. Is there another way I can prevent Exchange from basically taking over the memory?  PS - this is a virtual machine on HyperV via Server 2012.


I am implementing this simplified model at the moment, and I am trying to get my head around the physics concepts behind this model.    So the model has two parts, first is collision predictions, and then collision resolution.  The collision resolution part says that:     When two hard discs collide, the normal force acts along the line   connecting their centers (assuming no friction or spin). The impulse   ($J_x, J_y$) due to the normal force in the x and y directions of a   perfectly elastic collision at the moment of contact is:   $$J_x = \frac{J\Delta rx}\sigma, ~~J_y = \frac{J\Delta y}\sigma$$ where $$J= \frac{2m_im_j(\Delta v\cdot \Delta r)}{\sigma(m_i + m_j)}$$      and where $m_i$ and $m_j$ are the masses of particles $i$ and $j,$ and $\sigma, \Delta x, \Delta y$   and $\Delta v \cdot \Delta r$ are defined as above. Once we know the impulse, we can   apply Newton's second law (in momentum form) to compute the velocities   immediately after the collision.   Can somebody walk me through the concept behind the impulse's above given formula? I am particularly interested how is the impulse related to $\sigma?$ I tried to find an explanation on-line, but none of the tutorials talk explicitly about $\sigma.$  I know that my knowledge is limited (I have never taken dynamics or kinetics courses) but still, if this can be explained in layman terms than please don't give up on me. I will also be happy if somebody will point me to an on-line explanation off-site.    Update, based on @user115350's answer I did this: $$ J_x = J \cos(\theta) = J \frac{(\Delta rx_i + \Delta rx_j)}{\sigma_i + \sigma_j} $$ and similarly $$ J_y = J \sin(\theta) = J \frac{(\Delta ry_i + \Delta ry_j)}{\sigma_i + \sigma_j} $$  Then based on the velocity equations working backwards suggested by @lemon I get this: $$ J_x = m_i(vx_i^\prime - vx_i) $$ $$ J_x = m_j(vx_j^\prime - vx_j) $$ $$ J_y = m_i(vy_i^\prime - vy_i) $$ $$ J_y = m_j(vy_j^\prime - vy_j) $$  and then this: $$ J = \frac {m_i \Delta vx_i \sigma}{\Delta rx_i + \Delta rx_j} $$ $$ J = \frac {m_j \Delta vx_j \sigma}{\Delta rx_i + \Delta rx_j} $$ $$ J = \frac {m_i \Delta vy_i \sigma}{\Delta ry_i + \Delta ry_j} $$ $$ J = \frac {m_j \Delta vy_j \sigma}{\Delta ry_i + \Delta ry_j} $$  So from here, how can I combine these 4 equations to get the original compound formula of J?


How do electrons in the circuit know that there is less resistance on that path, how do they always chose the most efficient path?

I was told in my physics class that more amount of current goes through less resistance wire and if there is a zero resistance wire all the current will go through it in a parallel arrangement.


How to make Bash script exit when one of the shell background command failed

I have a script something like this:  go build foo -o /tmp/foo \ && echo 'Compressing foo' \ && upx /tmp/foo \ || exit 11 &  #  ^ this exit didn't exit the caller script  go build bar -o /tmp/bar \ && echo 'Compressing bar' \ && upx /tmp/bar \ || exit 12 &   go build baz -o /tmp/baz \ && echo 'Compressing baz' \ && upx /tmp/baz \ || exit 13 &   wait  scp /tmp/foo /tmp/bar /tmp/baz someuser@someserver:/tmp   How to make it exit when one of the background command either foo, bar or baz failed?  EDIT: Solution from the reference above:  PIDS=''  go build foo -o /tmp/foo \ && echo 'Compressing foo' \ && upx /tmp/foo &  PIDS="$PIDS $!"  go build bar -o /tmp/bar \ && echo 'Compressing bar' \ && upx /tmp/bar &  PIDS="$PIDS $!"  go build baz -o /tmp/baz \ && echo 'Compressing baz' \ && upx /tmp/baz  &  PIDS="$PIDS $!"  for pid in $PIDS; do     wait $pid || let 'fail=1' done  if [ "$fail" == '1' ]; then     exit 11 fi  scp /tmp/foo /tmp/bar /tmp/baz someuser@someserver:/tmp


Today in my mathematical quantum theory lecture our professor told us without any explanation, that if $f\in L^1(\mathbb{R}) \cap C^1(\mathbb{R})$ and $f'\in L^1(\mathbb{R})$ it follows that $f\in C_{\infty}=\{f\in C(\mathbb{R})\mid \lim_{R\to\infty} \sup_{∣∣x∣∣>R} ∣f(x)∣=0\}$, where we consider $R$ as a radius. Is there an easy way to see that? For me it is not quite obvious. What informations do I get from the conditions that tell me, that this kind of functions are vanishing at infinity?


What stopped the Ares IV MAV from toppling?

At the beginning of the film The Martian, part of the dialogue implies that one of the crew has the job of monitoring the MAV to check it is still upright. The importance of this job is clearly shown when a storm hits.  Later we find out about another MAV which will be in place for a significant period of time before it is needed, yet no one shows any concern that it may also be at risk of toppling.  So given the importance of this escape craft, why wasn't any plan in place to tether the first craft? And were NASA just gambling on the weather that the latter MAV didn't topple before it was needed?


I recently updated my version of Lyx from 1.6.7 to 2.0.6. I would like to transfer my old keyboard shortcuts to this new version, but I am having difficulty because I was inconsistent with the way that I set them up:   Some were defined in the specified .bind file,  but others were modified in the lyx preferences menu.   I found that when importing my old .bind file into this updated version of lyx, it imported the keyboard shortcuts that were in the .bind file, but not those that I had added in the preferences menu.  Does anyone know if these keyboard shortcuts that were added via the preferences menu are stored in another .bind file somewhere in the lyx directory? Has anyone else successfully transferred keyboard shortcuts that had been implimented in the preferences menu?


Disable emojicons introduced with WP 4.2

So WP 4.2 introduced emojis (smileys) that basically adds JS and other junk all over your pages. Something some people may find shocking. How does one completely erase all instances of this?


How do I extract only those elements from following dictionary which has some data in it?

From this array, i want to select only flipkart and create a new array which contains only flipkart. json = [   {     "amazon": []   },   {     "flipkart": {       "product_store": "Flipkart",       "product_store_logo": "https://images-api.datayuge.in/image/ZmxpcGthcnRfc3RvcmUucG5n.png",       "product_store_url": "https://price-api.datayuge.com/redirect?id=aHR0cHM6Ly9kbC5mbGlwa2FydC5jb20vZGwvcmVhbG1lLTItZGlhbW9uZC1ibGFjay02NC1nYi9wL2l0bWY4NXNjeHlnaHh3Y2g_cGlkPU1PQkY4NVVZQ0RERlZFRE0mYWZmaWQ9YXJ1bmJhYnVs",       "product_price": "10990",       "product_mrp": "0",       "product_offer": "",       "product_color": "black",       "product_delivery": "3-4",       "product_delivery_cost": "0",       "is_emi": "1",       "is_cod": "1",       "return_time": "10 Days"     }   },   { "snapdeal": [] },   { "ebay": [] },   { "paytm": [] },   { "croma": [] },   { "yebhi": [] },   { "indiatimes": [] },   { "homeshop18": [] },   { "naaptol": [] },   { "infibeam": [] },   { "tatacliq": [] },   { "shopclues": [] },   { "paytmmall": [] },   { "gadgets360": [] },   { "mi": [] },   { "2gud": [] } ];  edit: above problem is solved, the solution was, this.store_array.filter(el => {             if(Array.isArray(el[Object.keys(el)[0]])){                 return el[Object.keys(el)[0]].length;             }             else if(typeof el[Object.keys(el)[0]]==="object"){                 this.brands.push(el[Object.keys(el)[0]])                 return el[Object.keys(el)[0]]             }         });  and   was the one who answered it first but i can't find his answer, since i am new to stackoverflow, all credits goes to user. thank you very much.


Do all virtual particle travel at light speed in a vacuum? else wouldn't that imply they should have rest mass however tiny? When they pop back out of existence do their mass disappear instantly? BTW what is the heaviest virtual particle ever found?


I want to have a command line at the top of terminal and history moving down. Is it possible? I am using Ubuntu 16.04, gnome-terminal+tmux.


I have a Google Sheets with a long list of names and amounts. Many of the names are duplicates. For example:  John  | 10 Bill  | 2 Susan | 3 Frank | 4 Sally | 10 John  | 2 Susan | 2 John  | 3   Is there any automated way to combine all of the values so I get a list without any duplicate names and a single sum of all of each person's entry?  For example:  John  | 15 Bill  | 2 Susan | 5 Sally | 10


Two players shooting a target alternately

Two players A and B shoot a target alternately, until somebody hits it and wins the game. Player A takes the first shot. Each time they take a shot, their probabilities of hitting the target are $p$ and $q$ respectively. Which is the probability $\mathbb{P}$ that A wins?   Is the following solution correct ?  A wins if :  he wins with the $1$st shot or  they both fail to hit it during the first $2$ shots, and A hits it with the $3$rd shot or  they both fail to hit it during the first $4$ shots, and A hits it with the $5$rd shot or  ...  So,  $$ \mathbb{P} = p + (1-p)(1-q)p + (1-p)^2(1-q)^{2}p + ... =  p\sum_{n=0}^{\infty}[(1-p)(1-q)]^n = \cfrac{p}{p+q-pq} $$  Thank you in advance


Why DISPLAY=0:0 startx  work but MYVARIABLE="yes" echo $MYVARIABLE  doesn't?


Turn off "Allow Notifications" pop-up in Firefox

When I browse to different websites using Firefox I regularly get a Firefox pop-up asking me to give the website permission to send me notifications.    I have 3 options here   Allow Notifications Not Now Never Allow   It appears that "Never Allow" is only for the specific site - if I go to another site the pop-up will appear again for that site.  I don't use the notification feature and would like the pop-up turned off completely for all sites, but am unsure if this is possible.  In the Firefox options, under Privacy and Security, there is a Permissions section that includes Notifications:    However choosing "Settings..." here just shows me the sites I have already Allowed or Not Allowed, and doesn't give an option to turn off the pop-up.  The Pause notifications until Firefox restarts does not stop these pop-ups from appearing, it just mutes notifications that you have previously allowed.  And clicking "Learn more" tells me about the notifications and how to add them to my own website, but not how to disable them in Firefox.  How can I turn off this pop-up so that I am no longer asked for permission for websites to send notifications?


which statistic should I use for inter-rater agreement on nominal data, multiple responses

I have over 400 open-ended responses. The total has been coded by one rater, and a 10% identical sample of the total has been coded by 2 raters. There is a choice of 14 nominal codes, of which the rater can use any number per case, though most cases have between 1-4 codes. Which statistical test is the most appropriate to determine if I have inter-rater agreement on the 10% sample?   Also am I right in assuming that I will need to treat each code as a variable and look for the level of agreement for each variable?   I'm using SPSS 21.  Much thanks, Kellie


I am trying to understand how to test for the goodness of fit in GLM regression. I am using an example from the book Davison and Hinkley (1997). In R, they fit the following model:  data(cane) # this dataset is available by default cane.glm <- glm(y ~ block+var,family=binomial,data=cane) summary(cane.glm)   Then they write that "for an adequate fit, the deviance would roughly be distributed according to a $\chi^2_{132}$ (where $132$ is the residual degrees of freedom of the regression); in fact, it is 1142.8; This indicates overdispersion relative to the model." They, however, miss to provide more details on how to proceed.  I think I need to compute the deviance deviance(cane.glm) and use pachisq function to test whether the observed value is far away from the theoretical distribution. I don't understand, however, the exact testing procedure. Any example in R would be much appreciated.  In addition,  suggest that this type of "goodness of fit" test "does not actually work very well." Why not? What else should I use?


How do you reach the chest in the desert fortress?

I tried Octopus Spam with Crown, but it's not working well.


How to prove that {$\sin(x) , \sin(2x) , \sin(3x) ,...,\sin(nx)$} is independent in $\mathbb{R}$?

Prove that {$\sin(x) , \sin(2x) , \sin(3x) ,...,\sin(nx)$} is independent in $\mathbb{R}$   my trial :  we know that the Wronsekian shouldn't be $0$ to get the trivial solution and thus they are independent. its not trivial to show that $ W \not = 0$  W =   \begin{vmatrix} (1)\sin(x) & (1)\sin(2x) & (1)\sin(3x) &  ... &   (1)\sin(nx) \\ (1)\cos(x) & (2)\cos(2x) & (3)\cos(3x) &  ... &   (n)\cos(nx) \\  -(1)^2\sin(x) & -(2)^2\sin(2x) & -(3)^2\sin(3x) &  ... &   -(n)^2\sin(nx) \\ -(1)^3\cos(x) & -(2)^3\cos(2x) & -(3)^3\cos(3x) &  ... &   -(n)^3\cos(nx) \\ \end{vmatrix}  and so on. it looks like Vandermonde matrix but i cant prove that and so we conclude that its $W\not =0$


I have the following output:  WordA  1  2  3  4  WordB  5  6  7  8  WordC  9  10  11  12  WordA  13  14  15  16  WordB  I need to grab the numbers between the two words: WordA and WordB I tried (?<=WordA ).*(?= WordB) but the problem is, it grabs ALL the numbers here, including the ones between WordC and WordA that I don't want. I only want to grab the numbers between the 2 pairs which are 1 2 3 4 and 13 14 15 16  Any ideas?


Query execute slowly when changed compatibility Level of my database

I use SQL Server 2014 and have a database with compatibility level 110 (SQL Server 2012). also I have a stored procedure on it that execute about 10 second. When I change compatibility level of my database to 120 (SQL Server 2014), execution time of my stored procedure became about 30 minute. I use following steps but execution time of my stored procedure not changed.  Step 1: Use DBCC CHECKDB command. Step 2: Execute DBCC UPDATEUSAGE on my database. step 3: Rebuild all indexes on my database. step 4: Drop all index and all foreign key on my database and create all again.  After all of above step my stored procedure execution time not changed. But when compatibility of my database returned to 110, my sp run about 10 second. I check above step multiple and get a single result. How must I do. and how can I change compatibility level of my database to 120 (SQL Server 2014). Thanks in advance.


BCM94352z bluetooth not working on Ubuntu 16.04

I recently replaced my wireless card with BCM94352z. The card working perfectly on Windows 10 and Hackintosh. And the 2.4GHz & 5GHz wifi is working well on Ubuntu 16.04 after installing Broadcom firmware.  Once I enter the bluetooth panel, it can show the findable device list correctly, but cannot connect to any of them.    I'm a newbie and I don't know what info should I attach here, please comment and I could update my question in time.    Update:  $ lspci -knn | grep Net -A2; lsusb 02:00.0 Network controller [0280]: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)    Subsystem: Dell BCM4352 802.11ac Wireless Network Adapter [1028:0019]    Kernel driver in use: wl    Kernel modules: bcma, wl Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 04f3:21d5 Elan Microelectronics Corp.  Bus 001 Device 002: ID 0a5c:216f Broadcom Corp. BCM20702A0 Bluetooth Bus 001 Device 004: ID 0c45:6713 Microdia  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Word for 'over-reacting in a moody way and leaving a room while everyone is watching'

When I was a teen in High School, I distinctly remember coming across such a word while turning over the pages of a paperback dictionary.  The meaning was something like this:  A person who knows he has the attention of everyone in the room, overreacts and grumpily leaves the room (may be shutting the door behind). Imagining a teenage girl might help. What is the word for this?  P.S. Knowing the word would give me inner peace, as of now my ignorance of the word leaves me with a deep sense of dissatisfaction.


I don't quite understand the definition of opposite category.  Wikipedia defines $\mathcal{C}^\text{op}$ to be the category formed by 'reversing' morphisms. So for instance, in Grps, given a groups $G,H$ and a homomorphism $f: G \to H$, what does reversing $f$ mean?  Do we reverse $f$ into a homomorphism $H \to G$?


If I have only the internal monitor (LVDS1) with an xrandr -o left command. Now I want to attach a second monitor, say to HDMI1. Then I'd like to rotate only the internal monitor, but not the external one. I tried the following (with no external attached though, since I am mobile currently), but that does not do anything:  xrandr --output LVDS1 -o left   How can I rotate only one monitor?  I do need some command line, since I want to put this into a script.


Why do the Human-looking Youkai obscure their eyes?

In Natsume's Book of Friends, some of the human-looking Youkai wear masks, or at least obscure their sight. For example:   Tsubame   Hotaru   Hiiragi   Tsuyukami   Sasago     I am wondering if there is a reason for this as none of these Youkai seemed to be affected by their obscured vision. For Tsubame and Hotaru, they are both shown to be able to show their full face. And for Kiiragi, after she was attacked, we can see one of her eyes though her broken mask and there seemed to be nothing wrong with it.


What time zone is used for platform events?

When code is run in the context of a platform event, which time zone is chosen as the context time zone, and can that time zone be configured?    Unlike site guest users, the "Process Automated" entity doesn't seem to have related user record where a time zone can be set.


Prove that if $A^*+A=AA^*$ then $A$ is normal. I've tried some basic algebraic operations with no luck.


I have found the following entry in a user crontab:  */5  * * * *  ~/bin/php /path/to/phpscript &> /path/to/logfile   What is the meaning of the & (ampersand) here? Has it still the meaning of running in background? Does it make sense in a cronjob?


How to check for normal distribution using Excel for performing a t-test?

I want to know how to check a data set for normality in Excel, just to verify that the requirements for using a t-test are being met.    For the right tail, is it appropriate to just calculate a mean and standard deviation, add 1, 2 & 3 standard deviations from the mean to create a range then compare that to the normal 68/95/99.7 for the standard normal distribution after using the norm.dist function in excel to test each standard deviation value.  Or is there a better way to test for normality?


Proof that a slope coefficient can be given as the covariance of y and residuals divided by the variance of residuals

I want to show that the slope coefficient for the jth regressor for $i = 1, \dots, 2$ and $j = 1, \dots, k$ is given as $$ b_j = \frac{Cov(y_j, u{_{ji}})}{Var(u_{ji})}$$ where $u_{ji}$ is the residual from a regression of $x_{ji}$ on all other covariates.


Interpretation of Moment of Inertia Tensor

Is there a simple physical interpretation for the off-diagonal entries of the moment of inertia tensor?  I know that those entries are de facto necessary to use the tensor to calculate quanties like angular momentum or rotational kinetic energy, and that they can be dispsensed of by switching to principal axes, but that's more of a tautology than a way of understanding them, at least in my opinion.  Another way to phrase this question (I guess): why isn't any set of (linearly independent) axes a set of principal axes for a rigid body?


Java Exception. java.lang.NullPointerException. Null or e?

guys im wroted this code. When i was writing i have problem when i want to write "e" in argument (void Record). Well Eclipse sugereting me null. I change "e" on "null" but now. When im compiling program has error:   Exception in thread "main" java.lang.NullPointerException at javax.swing.SwingUtilities.isLeftMouseButton(SwingUtilities.java:796) at Clicklu.Clicklu.Action.mousePressed(Action.java:14) at Clicklu.Clicklu.Action.Record(Action.java:26)         at Clicklu.Clicklu.Main.main(Main.java:11)   import java.awt.event.MouseEvent;  import javax.swing.SwingUtilities;  public class Action { LeftMouseClick leftMouseClick = new LeftMouseClick(); RightMouseClick rightMouseClick = new RightMouseClick();  CoursorMove tr = new CoursorMove();  public void mousePressed(MouseEvent e) {     if (SwingUtilities.isLeftMouseButton(e)) {         leftMouseClick.addNewLeftMouseClick();     } else if (SwingUtilities.isRightMouseButton(e)) {         rightMouseClick.addNewRightMouseClick();     } }  public void Record()  {     for (int i = 0; i < 10000; i++) {         Action action = new Action();         action.mousePressed(null);         tr.gettingMouseCoordinates();      }  }  public void Play() {     for (int i = 0; i < 10000; i++) {         int leftindex = 0;         int rightindex = 0;         tr.moveCoursor();          if (tr.getCoordinate(i).equals(leftMouseClick.getCoordinate(leftindex))) {             leftMouseClick.leftMouseClick();             continue;         }          else if (tr.getCoordinate(i).equals(rightMouseClick.getCoordinate(rightindex))) {             rightMouseClick.rightMouseClick();             continue;         }      }  }   }  Main class:   public class Main {  public static void main(String[] args) {     // CoursorMove triup = new CoursorMove();     // triup.gettingMouseCoordinates();     // triup.moveCoursor();        Action test = new Action();     test.Record();     test.Play();  }   }


I have a python list, say l  l = [1,5,8]   I want to write a sql query to get the data for all the elements of the list, say  select name from students where id = |IN THE LIST l|   How do I accomplish this?


Approaching in the conventional way, as n approaches infinity, n/(n+1) approaches 1 and 1^infinity is 1. so the limit is 1.  But usually, I have seen it solved as 1/e which makes sense as well.  Why isn't the first approach incorrect if it is?


Finding the left and right cosets of H = {(1), (12), (34), (12) ○ (34)} in S4

I have an exercise where I am supposed to find the left and right cosets of H = {(1), (12), (34), (12) ○ (34)} in S4. But how do I generate the cosets? As I have understood it you are supposed to pick a number that is not in the set H and multiply it with every number in H. But this does not exactly give the right answer. I would really appreciate it if someone gave an easy to understand explanation of how to generate the left and right cosets.


I have been editing Stack Overflow posts for awhile, and the majority of my edits seem to get accepted, but I wanted to take a step back for a second and see how the community thinks questions should be edited.  Most of my edits fall under:   Fixing spelling/grammar Fixing syntax indentation And adding tags to posts   I think these can be broken into two categories:  No Duh Edits   Spelling and Grammar Improper capitalization Unhighlighted code A whole code block starting with unnecessary indentation   Risky Edits   Changing code indentation from tab/4 spaces to 2 spaces Combining sentences to make them more readable Adding tags   I am fine making no duh edits, but when it comes to more risky edits I try and avoid them, but an argument can be made for them. With tab/4 space indentation code blocks become long, and many do not fit into the web page without scrollbars. Fixing indentation seems like it could be a good thing, but you are also deviating from the original code, and the example no longer matches the real thing.  Adding tags also seems like it could be a good thing, but the person asking the question may have only intended it to have that one tag. For example, I was editing a MySQL question, and I noticed the code was written in PHP, so I added the PHP tag. While the issue itself is with MySQL, I figured PHP programmers might be familiar with the error since there is overlap.  Lastly, how full proof is the approval process. If there is an edit I am not sure about, can I expect the approval process to protect the question from being altered too much? Perhaps I am overthinking this, but I would love to know how other people edit. Cheers.


This has occurred to me due to conflict between Fabricate and Blight. Fabricate says it can not target creatures and lists trees as example targets. Blight on the other hand can only target creatures and lists mundane normal plants as example targets.     Which of these conflicting spell descriptions is correct?    Note: It also occurred to me that plants might also be whichever one is convenient, unlikely but possible.


No this has not been answered, stop being so fast on the down voting and read, this is why NOT to have a setter accompanying a getter. What you guys have sent so far is how a getter and setter work hand in hand and not why one would have them individually.  What is the point of only having a getter that is not accompanied by a setter? As far as I understand it, we use the getter to get the value and a setter to validate the value inserted.  But I have this code here that leaves me confused.  private int Area { get { return _width * _height } }   What's the point? Nothing is being validated. Why not just make a field holding the value, such as:  private int area = _width * _height   Confusing to say the least.


Counterexample to viewing derivative as a quotient of differentials

The derivative of a function $y = f(x)$, $\frac{dy}{dx}$ seems to behave like a quotient in many cases:  $$ dy = \frac{dy}{dx} dx,$$  or  $$ u = h(x) $$ $$\int f(x) dx = \int h(f(x)) \frac{du}{dx} du$$  Yet we're often told that it's not correct to view it that way. For example, the wikipedia article on Leibniz' notation says  The expression dy/dx should not be read as the division of two quantities dx and dy.  Is there an example of a situation in which viewing $\frac{dy}{dx}$ as a quotient will lead to an incorrect result?


I get a null pointer exception error when i try to give a name to it. I mean it gives an error while doing R.id.contacts which probably means it's layout doesn't have the listview.       @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     DataBaseOperations hell = new DataBaseOperations(getActivity());     SQLiteDatabase db = hell.getReadableDatabase();     String[] columns = {mDatabase.Tableinfo.ID,mDatabase.Tableinfo.Contacts_phone,mDatabase.Tableinfo.Contacts_name,mDatabase.Tableinfo.Contact_pic};     Cursor Contacts = db.query(mDatabase.Tableinfo.contacts, columns, null, null, null, null, null);     ContactsAdapter adapter = new ContactsAdapter(getContext(), Contacts,0);     ListView iv = (ListView)lview.findViewById(R.id.contacts);     iv.setAdapter(adapter);     Contacts.close();     lview = inflater.inflate(R.layout.fragment_contacts_list, container, false);     return lview; }   as it inflates the layout named fragment-contacts_list.Here is the code for that     <?xml version="1.0" encoding="utf-8"?> <ListView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/contacts" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:layout_weight="1" tools:listitem="@layout/fragment_contacts" />   Why is my listview null???