at the start of my application (In the MainActivity onCreate) I ask if there is an internet connection with following code:  boolean connected = false; ConnectivityManager connectivityManager = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED ||         connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {     //we are connected to a network     connected = true; } else     connected = false;   but I get following crash report in my Google Dev console from mixed android versions:  java.lang.RuntimeException:     at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2944)    at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3079)    at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:78)    at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108)    at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68)    at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1836)    at android.os.Handler.dispatchMessage (Handler.java:106)    at android.os.Looper.loop (Looper.java:193)    at android.app.ActivityThread.main (ActivityThread.java:6702)    at java.lang.reflect.Method.invoke (Native Method)    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:911) Caused by: java.lang.NullPointerException:     at com.fujigames.memesoundboard.MainActivity.onCreate (MainActivity.java:99)    at android.app.Activity.performCreate (Activity.java:7136)    at android.app.Activity.performCreate (Activity.java:7127)    at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1271)    at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2924)   MainActivity.java:99 is the code I have shown above. Why am I getting this crash and what should I do to fix it? Thanks.

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?


When proofing my résumé’s cover letter, I found that I am writing I way too much. I have read that this is a potential turn-off for employers.   Does anyone have suggestions on how to replace I with something else?   This seems to happen more frequently at the beginning of my sentences.

I often find myself writing  of comments to blog posts and responses on forums, and have noticed a tendency to start a lot of sentences with 'I'. 'I think...', 'I had no idea', 'I used to...' etc. Is there a general style guideline about avoiding this, or is is acceptable when you're writing opinionated pieces?  Repetition in general is poor style in my book, but when I start to shift around my sentences to avoid starting them with 'I', they tend to sound too stilted.


Let $f(z)=\sum\limits_{n=0}^\infty a_nz^n$ and $R$ its radius of convergence. If $f$ is not constant on $D(0,R)$ and $|a_1|\geq\sum\limits_{n=2}^\infty n|a_n|R^{n-1}$, show that $f$ is injective on $D(0,R)$.  My attempt:   $$|a_1|=\left| \sum\limits_{n=1}^\infty na_nz^{n-1} - \sum\limits_{n=2}^\infty na_nz^{n-1}\right|\leq  |f'(z)| + \left|\sum\limits_{n=2}^\infty na_nz^{n-1}\right|\leq |f'(z)| + \sum\limits_{n=2}^\infty n|a_n||z|^{n-1}\stackrel{(*)}{\leq} |f'(z)|+\sum\limits_{n=2}^\infty n|a_n|R^{n-1}$$  The inequality $(*)$ is strict if at least one of the $a_n$, $n\geq 2$ is not $0$. We can assume that, because otherwise, $f(z)=a_0+a_1z$, which is injective.  Hence, $|f'(z)|> |a_1|-\sum\limits_{n=2}^\infty n|a_n|R^{n-1}\geq 0$. In particular, $f'(z)\neq 0 \ \forall z\in D(0,R)$.   Now, I tried to use the Inverse Function Theorem (local version), but I don't think this suffices to show global injectivity in $D(0,R)$.

Let $f(z)=\sum_{n=0}^{\infty}a_nz^n$ be a holomophic function in the unit disc. Show that if $$\sum_{n=2}^{\infty} n\vert a_n \vert <\vert a_1\vert$$ and $a_1\not = 0$, then $f$ is injective.   I am able to show that $f'$ never vanishes by showing that $\vert f'-a_1\vert <\vert a_1\vert$, but that doesn't imply that $f$ is injective. For example, $e^z$ is not inejective but its derivative never vanishes. What is required to prove that $f$ is injective? How do you show $f$ is injective on any set?


I know lots of questions about why not use goto, why goto is bad practice, why goto was create by devil, why the fingers of those who type goto should be ripped off, etc...  And in  , , and even at  it's possible to find reasons pro / against goto.  Even Stackoverflow has a goto tag :)  But, obviously, goto is accepted as a valid command, otherwise your compiler / interpreter wouldn't know what to do with it. Even in C / C++ it's possible to use goto, and that language even has a formal, ISO specification.  So, probably, there should be some case where only by using goto it's possible to accomplish some task. Then, why and when should a goto be used in C / C++ ?  Edit:  Just to make sure:  1 - this question doesn't require debate. It should be answerable: giving one or more cases where goto is the only solution, or stating no, it's always possible to avoid a goto. Of course, I'm not the only who can decide whether it should be closed or not, but I don't think that "too broad, asks for debate, etc" are reasons to close it.  2 - There might be some cases where goto make the code cleaner, faster, etc. I don't want those. I want to know if there exists one case where goto is the only solution (no, it's not a dup of that "give good examples of goto" question)  3 - I'll accept any downvote, with a smile on my face, if the downvote is justified. But I'm pretty sure that this question has an answer and has done previous research about the subject. Downvoting simple because those 4-letters taboo word that starts with a "G" was used... sorry...

In this thread, we look at examples of good uses of goto in C or C++.  It's inspired by  which people voted up because they thought I was joking.  Summary (label changed from original to make intent even clearer):  infinite_loop:      // code goes here  goto infinite_loop;   Why it's better than the alternatives:   It's specific.  goto is the language construct which causes an unconditional branch.  Alternatives depend on using structures supporting conditional branches, with a degenerate always-true condition. The label documents the intent without extra comments. The reader doesn't have to scan the intervening code for early breaks (although it's still possible for an unprincipled hacker to simulate continue with an early goto).   Rules:   Pretend that the gotophobes didn't win.  It's understood that the above can't be used in real code because it goes against established idiom. Assume that we have all heard of 'Goto considered harmful' and know that goto can be used to write spaghetti code. If you disagree with an example, criticize it on technical merit alone ('Because people don't like goto' is not a technical reason).   Let's see if we can talk about this like grown ups.  Edit  This question seems finished now.  It generated some high quality answers.  Thanks to everyone,  especially those who took my little loop example seriously.  Most skeptics were concerned  by the lack of block scope.  As @quinmars pointed out in a comment, you can always put braces around the  loop body.  I note in passing that for(;;) and while(true) don't give you the braces  for free either (and omitting them can cause vexing bugs).  Anyway, I won't waste any more of your brain power on this trifle - I can live with the harmless and idiomatic for(;;) and while(true) (just as well if I want to keep my job).    Considering the other responses, I see that many people view goto as something you always  have to rewrite in another way.  Of course you can avoid a goto by introducing a loop,  an extra flag, a stack of nested ifs, or whatever, but why not consider whether goto is  perhaps the best tool for the job? Put another way, how much ugliness are people prepared to endure to avoid using a built-in language feature for its intended purpose? My take is that even adding a flag is too high a price to pay.  I like my variables to represent things in  the problem or solution domains. 'Solely to avoid a goto' doesn't cut it.  I'll accept the first answer which gave the C pattern for branching to a cleanup block. IMO, this makes the strongest case for a goto of all the posted answers, certainly  if you measure it by the contortions a hater has to go through to avoid it.


this phone is a lg stlyo 2 model : LGL82VL  The phone was pattern locked, and a gmail was set up. The phone was factory data reset. yet its asking for the gmail and password to finish the process. I do not have the gmail. Usb debugging is off. If i attempt to use adb is just replies with error: device '(null)' not found  How can i erase the phones rom and write a new one to make this phone usable again?  And I have already tried most if not all of the tricks on youtube of tricking the phone to let me into google and copy and paste a new gmail. That did not work. Also i cannot use the keys to bring me into any other menu to get into the file system.  At this point I would be completely okay with erasing the phones rom entirely and starting from scratch. I just need to know if its do-able and how to do it.   Thank you in advance.

I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock?


As I understand it Q&A style questions are  but a self answered question should be judged independently of the answer. Often after I've solved a problem I would like to share the question and answer on stack overflow (and have on a couple of occasions) but how to show "minimal understanding of the problem" is always challenging. For example I have been looking into the following question  How can I plot a straight line in the JMonkey Engine library I'm trying to plot straight lines between vertices that I specify using the JMonkey Engine 3D graphics library. So for example if I was to try to plot between: (2,0,0) (-1,0,1) (0,1,1) (1,1,1) (1,4,0) Then I would get:   This is something I do (and forget how to do) relatively often and the answer is harder to find than you'd imagine ( provides everything needed to figure it out but its spread out over several posts and isn't a complete solution on its own). Therefore I want to provide a Q&A for it but at present this question feels like it would fail the minimal understanding test  Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work  Should I make up some imaginary problem? (Probably the final source code messed up a bit) Or mention in the question that I’m self answering to assuage some of the normal "This is not a do your work for you site" comments.

Sometimes I'll encounter problems while coding, or sometimes out of simple interest for a question, I'll google for an answer, and most of the time I find that answer is here on stackoverflow.com.   If I can't find an answer, or if it's not enough to satisfy my curiosity, sometimes I expend my own effort to solve those questions. And after I've solved it, I'm happy to make my contribution to the community, and I post them as the Q&A style posts. For example:     It seems relatively easier to ask a question if I didn't already have a solution, and I can put what I have so far in the question body, such as:     The problem to me is, if I have my own solution to my own question, then most of what I have so far becomes part of the solution. It's likely I have failed in making my contribution by asking a question to which I have an answer, for example:     So I'm wondering if there are some guidelines or good practices for Q&A style posts?   How do I do it better?


I just got a new Laptop and downloaded Whatsapp, but my phone can't connect to it because for some reason my QR code looks like this:  It has like white strips all over it, and generally it's unreadable. It also appeared like that on Whatsapp Web, but I managed to fix it by turning off the "Use hardware acceleration when available" in chrome's settings. I still prefer much more the desktop version but can't find a way to fix it.

I recently bought a new laptop and when I tried to set up the WhatsApp Desktop app, the QR code won't scan on my phone. The same is the case with WhatsApp Web as well. I tried doing the following things but still didn't work out:  Trying WhatsApp Web with a different browser Clearing cookies and cache Restarting the computer  I think the problem is with the QR code that is being displayed on my new laptop. It appears to be broken since there are white spaces where they shouldn't be as shown in the image. This happens with both the WhatsApp Desktop app and the WhatsApp web.  What might be the reason for this and how to fix it? PS: WhatsApp Web works fine on my old laptop. So it's definitely not a problem with the Android app on my phone.


It would be nice if we can spread the world, by just one click - email.

My two main questions:  Are all URLs that include your User Id tracked?  Can the visitors who use the tracked URLs have Stack Exchange accounts?   Specifically: Recently the ability to earn badges for sharing links to posts on Stack Exchange sites . I'd like to know when and how this tracking works. It's clear that if you go to a question, and make use of the link button, you will get a URL with your User ID that will be tracked if a visitor uses it to get to SO. For example, let's use  as an example. It's regular URL is:  https://stackoverflow.com/questions/309300/defend-php-convince-me-it-isnt-horrible  If you go to that page and use "save link as" in the link section of the question you will be given a tracked url with your User ID:  https://stackoverflow.com/q/309300/[USER ID]  My question is, are there other URLs that would be tracked? All of the following URLs take you to the Question / Answer, but are they tracked? For example what if I just tack my User ID onto the long url?  https://stackoverflow.com/questions/309300/defend-php-convince-me-it-isnt-horrible/[USER ID]  What if I add my User ID to an answer URL?  https://stackoverflow.com/questions/309300/defend-php-convince-me-it-isnt-horrible/309622#309622/[USER ID]  or even  https://stackoverflow.com/q/309622/[USER ID]   Is there a way to know that a URL is being tracked? Is there some sort of format to follow? Are the only tracked URLs the ones provided in the Question links? Finally, does this sentence from the blog post mean that visitors cannot have an account?  Also, the tracked IPs must originate from outside our existing network.


I was asked to find the largest number from the table (including all rows and columns) using SQL.  Here is the sample data. It should return 90 as the largest number.  row1    row2    row3 10      20      30 40      50      60 70      80      90

How do you return 1 value per row of the max of several columns:  TableName  [Number, Date1, Date2, Date3, Cost]   I need to return something like this:  [Number, Most_Recent_Date, Cost]   Query?


How many ways are there to express a natural number N as a sum of two or more consecutive natural numbers?  How do I count the no. of ways, they don't seem to follow any pattern.

All the positive numbers can be expressed as a sum of one, two or more consecutive positive integers. For example $9$ can be expressed in three such ways, $2+3+4$, $4+5$ or simply  $9$. In how many ways can a number be expressed as a sum of consecutive numbers?  In how many ways can this work for $65$?  Here, for $9$ answer is $3$, for $10$ answer is $3$, for $11$ answer is $2$.


I remember other situations, like regular squibs and regular half-bloods, but I don't remember any mention of a half-blood squib or if it was even possible. I assume a muggle-born squib is impossible, but I just want confirmation.  Other questions do not discuss whether or not a squib can be born to one or no inherently-magical parents.

If a Muggle was born of a wizard/witch and a Muggle, is that person a Squib, or is that reserved to people born from pure-blood families?    (Related: )


In Order of the Phoenix, in Harry Potter's trial for Underage Sorcery, Dumbledore states  Clause seven of the Decree states that magic may be used before Muggles in exceptional circumstances, and as those exceptional circumstances include situations that threaten the life of the wizard or witch himself, or witches, wizards, or Muggles present at the time of the --  In my understanding, this means if a wizard happens to be on the road and a car accident is going to happen, then the wizard can use magic to stop the accident from happening.  Is that correct?

I was wondering what a wizard should do when a Muggle is about to be killed (let's say in a car accident) and a present wizard notices this in time to prevent this (for example by levitating the victim out of the way). Would the wizard be prosecuted because he violated the Statute or is there some kind of exception? From there, the next question is of course: (TLDR;) are there any exceptions in the Statute? Which?


It would be really helpful if the effects were just given in a list form so I can research them.   The reason why I am asking this is because I to write an essay regarding the effects of a change in a physical constant. I am currently thinking of writing about either change in gravity or the speed of light. On a side note which topic seems more interesting and easier to write 4000 words on?

Every so often, one sees on this site* or in the news† or in journal articles‡ a statement of the form "we have measured a change in such-and-such fundamental constant" (or, perhaps more commonly, "we have constrained the rate of change of..."). These are often shrouded in controversy, with people often stating quite loudly that statements of the sort are meaningless and even unverifiable, but the end result is often quite confusing. Thus:   Is it possible to speak about changes  to a physical constant that contains dimensional information? If not, why not?     *          .$\ \ $† .$\ \ $‡ .


In a normed space $X$ with field $\mathbb{R}$, is $\{ x \in X \mid \|x\| =1\}$ compact in general?  In $\mathbb{R}^n$ yes but for completely general one, not sure if it's true.  If yes in general, is there any simple proof for it?

I wanted to ask whether the boundary of the unit sphere in every normed vector space is compact?  I know that this is true for simple examples, but how is it in general?


I've only ever seen this practice used to refer to "Operating System" with "O/S", but  there are a few more. Why is the slash in the middle sometimes used? Isn't "OS" or "O.S." more appropriate?

not available is not not/available, and not applicable is not not/applicable.  Why is it ?


I know I can see all of my questions on a particular site, but is there a way to see all of my questions on all sites? I go to my Stack Exchange profile and there is no Questions tab. Also the user:me is:question search doesn't work on the Stack Exchange site, only on particular sites.

Is there a way for me to see all my questions across all Stack Exchange sites?  If not, how about just to see which sites I have subscribed to?


I have got an AMD R9 290, with a 600 watt power supply(Coolermaster GX 600 watt). Now, when i am playing a game everything works fine, but when i am trying to mine bitcoins, my system crashes(no signal hdmi, all fans got to 100%). I have got an I5 3570, and I have nothing overclocked(windows 8.1) Is it possible that my video cart is asking more power then my power supply can give it?

Note: This is intended to become a canonical post.  I got a dedicated graphics card of type XXX and it claims I need at least a YYY Watt PSU.   How big does my PSU really need to be?


Consider the state $$|\psi\rangle=(\cos\theta_A|0\rangle+\sin\theta_A|1\rangle)\otimes(\cos\theta_B|0\rangle+e^{i\phi_B}\sin\theta_B|1\rangle).$$ To calculate the $\rho^{T_B}$ I first calculate the $\rho$ and the change it into a matrix form but It was very complicated to compute the eigenvalues for that matrix. Is there any easy way to calculate the eigenvalues of $\rho^{T_B}$?

How can I calculate the eigenvalues of $\rho^{T_{B}}$ (PPT) of the following state $$ \rho =\frac{1}{2}|0\rangle\langle0|\otimes|+\rangle\langle+|+\frac{1}{2}|+\rangle\langle+|\otimes|1\rangle\langle1|. $$


In order to install Ubuntu (along side with windows on C:/) I had to partition my D:/ disk using Ubuntu installation steps ( which initially contained data in it), so after completing the installation (setting up / and swap), I found out that the rest of the D:/ partition became unallocated space, hence I lost my data.  So my question is : is there any way that for me to restore this lost data?   Any help is most appreciated.  Thanks

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.


I am not a professional photographer, but I travel a lot, and I want to be able to take better photos on the way. Currently Im using my smartphone - Samsung Galaxy S7 Edge. I want to buy a camera for this purpose, for up to ~400 euro. Will such a camera be better than my current smartphone? Or do I have to actually pay much more for this to be better?

Some flagship-level smartphones today come with excellent cameras, at least for their own use-cases. Sometimes you don't really need more than that in most of the photos you'll shoot, and thinking about a "better" camera experience isn't an easy task if you already have a "good enough" smartphone camera sensor.  However, I am looking to "upgrade" my photographical experience, without spending too much on high-end equipment and lenses, but at the same time without going for cheaper quality models that modern smartphones might actually beat in some cases.  Finding the right balance is not an easy task, you might look at a photo and say, "My smartphone shoots better than this", or look at another photo and think, "It does look better, but I don't see much of a difference to justify the price", and today's world of modern standalone cameras is not small, it certainly has many different models, which is why I've come here to ask, is there any camera model that satisfies or at least comes very close to my requirements? I am aware that I might be vague, and some photography professionals may perhaps request much more details than what I've offered you, but I hope you understand the gist of what I'm trying to say, even if I cannot express it well in words.  I have looked at mirrorless/MLIC models, but I'm not sure if they're the right type for my use case.


I was looking over some code and noticed this: typedef T * iterator; I was wondering if this is different from typedef T* iterator?

I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition.  How about these examples:   int* test; int *test; int * test; int* test,test2; int *test,test2; int * test,test2;   Now, to my understanding, the first three cases are all doing the same: Test is not an int, but a pointer to one.  The second set of examples is a bit more tricky. In case 4, both test and test2 will be pointers to an int, whereas in case 5, only test is a pointer, whereas test2 is a "real" int. What about case 6? Same as case 5?


The triple integral:  $$\int_{0}^{1} \int_{0}^{1} \int_{0}^{1} \frac{dx dy dz}{(1+x^2+y^2+z^2)^2}=\frac{\pi^2}{32}$$ can be confirmed using Mathematica.   But how can one show it by hand? I provide two answers below: ,. Are there any other methods?    [Context added later by Jack:]   See also  calculation from Wolfram Alpha:            [Added later by OP:] The triple integral was fabricated by the method of the integral representation of  $1/p^2=\int_{0}^{\infty} t e^{pt} dt.$ See my first solution in the Answer below. The final result was confirmed numerically by Mathematica. More interestingly Mathematical gives this integral $I=\pi^2/12-A$ in analytic mode where A is Ahmed's Integral! which equals $5\pi^2/96$.

As in the title I have to evaluate this triple integral: $$\iiint_{[0,1]^3}\frac{dx\,dy\,dz}{(1+x^2+y^2+z^2)^2}$$ I've been trying to solve this since a week ago. The first thing I've done was understand the meaning of the integral. I think this integral represents the mass (as an example) of a unitary cube which contains materials of different density. The values of the materials density are, point for point, the inverse of the square of spheres centered in the origin plus one. The max value of the density is $1$ in the origin of the cube and the min value is $\frac{1}{16}$ on the opposite vertex. I suppose that the value of the integral is $\frac{\pi^2}{32}$ I've tried to use simple substitutions without any results, so I tried to change the coordinates with spherical and cylindrical systems. The spherical coordinates give me an incredibly long sum of integrals and I doubt that they're all integrable as elementary functions. The cylindrical gives me the following result $$\frac{\pi^2}{16}-\int_0^\frac{\sqrt2}{2}{\frac{\arctan{\sqrt{\frac{u^2-1}{u^2-2}}}}{\sqrt{2-u^2}}du},$$ which I'm not able to solve. My instinct tells me that there is a trick in some steps where I can observe that a difficult integral actually is exactly half of another one simpler but I can't figure out where. I'll appreciate any kind of suggestions.


when i try to verify the SHA256 sums of Ubuntu 14.04.3 LTS, i get "BAD signature".  I have tried to download SHA256SUMS and SHA256SUMS.gpg on a different network (just to be sure that isn't the problem) and gpg still says "BAD signature".  The fingerprint of the signing key i downloaded from a keyserver is: C598 6B4F 1257 FFA8 6632  CBA7 4618 1433 FBB7 5451  gpg's output when i try to verify the SHA256SUMS.gpg and SHA256SUMS:  $ gpg2 --verify SHA256SUMS.gpg SHA256SUMS gpg: Signature made Thu 06 Aug 2015 07:45:46 PM UTC gpg:                using DSA key 0x46181433FBB75451 gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key  <cdimage@ubuntu.com>" [unknown]   gpg's verbose output when i try to verify the SHA256SUMS.gpg and SHA256SUMS:  $ gpg2 --verbose --verify SHA256SUMS.gpg SHA256SUMS  Version: GnuPG v1.4.11 (GNU/Linux) gpg: armor header:  gpg: Signature made Thu 06 Aug 2015 07:45:46 PM UTC gpg:                using DSA key 0x46181433FBB75451 gpg: using PGP trust model gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>" [unknown] gpg: binary signature, digest algorithm SHA1   I really do not know what to do now, so any answer is appreciated.

I am attempting to verify my download of Bionic Beaver on Windows 7.  I feel like I am missing something very obvious.  I went to  and clicked on both SHA256SUMS and SHA256SUMS.gpg  It seems like this does not download the files, but opens the text in the files in new tabs.  I used Ctrl-A and then copied the text into Notepad, naming the files SHA256SUMS and SHA256SUMS.gpg.  I made sure that windows didn't add any weird extensions when saving.  I manually downloaded both keys I used from https://keyserver.ubuntu.com, one with fingerprint  C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451   and the other with fingerprint  8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092   After I downloaded both keys I certified them with my personal key using Kleopatra, after verifying the key fingerprint with those at .  When I ran   gpg --verify SHA256SUMS.gpg SHA256SUMS   I got   gpg: Signature made 11/29/18 16:27:43 US Mountain Standard Time gpg:                using DSA key 46181433FBB75451 gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.c om>" [full] gpg: Signature made 11/29/18 16:27:43 US Mountain Standard Time gpg:                using RSA key D94AA3F0EFE21092 gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@u buntu.com>" [full]   When I ran   gpg --verbose --verify SHA256SUMS.gpg SHA256SUMS   I got  gpg: armor header: Version: GnuPG v1 gpg: Signature made 11/29/18 16:27:43 US Mountain Standard Time gpg:                using DSA key 46181433FBB75451 gpg: using pgp trust model gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.c om>" [full] gpg: binary signature, digest algorithm SHA512, key algorithm dsa1024 gpg: Signature made 11/29/18 16:27:43 US Mountain Standard Time gpg:                using RSA key D94AA3F0EFE21092 gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@u buntu.com>" [full] gpg: binary signature, digest algorithm SHA512, key algorithm rsa4096   I tried copying the data from SHA256SUMS and SHA256SUMS.gpg tabs over TOR instead, in case it was a local network problem, but no dice either.  What am I missing here? Is there some way to download the SHA256SUMS and SHA256SUMS.gpg files directly, as opposed to copying the data into a text editor and saving it?  Any help would be very appreciated. I am very confused and frustrated at this point.


There is a difference how the Mac sees Hotspots and regular Wifi routers, it disconnects from HotSPOT as soon as it goes to sleep and needs to be reconnected after waking up. I have the same iCloud on my Mac and iPhone and I can connect via "iCloud instant HotSpot" but, I also want it to stay connected all the time.

I'm not sure if I have an issue or if what I am seeing is by Apple-design.  I have an iPad Pro (11.4) that I have the Personal Hotspot switched on.     My iPad Pro is active and screen on. I connect my iPhoneX (11.4) to the iPad Hotspot. Everything works fine.  I sat working on laptop and then the iPhone X and iPad screen locked.  After X minutes I then unlock iPhone to check email etc..  The iPhone X has disconnected from the hotspot and is back to using the cellular plan on my iPhone.  If I go to Settings -> Wi-Fi then my iPad is not listed.  To make the hotspot reconnect I have to go back to my iPad and toggle the Personal HotSpot switch (On -> Off -> On).   Is this by design or not?  Should the iPhone remain connected if the devices screen lock?


I created a program to change the greyscale value of the background by tracking the mouseX position and mapping it unto the greyscale range, so that when I move the mouse left and right the color changes from black to white respectively. I want to track the greyscale value as I move the mouse about, by calling the print() command upon clicking the mouse using function mousePressed() When I run the program, the background color changes exactly as intended, meaning that the variable z is being calculated just fine, yet upon mouse click nothing prints and an error message is received: "p5.js says: There's an error due to "z" not being defined in the current scope." WHAT I KNOW:  tracking mouseX by printing it to console with print(), upon mouse click using function mousePressed() works fine, as I had used it successfully in a different program I made. even just switching the variable z inside the print() command to mouseX works.  WHAT ELSE I TRIED:  I created a new variable, set its value to z and tried printing the new variable... didnt work. I mapped the size of the canvas to the greyscale range (0-255) manually by division of the two numbers,  and multiplied that by mouseX variable name - ratio. when I tried to print ratio the same problem occurred.  WHAT DO I WANT AN ANSWER TO?:  Why does this error occur upon calling either the mapped variable, and the manually calculated one? How can I make this idea of clicking at any given mouse position, to receive the current greyscale value work? (preferably without calling any straightforward function like background.color or something) This is my first question on this website and I tried to make it as readable as possible. I would like to receive some feedback on my question, was it easy to understand? was it too descriptive? and whatever else you might see appropriate and helpful for further question uploading.  CODE:    var frame = {  //this is used to save the canvas size and use it   x: 600,   y: 400 }   function setup() {   createCanvas(frame.x, frame.y); }  function draw() {   var z = map(mouseX, 0, frame.x, 0, 255) // first attempt. doesnt work   //var ratio = mouseX*255/frame.x; //manual mapping attempt. doesnt work   background(z);   rectMode(CENTER)   rect(mouseX,200,10,60) }  function mousePressed() { print('greyscale value is: ' + z) } <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.0.0/p5.min.js"></script>

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


This made me mad (Eclipse Kepler)    public class FastReader  { public static void main (String[] args) {     FastReader a = new FastReader("hi"); } public FastReader(int a) {  } public FastReader(String b) {     FastReader(10); } }   And I get this error:    Exception in thread "main" java.lang.Error: Unresolved compilation problem:  The method FastReader(int) is undefined for the type FastReader     at FastReader.<init>(FastReader.java:14) at FastReader.main(FastReader.java:6)   It almost made me mad! help me get rid of this! Thank you!

Is it possible to call a constructor from another (within the same class, not from a subclass)? If yes how? And what could be the best way to call another constructor (if there are several ways to do it)?


Ubuntu server 14.04  I have a Dell Precision T7400 with onboard SAS controller.  After installing Ubuntu from LinuxLive USB USB drive, the machine freezes at the boot screen.  I don't get any splash screens; this is happening well before that.  There is no drive activity at all.  The weird thing is that if I leave the USB key in the USB port, it all boots up fine, and I get to my Ubuntu prompt with no problems.  The BIOS boot order is the USB first and the local drive second.  I have not configured any RAID with the SAS controller.  I had Oracle Enterprise Linux installed (6.4) and it works no problem.

I had Ubuntu 12.04 Beta installed on my computer. When 12.04 was finally released, I made a bootable USB Flash Drive using Startup Disk Creator.  Then I decided to check if this drive works properly and to reinstall the system on my desktop. I must add, my desktop behaves a bit strange when it comes to bootable USB's, it recognizes them as HDD.  In BIOS I changed priority of boot so USB Flash Drive (recognized as HDD) was first. Successfully booted, I installed Ubuntu. Everything worked fine, but...  Now I cannot boot from my real HDD. Every time I want to boot, I put the USB Flash Drive into my computer, boot, safely remove it and everything works.  What do I need to do to repair boot?


Suppose that I have a file called temp.txt.  Using the cat program, I would like to add the contents of this file to the end of myfile.txt -- creating myfile.txt if it does not exist and appending to it if it does.    I am considering these possibilities:  cat temp.txt > myfile.txt   or  cat temp.txt >> myfile.txt   Both commands appear to work as I want.  So, my question is, what is the difference between > and >>?  Thanks for your time.

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


I'm getting "was not declared in this scope" errors when trying to compile a library containing heavily templated code.  It seems like the code was developed using gcc-2.95, and (as I was told) did compile about four years ago.  As I found on  and the  the code is indeed expected to fail, and seems to rely on non-conforming compilation.  Minimal reproduction example, compile with gcc -c example.cpp:  // file: example.cpp template <typename T> class Base {   protected:     int i; };  template <typename T> class Derived : protected Base<T> {   public:     void f() {         // i = 5;     // Error: i was not declared in this scope         this->i = 5;  // compiles     } };   My question is: How do I compile this library using more recent compilers?  The library code uses the faulty syntax (i=5) all over the place, so I'd prefer to avoid manually changing the whole library to 'this->i=5'.  The provided links suggest 'using' statements, but while that would reduce my work, my preferred method would involve no code changes, but forcing the compiler into the old behaviour of 'assuming this' on these variables.  I could not find a compiler-switch for this situation, -std=c++98, -fpermissive etc. didn't work.  Quote from the C++-FAQ:     Perhaps surprisingly, the following code is not valid C++, even though some compilers accept it:   I also tried using CLang++, with the same results.  Which compilers would accept this code without changes?  Edit: Added info on -fpermissive, as Brian suggested

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


\documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{multicol}% Agrupamento de colunas em tabelas \usepackage{array} \usepackage{pgfplots} \usepackage{siunitx}  \usepackage{float}  \begin{document}  \begin{table}[h] \centering \caption{} \begin{tabular}{|c|l|l|l|c|} \hline \multicolumn{1}{|c|}{Comportamento elástico}& \multicolumn{ 3}{l|}{Coeficiente de poisson, $\nu$} & 0,42 \\ \cline{ 2- 5} \multicolumn{1}{|c|}{} & \multicolumn{ 3}{l|}{Módulo de elasticidade, E} & 1730 MPa \\ \hline \multicolumn{1}{|c|}{Comportamento plástico} & \multicolumn{ 3}{l|}{Ângulo de fricção interna, $\psi$} & \ang{38,5}\\ \cline{ 2- 5} \multicolumn{1}{|c|}{} & \multicolumn{ 3}{l|}{Ângulo de fluxo interno, $\beta$} & \ang{38,5} \\ \cline{ 2- 5} \multicolumn{1}{|c|}{} & \multicolumn{ 3}{l|}{Rácio de fluxo interno, K} & 1 \\ \cline{ 2- 5} \multicolumn{1}{|c|}{} & \multicolumn{ 3}{l|}{Tensão de rotura à tração, $\sigma_{ut}$} & 32,6 MPa \\ \cline{ 2- 5} \multicolumn{1}{|l|}{} & \multicolumn{ 3}{l|}{Tensão de rotura à compressão, $\sigma_{uc}$} & 56,3 MPa \\ \hline \end{tabular} \end{table}  \end{document}   NEW IMAGE :

I have the code:  \documentclass{article} \usepackage[a4paper]{geometry} \usepackage{tabularx} \usepackage{lipsum} \begin{document} \begin{tabularx}{\textwidth}{ | X | c | }   \hline   \lipsum[1] & top\\   \hline   \lipsum[1] & center\\   \hline   \lipsum[1] & bottom\\   \hline \end{tabularx} \end{document}   Gives this:    The top row is already aligned top. How can I vertically align the center row at the center? And the bottom row at the bottom?


I have this HTML

         <input name="field1" class="field1" type="text" placeholder="field 1">         <input name="field2" class="field2" type="text" placeholder="field 2">
Delete row

         <input name="field1" class="field1" type="text" placeholder="field 1">         <input name="field2" class="field2" type="text" placeholder="field 2">
Delete row

Add row

   And when i click on Add row i append a new li with the elements that i need. The function on jQuery is this one:  $(".addrow").on("click",function() {     $(this).before("
\n\         <input name='field1' class='field1' type='text' placeholder='field 1' />\n\         <input name='field2' class='field2' type='text' placeholder='field 2' />\n\
Delete row

");  });   What i need is to attach the click event to the new delrow that is appended to the DOM. I tried selecting getting the siblings and finding the p element but i can't make it work.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


In a ring with unity prove that if $a$ is nilpotent, then $a+1$ and $a-1$ are both invertible.    In a ring with unity we have: $1-a^n=(1-a)(1+a+a^2+...+a^{n-1})$. I believe this proves $a-1$ is invertible but I'm not sure why.  Then $1-(-1)^na^n=(1+a)(1-a+a^2-...+(-1)^{-1}a^{n-1})$. Again I think this proves it but I don't know how.  I apologize as we haven't discussed nilpotent rings and yet I was asked to answer this question.

Given a ring $R$ (with unity), prove that if $a \in R$ is nilpotent, then $a+1,a-1$ are both invertible.   Suppose $a^n=0$. Then $1=1-a^n=(1-a)(1+a+\ldots+a^{n-1})$, so $1-a$ is invertible.  If $n$ is odd we can use $1+a^n=(1+a)(1-a+\ldots+a^{n-1})$.  But what if $n$ is even?


I am aware that lightning:datatable does not support picklists.   The approved attributes are:   action  boolean  button  button-icon  currency  date  date-local  email location  number  percent  phone  text  url   With that said, I have a need for a picklist value to be visible and editable in my datatable (as I am sure many other people have run into). My question is - has anyone found a good workaround for this blocker yet?  My workaround thought is to use the action button and have a drop down of either hardcoded values or queried values. I am not entirely sure if this is possible as I don't see in the documentation any where that you can define a "default" value like you can with lightning attributes.   Does anyone know if this is possible?  ({     doInit: function (component , event, helper) {     component.set('v.columns', [         {label: 'Name', fieldName: 'Name', type: 'text', editable: true, typeAttributes: { required: false }},         {label: 'Owner Name', fieldName: 'OwnerId.Name', type: 'lookup', editable: true, typeAttributes: { required: false }},         {label: 'Type', fieldName: 'Type', type: 'action', editable: true, typeAttributes: {rowActions: actions } {defaultValues: 'value1', 'value2'}}, //PICKLIST         {label: 'Tier', fieldName: 'Tier__c', type: 'action', editable: true, typeAttributes: {rowActions: actions }{defaultValues: 'value3', 'value4'}}, //PICKLIST

If we want to have custom lightning component in LWC lightning-datatable, for example Upload file for each of the records, how can we do that?


I know that simple organisms containing of just few cells have no mechanism of dying because of aging. I guess, they typically die due to being out of food or due to becoming someone else's food.  Leaving aside the numerous theories of what can be the origin of such phenomenon as aging, I'm asking a simple question: what is the most primitive organism known so far which has the feature of aging and (as a consequence) dying, even if the environment is perfect?

I know that the cells of mammals at least stop dividing when they are old, and then die a programmed cell death. Then other cells have to replace them.   But in a bacterial colony, each cell replicates for itself. Obviously, if a division of a bacterial cell of generation N were to produce two new cells of generation N+1, and all bacteria died of old age at generation M, there would be no bacteria left around.   So how is it regulated in bacteria? Are their divisions simply unlimited? Does a cell never die and just divide forever?


I have a training set of over a 100,000 points that is used to train a Logistic Regression Classifier (logit, since response is binary). The model is testing/fitted on a test set of 20,000 items. The test set is totally independent.   The ROC AUC value for this model is 0.85 which suggests that this is a good model. But I was not convinced. I picked a threshold $0.5$ (i.e., its classified positive if the model response $> 0.5$, negative if model response $< 0.5$).   At this threshold, I get the confusion matrix:  Confusion Matrix and Statistics            Reference Prediction     0     1          0 33307   679          1     0     0                 Accuracy : 0.98                              95% CI : (0.9785, 0.9815)     No Information Rate : 0.98                 P-Value [Acc > NIR] : 0.5102                              Kappa : 0                 Mcnemar's Test P-Value : <2e-16                        Sensitivity : 0.00000                      Specificity : 1.00000    So my question is, how good is the model if it is unable to predict a 'positive' class at 0.5 threshold?  My guess would be that the threshold of the model for labelling 'positive' is not $0.5$ in this case. Is this intuitive and make sense? Clearly the ROC AUC value is very high, which means that it does have a good TPR rate at lower thresholds.

This is a general question that was asked indirectly multiple times in here, but it lacks a single authoritative answer. It would be great to have a detailed answer to this for the reference.  , the proportion of correct classifications among all classifications, is very simple and very "intuitive" measure, yet it may be a . Why does our intuition misguide us here and are there any other problems with this measure?


why when i print this code in print statement the output will be not correct.  System.out.println(3.15 - 3);   the output is:  0.1499999999999999   i think the output must be.  0.15

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


I want to know what are the ways to mark an asked question solved?   If someone has answered correctly and solved my doubt, then how do I mark it as my answer to question and also mark the whole question as solved? If I found the solution myself then what do I do? If someone from the comments in my question has solved my question then what do I do?    Every time I flag my question and I ask a moderator to mark it solved but they reject my request.   I once edited the question by writing it's answer in the question at end and flagged it. Moderator opened my question and removed the solution from my question too.

What does it mean to accept an answer? How do I accept an answer, and what are the rules? Can I accept my own self-answer? What are the reputation benefits? Which answer should I accept? Should I upvote the accepted answer? What should I do if none of the answers are suitable?      For more information, see "" in the .


I have an acer aspire one netbook I installed Ubuntu studio because windows xp became unusable and deleted half of the files (I didnt they just disappeared) and now im trying to install windows 7 I have everything but my laptop is not letting me boot from my 64 gig PNY flashdrive it will just resume Ubuntu how do I format my hardrive deleting EVERYTHING?? I have tried commands and everything nothing is working

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


In model theory, for the construction of an ultraproduct one needs the existence of an ultrafilter.  I heard that one can't construct an ultrafilter by hand, one cannot write it down, just merely knowing that one exists by using the axiom of choice. How is this meant? Even if I give you a concrete base set, say $X=\mathbb N$, is it not possible to write down an ultrafilter on $X$? (I just notice, that $U$ defined by $A\in U:\Longleftrightarrow 3\in A$ probably is an ultrafilter on $\mathbb N$, but it is a boring one, so my question should ask for real examples.)  Of course, up to now, my question is quite imprecise. Maybe one can formalize it like so: in ZF (without AC), is it possible to prove the existence of an ultrafilter on $\mathbb N$ which is non-principal?  What about other base sets, say finite ones? Can ZF prove the existence of an ultrafilter on a finite set?

In Hrbacek and Jech (1999, p.205), they point out that "it is known that the theorem [the extension of any filter to an ultrafilter] cannot be proved in Zermelo-Fraenkel set theory alone." And in Jech (2000, p.81), he mentioned that "[i]t is known that the theorem [the Prime Ideal Theorem] cannot be proved without using the Axiom of Choice. However, it is also known that the Prime Ideal Theorem is weaker than the Axiom of Choice."  I am having a hard time finding a reference for the above claims. Can someone please give me some pointers (references) to, for instance, $\mathbf{ZF}\not\vdash \{\text{existence of non-principal ultrafilters}\}$? Thanks!     Hrbacek, K. and Jech, T. J. (1999). Introduction to Set Theory. Marcel Dekker, New York, third edition. Jech, T. J. (2003). Set Theory. Springer-Verlag, Berlin, Heidelberg, New York, 3rd millennium ed, rev. and expanded edition.


I recently booked 4 plane tickets for the same flight for myself and three friends. I have a Known Traveler Number for TSA Pre-Check, but none of my friends do. When we printed our boarding passes at the airport, all four of us had TSA Pre-Check printed on the boarding pass. The same was true of the return flight. Was this because I had a KTN? Did it matter that I was the one who booked the reservation (i.e. if one of my friends had booked it but still entered my KTN for my ticket, would we all have gotten Pre-Check)?

If I have  (i.e. I have a KTN from TSA and the "pre-check" logo gets printed on my boarding pass) and a travel companion does not, can they go with me through the PreCheck security lines? This is assuming that the travel companion is booked in the same reservation on the same flights and is also a U.S. citizen and not on any no-fly or otherwise increased scrutiny lists.  I'm guessing the answer is no, but I haven't seen anything from TSA specifically addressing this.


I need to assign SubDomain to every user who will be registered to my site.  Example: My Site Domain: www.example.com When a  user registered for this, a subdomain eg.www.username.example.com assigned to the user.  I am not able to find any solution. I tried googling and found solutions but not working as my requirements.  Thanks for help me..

Is it possible to have an ASP.NET MVC route that uses subdomain information to determine its route?  For example:   user1.domain.com goes to one place user2.domain.com goes to another?   Or, can I make it so both of these go to the same controller/action with a username parameter?


Why does increasing the number of neutrons in a nucleus make it more unstable? I know that adding more protons increases electrostatic repulsion, therefore the nucleus is more unstable, but as neutrons are neutral what effect does adding more have?

If you take any large nucleus and add protons to it, the electrostatic repulsion between them will make the nucleus more unstable, because the electrostatic force between them is more repulsive at a greater distance than the strong force is attractive  So how come if you add more neutrons, which don't have a charge and so there is no electrostatic force, the nucleus still becomes more unstable?  Also why aren't there groups of neutrons bound together, so purely neutron nuclei (because they are neutral, I'm guessing they couldn't form atoms, because of the electrons needed for an atom)


I have a list which looks like this: my_list =  [['UK', 'Manchester City', 'Blue', '1','2','B'], ['ES', 'FC Barcelona', 'Blue', '2','1','C'],  ['IT', 'Juventus', 'White', '3','2','A'], ['DE', 'Borussia Dortmund', 'Yellow', '4','1','A']]   Now I want to edit my_list and actually delete the values in index0,3,4 and 5. This is my expected output:   my_list =  [['Manchester City', 'Blue'], ['FC Barcelona', 'Blue'],  ['Juventus', 'White'], ['Borussia Dortmund', 'Yellow']]   This is the code I tried: for list in my_list:     for idx in [0,3,4,5]:         del list[idx]                 print(my_list)   This is the output I get: IndexError: list assignment index out of range

Is it possible to delete multiple elements from a list at the same time? If I want to delete elements at index 0 and 2, and try something like del somelist[0], followed by del somelist[2], the second statement will actually delete somelist[3].  I suppose I could always delete the higher numbered elements first but I'm hoping there is a better way.


I have a problem with my CustomAdapter. The program was working fine with Android Studio until I hit at a roadblock that says:     java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference   My Code:  public class CustomAdapter extends BaseAdapter {     private Activity activity;     private LayoutInflater inflater;     private ArrayList<ModuleModel> Items;      TextView name, module, dueday, id;      public CustomAdapter(Activity activity, ArrayList<ModuleModel> Items)     {         this.activity = activity;         this.Items = Items;     }     @Override     public int getCount() {             return Items.size();     }      @Override     public Object getItem(int i) {         return Items.get(i);     }      @Override     public long getItemId(int i) {         return i;     }      @Override     public View getView(int position, View convertView, ViewGroup viewGroup) {         if(inflater == null)         {             inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);         }         if(convertView != null) {             convertView = inflater.inflate(R.layout.layout_item, null);         }         id = convertView.findViewById(R.id.tvID);         name = convertView.findViewById(R.id.tvRowName);         module = convertView.findViewById(R.id.tvRowModule);         dueday = convertView.findViewById(R.id.tvInforDueDay);          ModuleModel mm = Items.get(position);         id.setText(mm.getID());         name.setText(mm.getName());         module.setText(mm.getModule());         dueday.setText(mm.getDueday());          return convertView;     } }

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 suffered corruption of a hard drive but managed to recover files for a PostgreSQL server. We are running on the assumption that the files themselves are not corrupted (yet to be able to tell). My server was running on Windows 10 Pro.  Is it possible for me to load the database(s) onto another PC running the same server version? I have the entire directory recovered from "Program Files/PostgreSQL/11" onward (so I have all of "data" etc).  If so can someone guide me on how to do this, or direct me to existing guidance? I really need to recover this data and sadly with the above corruption I lost the drive containing my dump files (backups).  Can I simply copy the "data" folder into a new build, or is it a bit more complex than that?

I moved postgresql's data directory by following the following steps:   Stop postgres cp -a source_data_directory destination_data_directory export PGDATA=destination_data_directory Changing data directory to destination_data_directory within postgresql.conf pg_ctl start   But when I run: "pg_ctl start" I get the following error. Can someone please help me figure out the error.   server starting postgres@Server:/usr/lib/postgresql/9.1/bin$ postgres cannot access the server configuration file "/home/destination_data_directory/postgresql.conf": No such file or directory


I am Brazilian, I would like some guidance on how to start a salesforce developer career. I am sorry for my english. Can someone help me ?

Where should I start learning? There are various topics to learn like Objects, Classes, Apex, Visualforce, SOSL, SOQL, Triggers, etc. There are so many options out there to start learning. I couldn't decide what topic to learn first, and then step by step get proficiency in all aspects of Saleforce.


I'm getting noise around my windows in ubuntu 16.04. I have a fairly normal installation with nvidia graphics card. I don't remember what led to the noise-shadows, but I guess it occured after some apt-get upgrade. Any suggestions. I seem to have both the nvidia-367 and nvidia-375 installed. Below is a screenshot of the problem.

NB: Nvidia has released an official fix; please see ,  and/or .  Upon waking up Ubuntu 16.04 from Suspend, the following graphical glitches appear around all windows, context menus, and similar:      This is currently known to affect the following NVIDIA cards running the proprietary drivers:  NVIDIA GeForce 610M, driver version 375.39, 340.102 NVIDIA GT 630M, driver version 375.39 NVIDIA GTX 650, driver version 375.39 NVIDIA GT 740M, driver version 378.13 NVIDIA GTX 745, unknown driver version NVIDIA GTX 850M, driver version 375.39, 378.13 NVIDIA GT 940M, driver version 375.39 NVIDIA GTX 950M, unknown driver version NVIDIA GTX 960M, driver version 378.13 NVIDIA GTX 970, driver version 375.39 NVIDIA GTX 970M, driver version 375.39 NVIDIA GTX 980 TI, unknown driver version NVIDIA GTX 1060, driver version 375.26, 375.39, 378.09 NVIDIA GTX 1070, driver version 378.09  The above above list has been sourced from reports from other users here on AU,  thread, and  thread. NB: This is be no means an exclusive list. It probably effects nearly all Nvidia cards.  Furthermore, this issue has been replicated on a clean install where the only change was a software update and the installation of the latest NVIDIA drivers.  What is going on, and how can it be resolved?


I have a WD My Passport Ultra external hard drive which failed after my laptop restarted in the middle of a file transfer. Since then I'm unable to open the files in the hard drive. Even though I can browse the files and view the file names and sizes, whenever I try to open a file I get an error message device not ready.   I scanned the disk with WD Drive Utilities and the SMART status check fails, which apparently means that the disk is corrupted. I tried to recover the files with Recuva which failed because the recovery software couldn't read the dist. Is there any way to recover the files in that disk or it's completely written off?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


There is a certain user who when they press tab key to complete a file path, it takes several seconds for the machine to make the completion. They are using the bash shell.  How can I diagnose what exactly is causing the tab completion to hang for this user?

After a recent update (Ubuntu 12.04 LTS), TAB complete on the command line is slow. After entering a partial command (e.g evi [TAB]) or partial filename (e.g. evince somedocu[TAB]) the shell, sometimes though not always, hangs for several seconds.  Personally, I'd prefer a less powerfull autocomplete to a slow one. Is there a simple fix?  Edit: Additional information related to comments:   PATH is pretty standard. ~/bin has some bash scripts  $ echo $PATH /home/USERNAME/bin:/usr/local/bin:/usr/bin:/bin:/usr/games  The number of files in the working directory is less than 100. The autocomplete feature was especially slow after unusual disk activity (system upgrade). It is, thus, possible, that rereading /usr/bin and other directories caused the lag.


My university wants my thesis title page to be formatted in a certain way (see left image below) and I was able to do it in LaTeX (see right image below):    I used the following LaTeX code to do the formatting:  \begin{titlepage} \begin{center}  \textsc{\Large Title of Thesis or Dissertation}\\[0.5cm]  % Title \HRule \\[0.4cm] { \huge \bfseries FIRST LAST NAME \\ Hometown and State \\[0.4cm] }  \HRule \\[1.5cm]  \begin{minipage}{0.8\textwidth} \centering \large \emph{Previous degree \textsc{DEPARTMENT}}\\ ALMAMATER, YEAR \end{minipage}  \vspace{3cm}  A Dissertation presented to the Graduate Faculty of the UNIVERSITY NAME in Candidacy for the Degree of Doctor of Philosophy  \vfill Department UNIVERSITY NAME\\ EXPECTED GRADUATION DATE  \end{center} \end{titlepage}   However, I would like to go a step further and make some sort of template that I can give to the university that parametrizes the details.  I know how to do this in common object-oriented languages like C++ and Python, but I don't even know where to begin in LaTeX.  The pseudo code for what I'm looking for would allow a user to create the title page like the following:  import university_thesis_style_template  \thesis_university_name{CURRENT_UNIV} \thesis_title{TITLE} \thesis_author{AUTHOR_NAME} \thesis_almamater{DEGREE}{UNIV}{YEAR} \thesis_almamater{DEGREE2}{UNIV2}{YEAR2} \thesis_department{DEPT_NAME} \thesis_graduationdate{GRAD_DATE}   which would output the code above.  Can anyone help me make and install the "package" that would allow me to set this up?

The standard titlepage is quite simple. I am looking for a very  and need help customizing my title page.  It should match the  classicthesis doctoral thesis template  Below a minimal working example:   \documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook} \XeTeXinputencoding iso-8859-1 \usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}  \usepackage[parts,pdfspacing,dottedtoc]{classicthesis}    \frontmatter  \begin{document}     \pagestyle{scrheadings}        %this is the place to set up my cover sheet.       %*******************************************************      % Abstract     %*******************************************************    %\renewcommand{\abstractname}{Abstract}    \pdfbookmark[1]{Résumé}{Résumé}   \begingroup    \let\clearpage\relax    \let\cleardoublepage\relax    \let\cleardoublepage\relax       \chapter{Résumé}     Résumé de la thèse en français\dots      \vfill      \chapter*{Summary}   Résumé de la thèse en anglais\dots    \endgroup             \vfill     \end{document}


I have the following number.  23.45   There are two parts of this number. 23 and 45. What is the mathematical name of the 23 part?

Sorry for asking such a basic question - but is there an actual term for the numbers that appear before and after the decimal point?  Example:  25.18  I know the 1 is in the tenths position, the 8 is in the hundredths position. are there singular terms which apply to all of the numbers that appear both before and after the decimal point?  I'm building a billing system, storing dollars and cents as integers (in separate columns), but for other currencies "dollars" and "cents" are not the correct terms = ).  Thanks!


I am new to Python programming. I started working on Project Euler this morning and I wanted to find out how long it takes to execute my solution. I have searched online for a solution to my   import time  class Solution(object):     def fibonacci(self,limit):         sum = 0         current = 1         next = 2         while(current <= limit):             if  current % 2==0:                 sum += current             current, next = next, current + next          return  str(sum)  if __name__ == "__main__":     start = time.clock()     solution = Solution().fibonacci(4000000)     elapsed = time.clock()-start     print("Solution: %s"%(solution))     print("Time: %s seconds"%(elapsed))     Output: Solution: 4613732 Time: 2.006085436846098e-05 seconds    import time  class Solution(object):     def fibonacci(self,limit):         sum = 0         current = 1         next = 2         while(current <= limit):             if  current % 2==0:                 sum += current             current, next = next, current + next          return  str(sum)  if __name__ == "__main__":     start = time.time()     solution = Solution().fibonacci(4000000)     elapsed = time.time()-start     print("Solution: %s"%(solution))     print("Time: %s seconds"%(elapsed))     Output: Solution: 4613732 Time: 0.0 seconds    My question is    Is the time calculated above correct? What is the difference between time.time() vs time.clock(). If I use time.time() I get 0.0 as time.

Which is better to use for timing in Python? time.clock() or time.time()? Which one provides more accuracy?  for example:  start = time.clock() ... do something elapsed = (time.clock() - start)   vs.  start = time.time() ... do something elapsed = (time.time() - start)


When I execute the following command:  #!/bin/bash while IFS= read -r -d '' file; do     files+=$file done < <(find -type f -name '*.c' -print0) echo "${files[@]}"   I do not get the same result as this one:  #!/bin/bash find_args="-type f '*.c' -print0" while IFS= read -r -d '' file; do     files+=$file done < <(find $find_args) echo "${files[@]}"   How can I fix the second scenario to be equivalent to the first one?  My understanding is that, because there are single quotes in the double quotes, the single quotes get escaped, which produces a bad expansion that looks something like that:  find -type f -name ''\''*.c'\'' -print0

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?


Edit adressing duplicate..below the "Old" question  I'm currently trying to create text animations in Blender which I later want to use in the Unreal Engine.   As the text should not just follow a path but rather also bend its shape, I used a curve modifier to achieve this effect.  It all looks great in Blender. The Text Mesh is following the curve, bending and moving, but exporting it results in losing the animation on the curve.   Is there a way to bake the animation (bending and movement of the mesh) so I can use it outside of Blender? Or should I consider another solution?   Thanks in advance! Daniel   Edit:  As this was marked a duplicate -  The problem isn't that I can't bake an animation using the follow path constraint.. The problem is that I am not able to get the bending and movement baked at the same time using the curve modifier .   I'm animating the X-Value of the text mesh to let it follow and bend along the spline. Exporting it results in a bent text moving along the x-axis.  The same happens when I'm applying the modifier.  So how can I apply it and or export it, keeping the movement and bending?

I animated a rollercoaster using a Bezier Curve and a Follow Path Constraint affecting the vehicle.  Then I tried to use the automatically created action in the game engine but the Action Actuator has no effect .    How can this action be used in the BGE? Can the Path Animation alternatively be converted into keyframes?


I have a 2TB portable hard drive from Western Digital that I have used over the years.  I use it on my home server to for NFS streaming. I have noticed recently while streaming some content it fails to play and first thought it was my server configuration but after further investigating the issue I have found it is my NTFS partition on the hard drive that was faulty.  I have used rsync, and cp to copy the content but I get read/write io failure when trying to copy over the content. I thought about making a disk image with dd but as the hard drive is 2TB thats a very large image and all I have are 2TB hard drives out here with me.  What is my best option for backing up all this content without having files skipped over because of read write io fails?

A few nights ago I have created a backup of my data on an external 500 GB NTFS USB hard drive.  I have then formatted my computer, reinstalled Ubuntu and started transferring back the data from the external HDD.  Unfortunately some files have became corrupted and Ubuntu is unable to copy them over. The same issue happens if I login using Windows 7.  Disk Utility detects with SMART that there are "a few bad sectors".  Some of files are perfectly intact, but other files cannot be accessed (nor read, copied...) although they are displayed within nautilus and show the correct file size.  Is there anything I can do to recover this data? I have thought of using TestDisk but this utility seems more useful for repairing lost partitions or deleted files.  I have also thought of using ddrescue so I could at least have a low level copy of the disk but I am not sure what use to make of it in order to recover the data!!!


I know this can be silly question but I actually don't know that why we add _ (underscore) before variable name in java while Variable declaration.  I have tried on google but I actually can't find exact answer of it. So anyone tell me is it just a type of declaration as user want or is there any proper mechanism and reason to do so.  Thank You In Advance.

Even nowadays I often see underscores in Java variables and methods, an example are member variables (like "m_count" or "_count"). As far as I remember, to use underscores in these cases is called bad style by Sun.  The only place they should be used is in constants (like in "public final static int IS_OKAY = 1;"), because constants should be all upper case and not camel case. Here, the underscore should make the code more readable.  Do you think using underscores in Java is bad style? If so (or not), why?


I want to know the time when my table is last modified ,whether it may insertion,deletion,update or structure change.

In the footer of my page, I would like to add something like "last updated the xx/xx/200x" with this date being the last time a certain mySQL table has been updated.  What is the best way to do that?  Is there a function to retrieve the last updated date? Should I access to the database every time I need this value?


I have read several guides on how to achieve the Long Shadow effect using Illustrator, I tried both using the Transform Effect and Blend Modes, however I fail achieve it using both.  When I try using the Transform effect, I get all copies of the fill simply duplicated with no continuity, like so:    When I try using blend modes, here what I get:   An example of what I'm trying to achieve:

I've recently got into that "hipster" trend of long shadowing.  I have seen this example quite a lot, and have tried replicating it myself.  No efforts have been successful though.  And even the close ones seemed like to much work for that effect.    Main issue i'm having are the middle green triangles, and their shadows down.  If you notice they fold over the background circle, which is another issue of mine.  How can I replicate this technique as accurately as the image?


Are there any provision available in SSMS to align the SQL code. Arrange the SQL SP scripts in a readable format. Whenever I align the SP scripts and run a ALTER PROC. The scripts got misaligned when i retrieve the SP code using sp_helptext.  Like how we align the C# OR .aspx codes in Visual Studio using the shortcut key Ctrl +KD, Any option available in SSMS?

In Visual Studio & other IDEs, you can easily auto format your code with a keyboard shortcut, through the menu, or automatically as you type.  I was wondering if there is yet a way to enable this standard feature in SQL Server Management Studio?  I'm working with some large-ish stored procs that are a mangled mess of poorly formatted SQL and it'd be nice if I could just go "Select All -> Format SQL"


I have been replacing links to cplusplus.com with links to cppreference.com for a while. This behaviour has got some  recently and I have been advised to continue only if consensus is reached here on meta.  I'm not familiar with the procedures of such proposals, so please bear with me :)  My motive for replacing the links and ultimately posting this question is that I believe that cppreference.com is simply a better reference. The general policy on SO is that edits improving the posts are encouraged, thus I think if we come to a consensus that the benefits of the change outweigh the disadvantages at least for some of the links, we could replace them.  Below are a summary of pros and cons. Feel free to add what I've missed :)  Pros   The quality of the content is higher (not always, but in general) The examples push 'better' programming practices, such as limited use of using namespace std;, std::endl, '#include ', etc. There's separate documentation for C and C++ versions of the C standard library.    [ The C99/C11 and C++11 standards have too many differences to put into a single article. ]  The examples are live-editable. The content is free (cc-by-sa). No ads.   Cons   Some of the users simply don't like their answers being changed.    [ If an user reverts a change, it should be never re-applied ]  cplusplus is better in some cases   [ The content of cppreference is publicly editable, thus any problems can be fixed as they are noticed ]

Someone just edited a link in one of my answers to point to a 'better reference'.    I've no problem with links being changed in general, but this smells like part of a concerted attempt to redirect traffic.   Is this kind of activity acceptable on SO?


I want a sample code for log4j.properties which will add date in the file name when creating. Say example i have a file catilina.2013-02-13.log which is in the format as catilina.{yyyy-mm-dd}.log  I used the below code but it does not work for me   log4j.appender.FILE.File=${log}/catilina_%d{yyyy-MM-dd}.log    Thanks,

I would like to set the log file name for a log4j and log4net appender to have the current date.  We are doing Daily rollovers but the current log file does not have a date.  The log file name format would be   logname.2008-10-10.log   Anyone know the best way for me to do this?  edit:  I forgot to mention that we would want to do this in log4net as well.  Plus any solution would need to be usable in JBoss.


Is there anyway to find and remove ligatures from tex file? Sometimes when I copy/paste a text to Winedt, it shows perfect, but when I compile it to Pdf, some issues appear, e.g. finding becomes nding.  I am wondering if there is any way to search and find these characters?  Here is an example file (needs utf8 encoding).  \documentclass{article} \begin{document} ﬁ \end{document}

One frequent aspect of pdflatex output that could be improved is to what extent one can select text output from the generated pdf-file and copy-and-paste it. This is essentially an issue of having the right output encoding. There are at least two important aspects to this:   In the ideal case, Unicode would be the output encoding. Ligature glyphs (such as ﬁ) are ideally de-ligated in the output (here: "fi").   It seems that output encodings are specified through the fontenc package. What is the range of possible output encodings, and most importantly: Is there a way to specify a Unicode output encoding and one that deals with ligatures in the intended way?  (Note: It is important to distinguish output from input encodings. How to use different input encodings in LaTeX has been documented widely. My understanding is that this is best handled by the inputenx package, as it supersedes the inputenc package.)    Quick guide to the solutions: The information in the answers and answer threads is a bit distributed, so here the short summary: one approach is to use \input glyphtounicode together with \pdfgentounicode=1; the other approach is to use cmap/mmap.  Addendum: Sometimes one will need to load the package accsupp and enclose one's macro definition in \BeginAccSupp{method=hex,unicode,ActualText=<codepoint>}[...]\EndAccSupp{} to generate a specific code point. See the caveat about non-BMP code points  and the fix (starting from accsupp version v0.4, 2012/11/18) , which provides the new unichar package option.


I am new to the bat scripting, so I'm planning to change a word in a text file called "sampleFile.txt"      Can anyone help me? Thankx :)

I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions?


I am aware that there are plenty of questions regarding book recommendations, however, I have not found one that fully matches what I intend to ask. I have provided a list of links to some similar questions under my question.    I am 2nd year Undergrad doing physics. So far we have completed three "Mathematics for Scientisits" courses and they are all heavily based on matrices, vectors, orthogonality and linear algebra in general. However, the motivation behind the methods is not explained at all! All sorts of terminology is thrown around and I hit a brick wall when I try to connect it all together.  I can, for the most part, do the maths behind them but I am failing to fully grasp the pure and applied concepts of:   Orthogonality Eigenvalues and Eigenfunctions Inner product, vector space (Essentially, the range of topics in Linear Algebra)   Mainly, I am curious as to why they are used so much in quantum mechanics. We have not been introduced to Hilbert Space yet (nor Dirac notation, which worries me); I think those things will be studied next year but might as well learn them now.  Having said all that, I am looking for books, both for mathematicians and/or physicists, which explain the meanings, concepts and uses of all this abstract mathematics well. It would be an added bonus if they have good practice questions too. I am looking for books that have thorough, well written explanations.  After doing a bit of research I am most intrigued by:   Linear Algebra: Concepts and Methods by M. Anthony and M. Harvey Linear Algebra and Its Applications by David C. Lay   Any comments on those before I buy them?    List of links of related questions:

A week ago I  people on this site what mathematical background was needed for understanding Quantum Physics, and most of you mentioned Linear Algebra, so I decided to conduct a self-study of Linear Algebra. Of course, I'm just 1 week in, but I have some questions.    How is this going to be applicable to quantum physics? I have learned about matrices (addition, subtraction, multiplication and inversion) and about how to solve multiple equations with 3 unknowns using matrices, and now I am starting to learn about vectors. I am just 1 week in, so this is probably not even the tip of the iceberg, but I want to know how this is going to help me.  Also, say I master Linear Algebra in general in half a year (I'm in high school but I'm extremely fast with maths), what other 'types' of math would I need to self-study before being able to understand rudimentary quantum physics mathematically?


I am getting the following error when I run sudo apt update:  E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi' E: Sub-process returned an error code

The terminal gave me these errors when updating the software with sudo apt update.    Hit:1 http://it.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://it.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                Hit:3 http://it.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease                                      Hit:5 http://archive.canonical.com/ubuntu bionic InRelease                 Traceback (most recent call last):                       File "/usr/lib/cnf-update-db", line 8, in <module>     from CommandNotFound.db.creator import DbCreator ModuleNotFoundError: No module named 'CommandNotFound' Reading packages list... Done E: Problem executing scripts APT::Update::Post-Invoke-Success     'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db;       then /usr/lib/cnf-update-db > /dev/null; fi'   E: Sub-process returned an error code     These are the results of sudo apt install --reinstall command-not-found  Reading package lists... Done  Building dependency tree         Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/5.188 B of archives After this operation, 0 B of additional disk space will be used. (Reading the database ... 225797 files and directories currently installed.) Preparations for extracting ... / command-not-found_18.04.4_all.deb ... Extracting command-not-found (18.04.4) on (18.04.4) ... Configuring command-not-found (18.04.4) ... libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...   When I tried the command sudo apt update again after reinstalling command-not-found, the results were the same as described in the first text block.


In Borderlands 1 I needed help on a boss, so I tried to find some people to help me in matchmaking. When I found the game I needed, I connected but they were playing something else so I exited. But when I got to my single player campaign, my story skipped through half the game! I'm so afraid that if I do matchmaking in Borderlands 2, my single-player will be ruined! Can you help me?

In the first Borderlands, I got quite frustrated with the confusing affects multiplayer had on my character in singleplayer. Many times, someone in my party got a message saying they were ineligible for a quest and that they would not get credit for it.  Eventually, we all decided to make characters that we would all play only with each other and never play in single player.  This was quite an unideal solution.  Has Borderlands 2 solved any of these problems? What happens if I connect to a game with someone ahead of me in the story? What happens if I connect to a game with someone behind me? And what if I host in each of those situations? Is mission progress saved? Does everyone get XP and rewards?


I'm looking for a switch that can connect/disconnect 8 signals at a time with one button/lever/slide whatever. Power requirements are very low. I do not want to use analog switches due to interference with my measurements, which are in the nanoamp range.  I would prefer something that is through-hole or surface mount instead of solder lugs. Does such a switch exist?

I am working on a project, where I want to build a raspberry pi into a nintendo 64 console, and be able to switch between with a single switch. By that I mean, I want to be able to use a single slide switch to either switch on the raspberry, or the n64.   I already figured the most stuff out, but I need help with wiring the controller port.   I have a n64 to USB controller adapter, which is connected to the raspberry. Each controller has 3 pins, VIN, GND and Data. I have 2 ports I need to switch. I also need to switch the usb Power for the raspberry.   So, I need a single switch, which has 2 states (ON, OFF), to switch the n64 controller ports to either the n64 console, or to my USB adapter. It also needs to switch the 2 wire power for the raspberry. I made some pictures to visualize it better:  So here is how it should be for to work with the regular N64. The controller ports are wired to the n64 console, and the raspberry power is not connected.    Then, when you switch it over to work with the raspberry, the n64 controller ports should go to the USB adapter, and the raspberry power is connected.    Now, my problem is I don't know how to achieve that. I know there are slide switches with enough pins, but they have multiple possibilities, not only two.   I also need something small, since the n64 case is small and doesn't have a lot of space.   Any ideas?


I have a quite a large dataset of 75 features and one dependent variable where all are continuous. I want to do a MLR. and want to reduce the number of features. But there are many feature selection algorithm available like NCA, ILFS , InfFS, ECFS, mrmr, relieff, mutinffs, fsv, laplacian, mcfs, rfe, L0, fisher, UDFS, llcfs, cfs, fsasl, dgufs, ufsol, lasso and so on... I tried some of them where each every algorithm is giving different result. Which one would be best for Multiple Linear Regression?

I have a numerical dependent variable, and many independent variables. Most of my independent variables are dummy variables, but I have some categorical and numerical variables, too. I tried forward and backward model selection in R, but R returns my model empty! When I run separate simple regressions, there seems to be a significant relationship between my independent and dependent variables!  My question is: Am I going to have biased results if I run separate simple regressions with each variable, and then run a multiple regression with all the significant variables?


I've created polygons from a table that has two columns- an OBJECTID and a string of coordinates (Polygon_Coordinates). The resulting polygons (called "testing" in the code below) are in the correct locations, but I can't seem to figure out how to carry over the ID, which I need for a join later in the workflow. Any idea on how to build geometry, but maintain the attributes? I'm working in ArcGIS Pro. fields = ['Polygon_Coordinates', 'OBJECTID']  with arcpy.da.SearchCursor(table, fields) as table_cursor:     for row in table_cursor:         #skip null rows         if row[0] != '-9999':                          #turn string of coordinates into a list but split them at the commas             coords= list(row[0].split(','))                          #break up list into list of pairs             pairs = [coords[i:i + 2] for i in range(0, len(coords), 2)]             coord_ints = [[float(i) for i in p] for p in pairs]              #create insert cursor for geometry creation             geocursor = arcpy.da.InsertCursor(testing, ["SHAPE@"])             array = arcpy.Array()                          #grab pairs from list, put into array             for a in pairs:                 array.add(arcpy.Point(a[1],a[0], ID=row[1]))                          #set crs, build polygon              wgs = arcpy.SpatialReference(4326)             poly = arcpy.Polygon(array, wgs)             geocursor.insertRow([poly])

I've created polygons from a table that has two columns- an OBJECTID and a string of coordinates (Polygon_Coordinates). The resulting polygons (called "testing" in the code below) are in the correct locations, but I can't seem to figure out how to carry over the ID, which I need for a join later in the workflow. Any idea on how to build geometry, but maintain the attributes? fields = ['Polygon_Coordinates', 'OBJECTID']  with arcpy.da.SearchCursor(table, fields) as table_cursor:     for row in table_cursor:         #skip null rows         if row[0] != '-9999':                          #turn string of coordinates into a list but split them at the commas             coords= list(row[0].split(','))                          #break up list into list of pairs             pairs = [coords[i:i + 2] for i in range(0, len(coords), 2)]             coord_ints = [[float(i) for i in p] for p in pairs]              #create insert cursor for geometry creation             geocursor = arcpy.da.InsertCursor(testing, ["SHAPE@"])             array = arcpy.Array()                          #grab pairs from list, put into array             for a in pairs:                 array.add(arcpy.Point(a[1],a[0], ID=row[1]))                          #set crs, build polygon              wgs = arcpy.SpatialReference(4326)             poly = arcpy.Polygon(array, wgs)             geocursor.insertRow([poly])


I got this by watching a video on youtube and they said that this is always true but I am wondering why. I have tried to use Fermat's little theorem (FLT) but got nowhere bcs it says that if p is a prime then $p|{a^p-a}$.

Prove that if $2^n - 1$ is prime, then $n$ is prime for $n$ being a natural number   I've looked at      It is known that $2^n-1$ can only be prime if $n$ is prime.  This is because if $jk=n$, $2^n-1=\sum_{i=0}^{n-1}2^i=\sum_{i=0}^{j-1} 2^i \sum_{i=0}^{k-1} 2^{ij}$ So they will only continue to alternate at twin primes.  In particular, $2^{6k+2}-1, 2^{6k+3}-1$ and $2^{6k+4}-1$ will all be composite   What I dont understand is how do I get:   $$\sum_{i=0}^{n-1}2^i=\sum_{i=0}^{j-1} 2^i \sum_{i=0}^{k-1} 2^{ij}$$  If I am looking at the wrong answer, how can I proof the above?     Then again, maybe I am indeed looking at the wrong thing?      In particular, $2^{6k+2}-1, 2^{6k+3}-1$ and $2^{6k+4}-1$ will all be composite   This doesnt say why $2^{6k+2}-1$ is composite?


If $a < b$ and $c < d$, then $a + c < b + d$ if $a, b, c, d$ are positive integers.  My hunch is that this is true, but I'm having difficulty proving it.  Is there a property or definition pertaining to inequalities that exists to support/disprove the above?

This is how I managed to prove it:   I know $a \lt b$ and $c \lt d$ thus, $b-a$ and $d-c$ are real positive numbers. Then, $b-a + d-c \gt 0$ and because of this $a+c \lt b+d$   Did I prove it right?


First noticed this over on SO on someone else's profile; they had a long URL in the bio, which made the bio expand beyond its normal size. There's a live example on my profile, but .   This is slightly related to , but it only seems to be implemented for posts and not the profile bio.

I have found a bug on Area 51. When we make heading like #Hello, visible as: Hello on our profile description, if the text is long then it is going outside its boundry. It is shown here:  And it is also shown in profile page when saved:  And, the page is scroll-able:  (Posted here too because  didn't received enough attention)


My iPhone sometimes shift the view down by about 1/3 of the screen in order to reveal... nothing, just the blurry background image. How can I prevent this from happening?

I was fooling around with iPhone 6 plus and found that when you place finger twice on finger scanner or rotate your finger on the scanner the currently running app or the menu views move down to half for the screen.     I'm not worried of this behavior but I am curious why such thing is happening.


Let's perform two simple calculations and then formulate the relative questions.   By checking Wikipedia, one can know the mass of neutron and proton: $$M_{neutron}=939.5654133(58)MeV/c^2=1.674927471(21)×10^{−27} kg$$ $$M_{proton}=938.2720813(58) MeV/c^2=1.672621898(21)×10^{−27} kg$$ and the neutron (proton) is composed of two down (up) quarks and one up (down) quarks. Also by checking Wikipedia, one can know the mass of up quark and down quark, respectively. $$M_{up-quark} \approx 2.3MeV/c^2 \approx 4.1 \times 10^{-30} kg \qquad M_{down-quark} \approx 4.8Mev/c^2 \approx 8.6 \times 10^{-30} kg $$ One can see immediately that  $$M_{neutron} >> 2\times M_{down-quark}+1 \times M_{up-quark}$$ $$M_{proton} >> 2\times M_{up-quark}+1 \times M_{down-quark}$$ One can also see only one percent of the total mass of the neutron/proton is contributed by their building blocks (up- and down- quarks)!So my first question is where is the mass of neutron? We can perform the similar calculations for Helium-4, which is composed of two protons and two neutrons. By checking Wikipedia, one can also know the mass of helium-4. But we have the following inequality: $$M_{helium-4}=6.645 \times 10^{-27}kg<2\times M_{proton}+2\times M_{neutron}=6.695\times 10^{-27}kg$$ So my second question is: what's the additional mass of helium-4 atom?   My final question is about what's the difference between calculation one (far greater than their constituents )and calculation two (lesser than their constituents)?

We know that the sum of the masses of the quarks in a proton is approximately $9.4^{+1.9}_{-1.3}~\text{MeV}/c^2$, whereas the mass of a proton is $\approx931~\text{MeV}/c^2$. This extra mass is attributed to the kinetic energy of the confined quarks and the confining field of the strong force. Now, when we talk about energetically favourably bound systems, they have a total mass-energy less than the sum of the mass-energies of the constituent entities. How does a proton, a bound system of quarks with its mass-energy so much more than its constituent entities, remain stable? The strong force and other energetic interactions supposedly contribute this mass-energy by the mass-energy equivalence principle, but how exactly does this occur?


At my last session, a scenario arose in which a character was attempting to cover ground as quickly as possible, but was knocked prone. On their next turn, they proceeded to stand up and Dash. This led to a moment of confusion while I attempted to figure out exactly how prone and Dash interact. The player commented offhand that standing from prone halves your movement and Dash doubles it, so the two cancel and they had 30ft to move that turn. Reading the rules, however, I interpreted things differently.  Dash When you take the Dash action, you gain extra movement for the current turn. The increase equals your speed, after applying any modifiers. With a speed of 30 feet, for example, you can move up to 60 feet on your turn if you dash. Any increase or decrease to your speed changes this additional movement by the same amount. If your speed of 30 feet is reduced to 15 feet, for instance, you can move up to 30 feet this turn if you dash. (PHB p192)    Being Prone [...] You can drop prone without using any of your speed. Standing up takes more effort; doing so costs an amount of movement equal to half your speed. For example, if your speed is 30 feet, you must spend 15 feet of movement to stand up. (PHB p190)  My interpretation is that your speed is constant - say, 30ft - and your movement is a separate quantity representing distance you can cover this turn. You start the turn with available movement equal to your speed, and then Dash adds another quantity to your movement, while standing up removes a quantity from your movement. Neither affect your speed. That means that this player starts with 30ft of movement, gains an additional amount equal to their speed (30ft) from Dash, then spends an amount equal to half their speed (30/2 = 15ft) to stand, leaving them with 45ft of movement available for this turn. In the end, they needed less than 30ft of movement to get into position to attack the bandit leader and the party all made it out alive, so it didn't affect the outcome of our game, but I'd like to get this straightened out for the future. Is my interpretation of the interaction between speed, movement, the prone condition and the Dash action correct?

This question acts as a clarification to  on this site. Here's the scenario:   You have 60' of movement at the start of your turn You move 30' to any direction You grapple someone at this point How far do you have left to move?


I am have this image and I'm trying to set the black background color to match the rest of the extinguisher. I tried messing around with some settings like Emission and subsurface color, but that messes with the image. Any help with my personal project would be greatly appreciated. Thank you :)

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).