Concrete example:       Despite almost identical titles (and the same user task -- send email) the questions are about different issues underneath: the first question might be about shadowing Python stdlib module due to filename conflict. The second -- about ssl error.  Should such questions be merged (one closed as a duplicate of another) or should they be kept separate?

I'm not sure if there's already an existing term for this, so I'm inventing my own. (tl;dr: I call them "chameleon questions" because they change every time you submit or edit an answer.  If you're already intimately familiar with the phenomenon, please skip past the first set of bullet points to where I ask for recommendations.)  I think many of us have experienced this on occasion:  You open up a narrow-looking question, usually dealing with some specific error message.  The question probably contains a snippet of sloppy but not quite awful code; code indicating that the author, typically a new/low-rep user, possibly a , doesn't really know what they're doing.  I'm not trying to be condescending here, they're probably very intelligent and hardworking, but in this specific case, they're clearly in way over their head.  However, as a question, it's not really too bad.  The goal and problem are both clearly stated.  The code is formatted (sort of).  Mort was polite and checked their spelling.  The question looks answerable, although from a rep perspective* it's an obvious dead-end, it's had maybe 3 views in the past 30 minutes.  So you decide, you know what, this person took the time to write up the question properly, they deserve an answer, put on your good citizen hat and throw them a bone.  You slog through the ugly code, find the offending line, direct their attention to it and explain why it's wrong and how it needs to be fixed.  Later, they leave a comment saying that yes, that was indeed the problem and your answer helped them fix it (great!).  Oh, but, now there's another problem (uh-oh...). Something else is broken.  After letting out a long sigh, you read the comment and/or edited question, roll up your sleeves, and write up Take 2, hoping that's the end of it.  And of course it's not the end.  Now maybe the error is gone, but it's not doing what it's supposed to.  If you're anything like me, your patience is now starting to wear thin. It's lousy code and you didn't volunteer to help them rewrite their whole app.  And of course, the question still only has 12 views, and nobody has upvoted either the question or your answer, including the person you're helping, so this is turning out to be a genuinely thankless task in all respects.  Welcome to "Family Tech Support", Web 2.0 Edition.   * Which is of course just an arbitrary number that none of us care about. Not really, anyway. Not very much, at least.  So, here's where I get to my question.  At this point, do you:  Leave a comment, stating as politely as possible that you've done your best to help them answer the original question they asked, and if they have a new problem then they should start a new question?  (I did this once, and actually ended up with an accept, but I felt kind of guilty afterwards, I don't think anybody answered their 2nd question).  Bite the bullet and edit your answer a 3rd, 4th, 5th time, however many times it takes to resolve their issue, knowing full well that they may not even remember to accept the answer once you're done? (I may work for free on SO, but that doesn't mean my time is worthless.)  Just abandon the question, hoping that it will force Mort to start thinking for himself?  Something else?   I've tried all three of the above and none of them ever quite feel right. I do want to help, but at the same time there are a lot more "lucrative" questions I could be answering. And I don't mind spending a lot of time on an answer either, if the question is interesting or important to me, but debugging is dull work. I'd prefer not to reference specific questions here; I'm pretty sure that this is a shared experience, and my objective isn't to point fingers at "misbehaving" members.  I'm more looking for some practical advice on how to dig myself out of these pits of despair. Anybody have any other ideas?


If go to  and find some f-words we can find a lot of users with such words in their nicknames. Is it legally now? If not why they are not renamed (automatically)? Or the answer from this  is still actual?  P.S. The question is about other sites of SE also.

Are there any rules concerning what I can put in my profile?


How can I generally show that two metric spaces induce the same topology, for instance, in my textbook it says metric space $d(x,y$) and $\sqrt{d(x,y)}$ induce the same topology. How do I show this? Much help would be appreciated.  ok so very generally I wrote up some solution, and it goes:   Let $d^{'}=\sqrt{d}$, then we want to show that $B_d(x,\epsilon) \subseteq B_{\sqrt{d}}(x,\epsilon)$. Let $y \in B_d(x,\epsilon)$,but $d^{'}$ is the square root metric of $d$, so we have $d^{'} \le d$, hence $d^{'}(x,y)\le d(x,y)<\epsilon \implies y \in B_{\sqrt{d}}(x,\epsilon)$, therefore $B_d(x,\epsilon) \subseteq B_{\sqrt{d}}(x,\epsilon)$. is this the correct way?

Suppose that for a metric space $(X,d)$ we have another metric $p$ forming the metric space $(X,p)$. Both of these will give rise to two topologies $\tau_{1}$ and $\tau_{2}$. I want to show that $\tau_{1}$ and $\tau_{2}$ give rise to the same topology.   How could one do it generally in this case? I was thinking of taking an open set $U_{d}$ in the metric space $(X,d)$ and showing that this is open in $(X,p)$ and conversely, taking an open set $U_{p}$ in $(X,p)$ and showing its open in $(X,d)$. Would this be the idea to prove that the topologies are equivalent? (I'm sure this can be used with more generality for the case that we have two topological spaces rather than two metric spaces). If not, what would be the correct way?  Thanks for the help.


I am using "Docky" and it is a software prone to crashes once in a while. Is there a way to keep this software always running even after a crash?  I want "Docky" to restart itself if it crashes so i don't always have to restart it manually.   I am using Ubuntu Gnome 14.10. Appreciate any help, thanks!

docky crashes from time to time for me. How can I make it restart automatically after it crashed?


While appending data to properties file, existing comments disappear & order of data is being changed. Please suggest how to avoid it?  data in properties file(before appending the data) along with comments is as follows:  # Setting the following parameters  # Set URL to test the scripts against App.URL = https://www.gmail.com # Enter username and password values for the above Test URL App.Username = XXXX App.Password = XXXX   I am adding more data to above properties file as follows:   public void WritePropertiesFile(String key, String data) throws Exception {            try      {         loadProperties();           configProperty.setProperty(key, data);         File file = new File("D:\\Helper.properties");         FileOutputStream fileOut = new FileOutputStream(file);         configProperty.store(fileOut, null);         fileOut.close();     }      catch (Exception e)      {         e.printStackTrace();     } }   calling the above functiona as:  help.WritePropertiesFile("appwrite1","write1"); help.WritePropertiesFile("appwrite2","write2"); help.WritePropertiesFile("appwrite3","write3");   Data is added successfully, however the previously entered comments are disappeared and order of the data is also changed and the properties file(after appending data) is displayed as follows  #Tue Jul 02 11:04:29 IST 2013 App.Password=XXXX App.URL=https\://www.gmail.com appwrite3=write3 appwrite2=write2 appwrite1=write1 App.Username=XXXX   I want the data to append at the last ,doesn't want to change the order and doesn't want to remove the previously entered comments. Please let me know if it is possible to implement my requirement?

Though java.util.properties allows reading and writing properties file, the writing does not preserve the formatting. Not surprising, because it is not tied to the property file.  Is there a PropertyFile class out there -- or some such -- that preserves comments and blank lines and updates property values in place?


The closed ball is the set of $y$ around some $x$ such that $d(x,y) \leq r$ for some $r>0$ where $d(x,y)$ is a metric on the space containing $x$ and $y$.

Prove that a closed ball in a metric space is a closed set   My attempt: Suppose $D(x_0, r)$ is a closed ball. We show that $X \setminus D $ is open. In other words, we need to find an open ball contained in $X \setminus D$.   Pick $$t \in X-D \implies d(t,x_0) > r \implies d(t,x_0) - r > 0 $$ Let $B(y, r_1)$ be an open ball, and pick $z \in B(y,r_1)$. Then, we must have $d(y,z) < r_1 $. We need to choose $r_1$ so that $d(z,x_0) > r$. Notice by the triangle inequality  $$ d(x_0,t) \leq d(x_0,z) + d(z,t) \implies d(z,x_0) \geq d(x_0,t) - d(z,t) > d(x_0,t) - r_1.$$  Notice, if we pick $r_1 = d(t,x_0)-r$ then we are done.  Is this correct?


Some of my posted answers to questions of using pyparsing are very detailed, and at some time in the future, I would like reuse some of them as material in a copyrighted ebook or book. Can I do this, given that posts on SO are under the CC-wiki license? And can someone else do this with my answers, publish my answers in their publication?

Posts on Stack Exchange sites have a Creative Commons license applied. However, on Writers, people will post snippets of their own writing for  purposes. Does that mean that if I post a critique question, it CC's the selection of work I post? Related:


Im wondering is there a built in function in javascript that has the timezone information such as   America/Los_Angeles (or equivalent) that can be determined on whatever factor it need be factored on?   Similar to however  does it on its home page? Or is there a list of these zones that I can attempt to build my own library off of? From what I gather  takes the vaule America/Los_Angeles for example to determine an offset, but I can't find any mention of how to do the opposite.

Is there a standard way for a web server to be able to determine a user's timezone within a web page?   Perhaps from an HTTP header or part of the user-agent string?


Let $a,b\in\Bbb{N}$. Prove or disprove that if $a>b$ and $\gcd(a,b)=1$ then $\gcd(a,a-b)=1$.     I think it is true.  Proof If $\gcd(a,b)=1$ then $as+bt=1$ for some $s,t\in\Bbb{Z}$. Then $as+(b+a-a)t=as+(b-a)t+at=a(s+t)+(b-a)t=am+(a-b)k=1$, where $m=s+t\in\Bbb{Z}$ and $k=-t\in\Bbb{Z}$. Hence again by Bézout's identity, we conclude $\gcd(a,a-b)=1$. $\square$  Is it correct?

I wrote:  Since gcd(n-k, n)=1, we can use Bezout's Identity to say: ∃(x,y)∈Z such that (n-k)x+ny=1. Distributing, nx-kx+ny=1. One can then produce the equation: n(x+y)-kx=1. I then stated about how because of that equation, it is proved that gcd(n-k, n)=1. I am almost certain that what I wrote is not the proper way to prove this statement so could someone please present their own version of the proof or explain to me where I messed up?


I have downloaded Adobe Flash player 11.2, but can't install it.   I am using Ubuntu 13.04. Can anyone help me?  I don't know which program it will open with.

I have had significant problems with watching flash video in 64-bit Ubuntu.  Does anyone know of a good way to get flash running on the platform?


How would you find the number of perfect matchings of a $K_{m,n}$ bipartite graph?

In wikipedia FKT algorithm is given for planar graphs. Not anything for complete graphs. I need to find the number of perfect matchings in complete graph of six vertices.


I am currently able to prove this statement using the Cantor diagonalisation argument, my question is whether there is another way (more simple or more complex) to prove this statement, without diagonalisation?

I recently started studying set theory and am having quite a bit of difficulty accepting Cantor's diagonal proof for the uncountability of the reals. I also saw a topological proof via nested sets for uncountability which still does not satisfy me completely, given that just like the diagonal it relies on a never ending process. In fact, the nested sets proof sounds very much like the diagonalization proof to me.  Do all proofs of the uncountability of the reals involve diagonalization? Are there any other proofs I can look at to understand? I couldn't find any on searching stack exchange. Thanks.


Need help clarifying why:   $$\frac{\log 8}{\log 3} = \frac{\ln8}{\ln3}$$  To my understanding $\ln$ implies $\log$ base e and $\log 8$ implies $\log$ base $10$ of $8$. Kind of confused how that is equivalent.  Thanks

If $x=16384$ and $y=2$  $\ln(x)=9.704$ $\ln(y)=0.6931$  $\log(x)=4.2144$ $\log(y)=0.3010$  If we divide $\frac{\ln(x)}{\ln(y)}$ we get $14$ and same answer for $\frac{\log(x)}{\log(y)}$.  So can anyone tell me the concept behind this? Why does dividing $\frac{\ln(x)}{\ln(y)}$ give the same result as $\frac{\log(x)}{\log(y)}$?


I do not understand the intuition behind why the median is the best estimate if we are going to judge prediction accuracy using the Mean Absolute Error.  Let's say you have a random variable $X$ and you want to predict what the next $X$ is.  Let's denote your prediction as d.  Under Mean Squared Error, which is:     $\text{MSE} = (X - d)^2$   We know that expected MSE, or sum of MSEs, is minimized when $d$ is equal to the mean or $E[X]$.  This makes sense intuitively.  The best predictor of a random variable is its mean.    However, under Mean Absolute Error, which is:     $\text{MAE} = |X - d|$   The expected MAE or sum of MAEs is minimized when $d$ is equal to the median of the random variable.  While the book I am reading has a fancy proof to show why this is the case, intuitively I don't understand why the median would be the best predictor.  I also don't understand why the mean (or median) wouldn't be the best choice for both.

From the , specifically :     A forecast method that minimizes the MAE will lead to forecasts of the   median, while minimizing the RMSE will lead to forecasts of the mean   Can someone give an intuitive explanation of why minimizing the MAE leads to the forecasting the median and not the mean? And what does this means in practice?  I have asked a customer: "what is more important for you to make mean forecasts more accurate or to avoid very inaccurate forecasts?". He said that to made mean forecasts more accurate have higher priority. So, in this case, should I use MAE or RMSE? Before I read this citation I believed that MAE will be better for such condition. And now I doubt.


Ok so I have a virus. It's a beauty. It has almost my entire laptop, from ~$users and ~$NT.DAT all the way up to ~$recovery and ~$C: in lockdown.. plus has created bogus files EVERYWHERE (hp/HP/Hewlett-Packard, for example) that look all legit and ok until you get 3 folders deep and all there is is an .ini .DAT .log or .exe file that shouldn't exist. It's been an easy and effective way to prevent me from doing recovery, reset, repair, ANYTHING to get rid of it. Yes I'm willing to wipe the whole thing I'd only had the laptop a few weeks, and I got my pics off early. Also I think last night (after two weeks of being careful) in my frustration at its invasion i may have deleted some files actually necessary for the above functions.  edit  So my question is - is there any obvious solution I may have missed? All antivirus, malware removal etc software I have used has not recognised the problem. I have tried reset, repair, update, registry repair all with the same response - windows "insert fix here" ran into a problem - no changes have been made. Are there any obvious solutions I have missed?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I use different keyboard layouts on my computer. The Super key works as expected with "English (with dead keys on Alt-Gr)" showing the Activities overview, but when switching to other layouts, the Super key has no effect. Combinations like Super+L or Super+A work as expected on every layout.  I've used xev to check that the keystroke is detected, and the output of xev is the same for different keyboard layouts.  I've updated the official Ubuntu (GNOME) 18.04 to 20.04. The issue was not happening before the upgrade and I'd like to avoid "fresh reinstall" as a solution.

After upgrading to Ubuntu 20.04 my super-key is no longer opening the activities overview when the keyboard layout is set to the secondary layout.   At first I thought it may have to do with the specific layout, but after switching the order of the layouts I use around the issue kept persisting only on the (new) secondary layout.


hi, as you can see i ve made a shipping container model with many polygons, i d like now to apply textures on it, i d like to use Substance Painter to do that, I saw on youtube that you need to export the fbx file from blender and open it on substance painter. do i need to create a UV map to apply textures anyway?

I am trying to learn how to make small games, and every time I watch a video it says that we need to unwrap it, but they never fully explain what unwrapping does or why we do it.  Is it necessary when exporting to UDK?


I have a list of unicode values.  To the best of my knowledge I can use list[starting location:length to select] to select a range of values from a list, right?  I have a list of 78 unicode values, which are not all unique.  When I select a range of 5 values beginning from the 0 position in the list (example: list[0:5]) the correct values are returned.  However, when I try to select a range of values that do not begin at the 0 position in the list (example: list[44:5]) then the return is [].  Changing the length of the range does not seem to make any difference.  Furthermore, if I use list[44], for example, then the value that is returned is correct.    I do not understand why I cannot select from a list when the cursor is not located at 0.  Can anyone tell me if lists in python have limitations on how data can be retrieved as a range?  I hope my problem and question are clear enough.  I would appreciate any feedback.  Thanks.

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


I have the following problem:     If $R[X]$ is isomorphic to $S[X]$ then $R$ is isomorphic to $S$.   I think this conjecture is false, however I haven't been able to provide a counterexample. Any ideas :( ? Thanks!

This is a very simple question but I believe it's nontrivial.  I would like to know if the following is true:      If $R$ and $S$ are rings and $R[x]$ and $S[x]$ are isomorphic as rings, then $R$ and $S$ are isomorphic.    Thanks!  If there isn't a proof (or disproof) of the general result, I would be interested to know if there are particular cases when this claim is true.


\documentclass[10pt, a4paper, oneside]{scrartcl} \usepackage{lipsum}  \title{\normalfont{Technical Report: Loren Ipsum}}  \author{{Alex Murphy}} \date{} \begin{document} \maketitle \section*{Introduction}  \lipsum[1-3] % Dummy text \end{document}  Above code generates below output,  But my supervisor forcing me to make indentation for all starting line of all paragraphs ( even for the initial line of section/subsection ). How can I do so?

I am just curious that the following format looks good to you or not? The preamble I used is just   \documentclass[12pt,a4paper]{article}  \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb}   I don't feel it's so good because the first paragraph has no indent but the second does. If the first paragraph is much longer, than it's fine. But if not, it looks strange. Should I leave it, or you have suggestions for this?


I was asked to find  $$\lim_{(x,y)\rightarrow(0,0)}\frac{x^3y^2}{x^4+y^6}$$   Observe that setting y=mx results in $$\lim_{(x,mx)\rightarrow(0,0)}\frac{x^3(mx)^2}{x^4+(mx)^6} = 0$$ The textbook solution then proved that the limit is 0 using the squeeze theorem.  However, I tried to set y=x^(4/6) and I got: $$\lim_{(x,y)\rightarrow(0,0)}\frac{x^3(x^{\frac{4}{6}})^2}{x^4+(x^{\frac{4}{6}})^6} = \lim_{x\rightarrow0}\frac{x^4}{x^4+x^4} = \frac{1}{2}$$  So I concluded that the limit does not exist.  I am not convinced that my solution is correct, I would really appreciate to know the reason why I am wrong.   Thank you

$$ \lim_{(x,y)\to (0,0)} \frac {x^3y^2}{x^4+y^6}  $$ Does this limit exist?   I've tried substituting y=x^0.5 and y=x^(2/3) which both goes to 0.


While i try to run the below code, i get a failed configuration error like this:  [RemoteTestNG] detected TestNG version 6.14.2 FAILED CONFIGURATION: @BeforeTest setUp java.lang.NullPointerException  public class Loginpagetest extends Testbase {      public static WebDriver driver;     public static Properties prop;      Loginpage loginpage;     Homepage homepage;      public Loginpagetest() throws IOException {         super();     }      @BeforeTest     public void setUp() throws IOException {         Intialization();         loginpage = new Loginpage();     }      @Test(priority = 1)     public void loginpagetitletest() {         String title = loginpage.validateloginpagetitle();         Assert.assertEquals(title, "Free CRM software in the cloud for sales and service");     }      //@Test(priority=2)     //public void CRMlogoimgtest() {     //  boolean flag = loginpage.validateCRMlogo();     //  Assert.assertTrue(flag);     //}      //@Test(priority=3)     //public void logintest() {     //  Homepage homepage = loginpage.login(prop.getProperty("username"), prop.getProperty("password"));      //}      @AfterMethod     public void tearDown() {         driver.close();     } }

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


I animated several objects moving along a certain path. That works well. Now I wanted to make one of the objects disappear. When I delete the element in a later keyframe it is removed in all keyframes before. How can I avoid this?

How would I delete an object that I no longer need in an animation? I am animating a projectile, but once it's out of view, I don't want my computer to have to process it anymore. Is there any way for me to delete it after I'm done with it?


On my Linux box at home, using Firefox, the top bar works great, and I'm loving it. On my Windows box at work, using Firefox, it worked well up until a few days ago, at which point it still works, but has some display problems. This is what it looks like:    Oddly enough, I can still expand the menus:            I cleared my browser cache, but that did not fix it. I am going to take my work laptop home to see whether it is some sort of work firewall issue, and will report back.  Update   I have the problem even when I am not connected to my work VPN. The bar looks fine in Chrome on the same computer. I can reach SStatic content delivery network test image in the errant browser.

Chrome and IE 11 are fine, I'm only able to reproduce this in Firefox. Using version 27.0.1 on Windows 7. Meta as well as all the other sites are affected.        I can still see the hover effect, but the image is gone. I see this in Firebug:        The image doesn't show up in the Network tab. I am able to see the image by visiting  which goes to   I've done Ctrl-F5, I've cleared the cache and I've tried Private Browsing. Possibly related to  ?


Suppose some code snippet that appears to be some specific syntax like C in this case, and I want to format it like plain text:  ``` #include <code> ```   On stackexchange, this will be rendered as if it was C/C++ like so (on meta I'll need explicit ```c):  #include <code>   Is there a way to explicitly switch off any syntax highlighting here?

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


I have used both Openshot and Kdenlive to render a 1018x712 video and upscale it to 1920x1080 resolution but the rendered video has black borders around it. Is there a way I can fix this, i thought it could be as simple as just stretching the video to the size I'd like. Heres an example   I have seen discussions on this question but I haven't been able to resolve this. Any help would be appreciated. - Thanks

I've recorded a video using recordmydesktop, but have unfortunately chosen for capturing the whole screen (1600*896) instead of a small part with geometric 900*690.  How do I crop this video? Preferably in the editor I'm using, Kdenlive, to minimize quality loss. I've tried the Crop, Pan & Zoom and Scale0tilt effects, modifying the pixel ratio, movie size inside project settings options without success. A step-by-step guide would be preferred or at least some hints.


Let $x$ be an irrational number. Is the set $\ \{nx \mod 1: n \in \mathbb{N} \}\ $ dense in $[0,1]\ ?$ Obviously if $x$ were rational, the set would be finite and therefore would have no limit points, so my question follows naturally. Certainly, the set must have at least one limit point in $[0,1],\ $ e.g. see my answer . If the answer is no, how do we find the set of limit points in $[0,1]\ ?$ I had a look at , but I'm not sure it's the same question and I'm not very knowledgeable on continued fractions.

Let $x\in \mathbb{R}$ an irrational number. Define $X=\{nx-\lfloor nx\rfloor: n\in \mathbb{N}\}$. Prove that $X$ is dense on $[0,1)$.    Can anyone give some hint to solve this problem? I tried contradiction but could not reach a proof.  I spend part of the day studying this question   and its answers. Only one answer is clear and give clues to solve the problem. This answer is the first one. However, this answer does not answer the question nor directly, nor the proof follows from this answer.   This answer has some mistakes, he use that $[(k_1-k_2)\alpha]=[k_1\alpha]-[k_2\alpha]$ which is not true. Consider $k_1=3, k_2=1, \alpha=\sqrt{2}$ we have $[(k_1-k_2)\alpha]=2\not= 3=[k_1\alpha]-[k_2\alpha] $. We only can assure that $[k_2\alpha]-[k_1\alpha]-1\leq [(k_2-k_1)\alpha]\leq[k_2\alpha]-[k_1\alpha]$.   Who answered said something interesting about additive subgroups of $\mathbb{R}$, but unfortunately the set $X=\{nx-[nx] : n\in \mathbb{N} \}$ is not a subgroup. Considering the additive subgroup $G=\langle X \rangle$, if we prove the part (a) of the link, we get that indeed $G$ is dense on $\mathbb{R}$ but we can not conclude that $X$ is dense on $[0,1)$.  I think this problem has not been solved.  Thanks!


I have a question about an argument used in Tamas Szamuely's "Galois Groups and Fundamental Groups" in following excerpt (see page 102):  We start with affine variety $X$ of dimension $n$. According Noether Normalization Lemma there exist an injection $\mathcal{O}(\mathbb{A}^n_k) = k[x_1,...,x_n] \to  \mathcal{O}(X)$.  The contravariant category equivalence between affine varieties over $k$ and that of finitely generated reduced $k$-algebras induce a surjection $\phi: X \to \mathbb{A}^n_k$.  Let $M_p=(x_1-a_1,..., x_n -a_n)$ an maximal ideal of $\mathbb{A}^n_k$.  I have following two questions:   Why is the fiber $\mathcal{O}(X)/M_P \mathcal{O}(X)$ a finite dimensional $k$-algebra? If 1. holds: Why does it imply that a finite dimensional $k$-algebra has finitely many maximal ideals?

Let $K$ be a field and let $R$ be a $K$-algebra with unity which is finite dimensional as a $K$-vector space. Prove that $R$ has only finitely many prime ideals all of which are maximal. (Hint: Chinese remainder theorem)   My attempt: We have $R \simeq K^n$, for some $n$, as vector spaces. I claim that there are finitely many ideals of $K^n$. Let $I$ be an ideal of $K^n$ and $(a_1, a_2,...,a_n) \in I$. For every entry $a_i$, we have two choices, either $a_i=0$ or not.  So we get $2^n$ many cases, and any case give a particular ideal of $K^n$ which are distinct from others.  Is my proof correct or am I missing some point? If it is true, how can we give a proof by using the Chinese remainder theorem? Thanks!


My wife and son will travel to Dhaka, Bangladesh from Edmonton, Canada. They have eight hours layover in Amsterdam Airport. They are Bangladeshi passport holders but they are Permanent Residents in Canada.  Do they require transit visas for Amsterdam?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I need query of looping in stored procedure for table like this:  Table Matrix Report  | Nama  | Motor   | |-------|---------| | Abdul | Vario   | | Abdul | Beat    | | Mei   | Supra   | | Leli  | Supra   | | Budi  | Megapro | | Ali   | CB150   |   Output :  | Nama   | Vario | Beat | Supra | Megapro | CB150 | |--------|-------|------|-------|---------|-------| | Abdul  | 1     | 1    | 0     | 0       | 0     | | Mei    | 0     | 0    | 1     | 0       | 0     | | Leli   | 0     | 0    | 1     | 0       | 0     | | Budi   | 0     | 0    | 0     | 1       | 0     | | Ali    | 0     | 0    | 0     | 0       | 1     |   I need dynamic query because if I added new data, they automatically sum up.


I'm doing a regression analysis which involves 4 independent variables (IV). I performed a Shapiro-Wilk test to test the normality of of each of the IVs and it turned out that the the test showed a value less than 0.05 (which means the data is not normally distributed).   So the question is how do i make my data to follow a normal distribution. Because all parametric tests are based on the assumption that the data is normally distributed.  My data set consist of 26 records (n=26). The dependent variable is House Price Index.  While the IV is Gross Domestic Product, Population, Lending Rates and Gross National Income.  Therefore I'm trying to come up with a regression model with these variables. But im facing the normality problem in the IV and DV data distributions.  Thank you.

I am trying to perform a multiple regression in R. However, my dependent variable has the following plot:    Here is a scatterplot matrix with all my variables (WAR is the dependent variable):    I know that I need to perform a transformation on this variable (and possibly the independent variables?) but I am not sure of the exact transformation required. Can someone point me in the right direction? I am happy to provide any additional information about the relationship between the independent and dependent variables.  The diagnostic graphics from my regression look as follows:    EDIT  After transforming the dependent and independent variables using Yeo-Johnson transformations, the diagnostic plots look like this:    If I use a GLM with a log-link, the diagnostic graphics are:


If I have a good measure of the AUC, what does it tell me in relation to the model and its variables?

Akaike Information Criterion (AIC) and the c-statistic (area under ROC curve) are two measures of model fit for logistic regression. I am having trouble explaining what is going on when the results of the two measures are not consistent. I guess they are measuring slightly different aspects of model fit, but what are those specific aspects?  I have 3 logistic regressions models. Model M0 has some standard covariates. Model M1 adds X1 to M0; model M2 adds X2 to M0 (so M1 and M2 are not nested).  The difference in AIC from M0 to both M1 and M2 is about 15, indicating X1 and X2 both improve model fit, and by about the same amount.  c-statistics are: M0, 0.70; M1, 0.73; M2 0.72. The difference in c-statistic from M0 to M1 is significant (method of DeLong et al 1988), but the difference from M0 to M2 is not significant, indicating that X1 improves model fit, but X2 does not.  X1 is not routinely collected. X2 is supposed to be routinely collected but is missing in about 40% of cases. We want to decide whether to start collecting X1, or improve collection of X2, or drop both variables.  From AIC we conclude that the variables make similar improvement to the model. It's probably easier to improve collection of X2 than start collecting a completely new variable (X1), so we would aim to improve X2 collection. But from c-statistic, X1 improves the model and X2 does not, so we should forget about X2 and start collecting X1.  As our recommendation depends on which statistic we focus on, we need to clearly understand the difference in what they are measuring.  Any advice welcome.


I am currently writing a simple java text game in witch you play the computer in rock paper scissors.   I cant figure out why my code is not working right. im sure i did something stupid or something. please help.          System.out.println("Welcome to rock paper scissors! select 'Rock', 'Paper', or 'Scissors'");      Scanner scan = new Scanner(System.in);      while(playerscore <2 && computerscore <2 ){         String player = scan.next();         System.out.println("you chose "+player+".");          //convert lowercase to capital         if(player.equals("rock")){                   player = "Rock";         }         else if(player.equals("paper")){             player = "Paper";         }         else if(player.equals("scissors")){             player = "Scissors";         }          Random ran = new Random();         int computer = ran.nextInt(3);          if(computer == 0){             System.out.println("Computer chose rock.");             if(player.equals("Rock")) {                 tie();             }             else if (player.equals("Paper")){                 lose();             }             else if(player.equals("Scissors")){                 win();             }          }         else if(computer == 1){             System.out.println("Computer chose paper.");             if(player.equals("Rock")){                 win();             }             else if (player.equals("Paper")){                 tie();             }             else if(player.equals("Scissors")){                 lose();             }}          else if(computer == 2){             System.out.println("Computer chose paper.");             if(player.equals("Rock")){                 lose();             }             else if (player == "Paper"){                 win();             }             else if(player.equals("Scissors")){                 tie();             }}         }           }    public static int playerscore = 0; public static int computerscore = 0;  public static void tie(){     System.out.println("You and the computer tied!");     return;  } public static void win(){     System.out.println("You won that round!");     playerscore++;     System.out.println("you now have "+playerscore+" points");     return; } public static void lose(){     System.out.println("You lost that round!");     computerscore++;     System.out.println("The computer now has "+ computerscore + " points"); }   `

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


Some time ago I asked a question why Dynamic pressure is considered scalar.     This still puzzles me so I hope to give a scenario that doesn't make sense to me   If mass fluid flow always occurs from high pressure to low and we consider that  Bernoullis tells us that Total pressure is constant along a streamline * how do we explain flow without considering the vectors of the components of that total pressure?    Total Pressure along a streamline of unchanging height is constant and is the sum of Static pressure and Dynamic Pressure components ?

I have a final exam tomorrow for fluid mechanics and I was just looking over the practice exam questions. They do not provide solutions. But pretty much I have to define pressure at a point and also say why pressure is scalar instead of a vector.  I am thinking pressure at a point is $P=\lim_{\delta A \to 0} \frac{\delta F}{\delta A}$. Please let me know if I am wrong.   But I do not know at all why pressure is a scalar instead of a vector. I know it has something to do with $d \mathbf{F}=-Pd \mathbf{A}$


In the next couple of weeks I need to present an IT presentation for future I equipment for the small company I would with.  The have been shrouded by the Microsoft and Apple blanket and introducing Ubuntu to them is going to be a tough task.  Can anyone give me some advise who has had the task of pitching Ubuntu for business being the favourable OS over Windows which they are currently using?  I will say none of them are tech-savvy and some of them don't even know how to send emails.  Any advice would be gratefully appreciated.

My office is going to buy a bulk number of desktop PCs (for developmental purposes).  I encouraged them to buy PCs without a pre-installed OS and then install Linux. My colleagues agree with me but they are not regular users of any Linux-based OS, so they want to choose a Linux OS which is best for our purposes and user-friendly and I suggested Ubuntu.  Now I want some data to support my position, what's so good about Linux and specifically Ubuntu?


For:  $hello="hello > world"   Why does echo not print the newline for:  echo -e $hello   But if I put $hello in quotes it does.   $ echo "$hello" hello world   Is this because of ANSI-C Quoting? Shouldn't echo -e interpret the newline I inputted?

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I'm pretty new to Java and in an effort to learn more I'm trying to make a game whereby you're given a random lyric from a song, and then the song title and artist.   This would be pretty easy, however I wanted the lyric to be random, and then print the artist and song title using a seperate method. My problem is that I'm not sure how to go from printing one random string to printing a specific answer.  I currently have the lyrics and the answers in a hashmap with the lyrics as keys and answers as values, and can print random keys by turning them into an arraylist using this method  public void randomLyrics()     {         ArrayList<String> lyricKey = new ArrayList<String>(lyrics.keySet());         if(lyrics.size() > 0) {             Random rand = new Random();             int index = rand.nextInt(lyrics.size());             System.out.println(lyricKey.get(rand.nextInt(lyrics.size())));         }     }   however I'm pretty sure that this isn't the right way to go about it, and am not sure how I would go about printing the answers seperately.   Any help would be much appreciated.  Also just to clarify, I want to call a method (randomLyrics) which will display a random lyric such as "that's me in the corner, that's me in the spotlight" and then call a seperate method (answer) which would then print "Losing My Religion - R.E.M."   Many thanks

If I have an object implementing the Map interface in Java and I wish to iterate over every pair contained within it,  what is the most efficient way of going through the map?  Will the ordering of elements depend on the specific map implementation that I have for the interface?


I'm kind of new to blender and nodes are something I'm just not able to understand.   What are nodes used for? What do the connections accomplish?  What connections can be made i.e. the connections that make sense?

I'm a bit new to Blender, and in trying to learn more, I've stumbled across nodes.  What are nodes, and how do I use them?


Here is the error hope i can get some help, i show you the update manager and the line of the error, if you need something else just ask for it.  E: Malformed line 59 in source list /etc/apt/sources.list (dist parse) E: The list of sources could not be read.   Error line:  deb http://archive.canonical.com/ partner

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


I cannot delete files from my cloud account.  Please tell me how to delete files/folder from my Ubuntu One cloud account.

I'm using Ubuntu 12.10 and I'm having a Ubuntu One account. I synchronize a photo folder with it. Synchronizing is OK and my photo of that folder is in that cloud. The thing is now I want to delete some photos of that folder in that cloud but there is no option to delete a photo.  How do I remove some photos in the cloud?  Thank you.


I was reading on the double dual of a vector space $V$ recently. I was wondering what applications (within mathematics) there are for this concept and/or what was the motivation for the development of this theory.

I am helping my brother with Linear Algebra.  I am not able to motivate him to understand what double dual space is.  Is there a nice way of explaining the concept?  Thanks for your advices, examples and theories.


For example, if I ask someone "What does it feel like to be a gay Christian?" I'm suggesting that the person to whom I'm asking is gay and Christian, neither of which may be true.

I remember there was a thread here on English.SE this month where someone explained this, but I can't remember how it was called. An example:     Where have you stolen this product?   This question implies that you've stolen this product, although I don't know for a fact you really did.


I'm trying to create a rubber stamp effect on a logo and am following  that has me use a combination of Live Trace and Pathfinder to accomplish the effect.  Here's my interpretation of what the author is suggesting:   Live Trace on a complicated texture (e.g. zoom in picture of stone or concrete);  delete the white space from result;  copy my logo behind this layer;  make sure my logo is selected; Pathfinder -> Subtract.   The result is various objects (e.g. the letter "T") gets deleted, and those deletes do not align with the Live Traced texture.  My logo has a layer that has several different objects within it (e.g. text object, some lines, etc.).   I suspect (based on my very limited understanding of Illustrator) that I need to combine all the objects/layers of my logo into one object. I could be completely wrong though, and can't figure out how to do this combining in the first place.   Regarding this subgoal, perhaps it's worth noting that if I resize this group of objects I call my logo, the stroke size remains unchanged. I'd prefer these to scale w/ my resizing.  So, 1) how can I convert my logo so that it behaves as if I converted it to a PDF and then imported it?   and 2) For the rubber stamp tutorial, if I'm wrong about this missing step of merging my logo's objects, is there some other step that I'm missing?

So I have this image as vector and a grunge image as vector:     I can easily mask the grunge part from the image in Photoshop:    But when I try to do this on Illustrator with pathfinder always get funky results:    I can use the Pathfinder tool on simple one object at a time, subtract from front etc..  But how can I make this with these all layers and groups?


All teachers are intelligent. All teachers are well-paid. From the Star Test, we can deduce that the argument must be invalid with whatever conclusion (according to the classical syllogism figures), because All T* is I. All T* is W. Here T is double-starred, so no conclusion follows. But I find the conclusion ∴Some I is W is also reasonable. So there are some limitations to the Star Test. How can we specify them?

I found the following exposition of darapti on wikipedia:    All squares are rectangles. (MaP)    All squares are rhombuses. (MaS) ∴ Some rhombuses are rectangles. (SiP)   As far as I can see, this is of the form:   all A's are B's  all A's are C's  ∴some C's are B's  I was watching a talk by the logician Graham Priest, where he stated that darapti is now invalid but he didn't offer an explanation.  I was wondering if anyone could show why it is invalid, by way of an example?  Thanks.


In my task manager, I have two entries for svchost.exe - one taking up 300MB of memory and the other 75MB.  Is that normal? If not, what should I do? What can the problem be? I don't remember seeing svchost.exe take up this much memory before.  OS: Windows Vista Home Premium SP1

I'm running Windows 7. It seems that svchost is eating up a lot of memory.   The user name for the particular svchost instance is "Network Service". The description is "Host Process for Windows Services".   Sometimes it eats up 50% of the CPU usage. Other times, it's just under 5%. I can't figure out when it's 50% and when it's not. But it fluctuates often -- even when I've just booted up and no programs were started.  How do I diagnose this?


I have worked on a few Drupal projects that used features.  I am usually perplexed by the way the way functionality is grouped.  I'm guessing that most of them were created as needed and by different developers that did not want to meddle with other people's features.  The outcome is usually a mess of different naming and grouping schemes.  Currently, I have the opportunity to create a site from scratch, and I want to start using a good methodology for creating my feature groups.  I am tending towards making a gigantic feature that contains everything, and only rebuilding one feature every time an update is needed.  What is good/bad about doing this.  Also, I feel more responsible while considering building several different features for each bit of functionality.  However, I am not sure how granular to go, or if this is begging for conflicts later.  How should I be approaching this issue?

I'm relatively new to the  module and I've read contradictory recommendations online regarding whether it's easiest to maintain A) one big feature or B) several smaller features and then a "feature-controller" type module that lists all the smaller features as dependencies.  A bit about my specific situation: I'm using a local development -> dev server -> staging server -> live server workflow.  This particular site will almost certainly be the only one of its kind that I ever develop; I do not intend to use the features I create for this site on any other sites.  This makes me lean toward doing everything in one big feature because I've had problems in the past where I accidentally defined the same rules in multiple features and gotten into trouble.  However, in terms of structure this seems wrong to me-- there are different features/functions so they ought to be divided into separate features.  On the other hand, I feel like by doing this I may just create additional work and overhead for myself that won't benefit anyone.  Which approach is easier to maintain in actual practice-- one big feature or many smaller ones?


The base area and water depth is supposed to be the same for all three containers.   The pressure in a static fluid arises from the weight of the fluid and is given by the expression $P=\rho  gh$.  The expression tells us that the fluid pressure at the bottom of all three containers is the same because the depth is the same. If the pressure is the same then the normal force exerted by the bottom of the container on the fluid is the same since $F = P\times A$. But the normal force is also equal to the weight of the fluid which is different for all three containers. How is this possible? While I was trying to find an answer to this question on the internet, I found a couple of forums that said the reaction forces from the sides of the containers are responsible for this, but I can't see exactly how. If anyone could show the math of how that would work out, that would be helpful.

Scenario description  Lets assume both containers have a capacity of 300 litres.  One is a vertical tube  as shown in pic 1  Other one is more or less a V shaped containers as shown in pic 2  Both are at ground level  Question  No doubt that whole weight of 300 litres will act on the base of the tube (pic 1). But will the weight of the whole 300 litres act on the base of the container as shown in pic 2?  I.e if you keep both the containers on a weighing scale, for sure, it will show a weight of approx. 300 kg each.  But what I'm asking is whether the weight of whole 300 litres acts on the base of container 2 (since the container's walls are slanting, as opposed to the walls of the tube in pic 1).  If the whole weight will not act on the base of the container, can you state the reasoning and also the principle, so that I can further get to know about it?  Pic 1             |         |                    |         |            |         |            |         |            |         |            |         |            |_________|   Pic 2           \              /           \            /            \          /             \________/


I've been playing Puzzle Craft for four months now and am close to completing the app (or maxing the levels, at least). However, I have not yet found a single 'collection' (the items shown in the museum). How might I find these?

I have been playing Puzzle Craft, and trying to unlock the collectibles such as the cards, chess pieces, etc.  Obviously, to a certain extent, the drops are random, which makes it hard to tell whether I'm on the right track or not.  The ones I've received so far have been in chests.  What level of chest is required for each level of collectable?  Are there any other ways to earn them?


I would like to install the Airport version 5.6.1 on MacBook with High Sierra.  It already has the Airport Version 6.3.8 installed.  Can I have both installed and without removing the 6.3.8 and use the 5.6.1 instead.

I have a simple network setup, and have read some initial reviews that say the new Airport Utility 6 for Mac OS X lacks some of the advanced settings that the older utility provides. I depend on those settings for my network to operate properly.  Can I still keep the old utility around and use either tool or should I wait to upgrade until I'm sure all the bells and whistles I might need are added to the 6.0 version?    I am going to need to keep the older Airport Software around since some of my devices are too old for the new software, but I'm mostly interested in knowing that I won't be forced to abandon my current advanced settings if I try the new firmware or the new client software.


My machine config:     Threadripper 1950x 16-core  +  Gigabyte X399 aorus 7      32GB DDR4      Samsung NVME 960 512GB      UEFI mode with GPT partition scheme   Windows 10 Pro + Ubuntu Server 18.04 LTS  I previously had Windows 10 + Ubuntu 16.04 Server as dual boot and I never had any problems.  What I did so far:  1) I Installed Windows 10 x64 Pro (1803) on my machine - no problems  2) I tried to install Ubtunu 18.04 Server as dual boot but it did not detect existing windows OS. Tried multiple boots but no luck so finally installed Ubuntu causing windows wiped out  3) Then I installed Windows 10 (as dual boot) without disturbing Ubuntu partitions. No problems  4) Now only windows 10 boots so I followed  and fixed the issue but now Only Ubuntu boots  5) Then I followed   but it STILL does NOT detect Windows 10 OS but I can mount the windows  partition on Ubuntu. os-prober also sees the Windows OS but grub doesn't! Please see below and advise, Many thanks!  root@ubuntu18:~# mkdir -p /media/windows root@ubuntu18:~#  fdisk -l /dev/nvme0n1 Disk /dev/nvme0n1: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 01BADB0F-4C8E-4332-BA18-822F08CE451B Device             Start       End   Sectors   Size Type /dev/nvme0n1p1      2048   1050623   1048576   512M EFI System /dev/nvme0n1p2   1050624 361760767 360710144   172G Linux filesystem /dev/nvme0n1p3 361760768 370149375   8388608     4G Linux swap /dev/nvme0n1p4 370149376 370182143     32768    16M Microsoft reserved /dev/nvme0n1p5 370182144 976773119 606590976 289.3G Microsoft basic data root@ubuntu18:~# root@ubuntu18:~# mount -t ntfs-3g /dev/nvme0n1p5 /media/windows/ root@ubuntu18:~# os-prober /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi root@ubuntu18:~# update-grub Generating grub configuration file ... Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported. Found linux image: /boot/vmlinuz-4.15.0-20-generic Found initrd image: /boot/initrd.img-4.15.0-20-generic Adding boot menu entry for EFI firmware configuration done root@ubuntu18:~# df -h Filesystem      Size  Used Avail Use% Mounted on udev             16G     0   16G   0% /dev tmpfs           3.2G  1.6M  3.2G   1% /run /dev/nvme0n1p2  169G  1.7G  158G   2% / tmpfs            16G     0   16G   0% /dev/shm tmpfs           5.0M     0  5.0M   0% /run/lock tmpfs            16G     0   16G   0% /sys/fs/cgroup /dev/loop0       87M   87M     0 100% /snap/core/4486 /dev/nvme0n1p1  511M   29M  483M   6% /boot/efi tmpfs           3.2G     0  3.2G   0% /run/user/0 /dev/nvme0n1p5  290G  187G  104G  65% /media/windows   but no luck, Please advise.

I recently got a computer from school. It came with Windows 8.1 installed. I then installed another copy of Windows 8.1 (so it would use the built-in Windows Pro license) and upgraded it to Windows 10. I then installed Ubuntu alongside both Windows 8 and 10. Note that I made a separate 255MB ext2 partition for /boot. Now, when I boot the computer, I first see a GRUB prompt (I already un-hid the grub prompt 'cuz I like it that way) with Windows 8 and Ubuntu options. However, there is no Windows 10 option. If I select Ubuntu, the computer boots into Ubuntu. However, if I select the Windows 8 option, I then get sent to the Windows bootloader, where it then gives me options to boot either Windows 8 or Windows 10. (However, by this point, the computer has already loaded the kernel and all. Apparently Microsoft misunderstood the concept of a bootloader and decided that that meant "boot practically the entire system before actually showing the bootloader". Typical Microsoft.) How can I disable the Windows bootloader and add a Windows 10 option to GRUB? EDIT: Someone has answered telling me to disable the Windows bootloader. However, I still do not know how to add Windows to the GRUB OS list. Can anyone help with this? EDIT 2: After removing Windows 10 from the Windows bootloader with EasyBCD, it seemed that, after a few reboots, it would continually unhide itself and Windows 10 would reappear. However, I then later deleted Windows 10 from the list of OSes in msconfig, and it seems to have stayed deleted. However, I STILL have not managed to get Windows 10 to appear in GRUB. It's as if GRUB simply doesn't detect it. Also, I'll put this in the question so that people see it - I have tried using boot-repair, however, it has NOT helped any.


Bash Reference Manual says        'token' is either a 'word' or an 'operator'.   'Words' may not include unquoted 'metacharacters'.   'Space' is one of the 'metacharacters' but not'operator'.      So an unquoted space is not token?  How muck Tokens does the cmd "echo word;echo 'word and word'"have?

I am just learning about command line processing, and hoping someone can confirm how I am interpreting the following statement. In the book I am reading the first step in command line processing is:        Splits the command into tokens that are separated by the fixed set of metacharacters: SPACE, TAB, NEWLINE, ;, (, ), <, >, |, and &. Types of tokens include words, keywords, I/O redirectors, and semicolons      Am I right in thinking that  for  the command:  ls | more  ls and more are the tokens, and the pipe character is the meta character separating the two tokens?  I got bit confused as it goes on to say that < and > are meta characters, but then says that tokens can be I/O directors.


Question: This is the last part of a 5 part question I am working on. Let $(X,\mu)$ be a possibly infinite measure space. Assume $\exists r < \infty$ with $\|f\|_r < \infty$ and that $\|f \|_{\infty} < \infty$. Show that $\lim_{p \rightarrow \infty} \|f_p\| = \|f\|_{\infty}$.   This is from Real and Complex by Rudin, chapter 3 exercise 14.  Progress: I have shown that $\|f\|_{\infty} \le \lim_{p \rightarrow \infty} \|f\|_p$ as follows,  Fix $\epsilon > 0$. Let $E = \{x : |f(x)| > \|f\|_{\infty} - \epsilon \}$. Then observe $$ \|f\|_p \ge \left( \int_{E} |f|^p d\mu \right)^{1/p} > \left( \int_{E}(\| f \|_{\infty} - \epsilon)^{p} d\mu \right)^{1/p} = \left( \|f\|_{\infty} - \epsilon \right) \mu(E)^{1/p}, $$ thus, $\lim_{p \rightarrow \infty} \|f\|_p \ge \|f\|_{\infty} - \epsilon$ since $\mu(E) < \infty$.   I attempted something similar for the other direction, but could not say the measure of a set was finite like (I think) I need for this argument to work. Here is what I tried:  Since $\|f\|_r < \infty, \exists R$ so that $|x| > R \implies f(x) < \frac{1}{2}$. Let $A = \{ x : |x| \le R \}$ and $B = \{x : |x| > R \}$. Then, $$\|f\|_{p} \le \left( \int_{A} |f|^p d \mu + \int_{B} \frac{1}{2^p} d\mu\right)^{1/p} = \left( \int_{A} |f|^p d\mu + \frac{1}{2^p} \mu( B ) \right)^{1/p}.$$  If $\mu(B) < \infty$ this can easily show the desired result. Moreover, if I could show that there is a family of sets $\{B_p\}$ that act similarly so that $\mu(B_p)$ grows slower than $e^p$, then I can also complete the proof.  Thoughts?

Could someone help me prove that given a finite measure space $(X, \mathcal{M}, \sigma)$ and a measurable function $f:X\to\mathbb{R}$ in $L^\infty$ and some $L^q$, $\displaystyle\lim_{p\to\infty}\|f\|_p=\|f\|_\infty$?    I don't know where to start.


I have an SSD, that is used for OSes. Once when I was on Windows10, I divided it into two: C and D. It is 256GB, so I allocated 130 to C:, and 100 to D:. Also, I have a 2TB HDD which is for films (E:) and documents (F:). Both are 1TB each. I thought there would be nothing wrong with C, E, and F as long as I install ubuntu on D drive. When I install Ubuntu, and it asked which disk I am going to install, I removed other drives (C, E and F) using - button. Was that button formatting the disks and integrate partitions? There was no warning message... Anyway, I am using ubuntu on my D drive. But for some reason I cannot use Windows (Windows Boot Manager is gone) and I can see no E and F but 1.8TB /dev/sdc only. And I can't install Windows10 on D now. I successfully made a booting disk and installed without errors but no Windows Boot Manager is installed. I am really desperate so am asking these questions... Q1. Is there any way that I can retrieve the hard disk? or what happened? What have I done wrong? Q2. Why can't I install Windows? I've done this countless times. Is there some special work that is needed to be done when installing Windows after Ubuntu? The USB format is NTFS.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


Calculate: $$\lim_{x \to 0}\frac{x- \sin{x}}{x^2}$$  I would like to try but i don't find any idea i don't know how to use Hopital rule i tried to return $\cos$ to $\sin$ But it doesn't work a help

How to solve $\lim\limits_{x\to 0} \frac{x - \sin(x)}{x^2}$ Without L'Hospital's Rule? you can use trigonometric identities and inequalities, but you can't use series or more advanced stuff.


Here is my code Can someone tell me why I always get null pointer exception in the line "current.children.add(tempnode);" I have already revised it several times by getting the similar answer from here,but it can not work eventually. class Node{     int val;     List<Node> children;          public Node() {}      public Node(int _val) {         val = _val;         }      public Node(int _val, List<Node> _children) {         val = _val;         children = _children;         } }  public static Node BuildTree(Integer[] nodes) {         //Integer[] nodes=new Integer[] {1,null,3,2,4,null,5,6}         if(nodes==null||nodes.length==0)return null;         Queue<Node> treenodequeue=new LinkedList<>();         Queue<Integer> integerqueue=new LinkedList<>();         Node root=new Node(nodes[0]);         for(int i=1;i<nodes.length;i++)integerqueue.offer(nodes[i]);         while(!integerqueue.isEmpty()){             Node current=treenodequeue.poll();             integerqueue.remove(null);             while(integerqueue.peek()!=null) {                 Integer tempvalue=integerqueue.poll();                 Node tempnode=new Node(tempvalue); /******************************************************************/                 current.children.add(tempnode); /******************************************************************/                 treenodequeue.offer(tempnode);             }         }         return root;     }

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


Mine is Windows 7 both on laptop(home) and PC(office). I've also tested checked this from a school on Win8 PC . Why I can't ping any IPV6 address?  I've disabled Eset nod32 completely but still:  >ping ipv6.google.com Ping request could not find host ipv6.google.com. Please check the name and try again   While nslookup(Win7) is working fine:  >nslookup ipv6.google.com Server:  google-public-dns-a.google.com Address:  8.8.8.8  Non-authoritative answer: Name:    ipv6.l.google.com Address:  2404:6800:4007:805::200e Aliases:  ipv6.google.com   **IPCONFIG ** (Win8 PC)  >ipconfig /all  Windows IP Configuration     Host Name . . . . . . . . . . . . : CID-7244    Primary Dns Suffix  . . . . . . . : removed.ac.in    Node Type . . . . . . . . . . . . : Hybrid    IP Routing Enabled. . . . . . . . : No    WINS Proxy Enabled. . . . . . . . : No    DNS Suffix Search List. . . . . . : removed.ac.in  Ethernet adapter Ethernet:     Connection-specific DNS Suffix  . : removed.ac.in    Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller    Physical Address. . . . . . . . . : 78-45-C4-26-18-C7    DHCP Enabled. . . . . . . . . . . : Yes    Autoconfiguration Enabled . . . . : Yes    IPv4 Address. . . . . . . . . . . : 10.10.1.56(Preferred)    Subnet Mask . . . . . . . . . . . : 255.255.0.0    Lease Obtained. . . . . . . . . . : Monday, August 17, 2015 8:11:07 AM    Lease Expires . . . . . . . . . . : Friday, August 21, 2015 8:10:32 AM    Default Gateway . . . . . . . . . : 10.10.0.1    DHCP Server . . . . . . . . . . . : 10.1.1.18    DNS Servers . . . . . . . . . . . : 10.1.1.16                                        10.1.1.17                                        10.1.1.19                                        10.1.1.18    NetBIOS over Tcpip. . . . . . . . : Enabled  Tunnel adapter isatap.removed.ac.in:     Media State . . . . . . . . . . . : Media disconnected    Connection-specific DNS Suffix  . : removed.ac.in    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0    DHCP Enabled. . . . . . . . . . . : No    Autoconfiguration Enabled . . . . : Yes

I have found that ping google.com from my Windows 7 box has stopped working.  Below is the output - note that the IPv4 ping works, and Yahoo works. Is my local router at fault here?  C:\Users\Jeff>ping google.com  Pinging google.com [2001:4860:4007:801::1007] with 32 bytes of data: Destination net unreachable. Destination net unreachable. Destination net unreachable. Destination net unreachable.  Ping statistics for 2001:4860:4007:801::1007:     Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),  C:\Users\Jeff>ping -4 google.com  Pinging google.com [74.125.224.206] with 32 bytes of data: Reply from 74.125.224.206: bytes=32 time=5ms TTL=55 Reply from 74.125.224.206: bytes=32 time=5ms TTL=55  Ping statistics for 74.125.224.206:     Packets: Sent = 2, Received = 2, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:     Minimum = 5ms, Maximum = 5ms, Average = 5ms Control-C ^C C:\Users\Jeff>ping yahoo.com  Pinging yahoo.com [98.139.183.24] with 32 bytes of data: Reply from 98.139.183.24: bytes=32 time=98ms TTL=46 Reply from 98.139.183.24: bytes=32 time=86ms TTL=46  Ping statistics for 98.139.183.24:     Packets: Sent = 2, Received = 2, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:     Minimum = 86ms, Maximum = 98ms, Average = 92ms Control-C  C:\Users\Jeff>ping -6 google.com  Pinging google.com [2001:4860:4007:801::1005] with 32 bytes of data: Destination net unreachable. Destination net unreachable. Destination net unreachable.  C:\Users\Jeff>tracert google.com  Tracing route to google.com [2001:4860:4007:801::1008] over a maximum of 30 hops:    1  Destination net unreachable.  Trace complete.


there is a famous proverb in Nepal, i.e. कागले कान समात्यो भन्दैमा  म कागको पछि लग्नु. The meaning of this proverb to believe other blindly.  For example: "The man said someone that the crow grabbed his ear, and he without checking his ear chases the crow." The moral is we should not believe what other people say immediately. And I want proverb in this. Is there some PROVERB in English related to this scenario? Thanks 🙂

Is there a short phrase (one to three words), Latin or otherwise, that conveys "but consider the source"?  For example, "I heard that pigs fly on television (your phrase here)."  I'm thinking perhaps a phrase that begins with the Latin word "caveat".


I get stuck about using a vert after an object. More specifically, can I use 'rises' instead of 'rising' in the following sentence: "There are 130 of them altogether, each one 'rising' between 20 and 25 meters from the ground to support a frame of iron bars on which the roof originally rested". If it's accepted, please anyone can help me explain the difference when using it. And what are the contexts we should use the verb + ing like about sentences? Thanks in advance.

I have one question, what is the best way to say that sentence below? Are both grammatically correct?     He has been working on mobile development for 4 years and has published more than 15 apps.   or     He has been working on mobile development for 4 years, having published more than 15 apps.


What is the right way to include graphics when you are creating a modular document?  My directory structure is as follows:  /root --report.tex --mystyle.sty --/tex ----/literature ------literature.tex --/img ----biological_neuron.eps   My main file is report.tex whose content is as follows:  \documentclass[11pt, a4paper, twoside, openright]{book}  \usepackage{graphicx} \usepackage{my_style}  \begin{document}  \mainmatter \include{tex/literature/literature}  \bibliographystyle{plain} \bibliography{../../../Bibliography/Bibtex/SNN} \end{document}    The content of file literature.tex is as follows:  \chapter{A review}  \begin{figure}[h] \includegraphics{../../img/biological_neuron} \caption{A biological neuron} \label{Fig:BN} \end{figure}   Everytime I try to generate a pdf I get an error: File "../../img/biological_neuron" not found. I tried "/img/biological_neuron" instead of "../../img/biological_neuron" but that doesn't work either. One thing that does work is adding \graphicspath{img/} to report.tex. But I don't know if thats the right way to do it. Because even if I do \graphicspath{img/} I have to specify the path for any graphics in an included file as '../../img/biological_neuron' and I think after adding \graphicspath{img/}` we should have to just write '/biological_neuron'. I don't know if this is a bug or am I doing something wrong. Please enlighten. Thank you.

I am working on a project and i want to slim it down a litle so please help me with the following. I have a document structure like this:  /DocumentRoot  |-main.tex  |-title.tex  |  |-/chapter-1  |  |-/images  |  |-chapter-1.tex  |  |-/chapter-2     |-/images     |-chapter-2.tex   My document is like this:  \begin{document} \include{./title} \include{./chapter-1/chapter-1} \include{./chapter-2/chapter-2} \include{./chapter-3/chapter-3} \end{document}   in my chapters i use both some images and some heavy tikz plots so i use externalize and  draft options for quicker compilation. But i want the images to be placed in the respective chapter folders but for example in chapter 3 this works:  \includegraphics[width=\linewidth]{./chapter-3/images/img.jpg}   and this doesn't  \includegraphics[width=\linewidth]{./images/img.jpg}   for some reason xelatex has problems with the relative paths of included chapters. I also want to control the location output and the naming of the externalized tikz documents. Any help with that? I am working with miktex and texworks.


I have the a series of markdown files in the working directory:  $ ls *.md csv_reader.md  egrep.md  find.md  found_pdfs.md  osPathSep_help.md  readme.md  smtplib_help.md  today.md   I want to remove them except "today.md"  #!/usr/local/bin/bash for i in ./*.md ; do     if [[ $i != "today.md" ]]; then         echo $i     fi done   Run it and get   $ bash bash/remove_files.sh ./csv_reader.md ./egrep.md ./find.md ./found_pdfs.md ./osPathSep_help.md ./readme.md ./smtplib_help.md ./today.md   Nonetheless, the structured commands are not handy in the command line, how could I accomplish such a task with shorter commands

I have a directory containing a large number of files. I want to delete all files except for file.txt . How do I do this?  There are too many files to remove the unwanted ones individually and their names are too diverse to use * to remove them all except this one file.  Someone suggested using   rm !(file.txt)   But it doesn't work. It returns:  Badly placed ()'s    My OS is Scientific Linux 6.  Any ideas?


Prove that the sequence $a_n = \sin(n)$ cannot converge when $n \rightarrow \infty $  I tried to find two subsequences that converge to different values but I am having trouble with the fact that $n \in N$ and so I can't pick values in the whole domain of the function.  Maybe there is an other way.

Using only the delta definition of a limit, how can we prove that the sequence $\{a_n\}$, where $a_n = \sin n$, as $n$ tends to infinity does not have a limit?  Thanks!


A friend of mine has noticed something I say differently to move people. Most would contract the sentence "we have not done" into "we haven't done". I turn it into "we've not done". This seems to be correct as well, but people have told me its odd or wrong. I'm I incorrect or just different? If it is of any importance I am from the south-east of England. Any information on this will be kindly received.  Thanks in advance

If I have three consecutive words where each adjacent pair can be contracted, e.g. "I would have" or "You are not", is there a difference between the two possible contractions, e.g. "I would've" or "You aren't" versus "I'd have" or "You're not"? If so, when is each form preferred?  Does the preference depend on what comes after it (such as its part of speech), e.g. "You are not a fool" versus "You are not foolish" versus "You are not going to fool me?"


I have to make some certificates. The main problem is not the certificate itself but to change names between pages. Can I create a list of names, each of appears once for page?

I need a dynamic solution to produce questionnaires from a database of questions which gets updated from time to time. I thought of LaTeX for set out the layout but the question is whether LaTeX can import specified fields of an Acces or Excel or whatsoever external "database".  I also thought about WORD Macros and .NET programming, but I preferred LaTeX.


I want to prove that $P(\mathbb{R}) = \mathbb{R}^\mathbb{R} $ ?!  I know that $ \mathbb{R} = \{0,1\}^ \omega = P(\omega)$  Also that $(A^B)^ C =  A^{B \times C}$  And that $A = B$ imply that $P(A) = P(B)$   Here $P$ is the power set and $=$ means that they have the same cardinality  And $A,B,C$ are sets.

How does one compute the cardinality of the set of functions $f:\mathbb{R} \to \mathbb{R}$ (not necessarily continuous)?


Well, I've been a victim of Ddos attacks and I really can't figure out how to avoid it. On some machines it works, while on some it doesn't or probably I'm doing it wrong in some way,  Attackers are using multiple IPs to attack my game server ports that make my game-server output 1mb/s to each IP Address, these are UDP reflective attacks technically. Here is how I see to protect them,      iptables -A INPUT -p udp -m state --state NEW -m recent --set --name DDOS --rsource       iptables -A INPUT -p udp -m state --state NEW -m recent --update --seconds 1 --hitcount 5 --name DDOS --rsource -j DROP   Technically this would block every attacker on UDP ports. I check if the attacker is blocked using "iftop" or "tcpdump" when I see that the output to attacker's IP becomes 0, this confirms me that the protection is working.  On my CentOS 6 machine running iptables 1.4.7, I am using similar method to block it and its really weird that it works sometimes and the next hour it doesn't. After a lot of tries, I restarted my system and iptables, protection worked fine and attacker was blocked. I logged into my system today and he is attacking me again and although I restarted iptables, hes not getting blocked. I dont want to restart my system again and again to make it work so what could be the issue?  Also, some people say UDP is state-less but whatever it technically is - I've always used this command and it has worked before for me, why not now or why partially now?

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I installed skype-ubuntu-precise_4.3.0.37-1_i386.deb from the Skype website, but when I start Skype, it is still 4.2, not 4.3. I've tried sudo apt-get remove skype, then installing it, but it didn't help.  Can someone help me?

Note: The legacy Skype for Linux application (v4.*) is now discontinued and was removed from Canonical’s partner repositories, so this question and its answers are obsolete. Please refer to  of our .  Skype 4.3 is just released with considerable improvements. As a regular Skype user I want to use the latest Skype on my Ubuntu 14.04, but there is no updates from Update Manager. Even in Skype website only Skype 4.3 is available only for Ubuntu 12.04. Is there anyway to use this latest Skype on Ubuntu 14.04 or how much we have to wait for the update?


I have used apt-get a lot to install programs, but I just recently wanted to use Abricotine markdown editor. The way it says to install it is by downloading and extracting a zip file. I do that, and the program has an executable file there along with some other folders and stuff.  I'm new to Linux in general, so could someone tell me where I should move these files and folders? I tried using the terminal to move the whole unzipped directory to /usr/shares/, but then when I search the computer (I'm on Ubuntu 16.10) it doesn't show up.  Where should these files go?  Thanks

Occasionally I install applications manually, rather than using apt or another package manager.   What location (/usr/, /usr/local/, /opt/, /home/, etc.) is suggested by "best practices" for the installation of user applications?


In Egypt, I applied for the General Medical Council identity check and the visa was refused two times.  The first time, I was going as a visitor, but they said that I didn't show that I have sufficient funds to cover the cost of my travel. I did include a letter from my employer showing my and bank statement.  The second time, I asked my father to add some funds to my bank account and I included another bank statement with funds in US dollars where my salary is transferred.   I stated that my father will help me to cover the costs of my visit, noted that he had transferred money to me, and included his bank statement.    I was refused, saying that I must explain my own circumstances and my purpose of travel, and that my finances would not be sufficient. It was also noted that there was no evidence that my father was giving me the money.   My concern is that my GMC date expires in 45 days. Is there anything I can do?

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I've installed a snap-packaged application, which has in turn created a folder called ~/snap.  Is it possible to move this folder somewhere else? For example, by setting an environment variable?

I'm not particularly fond of apps cluttering my $HOME directory with their own files or directories. It's rarely a problem, because most apps have the courtesy to hide their data by prefixing it with a dot or conforming to the ~/.config standard. But not snap.  Q1: Have I misunderstood this directory?  Is ~/snap really a directory which I'm supposed to enter and access on a daily basis on a par with ~/downloads, ~/pictures, ~/work, etc?  Q2: In any case: Can I move it e.g. ~/.snap?  I can't find anything like /etc/snap, /etc/default/snap, or ~/.config/snap to tweak things. I tried export SNAP_USER_DATA=$HOME/.snap but it didn't work.


I have a dual-boot PC with Windows 10 and Ubuntu 16.04. I keep my Windows on fastboot mode and hence the NTFS partitions used in Windows, not open in Ubuntu. I want them to open in Ubuntu while keeping Windows in hibernation (fastboot mode).  I already searched and googled but I can't get an acceptable solution. How can I do so?

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I am trying to write a shuffle method for a card game program. The method works by dividing the deck in half, then interleaving the cards from alternate halves. The issue is, the method simply keeps the array as is. Nothing is being shuffled.  /**      * Apply a "perfect shuffle" to the argument.      * The perfect shuffle algorithm splits the deck in half, then interleaves      * the cards in one half with the cards in the other.      * @param values is an array of integers simulating cards to be shuffled.      */     public static void perfectShuffle(int[] values) {         int[] shuffled = new int[values.length];         int k = 0;         for (int j = 0; j < (values.length + 1) / 2; j++){            shuffled[k] = values[j];            k += 2;         }         k = 1;         for (int j = (values.length + 1) / 2; j < values.length; j++){             shuffled[k] = values[j];             k += 2;         }         values = shuffled;     }   Where's the bug?

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


The earth is traveling around the sun at around 65,000 mph. An asteroid or other large object is traveling around 35,000 mph. Depending on the direction of the impact, the object could strike head on at a combined speed as high as 95,000 mph, or coming from the other direction not even be able to "catch" the earth. If this is correct could an impact range from 95,000 mph down to almost 0? I've never heard this explained, in fact I have always heard that the speed of an impact stated at around 35,00 mph.

Could an object from outer-space with the right velocity and orbit come into contact with the surface of our planet in a manner that wouldn't cause it to burn in our atmosphere?


Here are two examples of lists  list = [["mo", "thu"], ["we", "fri"], ["mo", "mo"]] list2 = [["mo", "fri", "fri"], ["we", "we"]]   So these lists come in random order. I've given two examples here. What I want to do is compute all possible ways these lists can be permutated. On the level where it's list[1] * list[2] * list[3]. All possible combinations. A smaller example what I would like to reach is this:  list3 = [["we", "thu"],["fri", "thu"]]   -->   [["we", "fri"], ["we", "thu"], ["thu", "fri"], ["thu", "thu"]]   Also, the lists are random so the amount of elements in the list or the nested lists can vary. I can python this out by alot of code but I was hoping there is an easier way to this.   Cheers

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


I have encountered this function:      def square_it(var):     return [var *2] *2  zoo = (square_it([1])) zoo[1][0] +=1 print(zoo)   I dont understand why the output is: [[2, 1],[2,1]] and not [[1, 1], [2, 1]] can someone please explain this? Thanks.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I have this common, annoying problem while trying to access Google Play Store from my phone. It just shows 'no connection', and won't load, even though the internet access is surely working. The suspected cause is a synchronization error of my Google account, likely due to incorrect time settings (it's reported while running WhatsApp for example). Here's what I've done so far:   Set the time automatically Manually set the time, without using the network Clearing cache of Google Play store application Reinstalling Google Play store manually using .apk Logging out and back in with my Google account Rooting the phone and using ClockSync app to set the time Doing a factory reset of my device Making sure Freedom application is not installed   I'm slowly running out of ideas...if anyone has the smallest hint, I'll be really grateful. I'm using Android 4.2.2.


I have the following function:  def prime(number):     for num in range(1,number):         if num > 1:             for i in range (2, num):                 if (num%i == 0):                     return("not a prime")             else:                 return(num)  print(prime(9))      Output: 2   Please explain where I am doing a mistake or how can I get a list of all prime numbers in any input range ex:-9 or 100 or 300.

The canonical way to return multiple values in languages that support it is often . Option: Using a tuple Consider this trivial example: def f(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return (y0, y1, y2)  However, this quickly gets problematic as the number of values returned increases. What if you want to return four or five values? Sure, you could keep tupling them, but it gets easy to forget which value is where. It's also rather ugly to unpack them wherever you want to receive them. Option: Using a dictionary The next logical step seems to be to introduce some sort of 'record notation'. In Python, the obvious way to do this is by means of a dict. Consider the following: def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return {'y0': y0, 'y1': y1 ,'y2': y2}  (Just to be clear, y0, y1, and y2 are just meant as abstract identifiers. As pointed out, in practice you'd use meaningful identifiers.) Now, we have a mechanism whereby we can project out a particular member of the returned object. For example, result['y0']  Option: Using a class However, there is another option. We could instead return a specialized structure. I've framed this in the context of Python, but I'm sure it applies to other languages as well. Indeed, if you were working in C this might very well be your only option. Here goes: class ReturnValue:   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return ReturnValue(y0, y1, y2)  In Python the previous two are perhaps very similar in terms of plumbing - after all { y0, y1, y2 } just end up being entries in the internal __dict__ of the ReturnValue. There is one additional feature provided by Python though for tiny objects, the __slots__ attribute. The class could be expressed as: class ReturnValue(object):   __slots__ = ["y0", "y1", "y2"]   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  From the :  The __slots__ declaration takes a sequence of instance variables and reserves just enough space in each instance to hold a value for each variable. Space is saved because __dict__ is not created for each instance.  Option: Using a  (Python 3.7+) Using Python 3.7's new dataclasses, return a class with automatically added special methods, typing and other useful tools: @dataclass class Returnvalue:     y0: int     y1: float     y3: int  def total_cost(x):     y0 = x + 1     y1 = x * 3     y2 = y0 ** y3     return ReturnValue(y0, y1, y2)  Option: Using a list Another suggestion which I'd overlooked comes from Bill the Lizard: def h(x):   result = [x + 1]   result.append(x * 3)   result.append(y0 ** y3)   return result  This is my least favorite method though. I suppose I'm tainted by exposure to Haskell, but the idea of mixed-type lists has always felt uncomfortable to me. In this particular example the list is -not- mixed type, but it conceivably could be. A list used in this way really doesn't gain anything with respect to the tuple as far as I can tell. The only real difference between lists and tuples in Python is that lists are , whereas tuples are not. I personally tend to carry over the conventions from functional programming: use lists for any number of elements of the same type, and tuples for a fixed number of elements of predetermined types. Question After the lengthy preamble, comes the inevitable question. Which method (do you think) is best?


I have tried on many different browsers and computers to format my SO questions, but they always end up showing up as unformatted paragraph text, and someone else formats them. I indent by text four spaces for code, but it does not work. Original edit screenshot:   Source of edit:

Steps to reproduce: 1. Note that instructions at right of screen say "indent code by 4 spaces." My interpretation of this is that lines that are indented by four spaces will be recognized as code. 2. Ask a new question on stackoverflow. 3. In the message text area, type the following: This is some code[enter][space][space][space][space]++n; 4. Note that the code is indented four spaces but the preview does not format it as code. 5. Post the message. Note that the code is not properly formatted.  Is this a bug or am I not understanding the instructions correctly?  I am aware of this post   and its apparent duplicate at . Both of those deal with code that is part of a list. My question concerns code that is not part of a list so I have started a separate discussion.  Edit: changed the title to make clear that this question has nothing to do with lists or and is unrelated to the several other posts on meta that are related to code indentation problems in the context of lists.


I just installed Ubuntu 15.10 and after login, i do have only the new wallpaper, I do only have that, no menus, no interface, nothing...  I see the login screen, once I log in, just the wallpaper. If i connect a USB the explorer opens and I can see all the folders, including the root.  Any suggestion?   UPDATE:   I have tried to reinstall, reset, remove and install both Ubuntu-desktop and unity fully and no solutions.  I have tried to activate the unity plugin. (was already activated). I have tried to reset the user files. tried to reinstall everything (.iso and OS).   None of those worked for me.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


Hey guys can't find to figure this one out  $\sum_k^n k^{2}\left(\begin{array}{c}n\\ k\end{array}\right) = n(n+1)2^{n-2} ,k\geq0$  Maybe one of you can help.

Find a combinatorial argument for the following binomial identity:   $$n(n+1)2^{n-2} = \sum_{k=1}^{n}k^2\binom{n}{k} .$$   Algebraic proofs can be found at  , and a related identity at  .


Importing a 'smoke' image as a plane shows no transparency. Still have black background.    What other settings should I tweak?

I must be missing something here.  I'm doing an extremely simple Import Image as Plane using the AddOn and the imported image has an alpha background but it renders (and even previews in the material preview) as black where the alpha background should be.  When I import, I select Emission & Transparent so the material setup is automatic.  I've read similar issues but people are typically missing the transparent node and connecting the Alpha channel from the image into the Mix Node factor.  But this is all here.  I must be missing something really stupid but I've wasted so much time trying to fix this thing.  Any help would be greatly appreciated.  Not sure if it matters but I'm using 2.74 RC2.  Many thanks!  I created this dummy blend file to test outside my project but problem still exists.  Here is the simple .blend file:


Let the line equation be represented as $ax+by+cz+d=0=a'x+b'y+c'z+d'$, is there any way to convert this equation of line in parametric form $\frac{x-\alpha}{l}=\frac{y-\beta}{m}=\frac{z-\gamma}{n}$.  There is one way put x=0, we can find value of y and z , then put y=0, we can find the value of x and z using two find we can find the slope. I want a simple method of solving it.

How to calculate the intersection of two planes ?  These are the planes and the result is gonna be a line in $\Bbb R^3$:  $x + 2y + z - 1 = 0$  $2x + 3y - 2z + 2 = 0$


Would it be possible that Voldemort knew that Harry carried a piece of his soul in him before he tried to kill Harry? In knowing what Voldemort knew, we are able to tell more about the core motivation that Voldemort had in wanting to kill Harry. Yes, we know that he wanted to kill Harry in order to prove that he could not be stopped/megalomania or whatever, but was he willing to kill a part of himself in order to achieve that?  As per the question, when Voldemort killed Harry, wouldn't he be able to deduce that there are only two fragments of his soul left, in the snake and his own body?

Given that Harry was one of the Horcruxes, it is not in Voldemort's interest to kill him. Harry is one of the keys to Voldemort's own survival. Why is Voldemort so bent on killing Harry despite Harry being so important to his own survival?