Determine if two rectangles overlap each other?

I am trying to write a C++ program that takes the following inputs from the user to construct rectangles (between 2 and 5): height, width, x-pos, y-pos. All of these rectangles will exist parallel to the x and the y axis, that is all of their edges will have slopes of 0 or infinity.  I've tried to implement what is mentioned in  question but I am not having very much luck.  My current implementation does the following:  // Gets all the vertices for Rectangle 1 and stores them in an array -> arrRect1 // point 1 x: arrRect1[0], point 1 y: arrRect1[1] and so on... // Gets all the vertices for Rectangle 2 and stores them in an array -> arrRect2  // rotated edge of point a, rect 1 int rot_x, rot_y; rot_x = -arrRect1[3]; rot_y = arrRect1[2]; // point on rotated edge int pnt_x, pnt_y; pnt_x = arrRect1[2];  pnt_y = arrRect1[3]; // test point, a from rect 2 int tst_x, tst_y; tst_x = arrRect2[0]; tst_y = arrRect2[1];  int value; value = (rot_x * (tst_x - pnt_x)) + (rot_y * (tst_y - pnt_y)); cout << "Value: " << value;     However I'm not quite sure if (a) I've implemented the algorithm I linked to correctly, or if I did exactly how to interpret this?  Any suggestions?


Transpose multiple columns into 2 column and single row to multiple row in sql

Using Select top 1 statement I have to retrieve data from an 8 column table without any unique key.  Now I want to transpose this table into two columns: original column name to the first and its respective value to second.  An original table like this:  Column1 | Column2 | Column3 | Column4  55      | 108     | 555     | 85   And the expected result:  ColumnName | Value Column1    | 55 Column2    | 108 Column3    | 555 Column4    | 85


Find all function $f:\mathbb{R}\to\mathbb{R}$ such that $$f(f(x)+y)=f(x^2-y)+4f(x)y, \forall x, y\in\mathbb{R}$$ By substitution $y\to\frac{x^2-f(x)}{2}$, $$f(x)(x^2-f(x))=0$$. Now I want to prove that if there os some $x_0\neq0$ such that $f(x_0)=0$, then $f(x)=0,\forall x\in\mathbb{R}$ Substituting $x\to x_0$, $$f(x_0^2-y)=f(y)\implies f(x_0^2)=f(0)=0$$. Then by induction $f(x_0^{2^n})=0$. But I can't finish that. Can anyone help me?


Are the ECDSA public keys of a stable/fixed length relative to curve size?

I am working in an environment with strict bandwidth requirements, and we need predictable bit lengths of the stuff we send. We need to broadcast ECDSA public keys, and we are using OpenSSL to generate them.  So will the prublic key lengths vary from private key to private key? Or will they be constant?  I noticed there are many output formats, like DER, and one with base4 encoded public key wrapped in headers. I would like the shortest possible public key, possibly in bit format, with predictable length. What is the best way?


Introduction  I have some business logic properties in the application.yml file.  They are loaded into the application via a @ConfigurationProperties annotated class.  How could I use these properties in a class which is not a Spring Bean? It cannot be a singleton, because many objects of it must be created during run-time.  Example  application.yml  business.foo: 2   BusinessProperties.java  @ConfigurationProperties("business") @Getter // lombok @Setter // lombok public class BusinessProperties {     private int foo; }   TypicalBean.java  @Component public class TypicalBean {     private final BusinessProperties properties;      @Autowired     public TypicalBean(BusinessProperties properties) {         this.properties = properties;     }      @PostConstruct     public void printFoo() {         System.out.println("Foo: " + properties.getFoo()); // "Foo: 2"     } }   NonBean.java  public class NonBean {     public void printFoo() {         System.out.println("Foo: ???"); // How to access the property?     } }   Is there some way to create a non-singleton class, which can have access to configuration (or even other Spring beans) but otherwise works the same as a regular java class? Meaning that I can control its creation, it is collected by the garbage collector if not used anymore, etc.


Can't install .NET 3.5 on a Windows 10 Enterprise laptop, getting error 0x800F0954

I'm required to install some software on my work laptop. It's running Windows 10 Enterprise. It failed, telling me that I need to have the .NET Framework 3.5 installed. I've tried, unsuccessfully, to install .NET 3.5 both by going to Microsoft's website and also by going through Turn Windows Features on and off. Neither worked. I've looked here on Superuser, but couldn't find anything the discussed error 0x800F0954. Found other errors, but not 0x800F0954, so I don't believe this is a duplicate. Given this, then how to I resolve this problem? Here's a picture of the error:


New high quality tire doesn't sit evenly on the rim

It's my first tire change experience and I got so far using youtube videos but now I'm stuck. Got these Schwalbe 365 tires yesterday for my folding bike. It is an all season model which feels a bit harder than the tire that was on the bike from the factory but both are 40-406 20x1.5". The bead doesn't sit properly on the rim. This is the case from both sides as seen in the images. There's a small misalignment between where the problem manifests itself on each side of the rim. The tube is also brand new (Continental). The temprature in the bicycle room where I tried is around 16-22 deg.  Hadn't used soapy water when installing the tire and can't measure tire pressure (it's recommended 3-6 bar).  What do you recommend to solve the issue?     Update: bought a pump with gauge, rotated the tire and used a bit of liquid soap to end up with this result:    One thing that I discovered today is that the tire is literally tighter at the point where there's a problem which makes me think the tire might have some issues due to how it was stored I  the shop. But that would be too sad because despite the issues I really like these tires.


Suppress a biblatex field in only one of split bibliographies?

I am aware of \clearfield, \clearlist etc (cf. ) - but I'm really not sure how to apply it in this context:  Say you have a split bibliography (i.e. several calls to \printbibliography in one document). How can you filter a specific field in a bibliography item - but only in one bibliography (i.e. only in one call to \printbibliography)?  For instance, in the MWE below (compiles with pdflatex test.tex && biber test && pdflatex test.tex && pdflatex test.tex), let's say I'd like to filter urldate (i.e. urldate is not typeset) only in the first bibliography - but for the second one, the original/default behavior should be restored (i.e. urldate is typeset). How to I do that?  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @online{ctan,   title        = {CTAN},   date         = 2006,   url          = {http://www.ctan.org},   subtitle     = {The Comprehensive TeX Archive Network},   urldate      = {2006-10-01},   label        = {CTAN},   langid       = {english},   langidopts   = {variant=american}, } @misc{google,   title        = {Google},   date         = 2007,   url          = {http://www.google.com},   urldate      = {2007-10-01}, } @misc{hotmail,   title        = {Hotmail},   date         = 2008,   url          = {http://www.hotmail.com},   urldate      = {2008-10-01}, } @misc{yahoo,   title        = {Yahoo},   date         = 2009,   url          = {http://www.yahoo.com},   urldate      = {2009-10-01}, } @misc{aol,   title        = {AOL},   date         = 2010,   url          = {http://www.aol.com},   urldate      = {2010-10-01}, } @misc{altavista,   title        = {AltaVista},   date         = 2011,   url          = {http://www.altavista.com},   urldate      = {2011-10-01}, } \end{filecontents*} \usepackage[utf8]{inputenc} \usepackage[backend=biber,defernumbers=true,style=ieee]{biblatex} \bibliography{\jobname}  \begin{document}  \section{Section 1} \begin{refsection}  Citing some stuff here: first \cite{ctan}, then \cite{google}, and finally \cite{hotmail}.  \printbibliography[sorting=none,section=\therefsection,resetnumbers=true]  \end{refsection}  \section{Section 2} \begin{refsection}  Citing some stuff here: first \cite{yahoo}, then \cite{aol}, and finally \cite{altavista}.  \printbibliography[sorting=none,section=\therefsection,resetnumbers=true]  \end{refsection}  \end{document}   Output:


For regular expressions $r$ and $s$ prove: $$(r^*s^*)^*=(r+s)^*$$  I guess I have to prove the equality of sets $(R^*S^*)^* = \left\{ x_1^{n_1}y_1^{m_1}x_2^{n_2}y_2^{m_2}... \mid n_i,m_j \in \mathbb{N_0},x_i \in R, y_j \in S \right\}$ and $(R \cup S)^* = \left\{ x_1^{n_1}x_2^{n_2}x_3^{n_3}... \mid n_i \in  \mathbb{N_0},x_i \in R \cup S \right\}$ This seems simple enough.


Currently, I am working on a latex document but unfortunately, black cells appear on the head of the table while using table generator. Any idea?


Route a particular process over another gateway

I have 2 internet connections on differnet interfaces. I have eth0 which is internal ip of 192.168.1.70 and then I have another network connection to a different network which is on wlan0 192.168.43.193.  I want to use the 1.70 as my primary interface, however I'd like to have everything except Deluged go out of the eth0 and all connections for deluge go out of wlan0 (43.193)  I understand that you can only have one default gateway which currently I have to change depending on what I wish to do. I would prefer to keep my main outbound connections going via eth0 but still able to use wlan0 for specific processes.  How can I go about this?


Can I apply for Schengen visa from foreign country?

I am travelling to Usa for a conference and my nationality is Bangladeshi. I have B1/B2 visa for USA.  Recently i also got an invitation from italy. But because of my travel date to usa is nearby i cannot apply for italian visa or Schengen visa from Bangladesh. Cause for visa application they will take my passport. So my question is, can I apply for italy visa from New York, usa. I don’t have any permanent residence id or something only the valid visa. Is it possible to apply?


Sandbox Refreshes with Different Connected Apps Configurations for Prod/Test

Currently looking for ideas on how to handle sandbox refreshes, where production and the sandboxes use different configurations in a Connected App. That is, each environment has a Connected App where a different certificate and URL is used. Is there an easy way to handle this without manually re-setting up Connected Apps when doing refreshes? It seems the only possible way to automate this would be with the sfdx force:mdapi since unlocked packages can't be used with Connected Apps. I wanted to check if this is actually the recommended method though as it doesn't seem great. Any guidance is appreciated. Thanks.


Is there a way to prevent the whole document to use word breaking?  I have seen some options such as \raggedright{} but that is not elegant for a book.


I can't understand the output of this program .  What I get of it is , that , first of all , the pointers p, q ,r ,s  were pointing towards null .   Then , there has been a typecasting . But how the heck , did the output come as 1 4 4 8 . I might be very wrong in my thoughts . So , please correct me if I am wrong .   int main() {      int a, b, c, d;      char* p = (char*)0;      int *q = (int *)0;      float* r = (float*)0;      double* s = (double*)0;       a = (int)(p + 1);      b = (int)(q + 1);     c = (int)(r + 1);     d = (int)(s + 1);      printf("%d %d %d %d\n", a, b, c, d);       _getch();     return 0;  }


Prove $\dfrac{\csc\theta}{\cot\theta}-\dfrac{\cot\theta}{\csc\theta}=\tan\theta\sin\theta$   So, LS= $$\dfrac{\csc\theta}{\cot\theta}-\dfrac{\cot\theta}{\csc\theta}$$ $$\left(\dfrac{1}{\sin\theta}\cdot \dfrac{\tan\theta}{1}\right)-\left(\dfrac{1}{\tan\theta}\cdot \dfrac{\sin\theta}{1}\right)$$ $$\dfrac{\tan\theta}{\sin\theta}-\dfrac{\sin\theta}{\tan\theta}$$ Now, considering the fact that I must have a common denominator to subtract, would this be correct: $$\dfrac{\tan^2\theta}{\tan\theta\sin\theta}-\dfrac{\sin^2\theta}{\tan\theta\sin\theta}\Rightarrow \dfrac{\tan^2\theta-\sin^2\theta}{\tan\theta\sin\theta}$$ I feel like I'm close to the answer because the denominator is the RS of the OP. Please help. Do not give me the answer.


Show that $\{\frac{e^n}{n!}\}$ converges.

I know that the sequence $\{\frac{e^n}{n!}\}$ converges and that for prove it i have to limit it, but i don't know how do it. In fact, i know that $\{\frac{x^n}{n!}\}$ converges, but i don't know prove it. i want to aclarate that is convergence of the sequence, isn't of te serie.


Does a dual-wielder get advantage on both attacks if hidden?

If my rogue attacks while hidden and dual-wielding shortswords, do I have advantage on both of my attacks (from ) or only on the first attack?


I encountered the following induction proof on a practice exam for calculus:  $$\sum_{k=1}^nk^2 = \frac{n(n+1)(2n+1)}{6}$$  I have to prove this statement with induction.  Can anyone please help me with this proof?


Get name of passed argument in C# method

I want to get the variable name of an argument passed into a method. // Somewhere in the code int myNumber = 1; Method(myNumber);  ...  public void Method(int number) {     // Here I want to somehow get "myNumber" as well as access the value '1'. }  I haven't had any success finding an answer to this question. Many answers says no, but that is back when C# 6 was the latest version. Maybe there is a solution today? I imagine that passing by reference ref could be relevant, as that at least ensures that a variable is passed in the method, and not just the value.


Exactly sum the series $\sum_{n=1}^{\infty}\frac{1}{2^nn}$

So I have started by finding that $\sum_{n=1}^{\infty}\frac{x^n}{n}$ has a radius of convergence of 1. I would think that I need to use this to solve it by differentiating it and substituting in some value of x to make it my formula. I can't seem to find a solution.


How can I solve $\lim_{x \to \infty} (\cos \frac {1}{x})^{x^2}$ without differentiation/l'Hospital/Taylor Series?

The given limit is:   $$\lim_{x \to \infty} \left (\cos \dfrac {1}{x} \right)^{\displaystyle x^2} $$      The answer is $\dfrac{1}{\sqrt e}.$      My working: $$\lim_{x \to \infty} \left (\cos \dfrac {1}{x} \right)^{\displaystyle x^2} $$ $$=\lim_{x \to \infty} e^{\displaystyle \ln{\left(\cos \dfrac {1}{x} \right)^{\displaystyle x^2}}} $$ $$=\lim_{x \to \infty} e^{\displaystyle \ln{\left( \sqrt {1-\sin^2 \dfrac {1}{x}} \right)^{\displaystyle x^2}}} $$ $$=\lim_{x \to \infty} e^{\displaystyle \ln{\left({1-\sin^2 \dfrac {1}{x}} \right)^{\dfrac {x^2}{2}}}} $$  I am stuck at the 4th limit and I don't know how to go on. What should I do?


Use sub and superscript as [optional] parameters for macro

I am defining a macro, and would like to run other macro's on any sub/superscripts given to it. For example, I would like to define it such that something like:       \myMacro_{lower}^{upper} -----> \operatorname{something}_\someMacro{lower}^\anotherMacro(upper)   Where both sub/super-scripts would be optional. How would this best be done?    Prior works:    provides a neat solution when we are just interested in a superscript.  might be the correct solution to use, but it seems like it might be overly complex - is there a simpler solution that avoids adding the xparse package (as the first solution manages)?


Is there a central font-license search site?

There are many font websites, that are eager to sell you fonts, or let you download them for free. So many that there is no way to know which are legit, and give the money to the copyright/license holder for the font. Is there a good central location to search who owns the copyright/license for fonts that can be found online?  In my current specific case, I am trying to find out if I can use "A L Heavenly" for commercial purposes, but have not been able to track down who owns the license beyond the name "", and that it has been .  So is there a good way to track down authors when the licensing info on font websites is not completely trustworthy?  Note: yes, I realize the question is very similar to , but in my case, what I want to know is what options are available in terms of a reliable, trustworthy, website that has links to contact the font authors (something most sites I have run into do not seem to have) or which can be trusted when they state a font's license (as free, or licensed by paying through the site).


Cant get JOptionPane string input to match a string value

I am relatively new to coding in general and have run into an issue, I've looked everywhere for help but I cant find this issue. It would be greatly appreciated if someone could tell me why the string "s" doesn't ever equal the string "temp" even if I type the correct number in.  String s = null;         do{             s = (String) JOptionPane.showInputDialog(null, "Select a card to check for (Jacks = 11, Queens = 12, Kings = 13)", "Player's Turn", JOptionPane.PLAIN_MESSAGE, null, null, "Pick a card");              System.out.println(s);             for(int x = 0; x < PlayerCards.size(); x++){                 String temp = PlayerCards.get(x).getFace();                 if(s == temp){                     playerhas = true;                 }             }             if(s == null || playerhas != true){                 JOptionPane.showMessageDialog(null, "Please pick a card you have.", "Error", JOptionPane.INFORMATION_MESSAGE);             }         }while(s == null || playerhas != true);


Are players allowed to pass a penalty kick?

I saw a video of Johann Cruyff , isn't that against the rules?


MyOpenID is no longer supported - alternatives most likely to be immune to this type of change?

Following , I would like to follow the suggestions and add a new means of logging in, as suggested by the OP of that questions.  However, I am not sure which provider I should pick.   Which one is least likely to "pull the plug" so to speak, as  has done with MyOpenID? Are there other things I should consider when choosing a new provider?   Thanks!    I do understand that this question would attract quite a few primarily opinion based answers, and so I would like to ask that you refrain from simply stating "I recommend provider X". Please give objective reason(s) to back your recommendation!


Trying to identify a short story (possibly arc) where barbarian and accomplice freed slaves

A friend of mine did some consulting for a book binders/printers in Scotland in the late 90s and early 2000s. He would bring me bags of books that had an issue and couldn't be sold.  Amongst this mountain of books was a book of short stories, I presume by one author as I remember there being a number of stories with recurring characters.  The story I remember involved a barbarian character and his child/teenager male accomplice who would allow himself to be captured and the barbarian would then come and rescue him and release all the slaves. The setting was (I think) desert/scrub like North Africa and the technology level was around the level of the Roman Empire (I have a mild association with Byzantium, but that may have come from reading Guy Gavriel Kay's Sarantine Mosaic series at the same time!)  I think another story dealt with the same pair later, having fallen out over philosophical differences, now living in a city and involving themselves in politics.  I remember having a collection by Stephen R Donaldson, but not sure if this was it, having a look at his output doesn't ring any bells.


Cell biology - Resting membrane potentials

Why do we say there is an overall negative charge on the intracellular side of the plasma membrane at rest, and an overall positive charge on the extracellular side when both potassium and sodium are positively charged ions, and they are in relatively equal amounts on either side? It seems to me that both sides should be positively charged, and I can't get my head around it.


How Do You Make a Tweet Personal Only To the One You Reply to?

When you do a personal reply tweet on another's twitter, it automatically shows up on your own twitter page. What happens if you delete the one on your own page that you don't want out to the world because it was a personal reply on another's page just for them? I mean if it's a person health issue the person does not want out to the world and you reply to it, and then it also shows up on your own twitter page, if you delete it on your own page, will it also delete on the one you replied to where you want it to stay as well?  In other words, how to you make a tweet personal so it's not all over the place and just stays where you tweet it?


I've got an MCU with a 3.3V DAC onboard and I'd like to convert the 0-3.3V signal to a 4-20mA output. Any ideas on how to do this?


Compactness of a set : $A=\left\lbrace 2019,1010,\ldots,(n+2018)/n,\ldots \right\rbrace$ and $B=A \cup \left\lbrace 1 \right\rbrace$

How can I show directly (that is, not using the compactness criterion in $\mathbb{R}$) that every open cover $G$ of $B$ admits a finite subcover?  I know that $A$ is not compact and I am aware that I would need a single example to prove it, any hint on how to find an open cover of $A$ that does not contain a finite subcover?


Problem with inserting the Greek letter \omega when using Arabi package

In the following example, the symbol \omega does not show up after compiling the file. This is the first Greek later for which I have this kind of the problem. Is there a way to solve this problem. This question is related to my previous question in   \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[LFE,LAE,OT1]{fontenc} \usepackage[farsi,english,arabic]{babel}  \begin{document} \selectlanguage{farsi}  $\omega$  \end{document}


Random variables depending on a Poisson variable

Consider a Bernoulli experiment of parameter $p$ that can be repeated independently for $N$ times, where $N \sim $ Poisson$(\lambda)$. Let $X$ be the number of successes and $Y$ the number of failures. How can I calculate the distribution of $X$ and $Y$? My attempt with $X$ was to consider it as a Binomial with parameters $N,p$ (and $Y$ can be considered as a Binomial with parameters $N,1-p$). The only thing that came out in my mind was to use the disintegration formula as it follows: $$P(X=k)=\sum_{n=k}^{\infty}P(X=k \mid N=n)P(N=n)=\sum_{n=k}^{\infty} \binom{n}{k}p^k(1-p)^{n-k}\dfrac{\lambda ^n}{n!}e^{-\lambda}=\\ =\dfrac{p^ke^{-\lambda}}{k!}\sum_{n=k}^{\infty}\dfrac{(1-p)^{n-k}}{(n-k)!}\lambda^n$$ Is this correct? And if it is, how do I evaluate the last series (Wolphram Alpha says $\lambda^ke^{\lambda-\lambda p}$)?


Shell Script Execution with Bash and without bash on command line

I have a shell script that reads data from a file and stores it into an array. When i execute the script like bash scriptname.sh i dont get any errors  but when i execute it using sh scriptname.sh i get errors like array deceleration not found some syntax errors like parentheses are expected.   why differences are coming between these two approaches??


Incorrect Titles, Descriptions and Redirects in Google

I'm at a loss for why Google is indexing my site incorrectly. I just uploaded a new version of the site last night and "fetched as google" last night as well. Also uploaded sitemap.   www.lemonsevens.com Search Term: lemon sevens  Still, though, for some reason google isn't displaying my title correctly and it is saying that it can't display the meta-description due to a blocked robot.txt (which isn't true). Help!?


So I've upgraded the guild so I have all the fences around the ragged flagon, I've done all the quests in my quest log that relates to the guild. When I came back from returning the Skeleton Key (nothing glitchy about that quest, it showed up as completed and everything) I was expecting for Brynjolf to walk up to me when I got back and ask me about the key and say "Why don't you become guild master?" or something but he had disappeared form the guild completely and I couldn't find him anywhere. And if I spawn him in he's wearing the guild master's armor and the only dialogue option I had was "How is the Guild doing ?" he would reply about how its better with Mercer gone and the guild is in such a prosperous state and he said he was proud of the guild and of the guild master. - WHAT? no other dialogue options appear for me and I'm so confused and If I use the -setstage TGleadership 0- console command nothing happens! Karliah is in the Nightingale Sanctuary, just chilling out, completely normal BTW. Please help.  Something similar happened on the Dark BH quest HAIL SITHIS! where the final dramatic Emperor's cutscene wouldn't trigger and no console commands could fix it so I can never, ever finish the Dark BH quest line...


Minimum covariance of 2 random variables given the covariance of each with a third random variable

If we have 3 random variables, with the first two with a covariance of 0.1 and the second two with a covariance of 0.1, what is the minimum covariance of the first and third? Is there a generalized solution on bounds on covariance matrices?


How to keep rice in a biryani from burning and sticking together?

The bottom part of my  Biryani always  gets burnt, rice always gets sticky but I want each grain separated. How can I prevent burning & stickiness of rice?


When I heard about the LIGO gravitational wave detection, I wondered if the distance to the event was determined by the inverse square law of radiation and/or by measured red shifts. Which is/are the case? A previous answer to the nature of the redshifts of gravitational waves implies that the original frequency is unknown and therefore the red shift is also unknown. I further wonder how the computations of the masses of the two stars can be so precise, but the gravitational waves' frequencies not be.    I am an amateur astronomer, and past planetarium director, and not versed in relativistic gravity theory. I have hunted for an answer since February, even e mailing Kip Thorne, whose book "Gravitation" I own.  Regarding critique as a duplicate:  I am  accustomed to asking the distance to an object, by asking the redshift, esp. for distances too far for Cephiad variables to be visible. Perhaps the question is dumb, but no one has inquired about the possibility of directly measuring redshift of this event. Therefore, I think this question is somewhat unique. From the comments I gather that LIGO events can never have their redshifts directly measured.


chmod 777  -R  /mnt   rm -rf /mnt/*    rm: cannot remove 'omitted': Read-only file system   rm: cannot remove 'omitted': Read-only file system     Please show me how I can do this?


Why is there a NullPointerException in the output?

I was learning Threads , and I'm stuck up on this program, why is this resulting in NPE? why do the threads not run?  here's my code:  class Chicks {         synchronized void yack(long id) {         for(int x = 1; x < 3; x++) {             System.out.print(id + " ");             Thread.yield();         }     } } class ChicksYack implements Runnable {     Chicks c;     public static void main(String[] args) {         new ChicksYack().go();     }     void go() {         c = new Chicks();         new Thread(new ChicksYack()).start();         new Thread(new ChicksYack()).start();     }     public void run() {         c.yack(Thread.currentThread().getId());     } }


Spinner in dialog : NullPointerException

Good Day i am using spinner inside dialog and it generating   Error msg- ` java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Spinner.setAdapter(android.widget.SpinnerAdapter)' on a null object reference at com.example.amw51.ygeianapp.Activity.AwardActivity.showAddItem(AwardActivity.java:259)   Java code    dialog.setContentView(R.layout.job_add_detials_layout); Spinner   jobSpinner = (Spinner)findViewById(R.id.select_job_spinner);  jobSpinner = (Spinner) findViewById(R.id.select_job_spinner);                 List<String> list = new ArrayList<String>();                 list.add("Android");                 list.add("Java");                 list.add("Spinner Data");                 list.add("Spinner Adapter");                 list.add("Spinner Example");                  ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>                         (this, android.R.layout.simple_spinner_item,list);                  dataAdapter.setDropDownViewResource                         (android.R.layout.simple_spinner_dropdown_item);                  jobSpinner.setAdapter(dataAdapter);  dialog.show();                 XML Layout   <Spinner         android:id="@+id/select_job_spinner"         android:layout_marginTop="15dp"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:padding="15dp"         android:layout_marginLeft="10dp"         android:layout_marginRight="10dp"         android:textColor="@color/colorPrimary"/>    i have searched everywhere but didnt find any proper solution .                             `


Calculating minimum distance using "Distance Matrix" in QGIS

I want to calculate minimum distance between points and a line in QGIS. I use "Distance Matrix", point shapefile contains 1337 points data, and I made unique ID as sequence number. A line is actually coast line and I convert text file to vector, then extract nodes using "Extract Nodes".   I followed manual and tutorial, but the output is different with what I expected. They mentioned that if I want to calculate minimum distance note check k=1, but I think my result contains the farthest distance. The output file's target ID is all the same. And I wonder what is the exact meaning of unique ID?   Please check and advise about my actions.


Is there a word for someone who is usually in the minority?

My original question was "Is there a legitimate word for 'a balancer'?" but I think it's a little hard to understand...  Let's just say there is a person, and most of the time, he is in the minority. It can be very simple, such as: he simply hates a song everybody likes (and vice versa), or he has a very long list of 'underrated movies'. I guess he has a different (if not eccentric) taste comparing to most people..  On the other hand, he often does things that most people would refuse to do, too (whether he wants to or not). For example, most people wouldn't buy damaged goods, but he would. You can say he is sacrificing himself. To his mind, "If everybody wants perfection than who will care for the damaged?" or "There are certain people who would only accept the best, so there must be people who accept the worse, coexisting with the former."  This person does things that most people would never do, he stays in the minority so other people can be in the majority => some sort of "balancer"? You know, since he balances everything.. So, is there a word for people like him?  I know this is a long shot but please help me if you can, thank you!


Chessboard filled with numbers, having same sum always if exactly $1$ number is taken from each row and each column

Consider the squares of an $8\times 8$ chessboard filled with the numbers $1$ to $64.$ If we choose $8$ squares with the property that there is exactly one from each row and exactly one from each coloumnwise, and add up the numbers in the chosen squares, show that the sum obtained is always $260.$ Numbers filled the squares as in the figure below.


Can I use extra attack as the bonus action to improved war magic to get 2 hits and a spell?

The War Magic feature of the Eldritch Knight states (PHB p. 75):     when you use your action to cast a cantrip [or at level 18+ a spell], you can make one weapon attack as a bonus action.   I'm quite confused: if I take that bonus action will the extra attack apply to it?


Given the IPs of all on my network, how can I find their computer names?

I obtained a list of all IPs in my network with fing (linux package for analyzing networks).  How can I obtain the names of the machines? And maybe could I obtain the OS too?


Uniqueness of minimal polynomial: $f(x)$ divides $g(x)$

so I am trying to show that $f(x)$ divides $g(x)$ for all polynomials $g(x)$ satisfying that $g(A)=0$ where $f(x)$ is the minimal polynomial of a square matrix $A$.  I know from my professor that $f(x)$ is the minimal polynomial of $A$ so $f(A)=0$ so then $g(A)=0$. Therefore, $f(x)$ divides $g(x)$, i.e. $g(x)=f(x)h(x)$ where $h(x)$ is some other polynomial.  My prof told us to solve this question we need to let $b(x)=gcd((f(x),g(x))$ and by using Bezout's Identity, we need to show that $b(A)=0$. I am just having a little trouble trying to prove this. I know that this identity says:     For two polynomials $f_1(x)$ and $f_2(x)$, there exist polynomials   $g_1(x)$ and $g_2(x)$ such that $g_1(x)f_1(x) + g_2(x)f_2(x) = > gcd(f_1(x), f_2(x))$.   And the uniqueness of minimal polynomial theorem is:     For a square matrix $A$, if $f_1(A) = f_2(A) = 0$ for two polynomials   $f_1(x)$ and $f_2(x)$, then $g(A) = 0$ for $g(x) = gcd(f_1(x), > f_2(x))$. So the minimal polynomial of $A$ is unique up to a scalar.   So since $f(x)$ is already the minimal polynomial, I know that the $deg(b(x))=deg(f(x))$. I know how to prove the Bezout identity using the Euclidean algorithm, I'm just not exactly sure how I would show all of this using the notation he gave us of $b(x)=gcd((f(x),g(x))$. Any help at all would be appreciated.


Is there a better way to escape slashes in a string in POSIX sh

This function works, but I am thinking there must be a more elegant way to convert all '/' to '\/' (so that I can subsequently feed it into sed using the standard '/' for substitute):  escapeslash() {     val="$1"         fixed=""     while [ 1 ]; do         start=${val%%/*}         remainder=${val#*/}         if [ "${remainder}" = "${val}" ]; then             fixed="${fixed}${start}"             break;         fi         fixed="${fixed}${start}\/"         val="${remainder}"       done         echo "${fixed}"  }


Let $p$ be a prime. How do I prove that $x^p-x+a$ is irreducible in a field with $p$ elements when $a\neq 0$?   Right now I'm able to prove that it has no roots and that it is separable, but I have not a clue as to how to prove it is irreducible. Any ideas?


Find the set of elements in a list without sorting in Python

I have a list of elements 1,...,K  with repeats. For example for K=4 :  [4 2 1 1 2 1 1 3 2  ]    I want to find the sequence that 1,...,K is appeared in the list (without sorting). For example for the above sequence, the result would be   [4, 2 ,1 ,3 ]   How can I write this algorithm efficiently in python, with less runtime.  Thank you!


Does the apparently ungrammatical "States Parties"  in international agreements come from French grammar where "States" would be the noun and "Parties" the adjective agreeing with its plural noun?


We are used to foldr in Haskell where you take (for example, using Java syntax)  a List<T> and you return whatever type you want (<T>, List<T>, etc.).  For example in Haskell, this function that takes a List<Integer> and return another List<Integer> and uses as an accumulator a List<Integer> (is only an example, the objetive of the function doesn't matter):   evens :: [Integer] -> [Integer] evens = foldr (\ x acc -> if mod x 2 == 0 then x : acc else acc) []   Now that Java 8 is out and have functional-style features, we want to write functions (not only the duplication-free equivalent of an List<T>) with a kind of foldr as we used here:  public static Double entropy (List<Double> probs){     return -probs.stream().reduce(0.0, (acc, p) -> acc + p * Math.log(p, 2)); }   The problem using reduce is that when we take a List<T> we can only return a <T>, and we want to return a different type or even a collection.  Is there any way of doing foldr in Java 8?


calculating resistance for LED strips to use as parking lamps and turn signals

I'm installing LED strips in my car's tail lamps to convert it from conventional bulbs to LEDs. I have a understanding of what I'm doing but not the complete knowledge to make the circuit work correctly without doing some guessing so I figured I would ask here.   I'm planning on working with and I need a length of 16", 15" and 14" to make then look correct in my housings. When I did the math the 19.7" strips have about 1.5 LEDs per inch and need to be segmented into 3 LED groups so I may have to get creative with the placement.   Ffom what I understand I need 2 diodes and a resistor. One diode on the parking lamp power, and one on the turn signal/brake power and then a resistor on the parking lamp  wire to step down the voltage enough to make them dim enough to use as a parking lamp and distinguish it from the brighter turn/brake lamps.  Does anyone know what size resistor and what size diode to use in this project? The voltage, with the car running, is around 13.8V to the rear lamps. I figure it should be running around 7V to the LEDs to light them as parking lamps.  Also will leaving out a cluster of 3 LEDs change the strips intensity to where I'll need different resistors for each strip?


I am a little bit confused. Suppose I have a method  void test(){ }  How exactly can I make this package-protected? The protected modified makes it overridable by children.


Cannot get sin and cos to display in TIKZ

I have the following code which I took from another site and was trying to adapt in order to plot a sin function and a cos function stacked up one on top of each other:  \def\xs{1} \def\ys{6}  \begin{tikzpicture}[domain=-3:5, xscale=\xs, yscale=\ys, >=latex]   \def\tr{0.1}   \def\ts{0.6}   \def\al{1.3}   \def\n{1.6}   \def\I{0.3506}   \def\ti{0.4071}   \def\S{-0.1340}   \def\Sangle{-42}   \def\f1{0.8}    % Function1   \draw[very thin,color=gray!30] (-3-0.2/\xs,0-0.2/\ys)     grid[xstep=0.5, ystep=0.1] (5+0.2/\xs,0.7+0.2/\ys);   \draw[->, line width=1pt] (-3,0) -- (5.25,0)     node[below] {$r$};   \draw[->, line width=1pt] (-3,0) -- (-3,0.75)     node[left] {$f_\phi$};   % function   \draw [red,thick,smooth,domain=0:5] plot (\x, {cos(\x)});   % side decoration   \draw[dashed] (\I,0) node[below] {$I$} -- (\I,\ti) -- (-3,\ti)     node[left] {$u_i$};   \draw [decorate, decoration={brace, amplitude=4pt}]     (-3.5,\tr) -- (-3.5,\ts) node [black,midway,left=3pt] {$\Delta$};   % texto   \path[->, draw]     (\I,\ti) to[out=0, in=180] ++(0.75,0.1)     node[anchor=west, text ragged, text width=1.6cm, fill=white]     {Point of interest};   \node[above] at (1,0.7)     {Function $f_\phi$ definition};    % Function 2   \def\ys{3}   \begin{scope}[yshift=-0.3cm, domain=0:10, >=latex, yscale=\ys]     \draw[very thin,color=gray!30] (-3-0.2/\xs,-0.15-0.15*0.2/\ys)       grid[xstep=0.5, ystep=0.03] (5+0.2/\xs,0.03+0.15*0.2/\ys);     \draw[->, line width=1pt] (-3,-0.15) -- (5.25,-0.15)       node[below] {$\log(\psi)$};     \draw[->, line width=1pt] (-3,-0.15) -- (-3,0.05)       node[left] {$U'(\psi)$};     \draw [green,domain=0:5] plot (\x, {sin(\x)});     \node[left] at (-3,0) {$0$};     \draw[dashed] (\I,0.03) -- (\I,\S) -- (-3,\S) node[left] {$U'(I)$};     \path[->, draw]       (\I,\S) to[out=-2, in=180] ++(1.75,0.02)       node[anchor=west, fill=white] {$S$};     \node[above] at (1,0.03) {Function $F_\phi$ definition};   \end{scope} \end{tikzpicture}   But I get lines!!!    I have tried changing the domain range and the scale values. I don't really understand what's happening here! How can I get my functions to display?  Thanks


I've found a program named wipefs run by the postgres user. The server is a Ubuntu 12.04.  When I did ps ax|grep wipefs I've got:  10209 ?        Sl     1:04 /var/tmp/.ICE-unix/-l/.db/wipefs --library-path /var/tmp/.ICE-unix/-l/.db /var/tmp/.ICE-unix/-l/.db/x  Then I did this:  ls -lah /var/tmp/.ICE-unix/-l/.db/ total 14M drwxr-xr-x 2 postgres postgres 4.0K Jun 11 19:24 . drwxr-xr-x 3 postgres postgres 4.0K Jul 17 21:00 .. -rwxr-xr-x 1 postgres postgres 1.8M Nov 20  2017 libc.so.6 -rwxr-xr-x 1 postgres postgres 2.3M Nov 20  2017 libcrypto.so.1.0.0 -rwxr-xr-x 1 postgres postgres  15K Nov 20  2017 libdl.so.2 -rwxr-xr-x 1 postgres postgres  31K Nov 20  2017 libffi.so.6 -rwxr-xr-x 1 postgres postgres  88K Nov 20  2017 libgcc_s.so.1 -rwxr-xr-x 1 postgres postgres 898K Nov 20  2017 libgcrypt.so.20 -rwxr-xr-x 1 postgres postgres 511K Nov 20  2017 libgmp.so.10 -rwxr-xr-x 1 postgres postgres 1.2M Nov 20  2017 libgnutls.so.30 -rwxr-xr-x 1 postgres postgres  79K Nov 20  2017 libgpg-error.so.0 -rwxr-xr-x 1 postgres postgres 203K Nov 20  2017 libhogweed.so.4 -rwxr-xr-x 1 postgres postgres 232K Nov 20  2017 libhwloc.so.5 -rwxr-xr-x 1 postgres postgres 203K Nov 20  2017 libidn.so.11 -rwxr-xr-x 1 postgres postgres  39K Nov 20  2017 libltdl.so.7 -rwxr-xr-x 1 postgres postgres 1.1M Nov 20  2017 libm.so.6 -rwxr-xr-x 1 postgres postgres  95K Nov 20  2017 libmicrohttpd.so.10 -rwxr-xr-x 1 postgres postgres 215K Nov 20  2017 libnettle.so.6 -rwxr-xr-x 1 postgres postgres  43K Nov 20  2017 libnuma.so.1 -rwxr-xr-x 1 postgres postgres 399K Nov 20  2017 libp11-kit.so.0 -rwxr-xr-x 1 postgres postgres 136K Nov 20  2017 libpthread.so.0 -rwxr-xr-x 1 postgres postgres   77 Jun 11 19:21 libq.so.1 -rwxr-xr-x 1 postgres postgres  31K Nov 20  2017 librt.so.1 -rwxr-xr-x 1 postgres postgres  280 May 15 19:52 libs.so.1 -rwxr-xr-x 1 postgres postgres 419K Nov 20  2017 libssl.so.1.0.0 -rwxr-xr-x 1 postgres postgres 1.5M Nov 20  2017 libstdc++.so.6 -rwxr-xr-x 1 postgres postgres  75K Nov 20  2017 libtasn1.so.6 -rwxr-xr-x 1 postgres postgres 103K Nov 20  2017 libz.so.1 -rwxr-xr-x 1 postgres postgres 159K Nov 20  2017 wipefs -rwxr-xr-x 1 postgres postgres 2.1M Jun  3 15:04 x  In other systems running PostgreSql the directory /tmp/.ICE-unix is empty.  Is this a virus?.


Thunderbird: Exporting/importing mail and contacts

I have an old laptop that had Thunderbird installed on it. I just bought a new one and have installed the latest version of Thunderbird (v31.3.0) on it. I'm looking to:   Transfer all the emails of my Inbox/Sent folders on the old Thunderbird instance (running on my old machine) to the Inbox/Sent folders on my new one; and Transfer all "contacts" from my old Thunderbird instance to my new one, such that, when I go to compose a new email, and I begin typing in the name of the recipient (in the To: field), Thunderbird should auto-complete for me.   Is this possible to do? If so, how? If not, then why?


Is there any way to import raw MATLAB output into .tex documents?  I have already seen verbatim package as a solution, but it does not meet my demands for 2 reasons:   Matrix elements are not aligned, especially when some elements have decimal digits and others don't. It is not quite convenient, in case MATLAB generates a large output.   Also, I have tested matrix2latex.m but it seems useful only for matrices.  As I said before, it would be convenient to me if I could just import the raw MATLAB output into my .tex file, keeping the format as the one in MATLAB command window.  Thank you!  Edit: Added output generated by an .m script.


Getting NPE trying to get json object into a Json

I'm building this javax.json.JsonObject into a method. But when I try to get the values into aditionalParams for some reason I get null. Then, when I try to use a value inside this object I get:  NullPointerException   private JsonObject renderImage(String id, String brand) {         return Json.createObjectBuilder()                 .add("id", id)                 .add("brand", brand)                 .add("type", "image")                 .add("credit", "This is a credit")                 .add("description", "This is a description")                 .add("aditionalParams", Json.createObjectBuilder()                         .add("source", "this is a source")                         .add("photographer", "leon_s_kenndy@gmail.com")                         .add("date", "2021/01/01")                         .add("comments", "These are some comments")                         .add("cost", "500").build())                 .build();     }  The implementation is like this:     JsonObject image = renderImage("363725", "Televisa");    . . .     saveImageCost(image.asJsonObject().getJsonObject("aditionalParams").getString("cost")); //Getting NPE  Any idea guys? Thanks


I am trying to remember the name of a book I read when I was a teenager about 20 odd years ago. I think it was written in the 70's or 80's.  The premise of the book as I remember it is as follows.  There are two universes.  The first is Earth but set in the future relative to the date the book was written. A means of creating free energy has been discovered; I think it is being removed from an alternate universe, but a scientist has discovered that this has the potential to cause problems for the planet.  The second story line runs parallel and relates to a being in an alternate universe travelling through that species' version of puberty.  At the start, this being (I believe it is referred to as male) is young and is romantically attached to a female of the species.  They are described as being a type of energy that changes colour.  She develops and changes into a different type of being and he resists changing.  There is a third male that he is jealous of. At some point, however, I believe he then accepts that he must grow and he changes and then melds with the female and other male to form a combined consciousness.  I never got to the end of the book; at the time I found it a really hard read, but I found myself thinking about it the other day and wanted to try and find it so I can give it another go.


LINQ equivalent of foreach for IEnumerable

I'd like to do the equivalent of the following in LINQ, but I can't figure out how:  IEnumerable<Item> items = GetItems(); items.ForEach(i => i.DoStuff());   What is the real syntax?


Is $x^3+y^3+z^3-1$ irreducible over a field $k$ of characteristic $\neq 3$?   If I can show that $y^3+z^3-1$ is irreducible, I believe I can use Eisenstein's criterion. But I don't see how to show even this.  The other approach on my mind is to show that $k[x,y,z]/(x^3+y^3+z^3-1)$ is an integral domain, but this doesn't seem particularly promising either.


By default in Debian 9 systemd is the default. But I still see a lot of things under /etc/init.d directory. Does that mean I still can put things there to start up? Which directory (systemd or init.d) will be executed first?


How to decide that a certificate in the store is smart card related or not?

I can enumerate the certificates present on the inserted smart card but how can one decide that the certificates present in the windows certificate store are related to smart card even when there is no smart card inserted?  How can I know if a certificate from the store will ask for a PIN before using it when there is no smart card present?


What is n, in this product involving the floor function and lcm

Let $$P=\prod_{k=1}^{2019} \operatorname{lcm}\left(1,2,\dots,\left\lfloor\frac{2019}k\right\rfloor\right).$$ Given that $P=n!$, find $n$.   This is the question provided, I do not really know how to approach this.


Driving across America as a UK driver. What specific rules do I need to know?

I've been driving in the UK for nearly 10 years, covering around 20,000 miles or 32,000 km a year. I've driven across Europe without issue as well. So I'd like to think I'm an experienced driver.  However, I'm going to do Route 66 for my honeymoon in 3 weeks and I'm concerned that different states have different rules regarding the basics of driving.  For example, in the UK if you're at a set of lights and it's red, you can't move until it's green. I've heard that in some states if you're indicating to turn right at a set of red lights - as long as it's clear - you can turn right regardless of the light. But I don't know if this is accepted across the rest of America or not. I also know that in Canada you can't park against the flow of traffic, but you can do that in the UK.  It's a difficult question to ask in some ways as I'm relying on someone to know the specifics of UK driving and how that compares to US driving. But I'm keen to not annoy other road users while visiting their country, as well as not being pulled over by the police for doing something I thought was acceptable in one American state isn't acceptable in another.  Edit: While on the face of it this question looks to be a duplicate, it isn't. There are differing rules to driving in the UK than compared to Europe. For example, in France you're obliged to carry 2 breathalysers in the car with you (not a requirement in the UK), you're not allowed to have your sat nav indicate where speed cameras are in France (not an issue in the UK) and in Luxembourg you're not allowed to carry petrol in your car even if it's in a jerry can. Also there are references to some states but nothing concrete, where as I'm specifically asking in regards to those states that Route 66 passes through.


“How to Ask Questions in Private Beta” is listed in every site’s help centre

When I go to /help/asking on any Stack Exchange site (), there is a link to How to Ask Questions in Private Beta (). It starts with:  Welcome to the private beta for [site] The tone and quality of the questions asked during this temporary private beta are critically important. If the private beta doesn't produce enough high quality expert level questions, it won’t proceed onward to the public beta. To help ensure your site makes it out of private beta, here are some tips:  There is no disclaimer or similar that this is outdated. This may lead to unnecessary confusion. I understand that that it is useful to keep this page in public pages for documentary purposes, as it may be linked in early Meta discussions, but it should:  not be listed in the table of contents (/help/asking) have a disclaimer


Until recently I assumed that “racism” simply meant a belief that there are innate and meaningful differences between races.   I thought that the common practice of using "racism" as a stand-in for hatred against other races, a discriminatory/segregationist political agenda, etc. was mainly a colloquial simplification meant to ease/influence public discourse. I was surprised to find that indeed,  as primarily related to certain political stances (with the belief in innate differences between races and ethnicities only listed as common justification). Whether this was always the case or is just an example of a colloqualism becoming a norm, I cannot say.  Still, now I am left to wonder: How can one refer to the belief that there are innate and meaningful differences between races - independently of any political stance?  Examples of using such a word:   My recent studies indicate that racial provenance is a good predictor for performance on tasks A and B. I am convinced of the quality of my research but not apt or willing to make political recommendations based on it. I do not believe that races are equal in their capabilities, I am a proponent of “Y”. I am a “y”-ist.  I believe that my racial group is innately less capable than other races at C, but I do not think this is a compelling argument to deny us a fair chance at C. I do not believe that all races are equal, I believe in “Y”. I am a “y”-ist.


N points on circle. How many regions can circle be divided into?

If there are N points on a circle, and you draw a chord between each of them, how many regions is the circle subdivided into


Invert a $2\times 2$ Matrix containing trig functions

Invert the $2\times 2$ matrix:   \begin{bmatrix} \cos\theta & -\sin\theta  \\ \sin\theta &  \cos\theta \end{bmatrix}    My thought was to append the  $2\times 2$ identity matrix to the right of the trig matrix and use row operations to get the answer.    I have to show all steps, so I cannot just flip it and call it a day.


How to calculate and compare RMSE between two DEMs?

I'm doing a project based on using Lidar point cloud data and I have access to a DEM that cover all of Sweden. But my goal is to produce several DEMs covering a small area using different interpolation methods. For this I'm working with the LAS dataset toolbox. When that's done I want to compare my own produced DEMs with the DEM that cover whole of Sweden and check for RMSE error.   I'm quite clueless how to solve this since I'm not a mathematician and I'm new to working with Lidar.    I'm using ArcGIS for this.


How to make a application/script available from Bash?

If I want to launch a script (let's say in the home directory I have a file called hi.py) I need to specify the full path: python /home/user/hi.py. But when I want to use mkdir I can simply say: mkdir folder_name. How can I do the same thing whit hi.py?


Comparing different definitions of tightness for measures

Let $X$ be a Hausdorff space, $\mathcal{B}(X)$ the Borel $\sigma$-algebra and $\mu : \mathcal{B}(X) \to [0, \infty]$ a measure.  Consider the following properties:  (1) $\forall A \in \mathcal{B}(X): \mu(A) = \sup \left\{ \mu(K) \mid K \subseteq A, K \text{ compact} \right\}$  (2) $\forall \varepsilon > 0 \, \exists K \subseteq X$ compact: $\mu\left(X \setminus K\right) < \varepsilon$  If $\mu$ satisfies (1) then some authors say that $\mu$ is "tight" or "inner regular" or "inner regular w.r.t. the compact sets". Often those authors that reserve the notion "inner regular" for "inner regular w.r.t. the closed sets" call $\mu$ "tight" if it satisfies (1). Other authors, mostly probabilists, refer to a finite measure (probability measure) $\mu$ as "tight" if it satisfies (2). (2) seems not to be an interesting property for measures $\mu$ that are not totally finite (but at least finite on compact sets). As an example, the Lebesgue measure on $\mathbb{R}$ is "tight" in the sense of (1) but not "tight" in the sense of (2).  If $\mu$ is finite then (1) $\Rightarrow$ (2). It is also folklore that if $X$ is metrizable and $\mu$ finite then (1) $\Leftrightarrow$ (2) (see also ).  Questions:   Can the assumption on $X$ being metrizable be weakened, e.g. perfectly normal or even weaker? Are there interesting applications in which tightness in the sense of property (1) is of interest when $\mu$ is finite, but (2) is not applicable?


Enter academia with no undergraduate degree (only professional experience)

I'm wondering whether there's any way to enter the academic world, do research at a university for a living, without an undergraduate degree, but instead with several years of experience in industry (the same field of the research).  This is actually my situation. After 8 years of software development in several professional environments, I want to enter the academic world. But I'm frustrated about having to go back to the basics.


ID's for Jquery dynamically added contents are not being recognized

I have edited my code using event handler. But it still does not seem to work, what am I doing wrong?      $(document).ready(function(){     $("#hour1").on("click", function( event ){         $("#hour1").remove();         $("#hour1Data").append("<input id='hour1Input' type='text'/>");     }); });  $(document).ready(function(){     $("#hour1Input").on("click", function( event ){         $("#hour1Input").remove();         $("#hour1Data").append("
<?php echo $hour1; ?>
");     }); });   Original Post:  I am making a small webapp consisting of a table of text. The user can change the text by clicking on it, the text turns in to a text box, the user can enter the new text, and press enter. Then the textbox will go back to the original p tag with the updated text.  I am trying to do this using jQuery. Below is my code.  //User clicks p tag named "#hour1".  $(document).ready(function(){     $("#hour1").click(function(){         $("#hour1").remove();         $("#hour1Data").append("<input id='hour1Input' type='text'/>");     }); });  //After entering text, user presses enter.  $(document).ready(function(){     $("#hello1Input input").keypress(function (e) {     if (e.keyCode == 13) {{         //process text//         $("#hour1Input").remove();         $("#hour1Data").append("
<?php echo $hour1; ?>
");     }     }); });   Right now on click of "#hour1" it turns in to a text box which is good! But any ID's that are on the content being dynamically created are not being recognized by jQuery making it impossible to do anything with it. How do I make the new content so the ID's are recognized and useable by Jquery. Thanks for any help!


I've been playing , and have noticed that the game auto-saves. While this is great, it means I can't play my save on another device, presumably because it saves to my cookies or IP. I've gotten as far as The Dusty Path, but cannot seem to navigate it on my tablet. If I go to my laptop to continue, will my progress be lost? If so, is there any way to preserve it?


I have downloaded UBUNTU 13.10 32 Bit version and installed it. I would like to have it in the German language but dont't know how to change the language. Prior to that I had the 64 Bit version in German installed, but had to uninstall it because the computer ist too slow. If there is no other way, I can use it in English too, but it would be more comfortable for me to use the German language. Thank for any help! Bringfried


was following a tutorial where I stumbled into this weird line in my mirrored mesh (sorry for the feet lol)      You can also download the blender file


Why is the mass of the wizard's kit less than the sum of its parts?

I am reading PZO1123 Ultimate Equipment and note the following:  The mass of the wizard's kit is 21 lbs. It includes a backpack (2 lbs), a bedroll (5 lbs), torches (10 × 1 lb each), trail rations (5 × 1 lb each), and some other things... but that's already 22 lbs! Why is it so? I assume the starting kits are nonmagical.


Why is my router limiting the speed of connection?

I pay for a 50Mbit/s connection. When I connect modem from ISP directly to my PC, the speed is OK. But since we share this connection, I have to use router.  It's nothing archaic, TP-LINK TL-R402M, but when I connect modem to this router, and then PC to router the speed drops to 10Mbit/s (even when noone else is connected). I have absolutely no idea what causes this, I tried replacing a cable, even borrowed a router to try it with it, but it still acts the same.


Is it possible for a private person to buy shares of technology companies pre-IPO?

If so, how? What would be the entry cost?


If I'm not mistaken, the pasting lemma for a two-element open cover $X=A\cup B$ of a topological space is equivalent to saying that the following square is a pushout in $\mathsf{Top}$: $$\begin{matrix} A\cup B & \longleftarrow & B \\ \uparrow && \uparrow \\ A & \longleftarrow & A\cap B\end{matrix}$$ where the arrows are the canonical embeddings.  Is my statement true, and if so, how can I categorically formulate the pasting lemma for general open covers $ \left\{  U_i\right\}  _{i\in I}$?


How to cast a String value to an Enum value by Class?

I have the following class:  public class EnumContainer{      private Class<?> enumClass;     //GET, SET      public EnumContainer(Class<?> clazz){         this.enumClass = clazz;     }      public boolean tryCast(String value){         //Here I should try to cast the String to the Enum by enumClass field          //return true if cast was successfull         //false otherwise     } }   Is it even possible in Java to perform such casting?


Insert a GIF file in a beamer presentation

I would like to know if it is possible to insert a gif file in latex-beamer without having to split the images first. Most of the answers require the GIF file to be previously breaken down into images. However, I would like to be able to read the .gif file directly from the folder where it is stored (in overleaf). I am trying to convert the gif file on the fly, with the example code that you see, but it throughs an error to me saying 'file ... not found' Below have the MWE of the code I am using \documentclass[usenames,dvipsnames]{beamer}  \DeclareGraphicsExtensions{.gif, .ps, .eps, .png} \DeclareGraphicsRule{.gif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .gif`-gif-converted-to.png}  \begin{document} \begin{frame}{Results} \framesubtitle{Matching set}  \includegraphics[width=5cm]{Figures/GIF/Distrib_of_firms.gif}  \end{frame} \end{document}  Any help would be much appreciated. KR


This is a very well known problem, but I can't find an answer in the specific case I'm looking for.  Let's consider two balls :   Ball 1 weighs 10 kg Ball 2 weighs 1 kg Balls have identical volumes (so Ball 1 is much more dense) Balls have identical shapes (perfect spheres)   Let's drop them from a rather important height, on earth, WITH air. (That's the important thing, because all the proofs that I browse take place in a vaccum).  I am arguing with a colleague. He thinks that ball 1 will fall faster in air, and that the two balls will fall at the same speed in a vacuum. I think that the identical shapes and volumes make air friction identical too and that the vaccum has no importance here. Could someone tell who's right and provide a small proof?


How can I show that the set of rational numbers with denominator a power of two form a dense subset of the reals?


How do I find an available nickname? They all seem taken

Pokémon Go is asking for a nickname, and I have entered dozens of names, but it has rejected every one saying that the name isn't available.  How can I find an available name?


What's the source of those daily changing locked screen wallpapers on Windows 10?

I have these automatically changing wallpapers active on my work laptop (not activated by me) and I think the vast majority is at least high quality, some are brilliant and a few I just adore.  What is the source of these images?  I'd definitely like to download or even buy some of them.


If it wasn't for his love for Lily, would Snape have a Patronus?

If Snape didn't fall in love with Lily, or "got over" it, would he still be able to summon a Patronus or would he then become a run of the mill Death Eater? According to J. K. Rowling, Snape is the only Death Eater with a Patronus.  Samantha: Was snape the only death eater who could produce a full patronus J.K. Rowling: Yes, because a Patronus is used against things that the Death Eaters generally generate, or fight alongside. They would not need Patronuses.   Snape's Patronus is a doe, explained as being because of his love for Lily, which may very well be his happy memory to generate the Patronus.  If this was no longer the case, would the consistent presence of the Dementors on his supposed side mean he's no longer able to summon a corporeal Patronus?


I bought a new Dell Inspiron 14 which has Intel I7 processor.  I tried installing Ubuntu as 2nd OS by following this .  I followed all the steps such as partitioning the C drive and setting up the Boot configurations.  I do get the Ubuntu install screen. It proceeds normally till the screen after Wifi selection screen. On this screen it always says that "You need 8.6 GB space to install software and other updates, but you have only 8 GB available."  It never lets me select the space I freed up from C drive of the Windows.  Has anyone else faced this problem?  I checked other questions here, but they seem old and not relevant to my problem.  Thank you!  EDIT (image added):


I'm using this command to determine which directory is eating my disk.   du -sk * | sort -n   How can I get human readable result form du for file sizes? I've checked man and all it have is -k flag which turns byte results to kilobyte results. I need results in gigabytes


LINQ Match array with another array in a DataRow

I'm trying to return data in a DataTable which consists in three columns:  commandTable.Columns.Add("Intent", typeof(string)); commandTable.Columns.Add("Command", typeof(string)); commandTable.Columns.Add("Permission", typeof(short));  My goal is to retrieve "Command" and "Permission" based on a match of a string withing the array splittedMessage on the Intent column's rows. So far I was able to achieve the results with the command var result = commandTable.AsEnumerable().Where   (r => splittedMessage.Contains(r.Field<string>("Intent"))).Select(s => new   {     Command = s.Field<string>("Command"),     Permission = s.Field<short>("Permission")   }).First();  But now, the Intent column changed from typeof(string) to typeof(string[]). How can I get the same data using Linq and Lambda but matching the splittedMessage to a string inside an array instead of a single string by row?


Fantasy book, 2 teenagers transported to alt universe, trained as warriors, partial shape shifting from girl to boy to hide identity

I'm trying to identify the title of a book I read in the mid 2000's. It may have been the first in a series. I remember a few specific details and scenes but not much of the overall plot. I read it in English am fairly sure it was originally published in English. I've attempted to track it down through google using various key word searches but have come up empty so far:   Two teenagers went missing from a school trip when they were transported to an alternate universe (possibly through cairn/stone circle magic - I can't remember clearly) They were a boy and a girl. I think the POV switches between them during the book. While they were not friends at the beginning (fairly sure they'd had quite limited interaction previously and even disliked each other to a degree)they become close through the events of the book The girls was wearing a baggy hoody, didn't wear makeup and had an angular face I think, when the two were discovered she passed herself off as a boy The world they ended up in was medieval in terms of technology, but no stranger to magic. I don't think magic was all over the place though. The two ended up being trained as warriors There's a specific scene where the trainees have to walk across a stage or a room as a final initiation or test to become true warriors, and they have to do it naked. The girl manages to partially shapeshift and actually become a man in all the relevant ways so she's not found out (I vaguely recall some surprise from the characters here, she had never done it before and up until that point had only managed some sort of illusions which tricked the sight) At the end of the book I think they worked out how to transfer between worlds (possibly involving lightning?) but I think something may have gone wrong and only one of them managed to leave   Any help would be much appreciated!


How to run a method from a different class - JAVA

I am trying to call the toh method from my main class(Driver). When I make the call it gives me a null pointer exception. How can I call the toh method in Hanoi from the driver class? When I combine the classes into one it works fine but I need them to be two separate classes. Also, I included the global variables I am using in both classes is that necessary? Any help is welcome. Thanks!  public class Hanoi {   public static int N;  public static int cycle = 0;  /* Creating Stack array  */  public static Stack<Integer>[] tower = new Stack[4];   public static void toh(int n)  {      for (int d = n; d > 0; d--)          tower[1].push(d);      display();      move(n, 1, 2, 3);           }  /* Recursive Function to move disks */  public static void move(int n, int a, int b, int c)  {      if (n > 0)      {          move(n-1, a, c, b);               int d = tower[a].pop();                                                       tower[c].push(d);          display();                             move(n-1, b, a, c);           }           }  /*  Function to display */  public static void display()  {       System.out.println("T"+cycle + "  Pillar 1  |  Pillar 2  |  Pillar 3");      System.out.println("-------------------------------------");      for(int i = N - 1; i >= 0; i--)      {           String d1 = " ", d2 = " ", d3 = " ";          try          {              d1 = String.valueOf(tower[1].get(i));          }          catch (Exception e){          }              try          {              d2 = String.valueOf(tower[2].get(i));          }          catch(Exception e){          }          try          {              d3 = String.valueOf(tower[3].get(i));          }          catch (Exception e){          }           System.out.println("  "+d1+"         |  "+d2+"         |    "+d3);      }      System.out.println("\n");      cycle++;  } }   Main class(driver):  public class Driver{  public static int N;  public static int cycle = 0;  /* Creating Stack array  */  public static Stack<Integer>[] tower = new Stack[4];   public static void main(String[] args)  {    int num = 0;      Scanner scan = new Scanner(System.in);      tower[1] = new Stack<>();      tower[2] = new Stack<>();      tower[3] = new Stack<>();      /* Accepting number of disks */                while(num <=0){          System.out.println("Enter number of disks(greater than 0):");          num = scan.nextInt();      }      N = num;      Hanoi.toh(num);   }  }


Data standardization or normalization in GBDT

Is it necessary to do data normalization(standardization) before using gbdt?what effect does it have if I don't do that proprecessing?


What's the .NET equivalent of the browser's URL.origin?

Given a url like https://somedomain.com:1234/someotherstuff?a=b#def the browser's URL class's origin property returns https://somedomain.com:1234  var url = new URL("https://somedomain.com:1234/someotherstuff?a=b#def"); console.log(url.origin);   prints  "https://somedomain.com:1234"   Is there an equivalent in .NET?  I see the Uri class but it doesn't seem to have a field that corresponds to origin above  Uri u = new Uri("https://somedomain.com:1234/someotherstuff?a=b#def"); Console.WriteLine(u.AbsolutePath);  //  /someotherstuff Console.WriteLine(u.AbsoluteUri);   //  https://somedomain.com:1234/someotherstuff?a=b#def Console.WriteLine(u.Fragment);      //  #def Console.WriteLine(u.Host);          //  somedomain.com Console.WriteLine(u.LocalPath);     //  /someotherstuff Console.WriteLine(u.Port);          //  1234 Console.WriteLine(u.Query);         //  ?a=b Console.WriteLine(u.DnsSafeHost);   //  somedomain.com Console.WriteLine(u.HostNameType);  //  Dns Console.WriteLine(u.Scheme);        //  https   From that it appears I need to do this  string origin = u.Scheme +                  "://" +                  u.host +                  (String.IsNullOrEmpty(u.Port) ? "" : (":" + u.Port)   And possibly some other stuff I'm not aware of.    Is there already some cross platform (not Windows only) .NET function that will give me the equivalent of URL.origin?


Holomorphic function, existence of a sequence

Suppose $f$ is holomorphic on $D$. Prove that there exists a sequence $\lbrace z_n\rbrace$ such that $|z_n|\rightarrow 1$ and $\lbrace f(z_n)\rbrace$ is bounded.  Now, what I did is  $f$ is analytic on $D$ and $|f(z)|<1$. Let $z_0,z_1,z_2,...$ be zeros on $D$ then each $|z_i|<1$ on $D$ and let $z_n$ be the zeros of $f$ and I am stuck. I know that I should put the zeros in a sequence form, any ideas?


How many possible ways can $i+j+k=n$ without taking the order into account?

Given that $i,j,k$ are non-negative integers, how many possible ways can $i+j+k=n$ without taking the order into account?   In other words, what does the following sum equal? $$\sum_{i+j+k=n} 1$$  And then, for a generalized case of m numbers:  $$a_0+a_1+...+a_m=n$$  But the order for which i,j and k are placed does not matter, for example: $1+1+2$, $1+2+1$ and $2+1+1$ are the same combination.


Analytical way to find the third root of $x^{2}=2^{x}$ other than 2 and 4

How to find analytically the third root (-ve) of $x^{2}=2^{x}$ other than 2 and 4? Does differentiation of the equation make a sensible way? I tried with $\log_a$ for different $a$' s. But I couldn't find the root.


As I understood this option, when I have something like \footcite{test}, ..., \footcite{test}, it should have the same footline and it should not make the footline twice, right? It is not working for me!


How to prove that the Binet formula gives the terms of the Fibonacci Sequence?

This formula provides the $n$th term in the Fibonacci Sequence, and is defined using the recurrence formula: $u_n = u_{n − 1} + u_{n − 2}$, for $n > 1$,  where $u_0 = 0$ and $u_1 = 1$.   Show that     $$u_n = \frac{(1 + \sqrt{5})^n - (1 - \sqrt{5})^n}{2^n \sqrt{5}}.$$    Please help me with its proof. Thank you.


Does not the mass of those living on the Earth add on to the mass of the Earth or is it too negligible to be cared for?

: Earth weighs about 13,170,000,000,000,000,000,000,000 pounds (or   5,974,000,000,000,000,000,000,000 kilograms). Since Earth is too big   to be placed on a scale, scientists use mathematics and the laws of   gravity to figure out Earth's weight.   So, this seems to be a constant. But I guess it doesn't consider the things that are on the earth, the trees, buildings, people, animals, water etc...  So, are all the above mentioned things' mass is too small or negligible to be left off?


In Skyfall, what is the significance of M's post-mortem gift of a porcelain pug to Bond?

At the end of Skyfall, M wills an ugly porcelain pug to James Bond.  When it is suggested to Bond that it was M's way of telling him to take a desk job, Bond affirms that it was just the opposite.  What is the significance of the gift?


What is happening behind when an application is installed in windows?

What is happening when we install a windows application in windows os? I mean how the software files are distributed in OS when we run a .exe file. I actually get this doubt when I installed Visual Studio in my PC.I have selected the installation directory as D drive. But I have found that some of its files are created in C drive where my OS is installed  under Program files. Actually what is the use of those files in the C drive like app data, Program files etc. Is there any website for reference.


Why is a convolution of an $L^1$ and an $L^p$ functions well-defined?

I was reading the wikipedia article about convolution and I found this one:     If $f \in L^1(\mathbb{R}^n)$ and $g\in L^p(\mathbb{R}^n)$, then $||f\ast g||_p \leq ||f||_1||g||_p$.   But to $f\ast g$ be well-defined, $y\mapsto f(x-y)g(y)$ must be of $L^1$. Right? But why? How do I prove this?


C uses abort to terminate the process by raising a SIGABRT signal. What is the equivalent abort in Python? Thanks.


What I want to write is an application that would be able to access my USB port.  To control when to charge my phone and when not to. And perhaps with time I would like to extend the application to control light bulbs, fans and the television in my room.   I want to learn how to work this out rather than just copy some line of codes and paste. I wish for a quick and very simplified tutorial on this, I would be highly grateful (small language please, You all know am still learning :-)).   The exact job I want to achieve is just to make the port send out power when needed. That is it should be switched off and on using codes if possible.


So here is my code... It's about asking for house pricing and locations, but I keep getting a NullPointerException.    public class price {  int[] Hprice; String [] Hlocation;  int i = 0;  public static void main(String[] args) {      price price = new price();     price.input();  }  public void input() {     price price = new price();     Scanner scan = new Scanner(System.in);            System.out.println("what is the price of the house?");         int ansP = scan.nextInt();         price.Hprice[i]=ansP;         System.out.println("what is its location? (north,south,east,west)");         String ansL = scan.nextLine();         price.Hlocation[i]=ansL;         i +=1; }   when i run this ii get a null pointer exception, i have tried to define every value in the array but i stil get the exception when i set Hprice = ansP. Does anyone know where the excpetion might be happening? Thanks!


$pqrs \cdot 4 =srqp $,then what is the value of $qrs$?

This is question 26 from Australian Maths Competition 2013.  $pqrs $ is a 4-digit number and has the property that $pqrs \cdot 4 = srqp$.If p=2,what's the value if the 3-digit number qrs?  Here's what I tried.  $(2000 + 100q+10r+s)(4)=1000s+100r+10q+2$  So,  $ \frac {1000s+100r+10q+2}{4} $= some integer.  $250s+25r+ \frac {5q}{2} + \frac 12 =2000+100q+10r+s$  $ \frac {5q}{2} $ should be an fraction so that when it adds up with half, it will be an integer. So,$q$ must be an odd number.  $pqrs \cdot 4 =srqp $,where $p=2$  $4s= 10j +2$, where j is some integer  $250s=625j + 125$  And then I'm lost.


Equivalence of Two Forms of the Exponential Function

One encounters the following definitions for $e^x$ \begin{align} e^x &= \sum_{n = 0}^\infty \frac{x^n}{n!} \\ e^x &= \lim_{n \to \infty} \left( 1 + \frac{x}{n}\right)^n \end{align} One can show that these two definitions are equivalent. For example, it can be shown that they both are the unique solution to the differential equation $f' = f$ with $f(0) = 1$. My question, which is admittedly a bit vague, is why are these two definitions equivalent? How are the sum and the limit expressions related? Is there a direct way to transform one into the other? Edit In the accepted answer for the linked question, the chain of equivalences: series expression $\iff$ unique solution to differential equation $\iff$ limit expression is shown. My question is if there's a way to bypass "unique solution to differential equation" in this chain of equivalences.


Quack Overflow listens even when I say I have no microphone

When I click the duck, she asks me if I have a microphone. I press "no" but she tried to listen anyway, asking me to speak up.  Curiously, the browser did NOT ask for microphone permission even when I said "yes".  Edit: Thank you guys, next time I will have my morning coffee before putting in discussion such magnificent piece of technology.


Every convergent sequence in a metric space has a unique limit.

I'm reading through a proof in my lecture notes:     Every convergent sequence of a metric space has a unique limit.   Suppose $\lim_{n \to \infty} x_n = l$ and $\lim_{n \to \infty} x_n = m.$ Then for every $\epsilon > 0,$ there exists $N$ such that for every $n \geqslant N,$  $$d(l,m) \leqslant d(l,x_n) + d(x_n,m) < \epsilon + \epsilon = 2 \epsilon. $$  So $(\star) \hspace{1mm} 0 \leqslant \frac{d(l,m)}{2} < \epsilon \Longrightarrow \hspace{1mm} (\star^\prime) \hspace{1mm} \frac{d(l,m)}{2} =0 \Longrightarrow l = m.$  I can follow the proof up until the jump from $(\star)$ to $(\star^\prime)$. Why does $\frac{d(l,m)}{2}=0$?


Let V= { (1),(12)(34) ,(13)(24),(14)(23) } subgroup . if H is subgroup such that |H|=6 , HV < A4 is absurde. Note that V is normal at A4. Calculating the HV norm, we arrive that is 12, which would imply that HV = A4, I need to find somebody of A4 that is not in HV, but I do not know much about arbitrary order H.


so I have a pattern as a PNG. I was wondering if Blender had a way of turning the PNG into a mesh. It's kinda like how if you put a transparent shader on a plane with an image texture you get a 2d picture/sprite thing. I was wondering if I could do something like that but extrude it so it's a 3d mesh. If any of that made sense, how could I do this/is there a way to do this without modelling it all over?  Thanks in advance


Could you (moderators) stop deleting community wiki questions?

Problem background  This question is addressed to you, ♦ moderators. There is e.g. , which is full of very useful information. It's been a community wiki with more than 17k views with 51 answers.  The question is off-topic, there's nothing to discuss, but why it was deleted ? Couldn't you just lock it as you did with a several posts around ? The biggest problem is that our community can't even undelete it because it's protected by the ♦ law.  So now it's a community wiki question, which can't be seen nor even undeleted by the community.  Question  Could you undelete that question and let the community decide what to do with it? And if that is possible, could you lock that question to keep its content visible and as it is?    P.S. those reopen votes are there because of curiosity. We shall keep that question closed.


Conditionally create stored procedure using TSQL

I'm writing a db update script which basically retrieve the current version number from the database then create a number of stored procedure if the version is valid. If the current version does not match the expected version then it should skip executing the code.  However I run into a problem when I write the script because CREATE PROCEDURE has to be the first statement in a batch, so it's not possible for me to insert if .. else statement before the create procedure statement.   I've also tried using GOTO but to no avail because GOTO doesn't span across multiple batches. Same thing applies to RETURN and RAISEERROR - the rest of the code will still execute.  Sample script:  IF @Version = '1.0' --doesn't work BEGIN     CREATE PROCEDURE dbo.uspCreateAccount     AS BEGIN     --The rest of the code goes here     END END   Can anyone provide some insight on this?


Creating new layers of individual polygons from existing layer of many using ArcGIS Desktop?

I have a shapefile with 30 polygons. I want to create 30 shapefiles/layers from the original. I was doing this by selecting individual features and exporting them to a new layer.  Is there an automated way to do this?


Often in physics, Objects are approximated as spherical. However do any perfectly spherical objects actually exist in nature?


Angular Momentum Conservation in Gravitational Interaction

thanks for any help.  I'm trying to show that in a 2body problem, angular momentum is conserved given that $\dfrac{dp}{dt}=\dfrac{-GMm(rv)}{r³}$, where p is momentum, t time, G gravitational constant, M mass of 1 object, m mass of the other, (rv) is the vector between them and r is the magnitude of the vector between them.  I've had a lot of attempts but I don't seem to get very far.  Where L is angular momentum, $r_1$ is position vector of mass M and $r_2$ is position vector of mass m, $p_1$ is momentum of mass M and $p_2$ is momentum of mass m.  L=$r_1Xp_1+r_2Xp_2$  If $\dfrac{dL}{dt}=0$ then dL will be conserved over time, applying product rule             $L=\dfrac{dr_1}{dt}Xp_1+r_1X\dfrac{dp_1}{dt}+\dfrac{dr_2}{dt}Xp_2+r_2X\dfrac{dp_2}{dt}$  noticing that $p_1=m\dfrac{dr_1}{dt}$ and $p_2=m\dfrac{dr_2}{dt}$ clearly $p_1$ is parallel to$ \dfrac{dr_1}{dt}$ and $p_2$ is parallel to $\dfrac{dr_2}{dt}$ and hence when cross producted with them, the result is 0.  Giving $L=r_1X\dfrac{dp_1}{dt}+r_2X\dfrac{dp_2}{dt}$  I gather I must now show that either these two terms are 0, or they are equal and     opposite. I can't see any reason why they would be 0, and (slightly guessing) it seems to    make sense to me that they are terms related to how the angular momentum of one body changes    with the other body, and I assume they must therefore be equal and opposite. However when I    do  $r_1X\dfrac{dp_1}{dt}=-r_2X\dfrac{dp_2}{dt}$      I notice $\dfrac{dp_1}{dt}=\dfrac{-GMm(rv)}{r³}$ and $\dfrac{dp_2}{dt}=\dfrac{GMm(rv)}{r³}$ (since (rv)'s direction is flipped)     Therefore $r_1X\dfrac{-GMm(rv)}{r³}=-\dfrac{r_2XGMm(rv)}{r³}$     Defining $w=\dfrac{GMm}{r³}$:  $r_1X(rv)(-w)=r_2X(rv)(-w)$     Scalar products are commutative so the (-w)'s easily cancel giving  $r_1X(rv)=r_2X(rv)$  Which then the only solutions are if all components of $r_1$ are equal to all components of      $r_2$, however angular momentum should clearly be conserved in all positions, not just when the masses are ontop of each other.  Thanks again for any help.


I'm trying to learn reinforcement learning and this topic is really confusing to me. I have taken an introduction to statistics, but I just couldn't understand this topic intuitively.


Is it possible to get "printout" on a single PDF file of selected questions and selected answers? This is for convenient reference. Wikipedia has a feature which allows users to compile topics into a "booklet". If this feature doesn't exist, it would a good idea to include it if possible.


Removing a mySQL database without password?

So about 6 months ago I set up a wheezy server and at the same time I installed MySQL even though I didn't need it.  I've now updated to Jessie and need the database but can not remember the password as I made it rather secure. I thought I wrote it down somewhere but can not find it sigh. This is rather a noob thing to do and I am quite embarrassed by it.  Thank you in advance for your help.


Today's inappropriate ad: fixing bunions without surgery (and probably without any doctor) on Chemistry

Five days ago, :     Yeah I'm aware that "a tool to manage ad experience" is currently being developed, but as long as it's not available, I'll keep on reporting these. I'll also keep on intentionally refreshing until I get an inappropriate ad to report, because I find it to be a useful way to vent. Constructive I don't know, but useful I think so.   Today's entry being a miracle shoe fixing your bunions (and it's fashionable, woohoo!), I wanted to make a joke about how one shouldn't tiptoe around ads. Unfortunately, some research on bunions taught me those weren't, apparently, caused by tiptoeing.  So now I'm doubly annoyed, as I got both an inappropriate ad and a failed joke.         On the bright side, someone else handled the joke for me. Browsing through the totally legitimate reviews (and not complete scam , right?), I learned that this wonderful shoe is also comfy when worn the ears.


Anyone know how to disable certain SSL versions and only enable others in IIS 7.5?


I want to run a shell script called start.sh on my Ubuntu 16.04 LTS server.  So I type ./start.sh and it wont run.  I'm new, just putting that out there.


Determine $\text{Aut}(S)$ where $S = \mathbb{Q}[x]/(x^2)$

Here's the problem: if $S = \mathbb{Q}[x]/(x^2)$, compute the group  of automorphisms $\mbox{Aut}(S)$.   First off, I have the solution and I know it's isomorphic to the multiplicative group $\mathbb{Q}\backslash\{0\}$, so I'm trying to understand it. It uses what is called the substitution principle and the fact that the restriction of any endomorphism $\phi: \mathbb{Q}[x]\to \mathbb{Q}[x]$ to $\mathbb{Q}$ is the identity. It says that these two facts implies that the endomorphisms of $\mathbb{Q}[x]$ are in 1-1 correspondence with $h \in \mathbb{Q}[x]$, where the endomorphism corresponding to $h$ is $\phi_h : \mathbb{Q}[x] \to \mathbb{Q}[x]$ given by $\phi_h(f) = f(h)$ for $f \in \mathbb{Q}[x]$. I guess I just don't understand how it applied the substitution principle? It's probably obvious, but for some reason I am not getting it.  An explanation would be greatly appreciated! Or if you have a different solution, that'd be cool too. Thanks!!


Windows Security - Restoring a quarantined file which is not found but exists in the quarantine folder

Windows Security has quarantined a text file containing important information. That happened less that 30 days ago, but I cannot see any files in the Windows Security Protection History ("no recent actions"). It seems that the file I need is in the folder C:\ProgramData\Microsoft\Windows Defender\Quarantine\ResourceData\CD and is named CDE7887F857F55D6C99909E0D63CF26C687DCE80 I tried the procedure of restoring a file as described on docs.microsoft.com “%ProgramFiles%\Windows Defender\MpCmdRun.exe” –Restore –Name EUS:Win32/CustomEnterpriseBlock –All The result was "no quarantined files". But I still see the file in the folder C:\ProgramData\Microsoft\Windows Defender\Quarantine\ResourceData\CD Is there any way to restore it? Thank you!


Do command line options take an equals sign between option name and value?

Just using kubectl as an example, I note that kubectl run --image nginx ... and kubectl run --image=nginx ... both work.  For command-line programs in general, is there a rule about whether an equals sign is allowed/required between the option name and the value?


If I run sudo apt update after installing Microsoft edge I get this window.


Should there be a space between name initials?

In writing authors' initials in research papers (either in the author by-line or the bibliography), should there be a space between intials?   R.P. Feynman   R. P. Feynman   What's the preferred way of writing it?


I'm new in java and android. Trying to make some app and got NullPointerException. Please see my code below:  import android.app.Activity; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.widget.TextView; import android.widget.Toast;  public class PoziomicaActivity extends Activity implements SensorEventListener {      TextView t1;     TextView t2;     TextView t3;     TextView t4;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_poziomica);          t1 = (TextView)findViewById(R.id.textView1);         t2 = (TextView)findViewById(R.id.textView2);         t3 = (TextView)findViewById(R.id.textView3);         t4 = (TextView)findViewById(R.id.textView4);          SensorManager sensor = (SensorManager) getSystemService(SENSOR_SERVICE);         sensor.registerListener(this,sensor.getDefaultSensor(Sensor.TYPE_ORIENTATION),0,null);      }      @Override     public void onAccuracyChanged(Sensor arg0, int arg1) {         // TODO Auto-generated method stub      }      @Override     public void onSensorChanged(SensorEvent event) {         t1.setText("event.values[0]="+event.values[0]+"\n" +                 "event.values[1]="+event.values[1]+"\n"+                 "event.values[2]="+event.values[2]+"\n");          String kierunek="";         if(event.values[0]==0){             kierunek="Północ (N)";         }else if(event.values[0]<90){             kierunek="Północny-wschód (NE)";         }else if(event.values[0]==90){             kierunek="Wschód (E)";         }else if(event.values[0]<180){             kierunek="Południowy-wschód (SE)";         }else if(event.values[0]==180){             kierunek="Południe (S)";         }else if(event.values[0]<270){             kierunek="Południowy-zachód (SW)";                   }else if(event.values[0]==270){             kierunek="Zachód (W)";         }else if(event.values[0]<360){             kierunek="Północny-zachód (NW)";         }                                t2.setText("idziesz na "+kierunek);          String pochylenie_gd="";         if(event.values[1]==0){             pochylenie_gd="poziomo";         }else if(event.values[1]>0){             pochylenie_gd="góra niżej";         }else{             pochylenie_gd="dół niżej";         }                t3.setText("Płaszczyzna góra-dół:  "+pochylenie_gd);          String pochylenie_lp="";         if(event.values[2]==0){             pochylenie_lp="poziomo";         }else if(event.values[2]>0){             pochylenie_lp="lewa niżej";         }else{             pochylenie_lp="prawa niżej";         }         t4.setText("Płaszczyzna lewa-prawa:  "+pochylenie_lp);          if((event.values[1]==0)&&(event.values[2]==0)){             Toast.makeText(getApplicationContext(), "Idealny poziom!", Toast.LENGTH_LONG).show();         }      }  }   Every time I got error:   java.lang.NullPointer.Exception at com.example.pomocnik.PoziomicaActivity.onSensorChenged (PoziomicaActivity.java:51).   Can someone tell me where is a problem?


sizeof on array function parameter will return size of 'int *' instead of 'int [] even if i use sizeof(array)\sizeof(array[0]);

I have a problem. I am getting an error:     sizeof on array function parameter will return size of 'int *'    even after I use sizeof(array)\sizeof(array[0]). Could you help me please?  bool search(int value, int values[], int n) {   int a=sizeof(values)\sizeof(values[0]);     for(int i=0; i<a; i++)          if(values[i]==value)         return true;         else         return false; }


Conjugacy class of $G$ splitting as Conjugacy class of $H\unlhd G$

Assume $H\unlhd G$ and $\mathcal{K}$ is a conjugacy class of $G$ contained in $H$ and let $x\in \mathcal{K}$.  Prove that $\mathcal{K}$ is union of $k$ conjugacy classes of equal size in $H$ where $k=|G:HC_G(x)|$.  I do not really understand the idea behind this :   $\mathcal{K}$ is a conjugacy class of $G$ means :   Given $x,y\in \mathcal{K}$ we have $g\in G$ such that $x=gyg^{-1}$  He is saying that $\mathcal{K}$ splits into separate classes when seen as classes over $H$.  Splitting means there are two elements in $\mathcal{K}$ that their conjugating element is not coming from $H$   I am not able to proceed further..  I would like to see that if it splits then it splits "Equally"  please help me to clear this.  Thank you


What does it mean when there is a voltage difference between ground and neutral?

Between ground and hot there's approximately 120V as expected.  I had expected the voltage difference between ground and neutral to be 0v, but instead it's 0.4V.  Why would this not be the case?  Is it a hazardous condition?  How would it be corrected?


I want to type \text{coker} in normal font but not italic font in thm enviroment like \ker

I have a question about \text{}.  For convenience, I define many new commands, for example \def\im{\text{Im}}, \def\coker{\text{coker}}, etc.. I expect my new commands work like \ker, and really work that way in usual situation. But, in italic font enviroments(thm, prop, etc..), \im and \coker typed in italic font. I want they type in normal font like \ker.  Is there any way to solve this problem.


like cd/Documents gives "cd/Documents command not found " .The same thing with sudo command. Not able to access an files, change directories or install software


From a person's profile at a work-oriented website:     2006 till present: manager in Business Development Department in   a private medical centre in Moscow, Russia   Does the in preposition look good here? Or maybe the preposition at would fit more nicely?     2006 till present: manager in Business Development Department at   a private medical centre in Moscow, Russia   As an aside, wouldn't it be better to write "Business Development Department manager", omitting the first "in" construction?   P.S. Regarding the overlap with the existing "working for\in the XYZ company" question, it seems to me that my question differs somewhat, since a company is a thing less concrete and definite than a set of buildings comprising a medical centre. Yes, for works fine with the XYZ company, but let's translpant it in our scenario:      2006 till present: manager in Mopping Department for a corner cafe.


How to add any rows by clicking html table in jQuery

I wonder whether I can insert rows in html talbe by clicking them.  For example when I prepare this table like below, and by clicking them

           0	           1	           2

   My desired result is like this.  And I would like to know how to add any rows by clicking

           0	           1	           2

         .         .         .         .

   If someone has opinion, please let me know.  Thanks    table { border-collapse:collapse;}  td { border:solid black 1px; transition-duration:0.5s; padding: 5px}

       0	       1	       2


I was studying permutation groups from the book "Abstract Algebra and Applications" by Karlheinz Spindler in which page 553 I came across the following interesting problem. It is on the famous "The Fifteen Puzzle" for which I am unable to upload the picture but rather I would try to use mathematical notation.   Imagine the fifteen puzzle grid is being presented by the following $4\times 4$ matrix given by  $$\left[\begin{matrix} 1 & 2 & 3 & 4\\ 5 & 6 & 7 & 8\\ 9 & 10 & 11 & 12\\ 13 & 15 & 14 & \circ  \end{matrix}\right]$$ where $\circ$ is the empty place in the grid. We can slid the "numbered tiles" through blank space and are supposed to bring down the final structure as  $$\left[\begin{matrix} 1 & 2 & 3 & 4\\ 5 & 6 & 7 & 8\\ 9 & 10 & 11 & 12\\ 13 & 14 & 15 & \circ  \end{matrix}\right]$$  Now the questions are    Can some one tell me exactly what am I supposed to do now to solve the problem ?


I am trying to get the access token over a controller that is connected to a Salesforce site. But I am having the below error message:  System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://sandbox-goku.cs87.force.com/services/oauth2/token   My controller:   public class Mycontroller {         public String accessToken {             private set;             get {                 if (accessToken == null) {                     accessToken = RestUtil.getAccessToken();                 }                  return accessToken;             }         }   }   Utility to get the access token:  public class RestUtil {     private transient static String accessToken = '';      public static String getAccessToken() {         if (accessToken == '') {             accessToken = fetchAccessToken();         }          return accessToken;     }      private static String fetchAccessToken() {         HttpRequest authReq = buildAutHttpRequest();          Http http = new Http();          HttpResponse authRes = http.send(authReq);          String accessToken = extractAccessToken(authRes);          return accessToken;     }      private static String extractAccessToken(HttpResponse authRes) {         Map<String, Object> authResult = (Map<String, Object>) JSON.deserializeUntyped(authRes.getBody());          return (String) authResult.get('access_token');     }      private static HttpRequest buildAutHttpRequest() {         HttpRequest authReq = new HttpRequest();         authReq.setEndpoint('https://' + URL.getSalesforceBaseUrl().getHost() + '/services/oauth2/token');         authReq.setMethod('POST');         authReq.setBody(buildAuthRequestBody());          return authReq;     }      private static String buildAuthRequestBody() {         String template = 'grant_type=password&username={0}&password={1}&client_id={2}&client_secret={3}';         String[] arguments = new String[]{                 AdminAuthContants.USER_NAME,                 AdminAuthContants.PASSWORD,                 AdminAuthContants.CLIENT_ID,                 AdminAuthContants.CLIENT_SECRET         };          return String.format(template, arguments);     } }


80's or 90's TV Movie about a teenage alien girl with white hair, who stays on Earth for a ranch/farm boy she loves

I don't really remember the plot but I think the a couple of alien girls (look human) crash land on Earth and are helped by human boy (18-19 ish). They get back to their ship but the older girl, with white hair, decides to stay on Earth to be with the boy.  At the beginning of the TV movie the boy wakes up and uses a ham radio and then goes to work on a ranch/farm(?).  I think it might have been one of these old Disney Sunday night movies.