I was reading  about generating primes for RSA keys. The answers point out that most implementations of of the algorithm use probabilistic prime-ness checking algorithms.  by  made the most sense to me:     That is, if the test uses a randomly-chosen value (the "witness") which serves as the basis for the test. If the test passes, then the number is probably prime, but possibly not. We can repeat the same test with a new "witness", and if the test passes again then we have increased our certainty. We can continue to re-test as many times as we want until we've reached the level of certainty that we need.   This (and the other answers) heavily imply that we're never actually 100% certain that the numbers we've chosen for a key are actually prime.   Do any implementations follow up the probabilistic prime checks with exhaustive checks? I'm guessing not, because RSA key generation has to be pretty fast (compared to the heat death of the universe) to be useful. What "level of certainty" do we "need" for RSA keys? Is this an actual downside? If a non-prime number is used in an RSA key, to what degree would the search space of a brute force attack be decreased?  I'm torn on this, because as I understand it, a brute force attack relies on factoring the key, which is difficult for the length of numbers we've chosen. If we're 99.99...% certain a number is prime, then the most likely thing we've done is selected a number that's a product of two or more reasonably large primes. That would imply that the brute force attack is only a few orders of magnitude easier to conduct; according to , the RSA algorithm has orders of magnitude to spare. Are there better attacks that will succeed in much less time that could work by assuming one or both of the secret numbers are non-prime? Even if this is one-in-a-billion chance, if the attack is fast enough, it seems like its worth it.

I am a bit of a newbie to RSA encryption, so please be patient.  I understand that for a 4096 bit RSA, the numbers p and q should be prime. And to have the best security, the p and q should both be about 2048 bits long.  However, we don't have a way of generating and verifying a 2048 bit prime number with 100% accuracy. The implementation for prime generation that gpg uses goes through 64 rounds of miller-rabin which is enough to give a prime probability of $1 - 2^{-128}$.  Given that these primes are only probabalistically prime, what happens if we selected composite values for p or q?  Does the RSA algo run into any sort of problem?  My guess is that there will be no problem and RSA continues to function normally (encryption and decryption both) because, if there was a problem, we could use that problem as a way to detect that the numbers are not prime. This would give us a really fast way to verify extremely large prime numbers. I am guessing this is not the case.  So, my conclusion is that RSA works with prime or composite p, q... but using composite p, q makes it easy to break the encryption (because its easier to derive p, q from n).  Is this conclusion correct?


I just tried to edit the tags of a question through the mobile app, but wanted to check the tag wiki excerpt for usage guidance first. If there is a way to see it in the app, I haven't figured it out.  I hereby request that tag wiki excerpts/usage guidance be shown in the mobile app. As hovering is not really a thing on touch screens, I suggest that the excerpt be shown on a long press while on the tag search/adding screen. (I'm amenable to other options, like adding a small button to the tag name when it shows up as a search result, so long as it's shown.)  This long press functionality can also be applied to tags shown on questions already asked, but I think it's more important to see the usage guidance when asking and editing.

On the website I often click on a tag in a question to read up on more questions about that tag and sometimes the tag wiki.  Currently, clicking a tag in the Android app searches for that tag, but does not provide access to the wiki.  Please provide somewhere to access the wiki summary / more info (full wiki) via the app.


I have this scenario:  >>> y=[[1]] >>> y=y*2 >>> y [[1], [1]] >>> y[0].append(2) >>> y [[1, 2], [1, 2]]   What I'd like to do is add the 2 into the first list within the outer list i.e. this is the desired output:  [[1, 2], [1]]

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


So I was told that at the site of install the customer is providing us with a 30A fused disconnect so we can run 3 motors for our machine (2× 5hp ones (non simultaneous), and 1x 3hp one which can run when one of the 5hp ones runs)  Here is my question   If the circuit is fused up stream via the 30A disconnect would you still need to fuse all the 3 motors with their required fuse sizes at 480V? So in this case the 3hp would get a 6A fuse slow blow , and the 2x  5 hp ones would get 10A fuses.??

so i have a 30A disconnect available for use at a customer site for running 2 5HP motors ( at 480V)  the only question i have though is if the line is sized for a 10HP motor would both the 5HP motors need additional fuse protection?   Or could i get away without having addtional fuses protecting the motors ?


There has been a question about this from 2015 but I don't think it has been answered well enough and the question also wasn't specific so I'm hoping that this time around, someone will be able to give a more detailed explanation because I'm curious: Why are  (mostly) not ferromagnetic?   Is it because of their face-centered cubic crystal structure? And if so, why? I understand why and how ferritic stainless steels become magnetic, but why can't austenitic stainless steels do the same?

My dad has a HUGE magnet on his workshop.  I love magnets, and when I saw it, I asked him what it was for.  His reply was: "I don't know why, but inox steel bolts don't get attracted to it, so I use it to identify them."  Thus I got curious, why a magnet don't attract  bolts? Steel, even if a inox variation is still mostly iron, no?


I can prove the $n$ is prime case: If $n$ is prime, then since $k < n$ and $n$ is prime, the factor of $n$ in the numerator won't be cancelled out.  So the question boils down to     Let an integer $n>1$ be such that $n$ divides $\binom nk$ whenever $0<k<n$; show that $n$ is prime.   If $n$ is composite and even, then ${n \choose 2} = \frac{n(n+1)}{2}$ is not divisible by $n$ because it 'lost' a $2$ factor (and $n+1$ is odd), which takes care of this case.  However, I'm somewhat at a loss for what to do when $n$ is composite and odd. Any hints?

If $p$ is a prime number and $r = 1,2,3 \dots ,p -1$, how can I prove that the binomial coefficients $_nC_r(p,r)$ are divisible by $p$? By divisible I mean $_nC_r(p,r)/p$ leaves remainder $0$.  oivind


I currently have my rewrite rules in the post_virtualhost_2.conf file this in inserted into the httpd.conf file at the absolute end. I have two blocks that don't seem to be working <IfModule mod_rewrite.c>    RewriteEngine On    RewriteCond %{HTTPS} !=on    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule>  <IfModule mod_rewrite.c>     RewriteEngine On     RewriteCond %{HTTPS} !=on     RewriteCond %{HTTP_HOST} !^www\. [NC]     RewriteCond %{SERVER_ADDR} !=127.0.0.1     RewriteCond %{SERVER_ADDR} !=::1     RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </IfModule>  The full conf is  What I am expecting is the following in all cases    But when I enter privatmamtora.com it simply get a 200 response. PS. I am hoping that the rules could be subdomain safe. (Not break subdomains) EDIT Rewrite module is loaded.

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


Where else can I find this after adding in an object?

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


I am very new to Ubuntu and only just getting a hang of it, and my questions might sound stupid especially because I am a learner in terms of techie things as well.   So because of the nature of work where everyone uses stupid Windows and Microsoft, I need to have access to MS Office 2007/2010 as documents with too many tables or images open all haywire in Libre Office (which has otherwise been great!). I have been reading up about installing MS Office through WINE/PlayonLinux, but have been unsuccessful so far. I downloaded a MS Office 2007 package from Pirate Bay, which I extracted into a folder. I tried numerous different ways to install through WINE and PlayonLinux, but will discuss the one which seems to be getting me somewhere.  ..... Initially, when I would click on the install button of MS Office, I get a message saying "The install location you selected does not have 1558MB free space. Free up space from the selected install location or choose a different install location". The install location in this case said "C:\Program Files\Microsoft Office", which confused me as I don't have drives named as C, Z etc. I went to configure WINE and under the drives tab, created a drive named A with the path location /media/cd025f16-433b-4a90-abb6-bb7a025d0450/. Also the space thing is confusing as I have at least 450GB of unused space on my computer.  anyways, when I selected the A drive for installation, the installation starts, but soon I get the following error message, "Office cannot find Office.en-us\OfficeLR.Cab. Browse to a valid installation source" .... The part saying "OfficeLR.Cab" have said different things after the Office bit every time I have made an attempt. When I select the Office.en-us sub-folder or any other folder within the folder where MS Office 2007 is saved, it says "invalid source"!  I have been trying to get this sorted since 15hrs now (addictive!) and have learnt loads of things in the process, but have not managed to crack it. It might be something stupidly simple I am not aware off that is stopping it.  I would really appreciate some help! Thanks a lot.. Also I am still getting used to the language, so might have many questions  Also I am using Ubuntu 11.04 (tag 11.04). Also I think I don't have windows -- when my friend installed Ubuntu on my new laptop which had Windows 7, he was trying to keep windows in a separate partition, but something happened and windows was not there!   Looking forward to some support! Again thanks a lot

I want to know how to install Microsoft Office (specifically, Microsoft Office 2010) in Ubuntu?   I am a die hard fan of MS Office and I want to know if there is a way I can use it in Ubuntu.


I have two tables as follows:  Users  | Name   | TagsId |   +--------+--------+   | Bob    |  3     |   | Jim    |  2     |   | Bob    |  2     |    | Frank  |  3     |   | Jim    |  1     |     Tags  | Name    | Id  | +---------+-----+ | web     |  1  | | desktop |  2  | | phone   |  3  |   My desired result is as follows:  | Name  | TagList        | +-------+----------------+ | Bob   | desktop, phone | | Jim   | desktop, web   | | Frank | phone          |   I am able to accomplish this in SQL Server 2017 using the following query:  SELECT      u.name, STRING_AGG (t.name, ', ') as taglist  FROM      users AS u        LEFT JOIN      Tags AS t ON u.TagsId = t.Id  GROUP BY      u.name;   But unfortunately my data is in a SQL Server 2016 server so cannot use the STRING_AGG function.  How can I accomplish this without STRING_AGG?

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


So I got a new hard drive. First, I downloaded Ubuntu on to it, because I didn't have windows 7 yet. So a few days later I bought windows 7, and partitioned it on to the hard drive.  Now, when I start the computer, it goes straight to windows 7. That's fine and all, but how do I get to the Ubuntu partition that's somewhere on the hard drive still? I believe it is an extended partition, not a primary.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I'm trying to upload a geofilter for snapchat (it's a PNG btw) and I used photoshop to make my filter, the end result was 689kb but I need it be 600kb MAX. Is there any way I can lower the storage size? ps. I have two texts that says LAGRANGE HIGH and another that says GATOR, they both are in 3D if that matters.

What programs besides Photoshop are good for saving and optimizing images for web?


I know one solution.   That is by Doing comparison with $\dfrac{4^n+4^n}{6^n}$  Wondering if there are more ways to do it

I am trying to determine if the sum $\sum_{n=1}^\infty \frac{n+4^n}{n+6^n}$ is convergent or divergent.   In attempting to solve this problem I began by seeing if I could do the divergence test - in this case it is not helpful. The terms $4^n,6^n$ look like geometric series type terms but the $n$ in the numerator and denominator are troublesome. I first tried factoring $n$ out of the expression:  $$\sum_{n=1}^\infty \frac{n+4^n}{n+6^n} = \sum_{n=1}^\infty \frac{1+\frac{4^n}{n}}{1+\frac{6^n}{n}}$$  Next I tried comparing to the series $$\sum_{n=1}^\infty \frac{\frac{4^n}{n}}{\frac{6^n}{n}} = \sum_{n=1}^\infty \frac{{4^n}}{{6^n}} = \sum_{n=1}^\infty{\left(\frac{2}{3}\right)}^n$$  This is a convergent geometric series as $r = \frac{2}{3}\lt1$  now I reason that the series $\sum_{n=1}^\infty \frac{1+\frac{4^n}{n}}{1+\frac{6^n}{n}}$ is neither smaller not greater than the series $\sum_{n=1}^\infty{(\frac{2}{3})}^n$ Am I able to conclude anything in this case by a direct comparison test or can I only conclude that the first series is convergent if the second is greater than the first?  Thanks


I have a Photos library on my Mac, which I want to move to an external hard drive in order to save space on my computer's internal hard drive.  I want to move the library to the same drive I use for Time Machine backups.  However, this link says it cannot be done: .        You can't move your library to a disk that's used for Time Machine backups.      But I assume that means the same volume. If I were to add a second partition to the disk, just for file storage – leaving the first partition for Time Machine backups – would I be able to move the Photos library to this second partition, as well as other files like iTunes library and documents?

Is it possible to partition and external drive an use only one of the partitions for a Time Machine backup?  Or does Time Machine need its dedicated hard drive?  (I've never used Time Machine before.)  If it is possible to do this, do I need to pay attention to anything in particular to make sure it'll work without issues?  I am aiming for one Time Machine partition and one NTFS one on the same external hard drive.  Is this feasible?


I know that colors are comprised of many other colors that can't be directly seen. But white? I thought white was just white. How come a combination of blue, yellow and red are not only are invisible to my eyes, but they make a more "White" white?  I tried coloring the pixels that comprise the white text with white and it looks ugly. Why is this the case?

I'm wondering why my browser (Firefox) add blue tints on the right and brown tints on the left of a solid grey (#333333) font color as shown in the image below.    Could somebody explain to me why this happens?


Let $C$ be a smooth genus 2 curve, with canonical divisor W. From Riemann-Roch's theorem, we know that $l(K)=2$ so there exist two functions $g_1,g_2$ that span $L(W)$.  Since $g_1$and $g_2$ are linearly independent, the map $\varphi:C⟶\mathbb P^1$ defined by $[g1(P):g2(P)]$ is a non-constant morphism of smooth curves, so it is surjective.  We also know that $\deg \varphi\geq 2$, else $C$ would be birrational to $\mathbb P^1$, contradicting the assumption on its genus.  I want to show with elementary arguments that $\deg\varphi=2$. Using that $\deg\varphi$ is either the degree of the zero part of a $g_i$ or its pole part, I tried to write $W$ as $D_0+Q_1+Q_2$, with $D_0\in\mbox{Pic}^0(C)$ and the $Q_i$ possibly equal to obtain a contradiction with the numbers of poles/zeros that $g_1$ or $g_2$ should have, but it seems it does not work.  If $D_0=0$, then as $\mbox{div}(g_i)+K=\mbox{div}(g_i)+Q_1+Q_2≥0$ and that $g_i$ has poles at $Q_1$ and $Q_2$, then this means the $g_i$ has 2 zeroes and poles and I get the result. But I fail to see why $D_0$ would be 0 be zero.  So my questions are: is my reasoning correct ? Why would $D_0$ be zero ? For my curiosity also, is there a more elegant way using elementary arguments ?  I am not familiar with sheaves and linear bundles, etc, and sadly I cannot find any proof of this well-known result with the most elementary language. Also, I do not want to consider a possible equation for $C$.  Thanks in advance !

Let $X$ be a smooth projective curve of genus $2$. Let $K$ be a canonical divisor. It is known $K$ has degree $2$ and it is not hard to show that $|K|$ is base point free so induces a morphism into $\mathbb P^{1}$ (up to linear isomorphism of $\mathbb P^1$). How do I show the degree of this morphism is $2$?  I've thought about the formula $$deg(f^*D) = deg(f) \cdot deg(D)$$ and taking $D$ to be a point, but I don't know enough about the preimage to say anything.


Find the area of the shaded region such that the measure of a side of the square is $x$ unit.    Here is my plan and incomplete solution:  Step 1: I need to subtract the area of the circle from the area square and divide it by $4$. I denote the resulting area as $A_1$  $A_1 = \dfrac{x^2(4-π)}{16}$ square units  Step 2: Next is I need to subtract the area of a quarter circle with radius $x$ unit from the square. I denoted this resulting area as $A_2$.  $A_2 = x^2\left(1-\dfrac{π}{4}\right)$ square units  Step 3: My next plan is to subtract $A_1$ from $A_2$. The result is denoted as $A_3$.  $A_3 = \dfrac{3x^2}{16}(4-π)$ square units  I was stock in step 3. I know that I still need to remove a certain portion to get the area of the shaded region.

Suppose the side length $a$ of the square is 10mm. A circle is tangent to all four sides of the square. And two quarter-circles with the same radius of 10mm have centers on the opposite vertices.  It may be easier to view it in the picture on the right. What’s the area of shaded region? Using some trigonometrical calculation, I got a complex formula $$S=\left[\frac{1}{2}(\pi -\arccos(-\frac{\sqrt{2}}{4}))+\sqrt{2}\sin(\arccos(\frac{5\sqrt{2}}{8}))-2\arccos(\frac{5\sqrt{2}}{8})\right]a^2$$ which gives 29.276$mm^2$. The way is far from beautiful. Don’t know if there are any simpler ways to do that? Is there any principles that I am not aware of? Thank you.


Is it possible to derive the key, for a playfair cipher, if both the message and cipher text are known?

I have a ciphertext generated by a  I do not know what was cipher used to generate it. I do however have the beginning of the plaintext.    What are the cryptanalysis approaches for classical ciphers?  How do you suggest trying to recover the plaintext in this instance? How can I leverage the known plaintext to attack the cipher?   I have this ciphertext:     NUVRRIEZWBRVRFFAPUUKFVRYNQBCINHZKNETUVDVUMRTEANPAFIELBPOANIXLCMEZQETKDKVWBMNCTRVUMRFNTFDGWRUMCSCTHSGKDULRFCNABNCGSNMMGRFNTLOWQRBETZRMUBQYURFRFASANGPEQRFFAFCZACAZCTUBTHKUNEZHPPWSGPNABHZKZQNREANLCHUCZDLMLPUNTMNETDAUINQADUNSUMGETETHFBNMNNONTFBBPOQEMZPETEQUIDTHKNABKDZWBDBRZUSRASUMNIRARETETHFBZKRHPNQFAKRICMGETMULCTCULSLGBIVWBDBIEMUFCUVNUGPINFBQTMPNUMSRNNANTNANCMNNTFUMUKRILRFFAPUUKFVRYNTCMETNUVFWDABBRFNRIEFRFNTHGPUHPNKCILEGBUTWUSCPQSLMNIBWQINFBQTFAVRLCKRHKLZNFAZLSNTBDBEASTD   It begins with the partial plaintext:      it turns out that


I went to my phone manufacturer the other day to get my phone upgraded to Jellybean 4.1.2 from ICS 4.0.4. Here's the thing, I know that upgrading doesn't take long but they said it will take an hour and they made good with that, so I'm at least worried on what they did with my phone for a full hour. Well, I forgot all about it when I noticed I have some numbers instead of app names on the battery usage screen. Worse, it appears they're using my data connection. Then I went to the data usage screen and more numbers showed. Should I be worried? I asked someone with a Jellybean phone and he said all he sees on his phone are app names. I don't want to register my card on the Play Store yet unless I'm sure my phone is safe. Is this happening on anyone else? What are those numbers?   Screenshot of Data Usage

A mysterious app named "10102" shows up in my data usage. It bears only the standard Android app icon (the Bugdroid logo with a cube on its torso). From what the graph tells me, it has used 36 megabytes of data in the background and zero on the foreground. I think I haven't uninstalled anything for months. Is it malware? I haven't sideloaded anything and only authorized my laptop as a USB debugger. If it's malware, how do I remove it? I have no idea how to find its package name and 10102 isn't in the list of downloaded apps in settings. I'm running stock & never-been-rooted Android 4.4.4 on Nexus 4.


I am planning to buy a new PC that has a 12 TB hard drive for "random" data and files, no programs.  Now I also want a similar HDD to backup my files from time to time. The extrenal disk is usually at a completely different place than the PC, so from time to time I have to load everything that is on the big internal HDD to the external HDD. As you can imagine I need a fast connection if I don't want to sit forever. My current system is at about 4TB and needs nearly a whole day over USB 3.0 (top speed of 120MB/s for the newer disks, and about 80MB/s for older external HDDs).  Now my idea is to put the new Plate into an USB 3.1 Type-C enclosure.  Now here is my question: Are these kinds of hard disks fast enough, that USB 3.1 is an advantage, or would USB 3.0 allow fast enough transfer rates and it is simply the HDD that is the limit.

I have a new laptop with USB 3.0 ports, and a new SATA 5200 rpm hard drive I just put into a new USB 3.0 enclosure.  I am copying my backups from the local hard drive to the new USB 3.0 hard drive/enclosure.  It has settled at 26.1 MB/sec.    Is that the speed I should expect, or might something be wrong?  Thanks.


I recently came across the approximation $$\ln n! \approx n\ln n - n + \frac{1}{6}\ln(n(1+4n(1+2n)))+\frac{1}{2}\ln \pi$$ Supposedly this was written in Ramanujan's last notebook, but I can't seem to find it anywhere else, nevermind a proof for it. Does anyone know if it was ever proven, and if so where such a proof is?

I saw this approximation for the factorial given by Ramanujan as $$\log(n!) \approx n \log n - n + \frac{\log(n(1+4n(1+2n)))}{6} + \frac{\log(\pi)}{2}$$ in , which claims the approximation is superior to Stirling's approximation. I tried to locate the reference but unfortunately I could not. I would appreciate if someone can throw light on how this asymptotic is obtained and the order of the error.


I forgot the terminal password, so how to break the terminal password? I know the account password but when I install something from terminal it asks a password which I forgot.

What is the default password of the sudo? I visit some forums, it tells that the default password is password, but it doesn't work, how can I determine the password?


I'm self studying Burton's number theory and came across the following problem:   Prove that:  $\binom{n}{1}+2\binom{n}{2}+\cdots+n\binom{n}{n}=n2^{n-1}$  So I tried expanding $n(1+b)^{n-1}$ with the binomial theorem and then let $b=1$, but couldn't really get anywhere. Could someone help?  Thanks

Prove that   $$\sum^{n}_{i=1}\binom{n}{i}i=n2^{n-1}$$   I can't find counting interpretations for either of the sides. A hint of "if $S$ is a subset of $\{1, . . . , n\}$ and $S^\prime$ is its complement then $|S| + |S^\prime| = n$" was also given, but I still don't know how to begin.


I probably read it in the 80s or early 90s.  I believe it was a short story, but almost definitely not more than a novella. Explorers come across a planet.  I believe there may be some conversation about "green plants" being weird, but that is fuzzier.  They discover a nomadic human-looking natives and track the migration path to a large concrete edifice.  They travel down to the structure and discover that it is a memorial of the launch of a colony ship and that this planet is actually the lost Earth.

This is a long-shot; I only remember a few details from two novels I read as a child, by the same author. This means they were originally published in the late 1970s at the latest, but I would guess they were older than that.  Both take place in a galaxy-spanning empire that is in decline; this decline is apparently irreversible, and has been going on for a very long time, on the order of centuries or millenia, as the central government's resources diminish and as there are rebellions on the peripheries. Technology is advanced, but stagnant. The central government is referred to as "Central Command", often abbreviated to CC. Mutants, and "greenies", are discriminated against, or worse. People from many cultures are considered "barbarians" and are second-class citizens, with restrictions on their occupations; one of the few that is open to "barbarians" is that of mercenary.  In one book, the story centers on the crew of a military vessel, which crash-lands on an uninhabited but pleasant world, which turns out to be Earth. In the opening passages of the book, members of the crew reflect on their losses to attrition in a long series of conflicts. One talks about an android, who'd helped them in one crisis, and another says, "That android was great! When did we lose him?", to be reminded of another battle. At the end of the novel, the protagonists meet the crew of another ship that had crash-landed on Earth; they decide together to turn their back on Central Command and settle on Earth. It's left ambiguous whether humans had originally come from Earth and abandoned it, or whether these were the first humans to settle there.  The other book is also set on Earth; it seems to take place sometime in the near future. I don't know how it relates in a timeline to the other novel I described, whether long before or long after. At some point, there was a reference to the city of Sacramento, as an agricultural center. Earth is considered to be under the oppressive authority of Central Command, but is a "barbarian" world. The protagonist, early in the novel, sees a sunlit wall, and thinks he'd like to stretch out on it, but does not, because that would identify him as a "greenie". It isn't really explained what a "greenie" is.


I wish to switch from Windows 7 to Ubuntu, and I'm trying to figure which (LTS) release should I use, whether to use the newest (16.04), an older one or one of the light-weight flavours (my computer is a bit old - bought on october 2010). My specs are:   Dell Inspiron N4030 Intel Core i3-350M, 2.26GHz 3GB RAM ATI Radeon HD530 512MB  Currently running Windows 7 64-bit   My usage is quite standard - internet, photos, videos, word-processing (mainly using LyX for LaTeX).  Thanks.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I have a problem with my pst-optexp package LaTeX script: I can't draw two or more different beams, each one alone works fine, so the error lies in the \drawbeam command. Here an example: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx}  % general \usepackage{nicefrac}  % for drawing the setup \usepackage{pst-optexp}  \begin{document}      \section{Main Section 1}     \subsection{Test2}      \begin{pspicture}[showgrid](0,0)(15.2,8.2)         %Illumination         \pnode(1.5,1){A}         \pnode(7,1){B}         \pnode(10,2){C}         \pnode(4,2){D}         \pnode(4,5){E}         \pnode(10,5){F}         \pnode(8.5,1){B1}          \optbox[position=start, innerlabel](A)(B) {Laser1}         \optbox[position=end, innerlabel](A)(B) {Fiber in}         \optbox[position=start, innerlabel](C)(D) {Fiber out}         \optbox[position=end, innerlabel](E)(F) {testbox}         \mirror(D)(E)(F)         \mirror(C)(D)(E)         \drawbeam[linecolor=red, ArrowInside=->, ArrowInsidePos=0.4, arrowscale=1.3](C){6}{5}(F)         \drawbeam[linecolor=green, ArrowInside=->, ArrowInsidePos=0.4, arrowscale=1.3](A)(B)     \end{pspicture} \end{document}  If both drawbeams are enabled (like in the example), then the only the first one is drawn, and the second one not. This is the notification:  Process started: xelatex.exe -synctex=1 -interaction=nonstopmode "document".tex GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Process finished normally  I am using TexStudio and XeLaTeX, if any more information is needded, just let me know. Thanks

I have troubles with optexp environment. There is a code  \documentclass[pstricks,margin=12pt]{standalone}  \usepackage{pst-optexp}  \begin{document} \begin{pspicture}(3.2,5) \pnodes(0,3){A}(1,3){BS}(3,3){M1}(1,5){M2}(1,1){PD} \psset{mirrortype=extended, mirrordepth=0.2}  \begin{optexp} \beamsplitter[bsstyle=plate, compname=BS](A)(BS)(PD) \mirror[compname=M1](BS)(M1)(BS) \mirror[compname=M2, variable](BS)(M2)(BS) \lens[compname=L](BS)(PD) \optdetector[compname=Det, dettype=diode](BS)(PD) \addtopsstyle{Beam}{beamwidth=0.2, fillstyle=solid,fillcolor=green!20!white} \drawwidebeam(A){BS}{M1}{BS}{M2}{BS}{L}{Det} \end{optexp} \end{pspicture}  \end{document}   and the result is this    and I get "MiKTeX GPL Ghostscript 9.19: Unrecoverable error, exit code 1" error. When I remove optexp environment, so  \documentclass[pstricks,margin=12pt]{standalone}  \usepackage{pst-optexp}  \begin{document} \begin{pspicture}(3.2,5) \pnodes(0,3){A}(1,3){BS}(3,3){M1}(1,5){M2}(1,1){PD} \psset{mirrortype=extended, mirrordepth=0.2}   \beamsplitter[bsstyle=plate, compname=BS](A)(BS)(PD) \mirror[compname=M1](BS)(M1)(BS) \mirror[compname=M2, variable](BS)(M2)(BS) \lens[compname=L](BS)(PD) \optdetector[compname=Det, dettype=diode](BS)(PD) \addtopsstyle{Beam}{beamwidth=0.2, fillstyle=solid,fillcolor=green!20!white} \drawwidebeam(A){BS}{M1}{BS}{M2}{BS}{L}{Det}  \end{pspicture}  \end{document}   the result is     which is correct but optical components are behind beam. I use XeLatex. What am I doing wrong? Which packages are missing? Thank you (example is from manual "Drawing optical experimental setups" where the code works correctly).


I need to choose appropriate hardware for virtualize with vmware - 1 windows server 2016 (active directory, wsus, centralized antivirus software...) - 1 windows server 2008 (run 2 server software) - 1 pfsense (openvpn only) - 1 linux server machine (cacti, loganalyzer)  For the host machine I can shoose between: 1 x 8 core Xeon Silver 4110 2.1 GHz - 16 GB RAM; 2 x 8 core Xeon Silver 4110 2.1 GHz - 16 GB RAM; 1 x 10 core Xeon Gold 5115 - 32 GB RAM; 2 x 8 core Xeon E5-2670 - 48 GB RAM;  What can I choose with the minimum requirement? Is the first sufficient?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I would like to light up a 2 W LED with a 3.7 V power source in the most efficient way possible. The Vf of the LED is 2.4 V. Is there any way I can reduce the voltage to 2.4 V from 3.7 V without using resistors as with a required current of 350 mA, the power wasted as heat in the resistor is too high. I am looking to find an easy way of accomplishing this as the circuit has to be used in a low cost device that needs to be efficient and cheap.

I understand that I can not connect an LED directly to a battery because it will draw too much current. Thus, there must be something else in the circuit to limit the current. What options are there? Are some methods more efficient than others?


I accidentally refreshed when I'am answering a question. Can that save a draft?

Many times it takes me a while to properly compose my question before posting. Sometimes it's just a jumble of ideas and concepts, and is not something I'd want seen immediately. However, there is no way to save a partial question unless you post it.  This should work exactly like it does in Gmail. There, once you start composing your question, it's autosaved as a draft. If your browser crashes or you need to come back later to complete it, it will be there for you to finish and post later.  Optionally, allow multiple draft questions and a page to edit/delete them. If needed, make them expire after some amount of time.


When I opened the terminal today on my MacOS laptop I got a last logged on message and on my line where I can type it says JohnBatasiPhone:~ AlbertRenshaw$  I don't know anyone named "John Batas"... and none of my iPhone devices have that name. I am Albert Renshaw, but what does the JohnBatasiPhone mean? Does my computer have a security breach?  I literally know nothing about terminal so I had a hard time even wording the title to this question (If anyone wants to edit it to contain the proper words it would be much appreciated).  When I type HostName, the output is johnbatasiphone.att.net.

When I open Terminal I expect it to show what my PS1 is set to \h:\W \u\$.  However it's not displaying my hostname Eriks-MacBook, as displayed in System Preferences.  Instead, it's showing a random string unknownb88d120cd4b2.   How can this be fixed or reset?  This machine is brand new, and the preferences/settings haven't been changed.


so currently I'm already dual booting windows and ubuntu. I've bought a new hard drive where I want to install the latest ubuntu but I want to keep my current setup whilst I make the transition to my new ubuntu installation. After that, I want to delete my ubuntu partition from the dual booting hard drive to just keep windows.  So essentially in the end, I'd end up with 1 hard drive with windows 7 and 1 hard drive with ubuntu. How would I go about doing this? How would I setup grub? I'm very new to this stuff, so any help appreciated.

I just re-built my desktop. I have a brand new 2TB drive and I'm also re-using a 250GB drive with Windows XP installed. The problem is that the XP drive has a virus that was causing the computer (before the re-build) to reboot swiftly and unexpectedly after Windows starts.  I have yet to turn on my re-built computer!  I am currently not worried about losing the data on the XP drive. My desired end-result would be a re-image of XP on the 250GB drive and to install Ubuntu 12.04 on the new 2TB drive.   What order should I do things in order to get to that point? I need to (in some order):   See that my new setup can POST Configure the new hardware Re-image the 250GB drive with Windows XP Install Ubuntu 12.04 on the 2TB drive   ... without having the virus cause any more problems. Understanding the reasoning behind the process would be very helpful.  Thanks!


Since the Sam Raimi Spider-Man movies of the early 2000s I think there have been at least three different actors for the character? What was the reason for this?

Spider-Man is the one franchise that is on course to a third reboot in a span of 15 years.   My question is what was the reason for these numerous reboots of Spider-Man which pretty much follow the same origin story for the Marvel superhero.  Has the comic creator or studio ever spoken out about the reasoning behind the same?


Viewing site over http and https are both working but prefer to configure it so that ALL visitors ONLY go through the SSL connection so that it always start with https://www.example.com - what am I missing?   I'm trying to do the following: visit http ://example.com and go to https ://www.example.com visit http ://www.example.com and go to https ://www.example.com visit https ://example.com and go to https ://www.example.com  I created and enabled the file name examplesite (see below) in the folder /etc/apache2/sites-available  <VirtualHost example.com:80>   ServerName www.example.com   ServerAlias example.com   Redirect permanent / https://www.example.com/ </VirtualHost>  <VirtualHost www.example.com:443>   ServerName www.example.com   DocumentRoot /var/www/example.com/public_html   ...   ... </VirtualHost>

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I recently downloaded a beamer theme: {metro}  I made a beamer by 1. Create folder 'presentation' 2. Copy beamer theme in 'presentation' 3. Create tex file in 'presentation'  This works fine.  However, I don't want to copy the beamer theme to folders everytime I create new a beamer presentation.  I think there is some folder which contains the default beamer themes.  Where should I place my beamer theme to use it by just typing \usetheme{metro} instead of copying the theme in the same folder?

I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.


I tried below given examples    String s=new String("cat");     String s1=new String("cat");     System.out.println(s==s1);     System.out.println(s.equals(s1));   this gives me output false and true.     String s="cat"; String s1="cat"; System.out.println(s==s1); System.out.println(s.equals(s1));   in this case the output of both is true may i know the difference between both i heard both wrapper class and normal string declaration gives same output

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


I am looking for a method to combine an array of strings into a delimited String. An opposite to split().  Wanted to ask the forum before I try writing my own (since the JDK has everything)

While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:  public String appendWithDelimiter( String original, String addition, String delimiter ) {     if ( original.equals( "" ) ) {         return addition;     } else {         return original + delimiter + addition;     } }  String parameterString = ""; if ( condition ) parameterString = appendWithDelimiter( parameterString, "elementName", "," ); if ( anotherCondition ) parameterString = appendWithDelimiter( parameterString, "anotherElementName", "," );   I realize this isn't particularly efficient, since there are strings being created all over the place, but I was going for clarity more than optimization.  In Ruby, I can do something like this instead, which feels much more elegant:  parameterArray = []; parameterArray << "elementName" if condition; parameterArray << "anotherElementName" if anotherCondition; parameterString = parameterArray.join(",");   But since Java lacks a join command, I couldn't figure out anything equivalent.  So, what's the best way to do this in Java?


May I ask how do i adjust the size of the graph? This is my code.  import matplotlib.pyplot as plt fig=plt.figure() ax=fig.add_subplot(111) ax.plot(mean, median, marker="s", linestyle="") for i, txt in enumerate(words):     ax.annotate(txt, (mean[i],median[i])) ax.set_xlabel("median") ax.set_ylabel("mean")  plt.show()   I tried to use   fig,ax=plt.subplots(figsize=(20,10))   but failed.

How do you change the size of figure drawn with Matplotlib?


I tried to install the nvidia-331 drivers but as usual it doesn't want to work... I get a blank screen when I boot up.  I tried the instructions here  but that didn't help  I was actually able to load the driver with jockey-text and startx worked, but obviously no unity or any windowing... I started it from recovery mode.  Hopefully someone can help before I have to reinstall the OS again.. sigh

I've  and rebooted my machine and now I get a black or blank screen.   How can I fix this?


I am travelling to UK with my family which includes my wife and 3 year old child from ireland.I made online application for my me and my wife in the gov.uk website and paid 111 euro each.Our childs name was included as asked in the application and do I have to make another application for my child?

We are sponsoring a family to visit us in UK as friends from Madagascar for two weeks. They have a 6 year old and a 16 month old.   Do the kids need their own visas, and are they the standard visitor visa or a special child visa?   Also, when I try and apply on the website I can only apply for one person so how do I apply for all the individuals in the family?   I have looked on the Immigration website and can't find the answers I need.


I am using TexLive 2011. Although I have downloaded PGF 3.0 and put it into the folder texmf but the \ pgfversion always result in 2.1.How to change PGF from 2.1 to 3.0?

I need to install a new TeX/LaTeX/ConTeXt package on my computer.  I'm running Ubuntu/Fedora/Slackware/Some-Version-Of Linux.  What are the possible ways to do this?    Note:   We get a number of questions that essentially reduce to this one; it was felt a good idea to have one question-and-answer that can cover all the standard methods.  See  for the discussion.  The question-and-answer are CW so that more information can be easily added.  If you have information to add, please do so.  If you are unsure, leave a comment here or (preferably) in .  Comments on the question and answer will be periodically removed to ensure that the information is clear.


I just became a level 6  (Xanathar's Guide to Everything, p. 50-51). At 6th level, shadow sorcerers gain the Hound of Ill Omen feature:  At 6th level, you gain the ability to call forth a howling creature of darkness to harass your foes. As a bonus action, you can spend 3 sorcery points to magically summon a hound of ill omen to target one creature you can see within 120 feet of you. The hound uses the  statistics, with the following changes:  The hound is size Medium, not Large, and it counts as a monstrosity, not a beast. It appears with a number of temporary hit points equal to half your sorcerer level. It can move through other creatures and objects as if they were difficult terrain. The hound takes 5 force damage if it ends its turn inside an object. At the start of its turn, the hound automatically knows its target’s location. If the target was hidden, it is no longer hidden from the hound.  The hound appears in an unoccupied space of your choice within 30 feet of the target. Roll initiative for the hound. On its turn, it can move only toward its target by the most direct route, and it can use its action only to attack its target. The hound can make opportunity attacks, but only against its target. Additionally, while the hound is within 5 feet of the target, the target has disadvantage on saving throws against any spell you cast. The hound disappears if it is reduced to 0 hit points, if its target is reduced to 0 hit points, or after 5 minutes.  It doesn't say a limit to how many I can summon. Does this mean I can stack disadvantage on a target?

I'm fairly certain that you can't have Disadvantage more than once on the same roll for any reason. But it still seems possible to gain Disadvantage from multiple sources, even if every instance but the first is negated.  Can players intentionally use this to forego multiple penalties? For example, if a PC has 3 levels of exhaustion and is fighting a basilisk, can they say "I'm going to avert my eyes because I'll have Disadvantage on my attack roll anyway?" or should there be some further penalty?


I have a rod of unit length which I split into 2 parts at a random point. Lets call the larger part X and the smaller part Y.  If we then split X into 2 parts at a random point and call X1 the larger part of this division and X2 the smaller part of this division.  and we also split Y into 2 parts at a random point and call Y1 the larger part of this division and Y2 the smaller part of this division.  What is the probability that X2 > Y1?   I get that the answer is 50% but when I try test it in a python program I get around 47.5%  Can somebody tell me if the answer is indeed 50% and if not can you explain why it isnt?

Suppose y>x.   What is the probability that the smaller segment of the piece initially split into length y is bigger than the bigger segment initially split into length x?  I ran a simulation and got roughly 47.7% chance but cannot show this analytically.


Let X and Y are independent random variables following geometric distribution with parameter p. Find the distribution of X given that X + Y = n.  I made it this expression... $$P\{X =i|X+Y=n\}=\frac{(1-p)^2p^2}{P(X+Y=n)}$$  I do not know how to proceed now

Setting  Suppose X1 and X2 are independent with the common geometric distribution w(k; p). Determine the conditional distribution of X1 given that X1 + X2 = n.  Solution  My argument is   $$\Pr[X_1| X_1+X_2 = n] = \frac{\Pr[X_1 + X_2 = n| X_1 = x_1]\Pr[X_1 = x_1]}{\Pr[X_1+X_2=n]}$$  and  $$\Pr[X_1 = x_1] = q^{x_1} p$$  $$\Pr[X_1+X_2=n|X_1=x_1] = \Pr[X_2 = n - x_1] = q^{n-x_1}p$$ while $$\Pr[X_1+X_2=n] =\sum_{j=1}^n q^j p q^{n-j} p = q^n p^2$$  However, I am not confident with this solution since geometric variables should be memoryless? So I feel like I am missing something here.


I have a program that I have to run by going into the terminal and typing "./filename". I want make an executable file that types this automatically for me.

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.  How can I create such launchers now?


I see this is one option:  c:$\backslash$subd1$\backslash$subsubd1   for representing   c:\subd1\subsubd1   is there something that leaves the TeX a bit more human-readable, such as   \escape{c:\subd1\subsubd1}

I want to define a command \filepath so that I can use \filepath{foo_bar.cpp} and it is printed in monospaced font.  Also, why does this not work? I get strange errors:  \newcommand{\filepath}[1]{\verb!#1!}


I have been learning about sorting algorithms and understand the idea of time and space complexity. I was wondering if there was a fairly quick and easy way of working out the complexities given the algorithm (one that may even be quick enough to do in an exam) as opposed to learning all of the complexities for the algorithms.  If this isn't an option, is there an easy way to remember or learn them for some of the more basic sortings algorithms such as merge sort and quicksort.

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


Could someone help me to write a bibliography in french? I tried many codes for this site (copy/paste in a separate document) and I always get errors.  e.g.

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


I remember that I heard something like this, that for a certain sample size one should not give more than $n$ decimal places for location and dispersion parameters e.g. for small samples sizes only one decimal place, for larger ones two or even more.  But I can absolutely find no information on this topic. There is this article:  which has some rules as a table but there is no hints about the sample size.  One interesting thing here is also that the paper states for test statistic, only one decimal place and max. 2 significant places should be given. In a statistics course we were taught to give test statistic results to at least 6 decimal places.

Is there a well founded rule for the number of significant figures to publish?   Here are some specific examples / questions:   Is there any way to relate the number of significant figures to the coefficient of variation? For example, if the estimate is 12.3 and the CV is 50%, does that mean that the information represented by '.3' approaches zero?   If a confidence interval has a range of orders of magnitude, should they still have the same number of significant figures, e.g.:  12.3 (1.2, 123.4) vs 12 (1.2, 120)  Should the number of significant figures in an error estimate be the same or less than the number of significant figures in a mean?


So i have made a path and i have no idea how to make it thicker, Normally with meshes you scale them with S, but its my first time doing something with paths so i have no idea how to make them thicker. I have tried the Solidify Modifier with no results. I have tried a multiple tutorials but all of them didnt for or were for 2.79 version of Blender. Or can i maybe make a Cylinder follow the path?

How can I add thickness to a curve? I already tried with the extrude and depth options in the curve settings, but it doesn't work properly.


So I'm a beginner to graph theory and really unsure how to approach this. I was thinking by counting Prufer codes, in which case you would want the second element in the Prufer code to be 3. So, it would be the number of Prufer codes where one of the labels are fixed at 3, so $n^{(n-1)-2}$ labeled trees?

How many labeled trees which have one vertex of degree 4 can we have? A tree with $10$ vertices has $9$ edges, so the sum of the degrees of the vertices is $2\cdot 9=18$. If there is one vertex of degree $4$, the sum of the degrees of the other $9$ vertices must be $14$. I don't know what to do next. Should I count all possible vertex degrees?


I see that in PCA the first principal component maximizes the variances amongst all the points within the data set. What exactly does this mean, what does it show and what does every other principal component thereafter tell me?  I read these really nice simple explanation on PCA that helped me understand PCA as a whole:     To decide how many eigenvalues/eigenvectors to keep, you should   consider your reason for doing PCA in the first place. Are you doing   it for reducing storage requirements, to reduce dimensionality for a   classification algorithm, or for some other reason? If you don't have   any strict constraints, I recommend plotting the cumulative sum of   eigenvalues (assuming they are in descending order). If you divide   each value by the total sum of eigenvalues prior to plotting, then   your plot will show the fraction of total variance retained vs. number   of eigenvalues. The plot will then provide a good indication of when   you hit the point of diminishing returns (i.e., little variance is   gained by retaining additional eigenvalues).   However, it's still unclear to me as to really what each PC means and what PC2 now represents and PC3, etc.

In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues.   I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it.        I strongly believe in the following quote:     You do not really understand something unless you can explain it to your grandmother. -- Albert Einstein   Well, I can't explain these concepts to a layman or grandma.   Why PCA, eigenvectors & eigenvalues? What was the need for these concepts? How would you explain these to a layman?


I want to know that is there any web development tool exactly like Adobe Dreamweaver? If your answer is yes, please suggest me it and If it is no, please help me to develop it. and that should only work with Ubuntu and Linux Platform.

I've used Windows for many years, using Dreamweaver as my editor as it had a file tree which is based on a project (via Local, FTP or SFTP).  I need a web development IDE with the following functionality:   syntax highlighting for PHP, HTML, CSS, JavaScript  file tree - Local, FTP, SFTP, Project-Based (e.g. via the methods of Local/FTP/SFTP) in other words, like Dreamweaver can open multiple files (tabbed)   Additionally, I wouldn't mind features like debugging, class listings, etc, as long as I can hide them away.


cd is a built-in command in Bash. Is a built-in command or function in Bash the same concept as a built-in command or function in an interpreter language (e.g. Python)?  Is "built-in" a concept of Bash itself?  Does any command that is not a built-in in Bash always have an executable file stored somewhere? Does any built-in always have no executable file stored somewhere?

I know that external commands are run in the shell by creating a separate process, but what exactly happens when a built-in command is run in a shell?  Are they executed as a function,  or does the shell create a new thread to execute them?


Is there any pythonic way to Split list to list of list with range 3.   x = [1, 2, 3, 4, 5, 6, 7, 8, 9] y = [[1,2,3], [4,5,6], [7,8,9]]  prev,re= [],[] for a in x:     if len(prev)==3:         re+=prev         prev=[]     else:          prev+=[a]

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I have a file in my root directory called bash_scripts and within it I have a file called create_py_dir.sh.  At present the only command in the shell script is pwd, which I am using just to ensure it is working correctly.  The directory structure is shown below;  desktop | myname(i.e. root directory)     |     bash_scripts         |         create_py_dir.sh   If I cd to the same directory as the scripts and run a pwd command it tells me that the file is in the directory /Users/myname/bash_scripts.  So lets say that I go back to the root directory and up one directory to the desktop via cd ../desktop and from there I run the script via relative path with ./../bash_scripts/create_py_dir.sh, the scripts works just fine.  However, if I try to execute it via an absolute path with ./Users/myname/bash_scripts/create_py_dir.sh I get the following error, ./Users/myname/bash_scripts/create_py_dir.sh: No such file or directory.  I think I have a fundamental understanding problem with how to run shell scripts from absolute paths.

What is the difference between absolute / canonical / relative paths?  I guess that absolute starts with a /. Can it contain /../?  Is a canonical path different from an absolute path in that it can't contain /../?  Is foo a relative path?  Googling posix canonical path didn't turn up much... What are the POSIX references for these terms?


When i do my updates, the /boot folder is always full with old stuff... So, after a while, I can't make any updates/upgrades anymore, because the /boot folder is full. I have to delete some stuff from /boot via sudo aptitude remove ...   I also have to remove from time to time my old headers and images...   Is that normal? My colleague, also with an Ubuntu does not have this problem  my du -h boot says:  3,4M    /boot/efi/EFI/ubuntu 3,4M    /boot/efi/EFI 3,4M    /boot/efi 127K    /boot/grub/locale 2,4M    /boot/grub/fonts 2,9M    /boot/grub/x86_64-efi 7,7M    /boot/grub 12K /boot/lost+found 100M    /boot

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


My home desktop computer runs Ubuntu 20.04 LTS with German as the interface language. This morning, for maybe the first time, I've seen an unidentified modal window three times that demands a password. Because it's modal, I have not been able to take a screenshot with Ubuntu's screenshot app. Roughly translated from memory, the message says something like, "Verification required. Your digital keyring was not automatically unlocked. Please enter the password." Because the window does not say "Ubuntu" or any application name, I don't know who's asking or what password it's asking for. I can hit cancel and keep working, but the window keeps coming back. Does this ring any bells with you? Any ideas what this window might be?

Whenever Ubuntu boots up, a dialogue pops up asking me to unlock my default keyring. Is there some way this can unlock automatically through PAM or some other magical way?


i have this jquery function //Open SettingsBox Function $(document).ready(function (){     var menuButton = $(".fieldOptionsMenuButton");      $(menuButton).click(function (e){         var fieldIdEnding = e.target.id.slice(22); //Cut off the 22 letters "fieldOptionsMenuButton" and just leave the fieldIdentifier (for example "_B1_Z1_1")         alert(fieldIdEnding);      }); });.  The alert is just to test if the function works and will be replaced with the actual code later. The thing is, the Buttons with the class fieldOptionsMenuButton are added with another button on the page and i think my jquery function doesn't work because the function is executed once, when the page is loaded and so it doesn't know the buttons with class fieldOptionsMenuButton that are added later. How can i make this work? can i just call the jquery function again whenever i have added a new fieldOptionsMenuButton? how would i do that?

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.


I buy refurbished, unlocked smartphones and try to use them as long as possible with a discount  for service.  Right now, I have an unlocked iPhone 4s running iOS 7.0.6 (11B651). I'd like to try upgrading to iOS 9 so that I can use some apps that require it. However, my research has turned up reports of iOS9 being quite slow on an iPhone 4s. While the benchmarks are useful, it's hard to know how frustrating it will be to have that kind of performance day-to-day without trying it.  So is it possible to try iOS 9 on my phone and revert back to iOS 7 if it is unbearable? If so, how does one do it?

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


I am trying to create a generic mapping function for GraphQL.NET. Here is the sample enum I'm using:      public enum ForcePower     {         Throw,         Pull,         Choke,         Lightning     }      public class Jedi      {         public string Id { get; set; }         public string Name { get; set; }         public string HomePlanet { get; set; }         public ForcePower Power { get; set; }             }   currently, the enum has to be passed in explicitly:          object obj = new Jedi();         PropertyInfo[] properties = obj.GetType().GetProperties();          foreach (var propertyInfo in properties)         {                             var isEnum = propertyInfo.PropertyType.GetTypeInfo().BaseType == typeof(Enum);              if (isEnum)             {                 var enumType = typeof(EnumerationGraphType<ForcePower>);                 Field(type: enumType, name: propertyInfo.Name, description: description);             }          }   Can 'ForcePower' be passed in dynamically?

I'm programming WCF using the ChannelFactory which expects a type in order to call the CreateChannel method. For example:   IProxy proxy = ChannelFactory<IProxy>.CreateChannel(...);   In my case I'm doing routing so I don't know what type my channel factory will be using. I can parse a message header to determine the type but I hit a brick wall there because even if I have an instance of Type I can't pass that where ChannelFactory expects a generic type.   Another way of restating this problem in very simple terms would be that I'm attempting to do something like this:  string listtype = Console.ReadLine(); // say "System.Int32" Type t = Type.GetType( listtype); List<t> myIntegers = new List<>(); // does not compile, expects a "type" List<typeof(t)> myIntegers = new List<typeof(t)>(); // interesting - type must resolve at compile time?   Is there an approach to this I can leverage within C#?


I decided to reinstall Windows, but on the step "Choose a Physical Location to Install Windows On" I appeared to doubt which partition to choose. There were System Reserved partition and partition where Windows resides (where Program Files, Windows and other directories are located).   So it made me think, which partition is active. But there's this Microsoft's alternative terminology. What do they even mean by these terms?

I recently  about accidentally marking my external HDD's partition as Active and how I could undo my accidental mistake. I followed the instructions provided and they worked fine. This involved some command line magic and from what I understand, I did not have to really do this, but I just wanted to get things back to how they were originally. After making the fix things went back to normal in disk management. After I restarted my computer though i had an issue:  BOOTMGR is missing Press Ctrl+Alt+Del to restart  Rugh roh! I brought my laptop to work so I could search for a solution on my work computer and I found . To summarize the instructions, I had to reboot with my Windows 7 install disc and click the Repair button. Once there I could then repair the start-up options. One of the commenters on the site , as the first time the "repair" doesn't actually fix it. I found this to be true as well. I tried to repair it and it did some work, then rebooted. I then got the same error again. I booted from the CD again and repaired the start-up options then after this second time Windows started to boot up. Before the restart I got a nice info window telling me that it did make repairs to the boot info (this was promising). I've been using Windows 7 for a few days now with no problem, but I just recently noticed that I now can see the System Reserved partition in Computer:  I immediately went to disk management to see what was up. I noticed that my System Reserved partition is no longer marked as System and instead I believe the repair operation made my C: drive the system partition. I'm not fully aware of what the System partition really is but I briefly read that its a Windows 7 thing that gets created on install of Win7 that writes some BitLocker encryption stuff to a isolated partition as well as some boot files.   How can I undo this and make the System Partition marked as System instead of my OS C: partition? How can I make it so that I don't see this partition in Computer (I believe fixing #1 will fix this) What are the implications of what the current state is and the fact that I can now browse into this new partition?


I asked this question earlier today:    It was, in my opinion, well-posed but the answers made me realise that what I was asking was illogical. Of course, in the interests of the folk replying, it would not be good if I could delete the question as that would remove their gained reputation points. But I would like to signal to the community that the question is a poor fit to the knowledge base that SO is aiming to build: why should other folk be relied upon to do that? I would be willing to sacrifice a reputation point for the downvote for this sake.  Of course, upvoting your own question will lead to many problems, but I am not asking for that: just the ability to downvote.  I will, of course, be wanting to downvote this question too if it turns out that, on inspection of any replies, what I'm asking here is also illogical.

Once in a blue moon, I've wanted the ability to downvote my own answer to some question.  ()  Obviously upvoting one's own posts is out of the question.  But down is different.  Voting my own answer down can help me improve the site by pushing my answer lower in the ranking than another answer with a better or more situation-appropriate alternative.  It's not something I'd do often, but I would use this feature if it were available.  If implemented, I'd expect this feature to operate just like downvotes on other user's posts.  That is:   I get a few seconds to undo the downvote;  I get to remove the downvote after an edit to the post;  I lose a point for placing the downvote (CW excepted); I lose two points for receiving the downvote (CW excepted).   If you're noticing that I'd lose 3 points for downvoting my own non-CW post, congratulations! You can add!  I can think of a couple of potential downsides to this change.  The first one may be a dealbreaker; the second is probably not that big a deal.   Strategic downvoting of oneself: since you can undo the vote after an edit, and you can always edit your own posts, someone could downvote themselves soon after posting (especially on a FGITW answer) to garner extra sympathy upvotes. Badge collecting: the Peer Pressure badge just got easier, because if you have a -2 score on an answer, just downvote and delete for an instant badge.


I don't know if this is a well-known fact, but I have observed that every number, no matter how large, that is equally divided by $9$, will equal $9$ if you add all the numbers it is made from until there is $1$ digit. A quick example of what I mean:  $9*99 = 891$ $8+9+1 = 18$ $1+8 = 9$  This works even with really long numbers like $4376331$ Why is that? This doesn't work with any other number. Similarly for $11$ and alternating digits sums.


I would like to increase my /home partition but I can't find right manipulation to do it (I know I need to use gparted live cd) but when I try yo extend the /home partition, there is no disk space available.   Can someone help me and tell me the right manipulation to increase the /home partition ?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I'm new to Ubuntu (in fact to Linux) having come from a purely Windows environment. I've installed Ubuntu 14 on VMware - can someone tell me how to install VMware tools please?  Thanks in advance

I installed my Ubuntu in vmware, no I need install vmware tools, I got error:  Searching for a valid kernel header path... The path "" is not valid. Would you like to change it?[yes]  In CentOS, I run the following commands to resolve this issue: yum install gcc-c++ yum install kernel-devel yum install kernel-headers yum -y update kernel  But I don't know how to do in Ubuntu. I have tried the following commands but nothing changed sudo apt-get update  sudo-get install build-essential linux-header-$(uname -r) sudo ./vmware-uninstall-tools.pl sudo ./vmware-config-tools.pl sudo ./vmware-install.pl  Issue Changed: Ran sudo ./vmware-uninstall-tools.pl  and deleted the folder of /etc/vmware-tools then I ran  sudo ./vmware-install.pl  Now I can successfully install vmware-tools. After restart, I can see the folder /mnt/hgfs, but can't see my shared folder.


I have a microSD card that stopped working and am having issues getting it to work. The card is not old and wasnt used a lot. I am able to format it on Windows and Linux but always goes back to the same settings. Whenever I format it on gParted it goes trough with no errors but if I refresh the Devices it goes back to the same settings. This is what gParted shows me: Unable to detect file system! Possible reasons are: - The file system is damaged - The file system is unknown to GParted - There is no file system available (unformatted) - The device entry /dev/mmcblk0p1 is missing

I have a 2 GB SanDisk MicroSD card.  I normally use this card in my Nikon camera but ever since I used it in a Brother printer, I cannot delete any of the files, write or format the card.  I've searched online, including SuperUser, but my problem seems unique in that I do not get any errors when deleting, writing or formatting card.  Nikon Camera:  Everything appears normal when using this card taking pictures... no errors when supposedly saving the photo.  However, when trying to view pictures, the camera reports that none can be found.   I can do a "Quick Format" within the camera'a Setup screens but the card is not formatted and no errors reported.   Brother Printer:  Scanning direct to this MicroSD card.  (this is the incident that "broke" the card)  First document scanned fine.  Every subsequent attempt since then always gives an "Out of Memory" error.  MacBook:  I am manually deleting the files without errors, but the next time I insert the card, the files re-appear.  SDFormatter:  I downloaded and installed the latest version of .  I am doing a "Overwrite Format" option, I get no errors, and the format completes with a success message.  However, all of the original files remain on the card!  I am using a MicroSD to USB adapter with the MacBook and a MicroSD to SD card adapter with the Nikon.  Clearly, based on all observations above, I cannot write to the card.  Weirdly, with the exception of the Brother, I just don't get any errors when writing.  It's like the card is locked, even though it cannot be locked without the hardware lock on the SD adapter, and I never get any "write protection" errors.  I suspect that a corrupted MicroSD card is the root problem, but here are my questions:   Why would I not get any errors when writing, deleting or formatting? What can I do or use to verify the hardware integrity and/or fix this card as needed?


We are given parameters $a > 0, b > 0$. Task is to integrate that: $\displaystyle \int_0^1 {\frac {x^a-x^b} {\ln x} dx}$. I have tried approaching problem from different angles with no luck.  I tried integration by parts(tried all combinations of possible $v$ and $u$), u-substitution with no luck. Also I tried to integrate this two similar terms separately.  Tried to get some idea of how to go from answer, got nice answer from MATLAB: $\displaystyle \ln{\frac{a+1}{b+1}}$, but no idea how to reach it.  I would appreciate some suggestions.

Is the integral $$\int_1^\infty\frac{x^{-a} - x^{-b}}{\log(x)}\,dx$$ convergent, where $b>a>1$?  I think the answer lies in defining a double integral with $yx^{(-y-1)}$ and applying Tonelli's Theorem, but the integral of $\frac{x^{-a}}{\log x}$ is still not integrable. Any ideas?


How is the ability of a person who gained physical access to your computer to get root with those steps in any way secure?   When grub2 menu opens press  e  to edit the Linux start options Change:   "linux   /vmlinuz-2.6.35-23-generic root=UUID=e7f1e48d-0015-485f-be7d-836217a31312 ro   quiet splash"    to:  "linux   /vmlinuz-2.6.35-23-generic root=UUID=e7f1e48d-0015-485f-be7d-836217a31312 ro init=/bin/bash"  Now you have root access just do:   mount -o remount,rw / passwd user mount -o remount,ro /  sync  reboot the computer and you win.   My question is, how is being able to break into any Linux machine through grub2 secure? I don't understand that fact about Linux, thank you for your answers.

Recently one of my friends came over to my place, within 15 minutes he hacked my account using a Live CD and reset the password in front of me. I was baffled to see such a thing. Please guide me to prevent such a future attempt using a Live CD.


I propose using a single sequence for the bigint identity columns of most or all tables. (Essentially, OID, except 64-bit.)  This helps prevent security problems for a multi-tenant application that joins tables incorrectly.  While a uuid could be used for this, bigint is half that size, helping save index space.   My understanding is that sequence generation is very fast in PostgreSQL. The only downside I can see is widening the type of tables could get by with 4 byte integer IDs, but thanks to PostgreSQL upsert behavior (generating a new value whether or not it's needed), I rarely use int IDs anyway. Is there an issue with approach? I haven't found anyone advocating for it, but I consider the join safeguard to be quite nice.

We are considering using a shared sequence to assign ids to primary keys for all of the tables in our database. There are about 100 of them. Only a couple are inserted to frequently and regularly. We want to rule out it being "a terrible idea for an obvious reason" before we moved to the phase of actually trying it and testing it at load.  Our peak load is of the order of 1000 inserts a second, across a couple of tables.  Our research thus far indicates that  - sequence generation speed shouldn't be an issue - sequence fragmentation (gaps) will happen, but shouldn't be an issue - id exhaustion won't be an issue  We're not sure if we're missing other big things. We'd be grateful for people's opinions, especially from people who have tried it before and had either positive or negative experiences.  For context - we have two main motivations for doing this.  One motivation to do this is so that we can define a bunch of dictionaries (we call them scopes) and have human readable words assigned to those ids, so we want to make sure that ids in different tables never overlap. So, in one scope, id 12345 might be assigned the value "Green" and in another it might be assigned "Verde". (Actually, we don't use it for internationalisation, but we might one day).  The other motivation is to make it easy to have several deployments in the field and know (by uniquely setting each deployment's sequence couple of most significant digits) that our deployments won't overlap primary keys. (Like a GUID lite).


Google "ring is made from silver" & it returns .  Google "ring is made of silver" & it returns .   says "We often use made from when we talk about how something is manufactured" & "We use made of when we talk about the basic material or qualities of something. It has a meaning similar to ‘composed of’".  So, if we say "This ring is made from silver", we want to emphasize how it is manufactured but if we say "This ring is made of silver", we want to emphasize the basic material of it.  So, "This ring is made of silver" & "This ring is made from silver" are both correct but have different meanings, right?

(1) Wine is an alcoholic beverage made from fermented grapes or other fruits. (Wikipedia) (2) Tables were made of marble or wood and metal (typically bronze or silver alloys), sometimes with richly ornate legs. (Wikipedia)  Why is 'from' used in (1), whereas 'of' is used  in (2)? Is it a stylistic choice whether to use 'of' or 'from'? Or, in case of chemical changing, differently from changing in shape only, 'from' is preferable?


I have a very small drive holding my OS. it's built in to my device, so I can't swap it out for a better one.  I would like to do something like use symbolic links, but rather than replacing them, basically merge the two disks, if possible. I've tried using symbolic links and that didn't work at all. is there something similar, but that will treat two directories as the same one?

I am about to set up box to basically be a file server. I plan on having multiple drives in the box, and would like to set them all up so that they appear to be a single drive. So I could essentially have it mounted at say /media and not really care which drive gets used. I am not sure what the correct terminology for doing this is, so my Google fu is useless in this situation.   So how do I set up multiple hard drives to appear as one single drive?


More than once I have seen the sizeof operator used on index 0 of an array act as the denominator when storing the number of elements of an array. My question is why use the sizeof operator instead of just dividing by 1 or not dividing at all? See an example of this phenomenon below in some sample code from . static int arr[] = { 1, 10, 4, 5, 6, 7 }; static int sum; static const int n = sizeof(arr) / sizeof(arr[0]);  //RIGHT HERE!!!!!  int main() {         int i;          for (i = 0; i < n; i++)                 sum += arr[i]; }

How do I determine the size of my array in C?   That is, the number of elements the array can hold?


Note: I cannot be root on example.com, so editing httpd.conf isn't an option.  I want anything from  to redirect to be https and including the slash directory. This is an example of the problem. The same problem if it is ... or ...  If the URL looks like this:  http://www.example.com/suggestions   It incorrectly redirects to the home page:  https://www.example.com/index.php   When the desired result is for it to redirect to here:  https://www.example.com/suggestions   Here is the .htaccess code I'm using:  RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.example\.com$ RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

This is a  about redirecting from http to https in Apache Related:     I have an Appache web server which serves both http://example.com/ and https://example.com/. I want to redirect all http requests to https. Currently I'm using this .htaccess rule to redirect http requests to https. RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}   It's working as expected for example.com but the same rule is not working for sub links, when I access existing links, like example.com/about it will still load in http, no redirection happens for existing links. How can I make Apache redirect all http requests to https?


splash screen comes up then goes to a blank screen after updating software. How do I access my desktop?? Desperate for help! Thanks

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Is there a way to get notified if a new question is posted in one of my Favorite tag other than me clicking on the tag or browsing through new questions all the times?  I have a favorite tag (Bloomberg) with low monthly number of questions in it (around 30-40).  And since I can be of great help in that area to other people, I would like to see if there a notification system in place (such as email).

Now that tags have this erm...  which appears when you move your mouse over them (try it! ), one question remains: What in the billion blue blazes does the 'subscribe' button do?   It's not RSS, since a traditional RSS feed link appears beside it, and clicking on it seems to increment the number of subscriber by one, but other than that scouring over the Stack Overflow UI does not appear to reveal anything. Surely this feature would have more use than serving as a popularity contest for the tags?


In Python 3, I have written a program that checks if it has been more than 30 seconds since the last time the commands started and executes these commands. At the same time, it checks for other commands that are executed for 10 seconds, and in addition, a condition must be true.  from datetime import datetime  lastExecute1 = datetime(1, 1, 1) lastExecute2 = datetime(1, 1, 1)  while True:     utcnow = datetime.utcnow()     if (utcnow - lastExecute1).total_seconds() >= 30:         runCommands1()         lastExecute1 = utcnow     if (utcnow - lastExecute2).total_seconds() >= 10 and someCondition:         runCommands2()         lastExecute2 = utcnow   The program works, but the processor load is high (I run on Raspberry Pi) and the processor is heated.  That's why I used a sched module (). This program also works, but with a lower processor load, and that's good.The problem is that the delay in the previous program was only a few milliseconds, and now it is half a second (the commands are run at 0:0.0, 0:30.5, 1:1.0, 1:31.5 ... instead of 0:0.0, 0:30.0, 1:0.0, 1:30.0 ...). Therefore, within 10 minutes, the delay increases for approximately 10 seconds.

I'm looking for a library in Python which will provide at and cron like functionality.  I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron.  For those unfamiliar with cron: you can schedule tasks based upon an expression like:    0 2 * * 7 /usr/bin/run-backup # run the backups at 0200 on Every Sunday  0 9-17/2 * * 1-5 /usr/bin/purge-temps # run the purge temps command, every 2 hours between 9am and 5pm on Mondays to Fridays.   The cron time expression syntax is less important, but I would like to have something with this sort of flexibility.   If there isn't something that does this for me out-the-box, any suggestions for the building blocks to make something like this would be gratefully received.  Edit I'm not interested in launching processes, just "jobs" also written in Python - python functions. By necessity I think this would be a different thread, but not in a different process.  To this end, I'm looking for the expressivity of the cron time expression, but in Python.   Cron has been around for years, but I'm trying to be as portable as possible. I cannot rely on its presence.


Why does not $ \int_{b}^{a} 2\pi \,f(x) \,dx $ yield the correct answer when calculating the surface area of a solid of revolution?

Suppose we rotate the graph of $y = f(x)$ about the $x$-axis from $a$ to $b$.  Then (using the disk method) the volume is $$\int_a^b \pi f(x)^2 dx$$ since we approximate a little piece as a cylinder.  However, if we want to find the surface area, then we approximate it as part of a cone and the formula is $$\int_a^b 2\pi f(x)\sqrt{1+f'(x)^2} dx.$$  But if approximated it by a circle with thickness $dx$ we would get $$\int_a^b 2\pi f(x) dx.$$  So my question is how come for volume we can make the cruder approximation of a disk but for surface area we can't.


I'm answering a practice problem in java and I've created some code. However, when I run it I get an error and I'm not sure what the error means   I've tried re-reading the code, but I still don't know what the error is:    Exception in thread "main" java.lang.NullPointerException   at SugarSmashPlayer.setHighestScore(SugarSmashPlayer.java:42)   at Main.main(Main.java:7) Process finished with exit code 1    public class Main {      public static void main(String[] args) {         SugarSmashPlayer Jacob = new SugarSmashPlayer();         Jacob.setHighestScore(40,1);         System.out.println(Jacob.getHighestScore(1));     }  }   public class SugarSmashPlayer {     private int IDnumber;     public String screenName;     public int[] highestScore;     public int level;       public int getIDnumber() {         return IDnumber;     }      public void setIDnumber(int IDnumber) {         this.IDnumber = IDnumber;     }      public String getScreenName() {         return screenName;     }      public void setScreenName(String screenName) {         this.screenName = screenName;     }      public int getHighestScore(int level) {         if(level > 10 || level < 1) {             System.out.println("Invalid level");             return 0;         } else {             return highestScore[level-1];          }     }      public void setHighestScore(int highestScore, int level) {         if(level > 10 || level < 1) {             System.out.println("Invalid level");         } else {             if(level > 2 && this.highestScore[level-2] > 99) {                 this.highestScore[level - 1] = highestScore;             } else {                 if (level == 1) {                     this.highestScore[level - 1] = highestScore;                 } else {                     System.out.println("You have not achieved a score of 100 or greater in the previous level");                 }             }         }     } }   I expected the highscore for level 1 to be set to 40 and when I gethighscore I expected it to display 40

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 have a custom form in my site. After couple of months a big issue appears.   Not only that the table cache_form has become huge, but also if I empty that table and disable my custom form, the cache_form keeps increasing over and over, so my website and whole server becomes very slow.   Some spambots are killing my server and I've already tried "Bad behavior" module, but there aren't any positive results. Also my custom form has a Honeypot protection, so I receive very few spams from there, but the bots keep slowing everything.   Can anyone post some advice, anything will be useful?

Cache table's size had increased to 10+ GB last month, and I had fixed it temporarily by truncating it. Last time I checked it was around 1GB. So in couple of months it will hit 10GB again. How should this be dealt with ?   Note that I have disabled all cron jobs on this site. If this is the reason, which cron should be enabled ?


I'm working on a layer of thousands of points, some of points are very close together.  I want to group them into clusters according to the following rule: "The distance between all points within each cluster must not exceed 500m".  I can do it  with symbology (distance : map units (500m)).  But how to assign a cluster to each point within the attribute table?

I have a bunch of points on a QGIS map. Each point is a unique sampling event. However, some of these points have been sampled multiple times but there is no common identifier in the attribute data to determine this. The only way we can see this is by looking at the map and seeing points very close to each other.   I am wondering if anyone has a method to assign points within a 150 meters of each other a common identifier?


In/after 3 hours I will go to work.   I will have to go to work after 3 hours from now.

He will come back in two hours.   vs.     He will come back after two hours.   What's the subtle diff?


On Stack Exchange, not this Meta, my profile keeps syncing with my oldest profile, which is my Sci Fi and Fantasy profile.   How can I fix this, or is it impossible to stop it from syncing? How can I stop the narrative I have on the Sci-Fi site from syncing to my Stack Exchange network profile?

My oldest account on the network is Area 51, followed by Mi Yodeya.  I recently filled out the "about me" section on Mi Yodeya (but nowhere else) and did not choose the "update all sites" option because my blurb is pretty specific to that site.  I intended to have that blurb on exactly one site.  I was surprised tonight to discover that that blurb is now on my network profile, where I see no "edit" link.  Am I stuck with either having a site-specific blurb as my network blurb (because it's my first non-Area-51 site) or rewriting it to be more general?  Or is there some way that I can independently edit the network profile?  (Or designate a different site as the default?)   shows that someone else had this problem too, but I'm asking for support, not for a new feature, so I'm asking this separately.


A few months ago, I contacted a person who conducted research in a topic that could easily be combined with my own work.  For this reason, I sent him an e-mail exposing my research and why it could be interesting to collaborate, taking into account his results. He answered me and showing interest in the work (that is what I read between lines). Furthermore, he recommended me some literature.  When I read about half of the documentation, I sent him a mail with the insights I got and several of my publications, justifying my points. He answered me again, discussing some points and glad to have my work pending to read.  I finished his readings and I sent back my impressions. He continued the discussion and excused himself because of not having read my papers.  After two months, I have no reply from him. What should be my next step towards the collaboration?

When meeting some scientists in person, I've had good conversations with decisions upon interesting plans for research cooperation and personal visits. But then, subsequent contact by e-mail is difficult, where the other party either doesn't reply at all, or very slowly (several weeks +). However, when I then meet them again at a later date, they are still enthusiastic about the project (where the bulk of the work is mine) and a short in-person discussion makes more progress than the past months of (lack of) e-mail have. So it appears that a lack of interest in the project does not explain the lack of response. The project is scientifically interesting, fits with my PhD, and the visit enhances my chances of finding a post-doc after my PhD (it's a very good institute for my field).  I understand that many scientists are very busy and flooded by e-mail, but it feels sad to abandon a potentially interesting project just because communication by e-mail is not working well. I'm quite sure it would work if I were in the same building. What strategies exist to mitigate this problem? I can think of:   Try to ask a common acquaintance to poke him/her (my local colleague has a shared friend with him/her). Pro: Might get indirect feedback as to why the irresponsiveness. Con: involves 3rd party (may or may not be on-site) not necessarily involved. Send reminder e-mails (did you see my e-mail from 20 February?). Pro: increases chances of being noticed. Con: may be considered annoying Phone. Pro: hard to run away. Con: I don't like phoning and I don't like being phoned. E-mail someone sitting in the neighbouring office. Pro: neighbour has small step to irresponsive scientist. Con: a bit strange to involve someone I don't even know Give up on the project. Con: means no project and no visit. Try to do the project without their input. Pro: no need for communication. Con: might waste a lot of time by trying known dead-ends that I'm not aware of.    What other options exist? What advantages and disadvantages have I not thought of? What is wise to do?