The Dirichlet distribution is the conjugate prior to the multinomial sampling distribution.  What is the conjugate prior (if any) if the sampling distribution is itself Dirichlet?  That is, our samples are nonnegative vectors $\mathbf{p} \in \mathbb{R}^k$ which sum to 1, and we are trying to estimate a distribution over the parameters $\mathbf{\alpha}$ to the Dirichlet distribution that produces $\mathbf{p}$.

I want to estimate parameters of Dirichlet mixture models using Gibbs sampling and I have some questions about that:   Is a mixture of Dirichlet distributions equivalent to a Dirichlet process? What is their main differences if is not? Also, if I want to estimate a single Dirichlet distribution's parameters, which distribution for parameters should be selected as priors in Bayesian framework?   In all of the papers I found an estimation of a multinomial distribution using Dirichlet priors. I need estimation of a Dirichlet distribution using multinomial priors, perhaps.   Is the posterior function also in the form of DIRICHLET(α+N) similar to the case “estimation of multinomial distribution using Dirichlet priors”? as the multiplication of probability density function for iid samples are not considered in the definition of the likelihood function. I again cannot understand why.  e.g. as expressed in this paper:   or      so thanks for your attention  my data is Hyperion (a kind of hyperspectral remote sensing imagery) and i want to perform hyperspectral unmixing using mixture of Dirichlet sources and i will apply Gibbs sampling method for parameter estimation. my data is in dimension (614*512*224) which is commonly available AVIRIS sensor data for Cuprite Nevada district and is almost 200MB. also this data is available via (). unfortunately i don't know how can i sent my data.   i just ask you to help me in statistical modelling tasks for my PHD thesis. i will be so grateful if you help me to solve my confusions in modelling.  all the best solmaz


Could we get the help text for comments tweaked a tiny bit?  I always find [link](http://www.example.com) confusing, because  is a link.  Just now, I actually went to one of my answers and posted a comment so I could experiment with it and not disturb anyone.  If you could just change it to [link text](http://www.example.com), I'd never be confused again.  I'll be the first to admit, this is a very similar question to , but that one didn't seem to generate much impact, so I'm hoping this one will.  This is what I currently see on SO:  Comments use mini-Markdown formatting: [link](http://example.com) _italic_ **bold** `code`. The post author will always be notified of your comment. To  also notify a previous commenter, mention their user name: @peter or @PeterSmith will both work. Learn more…

This is the help for comments:     Comments use mini-Markdown formatting: [link]()   _italic_ **bold** `code`. The post author will always be notified of your comment. To also notify a previous commenter, mention their user   name: @peter or @PeterSmith will both work. Learn more…   I've stumbled often over [link](http://example.com) because the link is not the "link", but the text that is linked. I often find myself putting the URL in the link part because it is confusing.  Proposed changes  Here are two alternatives to make the help text for that tag a bit clearer; maybe the community can identify better ones.  option 1  [text](http://example.com)   option 2  [text](url)   What do you think?


Let $V,W$ be fixed $k$-vector spaces. Let $C$ be the category whose objects are linear map $f:V\to W$ and morphisms from $f$ to $g$ are pair of linear maps $(\alpha,\beta)$ where $\alpha:V\to V,\beta :W\to W$ such that $g \circ\alpha = \beta \circ f$.  I want to find the product in this category. Note that $C$ is the full subcategory of $D$, whose objects are linear maps between any $k$-vector spaces, with morphisms $(\alpha,\beta)$ such that $g \circ\alpha = \beta \circ f$. I proved that in $D$, the product of linear maps $f_i:V_i \to W_i$, $ i \in I$ is given by $f: \prod_{i\in I} V_i \to \prod_{i\in I} W_i$ where $f((v_i))=(f_i(v_i))$.  So given $f_i:V \to W$ in $C$, if there exists isomorphisms $\prod V\simeq V$ and $\prod W\simeq W$, we can also find the product in $C$.  But is it the necessary condition? In other words, if there exists product of $f_i:V\to W$ in $C$, then is it true that $\prod V\simeq V$ and $\prod W\simeq W$?

Let $V,W$ be vector spaces. Let's define a category whose objects are linear map $f:V\to W$ and morphisms from $f$ to $g$ are pair of linear maps $(\alpha,\beta)$ where $\alpha:V\to V,\beta :W\to W$ such that $g \circ\alpha = \beta \circ f$.   Does this category have some special name? If $f_i$ are indexed family of objects, is there product of them in this category?


I have many questions I'd like to ask today. I'm currently studying for my A-levels which is a qualification mainly based in England. I'm taking A-level Further Maths, which involves the study of First and Second Order Differential Equations. It seems we are just being taught to apply recipes to these types of equations and are given no intuition as to why these things even work? This isn't just for teaching in England, I've watched many American lectures and lecture notes and the same thing is done.   Let's take a look at Non-Linear Separable First Order Differential Equations.    We have defined these equations to take the form $$ N(y)\frac{dy}{dx} = M(x)$$  We are taught to solve these equations by multiplying $\ dx $ to both sides and then integrate by their respective variables.  Like so:   $$ \int N(y)\ dy = \int M(x) \ dx $$  I have just accepted this for some time, but I'd like to get to the bottom of wtf is going on. We are taught from Year 12/Calculus 1 days that $\frac{dy}{dx} $ is not a ratio but can be treated like one in many cases. Ok... then could you explain really what we just did when solving the above differential equation? I can accept the fact that we can treat $\frac{dy}{dx}$ as a ratio but it's not really a ratio. So, can we be told what we are really doing? Is it some kind of hidden secret? I just want to know why we multiplied both sides by $\ dx$, what are we actually doing?   I can assume that the reason we are not told is because it involves higher level math, that someone taking Calculus would not understand. But will actual reasoning behind why these recipes work be exposed to us during University math courses?

I see an equation like this:  $$y\frac{\textrm{d}y}{\textrm{d}x} = e^x$$  and solve it by "separating variables" like this:  $$y\textrm{d}y = e^x\textrm{d}x$$ $$\int y\textrm{d}y = \int e^x\textrm{d}x$$ $$y^2/2  = e^x + c$$  What am I doing when I solve an equation this way?  Because $\textrm{d}y/\textrm{d}x$ actually means  $$\lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x}$$  they are not really separate entities I can multiply around algebraically.    I can check the solution when I'm done this procedure, and I've never run into problems with it.  Nonetheless, what is the justification behind it?  What I thought of to do in this particular case is write  $$\int y \frac{\textrm{d}y}{\textrm{d}x}\textrm{d}x = \int e^x\textrm{d}x$$ $$\int \frac{\textrm{d}}{\textrm{d}x}(y^2/2)\textrm{d}x = e^x + c$$  then by the fundamental theorem of calculus  $$y^2/2 = e^x + c$$  Is this correct?  Will such a procedure work every time I can find a way to separate variables?


I was at work and I was curious if there was a limit for the formula $$f(x)=\left(\frac{x}{x-1}\right)^2$$ And I became curious on Desmos to see if there would a different limit for $$f(x)=\left(\frac{x}{x-1}\right)^x$$ It looked like it approached a constant value and, upon plugging it into a limit calculator, it returned $$\lim_{x\to\infty}\left(\frac{x}{x-1}\right)^x=e$$ What is the proof of this? I managed to work it down to $x^x(x-1)^{-x}$, but my calculus isn't good enough for me to work it past there...

How does one show that $\lim_{x\rightarrow\infty}\left(1+\frac{1}{x}\right)^x$ converges? I have a book that uses this to define $e$ but they don't show that it converges. I suppose we could give it an upper and lower bound but I don't know how to do this. I've seen this question before on here but I haven't seen an answer I like yet.


When running multiple monitors on Windows and macOS there is a feature that allows you to set a sort of pressure or dead area on screen boundaries between monitors. You have to push through this area with your mouse cursor to get to leave the current screen/monitor and get to the next one.  This makes it easier to stay within the bounds of whatever monitor your mouse cursor is on.  I know KDE/Kubuntu has a Screen Edges setting, but setting/changing the "Toggle Window Switching" or Switch desktop on Edge" options didn't seem to have any effect.    Edit:  I am running Ubuntu 18.04 with KDE Plasma 5.12.6  Output of inxi -Sxxx:  System:    Host: ubuntu-portable Kernel: 4.15.0-23-generic x86_64 bits: 64 gcc: 7.3.0  Desktop: KDE Plasma 5.12.6 (Qt 5.9.5) dm: sddm,sddm Distro: Ubuntu 18.04 LTS  Regarding being marked as duplicate:  This is not a duplicate of the question provided in the link. I understand that there is confusion over the term "sticky edge". The linked question does not address how to enable the feature whereby the mouse cursor clings to the edge in a multi-monitor setup (whatever it is called).   I can find no option in KDE for sticky edges. As posted in my photo, the Active Screen Corners and Edges setting panel seems like the logical place to put this, but I don't see it. Perhaps that is my answer, and that this feature isn't available in KDE.

I have installed Ubuntu 12.04 (Precise Pangolin). If I open System Settings >> Displays there is a new (?) on/off button for a setting named Sticky edges.  Can someone tell me what this setting is supposed to control?


I recently purchased a desktop just for office use. It did not come with an OS. I had someone install Ubuntu to prepare it for ViciDial because I work at home and some clients ask for me to provide for my own dialer. The guy said that I need Ubuntu for the ViciDial to work but he did not finish what he started and I can no longer find him.  I don't know how to use Ubuntu. I searched online on what to do. I followed instructions on what keys to press and my partner and I even went as far as pressing keys from ESC to F12, to Shift (press and hold) and Del but we were still not able to access the boot menu so we can install the Win7 from a CD. Every time we turn the PC on, it just shows a black background with a gray text field in the middle asking for a password. We don't know what the password is.  I'm sorry if I cannot provide other details. I don't have any other information on what he did with the computer. I'm lost and I just want to use my PC again.  In addition, can I still use Win7 if I setup ViciDial?

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


I get this error when I try to run my file. I try to put in a reference, but I only got [?]. This is the main document:  \documentclass[10pt,a4paper]{article} \usepackage{standalone} \usepackage[english]{babel} \begin{document} \tableofcontents \newpage % Hieronder voeg je de hoofdstukken in \input{../tex/hoofdstuk1} \input{../tex/hoofdstuk2} \newpage \section*{References} \bibliography{bibliography.bib} \end{document}    And this is the .bib file.   In the file hoofdstuk2 I refer to a source like this: \cite{Tsao2013558} I don't understand why my reference is displayed as [?]. Can someone help me?

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


Let $R$ be a commutative ring with unit. Is it true that given an ideal $I$ and $r \geq 2$ principal ideals $P_1, ..., P_r$, then if $I \subseteq \bigcup_{i = 1}^r P_i$, $I \subseteq P_i$ for some $i$? This would be the analogous of the Prime Avoidance Lemma for principal ideals.

Let $A$ be a commutative ring with $1$. Let $I$ and $J_k$, $k=1,\dots,n$ be ideals of $A$ with $I\subseteq \cup _{k=1}^n J_k$. Then I have obtained the following:  (1) If $J_k$, $k=1,\dots,n$, are prime ideals, then there exists some $j$ such that $I\subseteq J_j$.   (2) If $A$ is a principal ideal ring, then there exists some $j$ such that $I\subseteq J_j$.   I want some counterexamples that for all $k=1,\dots,n$, $I$ is not contained in $J_k$. How to get the counterexamples?


getting error that null pointer exception has occurred and trying to invoke virtual method  public class after10th extends AppCompatActivity {      ArrayAdapter<String> adapter;      @Override     protected void onCreate(@Nullable Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.after10th);          ListView lv = (ListView) findViewById(R.id.searchten);         ArrayList<String> after_ten = new ArrayList<>();         after_ten.addAll(Arrays.asList(getResources().getStringArray(R.array.after_ten)));          adapter = new ArrayAdapter<>(after10th.this, android.R.layout.simple_list_item_1, after_ten);          lv.setAdapter(adapter);      }      @Override     public boolean onCreateOptionsMenu(Menu menu) {         MenuInflater inflater = getMenuInflater();         inflater.inflate(R.menu.menu_search, menu);         MenuItem item = menu.findItem(R.id.menusearchten);         SearchView searchView = (SearchView) item.getActionView();         searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {             @Override             public boolean onQueryTextSubmit(String query) {                 return false;             }              @Override             public boolean onQueryTextChange(String newText) {                  adapter.getFilter().filter(newText);                 return false;             }         });                  return super.onCreateOptionsMenu(menu);`enter code here`     }  }   This is the error:  09-23 19:09:17.242 9000-9000/com.example.supriya.career_guidance E/AndroidRuntime: FATAL EXCEPTION: main  Process: com.example.supriya.career_guidance, PID: 9000  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.SearchView.setOnQueryTextListener(android.widget.SearchView$OnQueryTextListener)' on a null object reference

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I am new to python and one of the things every newbie do come across is the slice operator. I have a list:  li=[1,2,3,4,5,6,7]   As per my understanding calling li[:-1] is same as calling li[0:-1] and it is but when using it with a negative steps things do not work exactly as I thought they would. So getting to my question why the result of   print(li[:-3:-2]) # is 7   but the result of  print(li[0:-3:-2]) # is []   Looking forward to some explanation of how the negative step is being treated in this scenario.

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Every single one of my apps, whenever I try to update them, or redownload offloaded apps (which I do very frequently) has this error:     Unable to install APP_NAME, please try again later   I’ve tried everything from turning my Wi-Fi on and off to signing out of my apple ID on the app store, doing a hard restart, and signing back in. Does anyone have any solutions they don’t think will have been in other answers?  PS: This is not a duplicate of :   About a different error. Mine only happens when redownloading any offloaded apps and updating nearly any app, the other users’ error only applied to default apps he’d deleted. On a different operating system. iOS of unknown version, I’m on iPadOS 13.3. With solutions I specifically mentioned I have already tried in my question, or was unable to try. I don’t have cell data, the solutions required cell data or were just restarting the device.

I’ve been trying to reinstall some default apps I had previously deleted such as “Watch” and “Files” through the App Store however with all of them I get the message:     Unable to install ‘app name’ Please try again later.   All other apps download fine, it’s just the default Apple apps that won’t install.


A differential equation is  if a numerical scheme requires a very small time-step in order to be stable for that equation. However I don't understand why it is called stiff (sometimes rigid). Even the wikipedia page says it's more of a phenomenon than a mathematically definable property. One characterization is the stiffness ratio, defined on the wikipedia page as $$ \frac{|Re\bar{\lambda}|}{|Re\underline{\lambda}|}$$ where I think $\bar{\lambda}$ and $\underline{\lambda}$ refer to the eigenvalues with maximum and minimum real parts. So why is it called this way? I don't know how to interpret this stiffness ratio. I was thinking of stiff as similar to "stringent" or "demanding" as a stiff person would be, which makes sense for the "requiring a small time step" definition. How is the requirement of a small time-step related to the stiffness ratio?

One of the mysteries that my numerics class left me with are "stiff systems". Our prof didn't really manage to explain what they are. Now that the class (and the test) are over, I'm still curious.   The most concise definition about "stiff systems" I've found so far is: "There is no universally accepted definition of stiffness". So, if there is none, I don't expect one.   I'd be thankful about information on both of the following points:   From what kind of (real-world) problems do stiff systems arise? What's so "stiff" about them? What's the good thing - or the bad thing - that I'd worry about when I have to numerically solve such a real-world problem?


I'm trying to install the mathabx package and am having some troubles. I am using MixTek 2.9 and running TexWorks. I have tried typing \usepackage{mathabx} into the console as usual before I \maketitle and start the paper etc. However, it keeps saying:  Unfortunately, the package mathabx could not be installed.Please check the log file: C:/Users/mouse_000/AppData/Local/MiKTeX/2.9/miktex/log/miktex-pdftex.log ======================================================================   ! LaTeX Error: File `mathabx.sty' not found.  Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty)   When I type \usepackage{mathabx} it prompts me to install the package and then gives me a list of sites (with countries listed in a separate column) that I can install it however trying a few of them it doesn't seem to work. it. Any help is appreciated on this.

I installed a new hard drive on my computer this summer and I'm trying to install MiKTeX on it now. There were no problems when I was using my old hard drive. My OS is Windows 8.1. I'm trying to compile the following very basic file with pdfLaTeX:  \documentclass{article} \begin{document}   hi   \end{document}   Here's the first error I get:  Sorry, but "MiKTeX Configuration Utility" did not succeed.     The log file hopefully contains the information to get MiKTeX going again:   C:/Users/Tyler/AppData/Local/MiKTeX/2.9/miktex/log/initexmf.log  You may want to visit the MiKTeX project page (http://miktex.org), if you need help.   With the following errors in the log:  2015-09-03 22:23:51,625-0400 INFO  initexmf - starting: MiKTeX Configuration Utility 2.9.5700 (MiKTeX 2.9 64-bit)    2015-09-03 22:23:51,631-0400 FATAL initexmf - Windows API error 32: The process cannot access the file because it is being used by another process. 2015-09-03 22:23:51,631-0400 FATAL initexmf - Info: C:\Users\Tyler\AppData\Local\MiKTeX\2.9\miktex/data/le\1e0c0e04cb3be262fbb8e6e7ace14b67.fndb 2015-09-03 22:23:51,631-0400 FATAL initexmf - Source: Libraries\MiKTeX\Core\win\winFile.cpp 2015-09-03 22:23:51,631-0400 FATAL initexmf - Line: 520   The second error:  Sorry, but C:\Program Files\MiKTeX 2.9\miktex\bin\x64\miktex-pdftex.exe did not succeed. The log file hopefully contains the information to get MiKTeX going again:   C:/Users/Tyler/AppData/Local/MiKTeX/2.9/miktex/log/miktex-pdftex.log  You may want to visit the MiKTeX project page (http://miktex.org), if you need help.   with the following errors in the log:  2015-09-03 22:16:18,715-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database 2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - The operation failed for some reason. 2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Info: C:\Program Files\MiKTeX 2.9\miktex\bin\x64\initexmf.exe 2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp 2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Line: 290   Things I've tried:   Uninstalling and reinstalling MiKTeX Downloading all packages whose name starts with miktex (which is a solution that worked for someone else in a different thread) Having nothing open but TeXworks when trying to compile Looking for processes that may be related to MiKTeX in the task manager (I didn't find any)   How can I stop these errors? I apologize if my formatting is bad; this is my first stackexchange question. Thank you for your help.


I am always confused where to use a "possessive apostrophe".  From what I found on the internet it seems to me that children's literature is correct. What about garden chair? In my eyes it's the same. Garden is describing what kind of chair it is. Children is also describing what kind of literature I have in my mind.  Could someone please explain?

In the following is it better to use a possessive noun with an apostrophe or an attributive noun without an apostrophe?     The following list details the assumptions that have been made in   conjunction with the Dell Company’s staff.   Or      The following list details the assumptions that have been made in   conjunction with the Dell Company staff.   Assume Company is the name of a company, such as Dell.


Based on below,  How can I calculate the distance of a point from Earth now vs 13 billion years ago? The excerpt below claims it is 8 times further now. Can someone provide relevant equations ?  I have a question on an excerpt from the book “our mathematical universe”.  It has the passage “If our universe is 14 billion years old, how can we see galaxies 30 billion light years away? How did their light have time to reach us? Answer is we are not seeing where the galaxies are now but where they were when the light was emitted”  The next part: “Just as we see the sun as it was 8 minutes ago, We might see a distant galaxy the way it looked 13 billion years ago which was about eight times closer to the earth than now?”


What is the difference between attribute and parameter and argument? And how does this works? ex:-  int a = 10;//attribute method(int a);//argument or parameter   And if i pass a argument dynamically then whether it will be called parameter or argument. thanks.

When verbally talking about methods, I'm never sure whether to use the word argument or parameter or something else. Either way the other people know what I mean, but what's correct, and what's the history of the terms?  I'm a C# programmer, but I also wonder whether people use different terms in different languages.  For the record I'm self-taught without a background in Computer Science. (Please don't tell me to read  because I'm asking this for the benefit of other people who don't already have a copy of 's marvellous book.)  Summary  The general consensus seems to be that it's OK to use these terms interchangeably in a team environment. Except perhaps when you're defining the precise terminology; then you can also use "formal argument/parameter" and "actual argument/parameter" to disambiguate.


Deriving de Broglie's equation (as per my text and teacher) involves equating $E = mc^2$ with $E = h\nu$, where $\nu$ is the frequency. It goes like : $$mc^2 = h\nu$$ $$mc^2 = \frac{hc}{\lambda}$$ $$mc = \frac{h}{\lambda}.$$ Then we replace $c$ with the velocity of the particle to apply it generally i.e. $$mv = \frac{h}{\lambda}.$$ My doubt is exactly about this step. As far as I have read before and after learning this equation, I understood that $c$ in $E = mc^2$ was mainly used as a constant which can equate energy and mass rather than something relating energy, mass and velocity of the particle. Thus replacing $c$ with $v$ makes no sense as it would have contradicted the equivalence of $E=mc^2$ in the first place. Can someone explain how $c$ can be replaced with $v$ without contradicting $E = mc^2$, or just simply point out what is wrong with my thought process?

According to de Broglie's wave-particle duality, the relation between electron's wavelength and momentum is $\lambda =h/mv$.  The proof of this is given in my textbook as follows:   De Broglie first used Einstein's famous equation relating matter and energy, $$E=mc^2,$$ where $E=$ energy, $m =$ mass, $c =$ speed of light. Using Planck's theory which states every quantum of a wave has a discrete amount of energy given by Planck's equation, $$E=h\nu,$$ where $E =$ energy, $h =$ Plank's constant ($6.62607 \times 10^{-34}\:\mathrm{ J\:s}$), $\nu =$ frequency. Since de Broglie believes particles and wave have the same traits, the two energies would be the same: $$mc^2=h\nu.$$ Because real particles do not travel at the speed of light, de Broglie substituted $v$, velocity, for $c$, the speed of light: $$mv^2=h\nu.$$   I want a direct proof without substituting $v$ for $c$. Is it possible to prove directly $\lambda=h/mv$ without substituting $v$ for $c$ in the equation $\lambda =h/mc$?


When converting strings to long double I lose precision in QNX. Do you know how to fix this problem?  I am using c++. I have tried double and float and there were no problems.  #include <iostream> #include <string> #include <limits> #include <sstream>  int main(){     long double originalNumber = std::numeric_limits<long double>::max() / 2;     long double convertedNumber;      // From long double to string     std::ostringstream ostr;     ostr << originalNumber;     std::string tmp_str = ostr.str();      //From string to long double     std::istringstream istr(tmp_str);     istr >> convertedNumber;      // Check if they are similar     if (originalNumber == convertedNumber)         std::cout<< "The same\n";     else         std::cout<< "Not the same\n";      return 0; }   The result is always Not the same

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


As title, I've done every single step to sync user's picture, but it's still doesn't work. I don't know what to do now to make it work. Any idea?   I've selected "Use SharePoint Active Directory Import" in  "Configure Synchronization Setting".  In "Manage User Properties" I've set up the mapping with "thumbnailPhoto" attibute for Picture. I can see . "Picture---URL---thumbnailPhoto".  I've run full sync and get 241 users from AD  Then I open PowerShell Command and run "Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation mysitehostURL" . And there is no error.  Finally I checked it again but still didn't work.?

I've followed this tutorial to try to sync user's picture from AD to SP 2013 but I've got issue in the first step: In dropdownlist for attribute I can't find 'thumbnailPhoto' to selected. It was disable.   And there is some picture of my configuration   and   here is the problem  After create connection, When I click Start Profile Synchronize, nothing happen. The status still idle. I'v sure that in my AD there are over hundreds UserProfile. The number 17 mean, there are 17 User have accessed to My Site. I don't know why? . Could it be the cause of my problem?    There is one thing that I'm wonder. I can't start Profile Synchronization Service running because of I'm using "Sharepoint Active Directory Import".


I have a 50mm prime lens and a 18-55mm standard lens at my disposal. How do I measure the magnification of a reversed lens when used with a reverse mount. What are the factors that come into play to calculate the magnification?

I am looking for a way to mathematically determine the maximum magnification ratio that is possible/practical to achieve by reverse mounting a non-macro lens, prior to purchasing the lens.     See related questions:


Stack Overflow Careers should sort experience by the date(s) of the experience and not by when it was entered.  I am going to have to delete several old options from my profile because they are old and not the most relevant.

Just joined Stack Overflow careers and figured I'd chime in and ask for a feature. It appears that the order you insert the "Experience" items in is how they stay. I seem to have put mine in ascending order instead of the more traditional descending. It would be helpful if SO Careers had a sort feature for that section. I certainly want potential employers to see my latest experience first.


I need to copy a file from one server to another. Here is my exact requirement. I am log in from server a and I have to copy a file from server b to server c . So what is the command for it ?

What is the best way to copy a directory (with sub-dirs and files) from one remote Linux server to another remote Linux server? I have connected to both using SSH client (like Putty). I have root access to both.


I'm performing a regression where the dependent variable is a ratio, and the explanatory variable is the denominator of that ratio. In other words, I'm normalizing the dependent variable by $X$ and including $X$ as an explanatory variable:  Dependent variable: $Y/X$  Explanatory variable: $X$  For example, I might be interested in whether countries with more people tend to have a higher proportion of women, in which case $X$ is total population and $Y$ is the number of women. Or I might be interested in how the number of dogs per cat varies with the size of the cat population in a country, and so on.  $X$ appears in both the left hand side and right hand side of the regression equation, and I want to avoid any issues that could arise from this (e.g. mechanical correlations).   Should I be worried about mechanical correlations (either generally or in certain situations)? If so, what kinds of situations, and how can I remedy them? And what other issues might arise?

Recently, randomly browsing questions triggered a memory of on off-hand comment from one of my professors a few years back warning about the usage of ratios in regression models. So I started reading up on this, leading eventually to Kronmal 1993.  I want to make sure that I'm correctly interpreting his suggestions on how to model these.   For a model with a ratio with the same denominator on both the dependent and independent side: $ Z^{-1}Y = Z^{-1}1_n\beta_0 + Z^{-1}X\beta_X + \beta_Z + Z^{-1}\epsilon $   Regress dependent ratio on the (inverse) denominator variable in addition to the other ratios Weight by the (inverse) denominator variable  For a model with dependent variable as a ratio: $ Y = \beta_0 + \beta_XX + Z1_n\alpha_0 + ZX\alpha_X + Z^{-1}\epsilon $   Regress numerator by original variables, denominator, and denominator times original variables [what about categorical variables?] Weight by (inverse) denominator  For model with only independent variable ratios: $ Y = \beta_0 + X\beta_X + Z^{-1}1_n\beta_{Z^{-1}} + W\beta_W  + Z^{-1}W\beta_{Z^{-1}W} + \epsilon $   Include numerator and (inverse) denominator as main effects, ratio as interaction term.    Are my interpretations here correct?


Why the conversions between compatible reference types will compile (Excel 2010, .Net 4.5) in this case  using Excel = Microsoft.Office.Interop.Excel; Excel.Application excelApplication = null; excelApplication = new Excel.Application();  Excel.Worksheet worksheet = workbook.Worksheets[1] as Excel.Worksheet;   and in the case below it will not, although I saw exampales shown like that:  Excel.Worksheet worksheet = (Excel.Worksheet)workbook.Worksheets[1];   In this case I get the following compiling error :  > CSC : error CS0518: Predefined type 'Microsoft.CSharp.RuntimeBinder.Binder' is not  defined or imported  > error CS1969: One or more types required to compile a dynamic expression cannot be  found. Are you missing a reference?   Best,  EDIT : Thanks to the both answerer below the following explanation sounds reasonable:     without including Microsoft.CSharp in the Project References for projects with .Net Version >= 4.0, support for   inter operation between the Dynamic Language Runtime (DLR) and C# is not   possible, i.e. no dynamic cast is possible.

When programming interfaces, I've found I'm doing a lot of casting or object type conversion.  Is there a difference between these two methods of conversion?  If so, is there a cost difference or how does this affect my program?  public interface IMyInterface {     void AMethod(); }  public class MyClass : IMyInterface {     public void AMethod()     {        //Do work     }      // Other helper methods.... }  public class Implementation {     IMyInterface _MyObj;     MyClass _myCls1;     MyClass _myCls2;      public Implementation()     {         _MyObj = new MyClass();          // What is the difference here:         _myCls1 = (MyClass)_MyObj;         _myCls2 = (_MyObj as MyClass);     } }   Also, what is "in general" the preferred method?


Let $\mathbb F$ be a field and $\mathbb  K $ be an extension field of $\mathbb F$  such that $\mathbb K$ is algebraically closed.   Let $\mathbb L$ be the field of all elements of $\mathbb K$ which are algebraic over $\mathbb F$. Then $\mathbb L_{|\mathbb F}$ is an algebraic extension.   My question is : Is $\mathbb L$ algebraically closed ?  I am trying to prove the existence of algebraic closure, so please don't assume that every field has an algebraic closure.

If I have a field $K$ and an extension $L$ of $K$ such that all (non-constant) polynomials in $K[X]$ have a root in $L$, is the set of algebraic elements  of $L$ over $K$ (the sub-field of all the elements of $L$ which are roots of a polynomial in $K[X]$) algebraically closed ?  Do you have a counterexample ?


I just want to know if you can, and what kind of applications can be downloaded.

Is it possible to run Android apps on Ubuntu? And I don't mean inside an emulator, but natively, as you would with any other application installed using the Ubuntu Software Center.


I want to create top down game where you are Russian soldier in libGDX. The player controls the soldier with W/A/S/D and aims with the mouse. That way the soldier can run sideways and shoot towards enemy.  What is best way to make his legs walk into the right direction but aim the weapon towards the mouse pointer?  My idea is to make two sprites, for both torso/weapon and legs and let them lay over each other but I don't know if that is best way to do it.

is a perfect example of the shooting mechanic I'd like. The character aims perpetually toward the mouse. What's going on here?  From what I've read so far, you could separate the arm and rotate that. I've also noticed some people use a different sprite for each weapon.  How can I achieve this?


What is reflection, is it the bouncing back of photon or re-emission of photon by first jumping to a higher energy state and then coming down due to interaction with incident photon?

The "equal angles" law of refection on a flat mirror is a macroscopic phenomenon. To put it in anthropomorphic terms, how do individual photons know the orientation of the mirror so as to bounce off in the correct direction?


Can you guys give me some advice on how to make animation like that? I want to create an animation very similar to this in the video.  Thanks for any advice

I'm trying to simulate a rope (that later might get pulled on the ends*) that interacts with some obstacles. So far I created a plane as the floor and a cube as an obstacle, and activated "collision" in the physics menu for both of them.   *(In the end the goal is simulating a .)  For modelling the rope, I tried using a long cylinder with enough subdivisions, and activate "cloth" in the physics menu. This resulted in the cylinder collapsing like a sleeve of a sweater, but I would like the cross section to remain roughly circular. Is there a way to directly avoid this?   Another approach I tried now was just using a a line made up of vertices and edges (with the idea of later adding modifiers to give it a thickness), but this just fell through all the collision objects as it has no faces. Is there good way to do this?


Here:  #include <iostream> #include <cstdlib> #include <boost/lexical_cast.hpp>  int main(void) {     const char * str = "277499.84";      std::cout << boost::lexical_cast<double>(str) << std::endl;     std::cout << strtof(str, NULL) << std::endl;     std::cout << strtold(str, NULL) << std::endl;     std::cout << atof(str) << std::endl;      return 0; }   output:  277500 277500 277500 277500   Why the output are not 277499.84?

In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision?


There are a number of monsters that make ranged weapon attacks with unusual qualities. For example the  has a ranged attack that does 1d4 piercing and 1d6 fire damage, the 's longbow does an extra 1d8 poison damage, and the 's shortbow has no damage die but can poison an enemy or knock them unconscious. When using the monk's Deflect Missiles feature to make a ranged attack using a caught projectile are additional damage types and effects included with the attack?   You can use your reaction to deflect or catch the missile when you are hit by a ranged weapon attack. When you do so, the damage you take from the attack is reduced by 1d10 + your Dexterity modifier + your monk level. If you reduce the damage to 0, you can catch the missile if it is small enough for you to hold in one hand and you have at least one hand free. If you catch a missile in this way, you can spend 1 ki point to make a ranged attack with the weapon or piece of ammunition you just caught, as part of the same reaction. You make this attack with proficiency, regardless of your weapon proficiencies, and the missile counts as a monk weapon for the attack, which has a normal range of 20 feet and a long range of 60 feet.   on catching poisoned arrows is related but does not answer my question. The linked question asks about which damage needs to be reduced in order to catch the arrow. My question is about the damage that the arrow would do if the monk spends 1 ki point to make an attack with it. For a specific example: A Drider hits a monk with an arrow and deals 4 piercing damage (1d8+3) and 1 poison damage (1d8). The monk uses Deflect Missiles and reduces the damage by 35 (1d10 + 5 + 20) lowering the damage to 0. The monk then spends 1 ki point to make a ranged weapon attack with the caught arrow as per the Deflect Missiles. The monk hits with the attack. How do I calculate damage?

When catching an arrow tipped with poison (like the ones used by yuan-ti) with an ability like the one the monk has or the one given by arrow catching gloves: does the ability reduce the poison damage? If so, is the total damage or the piercing one caused by the arrow only the damage that must be downed to 0 to catch the missile?


My students write sentences like this:      She hasn't gone out with him since two months ago.   so I want to know if this sentence is right or wrong in English grammar.

First, I check that my native language is not English, and the problem described below met on one of the exams.   With this sentence:      "The most important news is that my parents [...] a new restaurant a few   weeks ago."   Is the correct tense to use the Present Perfect (have opened) or Past Simple (opened)?   I know that the word "ago" but rather that time Past Simple, but is it also possible to use the present perfect in some cases?  I would be grateful for clarification.


I have two arrays that list people, and I'm trying to figure out which people are in both arrays.  $employees = Array("bob", "john", "jerry", "mike"); $homies = Array("bob", "john", "arnold");   I basically need to know which dudes are both employees and homies (in this case, bob and john) so that I have a new array:  $employees_and_homies = Array("bob", "john");   I looked at like a dozen other questions on here, but I'm lost and nothings working for this particular case.

I have two arrays in PHP as follows:  People:  Array (     [0] => 3     [1] => 20 )   Wanted Criminals:  Array (     [0] => 2     [1] => 4     [2] => 8     [3] => 11     [4] => 12     [5] => 13     [6] => 14     [7] => 15     [8] => 16     [9] => 17     [10] => 18     [11] => 19     [12] => 20 )   How do I check if any of the People elements are in the Wanted Criminals array?  In this example, it should return true because 20 is in Wanted Criminals.


$$\int\dfrac{x^2}{1+x^4}dx$$ I tried many standard approaches, but I didn't get too far! Here's the most promising of them: $$\int\dfrac{dx}{\frac{1}{x^2}+x^2}$$ knowing that $\left(1/x+x\right)^2=\frac{1}{x^2}+x^2+2$ we can change variables $1/x+x=t$. Unluckily this doesn't work either.

Integrate $$\int\frac{x^2dx}{1+x^4}$$ I've factored the denominator to $(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)$ and got stuck.


I've learned that in combustion chamber fuel and air are mixed and burned but I dont understand the outcome. Ive heard that after combustion it is still very hot and I also seen that you loss heat as a result. So can someone clear this up for me so its not so confusing, also if you need to burn the air and fuel mixture why can you just use the hot air from the compressors?

I'm trying to understand at a high level how a  works. I want to know if the following summary I wrote is more or less accurate:  The jet compresses regular air into a combustion chamber. Fuel is sprayed into the combustion chamber. The pressurized fuel/air mixture is ignited and this increases the pressure inside the combustion chamber even more. The hot highly presurized gas blasts out of the combustion chamber. The energy of this blast is captured by turbines. The turbines power the compressor and provide useable power to a shaft.  Is my understanding correct?


I am running Windows XP and have a phone mounted through USB by MTP.  In Explorer, its address is:  My Computer\SAMSUNG-SGH-I547\Phone\DCIM   I would like to execute a command line command such as  explorer "My Computer\SAMSUNG-SGH-I547\Phone\DCIM\Camera"   so as to quickly go to the Camera folder. (Right-clicking the device or anything in it does NOT provide a "Create Shortcut" dialog.)  But "My Computer" is not a valid PATH in Windows. Unlike USB flash drives, it seems the phone mounted by MTP does not get a letter drive name.  So, what is the path of an MTP device in Windows?  If the answer is there is no command line path, is there workaround?

Most MTP () devices show up in Windows File Explorer under their device name or a GUID, but they don't have a drive letter assigned.  How can I access the files on such devices from the command line? Using either cmd.exe or PowerShell.


Without touching the FlexBuilder app (I'm still going through the tutorials for Flex) is there a way to customize the pop-up that appears for the Locate Widget?  I am assuming that I could go into the pop-ups folder and create a popup_Locate config file of some sort? Is this correct? Or is there a better way to customize the popups that appear when selecting from the list that populates from a Locate Widget search?

I want to add text where it says "score" to make it more clear that this is an address matching score.    I am using the LocateWidget_US.xml and do not think I can do it here.  I think the place to do it may be in the LocateWidget.mxml in this line????   locateResult.content = getDefaultString("resultScoreText") + " " +   (addrCandidate.score % 1 == 0 ? addrCandidate.score : addrCandidate.score.toFixed(1));


I would like to ask you if anyone of you knows how can I save changes in the progrem so when It will be restarted, the changes would remain?   for example, I have a boolean variable which his defualt value is "false".  I want after the inital start, change the value to "true"  so when I'll close and start the program, the boolean variable value  would be true.

What I want to achieve is very simple: I have a Windows Forms (.NET 3.5) application that uses a path for reading information. This path can be modified by the user, by using the options form I provide.  Now, I want to save the path value to a file for later use. This would be one of the many settings saved to this file. This file would sit directly in the application folder.  I understand three options are available:   ConfigurationSettings file (appname.exe.config) Registry Custom XML file   I read that the .NET configuration file is not foreseen for saving values back to it. As for the registry, I would like to get as far away from it as possible.  Does this mean that I should use a custom XML file to save configuration settings?  If so, I would like to see code example of that (C#).  I have seen other discussions on this subject, but it is still not clear to me.


I'm looking to buy a Sony mirrorless camera. The draw back is the expense of extra lenses as Sony really is proud of their products. Has anyone here tried using a Canon EF lens on a Sony mirrorless camera? I'm looking at getting the a3000. I see that they make adapters but I have no idea if it's worth the effort. My budget has no room for a $1000 lens at the moment. I can however afford an adapter to make the canon lenses work on the Sony frame. I've found many used Canon lenses at pawn shops that are well within my budget.Thank you

I currently live in the Canon ecosystem, but really like the look of the Sony a7S. But before I switch I want to know just how well I'll be able use use my old EF-mount lenses on my new a7S.  How well do the mount adapters perform?  Are there any converters that would allow me to use my old EF lenses with 100% of the original functionality (auto-focus, IS, EXIF data, etc)?  I would not normally ask, but this isn't the sort of thing I can try out in the store.


I am trying to prove this:     Prove that a positive integer $n$ is a prime number, if no prime $p$ less than or equal to $\sqrt n$ divides $n$.   This is how I thought of starting:  Let us assume the smallest prime factor of $n$ to be $P$.  So, $n = (m)(P)$ From this it follows that $(n) \geq (P)^2$ or $\sqrt n \geq (P)$ i.e $n$ has at least one prime divisor smaller than $\sqrt n$ whenever it is composite.  So if it has no prime divisor, then it must be prime.  However, I'm not quite satisfied with the proof. Can someone please provide me an easier approach to the proof?

I have the following theorem:  If no prime less than or equal to $\sqrt{n}$ divides $n$, then $n$ is a prime.  And the following proof (proof by contradiction) for said theorem:  Suppose that no prime less than or equal to $\sqrt{n}$ divides $n$ but $n = ab$, with neither $a$ nor $b$ equal to $1$. Now $a$ and $b$ cannot both be strictly larger than $\sqrt{n}$ or their product would be larger than $n$. So one of $a$ or $b$ is not larger than $\sqrt{n}$: assume (without loss of generality) that $a \le \sqrt{n}$. Now $a$ cannot be prime (as we have assumed $n$ has no prime factor this small), and so is composite. Therefore $a$ has a prime factor $p$, which must be less than $a$. But then $p < a \le \sqrt{n}$ is a prime factor of $n$, and this contradicts our hypothesis. Hence $n$ is prime.  We deduce that $a$ is composite. But why does this then mean that $a$ has a prime factor $p$? So this is saying that all composite numbers have a prime factor? Why? I would greatly appreciate it if people could please take the time to clarify this. PostScript: I am assuming that  is the definition of composite number being used here.


Suppose $f$ is differentiable at $0$ and $f(0)=0$. Prove that there exist some function $g(x)$ such that $f(x)=xg(x)$ and $g$ is continuous at $0$.  I think I am on the right track, here:  If I write $g(x)=\frac{f(x)}{x}$ then $g$ will be discontinuous at $0$ because $f(0)=0$. Now, as an example, let $f(x)=x^2$ and $g(x)=x$. How can I proceed?

(a) Let a function $g:I\to\mathbb{R}$ be continuous at $x_0\in I$. Prove that the function $f$ given by $f(x)=(x-x_0)g(x)$ is differentiable at $x_0$.  (b) Let a function $f:I\to\mathbb{R}$ be differentiable at $x_0\in I$ and $f(x_0)=0$. Prove that there exists a function $g:I\to \mathbb{R}$ that is continuous at $x_0 \in I$ such that $f(x)=(x-x_0)g(x)$.    Thought:  (a)  By $Fermat's$, since $g$ is continous, if $g'(x_0)=0$ then $g(x)$ is differentiable?  but how does it connect back with $f(x)$?  (b)  use the definition of every differentiable function is continuous?  Thus $f(x)$ is continuous and also $(x-x_0)$ so $g(x)$ too?  Thank you!!


The LIGO Scientific Collaboration and Virgo Collaboration  that on the 14th of September 2015, at 09:50:45 UTC, they detected a transient Einstein gravitational wave, designated GW150914, produced by two merging black holes forming a single black hole. They stated that the speed of propagation of the gravitational wave is the speed of light. Is the speed of propagation of Einstein's gravitational waves unique or arbitrary?

Do gravitational waves have a certain speed? Is it the speed of light or infinite, or am I misunderstanding what a gravitational wave is? I think it is a ripple in spacetime caused by interactions between objects, but i could be wrong.


Let $(a_n)_{n \in \mathbb{N}}$ be an infinite positive sequence of integers. Assume that $f(\lambda) = \sum\limits_{n=0}^{\infty} a_n \lambda^n$ is finite for any $\lambda \in [0, \lambda_0)$. Does this necessarily imply that $f(\lambda)$ is also continuous in $(0, \lambda_0)$, or might something strange happen?

I want to prove that every power series is continuous but I am stuck at one point.  Let $\sum\limits_{n=0}^\infty a_n(x-x_0)^n$ a power series with a radius of convergence $r>0$ and let $D:=\{x\in\mathbb R:|x-x_0|<r\}$. Then $S(x)=\sum\limits_{n=0}^\infty a_n(x-x_0)^n$ is continuous on $D$.    Proof: Let $x\in D$ and $r_0\in\mathbb R^+$ such that $|x-y_0|<r_0<r$ and for any positive integer $N$ let $S_N(y)=\sum\limits_{n=0}^{N-1} a_n(y-x_0)^n$ and $\phi_N(y)=\sum\limits_{n=N}^\infty a_n(y-x_0)^n$.     Since the power series converges uniformly on the closed disk $|y-x_0|\leq r_0$, we may choose a positive integer $N_\varepsilon$ such that $|\phi_{N_\varepsilon}|<\frac\varepsilon3$ for all $|y-x_0|\leq r_0$.   Since $S_{N_\varepsilon}$ is polynomial we can choose a $\bar\delta>0$ such that $|S_{N_\varepsilon}(y)-S_{N_\varepsilon}(x)|<\frac\varepsilon3$. So we get $|S(y)-S(x)|<\frac\varepsilon3+\frac\varepsilon3+\frac\varepsilon3=\varepsilon$ for $|y-x|<\delta$    Why is in the violet term $|\phi_{N_\varepsilon}|<\frac\varepsilon3$ correct? Don't I have two terms in the absolute value? Thanks for helping!


Refer the title. Why was this required? How is this related to ultraviolet catastrophe?

I was reading some popular science book and there was this sentence. It says that energy has to be emitted in discrete portions called quanta. Otherwise the whole energy in the universe would be converted into  high frequency waves.  I'm not a physicist, so this conclusion seems to me like a huge leap.  First, we assume that energy is emitted in a continuous way (not in quanta).  And how do we get to the statement "the whole energy in the universe would be converted into  high frequency waves"?


, which prevents up/down votes, comments, answers and close votes.  It would be nice to have a less draconian lock, that only locked the question text (and tags) but permitted up/down votes, comments, answers answers and close votes.  It would assist against:   Edit wars on the question.    This would normally be handled by putting the question on hold until it is resolved. With this new lock, at some point the mod could make a final decision, and lock the question down, letting people actually start answering it.   Frequent, deliberate bumping.   If an OP keeps making trivial changes to the question for the sake of getting it back to the front page - but you aren't ready to suspend them for it - the question text could be locked. (Bounties would still be possible.) If people have an answer to provide, it should be open to that. Once answers are provided, people should be allowed to vote on them - it isn't the answerer's fault.

Locking a post has very severe consequences for a post, you cannot   Upvote or downvote on it Edit it Vote to close or reopen it Comment on it Add new answers to it   Because of these severe consequences I usually avoid locking altogether and try to deal with the problem in other ways. Locking just has far too severe side-effects for my taste, I don't want to prevent anyone from voting or answering just because there is an edit-war on the post.  We now also have some locking reasons, ignoring the historical significance reason as it isn't relevant here, they are the following:     Content dispute      This post has been locked while disputes about its   content are being resolved. For more info visit meta.      Off-topic comments      This post has been locked due to the high amount of   off-topic comments generated. For extended discussions, please use   chat.   Both are common reasons for locking a post, and in both cases the locking is there to prevent only a small subset of what locking actually stops.  Those locking reasons shouldn't only be a text attached to the lock, but they should also change the behaviour of the locks:   A lock for off-topic comments should only prevent new comments A lock due to an edit war should only prevent edits to the post   This would make using those locks less disruptive, and more useful to moderators.


Observe the following (bad) question on Japanese.SE:   The question reports the following in the close banner:      closed as not constructive by sawa, , , ,  Nov 2 '11 at 6:45   Now, I happen to know that "user458" (the same user who made the last edit to the question on Nov 1 '11 at 23:35) was known as "sawa" before having their account removed. Shouldn't references to the user in the close banner also be anonymized to "user458"? Obviously, we're never going to succeed at perfectly anonymizing the user because of stuff like @mentions in the comments, but it seems like "system text" like the close banners at least ought to anonymize correctly.  (I suspect that protection and deletion banners may have the same issue, though I haven't encountered any posts that were protected or deleted by a now-deleted user yet.)   (Is this a duplicate of ? animuson marked it , so I'm not sure what's up.)

We recently had  which showed that "Mik" had cast a close-vote on one of the questions however his profile wasn't linked. It became clear later on in the answers and comments that Mik's profile is now deleted and hence his name is not linked to his profile.  Another example for same user:    But then, why isn't the name of the user obfuscated like it gets done for posts/comments once the user gets deleted?


Which one of these two statements is correct?  60% of staff work or 60% of staff works

Which one of these two statements is correct?     Our staff do ...      Our staff does ...   And is staffs ever correct?


I'm trying to solve problem 1.18 in Fulton's 'Algebraic Curves', which is illustrated in the attached image, but I'm having some difficulties understanding the first part.  The ring R is assumed to be commutative and unital, so the first thing that came to mind was to consider the binomial expansion of $(a+b)^{n+m}$, but I don't see why powers of $a$ which are less than n, or powers of $b$ which are less than m should be contained in the ideal.  An explanation as to how I can show that $Rad(I) $ contains $a+b$ would be appreciated, particularly I'd like to know if one can indeed be guaranteed the containment (in I) of the aforementioned terms from the binomial expansion.  I suspect that I may be missing or forgetting some ring theoretic fact.

Possible Duplicate:          Given a commutative ring $R$ and two nilpotent elements $r$, $s$ there exists an $n \in \mathbb{N}$ such that  $$ (r+s)^n = 0.$$  I want to prove that in order to show that the nilpotent elements of a commutative ring are closed under addition (to show that the nilpotent elements form an ideal within a commutative ring). Is that a good way to do it? I'm a little stuck.


I need help.. Question  An examination of the function $f:\mathbb{R}^2 \to \mathbb{R}$, $f(x,y) = (y-3 x^2)(y-x^2)$ will give an idea of the difficulty of finding conditions that guarantee that a critical point is a relative extremum Show that (a) the origin is a critical point of $f$ : I solved easily  (b) f has a relative minimum at $(0,0)$ on every straight line through $(0,0)$; that is,  if $g(t)=(at, bt)$, then $f o g : \mathbb{R} \to \mathbb{R}$ has a relative minimum at $0$, for every choice of a and b;  (c) the origin is not a relative minimum of $f$.  It is hard to me (b) and (c)..

There is an exercise in my lists about those functions: $$f(x, y) = (y-3x^2)(y-x^2) = 3 x^4-4 x^2 y+y^2$$  $$g(t) = f(vt) = f(at, bt); a, b \in \mathbf{R}$$  It asks me to prove that $t = 0$ is a local minimum of $g$ for all $a, b \in \mathbf{R}$  I did it easily: $$g(t) = 3 a^4 t^4-4 a^2 t^2 b t+b^2 t^2$$ $$g'(t) = 2 b^2 t-12 a^2 b t^2+12 a^4 t^3$$ $$g''(t) = 2 b^2-24 a^2 b t+36 a^4 t^2$$  It is a critical point: $$g'(0) = 0; \forall a, b$$  Its increasing for all a, b: $$g''(0) = 2b^2 > 0; \forall b \ne 0$$ and $$b = 0 \implies g(t) = 3 a^4 t^4$$ which has only one minimum, at $0$, and no maximum  However, it also asks me to prove that $(0, 0)$ is not a local minimum of $f$.  How can this be possible? I mean, if $(0, 0)$ is a minimum over every straight line that passes through it, then, in this point, $f$ should be increasing in all directions, no?


I was curious how often I'd used a couple of idiosyncratic terms in my answers, so I googled them together and was surprised to see them on an external site, having survived a translation into Spanish.      The site appears to have translated portions of arqade.se and rpg.se. As someone who only speaks one language; that is, an American, I have no idea if their attribution or operation is in keeping with Stack Exchange fair-use guidelines. I was hoping someone more conversant could take a look around.

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


Season 5 Spoiler alert!!!      In season 5 ending, the son of harpes revolted and attempted to assasinate Dany, luckily her dragon drogon came to her rescue, maybe it sensed her trouble, maybe its a coincidence, it doesn't really listen to her. David Benioff said that Dany and Drogon shares a deep connection and that Drogon can sense when Dany is in peril, But it didn't come when Dany was surrounded by Dothraki horde.

In S05E09 "",  and her advisors find themselves      surrounded in the arena by The Sons of the Harpy, vastly out-numbered.    The situation looks pretty grim, when all of a sudden      a dragon's roar is heard, and her missing dragon  shows up to defend Dany & her friends. After he is wounded by the Sons, Dany climbs onto his back and flies off.   This scene played out differently in the books. In the book, the dragon      was drawn to the arena early on, attracted to the sounds of battle & the smell of blood. Once he landed, he was pretty much out of control - breathing fire at everyone and everything, including Dany herself. She ultimately had to use a whip on him, and flew away with him as much to save everyone else as anything.   Within the context of the show, how did Drogon know that Dany needed him, and how did he know who to attack?  I haven't seen all of Season 5 yet so I'm assuming maybe I missed something.


I am implementing a simple singly linked list in Javascript. class Node {    constructor(data) {       this.data = data;       this.next = null;    } }  class LinkedList {    constructor() {       this.head = null;    } }  I initially wrote an appendNode method like so: appendNode(data) {    const node = new Node(data);    let curr = this.head;     if (curr) {       while (curr.next) curr = curr.next;       curr.next = node;    } else curr = node; }  This does not work, head is never set, the LinkedList does not get built out with repeated calls to appendNode. Rewriting appendNode like so: appendNode(data) {    const node = new Node(data);     if (this.head) {       let curr = this.head;        while (curr.next) curr = curr.next;       curr.next = node;    } else this.head = node; }  Does work. I suspect this has something to do with how Javascript handles object references, but searching around for other implementations of LinkedList in JS or the technical details of JS object references has borne no fruit.

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Given $n$, how to construct $n$ points on a plane s.t. any 3 points are not on a line, and the distance between any 2 points is an integer?  Below is how to do it for $n=6$ here ABC is the 3,4,5 triangle.

How many points can one can place in $\mathbb{R}^n$, with the requirement that no $n+1$ points lie in the same $\mathbb{R}^{n-1}$-plane, and the euclidean distance between every two points is an integer?


Whats the best method in having multiple domains online with the same content so that it does not affect SEO.  Say a www.domain.com and www.domain.com.au. The *.com.au domain has significant SEO history and the *.com domain is brand new and currently only has a 301 redirect to the .com.au domain.  Would I just put a copy of the same website up on both domains or will a redirect from one domain to the other do the trick?  What would be the best method to go about this?

Lets say I have a domain already, for example www.automobile4u.com (not mine), with a website fully running and all.  The title of my "Website" says:    <title>Used cars - buy and sell your used cars here</title>   Also, lets say I have fully SEO the website so when people searching for the term buy used cars, I end up on the second or first page.  Now, I want to end up higher, so I go to the google adwords page where you can check how many searches are made on specific terms.  Lets say the term "used cars" has 20 million searches each month.  Here comes the question, could I just go and buy that domain with the search terms adress, in this case www.usedcars.com and make a redirect to my original page, and this way when people search for "used cars", my newly bought domain name comes up redirecting people to my original website (www.automobile4u.com)?  The reason I believe this benefits me is because it seems search engines first of all check website adresses matching the search, so the query "used cars" would automatically bring www.usedcars.com to the first result right?  What are the downsides for this?  I already know about google spiders not liking redirects, but there are many methods of redirecting...  Is this a good idea generally?


I have the following Parameters in a shell script  #!/bin/bash DOCKER_REGISTRY=gcr.io GCP_PROJECT=sample ELASTICSEARCH_VERSION=:7.3.1   When i run this command the parameters are all replaced correctly   ELASTICSEARCH_IMAGE=$DOCKER_REGISTRY/$GCP_PROJECT/elasticsearch$ELASTICSEARCH_VERSION echo $ELASTICSEARCH_IMAGE gcr.io/sample/elasticsearch:7.3.1   I need to replace the ELASTICSEARCH_IMAGE on a kubernetes deployment file     containers:     - image: {{ELASTICSEARCH}}                                                       name: elasticsearch    So when i run the below command it is not replaced. The issue is because of "/". I tried various sed command but not able to resolve it   YAML_CONTENT=cat "app-search-application.yaml.template" | sed "s/{{ELASTICSEARCH_IMAGE}}/$ELASTICSEARCH_IMAGE/g"  My intension is to dynamically change the image on kubernetes yaml file with the sed command.

In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="<funny characters here>" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user.


Assuming we have this circuit:     – Schematic created using  Assuming D1 is a silicon diode and D3 is a germanium diode,Will D1 be turned on so the VAB  = Vfd1 or not? I know that if we didnt have the resistor D1 would not turn on but now i am unsure.I also know that if we had a resistor ,with a smaller resistance than R1, in series with D1 both would turn on. [] I assumed that D1 conducts and found the current 0.003A.But I assumed D1 conducts it may not what should I do from here?

If we have this circuit:  The diode with the lowest forward voltage drop will conduct and turn on while the other will turn off and not conduct current. If I have this circuit:  Assuming the 2 diodes have the same voltage drop, R1 can be considered to be in parallel to R2 and that's how we solve those circuits. However in the same case, what if the 2 diodes have different forward voltage drops? Say Vd1>Vd2 which assumption should I take into account?


I just noticed Google Maps new feature.  It allows the user to get approximate drive times for a specific date and time using average traffic conditions.  This is a feature which .  It allows the user to choose to depart at a specific time or arrive at a specific time.  In the later case it recommends a time for the user to leave.  The drive time is given as a possible range of times (see the screencap below).    My question is; how is this range of times defined?  Is it the minimum to maximum range, the 90% confidence interval, or perhaps the 25th to 75th percentile?

I have this  planned in Google Maps as a rough plot for travel times to 4 locations from Tokyo Tower, it's by no means finished.  Now I am well aware that there are other factors such was road works, traffic conditions, rest stops, etc. but would the travel times listed on Google Maps be an accurate estimate?   i.e. From Tokyo Tower to Hachiman Shrine, can I expect it to take at least 14 h 28 min on a perfect non-interrupted drive with the route Google Maps suggests?


I was wondering if i could start a .sh from a .jar file.  I think i would go something like this:  start "test.sh"   but that did not work.

It is quite simple to run a Unix command from Java.   Runtime.getRuntime().exec(myCommand);   But is it possible to run a Unix shell script from Java code? If yes, would it be a good practice to run a shell script from within Java code?


I'm trying to make a program in Godot where the player can put a bunch of images into a folder, and when the button is pressed, have the image appear as a sprite on the screen. With the current code, the directory for the image is printed when the button is pressed, but the image sprite simply does not appear. No error messages come up either, so I'm stumped as to what the problem is. Here is the code: extends Button  func _pressed():     var cards_order = [] #creates the array          var path = "assets/cards/" #defines a path     var dir = Directory.new() #creates a directory     dir.open(path) #sets the directory to the defined path     dir.list_dir_begin() #begins listing the directory     while true:         var file_name = dir.get_next() #sets the var "file_name" to the next entry in the directory         if file_name == "":         #break the while loop when get_next() returns ""             break         elif !file_name.begins_with(".") && !file_name.ends_with(".import"):         #get_next() returns a string so this can be used to load the images into an array. Also stops .import files from being added             cards_order.append(load(path + file_name)) #loads the next file into the array     dir.list_dir_end()          randomize() #changes the randomization          cards_order.shuffle() #shuffles the array          var card_sprite = cards_order.front() #sets card_sprite as the first item in the array          print(card_sprite.get_path())          $"/root/CardSprite".texture = load(card_sprite.get_path())  Any help with this would be greatly appreciated!

I am seeking possibility to switch character textures for game, even after I have compiled and built the binary.  For example I have a troll with a Sprite from "/assets/texture1.png"  Now after the game has been released, I can change this sprite.  Currently I have found this method  func _ready():     var texture = load("res://textures/troll1.png")     sprite.texture = texture   But after the export, when I change the troll1.png, the texture in the game remains the same.


Whenever I boot my Windows 8 computer, my default browser (Chrome, though this happened while IE was my default browser) opens up and automatically opens the  homepage. What's causing this and how can I prevent this from happening?

My Windows 8 Laptop will open Bing in IE by itself. It makes a request to:        which then directs to        Changed default browsers from IE to Chrome and see the same behavior in Chrome.  My initial thought was spyware, but the Microsoft URL made me think otherwise. I then confirmed that it happens on brand new installs for others at my company.   It happens (seemlingly) randomly, and without any interaction from me. I can reproduce the issue by disabling my network connection and resuming from sleep mode.


I did this function so that the form button enables when the inputs are different from empty, but I don't know how to do so that in the #email ID the input, in addition to being different from empty, must necessarily contain the character '"@" or the strings "@ gmail.com", "@ hotmail.com". This is the function $(function () { $('#button').attr('disabled', true); $('#textarea, #email, #name').change(function () {     if ($('#name').val() != '' && $('#email').val() != '' && $('#textarea').val() != '') {         $('#button').attr('disabled', false);     } else {         $('#button').attr('disabled', true);     } });  }); This is the HTML <form id="contact-form" method="POST" action="forms/contact-form-handler.php">                 *<input name="name" id="name" type="text" class="form-control" placeholder="Nombre" required>
                 *<input name="email" id="email" type="email" class="form-control" placeholder="Dirección de correo electrónico" required>
                 *<textarea style="resize: none;" id="textarea" name="message" class="form-control" placeholder="Mensaje" row="4" required></textarea>                     Las celdas marcadas con * son obligatorias.

                 <button type="submit" id="button" disabled="disabled"></button>
               </form>

Is there a regular expression to validate an email address in JavaScript?


I'm really stuck on this problem. I couldn't find an injection or bijection from $\mathbb{N}^\mathbb{N}$ to $2^\mathbb{N}$ in order to apple Schroder-Bernstein. Can anyone help me out with this? Thanks.

My motivation for asking this question is that a classmate of mine asked me some kind of question that made me think of this one. I can't recall his exact question because he is kind of messy (both when talking about math and when thinking about math).   I'm kind of stuck though. I feel like the set $A^{\mathbb{N}} = \{f: \mathbb{N} \rightarrow A, f \text{ is a function} \}$ should have the same cardinality as the power set of A, if A is infinite. On the other hand, in this , it is stated that the sequences with real coefficients have the same cardinality as the reals.   It's easy to see that $A^{\mathbb{N}} \subseteq P(A)$, but (obviously) I got stuck on the other inclusion. Is there any general result that says anything else? References would be appreciated.  EDIT To clarify the intetion of this question: I want to know if there are any general results on the cardinality of $A^{\mathbb{N}}$ other that it is strictly less than that of the power set of A.   Also, I was aware that the other inclusion isn't true in general (as the post on here I linked to gave a counterexample), but thanks for pointing out why too. :)


I have no idea whether this is known or not and I couldn't find anything related on Google. While I was studying , I come up with this idea $1+n!=m^{2} $ for some $n,m\in\mathbb{N}$  $1+4!=5^{2}$  $1+5!=11^{2}$  $1+?!=?^{2}$   and the question is what is the next number? Wolfram Alpha gave me this interesting graph:   Thanks in advance for your interest.

One observes that  \begin{equation*} 4!+1 =25=5^{2},~5!+1=121=11^{2}  \end{equation*} is a perfect square. Similarly for $n=7$ also we see that $n!+1$ is a perfect square. So one can ask the truth of this question:   Is $n!+1$ a perfect square for infinitely many $n$? If yes, then how to prove.


Is it possible to duplicate the default left side Unity panel and have another one on the right? I have multiple applications that I want to lock to the launcher and I don't like continuously scrolling to the end of the left panel.  I know a simpler alternative would be to simply use the main Unity launcher fixed on the top, but I was just curious to know if multiple side panels was possible.

Is it possible to have 2 unity launchers? One on the Left and one on the Right. In my thoughts, the Left one (The Default) would have the normal stuff that i use everyday. The Right side would have additional stuff that i might use like wine programs or to show the recent documents. Just some ideas to my reason to having 2 panels. Is it possible/optional?


This feels wrong in my brain, so I think it's a new change... If the tag list is short, the line showing last modification and the user+rep loses its right-justification (red), but if the tag list is long enough to cause a linewrap, it is properly right-justified (green).  This happens here on MSE as well as the main page of Physics.SE and Physics Meta. I suspect it is global, but I haven't looked at any other sites. This is Firefox 89.0 (64 bit) on Windows 10, and I haven't tried other browsers or OSes.

In the  (homepage), the asked/modified X mins ago text was left-aligned next to the tags. Previously the text was right-aligned. Seems some alignment issue introduced on that page recently. Screenshot for reference:      Configuration Version     Operating System Windows 10 Pro   Mozilla Firefox 89.0 (64-bit)   Google Chrome 91.0.4472.101 (Official Build) (64-bit)     Update: I see the same alignment issue in all other Stack Exchange site's "Top Questions" page too.


The principle of conservation of energy says that all energy in a system will remain the same. It can just be transformed.  The universe contains a huge amount of energy, but where did it come from?  I know there isn't that ONE answer, but I'm curious as to what the thoughts and theories about this question are.

In popular science books and articles, I keep running into the claim that the total energy of the Universe is zero, "because the positive energy of matter is cancelled out by the negative energy of the gravitational field".  But I can't find anything concrete to substantiate this claim. As a first check, I did a calculation to compute the gravitational potential energy of a sphere of uniform density of radius $R$ using Newton's Laws and threw in $E=mc^2$ for energy of the sphere, and it was by no means obvious that the answer is zero!  So, my questions:   What is the basis for the claim – does one require General Relativity, or can one get it from Newtonian gravity? What conditions do you require in the model, in order for this to work? Could someone please refer me to a good paper about this?


I've wondered what is the logic behind choosing these designs and descriptions for the hats of Winter Bash 2017?

Inspired by a , here's a list of the 'etymology' for the  hats. For pictures and a list of criteria, see  instead.  The list is a community wiki; feel free to edit it if you have more information about a hat. If you like to do some research, most hats have been featured in earlier editions, so you might be able to find more information in old Meta Stack Exchange questions.


I was looking for an exercise book on Discrete Math like SAT questions. In particular I want questions on  Logic Set Theroy Relations (I.e., $R\subset A\times A$) Functions Combinatorics  I did not find anything like SAT questions but only "open" questions.

I am going to a Computer Science Course in University next year. I heard that Discrete Mathematics is whats required for Comp Sci so, I am looking for resources/books that I can read to get started with. I picked up . I find that some things are alittle hard to understand still. I have also looked at some videos from , I find the videos easy to understand. Except that I don't really know where am I supposed to start 1st. I am on algebra now, but can someone tell me whats the sequence I should go from here, eg. topics/playlists?  An you know, for maths, there must be alot of practice. So where can I find lots of practice questions? Schaum's Outline of Discrete Mathematics has quite little practice questions.


I've found a way to do what I want which is, But I'm wondering if there's a way I can get this down to one line.  I have a list of list of lists of strings, as compared to a lists of numbers (for which there's an answer: [Sum of list of lists; returns sum list)  Example List:  list = [['T=-40F A=0K', 'T=-15F A=0K', 'T=59F A=0K', 'T=98F A=0K', 'T=120F A=0K'],  ['T=-40F A=10K','T=-15F A=10K','T=59F A=10K','T=98F A=10K','T=120F A=10K']]   Example Output:  ['T=-40F A=0K', 'T=-15F A=0K', 'T=59F A=0K', 'T=98F A=0K', 'T=120F A=0K', 'T=-40F A=10K', 'T=-15F A=10K', 'T=59F A=10K', 'T=98F A=10K', 'T=120F A=10K']   I can join these with this method:  new = [] for i in [['T=%.0fF A=%.0fK'%(t,a)for t in TEMP] for a in ALT]:     new = new + i   Anyone got anything?  As for the application im adding a legend to a matplotlib plot  This would be really easy, and an awesome feature with sum(list)

Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  >>> [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  >>> from itertools import chain >>> list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]


I trying to get info in database and sending for an object called Question.  When i got null in database and send it to the field of the object.. I suppose that field will be "null", cause the field is an String.  But i tried all ways to verify it and i cant...  I tried:      Question a = new Question();     a.setAnswer(database.getAnswer(id));     // Way 1     if(a.getAnswer() == null) {             Log.d("Way 1", "successfully");     }      // Way 2     if(a.getAnswer() == "null") {             Log.d("Way 2", "successfully");     }     //Way 3     if(a.getAnswer().equals(null)) {             Log.d("Way 3", "successfully");     }     // Way 4     if(a.getAnswer().equals("")) {              Log.d("Way 4", "successfully");     }   But I didn't got result...  I put in log to log my Question.getAnswer() too:  And here's the result:      D/Here == >: null

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


I have created a method that takes a List as an input, brewMethod.getmMethodBrewPours() and depending on the users preference, the method returns those variables as they are or multiplied by a number. I store the returned value as a new variable, brewPours. The issue is, not only is this method returning new values to be stored, but it's also changing the values of the original variable. Why is this being changed, and what should I do to prevent it?  Code that calls method:  // Custom class storing sets of data         brewMethod = i.getParcelableExtra("brew_method");          //logs original packaged values         for (int j = 0; j < brewMethod.getmMethodBrewPours().size(); j++) {             Log.v("Original pour value #: " + j + ": ", brewMethod.getmMethodBrewPours() .get(j).toString());         }          //changes values based on users preference         brewPours = replacePours(brewMethod.getmMethodBrewPours());          //report the values again of the original packed values, but they are changed for some reason         for (int k = 0; k < brewMethod.getmMethodBrewPours().size(); k++) {             Log.v("New value on Original pour value #: " + k + ": ", brewMethod.getmMethodBrewPours() .get(k).toString());         }          //log the values of the new variable brewPours         for (int l = 0; l < brewPours.size(); l++) {             Log.v("Value for new variable brewPours pour # " + l + ": ", brewPours.get(l).toString());         }   Code of the method:      public List<Integer> replacePours(List<Integer> waterPours) {      SharedPreferences pref = getSharedPreferences("preferences", MODE_PRIVATE);      Integer newServingSize = pref.getInt("pref_key_serving_size", 1);      if (newServingSize == 2) {         for (int i = 0; i < waterPours.size(); i++) {             newPour = waterPours.get(i) * 2;             waterPours.set(i, newPour);         }     }      return waterPours; }   Output:  06-19 16:50:34.474 30159-30159/com.brewguide.android.coffeebrewguide V/Original pour value #: 0:: 60 06-19 16:50:34.474 30159-30159/com.brewguide.android.coffeebrewguide V/Original pour value #: 1:: 200 06-19 16:50:34.474 30159-30159/com.brewguide.android.coffeebrewguide V/Original pour value #: 2:: 300 06-19 16:50:34.474 30159-30159/com.brewguide.android.coffeebrewguide V/Original pour value #: 3:: 380 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/New value on Original pour value #: 0:: 120 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/New value on Original pour value #: 1:: 400 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/New value on Original pour value #: 2:: 600 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/New value on Original pour value #: 3:: 760 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/Value for new variable brewPours pour # 0:: 120 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/Value for new variable brewPours pour # 1:: 400 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/Value for new variable brewPours pour # 2:: 600 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/Value for new variable brewPours pour # 3:: 760     Edit: I adjusted the method's code following the advice from @Vampire and got the results I was looking for. Below is my adjusted code, thanks!  public List<Integer> replacePours(List<Integer> waterPours) {      List<Integer> returnedPours = new ArrayList<>();     SharedPreferences pref = getSharedPreferences("preferences", MODE_PRIVATE);      Integer newServingSize = pref.getInt("pref_key_serving_size", 1);      if (newServingSize == 2) {         for (int i = 0; i < waterPours.size(); i++) {             int newPour = waterPours.get(i) * 2;             returnedPours.add(newPour);         }     }     return returnedPours; }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Quantum mechanics is governed by Schrodinger's equation:  $$\hat{H}\psi=i\hbar\partial_t \psi$$  It seems that Hamiltonian acts on wave functions like a time derivative. Just out of curiosity, is there any Hamiltonian that contains time derivatives, either first order or second order?

In the time-dependent Schrodinger equation, $ H\Psi = i\hbar\frac{\partial}{\partial t}\Psi,$  the Hamiltonian operator is given by  $$\displaystyle H = -\frac{\hbar^2}{2m}\nabla^2+V.$$  Why can't we consider $\displaystyle i\hbar\frac{\partial}{\partial t}$ as an operator for the Hamiltonian as well? My answer (which I am not sure about) is the following:   $\displaystyle H\Psi = i\hbar\frac{\partial}{\partial t}\Psi$ is not an equation for defining $H$. This situation is similar to $\displaystyle F=ma$. Newton's second law is not an equation for defining $F$; $F$ must be provided independently.   Is my reasoning (and the analogy) correct, or is the answer deeper than that?


Is it possible to hide window decorations or at least the title bar in Gnome 3.10? I found an extension called "Maximus", but when I try to install it (and Gnome asks whether I want to download it and install), nothing happens.

(Ubuntu 13.04 with GNOME Shell, upgraded, GNOME version 3.8) Recently, I upgraded Ubuntu to 13.04. the default desktop is gnome-shell. Except Nautilus, other software border doesn't disappear when I make them to be maximized. I checked the problem for these software:  LibreOffice Firefox Rhythmbox thunderbird GNOME-Terminal  On the other hand there are three bars on maximized mode:  GNOME Shell panel  Title-bar for software which contains - + x (minimise, maximise, close) buttons.  Software menu-bar  Number "2" is extra. Is a package missing?


as far as I noticed always people in physics have a predefined assumption that frequency is constant. whereas we know that the c is the outcom of product of wavelength and frequency. we have different wavelength and frequency iv whit light. the energy depends on both of them wavelength and frequency. if you consider the speed of light as a global constant parameter then both attribute of that must have that properties. but we know when light passes through a glass for example; it loses energy as we can measure the changes in temperature of glass that is increased. then I think the change of speed of light is because of interaction between light as an electromagnetic wave and fields inside the material would occure and frequency and wavelength both would change by 1 divided on square root of $n$ or refracting index. by the way we lose the speed but when the light enters the air again it behaves as before then we have the same speed. you van not measure the speed at the boundary condition as speed needs distance and time to be measured. then why we must suppose frequency is constant?

What determines the color of light -- is it the wavelength of the light or the frequency?  (i.e. If you put light through a medium other than air, in order to keep its color the same, which one would you need to keep constant: the wavelength or the frequency?)


Example input:  A0021,,Outside state ambulance serv,I,,0,0,, A4217,,"Sterile water/saline, 500 ml",X,, A4672,,"Drainage ext line, dialysis",X,,   Example output after first sed command   sed -i 's/("[^,])[,]([^"]")/\1\2/g' file.csv :  A0021,,Outside state ambulance serv,I,,0,0,, A4217,,"Sterile water/saline, 500 ml",X,, A4672,,"Drainage ext line dialysis",X,,   Desired output after the last command:  A0021,,,I,,0,0,, A4217,,,X,, A4672,,,X,,   The third column has been giving me issues in a project and the easiest solution is to simply delete it, as it is not necessary. The commas should remain, it should just have empty contents.  I was thinking that I would need to develop a sed command to remove the commas contained within quotes before the command to delete the third column, as I would imagine that the easiest way to do this would be to count the commas and then delete everything between the 2nd and 3rd comma.  this is the sed command I am using the delete the commas inside of the quotes before I proceed with clearing the 3rd column's contents

I have a CSV file, in.csv, which has an integer array column:  1,2,4,"{100,200,300}",,1 1,2,4,"{100,200,300,400,500}",,2 1,2,4,"{100,200,300,600.900,1200,1500}",1,3   I want to have an output file, out.csv, like:  1,2,4,,1 1,2,4,,2 1,2,4,1,3   I tried:  cut -d , -f4 -- complement in.csv > out.csv   But it did not work out.  (I also have the fifth column which has value for third row but not for others).


public class Sample {     public void M1(Bx b1, Bx b2) {         Bx temp = b1;         b1 = b2;         b2 = temp;    } }  public class Bx {     public int number;     public Bx(int newNumber) {         newNumber = number; }  if i ran something like : public static void main(String[] args) {      Sample s = new Sample();     Bx a = new Bx(10);     Bx b = new Bx(5);     s.M1(a,b);     System.out.println(a.number + " " + b.number); }  the values dont switch. The values for a.number and b.number is still their original values. Can anyone please tell me why. Thank you :)


If I have a market research with population of 100 individuals:   10 spend less than 10 dollars in clothing   20 spend between 10 - 20 dollars in clothing   30 spend between 20 - 100 dollars in clothing   the remaining do not spend at clothing.     How do I calculate to arithmetic average and standard deviation of the data?

I have a dataset of sample observations, stored as counts within range bins. e.g.:  min/max  count 40/44    1 45/49    2 50/54    3 55/59    4 70/74    1   Now, finding an estimate of the average from this is pretty straight forward.  Simply use the mean (or median) of each range bin as the observation and the count as a weight and find the weighted average:  $$\bar{x}^* = \frac{1}{\sum_{i=1}^N w_i} \sum_{i=1}^N w_ix_i$$  For my test case, this gives me 53.82.  My question now is, what's the correct method of finding the standard deviation (or variance)?  Through my searching, I've found several answers, but I'm unsure which, if any, is actually appropriate for my dataset.  I was able to find the following formula both  and .  $$s^{2*} = \frac{ \sum_{i=1}^N w_i (x_i - \bar{x}^*)^2 }{ \frac{(M-1)}{M} \sum_{i=1}^N w_i }$$  Which gives a standard deviation of 8.35 for my test case.  However, the Wikipedia article on  gives both the formula:  $$s^{2*} = \frac{ \sum_{i=1}^N w_i}{(\sum_{i=1}^N w_i)^2 - \sum_{i=1}^N w_i^2} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  and  $$s^{2*} = \frac{1}{(\sum_{i=1}^N w_i) - 1} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  Which give standard deviations of 8.66 and 7.83, respectively, for my test case.  Update  Thanks to @whuber who suggested looking into Sheppard's Corrections, and your helpful comments related to them.  Unfortunately, I'm having a difficult time understanding the resources I can find about it (and I can't find any good examples).  To recap though, I understand that the following is a biased estimate of variance:  $$s^{2*} = \frac{1}{\sum_{i=1}^N w_i} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  I also understand that most standard corrections for the bias are for direct random samples of a normal distribution.  Therefore, I see two potential issues for me:   These are binned random samples (which, I'm pretty sure, is where Sheppard's Corrections come in.)  It's unknown whether or not the data is for a normal distribution (thus I'm assuming not, which, I'm pretty sure, invalidates Sheppard's Corrections.)   So, my updated question is; What's the appropriate method for handling the bias imposed by the "simple" weighted standard deviation/variance formula on a non-normal distribution? Most specifically with regards to binned data.  Note: I'm using the following terms:     $s^{2*}$ is the weighted variance   $N$ is the number of observations.  (i.e. the number of bins) $M$ is the number of nonzero weights.  (i.e. the number of bins with counts) $w_i$ are the weights  (i.e. the counts) $x_i$ are the observations.  (i.e. the bin means) $\bar{x}^*$ is the weighted mean.


I have an iPhone X, with a camera specs of:  Wide-angle: ƒ/1.8 aperture Telephoto: ƒ/2.4 aperture  Why does the phone need software to produce Portrait Mode image (image with background blur / bokeh)? With my SLR camera, shooting with f2.4 and definitely f1.8 apertures are more than enough for a blurred background.

It has been mentioned at    that a larger sensor results in images with a shallower depth of field. Example image:          I understand how sensor size would relate to, for example, field of view, but the relationship with depth of field does not seem straightforward.  It actually seems contradictory - I have more wells on my sensor, and I am able to focus on less number of points.  What is the reason for this effect?


Let's suppose that my dataset in a classification problem looks like that:   class A: 50000 observations class B: 2000 observations class C: 800 observations class D: 200 observations   These are some ways which I considered to deal with this imbalanced dataset:   I reject straight away oversampling because it usually makes the model overfit (in the minority classes) by a lot. Secondly, if I run the classifier with the data like that then it will be overclassifying documents in class A so I reject this method too. Another approach is to do undersampling and reduce class A to let's say 4000 documents (where I tested it and it gives the best results so far). However, in this way I am losing quite a lot of information. So I am wondering if building multiple classifiers with 4000 documents each for class A (different at each time) is a better solution (although I think that this approach resembles quite a lot the oversampling approach which I rejected).   What do you think of method (4) comparing to method (3)?

I am trying to classify images to more then a 100 classes, of different sizes ranged from 300 to 4000 (mean size 1500 with std 600). I am using a pretty standard CNN where the last layer outputs a vector of length number of classes, and using pytorch's loss function CrossEntropyLoss.  I tried to use $weights = \frac{max(sizes)}{sizes}$ for the cross entropy loss which improved the unweighted version, not by much.  I also thought about duplicating images such that all classes ends up to be of the same size as the larges one.  Is there any standard way of handling this sort of imbalance?