I tried the following but no use: sudo add-apt-repository ppa:fingerprint/fingerprint-gui sudo apt update sudo apt install libbsapi policykit-1-fingerprint-gui fingerprint-gui  I got this error: E: Unable to locate package policykit-1-fingerprint-gui E: Unable to locate package fingerprint-gui


Is this right: first:       -sudo apt-get-repository -y ppa:webupd8team/java      -sudo apt-get update      -sudo apt-get install -y oracle-java8-installer   than  sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6   or   sudo apt-get install lib32stdc++6   For Install Android Studio:  $ sudo add-apt-repository ppa:paolorotolo/android-studio $ sudo apt-get update $ sudo apt-get install android-studio


Telescoping series of form $\sum (n+1)\cdots(n+k)$

Wolfram Alpha is able to telescope sums of the form $\sum (n+1)\cdots(n+k)$  e.g. $(1\cdot2\cdot3) + (2\cdot3\cdot4) + \cdots + n(n+1)(n+2)$  How does it do it?   EDIT: We can rewrite as: $\sum {(n+k)! \over n!} = \sum k!{(n+k)!\over n!k!} = \sum k!{{n+k} \choose n}$ (Thanks Daniel Fischer)  EDIT2: We can also multiply out and split sums. So e.g.  $$\sum (n-1)n(n+1) = \sum (n^3-n) = \sum n^3 - \sum n$$  But sums of powers actually seem to be more nasty than the original question, involving Bernoulli numbers. (Thanks Claude Leibovici)  And is there any name for this particular corner of maths? (i.e. How might I go about searching the Internet for information regarding this?)  PS please could we have a 'telescoping' tag?


How to prove the map is continuous?(Stein's complex analysis Chapter3 exercise 16)

Suppose $f$ and $g$ are holomorphic in a region containing the disc $|z|\leq 1$. Suppose that $f$ has a simple zero at $z=0$ and vanishes nowhere else in $|z|\leq 1$. Let $$f_{\epsilon}(z)=f(z)+\epsilon g(z).$$Show that if $\epsilon$ is sufficiently small, then (a) $f_{\epsilon}(z)$ has a unique zero in $|z|\leq 1,$ and (b) if $z_{\epsilon}$ is this zero, the mapping $\epsilon\to z_{\epsilon}$ is continuous.  I have been asked to solve the question as homework. Part (a) is actually trivial by applying Rouche's Theorem since $f$ and $g$ are holomorphic and we have $$|f(z)|>\epsilon|g(z)|$$ when $\epsilon$ is sufficiently small. But Part (b) is difficult for me. As the exercise show, the zero $z_{\epsilon}$ is a function of variable $\epsilon$, and I don't know how to determine where is the zero $z_{\epsilon}$. I can never show $$\lim_{h\to0}(z_{\epsilon+h}-z_{\epsilon})=0$$without knowing the exact expression of $z_{\epsilon}$. So I decide to consider the inverse map: $z_{\epsilon}\to\epsilon$. And I get $$\epsilon=-\frac {f(z_{\epsilon})}{g(z_{\epsilon})}.$$ This is a continuous function. Can I end proof by saying "Since the inverse function is continuous"? Or my consideration is actually wrong? HELP! Please show me the correct proof or the right way solving the exercise.


How to ask a question which implies an ordinal number as an answer?

How do I ask a question which implies an ordinal number as an answer? E.g. if I want to ask "which exit should I take on a motorway?" and I don't want to get an answer "left" or "right" or "the next one", but rather "first", "second" etc. What do I need to add to my question or how can I modify it in this case?


For what purposes is my user id used when sharing a link?

My .  I just noticed that when sharing a link, it's appended to the end of any link when I try and get a link for a question/post:    I'm curious what purposes this is for (not being a privacy nut either, I'm not concerned).  The question arises because if I post the link (on a Facebook wall, or tweet it, etc), then other people can share that link, and at best, the only tracking that can be done is who exposed the link for a subset of views  This is a valid reason in itself, but I was wondering if there were any others.


C++ Overloaded function not being called with string parameter

I overloaded a function like the following:  void myClass::saveAsMat (bool complete){   ... }  void myClass::saveAsMat (std::string filename){   ... }   In my main.cpp when I call the function like this:  myObj.saveAsMat(true);   everthing works fine. But when I instead call the function like this:  myObj.saveAsMat("myName");   the function is not being executed at all. I expected a compile or runtime error but there is nothing like that. The program gets compiled and runs only that the function is ignored. (I checked this by placing some std::cout inside the function).  Then I found out that I can solve this by changing the argument passed to:  myObj.saveAsMat(string("myName"));   Why do I have to set the extra string() for the argument? Other functions that are not overloaded are working fine by simply passing "myName" for a "std::string" paramenter.


I want to plot two different functions in two separate pair of axis, one above the other. Besides, I have to draw a dotted line between the two so as to mark some interesting points. Is it possible?


I am total noob in Linux. I wanna know what is the equivalent of "My Computer" in Ubuntu 11.04. I want to check my computer specs such as Processor Speed, Memory, and etc.  Whenever I check properties in Home Folder it only gives me the HD capacity. I also tried looking at System Settings but I can't find it there. Please help.


MacBook Pro 2020 +eGPU +RX5700xt +Cycles Problem

Yesterday I received the Razer Core X with an AMD RX5700 XT Graphics card to use with Blender 2.92. Unfortunately, Cycles will not recognize this eGPU in the Blender System Cycles render device Preferences. Whenever I instruct Cycles to render with my GPU Compute device, my Mac's fans start whirring, indicating that my integrated GPU is rendering, and not my eGPU. Does anyone know how to render with an eGPU? Thanks! -Jake MacBook Pro Mid 2020, 13.3 Inch MacBookPro16,2 Quad-Core Intel Core i7 2.3 GHz Number of Processors: 1 Total Number of Cores: 4 eGPU: Razer Core X eGPU Chasis 8GB AMD RX5700xt


In Youtrack (issue tracker) there are shortcuts that require 'insert' key which my macbook pro 15inch 2016 model does not have. How can I emulate it? Is there a combo like fn +  that simulates insert key?  I tried everything that was suggested in other questions and answers and have not solved my problem yet.


SQL Floats going to decimals like this: 0.00000305176

Everywhere within my code when I interact with a float value in my database, I always round(); it to 2 decimals in PHP, how come I get values like this: 0.00000305176 within my database sometimes?


Does removing an iPhone from my icloud account also erase the data?

I lost my iPhone 6S recently. I think it fell off my car and was crushed because it has been offline (according to Find My iPhone) ever since. I want to erase the phone and remove it from my iCloud account since the phone is gone.  However, I can't erase the phone until it comes back online. I do have the option to remove the device from my iCloud account. If I remove the phone from my iCloud account, does that also erase the data? The phone has a password on it, will it continue to be locked in case someone finds it after I have removed it from my iCloud account?


Are $\mathbb{Q}_p$ and $\mathbb{Q}_q$ homeomorphic?

If $p$ and $q$ are distinct prime number, are $\mathbb{Q}_p$ and $\mathbb{Q}_q$ homeomorphic as topological space?


Solve the following Diophantine equation

I need help with solving the following diophantine equation: $$x^2+y^2=2018$$  Thanks a lot in advance!


What are some good subtly incorrect proofs of obviously incorrect results?

I'm interested in compiling a list of proofs that look logically correct at a glance, but "prove" something obviously incorrect.  Here are some examples.    $e^{i \pi} = -1$ $e^{2i\pi} = 1$ $2i\pi = \ln 1$ $2i\pi = 0$ $-4\pi^2 = 0$  Let $a = b$.  Then:   $a = b$ $a^2 = ab$ $a^2 - b^2 = ab - b^2$ $(a+b)(a-b) = b(a-b)$ $a + b = b$ $a = 0$  The :      You are on a game show, in which the host fills two indistinguishable envelopes with random amounts of money, such that one envelope contains $x$ dollars and the other contains $10x$ dollars.  You pick an envelope at random, but then you are offered a chance to switch envelopes (intuitively, it shouldn't matter whether or not you choose to switch).  You reason: there is a 50/50 chance that I currently hold the higher-valued or lower-valued envelope in my hands.  If I keep this envelope, my expected return is $x$.  If I switch, then my expected return is $\frac{1}{2}(\frac{1}{10}x) + \frac{1}{2}(10x) = 5.05x$.  Therefore, I should switch.   Any other good ones?


How do you deal with transitions in animating walking?

I'm pretty new to this whole animating models thing. Just learning the ropes. I got a nice walking animation going, which I can loop while a character is walking, but what about when they stop walking?  I mean, they could be at any point in the animation at the time the player stops walking. How do I get them to smoothly return to a standing still position without having them snap into that position? The same goes for starting walking from a standing still position. Do you need a separate animation? How is this dealt with?


Are homotopy equivalent path-connected spaces homotopy equivalent as pointed spaces?

Let $(X,x)$ and $(Y,y)$ be path-connected pointed topological spaces.  Is it true that the statement  ''$X$ and $Y$ are homotopy equivalent''  implies  ''$(X,x)$ and $(Y,y)$ are homotopy equivalent as pointed spaces''? How can I prove this?  A pointed homotopy equivalence is a homotopy equivalence where the two involved homotopies are constant on the basepoints at every ''time''.


Auto populate a field with the user who made the change

This is what I use to allow Google Sheets to auto-populate the date/time in column "N" whenever any cell in that row is updated.   function onEdit() {   var s = SpreadsheetApp.getActiveSheet();   var r = s.getActiveCell();   if( r.getColumn() != 8 ) { //checks the column     var row = r.getRow();     var time = new Date();     time = Utilities.formatDate(time, "GMT-04:00", "MMM/dd/yy, hh:mm:ss");     SpreadsheetApp.getActiveSheet().getRange('N' + row.toString()).setValue(time);   };  }   I want to be able to auto populate the Google user/name who made an any changes when a cell in that row is updated.   Is this possible?


What's the difference between \DeclareMathOperator and \mathop?

Is there any difference between  \DeclareMathOperator{\erf}{erf}   and  \def{\erfc}{\mathop{\mathrm{erfc}}}   apart of the fact that \DeclareMathOperator is defined in amsmath package?


Show that there exists infinitely many numbers that are coprime pairwise, in the set defined as following

The set $A$ = {$X_n\mid n\in \Bbb N$} where $X_n = a^{n+1} + a^{n} - 1$, with $a \gt 1, a \in \Bbb Z$.  Show that there are infinitely many numbers that are pairwise coprime.


Is it a bad idea to run SELinux and AppArmor at the same time?

My corporate policy says that Linux boxes must be secured with SELinux (so that a security auditor can check the 'yes, we're extremely secure!' checkbox for each server).  I had hoped to take advantage of Ubuntu's awesome default AppArmor security.  Is it unwise to run both Apparmor and SELinux?  (If so, can this bad idea be mitigated with some apparmor and/or selinux tweaks?)


Evaluating $\sum_{n=1}^{\infty}\frac{(n-1)!}{(x+1)(x+2)(x+3)\cdots(x+n)}$ for positive real $x$

Let $x$ be a positive real number. Evaluate the infinite sum $$\sum_{n=1}^{\infty}\frac{(n-1)!}{(x+1)(x+2)(x+3)\cdots(x+n)}$$ My approach was writing the expression as $$ x!\sum_{n=1}^{\infty}\frac{1}{n(n+1)(n+2)\cdots(n+x)}$$ Then I assumed $x=2$ then I got answer as $1/2$, so the answer was $1/x$ (for general). But can I get any idea for a generalized solution of the question?


Several times, the  package uses \newtoks which (according to  website) means that a token register is allocated. An example code snippet is  \@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat} \FR@everyfloat={\let\@footnotetext\@mpfootnotetext   \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@   \floatobjectset\floatfont}   Suppose I want to add something (e.g., \setlength{\footnotesep}{0.2\baselineskip}) to the definition of \FR@everyfloat. One way I successfully applied in  answer is to overwrite the original definition, i.e., write  \FR@everyfloat={\let\@footnotetext\@mpfootnotetext   \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@   \floatobjectset\floatfont   \setlength{\footnotesep}{0.2\baselineskip}}   However, I'd like to avoid duplicating the whole token list content; instead, I want to append material to the list the same way one would use \g@addto@macro (or \appto from the  package). However, my naïve approach to write  \g@addto@macro{\FR@everyfloat}{\setlength{\footnotesep}{0.2\baselineskip}}   doesn't work -- obviously, token lists must be treated different from macros.  So: How does one append material to a token list?


I installed Ubuntu 12.10 (not realizing it was an old unsupported version). I lost access to windows 7 at boot up (it messed up the boot up drivers) have since downloaded Ubuntu 14.04.3 How do I install the latter version?


Make punctual contributions to IRS based on earnings

A few weeks ago I asked a  because my wife started several part-time jobs with variable demand and therefore variable income.  Considering we filled in 0 exemptions on all her new jobs' W-4s, is it possible for me/my wife to make punctual contributions to the IRS using our SSNs? For example, at any given date I decide to pay a given amount to the IRS so that those taxes will count for next year?  One of the options I have instead is to change my own (higher income) W-4 to adjust our joint taxes. However, how often can I do that? Can I change my W-4 several times a year?  Thanks in advance,


Why does k-means clustering algorithm use only Euclidean distance metric?

Is there a specific purpose in terms of efficiency or functionality why the k-means algorithm does not use for example cosine (dis)similarity as a distance metric, but can only use the Euclidean norm? In general, will K-means method comply and be correct when other distances than Euclidean are considered or used?  [Addition by @ttnphns. The question is two-fold. "(Non)Euclidean distance" may concern distance between two data points or distance between a data point and a cluster centre. Both ways have been attempted to address in the answers so far.]


Why was the Triwizard cup portkey in Goblet of Fire two-way?

At the end of the scene in the cemetery in GoF, the spirits who emerged from Voldemort's wand tell Harry to go grab the trophy (which, of course, was a portkey that took Harry and Cedric from the maze to the cemetery), and that the trophy portkey would take Harry back to Hogwarts.  Why would the portkey do that?  Are all the portkeys 2-way?  If possible, I would prefer as much of the answer based on canon (or JKR) as feasible


Proof that the symmetric difference is associative

I know that the symmetric difference looks like that when having three sets A,B,C:    I want to make a prove with Venn diagrams to prove the associativity of the symmetric difference. What are some good ways to create this proof in a clear way?  I really appreciate your answer!


I am very new to Latex and I try to use Biblatex with APA style. Here is an example_  \documentclass[a4paper, 12pt]{article} \usepackage[backend=biber,style=apa]{biblatex} \addbibresource{test.bib}  \title{APA Test} \begin{document} \maketitle This is an APA test. Here should be an APA quote in parentheses  \parencite{groves_understanding_1992}  \printbibliography \end{document}   With .bib file  @article{groves_understanding_1992,     title = {Understanding the {Decision} to {Participate} in a {Survey}},     volume = {56},     issn = {0033-362X, 1537-5331},     url = {http://poq.oxfordjournals.org/content/56/4/475},     doi = {10.1086/269338},     language = {en},     number = {4},     urldate = {2013-02-04},     journal = {Public Opinion Quarterly},     author = {Groves, Robert M. and Cialdini, Robert B. and Couper, Mick P.},     month = dec,     year = {1992},     pages = {475--495} }   I get error   I found no \citation commands---while reading file apatestv4.aux I found no \bibdata command---while reading file apatestv4.aux I found no \bibstyle command---while reading file apatestv4.aux   And and no references/bibliography.  If I change biber to bibtex \usepackage[backend=bibtex,style=apa]{biblatex} I get a whole series of errors, amongst which Package biblatex Error: Option 'sorting=apa' invalid \begin{document}.  I have limitted understanding so far on what biber and bibtex do. My references work when I \usepackage{bibtex} instead of biblatex.  Edit: Here is an image of the result after following the comment by @moewe


How to select (highlight) answers or questions text in superuser without using a mouse?

Recently I started learning to use keyboard shortcuts almost for everything I'm doing on the laptop (os win7) but soon enough after I started, I bumped into the problem of being unable to highlight (select) simple text in the Stack Exchange sites (where I stay almost all the time). I did some research and I couldn't find any solution to my problem. Have I missed an already answered question that is the same like mine or if not what solution can you suggest in order to achieve the results I want without touching mouse or touchpad or any cursor moving device?


Can I downgrade Catalina to El Capitan using a flash drive?

I downloaded Catalina but it broke critical applications on my computer, I need to restore it to El Capitan as it was before, can I do it safely with a bootable USB?  Thank you


Can I make a Ubuntu distro and distribute it?

Can I make my own Ubuntu distro and let people download it for free on my website


Dropping "acknowledgement section" in thesis

I've finished my Bachelor thesis, and it's been a fairly independent work since it was a very niche topic that I didn't really have anybody to talk with about other than my advisor. I also don't want to thank any friends or family for "support", it seems a bit silly and melodramatic.   Almost all of the theses that I have read have acknowledgement sections with several people being thanked. Is it a requirement? Should I include it, and just write a sentence or two about my advisor? Is there another appropiate way to thank just him without dedicating a section to it? Should I not thank him at all? Does anybody read this stuff, or is it just skipped? Will not acknowledging anyone give the reader a bad impression of me, in the sense that I am an arrogant jerk, or of my work, in the sense that since I am not thanking anybody, I must not have used all of the ressourcess or given it a lot of effort?


Questions about scaling in a 2d game in unity

Okay, so:  I am making an android game. I want everything to scale to the size of the screen I'm using. Further, my static background needs to scale (as well as every other object), but if the aspect ratio is less than the AR of the background image I want the image to be cut off at the edges.  Further, I have a game object I need to always be at the corner of the screen. I'm guessing I should use a script to determine the width of the screen and place it a few coordinates up and right of that on start?  The game is only in landscape mode if that matters. How do I go about this? I previously had the background as a plane with an image on it but it didn't take up the whole screen and I think it might not be the right thing to do? Maybe use a quad?  How do I test to make sure that this works? I only have my one android phone to test it on.


How to create an upstart process in Ubuntu?

I am trying to create a process to be automatically started and maintained by Ubuntu's upstart (Ubuntu 12.04). I have been looking at  as well as on  and I am aware of the  and . Using especially the information from the first two likes, I did the following to incorporate such a process. First, I created a file /etc/init/testservice.conf with the following content:   # myservice - myservice job file  description "my service description" author "Me <myself@i.com>"  # Stanzas # # Stanzas control when and how a process is started and stopped # See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn  # When to start the service start on runlevel [2345]  # When to stop the service stop on runlevel [016]  # Automatically restart process if crashed respawn  # Essentially lets upstart know the process will detach itself to the background #expect fork  chdir /home/user/testcode  # Start the process exec python mycommand.py   with some simple dummy python code mycommand.py residing in the directory /home/user/testcode. Checking with initctl list or ps I see that the command is not yet running. Therefore, I tried to start it 'manually' according to  with   start testservice   which produced the following output  start: Rejected send message, 1 matched rules; type="method_call", sender=":1.88" (uid=1000 pid=9103 comm="start testservice ) interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" estination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")   but did not start the process mycommand.py.   What am I doing wrong? How to tell ubuntu and/or upstart to run the command?


A conditional inequality which itself implies a sharper version of it

Problem: Given that $m, n$ are positive integers such that $\sqrt{7} -\frac{m}{n} > 0$. Then show that $\sqrt{7}-\frac{m}{n} > \frac{1}{mn}$.  I have failed to do this fascinating problem.  My efforts: I tried to approach by contradiction. Assume that we have $\sqrt{7} -\frac{m}{n} > 0$ and $\sqrt{7} -\frac{m}{n} > \frac{1}{mn}$ both hold simultaneously.  Now, $\sqrt{7} -\frac{m}{n} > \frac{1}{mn}$  implies $(m-\frac{n\sqrt{7}+\sqrt{7n^2-4}}{2})(m-\frac{n\sqrt{7}-\sqrt{7n^2-4}}{2}) >0$.  Since, $m \geq 1$ and $\frac{n\sqrt{7}-\sqrt{7n^2-4}}{2} < 1 $.  We end up with, $\frac{n\sqrt{7}+\sqrt{7n^2-4}}{2} < m < n\sqrt{7}$.  So, now I need to show that the last inequality cannot hold for positive integers $m, n$. But I am unable to do that.  So, someone please help me. Please..


Unable to post on meta after a certain number of downvotes

It seems after you reach a certain number of downvotes (at least on meta), you lose the ability to post. Why?   I also wonder if the algorithm is taking into consideration if the downvotes were spread among several posts or if a single post got many downvotes or if the reason is even considered. If this is a dummy automated algorithm, it needs to be revised.  UPDATE:  I also wanted to add that there needs to be a distinction between poor posts and posts (proposed ideas or complaints) which garner a lot of disagreements, hence downvotes. People here tend to downvote something they don't agree with, regardless of the quality of the post. Also some tend to follow the herd. The more a post gets downvotes, the stronger the temptation to downvote it even further by the next visitors.  Also note that meta has a 'discussion' tag. No not every answer or comment here is an answer. This differentiates meta from the rest of the SE sites.


Is it safe to delete the recovery partition?

I am trying to grow my C: drive to use the unallocated space on Disk 0. Is it safe to throw away the Recovery Partition (i.e. make it unallocated)? And if so, is GParted an ok tool to do that with? Or do I need to move that, and if so, is the way to do that to reduce the size of the unallocated partition so there is empty space at the end, then move it there?


Attempt to invoke virtual method 'void androidx.viewpager.widget.ViewPager.setAdapter(androidx.viewpager.widget.PagerAdapter)' on a null object reference  I'm trying to implement sliding tab layout using android material design. But it gives me NullPointerException. Here is my code so far:  public class HomeFragment extends Fragment {  private HomeViewModel homeViewModel; private List<Slide> listSlides; private ViewPager slidePager; private TabLayout indicator;    public View onCreateView(@NonNull LayoutInflater inflater,                          ViewGroup container, Bundle savedInstanceState) {      homeViewModel =             ViewModelProviders.of(this).get(HomeViewModel.class);     View root = inflater.inflate(R.layout.fragment_home, container, false);       listSlides = new ArrayList<>();      listSlides.add(new Slide(R.drawable.a, "slide title"));      listSlides.add(new Slide(R.drawable.b, "slide title"));       final SliderPagerAdapter adapter = new SliderPagerAdapter(getContext(), listSlides);       homeViewModel.getText().observe(this, new Observer<String>() {          @Override          public void onChanged(@Nullable String s) {              slidePager.setAdapter(adapter);          }      });        return root;  }   }  public class SliderPagerAdapter extends PagerAdapter {  private Context mText; private List<Slide> mList;  public SliderPagerAdapter(Context mText, List<Slide> mList) {     this.mText = mText;     this.mList = mList; }   @NonNull @Override public Object instantiateItem(@NonNull ViewGroup container, int position) {       LayoutInflater inflater = (LayoutInflater) mText.getSystemService(Context.LAYOUT_INFLATER_SERVICE);     View slideLayout = inflater.inflate(R.layout.slider_item,null);      ImageView slideImg = slideLayout.findViewById(R.id.slide_img);     TextView slideText= slideLayout.findViewById(R.id.slide_title);      slideImg.setImageResource(mList.get(position).getImage());     slideText.setText(mList.get(position).getTitle());      container.addView(slideLayout);     return slideLayout;   }  @Override public int getCount() {     return mList.size(); }  @Override public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {     return view == object; }  @Override public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {     container.removeView((View) object); }   }


Prove that the determinant of a swap matrix is $-1$

How can I prove that a swap matrix (a matrix which multiplied with another, swaps a pair of its rows/columns) has determinant $-1$?


What is the rationale for using -f in tar

From man tar:     -f, --file ARCHIVE   use archive file or device ARCHIVE   Please consider:  tar -zxvf myFile.tar.gz   As far as I understand, z means "gzipped tarball", x means "extract", v means "verbose output" but about f I am not sure.  If we already give the file name myFile.tar.gz, why is the f argument needed?


Are transitions between stationary orbits part of the Bohr model?

The first assumption of the Bohr atomic model states that the electrons can only orbit stably, without radiating, in certain orbits (called by Bohr the "stationary orbits") at a certain discrete set of distances from the nucleus. Electrons can only gain and lose energy by jumping from one allowed orbit to another.   Someone pointed out a conceptual problem with this assumption: "If an electron is in a stationary state, it would not collapse." By calling it a "stationary orbit", does Bohr mean the electron orbital will never increase or decrease in energy or radius?  In other words, does the Bohr model say that the electrons will forever stay in the same stationary orbits? Is this the reason why the Bohr model was determined to be incorrect?  Or, does the Bohr model say that an electron can jump from one orbit to another, and thereby gain and lose energy? If so, under what conditions?  This question differs from  because it asks about the Bohr model, not about the planetary model.


Python compiler adds 10^-16 in print function into the answer

when i try to add 1 to answer python adds 10^-16 to the answer tried printing in different ways but i think it will not help. Any answers ?  x = 0.8475 print(1 + x) print(1 + 0.8475) print(1.0 + 0.8475) y = 1 + x print(y)   output :  1.8475000000000001 1.8475000000000001 1.8475000000000001 1.8475000000000001


Can I ask please: Using ols in lm. I found "surprise", when x is vector (mean is 0) and y is vector of 1 1 1 ...or vector of 0 0 0...(constant) When "forcing" lm without intercept (y~x-1), i get model where residuals "dont oscilate around 1". When I did calculate coefficient manualy and its exactly same. Example in r: x=c(-0.0021,0.0042,0.0047,0.0083-0.0001,0.0010,0.0038,0.0034,0.0034,0.0066,0.0056,0.0043,0.0082-0.0129-0.0094,0.0048,0.0050-0.0133) y=rep(1,14)  m=lm(y~x-1) plot(m$fitted) plot(x*47.74)  (Can I ask, whats wrong when y="constant vector" in ols ? :-) Thanks alot


Step in the derivation of complex wave notation

I'm reading Hecht's Optics and I have a problem understanding a step in the derivation of the complex notation of waves  He writes that the wave equation for a harmonic wave can be written as $\Psi(x,t) = \operatorname{Re}(Ae^{i(\omega t -kx + \epsilon)})$ which is equal to $\Psi(x,t) = A \cos(\omega t -kx + \epsilon)$. And that step I understand.  However, next he writes that because of this the wave equation can be written as $\Psi(x,t) = Ae^{i(\omega t -kx + \epsilon)}$. And that step I don't understand. Why does he write that $\operatorname{Re}(Ae^{i(\omega t -kx + \epsilon)}) = Ae^{i(\omega t -kx + \epsilon)} $?   Edit: See my reason for believing that this is not a duplicate in the comments below


Can't boot into Windows after installing Ubuntu, how to fix it?

I installed Windows 10 on my computer, followed by an installation of Ubuntu 20.04.1. However, now I'm unable to boot into my Windows 10 even though it appeared on grub menu. When I selected windows 10 on grub menu, it just shows black screen for a few second and then returned to grub menu.  What can I do to fix this?


I would like to delete many of the automatically included apps from my Windows 10 laptop.  I do not know what a powershell prompt is, or how to get to it.


Double forward slash in url, help in SEO?

I'm having a SEO optimised 7 year old website which rank no. 1 on google for different keywords.  Pages are www.example.com/page1.php , www.example.com/page2.php .  A competitor copied whole website and with few added pages uploaded a website on a very old domain like this;  www.xyz.com/somepages.html  and www.xyz.com//page1.html www.xyz.com//page2.html  He is not using any title and related tags just copied content exactly with same images and all, means only layout is different, otherwise its exactly same website.  Now does I need to let google know this is my content etc? Does it effects my ranking as today i'm on no. 1 and he is on 15th.  Most important question is why he is using two forward slash and .html extension? .html i can understand that someone may think that .html is more beneficial than .php for seo but why //?  Any qlue?


I have a single method which is really comprehensive. Within this method couple of other methods are called and each method depends on the previous one.   My question is: What is the best approach to test this complex method using JUnit?  Can I just create one single @Test Method and calling the other methods within this method? For example:  @Test public void testRun(){     testMethod1();     testMethod2();     ... }  testMethod1(){ assertNotEquals(); ... }   I can´t believe that it is that easy. Wouldn´t it be better to test each method on their own? But how can I implement that? Are their any best practises?  But maybe this is the right way.  Thanks for any suggestions !:)


What is the reasoning behind giving me 100 rep on my main SE account as part of the association bonus?

First off, I understand .  Today I ran across this for the first time when I signed up on the musicians' SE site. I was confused as to why I got all this free rep. After looking into it, I see that there is a good rationale behind starting you off right on a new site, as explained by this paragraph:     If you are an experienced Stack Exchange network user with 200 or more reputation on at least one site, you will receive a starting +100 reputation bonus to get you past basic new user restrictions. This will happen automatically on all current Stack Exchange sites where you have an account, and on any other Stack Exchange sites at the time you log in.   That's very clear. It explains how it works. I'm not asking "how" it works, but why. I have read  as well as several others, and they only explain what it is, and that it is by design. My issue is exactly the same as described in , but again, I understand why it happened--it is by design--I just don't understand why it is by design.  Why do I receive this rep bonus on my first SE account?   It makes sense I should get the bonus on a new account, as it says above, to get past some new user restrictions. But if I already have 200 rep on another site (this is the reason I'm getting it on the new site), why give me 100 rep on the old one as well?


how to convert android APK file to JAR file and run it on pc with java runtime?

Here is the deal, I have a Apk file, just can run on android phone. Now I take the Apk I want,  decompile it or do something can change Apk file to Jar file. Jar file will be a java execution, can run on pc with java software. Are people understand? So, how to do it? Is it possible?


There is a way to use my Galaxy tab s like a wacom table, on linux?

I read some articles, and seen some videos about a github project that do a sort of thing, but it's a little bit outdated things.I wanna see if this thing is possible to do, nowadays. Thanks


In Minecraft PE, is it possible to get on a server created for PC or can I only connect to PE servers?

Using Minecraft PE, can I play on servers from PC like Mineverse or can I only play on Minecraft PE servers?


Is there a Linux file manager with a proper drop-down tree view? (like finder in OS X)

As a happy Linux user for almost a year now, this is the bane of my existence. Does the Linux community hate tree views for some obscure reason?  I don't mean a tree view in the side panel. That's useless. I mean a proper tree view, such that, when I click the triangle, all files and subdirectories contained within the directory show beneath, and I can drag and drop files, open and close trees.   It is extremely frustrating to navigate and move files around deeply nested directories without this feature.  I've tried: Nautilus, PCManFM, emelFM2, Krusader. I find it hard to believe that even crazilly-full-featured file managers like Krusader would be missing this most obvious of features... and yet, here I am.  For all the effort put into those file managers, is this so far-fetched to ask for?    I just need a simple, single-pane file manager with a tree view option. Help!   And -- please -- HOW IS THIS FUNCTION INVOKED ??  (Do I left/right click while pressing control/alt/shift? Is some setting required?)


Poisson regression - is offset term required?

I am modeling rates of people given drug $X$ or drug $Y$, working out probability of getting drug.  The drug $X$ and drug $Y$ points have been matched on exposure time (person years) to specific drug.   In this case, is there a need to include an offset term or should it now be treated as count data?


Sharing files between a windows 10 and ubuntu PCs

I've got Ubuntu 18.4 and windows 10.   I'm trying to share a folder on a second HDD in my Linux machine. I've successfully shared folders and files from my main HDD with no issues but as soon as I try to share anything from my second HDD windows either doesn't detect anything or asks me for the username and password ( which I've followed some tutorials on how to set those in terminal).  I'd like to refrain from using my main HDD for data storage if possible. Tips on what extra steps may be needed to get the second HDD to share would be appreciated.  ****Edit**** I've tried both solutions and both solutions have only worked for a short time. After watching one of my movies the second wouldn't play ( no restart on either PC). I'm not sure what to do as following the steps each time doesn't seem to work a second time. This has become very frustrating...  -Cheers


Provide indicator that another user is editing a post

Sometimes (eg. ) more than one user will simultaneously attempt to edit a post, particularly to fix poor formatting by the OP. It looks like in that case, I finished 30 seconds sooner than @marcog, but I don't know who might have clicked "edit" first.  Anyway, a useful usability enhancement would be to keep track of who is (or might be) editing a post at any given time. With this enhancement, the second user to click "edit" might see something like:     The following users may currently be editing this post:         marcog (21 seconds ago)      If a message like that were available, I would immediately choose not to edit at that time, and maybe come back later if the formatting still needed fixing. This saves effort, frustration, and duplicate "hey I fixed your formatting" comments.  It is important to note that this feature would not attempt to prevent multiple editors, everything else would work just the same as it does now.  Implementation idea  This feature could be implemented by adding a new table, say "editors", with the columns (post_id, edit_start, user_id). When a user clicks "edit" on a post:   Check the editors table for old entries for this post, say > 5 minutes. Delete them. If there are any current editors, show the list as above. Insert a row for the current post and the current user with the current time.   When a user submits changes to a post:   Delete the user's record from the editors table for that post.   Periodically:   Scrub old entries from this table (if a user clicked "edit" but never submitted a change for that post).   Optionally:   Provide a "Cancel" button on the edit page. Cancelling would remove the current user's record for the current post, but obviously not submit any changes.     Update: After saying in the comments that I've never seen the edit notification, I actually did just get it today editing . However, it showed the orange bar at the top (1 other users edited!) for a brief time just after I pressed "Save". What good is that?


How an interface or class method returns object to Interface?

In JDBC getConnection is a static method which returns object of Connection Interface? The getConnection method is defined in DriverManager class as a blank body as follows:  @CallerSensitive public static Connection getConnection(String url, String user, String password) throws SQLException {     // compiled code }   I am not getting how it is working? What happens when we return an object to interface? How Connection interface using this object?  How it is using this object for statment in the below line:  Statement s= c.createStatement();   Again how things are working internally in above line?  I want a deeper explanation basically how interface and classes work together to things like this. I know what an interface is, how it is implemented by the classes. It is used to support multiple inheritance and to provide security. But how are these concepts related in this example?


How can any speed be defined as a constant?

We know that the speed of light is a constant, and can therefore be used to calculate many other relative values, but I'm having difficulty understanding how speed can be a constant, seeing as it's dependent on other variables.  For example, take a universe in which there is nothing other than Earth and the Sun. No other stars, galaxies, planets. In this example, when a rocket leaves Earth and heads towards the Sun, its speed is measurable, according to its varying distance from the Earth and the Sun.  Now delete the Sun from the image. The rocket hasn't changed; it's still heading away from the Earth at the same speed. But what if the Earth itself now starts moving? Now the distance is still changing, but how the individual speeds be calculated?  Now delete the Earth, and we have only a moving rocket in the entire universe. How can its speed be calculated? How do we even know it's still moving? Does the concept of 'speed' still exist?  My question is: If speed is not an entity in itself, but only dependent on other constant factors, how can the speed of anything (let alone light) be a constant? Am I completely missing something here?  Excuse the lack of scientific terms; I'm not a scientist; rather a software developer with an interest in relativity and quantum physics.  Edit: The question is not "Is it possible to have a constant of speed?", in which case it would be possible to answer with, "Yes, and the proof is that there is a constant of speed, here's how to prove it...", which is what most of the answers seem to be doing.  The question is rather "How can there be a constant of speed?" - emphasis on the 'constant' - in which case saying "Here's the proof that there is one" is not an answer. I know there is one, otherwise I wouldn't be asking the question...


The lights themselves are not visible, but they are visible in reflective materials such as mirrors. how to fix this?


Watergate and Marathon -- Any other invalid, but common back formations?

I was reading a question here about the use of the suffix -gate to denote a political, and later any type, of scandal. This is of course and allusion to the Watergate scandal, which lead to the resignation of President Nixon.  Another example came to mind, that of Marathon, which is the name of a long race, and is named after the battle of Marathon, and more specifically Pheidippides run back to Athens to announce victory (and then die, this secondary aspect being thankfully absent in the Olympic event.) From this the -thon suffix is used to denote any long endurance event, phone-athon, bake-athon, jump-athon etc.  I was wondering if there were any other such false back formations that have come into common use in the same way. Is there a specific name for this practice in grammar?


Keeping lines repeated a set number of times

I have a file with multiple columns and have identified lines where values in column 3 have been duplicated.  Example Input:  A B C 1 2 APPLE 3 4 PEAR 9 3 LEMON 8 3 ORANGE 8 2 APPLE 3 4 APPLE 9 3 LEMON 8 3 PEAR   I can count how often the word in Column 3 has been repeated using:  awk '{print $3}' [input filename] | sort | uniq -c > [output filename]   Output:  3 APPLE 2 PEAR 2 LEMON 1 ORANGE   What I would like to do is keep lines that are repeated 3 times:  Desired Output:  APPLE   or  1 2 APPLE 8 2 APPLE 3 4 APPLE   I don't mind if all of the columns are printed from the original input file or just the 3rd column value.  Using sort -u prints out any line that has appeared at least once which is not what I'm after.


How to connect several "IF" formulas together?

I have got 5 fields each filled by a CASE formula related to the same picklist field; unfortunately the formula was to Long to have it in one field!  Only one of the 5 fields could have a value, the other four are empty.  Now I want to match These five fields together to on field using several IF formulas:  IF( Class_part1__c  <> "",  Class_part1__c ,   IF( Class_part2__c  <> "",  Class_part2__c ,   IF( Class_part3__c  <> "",  Class_part3__c ,   IF( Class_part4__c  <> "",  Class_part4__c ,   IF( Class_part5__c  <> "",  Class_part5__c ,  "" )))))   The Syntax Check says:      "Error: Compiled formula is too big to execute (64.960 characters).   Maximum size is 5.000 characters"   But when I count myself, I only used 236 characters What did I wrong ?  Is there an alternative to solve this?


Comma needed when applying these 3 adjectives to a noun being introduced?

Copyediting this sentence:     Create a new, integrated and dynamic platform   I'm unsure if the comma after "new" is needed or not, or if one should go between "integrated and dynamic".  Is the quoted statement correct grammatically, or if not how should it be changed to correct its grammar?


Does $\int_{1}^{\infty} g(x)\ dx$ imply $\lim\limits_{x\to \infty}g(x)=0$?

Let $g:[1, \infty)\rightarrow \mathbb R$ a continuous non-negative function, such that $\int_{1}^{\infty} g(x)\ dx$ converges. Is it true that $\lim\limits_{x\to \infty}g(x)=0$ ?   I tried to find a counter-example but I can't figure a trivial one. I also tried to prove it by the definition of the convergence of $g(x)$ but couldn't show that limit is really $0$.


Would be glad if someone helps me do this. I'm trying to convert a raster .tif file to a .shp file for some analysis. I'm using a 1.5GB data file and have installed GDAL using Conda. But if I run the code it says the following error:      RuntimeError: This is a BigTIFF file.  BigTIFF is not supported by   this version of GDAL and libtiff.   What should I do to solve this error? Please explain as I'm totally new to Python environment!  import os from osgeo import gdal, ogr import sys # this allows GDAL to throw Python Exceptions gdal.UseExceptions()  #  get raster datasource  src_ds = gdal.Open("IND_ppp_2015_v2.tif") print (src_ds)


Assign AWS public IP address to interface

An ec2 instance from a RHEL ami (i havent checked any other) only has the private address assigned to it.  i.e. ip addr yields:  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo     inet6 ::1/128 scope host      valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000     link/ether 02:6d:c3:86:ce:e0 brd ff:ff:ff:ff:ff:ff     inet 172.39.16.198/20 brd 172.39.31.255 scope global eth0     inet6 fe80::6d:c2ff:fe86:cee0/64 scope link      valid_lft forever preferred_lft forever   the public IP is working and the machine can be reached through it. It can can access the internet via the VPC's gateway.  But how do I make sure the interface has the public IP, so outgoing packages actually contain the correct IP? This is necessary for ipsec to work properly.


How can I draw arrows between words in linguistic examples?

This is what I'm after: I'd like to have the sentence 'John loves his mother.' displayed with an arrow running from 'his' to 'John'. I looked at gb4e, but I found the documentation confusing and I haven't been able to make it work.


Distribution of a logit transform of a normal variable

If I have a normal distribution with a given mean and variance and apply a logistic transform to it, what is the mean and variance of my transformed variable?   This seems like it has to be a well known problem, but I haven't been able to find a quick reference anywhere.


How do I get rid of the password promting in the Terminal?

I am new to Ubuntu and I have a looot of issues :))! I saw that many things can be solved by typing commands in that window, terminal, which is kinda new to me( I am Windows 7 user, not a developer).   Moving to the point, whenever I try to type commands in the Terminal, it is prompting me to type the password. Firstly: which password, since I deactivated typing the password at logon. Maybe it's the same :-?... Secondly, I can't get to type it all, because it tells me: "Sorry, try again." And the 3 password attempts thing.   So, I googled it a little and I found that it's a TextExpander problem. What is that, and how can it be solved? I going crazy, since I can't enter a single command without that annoying password prompt.  Thanks a lot guys, and wait for me, I'm gonna ask a lot of questions, since I found this site is made especially for this! ;))


arraylist.size() java null pointer exception

I have read other answers to try to find the solution but nothing clearly explains the issue.   Why should the following code block create a null pointer exception for currArraySize?      int biggestArraySize = 0;    int currArraySize = 0;     for(int i = 0 ; i < myMap.keySet().size(); i++){         ArrayList<String> currList = new ArrayList<String>();        currList =  myMap.get(i);        currArraySize = currList.size();         if(currArraySize > biggestArraySize){          biggestArraySize = currArraySize;          }      }       System.out.println(biggestArraySize);


Finding value of $\displaystyle \frac{e^n\cdot n!}{n^n\sqrt{n}}$   Try: Using Stirling Approximation result $$n!\approx\bigg(\frac{n}{e}\bigg)^n\sqrt{2\pi n}$$  So $$\lim_{n\rightarrow \infty }\frac{e^n\cdot n!}{n^n\sqrt{n}}=\sqrt{2\pi}$$  Could anyone explain me How can i prove that result, Thanks


Mail opens a window randomly in split screen with my fullscreen window

I haven't been interacting with Mail for half an hour, but suddenly it opens its main window in split screen with the fullscreen video player that I'm watching. This happens every other day.  I can't really say if this only happens when Mail is running, since it's hard to check that after the fact. Assuming it only happens when Mail is running, can something be done other than making the habit of always quitting Mail as soon as possible? Is there some hidden feature triggering this?


Continuous variable for logistic regression

I'm new in machine learning and have a question regarding a continuous variable which I want to use in my logistic regression.   On the first view the variable seems to increase the probability of the event (to be true) when it recedes from 0 in both direction. In other words: when the variable approximates 0, the probability for the event to be true decreases. Now to my question: how can I model this in my logistic regression? Should I use a dummy variable or is there a way to transform the variable? Is there a test with which I can prove this behaviour?


"SSL Protocol Error" in Chromium for several Google web sites after installing Ubuntu Security Updates for libnss3

Scenario: Laptop computer running  Issue: In the Chromium web browser - "Version 37.0.2062.120 Ubuntu 12.04 (281580) (64-bit)" - after having installed the Ubuntu security Updates that were available on Feb 18, 2016, I get the following error while trying to access some Google Web sites (e.g.  ;  ;  ):  SSL connection error Unable to make a secure connection to the server. This may be a problem  with the server, or it may be requiring a client authentication certificate that you don't have. Error code: ERR_SSL_PROTOCOL_ERROR  Those web sites still appear correctly in the same computer, using other web browsers, namely Google Chrome - "Version 48.0.2564.109 (64-bit)" - or Mozilla Firefox - version "44.0.2" The updates installed on Feb 18, 2016 were the following:  libnss3:amd64 (3.19.2.1-0ubuntu0.12.04.2, 3.21-0ubuntu0.12.04.1) libnss3:i386 (3.19.2.1-0ubuntu0.12.04.2, 3.21-0ubuntu0.12.04.1) libnss3-1d:amd64 (3.19.2.1-0ubuntu0.12.04.2, 3.21-0ubuntu0.12.04.1)  "libnss3" is listed at  as being the "Network Security Service libraries", so I believe it's possible that update may be related to this issue that I'm facing. Does anyone have any information about this issue and/or tips for doing additional troubleshooting?


I had two versions of skype installed: one from Skype (package skypeforlinux) and one using snap package in Ubuntu 18.04 Gnome. I removed the snap version but an empty icon in the launcher remains. /usr/share/applications/ contains only skypeforlinux.desktop. ~/.local/share/applications/ is empty. How can I get rid of the empty icon?


How do Stack Overflow questions appear in Google search results in seconds?

Possible Duplicate:          I have noticed that when I ask a question on Stack Overflow and I go into Google and search for the question, it comes up in Google in just a minute or so.  How do they do this? I want the secret!  I am a web developer and I know about most things that you can do for SEO, but I have no idea how these questions appear in Google this quickly!  I think it's amazing!


What is this colored fiber in my chicken?

I smoked a whole chicken. When I cut into the breast I found this:    What is it and is my chicken ruined?


Do other people's mass count when measuring the attraction of the earth on me?

Suppose that I'm alone on a planet of $M$. From what I learned from school, the gravitation force acting on me   $$F=G\frac{mM}{r^2},$$  where $m$ is my mass, $r$ is the distance between me and the planet and $G = 6.67 \cdot 10 ^{-11}$. Suppose that my dog, of mass $\tilde m$, comes to live with me on this planet. Now, is the gravitation force acting on me still $F$ or is it $$\tilde F=G\frac{m(M+\tilde m)}{r^2}~? $$


sed -i - edit files in place does not work in compound commandq

having this command:  $ find / -path /home/oldroot -prune -o -name config.yml -exec sed -i'' '/(swipe)|(pinch)/s/[0-9].*/1/' {} \+   won't edit:  couldn't open temporary file /home/shepherd/.config/fusuma/sedSQVSZd: Permission denied   You can say, it does not work because of sudo. But it does not even work with sudo, the point is the -i flag here. find found file /fusuma/config.yml, but -i change it into /fusuma/sedSQVSZd as sideeffect of in-place edditing. So is there a way to persist filenames with sed?


I'm a native speaker, but I'm a bit of a language lover and I'm afraid some other grammatical structures have encroached on my use of English. Another native English speaker looked at me funny the other day while we were talking about a document when I asked her to "send it me".  If I were speaking German, I could say      Schicken Sie es mir   or     Schicken Sie es nach mir   Basically, the preposition is optional because the inflection and position imply its relationship. Can I do the same thing in English? It wouldn't be inflection in this case, but can position imply the relationship such that the preposition isn't necessary?  I've said it out loud a lot of times in my head, but it sounds natural to me.


Can't boot Ubuntu 16.04 after latest update


Show $\operatorname{Aut}(C_2 \times C_2)$ is isomorphic to $S_3=D_6$

Show $\operatorname{Aut}(C_2 \times C_2)$ is isomorphic to $D_6$ (the group with $x^3=1$, $y^2=1$ and $xy=yx^2$).  I'm not really sure how to express the elements of $\operatorname{Aut}(C_2 \times C_2)$. Would it be sufficient to show the elements of $\operatorname{Aut}(C_2 \times C_2)$, find their order and show they bijectively map to every element of $D_6$ and satisfy $xy=yx^2$?


Increase length of y axis in python matplotlib

I have obtained this image via matplotlib library.  Now I just want to increase y axis length to get a clearer view.  Code is given below:  plt.figure(1) plt.subplot(211) plt.plot_date(df['Condition'],df['Date'], tz=None, xdate=True, ydate=False) plt.title('Scatter plot') plt.xlabel('Condition') plt.ylabel('Date') plt.show()


How can I display a VNC Viewer in a Java rich client (LGPL, Apache, MIT license)?

I'm looking for a way to display a VNC viewer in a thick/rich java client (specifically, I'm using SWT, but if I can get it into AWT/Swing, I can integrate that specifically.)  This is not an applet, but a real, live, thick java client.   is probably sufficient; however, its GPL license is too restrictive for my needs.  Is anyone aware of a Java VNC library available under a less restrictive license?


Build an Array of items depending of column

I have a query like this:  SELECT      MCU.UserName     ,MCU.McUserId AS UserId     ,O.OrderId     ,PD.ProductId     ,O.ShippingId     ,PD.[Name] AS ProductName     ,O.OrderDate     ,O.Total     ,O.Subtotal     ,O.PaymentStatus     ,O.OrderNumber     ,O.[Type]     ,O.CreatedBy     ,O.ModifiedBy      FROM SecurityMc.McUsers AS MCU      INNER JOIN Store.[Order] AS O ON  MCU.McUserId = O.UserId      INNER JOIN Store.OrderItem AS OI ON O.OrderId = OI.OrderId      INNER JOIN Customer.Shipping AS CS ON O.ShippingId = CS.ShippingId      INNER JOIN Product.ProductDetail AS PD ON OI.ProductId = PD.ProductId      WHERE  O.[Type] = 'Order' AND O.IsDeleted = 0 AND 1 = LanguageId    It returns data like:  +--------+---------+-----------+-------------+ | UserId | OrderId | ProductId | ProductName | +--------+---------+-----------+-------------+ |      1 |       3 |         1 | Dress       | |      1 |       3 |         2 | Boots       | |      1 |       3 |         3 | Socks       | |      1 |       3 |         4 | Extension   | +--------+---------+-----------+-------------+   As you can see it returns one ProductName for each row, but I want to send it in just one array, as you can see it have same OrderId and UserId, its possible to concat ProductName if OrderId is the same and get something  like:  ProductName(1 column): Dress,Boots,Socks,Extension  How can I achieve it? Regards


I am using the aps revtex4-1 layout. For eight times, I included a figure through \begin(figure)[h] and they all were properly positioned. Although I followed the same procedure for Fig. 9, the figure gets placed under section "Analysis of Circular Polarization", even though I have clearly declared it before the declaration of the section. Any help in trying to remedy this issue would be appreciated.


How to resolve ArcGIS for Desktop Error (SDE has lost its connection with underlying DBMS[ORA-03114:not connected ORACLE])?

How to resolve this issue when user leaves the system idle for one hour and again trying to connect Database, It encounters the Connection error message and then user should close the ArcGIS and restart it again. Is there any temporary solution to make the DBMS connection active for one user if needed to stay more than one hour idle and work again? Thanks


Why does this java string comparison prints false?

I am beginning to learn Java,so please pardon if the question seems silly, I was going through some online examples.  I found a String question, should not the output be true ?  As I am comparing two strings which are equal.  public class HelloWorld{       public static void main(String []args)      {       String morning2 = new String("Morning");       System.out.println("Morning" == morning2);      } }   Similarly for this program, should not this print True  public class HelloWorld{       public static void main(String []args)      {         String str1 = new String("Paul");         String str2 = new String("Paul");         System.out.println(str1 == str2);      } }   But for this program, it prints true.  public class HelloWorld{       public static void main(String []args)      {         String str3 = "Harry";         String str4 = "Harry";         System.out.println(str3 == str4);      } }   Can anyone explain why is there difference in output ?  I have seen this question and answer  but It does not really fit the explanation.


After applying product to sum formulae, I got this far $$\frac{\Bigl(1+2\cos(20)\Bigr)\Bigl(\cos(140)+\cos(20)\Bigr)}{8}=\frac{1}{16}.$$ How can I proceed further?


Is it possible to draw thick curve between (2,2) (4,3). Remaining portion must be thin.  \documentclass{article} \usepackage{tikz}  \begin{document} \begin{tikzpicture} \draw [blue] plot [smooth] coordinates {(0,0) (2,2) (4,3) (5,5) (0,10)}; \end{tikzpicture} \end{document}


How to install snap packages behind web proxy on Ubuntu 16.04

I know how to configure APT to use a web proxy. But what about snap?


For imbalanced classification, should the validation dataset be balanced?

I am building a binary classification model for imbalanced data (e.g., 90% Pos class vs 10% Neg Class).  I already balanced my training dataset to reflect a a 50/50 class split, while my holdout (training dataset) was kept similar to the original data distribution (i.e., 90% vs 10%).  My question is regarding the validation data used during the CV hyperparameter process. During each iteration fold should:  1) Both the training and test folds be balanced  or  2) The training fold should be kept balanced while the validation fold should be made imbalanced to reflect the original data distribution and holdout dataset.  I am currently using the 1st option to tune my model; however, is this approach valid given that the holdout and validation datasets have different distributions?


I am opening Word from within a Console Application. How can I ensure the Console remains the active window, even after I have shown the Word Application?  using System; using Microsoft.Office.Interop.Word;  namespace WordDocumentObject {     class Program {         static void Main(string[] args) {             _Application app = new Application();             app.Visible = true;              //Activate the console window here              Console.WriteLine("Press any key to continue...");             Console.ReadKey(true);         }     } }


Does notepad++ have the quick scroll pane that Sublime Text have?

() has the following feature that I use it all the time:    I would like to know if  () have this feature. I call this feature 'Quick Scroll Pane' as I do not know the exact name for it.


I'm getting nullpointerException. Please help me in resolving this issue

Here is the error Caused by: java.lang.NullPointerException     at be.bpost.viv.service.impl.UD10ReportGeneratorServiceBean.enterData(UD10ReportGeneratorServiceBean.java:187) [viv-batch-ejb.jar:]     at be.bpost.viv.service.impl.UD10ReportGeneratorServiceBean.createWorkBook(UD10ReportGeneratorServiceBean.java:96) [viv-batch-ejb.jar:]     at be.bpost.viv.service.impl.UD10ReportGeneratorServiceBean.generate(UD10ReportGeneratorServiceBean.java:78) [viv-batch-ejb.jar:]     at be.bpost.viv.service.impl.UD10ReportGeneratorServiceBean.generateUpdateReport(UD10ReportGeneratorServiceBean.java:72) [viv-batch-ejb.jar:]  This is the line where I have error row.getCell(UD10ReportColumns.REGISTER_MAIL_BALANCE.index()).setCellValue(line.getRegisterMailBalance() == null ? 0 : line.getRegisterMailBalance());   private Integer          registerMailBalance = 0;


UK Business (Creative - 06 months) Super Priority Visa Refusal

I applied for a business (creative) entertainer visitor Visa because I am an octopad player, performing for 10 years in India. A London sponsor invited me to perform with my musical group in the Indian cultural festival of Navratri, Diwali and Gujarati New Year. The duration of the tour is 37 days.  I requested Super Priority visa service and was refused, for reasons I think are wrong. I attached all the sponsor documents with details of all expenses it will pay, their bank statements, charity registration certificate, and the events details.  I also attached my bank savings and current account statements, and my mother's pension and salary account statements. The refusal reasons are not correct:   Currency is not indicated: when we complete the online form in Gujarati language, it shows all the amounts in GBP. Is it compulsory to write it again? Super Priority visa applied for just 6 days before date of travel: Is it necessory to say why? It takes 5 or more working days which will create problem for me as well as the sponsors making plans for performances; it's a society with 400 persons who daily gather to celebrate the festival, Mention that NAPS will pay all the expenses and failure to submit evidence: this is totally wrong because I have attached sponsorship letter, agreement letter, and covering letter to the Embassy visa officer, the Society bank statements which has a good amount. I also got an invitation from Edinburgh Gujarati Society with a reference by Consul General Of India on their letterhead; they are agree to provide food and accommodation at their place, and London to London transportation.    Still, the visa officer informed me that I failed to submit documents, and asks why the Society would pay me because I am the chairman of an air academy. However, I also attached my biography about my business and that I am an octopad player and owner of this musical group. We perform on government contracts as well as private events. I attached many photographs of performances, YouTube links, international travelling photographs, original notaried work order of musical performance by the government of Gujarat etc. Still, it mentioned that my role in this trip is unclear.   Visa officer mentions a bank statement of my mother's pension account in which amount is very low, but I already stated that NAPS will provide all the expenses, including round trip air fare, visa fee, local hospitality in the UK etc. Why is the visa officer taking into account the applicant's bank statement?    If the visa officer is taking it into account, they didn't look at all the documents, because I attached my personal savings and current bank account statements, with a total of around 29Lakh Inr (19Lakh saving + 9 Lakh current). Is this not perfect?   We are getting everything from the sponsors in the UK. Why are they looking at whether that amount is sufficient or not? I have attached my mother's bank statement for support (her salary and pension account statement) which we are not using for any home expenses. I am earning so we do not require my mother's account. All the home expenses are paid by me; we are only 3 members in my family (me, my wife and my mother). I lost my father when I was 2 years old. My wife helps me in my business, so no need to take any money from mother's account; this is joint a family.  I need urgent help because 19 Sept 2017 is the travel date. What do I do now? Can I apply again? It is showing NRA in the refusal letter and mentions that it is not eligible for appeal or administrative review. I also applied online for administrative review on the same day of the refusal. All the documents are as were gotten from VHS Mumbai because it can verify if they want to confirm anything about the documents. I have cut a small part of the pouch and removed only the passport; there was no stamp so I was confused and saw a letter. So I removed the letter.


Create Yosemite install disk on a Windows machine

I have a 2009 Mac with a new blank SSD. I have a Snow Leopard install disk but it doesn't work (it was a replacement installer disk and has never worked), so I don't have a working OS X install.  I do have a Windows 7 machine.  How should I go about installing Yosemite? All instructions I can find require OS X at some point in the process. I can't even download it from the store unless I'm on a mac.


Must the int main() function return a value in all compilers?

Why is it not necessary to include the return statement while using int main() in some compilers for C++? What about Turbo C++?


Getting records where column value equals an aggregate value of that column

I have a table with several columns such as "pcode", "completion in %" and "pstatus". For example:   pcode P_Name     completion  subordinate         pstatus p123  inventory     10%         sanjay           progrssing   p123  test          20%         komal            progrssing p124  asd           20%         ritika           progrssing p124  qwsdf         10%         asd              progrssing   I want to get result with different code with highest complete% with other column. All field are text. I'm using asp.net using c# and msaccess database.  What I'm looking for as a result is:    pcode P_Name     completion  subordinate         pstatus   p123  test          20%         komal           progrssing   p124  asd           20%         ritika          progrssing


How do I resolve this error when installing the Forge source?

I try to install the forge source (build number 953) but when I run install.cmd it shows this error:  ================ Forge ModLoader Setup Start =================== MCP Detected already, not downloading Setting up MCP Patching commands.py patching file commands.py     Commands patch applied successfully Copying FML conf Creating Repackaged data     Creating re-packaged srg     Creating re-packaged exc     Creating re-packaged MCP patches Traceback (most recent call last):   File "install.py", line 76, in <module>     decompile=options.decompile, gen_conf=False)   File "install.py", line 17, in fml_main     disable_assets=disable_assets)   File "D:\MCP\fml\fml.py", line 1013, in decompile_minecraft     pre_decompile(mcp_dir, fml_dir, disable_assets=disable_assets)   File "D:\MCP\fml\fml.py", line 1061, in pre_decompile     download_minecraft(mcp_dir, fml_dir)   File "D:\MCP\fml\fml.py", line 1125, in download_minecraft     failed = download_libraries(mcp_dir, version_json['libraries'], mc_info['natives_dir']) or failed   File "D:\MCP\fml\fml.py", line 1181, in download_libraries     headers = get_headers(url)   File "D:\MCP\fml\fml.py", line 173, in get_headers     response = urllib2.urlopen(HeadRequest(url))   File "urllib2.pyc", line 126, in urlopen   File "urllib2.pyc", line 406, in open   File "urllib2.pyc", line 519, in http_response   File "urllib2.pyc", line 444, in error   File "urllib2.pyc", line 378, in _call_chain   File "urllib2.pyc", line 527, in http_error_default urllib2.HTTPError: HTTP Error 403: Forbidden Press any key to continue . . .   Any ideas?


Why does my "delete oldest files if more than x in directory" shell script not work?

Im truly sorry for this horrible title, it's the best I could phrase it.  So I have a backup scripts that creates backup tars of some server data and stores it in /server/backups, however I only need backups of the last week, therefore I created this script to run as a weekly task and clean up my backups folder:  #!/bin/bash #initializing a with the amount of backup archives and b with the target max a=find /server/backups/ -type f | wc -l b=14  #if there are more backup files than target max #delete the oldest files if [ $a > $b ] then     ls -1t /server/backups/ | tail -n +15 | xargs rm -f fi     but it doesn't work. Im very new to linux and i dont know how to "debug" this.


Update qjackctl from 0.5.0 on Ubuntu Studio

I'm just taking my first steps with Linux. I noticed the version of qjackctk installed in Ubuntu Studio 20.10.   Version of KDE Plasma: 5.19.5   Version of KDE Frameworks: 5.74.0   Version of Qt: 5.14.2   Version of kernel: 5.8.0-33-lowlatency   OS architecture: 64-bit   Processor: 4 × Intel Core i3-2330M CPU @ 2.20GHz   RAM: 3.8 GB It's the 0.5.0 and I'm not able to update it with a recent version. On the qjackctl  I see 0.9.0 at the moment) doing sudo apt-get upgrade qjackctl. I then downloaded the qjackctl-0.9.0-44.x86_64.AppImage, and it runs in my system, but the existing version 0.5.0 is still present and used as 'default jack control' from the other software (like Ardour).


Does a 27 hp engine output the same amount of energy as lifting a 1 ton stoneblock almost 3 meters per second?

I'm trying to get a sense of how much energy a $27$ horsepower engine outputs.  $$27\ \mathrm{hp} = 20133\ \mathrm{W}$$  Potential energy can be calculated as  $$E = mgh$$  where $g \approx9.8\ \mathrm{m\ s^{-2}}$ on earth.  $$\frac{20133\ \mathrm{W}}{9.8\ \mathrm{m\ s}^{-2}} \approx 3000\ \mathrm{kg\ s^{-1}}$$  So for example if you use a $27\ \mathrm{hp}$ engine to pump hydraulic fluid. Would it output as much fluid as a $3000\ \mathrm{kg}$ stone block pushing down a piston at $1\ \mathrm{m\ s^{-1}}$?


General Relativity predicts that a clock at rest in a gravitational field will run slower than a clock in free fall.  Similarly, will a vertical ruler on the earth's surface be shorter than a ruler in free fall?  Why or why not and by how much?


Using an if statement to see if files are in a folder using a wildcard

I have to process multiple files that I dont have the entire name for.  I am running an if statement using a wildcard. for example...  if [ "ESGSN_*.SMS.EDR" ]; then     echo "There are files to process in this run"     for F in ESGSN_*.SMS.EDR; do         gzip < "$F" > "$F.gz"     done fi   If there are multiple files or a single file this will work and zip them.  But if there are no files it will still run the zip rather than just end.  I was wondering if there is any way to get it to complete and move on.    I have tried using the operators "-f" and "-a" within the brackets just before the filename, but those will error out with:  "binary operator expected"  for some reason the asterisk in the filename is not showing down below in the message.  So the file name is  "ESGSN_"*".SMS.EDR" where the double quotes is the asterisk.


I've been trying to solve cubic equations, but I don't know if there is a general approach that always works. Is there a specific method for solving cubics that doesn't involve the cubic formula?


$2tx'-x=lnx'$  I differentiated both sides with respect to x:  $x'+2tx''=\frac {x''}{x'}$  Substituting $p=x'$,  $p+2tp'=\frac{p'}{p}$  But I have no clue what can I do from here on.  EDIT: $t$ is the non-dependent variable.


SSH tunneling fails with "administratively prohibited: open failed"

I am trying to connect to internet via a server in local network. I don't have permissions to change server configuration.  I want to do a ssh tunnel to that server and via that using socks proxy, I want to use internet.  When I try using:  ssh -D 2222 user@server   and setting socks proxy accordingly in firefox, and opening google.com in firefox shows:     channel 3: open failed: administratively prohibited: open failed   several times for each request.  I googled it, tried many solutions, but I am not able to get it working. It may have happened that because of being new, I have not applied the solution properly.  I can ssh into the server easily and everything works fine.    I have seen other questions that this question is possible duplicate of. I am not able to resolve my problem from the answers to those questions  Some additional questions,  The port 2222 is on my localhost. I don't need permission on server to open the port 2222. It creates tunnel via ssh (port 22). Is my understanding wrong?  If not, why would I need access to server admin?


Decide if it is possible, by successively switching the place of rows or columns, to reach to the matrix$ −A$.

Let A be an n × n matrix whose entries are 0,1,−1 and each row and column has exactly one 1 and one −1. Decide if it is possible, by successively switching the place of rows or columns, to reach to the matrix −A.  i don't which method i can chose to use, please give a hint or answer.


How do you get rid of an Enderdragon egg in a creative server?

I was in creative and then I put an Enderdragon egg in the wrong place and I couldn't get rid of it. I kept punching it but nothing happened.


Unwanted process is running on VM and consuming 98% CPU consistently

I could see one of the process running on VM and consuming 98% CPU consistently, it auto starts if i kill the same.  Process details is as below:  root      3740     1 98 11:00 ?        00:49:34 /var/tmp/sustes -c /var/tmp/wm.conf   and the conf file is something as below,  some other details +  "api": {     "port": 123,                             // port for the miner API https://github.com/xmrig/xmrig/wiki/API     "access-token": 111,                  // access token for API     "worker-id": 111                      // custom worker-id for API }   Please help me out to identify about the same and how to remove that from server.


Finding all group homomorphisms of $S_n\to\mathbb{C}^*$ and $A_n\to\mathbb{C}^*$

I need to find all group homomorphisms of $S_n\to\mathbb{C}^*$ (for $n\ge2$), and also all group homomorphisms of $A_n\to\mathbb{C}^*$ (for $n\ge2$).  Someone on this site, two years ago, seems to have already asked the same question (). I understand what the questioner says there, but I don't understand it when he says:     Therefore there is exactly one $g:\mathbb{Z}/2\mathbb{Z}\to\mathbb{C}^*$, so all elements of $a\in\mathbb{C}^*$ give us $\operatorname{ord}(a)\mid g[\mathbb{Z}/2\mathbb{Z}]$, so $a$ can only be $-1$ or $1$. Now we know that $f:S_n\to\{-1,1\}$ …   What is he saying there? And how to go on from there? (I do not understand the answer given either …)  I hope that someone here can help me further. (And if I'm not allowed to ask this question because is has already been asked two years ago, please tell me what to do instead).  Thank you in advance!


Dynamic DEM Profile Graphs for Data Driven Pages in ArcGIS Desktop or ArcGIS Pro

I came accross this topic  5 years on and this functionality still does not seem to be built into ArcGIS Desktop or ArcGIS Pro. Does anybody know good web code and workflow description source to share? I have multiple DEM surfaces that I want to show the profiles for in a single graph that is linked to Data Driven Page.


BlueJ Unit Test fails despite equality holding

Unit test fails yet biComplexNumber1.equals(biComplexNumber2) holds true.  Unit test:   public void simpleTest(){     BicomplexNumber b1 = new BicomplexNumber(1,2,3,4);     BicomplexNumber b2 = new BicomplexNumber(1,2,3,4);     assertEquals("Simple Test", b1, b2); }   Equality check  public boolean equals(BicomplexNumber bicomplexObj)  {     if(bicomplexObj == this) return true;     if(bicomplexObj.getA() != this.getA()) return false;     if(bicomplexObj.getB() != this.getB()) return false;     if(bicomplexObj.getC() != this.getC()) return false;     if(bicomplexObj.getD() != this.getD()) return false;     return true; }   The equality check seems to be correct when I would like it too. But I have included it anyway.


Integrating $\int_1^2 \int_0^ \sqrt{2x-x^2} \frac{1}{((x^2+y^2)^2} dydx $ in polar coordinates

I'm having a problem converting $\int\limits_1^2  \int\limits_0^ \sqrt{2x-x^2}   \frac{1}{(x^2+y^2)^2}  dy dx $ to polar coordinates.  I drew the graph using my calculator, which looked like half a circle on the x axis.  I know that $\frac{1}{(x^2+y^2)^2}  dydx$ turns to $ \frac{r}{(r^2)^2}drd\theta$, which would be $ \frac{1}{r^3}$  The region of integration in  $\theta $ is I guess $0 \leq  \theta  \leq  \frac{1}{4}  \pi $, but I'm stuck for r. The lower boundary is $x=1=rcos\theta \rightarrow r=1/cos\theta=sec\theta$, but what is the upper boundary?? Is it  $\sqrt{2rcos\theta-r^2cos^2\theta}$? I tried this but I couldn't integrate my equation...  Could someone please help me out?  Also, how can I draw the graph of $y= \sqrt{2x-x^2} $? I could only know how it looked like by using my calculator...


if the gcd of (a,b) = 1, and a,b divide an integer x, prove that ab ≤x

A simple doubt regarding GCDs: If $\gcd(a,b) = 1$, $a\vert x$ and $b\vert x$, how do we prove that $ab\le x $? I was attempting the proof of this theorem: If $\gcd(a,b) = 1,  a\vert x$ and $ b\vert x$, prove that $ab\vert x$. And proving the above mentioned inequality will complete my proof.


What's "real" and what's "virtual" on a (digital) camera?

I recently upgraded from a standard compact digital camera to one of the newish "halfway cameras", hoping to get a bit better at taking photographs through having a little more control over the settings.  Trouble is, the camera has so many settings that I'm having difficulty figuring out which to concentrate on learning about!  I think it's best to start with the basic settings, by which I mean those that actually involve something physical in how the photograph is taken, rather than with the vast array of post-processing that the camera seems capable of.  So, my question:     Which settings on my camera are "real"?  Meaning that they have an effect on the information initially read by the sensor, not post-processing.   (I would be surprised if this varied from camera to camera which is why I haven't specified my exact camera.  Also, I'm not asking for an explanation of what the settings do, though a "sound bite" that I can easily remember when I'm out with my camera would be a welcome extra.)  Standard apology: if this question has been asked before, I apologise and would appreciate knowing which question to look for the answers in.  Also, I didn't have a clue what to tag this!


How to get autofocus to work with D5100 and AF-P DX Nikkor

I just bought Nikon 18 - 55 mm f/3.5 - 5.6G VR AF-P DX Nikkor from .  When I connected it to my Nikon D5100, the autofocus didn't work. There was nothing about this from the original seller's website.  Is there anything I can do short of returning?


I'm having some trouble solving the following exercice:  Let $a,b \in \mathbb Z$ and $p$ be a prime number. If $\gcd(a,p^2) = p$ and $\gcd(b,p^3)=p^2$ determine:  $\gcd(ab,p^4)$ $\gcd(a+b, p^4)$   I was able to determine the first one and got $\gcd(ab,p^4) = p^3$ (The part I'm having trouble with is the second one, but I would appreciate If someone could also confirm this first answer). I'm not being able to determine the value of $\gcd(a+b, p^4)$. How can I do this?


How to create upload form with fwrite php

I am create upload form by fwrite function php. My code is here  <?php $file = fopen("C:/xampp/htdocs/eibak/sss.php","w");  echo fwrite($file,"<?php  if (isset($_POST['submit'])) {      $file = $_FILES['file']['name'];      $temp = $_FILES['file']['tmp_name'];     $dir = '';     echo $dir;     if (move_uploaded_file($temp, $dir.$file)) {          $link = $dir.$file;      ?>     <?php } } ?>     <form action='' method='POST' enctype='multipart/form-data'>         <input type='file' name='file'/>         <input type='submit' name='submit' value='Submit'/>     </form>"); fclose($file); ?>    But Parse error: syntax error,      unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier   (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in   C:\xampp\htdocs\exploit\ff.php on line 5 error show.   How to create upload form with file write php.


Control 5v relay through 3.3v GPIO using NPN transistor

I'm not very pratical as I just started learning electronics and I'm planning to make some experiment with Raspberry Pi.  I'm trying to control a 5v relay board that, I think, is made for Arduino, as Raspberry only has 3.3v GPIO.  It's active low, as GPIO.LOW activates the relay, and the 3.3v keep it active too, so I think I'll need exactly 5v to turn it off.  So, basically I think I'll need a transistor, with the base controlled by my GPIO, that will activate a 5v line to Input line of the relay switch.  I have thought about these schematics, but I've been told it will burn my transistor as I need a resistor between 5v and the transistor collector.  My question is certainly basic, but... WHY?  When no current flow through base there will be no problem, when the transistor gets activated isn't my load the relay board? Why do I need other resistors?  Thanks in advance.    This is the relay board I bought, I couldn't find schemas, so I can't provide more.


What is the least possible value of $n$ such that $n^2+n+17$ is composite?

The question is-     Find the least $n$ for which $n^2+n+17$ is composite.   I tried to factorize it and show that it has a factor greater than $1$.But I could not factorize it and I also found that it has no real zeroes (roots).Now,how do I solve the problem?  Thanks for any help!!


My website has a login feature and therefor needs to save the user's information in a cookie so that it they don't have to log in every time they go on the website.  To my understanding, cookies aren't secure unless some extra checks are put in place, so I've come up with a way that I think should make them secure (if not, please tell me how it should be):   create a table in the database that holds cookie information within the table, there are two columns; one that holds the user's username, and another that is some large random number (how would I generate the random number in code?) upon logging in to the website (if the cookie already exists), it checks with the database to see if the username and the random number match if it's the first time the user is logging in (the cookie doesn't exist), it fills the required tables in the database and sets a cookie upon logging in successfully, a new random number is assigned to the database as well as the user's cookie   Does this seem like a viable approach?  Also, if multiple pages require to have the person's username from the cookie, should it verify with the database each time it's required or should it just use $username = $_COOKIE["username"]; without any verification?  Thanks.


How to zoom to a GeoJSON feature on map using OpenLayers 3 following a WFS request

After doing a WFS request, I have fetched all GeoJSON objects and fill in a list. My goal is to zoom specified GeoJSON in fetched all GeoJSON using OpenLayers 3.  In the below code inside the showFeatureByID function, I have reached specified GeoJSON by clicking, after this, I would like to zoom in on map using OpenLayers.  map.on('singleclick', function(evt) {      var view = map.getView();     var viewResolution = view.getResolution();     var source = untiled.get('visible') ? untiled.getSource() : tiled.getSource();     var url = source.getGetFeatureInfoUrl(         evt.coordinate, viewResolution, view.getProjection(),         {'INFO_FORMAT': 'application/json', 'FEATURE_COUNT': 50});      if (url) {         //url includes getFeatureInfo request string and use x,y values on map to find clicked object.         // do wms getFeatureInfo request.         loadDoc(url);         interval1 = setInterval(function () {             if (featureData.status == true) {                 fillDataView(featureData.data[0]);                 showFeatureByID(featureData.data[0]["ID"]);                 clearInterval(interval1);             }         }, 100);     } });   var featureData; var allGeoJSONFeatures={};  function loadDoc(url) {     featureData={status:false,data:[]};     var xhttp = new XMLHttpRequest();     xhttp.onreadystatechange = function() {         if (this.readyState == 4 && this.status == 200) {               var jsonObject=JSON.parse(this.response);               for(i in jsonObject){                  var val = jsonObject[i];                  if(i == "features"){                      for(j in val){                          var geojsonx = val[j];                          var properties = geojsonx.properties;                          featureData.data.push(properties);                      }                  }              }             if(featureData.data.length>0){                 featureData.status=true;             }         }     };     xhttp.open("GET", url, true);     xhttp.send(); }   function getAllGeoJSON() {     var xhttp = new XMLHttpRequest();     xhttp.onreadystatechange = function() {         if (this.readyState == 4 && this.status == 200) {             var jsonObject=JSON.parse(this.response);             var json = jsonObject.features;             for(i in json){                 var id = json[i].properties.ID;                 allGeoJSONFeatures["p"+id] = json[i];             }          }     };     xhttp.open("GET", "http://ip:host/geoserver/xxx/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=BaskentGaz:M_DIZAYN_VANA&outputFormat=application%2Fjson", true);     xhttp.send(); }   function showFeatureByID(id) {      var geojson = allGeoJSONFeatures["p"+id];     alert(geojson.toString());  }


When a sequential space has unique sequential limits?

A topological space is called a sequential space if a set $A \subset X$ is closed if and only if together with any sequence it contains all its limits.  so, according to definition, is the following correct?     Sequential space has unique sequential limit iff each countably compact subset is closed.( and hence sequential).


How to get the text fields values in the controller class without using any scripts

Im having a VF page it has some text fields and one button . On clicking the button , the values in the text field should be passed to the controller class to save in the database . Can this be achieved . If yes , direct me .


Investigating slow performance when opening tables in ArcGIS Desktop?

My ArcGIS 10.5 performance is very slow just in opening some thinks like: Options, tables, labels, arctoolbox, draw menu ect. It open the mentioned things in about 3 minutes.  I have tried different solutions like: l deleted Normal.mxt, remove and reinstalled the ArcGIS, restore my PC and tried more solutions that I found in Internet but no one was useful to solve the problem. My Computer  is Dell 5559 cori7 2.5GHz 4cpus, 8GB ram and 4GB Graphic dedicated memory This is bothering me. What is the problem?


How to delete part of a binary file without copying

I need to delete the first 2 bytes of a 6MB file. However, this is an embedded Linux with only 32 Mbytes RAM and less than 1 MB free flash memory.  I tried using dd, as:  1 - # dd bs=1 skip=2 count=1022 if=input of=ouput_1  2 - # dd bs=1024 skip=1 if=input of=ouput_2  3 - # rm -rf input  4 - # (dd if=ouput_1 ; dd if=ouput_2) > ouput  5 - # rm -rf ouput_1 ouput_2  With all files under the /tmp (mounted as tmpfs on RAM), my problem is that just before lines 3 and 5, the memory needed is 12 Mbyte (2x6MB), and the process sometimes fail and gives an "Not enough memory" error.  Is there a way I can remove the first 2 bytes without allocating twice the size of the file ? Can I use dd (or any other) to cut a binary file 'in place' ?


How to best respond to a request to send a passport scan by unsecured email?

It is not uncommon for travel or holiday accommodation companies to ask for a scan of your passport by email. Sometimes local laws require them to keep a record of the passport numbers of all visitors. I'm happy to provide that information but you usually have to send it in an unsecured email, which may have consequences .  Could these companies be more responsible, and provide a public cryptographic key at least?  Are there other steps you should take to protect yourself, if you do send by unsecured email?


How do you add a show desktop button to the dock (18.04)?

In 16.04 there was a button on the dock you could click that would minimize all open applications. Is there a similar button in 18.04?  It looked like this:


Failed to fetch because of size mismatch error while upgrading

When I try to install updates from the update manager it says:  Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-3.0.0-13-generic_3.0.0-13.22_i386.deb   Size mismatch   I have tried several times and through terminal too but the size mismatch repeats itself there too. What is this size mismatch error?  I also tried sudo apt-get update and sudo apt-get upgrade, but the error comes again.  Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-video-intel/xserver-xorg-video-intel_2.15.901-1ubuntu2.1_i386.deb   Size mismatch   E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Publication dates: accepted date, version of record online, issue online – which one to use?

I have seen the other questions regarding which publication date to use, and it seems clear to use what the publisher uses.  But what if the publisher provides several dates such as the following?    Issue online: 25 January 2016 Version of record online: 25 October 2015 Accepted manuscript online: 7 October 2015   I find these definitions confusing. Which data should be used as the official publication year? What does version of record online even mean; is it important?


Assuming there is no huge visible fungus, inside, how to verify whether the second hand lens is affected by spores?  It is said that spores don't die and fungus may regrow. Also it is said that if we keep fresh lens with infected lens, fungus will spread.   Assuming it has tiny fungus, will it still spread if I keep it in hygienic conditions?  How to verify whether the invisible/removed fungus in the second hand lens is dangerous?  What are the signs that the white particles inside the lens are just dust and not fungus?  Basically I want to understand how to identify fungus when it doesn't look very obvious.


I've been wondering for a while now if there's any deep mathematical or statistical significance to finding the line that minimizes the square of the errors between the line and the data points.   If we use a less common method like LAD, where we just consider the absolute deviation, then outliers make less difference to the final model, while if we take the cube of the error (or any other power higher than 2), then outliers are far more significant than with the least squares model.  I suppose what I'm really asking is mathematically, is raising the error to the power of 2 really that special. Is it say more "accurate" in some sense than raising the error to the power of 1.95 or 2.05???   Thanks!


Why specifically was Obi-Wan Kenobi the "only hope" of Princess Leia?

I know that there is a sort of similar question about how Princess Leia knew about Obi-Wan , but I'm curious as to why and how Princess Leia thought an aging Obi-Wan Kenobi would be of any help to the Rebellion worth risking herself and her crew in addition to the stolen Death Star plans (which apparently the Rebellion only had stored on R2-D2 physically, and no other copies)?   See  for the scene in question.  Things to consider:   Obi-Wan as a resource to the Rebellion didn't even have his own ship or own resources to contribute (not even enough to pay for passage for a smuggler to transport him). Obi-Wan as a fighter did not do any extensive amount of fighting in A New Hope (he cut off a guy's arm in a bar, and sacrificed himself vs Darth Vader, that's it) Obi-Wan as a Jedi didn't have an apprentice yet, and was probably not going to have a shot at taking on Darth Vader or the Emperor. Princess Leia risked near everything just to visit in person the place where she thought Obi-Wan still lived (he could have been dead for years assuming that she said "years ago" in her message to Obi-Wan regarding how she knew of him). She risked herself, her ship, her crew, her cause (if she had been tortured into giving up the Rebellion) and the stolen plans themselves (next time stormtroopers, shoot down the empty escape pod, if for no other reason than to improve your atrocious aim and shooting during the original trilogy), just to see if Obi-Wan might be interested if still alive to maybe (somehow) help the Rebellion.   Possible answers I've considered (I'm curious for more though):   Obi-Wan might have some sort of wisdom or knowledge about attacking the Death Star and he may have been able to analyze the stolen Death Star plans for weaknesses (but the Rebels did a good job of this anyway). Obi-Wan would have been exceptional at espionage and infiltration (took out the tractor beam on the Death Star, successfully avoided almost every stormtrooper he encountered, and Jedi mind tricked the ones he couldn't avoid -- think "these aren't the droids you're looking for"), although Obi-Wan's stealth would not have been needed inside the Death Star had Leia not gotten herself captured and in need of a rescue from the Death Star in the first place, which happened as a result of trying to visit Obi-Wan.


I want to prove that the below equation can be held.  $$\sum_{ k=1 }^{ n  } \cos\left(\frac{  2 \pi k }{  n  } \right) =0, \qquad n>1 $$  Firstly I tried to check the equation with small values of $n$ $$  \text{As } n=2 $$ $$  \cos\left(\frac{  2 \pi \cdot 1   }{  2  } \right) + \cos\left(\frac{  2 \pi \cdot 2   }{  2   } \right)  $$ $$ = \cos\left(\pi\right)  + \cos\left(2 \pi\right)    $$ $$ = -1+ 1 =0  ~~ \leftarrow~~ \text{Obvious}  $$ But $$  \text{As}~~ n=3  $$ $$  \cos\left(\frac{  2 \pi \cdot  1   }{  3   } \right) +\cos\left(\frac{  2 \pi  \cdot  2   }{  3   } \right) + \cos\left(\frac{  2 \pi  \cdot  3   }{  3   } \right)  $$ $$ = \cos\left(\frac{  2 \pi  }{  3  } \right) + \cos\left(\frac{  4 \pi  }{  3  } \right) + \cos\left( 2\pi \right)  $$ $$ = \cos\left(\frac{  2 \pi  }{  3  } \right) + \cos\left(\frac{  4 \pi  }{  3  } \right) + 1  =?$$ What formula(s) or property(s) can be used to prove the equation?


How can I prove that the following T-SQL is bad for performance?

I have recently inherited a codebase with a large amount of stored procedures. The system they are supporting is encountering numerous performance problems which I am looking in to.  A number of the stored procedures have a pattern like this:   Create Temp table Build up dynamic SQL query to insert a bunch of records, e.g.  DECLARE @sql VARCHAR(MAX) SET @sql = 'INSERT INTO @tempTable SELECT SomeColumn, SomeColumn2, SomeColumn3, etc FROM MyTable'  IF @someParam = [SomeValue]     SET @sql = @sql + 'WHERE SomeColumn = [SomeValue]';  IF @someOtherParam = [SomeOtherValue]     SET @sql = @sql + 'WHERE SomeOtherColum = [SomeOtherValue]';  Execute this dynamic sql  EXEC(@sql);  Select from the temp table and bring in a bunch of additional information to return to the client.  SELECT    ... FROM    @tempTable INNER JOIN ...    My immediate thoughts are:   There is dynamic SQL, so no cache plans, meaning plans generated every time. There is an INSERT SELECT pattern, so table locking is more likely to be an issue.   I have re-written some of the stored procedures in this way instead:  SELECT         ... FROM       MyTable  INNER JOIN ...  WHERE     (@someParam != SomeValue      OR      SomeColumn = SomeValue)     AND     (@someOtherParam != SomeOtherValue      OR      SomeOtherColumn = SomeOtherValue)           From comparing execution plans and client statistics in SQL Server Management Studio, I have not sped the stored procedures up so I am apprehensive about suggesting wholesale re-writes of all stored procedures.  I am trying to set up some profiling of a live customer scenario, but as yet have been unable to prove my thoughts.  Can anyone offer any confirmation of the theory behind my thoughts, or any better ways of proving my suspicions?  The problem is I have read that dynamic SQL is not always a closed case - i.e. it depends on how it is used. My understanding of locking also falls down at the fact that nowhere can I get 100% confirmation of how this type of INSERT SELECT will lock tables.


Ring $\frac{\mathbb{Z}}{ \mathbb{6Z}}[x] / \langle 2x+4 \rangle\cong\ ?$

TRUE/FALSE:  Ring $\frac{\mathbb{Z}}{ \mathbb{6Z}}[x] / \langle 2x+4 \rangle$ has infinitely many elements?  To find this ring we have $\frac{\mathbb{Z}}{ \mathbb{6Z}}[x]$ and put $x=-2=4$ in the elements of $\frac{\mathbb{Z}}{ \mathbb{6Z}}[x]$. From here I do not see infinitely many elements. So it must be false , right?  What is this ring isomorphic to?


How to enqueue script or style in a theme's template file?

I am making a template for the page which will contain a slider. Can anyone share some advice with me of how to go about it?


Convert from avi to uncompressed tiff using ffmpeg

In  there is an answer how to convert to TIFF.  So, I followed that process written on that answer:  ffmpeg -i input.avi -pix_fmt rgb24 output.tiff   Though the TIFF file converted then became lossless compressed TIFF files.  How can I convert it to uncompressed TIFF files?


why set overall code coverage will be atleast 75%

Overall code coverage set from salesforce is 75% we can cover upto 100% but why they set for 75% only not set 100%.


Prove the inverse of the Hilbert matrix has integer entries

$1 \frac{1}{2} ... \frac{1}{n}$      $\frac{1}{2} \frac{1}{3} ... \frac{1}{n+1}$      $.$      $.$      $.$      $\frac{1}{n} \frac{1}{n+1} ... \frac{1}{2n-1}$      Does the inverse of this matrix have integer entries? Prove your   statement.   I thought of  multiplying every line $i$ by $i!$, but it leads to a very complicated solution (if it leads to a solution at all).  Source: Linear Algebra, Kenneth Hoffman and Ray Kunze. Section 1.6, exercise 12.