We have inherited a system which has surrogate keys on every table (that is, an auto-increment primary key, id). All of the foreign key constraints are on individual surrogate keys, and this seems to allow inconsistent data to exist in the database. Consider the following tables:  // Global list of available IO io (id, type, name, etc...)  // Configuration of devices attached to the system devices (id, name, etc...)  // Sensors connected to a particular device device_io (     id PRIMARY KEY,     device_id FOREIGN KEY TO devices(id),     io_id FOREIGN KEY TO io(id),     [io parameters]... )  // Control loop parameters connecting input sensors to output sensors device_control_loops(     id PRIMARY KEY,     device_id FOREIGN KEY TO devices(id),     input_id FOREIGN KEY TO device_io(id),     output_id FOREIGN KEY TO device_io(id),     [control loop parameters]... )   Because the input_id and output_id refer only to device_io(id), I can insert invalid data like this:  INSERT INTO io (1, 'input', 'Temperature'), (2, 'output', 'Heater'); INSERT INTO devices (1, 'Device 1'), (2, 'Device 2'); INSERT INTO device_io (1, 1, 1), (2, 2, 2); INSERT INTO device_control_loops (1, 1, 1, 2);   The control loop entry is invalid. It's for device_id 1, but it refers to IO from device 2. In this system you are not supposed to be able to do this.  I am sure this must be a violation of normal form, but I'm not sure which.  Perhaps the violation is with what the foreign key should be? To prevent this inconsistency in the current design the foreign key would have to be:  (device_id, input_id) FOREIGN KEY TO device_io(device_id, id)   This seems very wrong to me. Is this where we would violate a normal form?  The way I would do this is have input_id and output_id refer to io(id) rather than device_io(id). Then the foreign keys would be:  (device_id, input_id) FOREIGN KEY TO device_io(device_id, io_id), (device_id, output_id) FOREIGN KEY TO device_io(device_id, io_id)   Which seems much more sensible.  In summary, I would like to understand exactly what the issue is with the current design so I can provide justification for changing it.

I have an entity that cannot exist without being defined by another, and I want this entity to participate in a many-to-many relationship.  Example: An artist has an album (the album cannot exist without an artist), the album also has many tracks, but the same track can exist in many albums.  So we have a many-to-many relationship between the album and the tracks.  If the album is a weak entity, then its primary key is a foreign key referencing the artist, thus it cannot be a foreign key to another table representing a many-to-many relationship.  The question is: is it possible to have this kind of relationship in SQL, and if so, how do I express it?


Quite often when I type the word "anymore" in software featuring built-in spell check, I get the following kind of warning:    (this one is courtesy of ).  i.e., the "anymore" word gets underlined as if it didn't exist. I'm not a native speaker, so every time I see the above, I'm in doubt.  Is "anymore" a word?  Grammarly seems to agree:    But then why on earth aren't software dictionaries up to date? I mean, anymore doesn't look like an esoteric word that would rarely be used, so I would expect, if the warning was a false positive, that it would have been quickly reported and corrected already?  Could it be that it's valid in BE, and not in AE, or the other way around?

any more requests anymore requests  Are these two the same? It seems that "any more requests" is grammatically correct while "anymore requests" is not. Am I right? Why are they different?


I'm new in learning C++. I'm trying to understand that under which conditions we pass pointers as function argument. According to my understanding when we pass the pointer as function's argument it overwrites the originally stored value. Same is the case when we pass by reference. Is there any other reason for it? Please try to explain this using simple language so that I can understand.  // pass a reference void Foo(int &x) {   x = 2; }  //pass a pointer void Foo_p(int *p) {   *p = 9; }  // pass by value void Bar(int x) {   x = 7; }  int main() {   int x = 4;   cout<< "before function call "<< x<< endl;   Foo(x);  // x now equals 2.   cout<< "after first call x is "<< x <<endl;   Foo_p(&x); // x now equals 9.   cout<< "after second call x is "<< x <<endl;   Bar(x);  // x still equals 9.   cout<< "after third call x is "<< x <<endl; }

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


I am working on a project which runs on ArcGIS platform using VB.NET. It is to model a sub-surface fault plane (currently a plane rectangular model with some dip) and then to find required distances from various points on surface of the earth. These distances are not necessarily nearest distances.   One idea I got and decided to use is TIN network.   I want to know if this is productive given that the number of points I know on surface would be only 5.   Is there any better option to model this?   And one more point I want to remind is that we can not model perfectly vertical faults using that.

I need to model a fault plane below the earth's surface and find distances from different points on the surface of the earth.   I know the dimensions of the plane and its orientation but I can do that on a paper.   How to set this up in ArcGIS and find the distances I need?


I am using this script to add in a date whenever a row is edited. I want it to ignore the first row. Thoughts on how to do this?  function onEdit() {      var s = SpreadsheetApp.getActiveSheet(); // Get spreadsheet name      var r = s.getActiveCell(); // store active cell name in current spreadsheet    var cell1 = 2 // This is the row I want to put values   if(r.getColumn() != cell1) { // Ignores this row (where I put the dates)     var row = r.getRow();  // Get column # from active cell     var time = new Date(); // Get date and time of last mod     time = Utilities.formatDate(time, "GMT-05:00", "MMM dd 20yy, hh:mm"); // Format date and time     SpreadsheetApp.getActiveSheet().getRange('B' + row.toString()).setValue(time);   };  };

There is this question regarding adding checkbox functionality to Google Drive: . And a great  is:     In the Google Sheets spreadsheet go to Tools -> Script Editor.   Enter the following code:   function onEdit() {   if(SpreadsheetApp.getActiveRange().getValue() == 1) {     SpreadsheetApp.getActiveRange().setValue('=CHAR(10004)');     SpreadsheetApp.getActiveRange().setBackgroundRGB(0,255, 0);   }   if(SpreadsheetApp.getActiveRange().getValue() == 0) {     SpreadsheetApp.getActiveRange().setValue('=CHAR(10060)');     SpreadsheetApp.getActiveRange().setBackgroundRGB(255, 0, 0);   } }      Enter into any cell a 1 for a tick, and a zero for a cross.    This code is great and it works beautifully, but I would like to know how to ONLY apply that to a range of cells and not to the whole spreadsheet.  By example, cells: G25 x I47


I am trying to figure out the list of possible ways to find out if a Linux machine is 32 bit or 64 bit.   Method 1:  The command uname -m will specify if my machine is 32 bit or 64 bit.    Method 2:  I can run the command getconf LONG_BIT to find if it is 32 bit or 64 bit.   Method 3:  I can check for the lm bit in the /proc/cpuinfo file. If that bit is not set, then I can say my machine is a 32 bit machine.   Which of the above methods is the more accurate way of telling if my machine is a 32 bit machine or 64 bit machine? Or is there any other efficient way/command to find out the same?

I'm confused. Running Fedora Linux, lscpu yields:  Architecture:            i686 CPU op-mode(s):          32-bit, 64-bit ...   But when I try to install a 64-bit program (Chrome) I get error like:     Package /....x86_64.rpm has incompatible architecture x86_64. Valid architectures are ['i686', 'i586', 'i486', i386']   I'm less interested in being able to install Chrome and more interested in why lscpu says that my CPU can run in 64-bit mode; clearly this can't mean I can run 64-bit programs. Can anyone clarify?


I want to write:    and give error:   When I put   \textit${x_{min}}$   It also error

What is the easiest way to superscript text outside of math mode?  For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th.  And what if I still want the n to be in math mode, but the th outside?


Lets say p = str and  h = SHA512(p) i send the h which is the SHA512 of p to a friend using via email my friend in order to be sure that I'm the right person ask me to prove that I know the p. How can I can prove that I know p without disclosing it ?? As I have read so far its possible via zero-knowledge proof. Any pseudocode or python example are welcome.

We consider a public hash function $H$, assumed collision-resistant and preimage-resistant (for both first and second preimage), similar in construction to SHA-1 or SHA-256. Alice discloses a value $h$, claiming that she (or/and parties she can communicate with or/and devices they have access to) knows a message $m$ such that $H(m)=h$. Can some protocol convince Bob of this claim without help of a third party/device that Bob trusts, nor allowing Bob to find $m$? At Crypto 98 rump session, Hal Finney made a 7-minutes presentation  which seems to be intended for that. This remarkable result is occasionally stated as fact, including  and . But I do not get how it is supposed to work. Update: This talk mentions using the protocol in the Crypto'98 paper of Ronald Cramer and Ivan B. Damgård:  ( is very similar, or there is ).


I don't have any OS on my computer right now, but I have 2 500gb hard drives and would like to duel boot windows 7. I would like to have about 250gb for windows and the other 750gb go to ubuntu. How do I go about doing this?

I just installed Ubuntu, a full install removing the prior OS. I was forced to remove  from my  because of the max four partitions already being there. I didn't lose anything, all backed up. However, now I am looking to create another partition and install Windows 7 on it.   Do I also need some sort of boot loader that lets me choose which to boot?


Yesterday I downvoted a question for being unclear. Today I received a notification "Question Undownvoted".  Does the system undownvote questions/answers automatically? Did someone vote it up and was my downvote removed?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I'm playing on xbox and I sold a few of my masks to Niranye. Usually when I sell important items to her, she keeps them even after restocking. Except she didn't keep those. Is there any way I can get them back? Please help if you can!

I've lost Morekei, 100% magicka regen, and I have no idea how. I've been looping through all of the shopkeepers I might have somehow sold it to but no one seems to have it.  I've got this game on PC. Is there any way I can gain information about where in the game world it is is? Conosle commands or looking through the game files?  I can create another one (anyone know it's ID?), but I'd prefer not to do that.


For any set A, finite or infinite, let B be the set of all functions mapping A into the set {0,1}. Show that the cardinality of B is the same as the cardinality of P(A) (power set of A). I know you need to prove a bijection between the two, and so you need to show that they are injective and surjective. But I've been stuck on this question for a while since I don't know how to establish the mapping between the two.

I'm studying on my own over the summer and I'm having a bit of trouble with this question. Also, I don't have any background in this, I haven't taken any classes in this yet so, if you choose to help, please go slow. Thanks. Anyway, here is the problem:   For any set A, finite or infinite, let B be the set of all functions mapping A into the set {0,1}. Show that the cardinality of B is the same as the cardinality of P(A) (power set of A).   Here's what progress I've made. Let f be a mapping from B to P(A). Now I have to show it's injective. Let g,h be elements of B and let x be an element of A:   f(g(x)) = f(h(x))  g, h are elements of B and B maps x to {0,1}. If g(x) = h(x) = 1 or g(x) = h(x) = 0 then we are done. But what about the possibility of g(x) = 1 and h(x) = 0 or vice-versa. How do I deal with that possibility?


$10$ people are seating on chairs around a circular table. These chairs are marked   in a clockwise manner. There is a ball on the man’s hand who is seated on $0$   marked chair, and the ball will be passed from one man to another in clockwise manner.   In first step, the ball goes to $1$ marked chair with $1^1$ turn. In second step, from there, the   ball goes to 5 marked chair with $2^2$ turns. In third step, the ball goes to $2$ marked chair by $3^3$   turns from $5$ marked chair. By this means, in which chair the ball will be in $2020$th   step?   Source:   I'm not sure about exactly how many turns are required in the 2020th step. The question is a great deal ambiguous. Does the $n$th step require $n^n$  turns? Or does the pattern of $1^1, 2^2, 3^3$ repeat itself?  But often in cases like this where there are multiple possibilities for the answer, the one that seems more intuitive and makes more common sense is more likely to be the answer. After solving the problem in both the possible ways, comparing the two different answers should make the answer obvious.   I've already tried to solve the problem  in a self-answer. However, I can't solve it the $n^n$ way; it's too advanced for me. I'm only an 8th grader, you see.

Find $x$ such that $$\sum_{k=1}^{2014} k^k \equiv x \pmod {10}$$    I knew the answer was $3$.


Our school teacher just asked us to write the best possible proof of $1+1=2$. First thought he was joking but he was very serious about this question.  I could not even try an attempt.

Me and my friend were arguing over this "fact" that we all know and hold dear. However, I do know that $1+1=2$ is an axiom. That is why I beg to differ. Neither of us have the required mathematical knowledge to convince each other. And that is why, we decided to turn to Math Stackexchange for help. What would be stack's opinion?


I operate almost entirely in one time zone. Supposing a Data Center in another time zone, it would make sense to configure the machines in that data center to use my time zone, and not local.  Are there any drawbacks to this approach?  EDIT: My assumption is that all the devices use UTC and then the time zone configuration comes into play at some points when applications are presenting time information to humans, i.e. logging.

I'm curious as to what other administrators' experiences with timezones, in the context of remotely administered servers, are. In my career I've come across several conventions;   Always, always, always use UTC.   Always, always, always use the timezone of wherever base HQ is. Use the local time of the people who happen to be administering.  Use the local time of the server location.    In some places, I've come across multiple and conflicting conventions. My own preference has been to use UTC, always - with no daylight savings. But for one reason or another, it seems that most people prefer to use some concept of local time, with daylight savings. Although it seems like a straightforward technical matter, discussions around changing conventions always seem to trend towards religious schisms.  What are you using? What do you consider to be the advantages and disadvantages of each approach?


I've rebuilt an old laptop for a friend that had WinXP Pro installed. I downloaded an ISO from my MSDN subscriber account because I figured that's a safe and legal way to get the ISO, and I'd just use the license key from the label on the bottom of the (Dell, FWIW) laptop.  However, using that license key I just get errors about it being invalid.  The download wasn't marked as a volume license edition or anything, but could it be they've done something to the MSDN ISO such that it can't be used with even a legal retail key?  Do I need to find somewhere to download a "safe" retail ISO and start over?

I have Windows XP Professional OEM key on the sticker on the computer, but I don't have a OEM media to perform reinstall.  I could obtain (it doesn't matter how) an installation ISO images from  site, but as I understand these are only images for Retail and Volume Licencing versions.  So, can I use Retail (or VL) media to perform install and activate with OEM licence key?


Here's the problem: (This problem is from Hungerford's Algebra Chapter 5 exercise 6.7 )  Let R be a principal ideal domain and $p$ a prime in $R$ and $n$ a positive integer. Then $R/(p^{n})$ is an unitary $R/(p^{n})$-module with $(r+(p^{n}))(s+(p^{n}))=rs+(p^{n})$. I attempt to demonstrate that the $R/(p^{n})$-module $R/(p^{n})$ is injective as following steps:  (1) I notice that the ring $R/(p^{n})$ is a principal ideal ring since it is a quotient ring of $R$ which is a PID. And by this fact, I prove that each proper ideal of $R/(p^{n})$ is generated by $p^{i}+(p^{n})$ with $0<i<n$.  (2) Now, in order to prove that module $R/(p^{n})$ is injective, it is sufficient to prove that for each ideal $I=(p^{i}+(p^{n}))$ of the ring $R/(p^{n})$ the module homomorphism $f: I\rightarrow R/(p^{n})$ can be extended to a homomorphism $R/(p^{n})\rightarrow R/(p^{n})$.  The module $R/(p^{n})$ is injective? how to extend this module homomorphism $f: I\rightarrow R/(p^{n})$? Anyway, any and all help is appreciated. Thanks.

Let $R$ be an artinian chain (uniserial) ring. I want to prove that $R$ is self-injective, that is, any $\alpha:I\rightarrow R$ right $R$-module homomorphism can be extended to a homomorphism $\tilde{\alpha}:R\rightarrow R$ where $I$ is a right ideal of $R$.  Let $J$ be the jacobson radical of $R$. We knov that all right ideals of $R$ form a chain $$R\supset J\supset J^2\supset ...\supset J^{m-1}\supset J^m=0$$ and $J^k=p^kR$ for some $p\in J\setminus J^2$ and any $k=1,2,...$ since $R$ is an artinian chain ring. So I need to show that any $\alpha:p^k\rightarrow R$ right $R$-module homomorphism can be extended to a homomorphism $\tilde{\alpha}:R\rightarrow R$.  How can i find the extension. I need some help.  Thanks a lot...


I only have 700 MB CD.  Tried to save to USB but still asks to burn image CD and I don't have CD big enough.  Can I bypass burn image CD? how? if not how big does CD have to be? disc burner only has DVD drive option so I cant select USB as option even when USB in computer.  Computer has all necessary hardware called for by ubuntu.

I want to use a 32g usb drive to install ubuntu 16.04 on my home lenovo. I am at my library because my lenovo cannot access internet.


After much trial and error and frustration, I have discovered that svchost can consume several imperial tons of RAM if given the chance when you plug in a new piece of hardware.  I find this mind boggling and frustrating and would like some advice to know if this is normal (I don't think it is, since I've never seen it before), and maybe how to limit such behavior.  This is my second Windows 7 system.  i didn't ever notice this on the other Windows 7 system.  I've had this for about 2 years and this has been going on for a while.  Maybe a year (ish?).  I have been able to articulate the problem for a few months or so.  Today it happened twice while I was working and svchost used up so many resources it crashed my network connection somehow.  Or maybe just some other programs, I'm not sure.  I've noticed this behavior on more sophisticated devices such as cell phones and Bluetooth adapters, but not on simple USB mass storage adapters.  I've also seen this phenomenon in other instances I have not been able to track down the causes.  I have turned Superfetch off already, which may have been one of the other causes.  Windows 7 64 bit, 4GB RAM, Core i7, Dell e6530  I've tried DuckDuckGo'ing (aka Googling) and I found something almost close here on Superuser, so that gave me the idea to ask for advice here.  What can I do to further troubleshoot this issue? What can I do to curtail this memory consumption?

I have noticed on several Windows 7 machines that Windows updates and Windows driver search can cause svchost.exe to consume excessive amount of RAM.  In the case of Windows updates, it seems that all the updates get downloaded to RAM, cached, and then you experience the joy of installing them while the machine is operational, and again at reboot.  I have these machines set to never download, update, or notify the user of updates, because svchost.exe, TrustedInstaller.exe, and wau...exe all go haywire under any other setting.  svchost.exe will still consume the massive amounts of RAM under any of other the options for Windows updates.  Therefore, I now manually check and install updates once a week.  in the case of Windows driver search, when you plug in a new device, Windows will consume an excessive amount of RAM while it's probing, analyzing, and downloading a driver for the device.  The most prominent example is when I attempted to connect a 3TB drive to a machine.  My laptop was not able to connect to the device.  It was a Core i7 with 4GB of RAM.  I plugged the drive into a desktop with 16GB of RAM.  I don't recall if this machine had crazy RAM usage trying to cess out the drive.  However, the laptop got an upgrade to 12GB of RAM, so I connected the drive to it.  RAM usage for svchost spiked to 3GB.  I've seen similar, but not as extreme, behavior almost any time I plug in a new device.  These machines are all Core i7s of some variety with 12GB of RAM and up.  Not light specs, though maybe that's only average for 2015?  I have researched this phenomenon before, and while I have found many people asking similar questions, I have not found solutions to the problem.  Is there a way to mitigate this behavior?  Relevant links:


I want record screen on my andriod phone. Without root permission. How can i do that. ( Galaxy s3 mini. Jelly bean. )

Suppose that I would like to record some video sessions of Angry Birds on my phone.   Are there any apps that I can use? I have root permissions.


I am using Kile 2.1 on Ubuntu 16.04. I have been trying to make corrections for my dissertation concerning the table of contents. After trying a number of options including a couple etoolbox patches I restored my custom .sty file back to the original form. Now I no longer have numbering before section headings. This is independent of the class (e.g. report or article). I have no idea what permanent change I have made. I have no idea how to correct this issue.

After reinstalling TeXLive distribution (install-tl-20160318, Ubuntu 14.04), a issue occurs with the updated version of the titlesec package: the section numbering is lost.  What could it be missing? Is there a modification I have not seen?  Below is a MWE comparison of the two versions. The prevtitlesec package is a reinstall of the previous version (2011/12/15).  \documentclass{book} \usepackage[margin=2cm,a4paper]{geometry} %\usepackage{prevtitlesec}% 2011/12/15 version \usepackage{titlesec}% 2016/03/15 version \usepackage{lipsum}  \begin{document}  \chapter{Title of the first chapter} \lipsum[1] \section{A test section} \lipsum[4] \subsection{A test subsection} \lipsum[4] \subsection{A test subsection} \lipsum[4]  \end{document}   titlesec package 2011/12/15:    titlesec package 2016/03/15:


I run a gaming community on a colo with a 100Mbps port. I want to buy a very cheap 35 dollar server with the same 100Mbps port, and run pfSense to use as a hardware firewall. I'm dealing with a bunch of 14 year old kids that have access to botnets, so it can become a bit necessary to get something like this. My overall question, is using pfSense on a cheap identical datacenter/port speed server worth it to actually block DDoS attacks?  A bit more into detail since I assume you will ask this, the attacks we receive are normally around 1Gbps. We currently run CentOS using CSF Firewall, and even when using a software firewall, we block 500Mbps UDP floods, or just generic attacks pretty easily.  Thanks, - Necro

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


I want to show that  $$\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^n n^{1/k} = 2$$  I found the limit with Euler-Maclaurin but this was messy involving integral $\int_1^nn^{1/x}$dx.  What is an easier way using squeeze or other technique?

What would you suggest here?  $$\lim_{n\to\infty} \frac{1}{n} \sum_{k=1}^{n} n^{1/k} $$


From the command line, how do I set the Java CLASSPATH option to point to one or more directories containing multiple jar file? Are there wildcards for recursive directory and sub-directory support?  (My JAR files are sorted in several sub-directories.)

Is there a way to include all the jar files within a directory in the classpath?  I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars.  Do I need to add each jar file to the classpath separately?


EDITED:I saw the link above but it does't answer my question.I have a clear understanding of "P ONLY IF Q", I know that it equals "IF P THEN Q" .. but I see that there is a difference in the case where Q is True and P is False... in "IF P THEN Q" I know that it's true .. but in the "P only if Q" it seems like t violates the "if Q" part because it means when having Q is True then P is true - by understanding the "if" part in the "if Q"-.  I am  facing a problem in understanding one of the cases in the "P only if Q" truth table-which I didn't find anyone asking about it- that is: when Q is True and P is False ..I am trying to justify how this can be a true condition, I understand that the "only" part means P must be False When Q is False but the "if" part means -as we know from implication-  when the "if" part-Q- is True, the other proposition -P- should be true- but this is not the case-  the following is an example for more illustration: P is:"we'll go swimming" Q is:"weather is sunny"  then P ONLY IF Q: "we'll go swimming only if the weather is sunny" in the case when Q is True but P is False: "the weather is sunny but we'll not go swimming" here the violation of "IF" part is clearer

Provided we have this truth table where "$p\implies q$" means "if $p$ then $q$":  $$\begin{array}{|c|c|c|} \hline p&q&p\implies q\\ \hline T&T&T\\ T&F&F\\ F&T&T\\ F&F&T\\\hline \end{array}$$  My understanding is that "$p\implies q$" means "when there is $p$, there is q". The second row in the truth table where $p$ is true and $q$ is false would then contradict "$p\implies q$" because there is no $q$ when $p$ is present.  Why then, does the third row of the truth table not contradict "$p\implies q$"? If $q$ is true when $p$ is false, then $p$ is not a condition of $q$.  I have not taken any logic class so please explain it in layman's terms.       Administrative note. You may experience being directed here even though your question was actually about line 4 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 3, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines.


I came across an issue in python appending to a list. The code I implemented was:  a=[1,2] b=[3,4] a.append(b) b.append(5) print a print b   My understanding of python append was that the expected output of this code would be:  Expected Output  a=[1,2,[3,4]] b=[3,4,5]   But the actual output is something different. Actual Output  a=[1,2,[3,4,5]] b=[3,4,5]   I just want to know why this happened.  Since I appended the list b to a, before appending 5 to b, list a should have [1,2,[3,4]]

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


I have a dictionary which is formed by using counter:  c = collections.Counter() for y in all_years:  # iterator     c[y] += 1 d = dict(c.most_common()) print(d)   /All years contain list of 250 year values/  The result: {1995: 9, 1957: 7, 2003: 7, 2000: 7, 2001: 6, 1975: 6, 2014: 6, 2009: 6, 1994: 5, 1999: 5, 2010: 5, 2002: 5, 1997: 5}  Is it possible to sort this dictionary for the equal values by year: e.g. {1995:9,1957:7,2000:7, 2003:7, 1975:6, 2001:6, 2014:6 etc}

I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.  I can sort on the keys, but how can I sort based on the values?  Note: I have read Stack Overflow question here  and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.


I've now , and it was rejected. It really not a big deal, but something seems strange.  2 reviewers approved it, one rejected it (community?), and when I looked at the post, it was edited with my suggestion! (it's even the same comment word by word..) what has happened here?

I found this , but I am not sure if this is the same issue.  On , I did some reformatting of the indentation in the code block to make it a bit more readable and it was  for peer review. A few minutes later, it appears the OP made an edit that added some additional code. It looks like my suggested edit was applied when the OP saved his/her edit, and it looks like he got the "credit" for the edit.  I'm not really concerned about the 2 rep points; I'm more curious why this happened and if this is a bug (or limitation) in the editing feature, or if this is known/intended behavior?  Note that this is not a suggested edit that's overridden by a concurrent edit: the recorded edit starts from the post-suggested edit state (and in fact can be identical to it, as in  ).


Is my proof sufficient to prove that there is no surjection from set $A$ to its powerset $\mathcal{P}(A)$ if A is infinite?  Pf. by Contradiction: Suppose there is surjection from $A$ to $\mathcal{P}(A)$.  Let $n$ be the number of elements in set $A$.  This implies that $n≥2^n$ because every element in $\mathcal{P}(A)$ must have a pointer to it from an element in $A$. This is a contradiction because there is no $n\in\mathbb{N}$ such that the inequality $n≥2^n$ is satisfied. Q.E.D.

Show that: Let A be a set and let $P(A)$ be the set of all subsets of $A$. Then there is no surjection $f: A→P(A)$.  Here is what I thought:  if $A=\{a,b\}$ then it has only two elements where $P(A)=\{∅,\{a\},\{b\},\{a,b\}\}$ has 4 elements. Therefore $f:A→P(A)$ cannot be surjective. But I have some problems:  1) How is it possible that any $f$ function to take $\{a\}$ from set $A$ to $\{a,b\}$? Maybe because I am thinking mainly about functions with real values like $f(x)=2x$, I find it a little bit strange that a function to take an element of a set to another set which has more elements. Is it possible?  edit: Now I thought that if $f(x)$ is $\sqrt{x}$, then $f(4)=±2$ which means it took an element from a set to a set which has 2 elements. But still I find it kind of strange to denote $f(\{a\})=\{a,b,c,...\}$  2) How can I construct a explicit proof for this question?  Regards


I read this short story in a collection somewhere in the late 80s or early 90s, but I think it may have been written earlier. In the story, a fairly young guy ends up in a strange community on a different planet. The community is very peaceful and seem on the face of things healthy and pretty ideal, although there seem to be many people dying in accidents. He meets a young woman whom he likes and decides to stop trying to find a way home and instead to work to make everyone's lives better and to stay with them. He does a lot of good, and gets into a relationship with the girl and I think they get married. Eventually, with all the good work he's been doing, people start talking about honouring him with some kind of ceremony. It turns out (although the guy never learns about this) that in this society dieing a violent death is considered the greatest reward possible, and the community has to vote to allow someone to do so. Then the person being is killed in some violent/painful way and if they are highly respected or achieve something amazing, they are ceremonially tortured to death.  A lot of people who aren't good enough for this honour commit suicide by faking an accidental death, because overt suicide is taboo. The woman's father has been working on his own accident for a while, which involves "accidentally" falling in a river and drowning. Just before the ceremony to honour the guy, he sees the other man in the river drowning and apparently yelling for help, and jumps in and saves him. Everyone is angry at him for stealing the old man's death and he doesn't understand what's going on. He gets exiled, and the woman goes with him. The story ends with her thinking how someday he'll redeem himself for stealing her father's death and then she will be able to give him this greatest gift - a violent death.

In Soviet times there was one of selected best American sci-fi short stories printed here and there, and I believe it was one of those.  I always keep forgetting an author and title, cause the phrase "Painful death is best gift" is just imprinted in me.  So, an astronaut from Earth is settling on some remote planet with seemingly totally human-like aborigines (with a very early, a tribal peasants stage of their civilization). He has no problems in communications, he even falls in love and is happily married to some woman from a good family.  Having much more knowledge - medicine, construction, etc - he helps people a lot. And people seems very kind, open, maybe even naïve. Kind of pastoral happiness. They love and even to a degree worship him. He loves his wife and them too.  But weird things creep in. Like one wood cutter is died after a very thorny tree fallen over him, he was crying in pain for an hour before passing away. And our guy finds that the tree was covertly half-cut in wrong direction, and the cuts were somewhat masked, so allegedly the woodcutter would casually start axing it without noticing and gets killed. He suspects a murder but can't believe some one of those so open and kind people could be so double faced and can't think how he can investigate it.  Another villager falls into a mountain stream when the bridge falls. Our guy jumps into the water and manages to both pull him out and survive. The villagers are not happy though, they see this action as something very indecent. Like we would watch some savage killing neighbor and cooking him just to meet us from work with a feast. He wished well, but he did it in despicably harmful and wrong way. Like this.  Suddenly one of the villagers notes that the bridge ropes were semi-cut again, so and strong wind blow or jump could make them give way and make the bridge fall. The mood changes, now everyone again worships our guy and despises the saved local, like he was a fraudster. Our guy still thinks about finding a mysterious killer but no one else seems to take it seriously.  The suspense grows thicker an in the end we have his wife prepping herself for a night. She thinks how her husband is doing so many decent things, that he is so brave and kind, that he is almost saint. But of course he is so good, that he keeps himself reserved and he underestimates his good deeds, and he must not hurry and defraud the fate by setting his own death, like those deplorables did (he even risked his life to prevent that pathetic unworthy man to perish mischefly, that is why he was cheered). And that is how real saints should go. And she a good loving wife would help him: when his amount of good deals would mountain big enough and if the fate would still be too slow then she would reach for the family treasure - and she looks in a secret suitcase section upon a dagger covered with some ominous poison - cause the only best gift to the noble people you love can be, one that commits eternal happiness, is a torturous death.  Now, after this spoiler, I never can remember neither the author nor the title.


Suppose a body is at rest of mass m. If the same body is accelerated at velocity v, the mass increases to some definite amount. Since the mass of the body has increased, will the gravitational field of the body change in proportion to the increase in mass?

I'm a big fan of the podcast Astronomy Cast and a while back I was listening to a Q&A episode they did. A listener sent in a question that I found fascinating and have been wondering about ever since.   From the show :      Arunus Gidgowdusk from Lithuania asks: "If you took a one kilogram mass and accelerated it close to the speed of light would it form into a black hole? Would it stay a black hole if you then decreased the speed?"   Dr. Gay, an astrophysicist and one of the hosts, explained that she'd asked a number of her colleagues and that none of them could provide a satisfactory answer. I asked her more recently on Facebook if anyone had come forward with one and she said they had not.  So I thought maybe this would be a good place to ask.


I try to ride a bike. I try riding a bike. I try ride a bike.   What is the difference between above three sentences? Please, tell me about it.

What is preferable to use: verb + gerundive or verb + infinitive?  For example:  I tried checking it   or   I tried to check it  if both are possible then what's the difference? Are there any specific use cases for both gerundive and infinitive in such a construction?  Thank you.


If I enter diskutil list there is a strange container:    0:      APFS Container Scheme -                      +500.1 GB   disk1                                  Physical Store disk0s2    1:                APFS Volume Macintosh HD - Daten    312.2 GB   disk1s1    2:                APFS Volume Preboot                 91.4 MB    disk1s2    3:                APFS Volume Recovery                528.8 MB   disk1s3    4:                APFS Volume VM                      1.1 GB     disk1s4    5:                APFS Volume Macintosh HD            11.2 GB    disk1s5    6:                APFS Volume                         14.0 GB    disk1s7  This disk1s7 is also listed (greyed out) in the Disk utility.app. I cannot activate it. If I try to mount it with diskutil mount disk1s7 I get the error: Volume on disk1s7 failed to mount Perhaps the operation is not supported (kDAReturnUnsupported) This appears to be an APFS Volume; note that locked APFS volumes will not mount unless unlocked (e.g. "diskutil apfs unlockVolume")  If I type in diskutil apfs unlockVolume disk1s7 I need to enter a passphrase. I don't know anyone that could work, if I type in just sth. I get: Unlocking any cryptographic user on APFS Volume disk1s7 Error unlocking APFS Volume: The given APFS Volume is not encrypted (-69593)  Any ideas? Can I just delete it?

I recently tried out the beta of Big Sur on a separate APFS container. I don't need it anymore so I deleted the container. There is now one more container left called "Update". Does anyone know if this container belongs to Big Sur? Can I just delete it as well? EDIT This is the output of diskutil list: /dev/disk0 (internal, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *500.3 GB   disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:                 Apple_APFS Container disk1         500.1 GB   disk0s2  /dev/disk1 (synthesized):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      APFS Container Scheme -                      +500.1 GB   disk1                                  Physical Store disk0s2    1:                APFS Volume Macintosh HD - Daten    312.2 GB   disk1s1    2:                APFS Volume Preboot                 91.4 MB    disk1s2    3:                APFS Volume Recovery                528.8 MB   disk1s3    4:                APFS Volume VM                      1.1 GB     disk1s4    5:                APFS Volume Macintosh HD            11.2 GB    disk1s5    6:                APFS Volume                         14.0 GB    disk1s7    7:                APFS Volume Update                  819.9 MB   disk1s8


Just came to know that java does has a method named printf, then what is the difference between printf & println?

I haven't had the chance to take any serious low-level programming courses in school. (I know I really should get going on learning the "behind-the-scenes" to be a better programmer.) I appreciate the conveniences of Java, including the ability to stick anything into a System.out.print statement. However, is there any reason why you would want to use System.out.printf instead?   Also, should I avoid print calls like this in "real applications"?  It's probably better to  to print messages to the client's display using some kind of UI function, right?


What is the correct English; "one and one is two" or "one and one are two"?  Likewise for "two and three is five" or "two and three are five"?

I remember somebody correcting me once when I said, "Two and two makes four", since the conjunction and would imply the use of a plural verb. They would prefer I said:     Two and two make four.   I've been thinking about it and wondering if one or the other is correct, or if both are. It would seem that using the plural verb is grammatical. However, I've heard the singular verb being used more often and feel that it is correct. Is there some exception about using the singular verb in logical statements and mathematical formulae?


This is not a duplicate of . That specifically refers to high-profile requests that receive a lot of votes, and the answer there addresses that specifically. This, on the other hand, is for more minor things that don't receive lots of votes and views, that the SE team deems of low priority. Additionally, the "response" there refers to a decision and a status tag; this, on the other hand, refers to something to the effect of "we're looking into/discussing this and will make a decision regarding status".  Sometimes, when people post a bug report or feature request here on meta, the SE team decides it's of lower priority, and decides not to respond to it for the time being. More than likely, they place it onto their internal issue tracker and possibly give it a "low" priority.  But from the outset, it appears that such requests are being completely ignored. I'm willing to make the good-faith assumption that each of these requests is in fact being looked at by an employee, who decided not to take action at that time.  Ideally, it would be great if SE opened up their internal issue tracker to the public, to see what priorities the team has assigned to every request, but I can see some issues with that (e.g. "why is my important issue low priority?").  I think it would be great for SE's relations with the community if they at least, for example, commented on each request that gets logged in their internal issue tracker with a comment to the effect of "we're aware of this issue and are looking into it". This way, it's clear to everyone that SE is listening to people on meta. This was an important point in , which said that despite all the internal chat that surrounds an event, it makes it seem like no action is being taken:     I know through internal channels that you’re thinking about how to respond more to all this. But internal channels do nothing for the public record.   Yes, I'm aware that sometimes employees are busy handling things, but a simple comment to this effect takes very little time.

I think we should have some mechanism that automatically flags certain meta posts (both child metas and here) for Stack Exchange staff attention when they get beyond a certain point. The thresholds would be something like (subject to tweaking):   Post is  or  Post has a score of 50 or more (possibly adjusts based on site).       OR   Post receives a bounty from 3 or more users (this will take weeks, I know, that's the point)   The idea is to prevent very highly voted posts from falling through the cracks. Here are some examples where this has happened (or, at the very least, a very long time passed between a staff response and an answer). These are just the some of the ones that eventually DID happen:             The bar for this should be very high. Possibly higher than the one I propose above. But it should exist, to handle the outlier cases that fall through the cracks, plus it will encourage more meta participation and voting (since it will add to the perception that voting really does matter), which can only be a good thing.         Could you expand on how you think this feature would help solve problems on the sites? It's not hard for us to slap  when we don't like a feature request or don't have time to work on it or when it's blocked by some other feature or when the request is unclear, etc. But I don't know if that will fix the underlying problem. (As an aside, it's strange to call out meta posts that have been addressed. Is the problem that they weren't fixed fast enough? If so, I don't see how your proposal addresses that.)   In at least two of those links, someone tweeted at @balpha before they got noticed. In a third, I custom flagged one for dev attention and @AnnaLear fixed it within three days later. Some of these are huge fixes, some of them are small; the bottom line is that I don't know what you have noticed and what you haven't, which is why I didn't link to questions that haven't been addressed. Searching for unaddressed things might turn up lots of stuff you've thought about but never got a , or it might turn up stuff that fell through the cracks.  However, these questions took six months or more before any dev response, at all, but they were things that Stack Exchange clearly did support, because they happened. A system that nearly guarantees a dev response for the most popular posts will serve to:   Prevent very easy things from falling through the cracks, like #1, #2, #5, and #7 above Facilitate communication "We love this idea, but it's very hard!" Like #6 above Increase morale and user participation on meta "hey my votes and bounties actually accomplish something!"   This is about fixing easy bugs faster / without missing any, and about increasing communication on the more difficult things.    Related, but not dupe (because this is a specific proposed solution, not a question):


This code works well in Mac/Linux, but not in Windows.   import mmap import os  map = mmap.mmap(-1, 13) map.write("Hello world!")  pid = os.fork()  if pid == 0: # In a child process     print 'child'     map.seek(0)     print map.readline()      map.close() else:     print 'parent'    What's the equivalent function of os.fork() on Windows?

How do I implement some logic that will allow me to reproduce on Windows the functionality that I have on Linux with the fork() system call, using Python?  I'm specifically trying to execute a method on the SAPI Com component, while continuing the other logic in the main thread without blocking or waiting.


By $\emptyset^{\large\emptyset}$ i mean the set of functions from $\emptyset$ to $\emptyset$.  Is it the empty set or the set containing the empty set?  I just dont know how to prove it.

I am considering the function $f$ defined as  $$f:\emptyset\to\emptyset$$  My thought is that a function maps elements from a set to another one, but the empty set has no elements to map, so I think there cannot exist a function $f$ that has this property, but I don't know how to prove it and I'd like some light on this.  There is a function $I$ though which can map the empty set to the empty set if its domain and codomain are the set containing the empty set. But it is not the same question.


Check source code of ApiValidator.js at . I was taught to define a JS class using var apple = new function() {... But this one starts with (function(){....? Why is this?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I have a big file. It includes approximately 3.000-20.000 lines. How can I get the total count of lines in the file using Java?

I use huge data files, sometimes I only need to know the number of lines in these files, usually I open them up and read them line by line until I reach the end of the file  I was wondering if there is a smarter way to do that


I have mentioned my MWE below. I will try to get the alternative text output for each figures. So, i am using the pdfcomment package and my TeX code is used to pdftooltip{\includegraphics{example-image-duck}}{Alternative Text}. MWE: \documentclass{article} \usepackage{graphicx} \usepackage{pdfcomment} \begin{document} \section{PDF comment alt text not working on PDF accessbility alternative text} \begin{figure}[!h] \centering\pdftooltip{\includegraphics{example-image-duck}}{Alternative Text} \caption{Sample Figure Cation.} \end{figure} \end{document}  The alternative text is working good through mouse over action. But, the PDF accessibility is not supported because the alternative text to be reflected in the form field text. My requirement is the text to be filled alternative text field. I check this action through Adobe Professional 11 for the following method Accessibility - Add Tags to Document -> Touch Up Reading Order  I have attached the image screenshots for your clear understanding. Alternative text field is empty:  Form text field contains the text:  Could, you please advise how to get the text in alternative text field through latex code.

How to create tagged PDF such that they will be:   good enough for PDF/UA "reflowable" on smaller screens and ebook readers   Any syntax & any engine are of interest, but I'm most interested in using LaTeX with [Xe|pdf]latex engines.


Is it correct to say       Tsunami coupling in the code 'helps determine' human casualty     i.e., is use of multiple verbs consecutively correct?   Also, is it 'help determine' or 'helps determine'?

What is the correct way to use infinitive after the verb "help": with or without "to"?  For example:     Please, help me to understand this.   or:     Please, help me understand this.


I want to trigger mousemove insinde a dynamic created element called '.box'. How can I add this condition to the following code?  jQuery                  $(document).mousemove(function (event) {                   .....             });

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.


Hello I am a high school student and I am stucked at a concept in chemistry  . I have studied  black body radiation and Planck's quantum theory which is written in very short description but I have to understand it clearly so that I can understand further concepts in detail.  I know Planck's theory of quantisation which was given to account for blackbody radiation that energy from radiation is produced in discrete quantities in the form of packets .But I can't figure out how it was able to solve the ultraviolet catastrophe problem.This is not given in detail in my textbook and I am stuck at that.I have read other books but it is too much difficult for me to understand at this level . So please help me by giving an easy explanation.

I understand how classical physics leads to the . But I cannot understand how quantization solves it.    How can quantization prevent the body from radiating a lot of energy?   I know this question is similar to many other questions but I need a layman's explanation (without too much mathematical details).    Finally why does the peak reach zero intensity after a certain frequency?     Image source:- Wikipedia


I feel like an idiot, but I had 2 PSN accounts on my PS3 which had all my online games. The other had all my money but recently I got a free DLC on my game account and my account with my money was deleted by accident. Is it possible to get that account back with all the DLCs and money?

Due to the recent PSN outage and I am getting rid of my PS3.  I bought my PS3 back in 2007 and I have purchased a bunch of games and add-ons over the years.  Is there any way to recover this content and sell it/transfer it to another PSN user account?  Also, is there a way to restore the PS3 back to it original factory settings?


Suppose I am going to Delhi from Bahrain and by diffrent airlines , and at Dubai airport I collect my luggage and again went to immigration for boarding my next flight . Do i required transit visa in this scenerio

Do I need a transit visa for a layover via airports in the UAE, such as Dubai International Airport or Abu Dhabi International Airport? If so, what are the requirements for such a visa? Can I get the transit visa on arrival?


I'm trying to create a three-dimensional cube with OpenGL. Dimensional cube is obtained. Trying to add another side of the cube. And here I see this error:  LogCat tell's me that       triangle1Buffer = NULL       FATAL EXCEPTION: GLThread 270     java.lang.NullPointerException             at com.google.android.gles_jni.GLImpl.glVertexPointer(GLImpl.java:1122)             at com.podlinov.elseapp.app.Renderer.onDrawFrame(Renderer.java:94)   Code:  public class Renderer implements GLSurfaceView.Renderer {      @Override     public void onSurfaceCreated(GL10 gl10, EGLConfig eglConfig) {      }      @Override     public void onSurfaceChanged(GL10 gl, int width, int height) {          gl.glViewport(0, 0, width, height);         float ratio = (float) width / height;         gl.glMatrixMode(GL10.GL_PROJECTION);         gl.glLoadIdentity();         gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10);     }      float [] triangle = {             0, 0, 0,   // A             1, 0, 0,   // B             0, 1, 0 ,  // C              1, 0, 0,   // B             1, 1, 0 ,  // D             0, 1, 0 ,  // C     };      float [] triangle2 = {             0, 0, 0,   // A             1, 0, 0,   // B             0, 1, 0,  // C     };       FloatBuffer triangleBuffer;     FloatBuffer triangle1Buffer;      public Renderer() {          ByteBuffer bb = ByteBuffer.allocateDirect(6*3*4);         bb.order(ByteOrder.nativeOrder());         triangleBuffer = bb.asFloatBuffer();         triangleBuffer.put(triangle);         triangleBuffer.position(0);          ByteBuffer bb2 = ByteBuffer.allocateDirect(3*3*4);         bb2.order(ByteOrder.nativeOrder());         triangleBuffer = bb2.asFloatBuffer();         triangleBuffer.put(triangle2);         triangleBuffer.position(0);      }      @Override     public void onDrawFrame(GL10 gl) {          gl.glClear(GL10.GL_COLOR_BUFFER_BIT);          gl.glMatrixMode(GL10.GL_MODELVIEW);         gl.glLoadIdentity();         gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);          gl.glColor4f(1,0,1,1);         gl.glTranslatef(-1.5f, 0.5f, -3f);         gl.glVertexPointer(3, GL10.GL_FLOAT, 0, triangleBuffer);         gl.glDrawArrays(GL10.GL_TRIANGLES, 0,6);           gl.glColor4f(0,0,1,1);         gl.glTranslatef(1.5f, 0, -3f);         gl.glVertexPointer(3, GL10.GL_FLOAT, 0, triangle1Buffer); // NULL POINTER EXCEPTION triangle1Buffer =NULL         gl.glDrawArrays(GL10.GL_TRIANGLES, 0,3);     }  }

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?


If you roll an unfair 3 sided dice where  Side 1 has probability $p_1$ Side 2 has probability $p_2$ Side 3 has probability $p_3$  How can you find a formula that the 8th 3 will be rolled on the 10th roll? I see that this question was asked before, its a good start, but there was no answer on this.

Say you have an unfair 3-sided die.  Side 1 will be rolled with probability $P_1.$ Side 2 will be rolled with probability $P_2.$ Side 3 will be rolled with probability $P_3.$  Find a formula for the probability that the 8th 3 will be rolled on the 10th roll.  Here is how I started:  $$ \sum_{i=8}^{10}P(T_8 = i) $$  Im just having trouble with that expansion?


I'm looking for some advice on the URL structure on a growing website, we were a niche site, so our homepage was essentially a hub page of all our sub-categories with a URL structure of   example.com/sub-cat/   Where as now we are expanding to cover a few niches.  The question is whether we go for:   Keep all example.com/sub-cat/ URLs as they are and just add new example.com/category/ pages for each of the categories, which would link to all our sub-category pages. This would potentially effect the flow through the directories/breadcrumb trail, as the hub page would be disjointed? Does this matter? Create the hub pages for example.com/category/ and then redirect the sub-category pages across to example.com/category/sub-cat/ which would keep the breadcrumb trail and directory structure more sensible in my mind. It would involve redirects though and a longer URL. Pretty much the same as 2, though with altered names. Say for example if we previously had carthings.com/car-parts/ we could go carthings.com/car/car-parts/ or carthings.com/car/parts/ - this one would have the key phrase car wheels in one level of the URL so potentially better SEO wise, though it looks slightly more spammy, especially when you consider that in the niches we are in we would have to have a term relating to cars in the next level, for example carthings.com/car/car-parts/car-wheel-trims/.   In my mind, the least spammy one would be carthings.com/car/parts/car-wheel-trims/ but that takes out a key phrase "car parts" and adds an additional level to it.  Hope this makes sense, I couldn't think of a better example for the 3rd one.  I have looked at other questions here trying to find an answer though the ones I could find seem to not quite be the situation we are looking for, and we are particularly keen on trying to rank with our newly introduced hub pages.

Let’s take an example of a movie site. So a well structured set of URLs for this site can be:     Movie page - example.com/movies/the-matrix Review for movie - example.com/movies/the-matrix/reviews Trailers for movie - example.com/movies/the-matrix/trailers Specific trailer for movie - example.com/movies/the-matrix/trailers/trailer1   where it’s possible to navigate the resource even by directly deleting/appending resource name seamlessly.  For SEO purpose I read somewhere that for two given pages, Google will prefer the page which have search query up in the URL hierarchy among other things. So for the given 2 URLs and the query "the matrix trailer"    example.com/movies/the-matrix/trailers example.org/trailers/the-matrix/    `     Google might prefer the second URL as it has the keyword "trailer" at first level comparing to first URL which has "trailer" at 3rd level (a resource deeper in URL hierarchy may be less important).    If it is correct, one may be tempted to create URL hierarchy somewhat like      Movie page - example.com/movies/the-matrix Review for movie - example.com/reviews/the-matrix/ Trailers for movie - example.com/trailers/the-matrix/ Specific trailer for movie - example.com/trailers/the-matrix/trailer1     which will break the seamless hierarchy.    My questions are:   Is it true that resource deeper in URL hierarchy is tend to be less important when comparing to URLs of other site?   Is sacrificing meaningful, seamless hierarchy worth for this SEO optimization?


I have a layer in GeoServer and its projection is EPSG:27700. When I query the layer in my app I get and error.  Explanation:  The GeoServer preview displays it correctly. So I copy the JavaScript from the OpenLayers preview page of the layer and use it in my map, and then I compare the browser console for network requests. My map sends an SRS parameter of EPSG:3857 in its requests, whereas the GeoServer preview sends an SRS parameter of EPSG:27700 in it's requests. When I copy the request and past it into the browser I get a WMS file with this seemingly unrelated error message:  Error rendering coverage on the fast path java.lang.IllegalArgumentException: The reference geometry must be either Polygon, MultiPolygon, or a polygonal PreparedGeometry The reference geometry must be either Polygon, MultiPolygon, or a polygonal PreparedGeometry   If I manually modify the SRS value in the URL and paste it into the browser again... I get a valid png file.  I assume the SRS it is sending is identifying what the projection of the map object and I cannot change it? Can anyone help me to understand what is going on please?  === marked as duplicate, although the question linked doesn't help me much === By "copy the request" I meant that Using the browser console I copied the URL my map was firing to GeoServer to request tiles.  The only difference between what my map's URL and the URL from the GeoServer's OpenLayers preview is that the SRS parameter is different.  The GeoServer preview request gets a valid png, the request from my map results in the error mentioned. I guess specifically I want to understand how that results in the error as I cannot understand how referencing a geometry even comes into this scenario.

I am trying to incorporate a wms feed in the British national grid projection (EPSG:27700) into a openlayers 3 project. I initially had used this wms layer in an openlayers 2 application using the following syntax:  new OpenLayers.Layer.WMS(         "ukimage",         "http://www.linktowms",         {             "LAYERS": 'ukimage',             "STYLES": '',             format: state.image_format         }, {     buffer: 0,     displayOutsideMaxExtent: true,     isBaseLayer: true } );   But I am having trouble converting this over to openlayers 3. I first tried setting the map projection to British national grid (view: new ol.View({ projection: 'EPSG:27700'}) as I had in the openlayers 2 app, but this produced the error  TypeError: h.B is not a function    and a white map.   When I try and use proj4 to convert the projection to EPSG:3857 as described here:  I get the same error:   TypeError: h.B is not a function    and again a white map.   my wms request is generally a varient of:  new ol.layer.Image({       source: new ol.source.TileWMS({         url: 'http://www.linktowms',         params: {'LAYERS': 'ukimage'},       })     }),   (I tried adding projection but that didn't help)  I am trying to work out if the image is even getting loaded from the WMS feed, but the syntax seems to have changed significantly from openlayers 2, instead of the properties and functions that have rather descriptive names, there are a now lots of short functions with names like Ua and Ig, which leaves me a bit in the dark as to what's actually going on when I try and inspect the layer with firebug.  I don't mind what projection the application is in, as I can re-project my other layers to match the basemap, so basically any way of using this EPSG 27700 WMS layer in openlayers 3 would be great.


I have a Kuwait employment visa, with my old passport number. But as the old passport has ECR on it I got a new passport with a new passport number with ECNR. Can I travel with the same visa or do I have to obtain a new visa with my new passport number?

I have a Kuwait visa, obtained from a hotel in Kuwait, with my old passport number. But as the validity of the present passport is expiring within 6 months, I got a new passport with a new passport number. Can I travel with the same visa or do I have to obtain a new visa with my new passport number?


I am trying to run sudo apt-get install ubuntu-standard systemd-sysv but I keep getting the error: "temporary failure resolving 'ca.archive.ubuntu.com'". I tried following the steps listed  but nothing has worked. Is there a way fix this or at least to download these packages without access to the gui?  I tried to revert to upstart but that caused boot errors, so now I'm just trying to return to systemd from recovery mode so I can boot up and live my life.  I apologize for any formatting issues, I'm typing this from my phone

Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.


I know that if I follow a question, I am notified if the question receives an answer. I am also notified for every single comment, edit, close, etc. I see some users who are actually good contributors. Most of the time, they provide answers to valuable questions. Also, they generally do not ask questions. Feature Request: For example, as I think user (M.x) is a good contributor on Stack Overflow, I want to be notified of all his answers, give us the ability to follow specific users' answers. I don't know about the possibility to implement that feature or about the complexity. For study purpose, would it be helpful? Personal Opinion: I  think it will be helpful for me. Note: I know there is a way for everyone to see all questions/answers and also without logging in. Also, I know If I go to one user's profile and vote on his questions/answers, that's serial voting and will be reversed and both accounts can be banned. Also, anyone can say that you can bookmark the user's profile and check their answers every day. Why? But notification is different. It will remind the user that you have something new you can read/learn now. If anyone thinks this way, it will be helpful.

I think it would be nice to have a "friends list" on Stack Overflow. This would allow us to be able to follow the questions and answers that are posted by users that we want to watch/monitor.  I suggest it be implemented in the same fashion as DotNetKicks.com; where you can add someone to your "friends list" without them needing to approve you the way that other social networks do it. It should be completely open for us to add anyone to our "friends list" that we like.


In  when I have to format code I choose a block of code and then press Ctrl + Shift + F.  What is the equivalent of this in Vim?  I.e., say we got the below lines of code:  function() { var test = "Hello, World!"; var test2 = "Hello, World! Again"; }   The final output I want to see is well formatted code like below:  function(){   var test = "Hello, World!";   var test2 = "Hello, World! Again"; }

It should be trivial, and it might even be in the help, but I can't figure out how to navigate it. How do I indent multiple lines quickly in vi?


I would like to replace the 2x8 GB 1600 MHz DDR3 of soldered memory in my 15" 2013 MacBook Pro with some faster RAM. Is this MacBook Pro compatible?    This is not a duplicate question (Allan, patrix marked) because it about different device. Question about RAM frequency for specific device, not in general...

Can MacBook Pro's successfully support and fully exploit RAM of a higher MHz rating than that which they ship with?    For example, take my 15" MacBook Pro () that ships with 4GB of 1333MHz DDR3 memory. I'm considering buying 16GB of the same clock speed even though Apple says that it can "support up to 8GB" — .  What about installing 1600MHz in the 16GB variant — will it work? Or will it be clocked down to 1333MHz? When compared to 16GB 1333MHz, will the higher clock speed improve battery life, performance, timings, or what?


Is it ethical to Favorite questions arbitrarily? E.g. to favorite questions not for the question itself, but for great humor or something. This question is different from the one with which it is marked a "duplicate" because I'm asking regarding the ethics of using Favorites.

I am wondering if my behavior regarding favorites is typical.  More importantly, if it isn't typical, does my behavior conflict with an internal metric designed to reward favorite'd questions?  I mark a question as a favorite for a few reasons:  A -- I find the question/answer(s) remarkable enough that coming back to them time and time again is of benefit to me.  B -- I am waiting to see if a sub-par quality question is going to be revised enough for me to come back and answer it.  Either way, I eventually remove my favorite.  C -- I have answered a question (of any quality) and am wanting to be notified of any competing answers.    Situations B and C are the most common for me and they typically mean I will go back and remove my favorite star later; I don't remove it because the quality of the question degraded, I merely don't want to be notified any longer.  Even stranger, I am often favoriting questions that are rather low-quality (reason B) making me wonder if low-quality posts are being rewarded via some invisible metric because I (at least temporarily) have given it what looks like a stamp of approval akin to an up-vote.    I suppose the feature being called "Favorite" makes me confused because most of the questions I select are not my favorite.  Am I accidentally messing with an invisible metric that is drawing attention to posts when that isn't desired behavior?


We know that $\mathbb{Q} [x,y]/(x)$ is  isomorphic to $\mathbb{Q}[y]$.  My question is  that       Is $\mathbb{Q}[y]$ is field  ?  Yes/No   My attempt: I think  yes, because  we know  $ \mathbb{Q}[x] $ is a field and an integral domain  in a similar way  we can also said that $\mathbb{Q}[y]$ is a field and an integral domain  Is its true ?

I'm currently studying Polynomial Rings, but I can't figure out why they are Rings, not Fields. In the definition of a Field, a Set builds a Commutative Group with Addition and Multiplication. This implies an inverse multiple for every Element in the Set.   The book doesn't elaborate on this, however. I don't understand why a Polynomial Ring couldn't have an inverse multiplicative for every element (at least in the Whole numbers, and it's already given that it has a neutral element). Could somebody please explain why this can't be so?


I have epson thermal printer model M129H. How to get the status of the printer in my c# application ? The status includes:   Printer is on or off Paper roll is finished Error in printing Paper roll fitter is open   etc.

In the standard PrintDialog there are four values associated with a selected printer: Status, Type, Where, and Comment.  If I know a printer's name, how can I get these values in C# 2.0?


I'm trying to show that the function $f: \mathbb{R^2} \rightarrow \mathbb{R}$ given by   $ f(x,y)= \begin{cases} \frac{xy}{x^2+y^2}, \text{ if } (x,y) \neq (0,0) \\ 0 \text{ if } (x,y) = (0,0) \\ \end{cases} $  is continuous along every horizontal and every vertical line. From what I understand, I need to show that for every $x_0, y_0 \in \mathbb{R}$, the functions $g, h: \mathbb{R} \rightarrow {R}$ given by $g(t) = f(x_0, t)$ and $h(t) = f(x_0, t)$ are continuous.   I also need to show that the function is not continuous on (0,0).   From the definition, I understand that $f$ is continuous at $p \in E$ if $\forall \epsilon > 0$, $\exists \delta >0$ such that $\forall x \in E$, $d(x,p) < \delta$ implies $d(f(x), d(p)) < \epsilon$.   Here's what I have so far on trying to prove continuity:     For horizontal line, we can set $y=c$ and so the function gives us $f(x,c) = \frac{xc}{x^2 + c^2}$. Similarly for the vertical line, we have $x=c$ and so $f(c,y) = \frac{cy}{c^2 + y^2}$.    But I'm really confused on how I should prove that the function is continuous along the vertical and horizontal lines.   As for proving not continuous at (0,0), can I just say that the function is not defined on (0,0)?   Help would be much appreciated!

Consider the function $ f:\mathbb{R^2} \rightarrow \mathbb{R}$ given by   $ f(x,y) = \left\{   \begin{array}{l l}     \frac{xy}{x^2 + y^2} & \quad \text{if (x,y) $\neq$ (0,0)}\\     0 & \quad \text{if (x,y) = (0,0)}   \end{array} \right.$  Show that f is continuous along every horizontal and every vertical line (i.e. for every $x_0, y_0 \epsilon \mathbb{R}$, the functions $g,h:\mathbb{R}\rightarrow \mathbb{R}$ given by $g(t) = f(x_0,t)$ and $h(t)=f(t,y_0)$ are continuous).  I know that this function is not continuous at $(0,0)$, but the horizontal/vertical line issue is proving difficult to work with. Any help/hints appreciated!


Recently I bought a  and was wondering if I will be able to dualboot it with Windows 10 and Ubuntu?   8GB RAM,  256 SSD, Intel i5 8350U

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


\  If $p_n$ is the $n$-th prime number prove that $p_{n+1}^2<p_1 p_2 \cdots p_n$ when $n>=4$  Thaks, Payam

I wanted to prove the following question in an elementary way not using Bertrand postulate or analytic estimates like $x/\log x$. The question is  $$ p_{n+1}^2<p_1p_2\cdots p_n,\qquad(n\geq4) $$  I made the following argument. Does anyone have some opinion or simpler ideas to complete.  We consider two cases: Case 1: $N=p_1p_2\cdots p_n-1$ is composite: then there will be a prime factor  $q\leq\sqrt{N}$, and of course $q$ is not any of the $p_i$'s. therefore $p_{n+1}\leq q\leq\sqrt{N}$. So $p_{n+1}^2<N+1$.  Case 2: $N=p_1p_2\cdots p_n-1$ is prime. Then???


Is there a grammatical rule that applies to saying "good morning" when it is not morning?

A friend of mine told me that you can say "good morning" to a person at any time, if you are seeing him/her for the first time on that day. Is this true?


I have two HDD's unplugged for two years. It's from my old pc. I have some important files in there but I'm wondering about this problem.  Will the HDD's turn on and I'll be able to access all my files or there a possibility of these HDD's goes bad because I let them off for a long time?

Do you guys know how much time needs to pass until the data stored on a hard drive starts to degrade?   To keep the data intact for long periods of time, I heard you need to periodically rewrite it on the hard drive, like every 5 years or so. Is it true?


I have "Ubuntu 14.04.2 LTS" OS and trying to install PHP7 using command:   sudo apt-get install php-7.0   Getting error message:   Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package php-7.0 E: Couldn't find any package by regex 'php-7.0'  sudo apt-get install php7.0 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package php7.0 E: Couldn't find any package by regex 'php7.0'   How it can be fix Please advise.

PHP 7 came out  and I would like to give it a try.  PHP 7.0.0 comes with a new version of the Zend Engine, numerous improvements and new features such as  Improved performance: PHP 7 is up to twice as fast as PHP 5.6 Significantly reduced memory usage Abstract Syntax Tree Consistent 64-bit support Improved Exception hierarchy Many fatal errors converted to Exceptions Secure random number generator Removed old and unsupported SAPIs and extensions The null coalescing operator (??) Return and Scalar Type Declarations Anonymous Classes Zero cost asserts     Is that possible to install it on current Ubuntu version? Is there any current limitations or known compatibility issues?


Prove the following combinatoric identity:  $$\sum_{k=0, k even}^n {n \choose k}*2^k = \frac{(3^n)+((-1)^n)}{2}$$

I need to prove the following identity:  $\sum_{{{\underset{k-even}{k=0}}}}^{n}{n \choose k}2^{k}=\frac{3^{n}+(-1)^{n}}{2}$  I know that -   $\sum_{k=0}^{n}{n \choose k}2^{k}=3^{n}$  but don't know how to continue.


In my application I have a lot of logs. I do accumulate all errors from all logs in one place called errorsLogger. I've implemented it this way:  static Logger errorsLogger;  ....  void Logger::Error(std::string format, ...) {     va_list arglist;     va_start(arglist, format);      if (this != &errorsLogger) {         errorsLogger.Error(format, arglist);      // how to forward parameters?     }      vfprintf(logFile, , format.c_str(), arglist);     fprintf(logFile, "\n");      fflush(logFile);     va_end( arglist ); }   However this code doesn't work as expected errorsLogger contains a little bit strange strings - it seems variable arguments was not passed. How to fix my code to be valid?

In C, is it possible to forward the invocation of a variadic function? As in,  int my_printf(char *fmt, ...) {     fprintf(stderr, "Calling printf with fmt %s", fmt);     return SOMEHOW_INVOKE_LIBC_PRINTF; }   Forwarding the invocation in the manner above obviously isn't strictly necessary in this case (since you could log invocations in other ways, or use vfprintf), but the codebase I'm working on requires the wrapper to do some actual work, and doesn't have (and can't have added) a helper function akin to vfprintf.  [Update: there seems to be some confusion based on the answers that have been supplied so far. To phrase the question another way: in general, can you wrap some arbitrary variadic function without modifying that function's definition.]


I was playing around with the type and which commands and I discovered something strange.  type either returns the path or says that a command is a Bash built in. which either returns the path or nothing for built ins such as exit or type  What is strange is that type echo says that echo is a built in as I expected.  But which echo gives /bin/echo as the path to the echo executable. This doesn't seem to happen for any other built in commands.  I am wondering what the different between the two is, which one Bash chooses to execute in scripts and on the command line, and what the story behind the two echos is.  My system is Ubuntu Desktop 12.04

$ which echo echo: shell built-in command. $ which ls /bin/ls $ which cat /bin/cat   Why is echo not an independent utility like ls, ps, cat etc? Why is it shell specific? Any good reasons?


let us suppose that there is given  such  kind of conjecture   if  their division is  square of integer  then we  will have  $\frac{a^2+b^2}{ab+1}=k^2$  for some  integer $k$, then  we would have  $a^2+b^2=k^2*ab+k^2$  or  we would have  $a^2-k^2*a*b+b^2=k^2$  compare  to the equation  $a^2-2*a*b+b^2=(a-b)^2$  we would have  $k^2=2$     but is that proof ? i could   not understand  if there is  another option  or alternative ways

Let $a,b$ be positive integers.  When $$k = \frac{a^2 + b^2}{ab+1}$$ is an integer, it is a square.    Proof 1: (Ngô Bảo Châu): Rearrange to get $a^2-akb+b^2-k=0$, as a quadratic in $a$ this has two values: $a$ and $kb - a = (b^2-k)/a$. (The second root is determined in two different ways from the expansion $(x-r_1)(x-r_2) = x^2 - (r_1 + r_2)x + r_1 r_2$.)  Now suppose we have $a,b$ such that $k$ is an integer but not a square, by the investigation about roots we have that the second root is a nonzero integer since $k,b,a$ are integers and $k \not = b^2$, futhermore it is positive which is easily seen from its defining equation.  WLOG assume $a \ge b$ so that the second root is strictly smaller than $a$. This leads to a decent, replacing $a$ with the second root.    Proof 2 (Don Zagier): Apply reduction theory (specifically, Sätze 1 and 2 of Section 13 of my book on quadratic fields) to the quadratic form $x^2 + kxy + y^2$, which is the unique reduced quadratic form in its equivalence class.    Note that Proof 2 is pretty much the same as Proof 1 when written out in explicit detail, but I could not read Zagier's book because I cannot read German.  I would like to know more approaches to this and other alternative proofs of this result if possible! Thanks in advance.  I would also be interested in related problems (especially easier ones of a similar nature) and texts which cover the reduction theory in English.


It's understandable to tell as few people as possible, especially as they were being tracked; there could be a mole, but besides Leia it seemed no one knew.   I know Finn was knocked out, but why not tell him the plan after he woke up? At least, Holdo would only know Finn as a hero of the Battle of Starkiller Base. If Poe was a overconfident hothead, Finn was the opposite- i.e., nervous, confused, and lacking the desire to be a hero, despite becoming one.  Also, Rose was an engineer- too low for the leaders to notice... but, she was also shown to be very loyal, by knocking out defectors, and dragging them to the brig. There's no way Rose would be a traitor.  How can the plan be carried out if no one is told what it is?

(Last Jedi spoilers ahead, if you haven't seen the movie, please don't read on.)  So, fridge logic moment for me:      If Vice Admiral Holdo had told Poe Dameron about the plan to just hold on long enough to make a covert run to Krait, then Poe wouldn't have felt the need to send Finn and Rose on their little side-trip, and the code-breaker wouldn't have overheard anything nor sold them out, and the First Order would've had no reason to notice the cloaked ships.   I do understand that there's a lesson in there about following orders, even if said orders come from a pretty face in a pretty dress, but that's kind of an out-of-universe reason. What was Holdo's reasoning? Surely she knew enough about Poe to realize that treating him like a mushroom1 would not result in anything good.  1 "kept in the dark and fed shit"


I cannot use iCloud since I forgot the password for my MACBookPro original APPLE ID. The email address associated with this ID is no longer valid and the security question was never set up. How do i reset the password? I want to change the ID and use new PW to access icloud.

My wife forgot the password to her Apple ID account. Her Macbook Air (OS X Yosemite) restarted to install some updates. She has her user account set up through her Apple ID account.  Since she forgot the password she reset it from my laptop.  She can log in to iCloud and Apple ID with the new password, but cannot log in with the new password on the Air.  When she tries to log in she is greeted with this message:     "This account uses an iCloud password to log in. If you need to change   the password, use another device to change it at appleid.apple.com."


Is it possible to use both GPU and CPU on a single render? I guess that the GPU and CPU should render the whole frame so it doesn't have different pieces rendered by CPU and a few other by GPU so the image looks weird because of the differences in the two render methods. I don't want to run two independent instances of blender that might crash the other with 100%lode problems, or just end a half hour before the other. The other is how do I make the GPU and CPU render the same style, I know i have seen very different result between CPU and CUDA render.  if you are working on a animation you shulde reed this also, the method disused ther is runing two independent rendering on the same time.

The Cycles render engine can render both on the CPU and the GPU. I often render over-night so I do not need my computer to be responsive.  Is it possible to render with Cycles using both the CPU and GPU? If not, are there any other workarounds that maximize the hardware's potential?       This question here:  focused on single frames optimisation.


I want to give user a possibility to stop inputing new lines in my String array by entering the word "end". I checked out - it really inputs 'end' before the if statement, but for some reason this doesn't break the while cycle:  Scanner scan = new Scanner(System.in);            String[] str = new String[50];                     int j=0; int f = 0;                            System.out.println("Input 'end' to see your previous input!"); while(f != -1) {   the input goes well, but the if statement doesn't work completely   String choice = scan.nextLine();                 if(choice == "end")                             {                  f = -1;                            }              else              {                  str[j] = choice;                  j++;              }        }

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?


This a little program that I am making for my little brother how need help in remembering verbs. What its suppose to do at this point in time is pick a word and as the user to then type in the same word but in a different time eg generate run  user input running . I have all the words in a 2d array which allows me to compare them . However when I type in the correct answer it say that i am incorrect.   package javaapplication1;  import java.util.Random;  import java.io.*;  public class JavaApplication1 {  public static void main(String[] args)  throws IOException {     BufferedReader userInput =                new BufferedReader(new InputStreamReader(System.in));     String[][] myArray = { {"awake" , "awoke" , "awoken"},  {"be" , "was/were" , "been"}, {"beat" , "beat" , "beaten"}, {"become" , "became" , "become"}, {"begin" , "began" , "begun"}, {"bend" , "bent" , "bent"}, {"bet" , "bet" , "bet"}, {"bid" , "bid" , "bid"}, {"bite" , "bit" , "bitten"}, {"blow" , "blew" , "blown"}, {"break" , "broke" , "broken"}, {"bring" , "brought" , "brought"}, {"broadcast" , "broadcast" , "broadcast"}, {"build" , "built" , "built"}, {"burn" , "burned" , "burnt"}, {"buy" , "bought" , "bought"}, {"catch" , "caught" , "caught"}, {"choose" , "chose" , "chosen"}, {"come" , "came" , "come"}, {"cost" , "cost" , "cost"}, {"cut" , "cut" , "cut"}, {"dig" , "dug" , "dug"}, {"do" , "did" , "done"}, {"draw" , "drew" , "drawn"}, {"drive" , "drove" , "driven"}, {"drink" , "drank" , "drunk"}, {"eat" , "ate" , "eaten"}, {"fall" , "fell" , "fallen"}, {"feel" , "felt" , "felt"}, {"fight" , "fought" , "fought"}, {"find" , "found" , "found"}, {"fly" , "flew" , "flown"}, {"forget" , "forgot" , "forgotten"}, {"forgive" , "forgave" , "forgiven"}, {"freeze" , "froze" , "frozen"}, {"get" , "got" , "gotten"}, {"give" , "gave" , "given"}, {"go" , "went" , "gone"}, {"grow" , "grew" , "grown"}, {"hang" , "hung" , "hung"}, {"have" , "had" , "had"}, {"hear" , "heard" , "heard"}, {"hide" , "hid" , "hidden"}, {"hit" , "hit" , "hit"}, {"hold" , "held" , "held"}, {"hurt" , "hurt" , "hurt"}, {"keep" , "kept" , "kept"}, {"know" , "knew" , "known"}, {"lay" , "laid" , "laid"}, {"lead" , "led" , "led"}, {"leave" , "left" , "left"}, {"lend" , "lent" , "lent"}, {"let" , "let" , "let"}, {"lie" , "lay" , "lain"}, {"lose" , "lost" , "lost"}, {"make" , "made" , "made"}, {"mean" , "meant" , "meant"}, {"meet" , "met" , "met"}, {"pay" , "paid" , "paid"}, {"put" , "put" , "put"}, {"read" , "read" , "read"}, {"ride" , "rode" , "ridden"}, {"ring" , "rang" , "rung"}, {"rise" , "rose" , "risen"}, {"run" , "ran" , "run"}, {"say" , "said" , "said"}, {"see" , "saw" , "seen"}, {"sell" , "sold" , "sold"}, {"send" , "sent" , "sent"}, {"show" , "showed" , "shown"}, {"shut" , "shut" , "shut"}, {"sing" , "sang" , "sung"}, {"sit" , "sat" , "sat"}, {"sleep" , "slept" , "slept"}, {"speak" , "spoke" , "spoken"}, {"spend" , "spent" , "spent"}, {"stand" , "stood" , "stood"}, {"swim" , "swam" , "swum"}, {"take" , "took" , "taken"}, {"teach" , "taught" , "taught"}, {"tear" , "tore" , "torn"}, {"tell" , "told" , "told"}, {"think" , "thought" , "thought"}, {"throw" , "threw" , "thrown"}, {"understand" , "understood" , "understood"}, {"wake" , "woke" , "woken"}, {"wear" , "wore" , "worn"}, {"win" , "won" , "won"}, {"write" , "wrote" , "written"}};      Random rand1 = new Random();      int  n = rand1.nextInt(88) ;     System.out.println(n);     System.out.println("The word is: " + myArray[n][0]);     System.out.println("Input your answer :");     String input  = userInput.readLine();     if (input == myArray[n][1]) {        System.out.println("Well done");      }     else{         System.out.println("Better luck nex time");          System.out.println("The correct answer was : "                        + myArray[n][1]);     }     }   }


Is it possible to show that $\lim_{n \to -\infty}{n^ke^n} = 0$, $k \in \mathbb{N}$? I tried to prove this by induction but my attempt failed.

Does $f(x)=ax^b$ grow faster than $g(x)=\ln x$ for all $a, b > 0$? Can I say that $f(x) > g(x)$ as $x$ approaches infinity?  I thought the answer is yes, but this graph appears to be telling a different story.    Is the polynomial (the green curve) going to cross the log function (the red curve) and exceed in value for some large value of x?  If the answer is yes, does it mean that if I subtract the two functions and set it to zero, the resulting equation will have two roots? What are the roots?


I have the below code:  main() {     char *a[] = {"sleep", "5", NULL};     int x;     x = 15;     snprintf(a[1], 10, "%d", x);     printf("%s\n", a[1]);     execvp(a[0],a); }   The idea is turning the second element in the array (a[1]) into a character so I can manipulate it and run sleep 5, sleep 15, sleep 25 at will. The issue I'm having is snprintf, the program compiles fine but I'm getting a "Segmentation fault: core dumped" error every time.    Edit: The closest topic I've seen on this was:    But it doesn't cover the issue I'm having when trying to assign the value into an element of the array.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


My neighbor indicates her Gateway SX2110G Windows 10 returns ""  Assume that the hard drive has failed and needs replacing.  It's an older machine, so I ordered an SSD and plan to install Win-10 from USB stick.  When activating, will the MS activation server recognize the configuration details (CPU serial, LAN MAC ID, etc.) and activate the fresh SSD Win-10 install?  I would like to understand the obstacles to activation, because if it is too much, then I will consider an alternative (Ubuntu).

A Windows-7 laptop was upgraded to Windows-10 during the Microsoft free upgrade period when they were nudging users to migrate away from 7 to 10.  The system is sluggish and crash prone: I would like create a fresh install with a new SSD from a Windows 10 install .iso burned to a USB drive.  Is it possible (and how can) the the license-key from the old drive be recovered and migrated to a fresh install?   If this is not the right question to ask, I would appreciate edits to the questions: thank you.


I upgraded my Ubuntu 14.04 to 16.04. But my phpmyadmin has error  The mbstring extension is missing. Please check your PHP configuration.   I searched somewhere but no solution on Ubuntu. Please help me. I'm using apache2

I am about to use phpmyadmin on Ubuntu 16.04. But it shows that the page is not working. the error log says error 500   PHP Fatal error:  require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 477   At first it says that the mysqli|mysql extension is missing. but after sleepless hours I forget what I've been done to it. I am using php7.


Why does a path drawn from corner of a node doesn't align with the node path? It might even be non-horizontal while coordinates tell that it is. Who can I fix this?  \begin{tikzpicture}[thick] \node (left) at (0cm, 0cm)     [draw, anchor=south west, minimum height=3cm, minimum width=1.1cm] {}; \node (right) at (3cm, 0cm)     [draw, anchor=south west, minimum height=3cm, minimum width=1.1cm] {}; \draw (left.north east) -- ++(0.8cm, 0cm)     .. controls +(0.5cm, -1cm) and +(-0.5cm, 1cm) .. ++(-0.4cm, -3cm)     -- (left.south east); \draw (right.north west) -- ++(-0.3cm, 0cm)     .. controls +(0.5cm, -1cm) and +(-0.5cm, 1cm) .. ++ (-0.4cm, -3cm)     -- (right.south west); \end{tikzpicture}   Sample:

When I draw a thick line from the corner of one box to the same corner of another, it doesn't attach properly. See the code and picture below:    \documentclass[a4paper, 11pt]{article}  \usepackage{tikz} \usetikzlibrary{shapes,arrows} \usetikzlibrary{positioning}    \begin{document} \begin{tikzpicture}   \node [draw, thick, minimum size=1cm] (a) {A};   \node [draw, thick, minimum size=3cm, right=2cm of a] (b) {B};    \draw [thick, dashed] (a.north west) -- (b.north west);   \draw [thick, dashed] (a.north east) -- (b.north east);   \draw [thick, dashed] (a.south west) -- (b.south west);   \draw [thick, dashed] (a.south east) -- (b.south east); \end{tikzpicture} \end{document}   How do I make the lines attach exactly to the corners and not slightly off as in this example?