(this question is really a follow-on from )  I have a dead Dell computer where the cause of death did not involve or damage the hard drive.  If I had identical replacement hardware, I could just physically transfer the existing disk and all would be well.  I don't however, and I'm faced with building the new machine (non-Dell) from scratch and installing a ton of applications again.  I have a license for Win10 Pro retail for the new machine (the dead machine was Win10 Home OEM).  I'm very keen to avoid reinstallation of my applications.  Would this work (and is this the right order to do things)?   use Macrium Reflect to clone the old disk onto another new one of the same or greater size. boot the new machine in safe mode, and use Device Manager to remove all the hardware devices that aren't present in the new machine. reboot and let plug-and-pray get the appropriate drivers for the new hardware. upgrade the Win10 installation to Win10 Pro retail.   UPDATE  Here's what happened:   old machine was Dell 8700 running Win10 Home, 2TB drive, 16G RAM. Nvidia GTX745 video card. new machine was ex-lease Acer I7 with SSD only, 16G RAM, GT730 video card bought a new 2TB drive. plugged the old 2TB drive into the Acer. removed the SSD from the Acer (the motherboard only had 2 power connectors). plugged the new 2TB drive into the Acer. booted the Acer from the 8700's Macrium Reflect rescue media. used Reflect to clone the old 2TB drive to the new one. powered down the Acer, removed the old 2TB drive and rebooted.  Windows started and worked fine but with a default Microsoft video driver. enabled the device manager option that allows you to view "hidden" devices, found the GTX745, removed it and rebooted.  Plug and Pray installed the GT730 video drivers. everything seems to be intact and works as it should.   Upgrading the Windows installation from Home to Pro was (apparently) just a matter of accessing Settings/Security/Activation and pasting in the key.   I did this, and Windows now announces as an activated Pro version installation, but it thinks that it is activated through a digital license rather than a product key.  This may be because the old license was an OEM one.

I’ve had a laptop fail (CPU failure according to the blinking LED) and was wondering what steps I could take to transfer its hard drive to a new machine and have it boot. It currently has Windows 10 installed (upgraded from Windows 8.1, Windows 8 before that, and originally Windows 7).  I’ll probably start by taking a backup image of the disk. The replacement laptop hasn’t arrived as yet, it’s of a similar vintage. The old machine was a HP ProBook (don't recall the model off the top of my head), and the replacement a Dell Latitude 6420.  I of course want to avoid having to reinstall and reconfigure all the applications on the drive.


So i have a Syrian passport and and Egyptian one, i work in Russia and my working visa is on my Syrian passport, i wanna travel to Indonesia, going there for Egyptians is visa free.  My question is, Can i leave Russia with my Syrian passport, and enter then leave Indonesia with my Egyptian one, and go back to Russia with my Syrian one (since the visa is on there)?  there are 4 countries involved, 1 visa, and 2 entries! i hope the description makes it clear ^

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


For example, the D3300 is advertised to have 24.2 megapixels, but its highest camera resolution in all types of settings including raw and full manual, the output resolution becomes 6000×4000 instead of 6016×4000 like the D3200. I was wondering if those 16 pixels are used for some sort of physical noise reduction mechanism or are just simply cropped off for whatever reason.  I've also talked with Nikon support and they don't know why that happens. They implied that the image is simply cropped, but they were unsure why it does this.

compares Canon EOS 550D and Canon EOS 500D cameras and mentions     18.7 million effective pixels   for 550D. However the best resolution possible using this camera is  5184 * 3456 = 17915904 ~ 17.9 million pixels   What are effective pixels, and why is that number greater than 17.9 million in this case?


I am researching ways of making ads actually relevant to people. How can I get the location of a visitor, who just loaded my page? I'm not talking IP Geo-location, I'm talking the exact latitude and longitude of a user, that I could later store in a database. Is there an API or something to allow me to get those values in PHP variables, using something like GPS?

I want to retrieve information like the city, state, and country of a visitor from their IP address, so that I can customize my web page according to their location. Is there a good and reliable way to do this in PHP? I am using JavaScript for client-side scripting, PHP for server-side scripting, and MySQL for the database.


I have for example the coordinate of 3 points and I want to fit a 2 degree polynomial on it. how can I find the coefficients of the polynomial?? it is noted that the function is parametric and is expressed as in which 0

I am having trouble calculating the quadratic curve $f(x)$ that goes through 3 points; for example a curve that goes through $A(1,3), B(-1,-5), and C(-2,12)$. I can only guess that the curve is upwards and that I may create the system: $$ y_1 = ax^2_1 + bx_1 + c\\ y_2 = ax^2_2 + bx_2 + c\\ y_3 = ax^2_3 + bx_3 + c $$ assuming that the points are in the format $A(x,y)$ and from this point what do I do? Do I build a matrix and use the Gaussian eliminations?  EDIT: I also know that $f(4) = 120$


I am creating barchart in tibco jasper report 6.10.0, and I want to add some customization on the chart. After searching about solution, I have been found that the solution is to create external defined class with jfreechart library and import it to the jasper report. After creating the class and building the jar file, I added it in report and selected the class from chart customizer in report "the selected class not found" message appeared    When previewing the report:  net.sf.jasperreports.engine.JRRuntimeException: Could not create chart customizer instance.     at net.sf.jasperreports.engine.fill.JRFillChart.createAndInitCustomizer(JRFillChart.java:353)     at net.sf.jasperreports.engine.fill.JRFillChart.<init>(JRFillChart.java:306)     at net.sf.jasperreports.engine.fill.JRFillObjectFactory.visitChart(JRFillObjectFactory.java:704)     at net.sf.jasperreports.engine.base.JRBaseChart.visit(JRBaseChart.java:578)     at net.sf.jasperreports.engine.JRAbstractObjectFactory.getVisitResult(JRAbstractObjectFactory.java:88)     at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:82)     at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:95)     at net.sf.jasperreports.engine.fill.JRFillBand.<init>(JRFillBand.java:129)     at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:524)     at net.sf.jasperreports.engine.fill.JRBaseFiller.createFillBand(JRBaseFiller.java:366)     at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:284)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:79)     at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:251)     at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:272)     at net.sf.jasperreports.engine.fill.BaseFillHandle.<init>(BaseFillHandle.java:86)     at net.sf.jasperreports.engine.fill.AsynchronousFillHandle.<init>(AsynchronousFillHandle.java:120)     at net.sf.jasperreports.engine.fill.AsynchronousFillHandle.createHandle(AsynchronousFillHandle.java:244)     at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:441)     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.ClassNotFoundException: com.jaspersoft.bizdev.PieLabels cannot be found by net.sf.jasperreports_6.10.0.final     at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:512)     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:423)     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:415)     at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:155)     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Class.java:348)     at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:191)     at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:131)     at net.sf.jasperreports.engine.fill.JRFillChart.createAndInitCustomizer(JRFillChart.java:347) ... 18 more

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I have an old Minolta Maxxum, is there a camera DSLR body that will take all the lenses from the Maxxum available ?

I have an old Minolta Maxxum 7000i AF-SLR camera from early 90s. I have a complete set of lenses, filters, etc., I found out that Sony ultimately ended up buying Minolta, and developing their alpha cameras from Minolta cameras.     I know it is a fat chance, but was hoping to find out if anyone has tried using the Maxxum lenses on the new Sony Alpha series?


I have been playing minecraft for a while, but I have never played survival. All I know is just a little bit about it. Anyways, while I was playing survival for the first time, I was constantly getting killed by enemies due to my lack of sufficent shelter. Is there a best method for building a first night shelter? (Btw, all the tutorials I looked up were too complicated for an ultimate survival noob like me.) Also, if you want to, could you throw in some easy to follow online tutorials?

I've recently started playing Minecraft, and I only have a little experience with enemies (I've been playing with the peaceful setting so I can figure out what the heck I'm doing).  When I did play some survival mode, I happened to be at the top of a pretty large cliff when night hit, and this seemed to protect me - the baddies just piled up at the bottom of the cliff.  However, it seems like this probably only worked due to pathing flukes.  The terrain behind me was pretty easy going, so I suspect if enemies spawned in the right areas, they could still come up and visit.  That said, how can I set up a quick protective shelter for the first night or two?  The days don't seem to last very long, so I don't expect I would be able to generate a lot of high-end materials, tools, etc. to work with.  Also, the zombies caught fire nicely when the sun came up, but there were still some spiders and some other things (creepers? - they were explosive) that didn't go away at daybreak.  Do I need multiple exits for my shelter or some other way to avoid running into all the enemies outside the front door that have accumulated overnight?


I deleted my Pokemon go app and reinstalled, in turn I lost all my data and had to restart. But my "nick name" is already taken . So is my account still valid ? How do I recover it?

I have been using the app for 3 days now. I just opened it up again, and it asked me to sign "up" again with either Google or the Trainer server.   So I signed up with the same Google account as when I first started with and the game started again.   Is there Any way I can get my progress back?


If you had a long list of lists in the format [['A',1,2],['B',3,4]] and you wanted to combine it into ['A, 1, 2', 'B, 3, 4'] is there a easy list comprehension way to do so?  I do it like this:  this_list = [['A',1,2],['B',3,4]] final = list() for x in this_list:      final.append(', '.join([str(x) for x in x]))   But is this possible to be done as a one-liner?  Thanks for the answers. I like the map() based one. I have a followup question - if the sublists were instead of the format ['A',0.111,0.123456] would it be possible to include a string formatting section in the list comprehension to truncate such as to get out 'A, 0.1, 0.12'  Once again with my ugly code it would be like:  this_list = [['A',0.111,0.12345],['B',0.1,0.2]] final = list() for x in this_list:     x = '{}, {:.1f}, {:.2f}'.format(x[0], x[1], x[2])     final.append(x)   I solved my own question:  values = ['{}, {:.2f}, {:.3f}'.format(c,i,f) for c,i,f in values]

If I have sequence of sequences (maybe a list of tuples) I can use itertools.chain() to flatten it. But sometimes I feel like I would rather write it as a comprehension. I just can't figure out how to do it. Here's a very construed case:  Let's say I want to swap the elements of every pair in a sequence. I use a string as a sequence here:  >>> from itertools import chain >>> seq = '012345' >>> swapped_pairs = zip(seq[1::2], seq[::2]) >>> swapped_pairs [('1', '0'), ('3', '2'), ('5', '4')] >>> "".join(chain(*swapped_pairs)) '103254'   I use zip on the even and odd slices of the sequence to swap the pairs. But I end up with a list of tuples that now need to be flattened. So I use chain(). Is there a way I could express it with a comprehension instead?  If you want to post your own solution to the basic problem of swapping elements of the pairs, go ahead, I'll up-vote anything that teaches me something new. But I will only mark as accepted an answer that is targeted on my question, even if the answer is "No, you can't.".


I have seen the word before but I forgot what it is. The word is to describe a mental/emotion of a person when the past experience has given him repeated disappointment on a certain thing. The person is getting used to the feeling and adapt to not expecting the high quality outcome.

Often, I encounter situations (particularly with software or electronics, though occasionally with people) where bugs or strange events happen that cause me to lose trust in said software maintaining the integrity of my data, or said technology being reliable 'in the clutch' (or even scenarios where a person or business entity change a predictable, relied-on pattern of behavior, belief or expectation).   Sometimes I feel so strongly about the broken trust, that I feel forced to stop trusting (even if such events leading to the distrust were unintentional). I may still use said software, but I continue to do so very cautiously at that point.   The word I believe I'm looking for is similar to 'ized' words, in that it describes a state of 'forced distrust' assigned to myself, not the state or act of the object/person breaking the trust (e.g. "I've been/become xxxxxxxized by such-and-such...").   I often want to use the word 'disenfranchised' to describe such a state, but I'm not sure that's 100% suitable to the various contexts or the concept of lost trust (even though whatever trust I had was likely unfounded anyway, simply because, at least in the context of software, that trust is simply the lack of distrust due to having not yet experienced any bugs/issues that have built up a negative rapport with said software and what I expect it to do without fail).   So what's the word I'm looking for, if such a single word exists?


Gold Standard as in:     an example against which others of the same type are compared   -    Any other humorous ways to refer to this?  Something like "the holy mother"...

It is common to see things described as the "gold standard". It means that something is the best and is the ideal against which other things are to be compared; it cannot be superseded. I often , where a certain diagnostic test (e.g., the nasopharyngeal swab PCR test for infection with the Coronavirus causing COVID-19) is considered the most accurate and then other tests (e.g., cheaper or faster tests) are then evaluated against this benchmark. The etymology is covered in . In short, it is derived from the . Thus gold was the thing against which the value of all other currencies was measured. I don't like this term and would like to avoid using it. First, the desired meaning is not predominant; if you  you will mostly get results for the monetary system, not the more general phrase. Second, the etymology is outdated; the original meaning of the term now has the opposite connotation. The monetary gold standard was abandoned in the 1970s. Economists consider the gold standard to be a bad monetary system. Thus, if you are interested in economics and history, the term "gold standard" actually is associated with being outdated and flawed -- which is close to the opposite of the intended meaning. (Of course, many people are unaware of the original meaning of the term. ) (A note in response to comments: Why I want to avoid this term is relevant, but not essential, to the question. If you don't see a problem with the term, the question can be answered regardless.) My question: Is there a better phrase to use in place of "gold standard"? For example, what term could be used in a medical study comparing a new diagnostic test against the gold standard test? I'm not aware of any good substitute that has essentially the same meaning. Here are two example sentences where I would like a replacement:   A nasal swab is the gold standard for diagnosing COVID-19.     The  served as the gold standard for all scales from 1889 until 2019.   The best substitute I can think of is "official," as in "a nasal swab is the official way to diagnose COVID-19". "Official" implies some form of uniqueness. But "official" implies the existence of some authority that gives it this designation (as opposed to scientific consensus). A  asks for a "perhaps humorous" alternative -- the suggestion there, "mother of all", is not appropriate here. (There is also .)  In response to the answers and comments doubting the premise of this question: I personally have a negative association with the phrase "gold standard" because I know people who advocate for returning to the gold standard or its modern equivalent, , and have discussed the topic at length. Several  US  continue to advocate for a return to the gold standard. Thus asserting that no one will interpret the phrase in terms of monetary policy is simply not convincing.


In Hartshorne section 1.1 he gives a problem (ex 1.11) which says that,   Let $Y \subset \mathbb A^3$ be the curve given parametrically by $x=t^3, y=t^4, z=t^5$. Show that $I(Y)\subset k[x,y,z]=A$ is a prime ideal of height 2 which cannot be generated by two elements.  Firstly, my question is that how can I check whether $Y$ is Zariski closed or not. Is it always the case that, a subset given by $x=f(t), y=g(t), z=h(t); f,g,h \in k[t]$ is always Zariski closed ?  My attempt was to prove that $A/I(Y) \cong k[t^3,t^4,t^5]$ to show $I(Y)$ is prime. And then I wanted to show the map $ \mathbb A^1 \rightarrow \mathbb A^3$ sending $t \rightarrow (t^3,t^4,t^5)$ is a topological embedding. I am stuck in proving that the map is continuous.   After proving this I could have said $Y$ (having proved that it is Zariski closed) is a variety of dimension 1, hence $I(Y)$ has height 2. I don’t know how to determine the least number of generators. Any help from basic algebraic results would be helpful.  I am a beginner in algebraic geometry so I don’t know many things, please keep it as basic as possible.

How can I determine the height and the least number of generators of the ideal $ I=(xz-y^2,x^3-yz,z^2-x^2y) \subset K[x,y,z] $?      I tried to calculate the dimension of the vector space $I/I\mathfrak m$ with $\mathfrak m=(x,y,z)$, but I'm not able to find it.  I think the height is $2$, because the affine variety should be a curve, and also I know that the ideal is prime, so I need a chain $0\subset \mathfrak p \subset I$. Maybe $(xz-y^2)?$ Is it prime?


I would like to know how to prove that if if the scalar product is non degenerate then the metric matrix is invertible and symmetric.  It is probably trivial, probably not but I really don't know how to prove it.  They define a non degenerate scalar product, a scalar product verifying :  $\forall w ~ \langle v |w\rangle =0 \Rightarrow v=0 $

I have the following question:      Show that a symmetric bilinear form is nondegenerate if and only if its matrix in a basis is invertible   Ok so both directions "if non-degenerate then the matrix is invertible" and "if matrix is invertible then the form is nondegenerate" have to be proven for this.   For the first direction. If the bilinear form is non-degenerate its null space is $\left\{0\right\}$, so for every $v \neq 0$ there exists a $v'$ such that $\langle v, v' \rangle \neq 0$ and so there are no zero eigenvalues, I'm pretty sure this somehow implies the determinant of the matrix is also non-zero, as it is the product of the eigenvalues and hence invertible (but not sure how to show this).   For the other direction, if the matrix is invertible, then the determinant is non-zero and, if my previous assumption is correct, this implies there are no zero eigenvectors, which implies the null space is $\left\{0\right\}$ and hence non-degenerate?   Thanks for any guidance, the notes I have on this topic are pretty poor so I'm having a hard time fully understanding everything. Thanks again.


I managed to make a program to run a .bat file and run a console, but I want to get the lines from that console to my program, I searched for it but I couldn't find anything.  The bat will open a console window and I want to get the lines from that console window.  Code :   private void checkBox1_CheckedChanged(object sender, EventArgs e)     {         if (checkBox1.Checked == true)         {             Process startM = new Process();             startM.StartInfo.FileName = @"C:\Users\xxxxx\Desktop\$v\xxxxx\run.bat";             startM.StartInfo.WorkingDirectory = @"C:\Users\xxxx\Desktop\$v\xxxxx";             startM.StartInfo.CreateNoWindow = true;             startM.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;             startM.Start();             //startM.WaitForExit();                 checkBox1.FlatAppearance.BorderColor = Color.Green;             checkBox1.FlatAppearance.CheckedBackColor = Color.Green;             checkBox1.Text = "On";         }          else if (checkBox1.Checked == false)         {             try             {                 Process[] proc = Process.GetProcessesByName("test");                 proc[0].Kill();             }             catch (Exception c)                 {                     MessageBox.Show(c.Message);                 }             checkBox1.FlatAppearance.BorderColor = Color.Red;             checkBox1.Text = "Off";         }     }

I need to spawn a child process that is a console application, and capture its output.  I wrote up the following code for a method:  string retMessage = String.Empty; ProcessStartInfo startInfo = new ProcessStartInfo(); Process p = new Process();  startInfo.CreateNoWindow = true; startInfo.RedirectStandardOutput = true; startInfo.RedirectStandardInput = true;  startInfo.UseShellExecute = false; startInfo.Arguments = command; startInfo.FileName = exec;  p.StartInfo = startInfo; p.Start();  p.OutputDataReceived += new DataReceivedEventHandler (     delegate(object sender, DataReceivedEventArgs e)     {         using (StreamReader output = p.StandardOutput)         {             retMessage = output.ReadToEnd();         }     } );  p.WaitForExit();  return retMessage;   However, this does not return anything. I don't believe the OutputDataReceived event is being called back, or the WaitForExit() command may be blocking the thread so it will never callback.  Any advice?  EDIT: Looks like I was trying too hard with the callback. Doing:  return p.StandardOutput.ReadToEnd();    Appears to work fine.


During the battle scene in Avengers: Endgame, Thor summons Stormbreaker when he's being beaten up by Thanos. Before it reaches Thor, Thanos simply grabs Stormbreaker mid-air with his bare hands and then attempts to drive it into Thor's heart.   How could Thanos wield Stormbreaker? Is he worthy too?

In Avengers: Endgame,       Thanos was able to stop and catch Mjolnir and Stormbreaker mid-air as both Captain America and Thor used/called them BEFORE he got the Infinity Stones.   Since this character is clearly not worthy and had no super powers at the time, how were they able to wield Thor's Mjolnir and Stormbreaker, when even the Hulk couldn't do it in The Avengers?


I have everything set up, and this works, but I can't add ' or any other punctuation without getting a MySQL syntax error when I hit submit. I want to know how I can add punctuation to the text row of my form. I have it set up to utf8_unicode_ci under Collation, but I still get a syntax error.   The textarea is where I want to be able to submit with any punctuation or character. Here's what I have.  This is the form I'm using  print "<form method=post action=reply.php>"; print "
Reply:
";  print "
<textarea name=reply_content textarea rows=4 cols=50></textarea>"; print "<input type=hidden name=reply_user value={$_SESSION['user_name']}>"; print "<input type=hidden name=topic_id value=$id>"; print "
<input type=submit></form>";   This is the SQL for reply.php  $reply_content=$_POST['reply_content']; $reply_time=date('Y-m-d H:i:s'); $reply_user=$_POST['reply_user']; $topic_id=$_POST['topic_id'];  mysql_query("INSERT INTO reply VALUES ('reply_id', '$reply_user', '$reply_content', '$reply_time', '$topic_id')") OR die(mysql_error());  print "
Reply Posted Successfully
";   I know there's a way to do this, I just don't know how. If anyone could help me out, I'd really appreciate it!

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


The upgrade needs a total of 27.4 M free space on disk '/boot'. Please free at least an additional 9,027 k of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.  How to get free space for installing new updates?  I checked the boot in the file system. There were different versions of the same thing. Can I just delete older versions by myself to get free space?

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


How to share laptop wired internet with android 6 smartphone using ubuntu 14 wifi

I have been trying to share my wired Internet connection with my Android phone. However I could not succeed in doing this. Has anyone of you ever succeeded? Operating systems that I use are as follows:   Ubuntu 10.10 Android 2.3


I come up with: $$\sum_{i=1}^{\left \lfloor{\frac{n+1}{2}}\right \rfloor}{{n-i+1}\choose{i}}$$  Which I think is true but is there a way to write it not as a sum?

Given ordered sequences of 0's and 1's of length n. In how many of them no two 0's stand next to each other? Could you do if n=25.   I know this can be solved by using recursion. I am not familiar with solving recurrence equations. Could this be done another way?


I dont know why it's saying Ubuntu 16.04.3 when in the about section it says that I have Ubuntu 18.04 LTS.   I can't update to Ubuntu 19 because it says there's a malformed entry:    E: Malformed entry 52 in list file /etc/apt/sources.list (Component)   E: The list of sources could not be read."    Below is what I get when I run cat /etc/apt/sources.list  # deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted  ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu xenial partner  deb http://security.ubuntu.com/ubuntu bionic-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://security.ubuntu.com/ubuntu bionic-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://security.ubuntu.com/ubuntu bionic-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse deb http://archive.cannical.com/ partner # deb-src http://archive.cannical.com/ partner deb http://archive.canonical.com/ bionic partner # deb-src http://archive.canonical.com/ bionic partner # deb-src http://archive.canonical.com/ bionic partner

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


How to find summation of the series $1 + \dfrac {1}{3} + \dfrac {1\cdot 3}{3\cdot 6} + \dfrac {1\cdot 3\cdot 5}{3\cdot 6\cdot 9} + \dfrac {1\cdot 3\cdot 5\cdot 7}{3\cdot 6\cdot 9\cdot 12} + .....$ ?  I can't find any particular sequence.Please help!

How to find infinite sum How to find infinite sum $$1+\dfrac13+\dfrac{1\cdot3}{3\cdot6}+\dfrac{1\cdot3\cdot5}{3\cdot6\cdot9}+\dfrac{1\cdot3\cdot5\cdot7}{3\cdot6\cdot9\cdot12}+\dots? $$   I can see that 3 cancels out after 1/3, but what next? I can't go further.


how do I show similar matrices have the same eigenvalues?  I really have no idea, any detailed explanation would be thoroughly helpful.  thank you

Suppose $A$ and $B$ are similar matrices. Show that $A$ and $B$ have the same eigenvalues with the same geometric multiplicities.      Similar matrices: Suppose $A$ and $B$ are $n\times n$ matrices over $\mathbb R$ or $\mathbb C$. We say $A$ and $B$ are similar, or that $A$ is similar to $B$, if there exists a matrix $P$ such that $B = P^{-1}AP$.


Compute: $$\int_0^1 \frac{\arcsin \sqrt x}{x^2-x+1} dx$$ Answer: $\frac{\pi^2}{6\sqrt 3}$  My Attempt: The obvious substitution: $\arcsin \sqrt x=t$. This transforms my integral (say $I$) to: $$I=\int_0^{\frac{\pi}{2}} \frac{t\cdot 2\sin t\cos t}{\sin^4-\sin^2+1}dt$$ Then the substitution $t\rightarrow \left(\frac{\pi}{2}+0\right)-t$. This leads to the denominator remaining the same. Then, I added the "versions" of $I$ and on some simplifications, obtained: $$I=\frac{\pi}{4}\int_0^{\frac{\pi}{2}}\underbrace{\frac{\sin 2t}{1-\frac{\sin^2 2t}{4}}}_{f(t)}dt$$ Since $f(x)=f\left(\frac{\pi}{2}-x\right)$ we say: $$I=\frac{\pi}{2}\int_0^{\frac{\pi}{4}}\frac{\sin 2t}{1-\frac{\sin^2 2t}{4}}dt$$ Now the substitution $2t=u$ transforms it to: $$I=\frac{\pi}{4}\int_0^{\frac{\pi}{2}}\frac{\sin u}{1-\frac{\sin^2 u}{4}}du$$ Or, $$I=\pi\int_0^{\frac{\pi}{2}}\frac{\sin u}{4-\sin^2 u}du$$ Then I tried to decompose it into partial fractions and integrate them individually, by converting them in terms of $\tan \frac u2$ but the answer I'm getting doesn't match the given one. Thanks in advance!

$\int_{0}^{1}\frac{\sin^{-1}\sqrt x}{x^2-x+1}dx$  Put $x=\sin^2\theta,dx=2\sin \theta \cos \theta d\theta$  $\int_{0}^{\pi/2}\frac{\theta.2\sin \theta \cos \theta d\theta}{\sin^4\theta-\sin^2\theta+1}$ but this seems not integrable.Is this a wrong way?Is there a different way to solve it?


Sigmoid activation is used with the binary_cross_entropy loss where the output is a binary classification (yes/no). I often have outputs which are bounded between [0-1], but aren't classification outputs. Eg, maybe it's a real number which I've normalized to that range; or maybe it's a confidence score. I always see recommended to use linear activation for this (and mse/rmse/mae loss). But a benefit I see in using sigmoid is it bounds the output, so that the DNN isn't trying all sorts of values outside the acceptable range. Seems like it would train faster this way, and ensure the outputs are [0-1] on inference. So my intuition is: faster, safer. But with the sigmoid activation not being linear in nature, will that cause strangeness in the way the output distribution is fitted? Ie, is sigmoid indeed a bad idea re: the output distribution, and I should stick with linear?

I have a classification problem where pixels will be labeled with soft labels (which denote probabilities) rather than hard 0,1 labels. Earlier with hard 0,1 pixel labeling the cross entropy loss function (sigmoidCross entropyLossLayer from Caffe) was giving decent results. Is it okay to use the sigmoid cross entropy loss layer (from Caffe) for this soft classification problem?


This is my third day with 2 pregnant dwellers. I have everything for them to be born nothing has been moved around in my vault, I have space so there should be no problem for them to be born! Not sure if they will ever give birth and I wish I could kill them but they are too scared and run all over the place. Anyone have any ideas?

I am playing Fallout Shelter on my IPad. There were some women who have already gave birth, but two female dwellers are carrying their babies for about 18(!) hours. I know that this process takes three hours, so this is not normal. What do I do?


Math.pow() is returning an unexpected result for some inputs.  for ex - below is my code to find the nth root of m      public class FindRoot {     static int m,n;      public static void main(String[] args) {          findRoot(m,n);      }          private static void findRoot(int m, int n) {          double tempDouble = Math.pow(m, 1.0/n);          System.out.println(tempDouble);       }     }   Now, when i pass m = 9 & n = 2, it is giving expected result  i.e. 3.0 but if i pass m = 1000 & n = 3 then i am expected 10.0 but it is giving 9.999999999999998 i.e. unexpected result.

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


This issue was previously reported here: , but there is not a solution, the question is a year and a half old, and the issue is closed without higher rep.  Using 10.13.2.  Text selection stops and restarts when using a mouse wheel. This problem does not occur when using the trackpad.  The issue is not Logitech specific--I use a Kensington trackball and work and a Logitech trackball at home, and I have the same problem with both.  The posted select-scroll-shift-select solution works, but is frustrating.

I'm using a Logitech Performance MX mouse and since upgrading to Sierra I'm having difficulty when using my scroll wheel to select large amounts of text. Usually, I scroll while holding left mouse and this has always worked. Now when I scroll, it deselects the text that I have selected.  Could this be a driver issue?


If $P$ is a polynomial of degree at most $N$, we have $$\sum_{n=0}^{N+1}P(n)(-1)^n\binom{N+1}{n}=0$$  I tried using pascal's identity $\binom{N+1}{n}=\binom{N}{n}+\binom{N}{n-1}$. I think that differences of polynomials might work.

Question: For every polynomial $P(x)$ of degree at n we have $$\sum_{i=0}^{n+1}(-1)^i\binom{n+1}{i}P(i)=0$$  Well I was inducting on degree of the polynomial, for $n=0$ its true and I got a bit confused in the inductive step, actually I cant figure the inductive step.   Is this property (if true) a famous one?  Thank you for your help.


Similar to , I am trying to output a similar matrix with dotted line instead of dashed line.       Is there anyway to do this? I also try to use these three packages:  \usepackage{tabularx} \usepackage{longtable} \usepackage{arydshln}  I also like to learn how to implement this in \documentclass{revtex4}, in addition to using in \documentclass{article}. As far as we know that arydshln may not be compatible with revtex4 or revtex4-1 as far as I tried.   . And I add arydshln after the tabularx; but it cannot compile successfully, but only output errors. Could someone offer any hints or some resolutions?  The answer needs not to be complete. Thank you for your help!!!


I'm looking to evaluate whether the following is true or false:     For rotation of a rigid body  about an arbitrary axis, the angular   momentum always points along the axis of rotation.   Let:  $$r = x \hat i + y \hat j + z \hat k$$ and  $$ v = v_x \hat i + v_y \hat j + v_z \hat k$$  Then, the angular momentum is defined as:  $$\vec L = \vec r \times  m\vec v$$  $$r \times v = (yv_z-zv_y)\hat i - (xv_z-zv_x)\hat j + (xv_y-yv_x) \hat k$$  $$L = m \left((yv_z-zv_y)\hat i - (xv_z-zv_x)\hat j + (xv_y-yv_x) \hat k\right)$$  Here, $L$ is not along a principle axis, but has $3$ components. If the particles rotating exhibit $v_x,v_y$ or $v_z = 0$, it is plain to see $L$ is now on one principle axis. However, it isn't clear to me that if $L$ has $3$ components that it doesn't still point along the axis of rotation. Maybe the axis of rotation has $3$ components as well?   Basically, I think my confusion boils down to whether angular momentum's vector determines the axis of rotation (which I think would make sense since it's proportional to $\omega$) which would make the statement true, however, it doesn't seem impossible to me that the axis of rotation and angular momentum can not necessarily be parallel.

While studying rotational mechanics, I came across a section where it mentioned that angular momentum may not necessarily be parallel to angular velocity. My thoughts were as follows:  Angular momentum ($L$) has the relation $L=I\omega$ where $\omega$ is angular velocity and $I$ is the moment of inertia, so following this relation, it seems they should be in the same direction. Why are they not?


I'm moving an in-house application from RHEL6 to RHEL7 servers.  I read you should still be able to use  chkconfig and service commands to install start/stop scripts, even if they have now changed to systemd boot-up:     Although you can still use the service and chkconfig commands to   start/stop and enable/disable services, respectively, they are not   100% compatible with the RHEL 7 systemctl command ... (  )   I follow the RHEL6 procedure (chkconfig --add myscript; chkconfig myscript on) and get it working, so you can manually do:    sudo service myscript start   sudo service myscript stop   This works fine.  But what is not working is that the application should auto-start when you reboot the Linux-server. The start-script never gets invoked after reboot.  Is this one of the "incompatibilities" under RHEL7? Or is there a way to fix this, too?  Not able to figure this out.... we still have a mix of RHEL6 and RHEL7 servers, so would prefer if I can continue the chkconfig solution, for now.

I don't want to do the right thing by creating a new systemd script, I just want my old init script to work again now that I've upgraded my system to an OS that's using systemd.   I've briefly researched how to convert init scripts and how to write systemd scripts, but I'm sure learning it properly and doing it right would take me several hours.   The current situation is:  systemctl start solr Failed to start solr.service: Unit solr.service failed to load: No such file or directory.   And:  sudo service solr start Failed to start solr.service: Unit solr.service failed to load: No such file or directory.   Right now, I just want to get back to work. What's the path of least resistance to getting this working again?   Updates  I didn't want to figure this all out – I really didn't – but I have to and I've unearthed my first clue:  sudo systemctl enable solr Synchronizing state for solr.service with sysvinit using update-rc.d... Executing /usr/sbin/update-rc.d solr defaults insserv: warning: script 'K01solr' missing LSB tags and overrides insserv: warning: script 'solr' missing LSB tags and overrides Executing /usr/sbin/update-rc.d solr enable update-rc.d: error: solr Default-Start contains no runlevels, aborting.   The  says that:     LSB header dependency information matters. The SysV implementations on many distributions did not use the dependency information encoded in LSB init script headers, or used them only in very limited ways. Due to that they are often incorrect or incomplete. systemd however fully interprets these headers and follows them closely at runtime   I think that means my script won't work until that's fixed.  The script in question:  #!/bin/sh  # Prerequisites: # 1. Solr needs to be installed at /usr/local/solr/example # 2. daemon needs to be installed # 3. Script needs to be executed by root # 4. $INSTALL_ROOT must be set  # This script will launch Solr in a mode that will automatically respawn if it # crashes. Output will be sent to /var/log/solr/solr.log. A pid file will be # created in the standard location.  start () {     echo -n "Starting solr..."      # Reset ulimit or else get issues with too many open files (https://issues.apache.org/jira/browse/SOLR-4)     ulimit -n 10000      # start daemon     daemon --chdir='/usr/local/solr/example' --command "java -jar -server start.jar -DINSTALL_ROOT=$INSTALL_ROOT" --respawn --output=/var/log/solr/solr.log --name=solr --verbose      RETVAL=$?     if [ $RETVAL = 0 ]     then         echo "done."     else         echo "failed. See error code for more information."     fi     return $RETVAL }  stop () {     # stop daemon     echo -n "Stopping solr..."      daemon --stop --name=solr  --verbose     RETVAL=$?      if [ $RETVAL = 0 ]     then         echo "done."     else         echo "failed. See error code for more information."     fi     return $RETVAL }   restart () {     daemon --restart --name=solr  --verbose }   status () {     # report on the status of the daemon     daemon --running --verbose --name=solr     return $? }   case "$1" in     start)         start     ;;     status)         status     ;;     stop)         stop     ;;     restart)         stop         sleep 15         start     ;;     *)         echo $"Usage: solr {start|status|stop|restart}"         exit 3     ;; esac  exit $RETVAL


How can one, if possible, cite the title of a bibtex item on Latex using the package apacite?

How do I print any field from a .bib file?  For example how do I print the title from the following entry?   @article{Gerace2019, Author = {Gerace, Dario and Laussy, Fabrice and Sanvitto, Daniele}, Journal = {Nature Materials}, Number = {3}, Pages = {200--201}, Title = {Quantum nonlinearities at the single-particle level}, Volume = {18}, Year = {2019} }   I want to do something like:  The title of the paper \cite{Gerace2019} is \printtitle{Gerace2019}


Here is my passage, more or less:  Dick and Jane leapt from the boat into the icy waters of the North Pacific. Had they not leaped, they would not have been eaten by sharks as the rescue helicopter was just minutes away.  Leaped or leapt? Had leaped or had leapt? Has leaped sounds better to me than has leapt, right?

, I'd like to know what example sentences distinguish the meaning of the words lept, leapt, and leaped from each other?


I have been given a problem as part of a practice set for a problem solving class. Here, I am asked to prove the following equality (for positive integers $m$ and $n$):  $\sum_{k=0}^{n}(-1)^k\binom{n}{k}\frac{1}{k+m+1}=\sum_{k=0}^{m}(-1)^k\binom{m}{k}\frac{1}{k+n+1}$  I have tried to form a counting argument,though that doesn't seem to be working too well. The theme of these problems is that they can be re-written as simpler problems, although I am just not sure how to do that here.   Some other things I tried include rewriting each sum as the difference of two other sums (ie putting the positive elements into one sum and the negatives into another) but that doesn't seem to simplify it at all...  Any help is much appreciated

If $\displaystyle S=\sum^{n}_{k=0}(-1)^k\frac{1}{k+m+1}\binom{n}{k}$ and f $\displaystyle T=\sum^{m}_{k=0}(-1)^k\frac{1}{k+n+1}\binom{m}{k}$.Then $S-T$ is   Try:$$S=\sum^{n}_{k=0}(-1)^k\int^{1}_{0}x^{k+n}\binom{n}{k}dx=\int^{1}_{0}x^n\sum^{n}_{k=0}(-x)^k\binom{n}{k}dx$$  Could some help me, thanks


My mother in law forgot her original PAN Card. She has a photocopy of the same. Can she fly in domestic airline with this Photocopy of PAN Card? She has her flight tomorrow i.e. on 5 April from Ahmedabad to Pune. She is from Jalgaon.

My friend has booked tickets for vacation in India (domestic travel), but realized that his wife doesn't have any photo ID.  Will any of the following documents work for his wife?   Marriage certificate Nationalized bank's passbook ()   Their travel date is next week, so there is less time to apply for any photo ID like PAN card/Passport.


I have been trying for several days to prove the equality of the title, but without any positive results. I know I have to first prove that if m divides n (it has to be multiple of m) then $p^{m}-1$ divide $p^{n}-1$.   That is the one that I have been able to demonstrate knowing that there is a quotient for this division that has zero rest and is the following: $\sum_{i=1}^{\alpha}(p^{(\alpha-i)\times m})$.  Someone could help me relate it to the title and get the proof.  Thanks.

How to prove $x^a-1\mid x^b-1 \iff a \mid b$, where $x \ge 2$ and $a,b,x \in \Bbb Z$.  I've tried the following in attempting to solve this:  $$a\mid b \Rightarrow aq=b \Rightarrow x^{aq}=x^b \Rightarrow x^ax^q=x^b$$  Because $x^q \in \Bbb Z$, it follows that $x^a\mid x^b$.  This is as far as I have gotten; any help getting further is appreciated.  Note: It may be that this identity is not true at all?


When I add multiple rep widgets, only last added is clickable (edx in my case, if I add another, edx become unclickable and the newly added is the only clickable rep widget).    Is it a bug?

I have 4 copies of the Hot Questions widgets.  Sometimes, possibly after they reload on their own, I can only tap to open the last widget I added. If I tap on the question of any others nothing happens.  If I refresh each one then tapping works on the one I refreshed.


I already have the points I need, I just need to figure out how to create a nurbs curve that uses those points (I know there are answers around, but I am hoping that since those answers are from over 5 years ago that there might be easier / cleaner methods)

I'm trying to write a script which creates a Nurbs path curve, bevels it, and then stores the location of each vertex/point in that curve. I've been writing it based on the code displayed in the info panel, but it doesn't show what the vertices are supposed to be called - so I can't refer to them in the script.  Update: After following Ratt's links, I modified  for Nurbs Path and am now stuck again, though it's still progress. Below is one version I tried out, but the error message says that Curve has no attribute path_points. Of course it doesn't, because I made that up because I don't know what the Nurbs Path equivalent for bezier_points is.  import bpy import random  def pathPointLoc(cu, typ, points):      for (n) in enumerate(points):         nurb = cu.path_points[n]         print(nurb.location)      return  cu = bpy.data.curves.new("MyCurve", "CURVE") ob = bpy.data.objects.new("MyCurveObject", cu) scn = bpy.context.scene scn.objects.link(ob) scn.objects.active = ob  cu.bevel_object = bpy.data.objects["BezierCircle"] cu.taper_object = bpy.data.objects["BezierCircle"]  pathPointLoc(cu, "NURBS", [(0,0,0,1), (0,0,1,random.randint(1,4)), (0,1,1,1), (1,4,1,1)] )


so I have a few buttons and because I don't want to code the same thing for each button I was trying to make a dynamic event handler that could manage all the buttons based on the .selected-pack class but all the $(this) attributes are coming back undefined although there is a value.  This is the js:  //Function In Test!  $('.selected-pack').click(function(event) {      if($("#mainconsole").val() == "") {         alert("Select Your Console!")         return;     }       if($("#paymentmethod").val() == "") {         alert("Select Your Preferred Payment Method!")         return;     }       $("#selectConsolediv").fadeOut("medium", function() {                     $("#choosePlatformLI").removeClass("active");            var packipn = $(this).attr('data-ipn');         var packipnpp = $(this).attr('data-ipnpp');         var packname = $(this).attr('data-name');         var packprice = "";                      console.log(packname);         if ($("#mainconsole").val() == "PS"){            packprice = $(this).attr('data-psprice');         }          if ($("#mainconsole").val() == "XBOX") {            packprice = $(this).attr('data-xbprice');         }           // Skrill         $("#mainamount").val(packprice);         $("#mainipn").val(packipn);         $("#maindesc").val(packname);         $("#maindiscount").val($("#discount1").val());           // PayPal         $("#mainamountpp").val(packprice);         $("#mainipnpp").val(packipnpp);         $("#ppitemname").val(packname);         $("#maindiscountpp").val($("#discount1").val());           $("#checkoutPackName").text(packname);         $("#checkoutCode").text($("#discount1").val());         $("#checkoutPrice").text("£" + packprice);                      $("#checkoutdiv").fadeIn("medium", function() {                         $("#checkoutLI").addClass("active");                     });      });  });   Do any of you spot an error? Please give me a comment as soon as possible, thanks in advance :)

In JavaScript, the "this" operator can refer to different things under different scenarios.   Typically in a method within a JavaScript "object", it refers to the current object.  But when used as a callback, it becomes a reference to the calling object.  I have found that this causes problems in code, because if you use a method within a JavaScript "object" as a callback function you can't tell whether "this" refers to the current "object" or whether "this" refers to the calling object.  Can someone clarify usage and best practices regarding how to get around this problem?     function TestObject() {             TestObject.prototype.firstMethod = function(){                       this.callback();                       YAHOO.util.Connect.asyncRequest(method, uri, callBack);              }              TestObject.prototype.callBack = function(o){               // do something with "this"               //when method is called directly, "this" resolves to the current object               //when invoked by the asyncRequest callback, "this" is not the current object               //what design patterns can make this consistent?               this.secondMethod();             }             TestObject.prototype.secondMethod = function() {              alert('test');             }         }


I don't know whether this has been raised before, but I can't find a question on it so I'm raising it here.  I think there should least be a configurable option to change the behavior of the Stack Exchange inbox.  I like that I'm told that I have (say) 4 new 'notifications' waiting for me, but I have 2 issues with the behavior.   When I click on the Stack Exchange dropdown and go to inbox, those 4 new 'notifications' are not highlighted.  Am I just to assume that the 4 most recent are the new ones?  It would be very convenient if they were highlighted. When I click on one of the links and go to a reply or something, suddenly my 'new notifications' drops to zero.  I only visited one of the notifications... I still want to know what the other 3 were!  Argh.  Could we have it so that the new ones are highlighted, and when I click one, it becomes un-highlighted, but doesn't mark all new notifications as if they had been read?

Currently, when receiving notifications in the inbox, you get a number in the top bar on the inbox button. But when you open the inbox that number is gone and everything is marked as read. I don't think this is good behaviour.  I would suggest that only the messages that were clicked are marked as read and the number simply decrements. This would make it easier to follow-up on them. Also there can be buttons for marking individual messages as read, marking them as unread too, and a big button to "mark all as read".  A humble attempt at propagating my suggestion into a design:        I had to fake one of my notifications being unread and sorry, it's badly done. Notice the "mark all as read" conveniently placed in the top right. Notice to the bottom left of each notification the individual mark as read button, in the shape of a bold checkmark for "unread" and a lighter one for "read". This could also be an o for read and a ● for unread or anything else that the designers see fit.  Question history about this here   was already asked here but this was declined simply because it asked for a setting and SO doesn't do preferences. I'm asking to modify the default behaviour.  Then there's  but the so-called duplicate is not a duplicate at all. Also this was before the entire top bar was re-done and it was still the Stack Exchange MultiCollider SuperDropdown thing.  Related (other people want this):


Given $$\alpha : I \rightarrow \mathbb R^2,  \  \ \ \alpha(t)=(\alpha_1(t),\alpha_2(t)) \text.$$ It is a regular space and also homomorphic and $\alpha_2(t)>0$ for all $t \in I$. Let $S$ be the surface in $x$-$y$-$z$-space provided by the rotating the curve $$\{(x ,y ,0 ) \mid x =\alpha_1(t) ,\ y=\alpha_2(t),\ t\in I \}$$ around the $x$-axis. How can I prove that $S$ is a regular surface? All these symbols just got me confused. If you help me to solve this I would very much appreciate it.

I am reading  by Bjørn Jahren, and have some questions about exercise 5.1.4, which says the following:     Let $\alpha(u)=(f(u),g(u)),u\in[a,b]$ be an embedded curve in the $xz$-plane such that $f (u) > 0$ for all $u$. Find a parametrization of the surface of rotation obtained by rotating $\alpha$ around the $z$–axis and find conditions for this to be a regular surface.      Discuss what happens if we remove the condition $f (u) > 0$.   A regular surface is defined by the following:     Definition 5.1.3. Let $S$ be a subset of $\mathbb{R}^3$ which is also a smooth surface, and let $\iota: S \to\mathbb{R}^3$ be the inclusion map. $S$ is called a regular surface if for every local parametrization $x$ of $S$ the Jacobian of the composition $\iota\circ x$ has rank 2 at every point.   A parametrization of this surface is given by $(u,t)\mapsto(f(u)\cos(t),f(u)\sin(t),g(u))$. By the definition of regular surfaces, we need the Jacobian of this parametrizationto be of rank 2. The Jacobian has the columns $(f'(u)\cos(t),f'(u)\sin(t),g'(u))$ and $(-f(u)\sin(t),f(u)\cos(t),0)$. If $g'(u)\neq0$ they are linearly independent if and only if $f(u)\neq 0$, since $\sin$ and $\cos$ are not 0 in the same point. If $g'(u)=0$ linear independence is equivalent to the matrix   $\begin{bmatrix} f'(u)\cos(t) & -f(u)\sin(t)\\ f'(u)\sin(t) & f(u)\cos(t) \end{bmatrix}$  having nonzero determinant, i.e. that $f(u)f'(u)\neq 0$. To conclude, the Jacobian has rank 2 if and only if $g'(u)\neq0\land f(u)\neq0$ or $f(u)\neq0\land f'(u)\neq 0$. Under the condition $f(u)>0$, that is if and only if $\alpha'(u)\neq 0$.  Where do I go from here? I have found conditions given one specific parametrization, but I need to show it for all possible parametrizations. How do I generalize the result? ((EDIT: Maybe this suffices, since I can create an atlas with just this parametrization, by varying the domain?)) What about the points $a$ and $b$ are mapped to? Can I find a parametrization from an open subset of $\mathbb{R}^2$ around these? And what happens if we remove the condition $f(u)>0$, how should I attack that?  Here is a handwritten (i.e. not so readable) and brief solution which may be of some use:  (Available .)


For instance, "A politician must be able to think quickly on the spot. He or she must also have no qualms about lying."  I know some people who use "they", but as that both sounds and is ungrammatical, I'm wondering if there is any other concise and non-awkward alternative.  Edit:  Apparently many do consider "they" as correct. This surprised me, because I know someone who actually wrote a grammar book, who told me in no uncertain terms that "they" could not be used (in fact, I'd asked them - ha! - this question before I posted it here). And a quick look online found legitimate sources advocating both positions. I suppose it's one of those issues, such as whether the previous sentence was incorrect for beginning with a conjunction, where it really just depends who you ask. Regardless, to me personally, "they" in the above example sounds clunky at best and incorrect at worst. So I suppose my question can be rephrased as, 'is there any alternative to 'he or she', other than 'they'?"  Secondly, to whoever tagged this as "politically-correct": acknowledging the existence of genderqueer or transgender people isn't a political issue at all, until those made uncomfortable by people unlike them make it one. Trying to avoid excluding and thus unconsciously discriminating against a group of people in your writing isn't born out of a need to be 'politically correct' - it's born out of basic human decency.  Finally, yes, in the example above, I could use a comma and avoid the need for a pronoun at all - but the question I'm asking applies to instances where one may not want to do so (i.e. the sentences are long and stringy enough as it is).

I recently had somebody tell me that a mutual friend of ours who is  prefers that people refer to him/her using the gender-indefinite pronoun they.   In some cases, this almost seems okay:   Kris left their umbrella at our house.  On the other hand, if Kris is sitting right next to you, it feels very odd to say       They (meaning just Kris) would like more cake.   Or even odder,      Kris would like some more cake, can you please pass it to they/them?"   Are these usages grammatically correct? Are they in the process of becoming grammatically correct? Are there more correct alternatives?


I have tagged many questions as favourite. But I did not find any option to access those questions from Android app. Is there any way to get this?

I haven't been able to find my favorite questions in the official Stack Exchange Android app.  Looking at my accounts page gives nothing on them.


I have these files:  pi_utilities.h      #ifndef UTILITIES_H_ #define UTILITIES_H_  #include <set> #include <vector>  typedef unsigned short int MYTYPE2;  namespace pi {    class dfa; }  using namespace std;  struct ir_statistical_measures {     // True positive, and so on.     int tp = 0;     int tn = 0;     int fp = 0;     int fn = 0;      int dim_positive=0;      int dim_negative=0;       double accuracy  = 0; //(number in [0 1])     double precision = 0;     double recall = 0;     double f_measure = 0;     double matthews = 0;     double specificity = 0; //this is recall- or true negative rate     double bcr = 0; };   void compute_ir_stats(const pi::dfa* dfa1 ,const pi::dfa* target,const set<vector<MYTYPE2>> &test_set,ir_statistical_measures &stats); #endif   pi_utilities.cpp   #include "pi_utilities.h"  void compute_ir_stats(const pi::dfa* dfa1 ,const pi::dfa* target,const set<vector<MYTYPE2>> &test_set,ir_statistical_measures &stats) {    bool result;    result = dfa1->mq(true);    result = target->mq(false); }   pi_dfa.h      #ifndef DFA_H_ #define DFA_H_  #include <string> #include <vector> #include <set>  #include "pi_utilities.h"  typedef unsigned short int MYTYPE;  using namespace std;  extern struct ir_statistical_measures &stats; //I say to compiler that definition isn't here  namespace pi {    class dfa    {         public:         bool compare_dfa(const dfa *dfa_to_compare,string method,ir_statistical_measures &stats1,ir_statistical_measures &stats2) const;          bool m_q(bool flag) const;      }; } #endif   pi_dfa.cpp  #include "pi_dfa.h"    bool pi::dfa::compare_dfa(const dfa *dfa_to_compare , string method , ir_statistical_measures &stats1 , ir_statistical_measures &stats2) const {    set<vector<MYTYPE>> test_set;    compute_ir_stats(dfa_to_compare,this,test_set,stats1);      return true; }  bool pi::dfa::m_q(bool flag) const {    return flag; }   main.cpp  #include "pi_dfa.h" #include "pi_utilities.h"  int main() {    pi::dfa* L_dfa=NULL;      L_dfa = new pi::dfa();    pi::dfa* O_dfa=new pi::dfa();     bool value_return;    struct ir_statistical_measures test_set_ir_statistical_measures; //struct defined in pi_utilities.h    struct ir_statistical_measures test_set_ir_statistical_measures2;    value_return = L_dfa->compare_dfa(O_dfa,"method",test_set_ir_statistical_measures,test_set_ir_statistical_measures2); }   There is a circular dependency problem. To resolve I used forward declaration, but with the pointer of the class dfa I have to call a function of the class too, thus the definition there isn't and the compiler goes into trouble, I get these compile errors:      pi_utilities.cpp: In function ‘void compute_ir_stats(const pi::dfa*, const pi::dfa*, const std::set<std::vector<short unsigned int> >&, ir_statistical_measures&)’: pi_utilities.cpp:6:17: error: invalid use of incomplete type ‘const class pi::dfa’     result = dfa1->mq(true);                  ^ In file included from pi_utilities.cpp:1:0: pi_utilities.h:11:10: error: forward declaration of ‘const class pi::dfa’     class dfa;           ^ pi_utilities.cpp:7:19: error: invalid use of incomplete type ‘const class pi::dfa’     result = target->mq(false);                    ^ In file included from pi_utilities.cpp:1:0: pi_utilities.h:11:10: error: forward declaration of ‘const class pi::dfa’     class dfa;   Thus forward declaration isn't enough. How could I fix it?  I'm using C++11 (The code here is rearranged to a minimal executable version)

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


For our research paper, our group plans to administer a sex inventory to students from two different schools which classifies them as sex-typed (meaning if you're male, you turn out masculine), sex-reversed (if you're male, you get classified as feminine), or androgynous.  Once they're classified, we plan to represent the number of people who are sex-typed, sex-reversed, and androgynous as percentages with respect to the sample size. Is it okay to use independent t-test to compare the percentages between the two schools?

When testing the difference between 2 proportions why do we use a z-test rather than a t-test?    Further, is there a simple way to conduct an omnibus test for significant differences between more than 2 proportions (in the form of percentages). Is there an equivalent to a one-way ANOVA for this?  I imagine that you could use logistic regression (assuming you have the original data for the proportions in the form of 0s and 1s) Are there other options?


I am trying to explain to someone why the following quote should use "I am" rather than "I'm":     I don't care how old I'm, I still like [media]   I feel that I am correct, but cannot recall the rule.

I heard this lyric in a song the other day and it just sounded so wrong that I assumed it must be incorrect grammar, but I can't find any specific prohibition that applies.     That's what it's.    That rolls off your tongue with the grace of a moose in a tutu, but I can't figure out why.  There is clearly no problem with ending other sentences with a contraction. These sound fine.     I thought I could, but I can't.   Stop touching that, it will fall off if you don't.   You say that the sky is green, but it isn't.   Also, it sounds just fine if you remove the contraction:     That's what it is.   So what's up with this construction? Should it be avoided?


The following JS code behaves oddly:  var c = 0; var a = 0; myTest(8, 5);  function myTest(a,b) {     console.log(a);     a++;     c++;     console.log(a);     return a; }  console.log(a); console.log(c);     If I take the "a" parameter out of the function, "a" increments by 1 and the third console log returns "a" as 1. Totally normal. But if I keep the "a" as a parameter in myTest function (as in the code above), it gets a value of 8, increments by 1 to 9, and the third console log returns a zero.  What is the explanation for this weird behavior? I am sorry if this is explained in another thread; I am too new for JS to produce really good google queries or understand advanced answers.

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


Show that $n$ does not divide $2^n - 1$ where $n$ is an integer greater than $1$?  Clearly $2^n - 1$ is an odd integer, therefore, let $n$ be an odd integer and it divides $2^n - 1$. We can write $2^n - 1 = (2-1)(2^{n-1} + \cdots \cdots + 1) = (2^{n-1} + \cdots \cdots + 1)$ From here on I don't know how to proceed?

Here is a problem which i have not been able to do for quite sometime.   For $n \geq 2$, show that $n \nmid 2^{n}-1$.   I have thought of proving this in two ways: One by using induction which didn't actually work. Next by Fermat's little theorem we have $2^{p-1} \equiv 1 \ (\text{mod} \ p)$, which actually says that for $p \mid 2^{p}-2$. But i couldn't proceed more than this. Any ideas by which i can actually solve the problem?


I'm trying to implement a typed vector class that can either have arbitrary number of Int or Double coordinates  There is an abstract method add, that should add two coordinates. This is implemented in derived class for Double as def add(a: Double, b:Double) = a + b  The test I'm running is val v1 = Vect(2.5, 2.3) val v2 = Vect(1.4, 5.6)  println(v1) println(v2) val v3 = v1 + v2 println(v1) println(v2) println(v3)  prints Vect[ArrayBuffer(2.5, 2.3)] Vect[ArrayBuffer(1.4, 5.6)] Vect[ArrayBuffer(2.5, 2.3)] Vect[ArrayBuffer(1.4, 5.6)] Vect[ArrayBuffer(3.9, 7.8999999999999995)]  I wonder why 2.3 and 5.6 adds up to 7.8999999999999995.

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


Each time the user clicks the 'add pizza' button, I would like the page to produce another pizza form and add any costs of the additional pizza. I have been able to add a pizza form, but none of the adding up rules are being applied to the cloned element. Any ideas?  HTML:
         <fieldset>             <form class="pure-form">             <legend>Pizza</legend>             Pizza Type: &nbsp;             <select id="pizza">                 <option name="margarita">Margarita</option>                 <option name="deep-pan">Deep Pan</option>                 <option name="stuffed-crust">Stuffed Crust</option>             </select>                                  Pizza Size: &nbsp;                 <select id="pizzaSize">                     <option name="e-small" id="4.99">Extra Small - £4.99</option>                     <option name="small" id="5.99">Small - £5.99</option>                     <option name="medium" id="6.99">Medium - £6.99</option>                     <option name="large" id="8.99">Large - £8.99</option>                     <option name="e-large" id="9.99">Extra Large - £9.99</option>                     <option name="f-size" id="10.99">Family Size - £10.99</option>                 </select>                              </form>         </fieldset>         <fieldset style = "border-top:0px">         <form class="pure-form">             <legend>Toppings (99p Each): &nbsp;</legend>             <input type="checkbox" name="onions" id="0.99">Onions</input>             <input type="checkbox" name="mushrooms" id="0.99">Mushrooms</input>             <input type="checkbox" name="peppers" id="0.99">Peppers</input>             <input type="checkbox" name="olives" id="0.99">Olives</input>             <input type="checkbox" name="garlic" id="0.99">Garlic</input>             <input type="checkbox" name="peperoni" id="0.99">Peperoni</input>             <input type="checkbox" name="cheese" id="0.99">Pesto</input>         </form>         </fieldset>

     <button id="addPizza"> Add Pizza </button>   JavaScript:  var pizzaCost = 0.00; var toppingCost = 0.00; var sideCost = 0.00; var drinkCost= 0.00; var desertCost = 0.00; var desertSizeCost = 0.00; var drinkSizeCost = 0.00; var sideSizeCost = 0.00;  $("#pizzaSize").prop('disabled', true);  $("#pizza").change(function() {     $("#pizzaSize").prop('disabled', false); })  $( "#pizzaSize" ).change(function() {     $("input[type='checkbox']").prop('disabled', false);     var selectionPrice = $('option:selected', this).attr('id');     var selectionInt = parseFloat(selectionPrice, 10);     pizzaCost = selectionInt;     calculateCost(pizzaCost, toppingCost, sideCost, drinkCost, desertCost, desertSizeCost, drinkSizeCost, sideSizeCost); });  $('input[type=checkbox]').change(function(){     var checked = $(":checkbox:checked").length;     toppingCost = 0.99 * checked;     calculateCost(pizzaCost, toppingCost, sideCost, drinkCost, desertCost, desertSizeCost, drinkSizeCost, sideSizeCost); });  function calculateCost(pizzaCost, toppingCost, sideCost, drinkCost, desertCost, desertSizeCost, drinkSizeCost, sideSizeCost) {     var total = pizzaCost + toppingCost + sideCost + drinkCost + desertCost + desertSizeCost + drinkSizeCost + sideSizeCost;     $("#totalPrice").text(total.toFixed(2)); }  $( "#addPizza" ).click(function() {   $("#pizzaForm").clone().appendTo("#extraPizza"); });

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.


This is what I want:    This is what I have:    Here is my code:  <!DOCTYPE HTML>   <meta charset="utf-8"> <title>Index</title> <meta name="viewport" content="width=device-width, initial-scale=1.0">

Content

                       CSS  .ul{ display: table; margin: 0 auto; list-style: none; }  .li{ font-weight: bold; font-size: 50px; }  img{ width: 200px; }   I've tried vertical align middle but it didn't do anything then I tried to center it with margins but it  didn't work out as I wanted and I also tried flex and absolute position.

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


I asked many people those questions and everybody can calculate the eigenvector and eigenvalue of a given example, but if I ask those people what does it mean I always see frozen faces and and get an ehhhh. So, I'd be happy if someone can give me response for those questions and doesn't ask me if I've already asked Google or Wikipedia. By the way, I've seen that this question was asked in a similar way, but isn't there a short explanation for that ?

What is the importance of eigenvalues/eigenvectors?


I stayed for two months from March 10th to April 27 (almost 2 months). Would the remaining month I didn't use still be available for me if I were to return in July?

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


I know the usual trick: let $c=(1-ab)^{-1}$ and notice that:  $$(1-ba)(bca) = bca - babca = b(c-abc)a=bc(1-ab)a=ba$$  Etc.  I was wondering how to discover this fact from scratch, without invoking this magical observation. Any help in that?

Let $a,b,c,x$ be elements of a unital non-commutative ring. Assume $c$ is an inverse of $1-ab$: $$ c(1-ab) = 1$$  How can I find an inverse for $1-ba$? What I tried:   Denote the unknown by $x$. Then $x (1-ba) = 1 = x - xba$. I tried to replace $1$ with $c(1-ab)$ but it didn't help because I cannot solve for $x$. I also tried to subtract $x (1-ba) $ from $ c(1-ab)$ but couldn't solve for $x$ either. Any suggestions?


Is the following statement true or false:  If $G$ is a group with the property that $g=g^{-1}$ for all $g \in G$, then $G$ is abelian.   I believe it is false since I know that abelian or commutative property implies that every element in $G$ must have an inverse. Thus $g\cdot g^{-1}= g^{1}\cdot g = e$. I need someone to check my attempt.

Prove that if $g^2=e$ for all $g$ in $G$ then $G$ is Abelian.   This question is from group theory in Abstract Algebra and no matter how many times my lecturer teaches it for some reason I can't seem to crack it.   (Please note that $e$ in the question is the group's identity.)  Here's my attempt though...  First I understand Abelian means that if $g_1$ and $g_2$ are elements of a group $G$ then they are Abelian if $g_1g_2=g_2g_1$...  So, I begin by trying to play around with the elements of the group based on their definition...  $$(g_2g_1)^r=e$$  $$(g_2g_1g_2g_2^{-1})^r=e$$ $$(g_2g_1g_2g_2^{-1}g_2g_1g_2g_2^{-1}...g_2g_1g_2g_2^{-1})=e$$  I assume that the $g_2^{-1}$'s and the $g_2$'s cancel out so that we end up with something like,  $$g_2(g_1g_2)^rg_2^{-1}=e$$ $$g_2^{-1}g_2(g_1g_2)^r=g_2^{-1}g_2$$  Then ultimately...  $$g_1g_2=e$$  I figure this is the answer. But I'm not totally sure. I always feel like I do too much in the pursuit of an answer when there's a simpler way.  Reference: Fraleigh p. 49 Question 4.38 in A First Course in Abstract Algebra.


I'm studying for my Platform Dev I exam, and I've been reading about interfaces. I understand how they work in abstraction, but what I don't understand is why you would use them. The documentation says they "provide a layer of abstraction to your code," but that doesn't really tell me anything. If you have to define all of the methods in your implementing class anyway, how does an interface make your code any cleaner?  Thanks for your help!

So I believe that I have a real world use case for an object model that uses abstract classes and interface. I do however have a few questions about the best way to go about it:  Interface  public interface iLove{    String pet(); }   Abstract  public abstract class Animal{    public string animalName {get;set;}    public boolean happy {get;set;}     public virtual boolean isHappy(); }   Class  public class cat extends Animal implements iLove{    public cat(String nm){      animalName = nm;   }    public string pet(){     system.debug(animalName);             happy = true;     return 'prrrrrrr';   }    public override boolean isHappy(){     return happy == null ? false : happy;   }  }   So, if I instantiate like this:  Animal a = New Cat('Fred');   I do not have access to the method pet() since Animal does not implement pet  Doing this:  iLove i = (iLove)a;   I can now can execute pet()  However, if I instantiate like so:  iLove i = New cat('Fred');   Executing pet() debugs the animalName and there is no access to isHappy() or animalName directly  Now, the goal is to have many Animals that have a common definition (Animal) that may have different interfaces. for this example each one implements their own pet method, Dog - Bark, Lion - Roar, etc.  Is there a better way to handle all of this where I would not have to Instantiate Animal and then cast to iLove  Goal would be one line for instantiation where I would have access to the properties in Animal as well as the methods of the interface without having to do  Cat c = New Cat('Fred');   As obviously that would work but then it cuts out the whole point of the interface....  Is the casting of the SuperClass to the Interface the way to go about it?  Should I just define the abstract methods in the abstract class. If so what is the point of the Interface. I would suspect in this case it may not be needed but could be used if other classes which to interact with the cat without having to worry about the Animal class.  Thoughts?  Putting the interface on the Animal class has similar effects...


We will be travelling to Croatia in October with a limited time and are trying to figure out if it is possible to go from Split to Hvar and on to Korčula (seems like ferry still runs). Cannot seem to get from  Korčula to Dubrovnik without back tracking to Split.  Am I missing something?

I am flying in to Dubrovnik on 1st Oct and need to get to accommodation in Korcula.  It seems like all the ferries stop at the end of September.  How can I get there? I would prefer to take a couple of ferries rather than sitting on a bus for long periods!


The chart at the edge is showing me a mouseover popup with more rep than I actually have. Alt-Print Scrn didn't catch the mouse pointer, so I drew in one by hand. I presume this affects all Stack Exchange sites.

I have notice two issues with the reputation graph: 1: This user has a higher score on the graph than in reality I happened to notice  where the user's graph reputation does not match their actual reputation.  The person in question was hit by a -100 penalty for an offensive answer a while back, but the graph doesn't reflect that.  I thought it just didn't update when I noticed this at the time, but the person has since gained and lost reputation and at all times the graph was +100 of their actual reputation.  It seems, based on Shadow Wizard's comment that this is because the reputation change is non-public. OK, fair enough... , which was marked as , noticed a similar phenomenon for placed DVs.  This prompted me to examine graphs more carefully.  It seems that this hidden -1 has been updated, as I checked several users and did not find any others that had lower actual reputation than graph reputation, so .  (Since the number of DVs placed is public, I can be reasonable sure that these users have placed -1 rep DVs, although strictly speaking they could be 100% question DVs.) 2: Some users have a lower score on the graph than in reality I did, however, find many users where the graph says their reputation is much lower than it actually is.  Perhaps that is from deleted downvotes turning into hidden +1s, but those should be balanced by hidden -1s, so its not clear what happened.  Seems there is some error in the logic - maybe the -1s do affect the graph now as per the , but the corresponding +1s don't?  Whatever the case, I can't imagine it is intentional. Edit: I went back to find some examples today & didn't find any.  I think the issue has been resolved - either it was a caching issue or a change was made to the code after this post.


I recently purchased an iPhone 4S from Craigslist that had been reset when I bought it.  When I try to activate the phone with the Apple ID that the previous owner gave me I receive an error saying that the account provided couldn't be used to unlock the device.  I know that it needs to be associated with the correct account but how do I even tell what account the phone was activated with originally?  The only thing I can see on the activate phone screen is the following:     This iPhoneis currently linked to an Apple ID (xxxxx@gmail.com).  Sign in with the Apple ID that was used to set up this iPhone.   Is there a way to show or reveal the Apple ID that is associated with the account?  At the very least I want to contact the original owner to see if it was stolen from them but I can't even do that.  Very frustrating.

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


While bound to their mortal bodies, the Istari, though Maia, are susceptible to the same flaws and weaknesses that they are otherwise not - hunger, fatigue, even the temptation of the Ring. Ageing is not an exception. So, if the Istari do age, if ever so slowly, then how old did they look when they arrived, two thousand years before the War of the Ring, relative to an ordinary Man?

Gandalf (as with all the Istari) did not have a corporeal form before coming to Middle-earth and was essentially ageless. We also know that Gandalf did age, albeit very slowly, while on Middle Earth. By the end of the Third Age (before battling Durin's Bane), he had the appearance of an old human male (non-Númenórean, etc) in his 70's or 80's. This leads me to wonder:  Is there any indication in Tolkien's writings that describes Gandalf's appearance (in human-looking years) when he arrived in Middle Earth? In other words, was Gandalf the Grey originally "Gandalf the Tall Dark & Handsome in his 20's"?  I'm not talking about his actual age, but rather his appearance in human years.


For some reason whenever I test this, the IDE throws a NullPointerException at line 46 (the for loop that check the array for a name). It seems to work, since it fetches the name and returns it, but then immediately follows with the exception. Can anyone explain? Thanks!  import java.util.*; class PhoneNumbers {  private String name; private String number;  PhoneNumbers(String n, String numb) {     this.name = n;     this.number = numb; }  public String getName() {     return name; }  public String getNumber() {     return number; }  public static void main(String[] args) {     Scanner sc = new Scanner(System.in);     boolean repeat = true;     int count = 11;     PhoneNumbers[] contacts = new PhoneNumbers[30];      contacts[0] = new PhoneNumbers("Gina", "(847) 342-0912");     contacts[1] = new PhoneNumbers("Marcia", "(847) 341-2392");     contacts[2] = new PhoneNumbers("Rita", "(847) 354-0654");     contacts[3] = new PhoneNumbers("Jennifer", "(414) 234-0912");     contacts[4] = new PhoneNumbers("Fred", "(414) 435-0434");     contacts[5] = new PhoneNumbers("Neil", "(608) 123-0914");     contacts[6] = new PhoneNumbers("Judy", "(608) 123-0312");     contacts[7] = new PhoneNumbers("Arlene", "(608) 123-0312");     contacts[9] = new PhoneNumbers("LaWanda", "(920) 787-9813");     contacts[10] = new PhoneNumbers("Deepak", "(930) 412-0991");      while (repeat) {         boolean found = false;          System.out.print("Enter your friends name: ");         String nameInput = sc.nextLine();           if (!nameInput.equalsIgnoreCase("quit")){               for(int i = 0; i < count - 1; i++){                     if (contacts[i].getName().equalsIgnoreCase(nameInput)) {<---Here's where the issue occurs***                         found = true;                         System.out.println(contacts[i].getName() + "'s number is " + contacts[i].getNumber());                 }              }              if (!found){                  System.out.println("Enter your friends phone number: ");                  String num = sc.nextLine();                   contacts[count + 1] = new PhoneNumbers(nameInput, num);                  count++;              }          }else if (nameInput.equalsIgnoreCase("quit")) {             repeat = false;         }else if (count == 30){              repeat = false;              }         }     } }

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


I have appended Open in Terminal to my right-click context menu which by default, opens up a terminal window at the selected location. I would like to replace the default terminal window with Terminator.   This is linux, I know it's achievable so I'd rather ask, How is this achieved?

The nautilus-open-terminal package adds a menu/right-click option to open a terminal in the current directory.  I want to change this from opening gnome-terminal to opening terminator. , however these instructions do not appear to be valid any more, and I can't find any place in the system settings where the default emulator can be changed.  I also tried:  $ sudo update-alternatives --config x-terminal-emulator   choosing  * 0            /usr/bin/terminator               50        auto mode   But this does not appear to have any effect. Any idea how I can get this to work?


It means "to write literary works, knowing that they will not pass censorship and be published". I am looking for some English equivalents that can be used to describe not only writing but also doing different things like taking photos for example for oneself and refusing to publish them. Thank you very much in advance      Let's just find an equivalent for "doing things for yourself and not caring whether it will be published or not". A good example is Kafka most of whose books were published after his death

There is following idiom in Russian "to write into the drawer" which is being used to describe situation when writer or scientist writes (sometimes prolifically) without publishing anything. Are there direct equivalent or some other idiom/expression which conveys the same idea in English?


I have a Mid 2012 Model Macbook Pro, nearly 3 years old, and my computer has recently become extremely, stupidly slow. It's becoming hard to perform simple tasks on the computer, like opening a Google Chrome Page, opening any app on my computer or even switching to a different application via the dock. I use this computer for school, however much of my classmates (who have the same model computer) aren't having the same problem as I am.  Usually, it takes about half an hour for my computer to start up and log in, and another half an hour to get everything set up on my desktop (as in loading up desktop, dock, menu bar and letting the computer speed up and stabilise). Below is an image of my Activity Monitor:    I have nothing on my desktop as of now. My Downloads folder is rather full, and I still have 200 GB of storage out of my 500GB remaining. I can't figure as to why it is this slow, and I know it's not because of my internet connection because I have a second Macbook Air laptop (relatively new) that runs at beautiful speeds.  What should I do about this?  Specifications: Macbook Pro (13 Inch, Mid 2012) Processor: 2.5 GHz Intel Core i5 Memory: 4 GB 1600 MHz DDR3 Graphics: Intel HD Graphics 4000 1536 MB Storage: 500GB total, 200GB remaining

I bought a Mac (13", early 2011) almost 5 years ago. When I first got it, it was running under OS X 10.7 and it was pretty fast. I've being upgrading it ever since and it's now running under Mac OS X 10.11.  I guess it didn't totally survive the upgrades because, today, there's a lot of bugs, freezes, lags, "spinning beach ball" appearing,... for example, when I write something on a normal program/editor, the cursor freezes for a few seconds, then catches up to what I'm writting.  As you can guess, that's really annoying! I've been thinkning about upgrading the hardware but I don't know what to do: should I change the RAM to 8 GB - 1 333 MHz (currently my computer has 4 GB - 1 333 MHz)? Or should I upgrade to an SSD (which is pretty expensive and difficult to install)?  Thank you very much.


I want to use the book class for a thesis and need to provide the table of content with chapter-section-subsection-subsubsection, all four should be displayed.   Is there any trick to make it, as I only get chapter-section-subsection if I use the normal \tableofcontents?

So we have something like:  \documentclass{article} \setcounter{secnumdepth}{2} \setcounter{tocdepth}{2} \usepackage{amsmath}  \begin{document}  \tableofcontents  \section{Brushless Motor Fundamentals} \subsection{Brushless Motor Operation} \subsubsection{DC Motor Operation} Torque is generated in DC motors from the magnetic force, also known as the Lorentz force, which is produced when an electric current is passed through a coil in a magnetic field. This force is given by $F=q[E+(v\times B)]$, where $F$ is the force perpendicular to the coil, $E$ is the electric field in the coil, $B$ is the magnetic field, and $v$ is the velocity of the charged particles in the coil. From mechanics, torque is $\tau=F\times r$.  \section{Brushless Motor Fundamentals 2} \subsection{Brushless Motor Operation} \subsubsection{DC Motor Operation 2} If the electrical force is ignored and the remaining magnetic force is used, with the assumption that $v$ is perpendicular to $B$, we find that $\tau=qvBrsin\theta$.  \end{document}   How to show subsubsections and paragraphs in TOC?


Statement:      If $\mathcal{P(x)} \in \mathbb{R}[x] \ni~ \forall~ k\in\mathbb{Z}, \mathcal{P(k)}\in \mathbb{Z}$, then show that $n!\mathcal{P(x)}$ is an integer polynomial.     I have the following question regarding the question:  1) The question doesn't seem complete for some reason. Isn't it that $\exists$ particular $p$ such that for any $n\geq p, ~n!\mathcal{P(x)} \in \mathbb{Z}$?    I tried proving the statement. But it was quite unsuccessful. I tried to construct another polynomial $\mathcal{Q(x)}$ with rational coefficients so as to show that both are equal. But that wasn't going the way I wished. And I wasn't getting the $n!$. Please check Point $1$ above as well.

If $f(x)$ is a polynomial such that if $y \in\mathbb{Z}$, then $f(y)\in\mathbb{Z}$, show that there exist $n$ such that $n!f(x)\in\mathbb{Z}[x]$


Is a dash used between words in word combinations like fill up?  Or is it fill-up?

I'd like to know the reason for the punctuation of the noun "brush-off" and the verb "to brush off": they have related meanings, but "brush-off" is the result of "to brush off", essentially. But one cannot write "to brush-off" as that just looks weird, as it is used for the noun version.  So the question, is the hyphen often used like this in English to differentiate a derived noun from a verb?


The function $f: (0,1) \to \mathbb R $ defined by $f(x) := 1/x$ is not uniformly continuous, but it is continuous. Proof: given $\epsilon > 0$, then for $\epsilon > \mid 1/x - 1/y \mid$ to hold we must have   $\epsilon > \mid 1/x - 1/y \mid = \frac{\mid y-x \mid }{\mid  xy \mid } = \frac{\mid y-x\mid }{xy}$  $\mid x -y \mid < xy\epsilon$  Therefore to satisfy the definition of uniform continuity we would have to have $\delta \leq xy\epsilon$ for all $x, y$ in (0,1). but that would mean that $\delta \leq 0$ Therefore there is no single $\delta >0$  I don't understand $\delta \leq 0$  part... why it is less than or equal to 0 ?

I would like to show that the function $\frac{1}{x}$ is not uniformly continuous on $(0,1)$ using two approaches.   First Approach:   We have the fact that if a function $f$ is uniformly continuous on an open interval $(a,b)$, then the function $f$ is bounded on $(a,b)$. By using its contrapositive, since $\frac{1}{x}$ is not bounded on $(0,1)$, it is not uniformly continuous.  Second Approach:  Proof by definition. Note that the definition of non-uniform continuity is:  There exists an $\epsilon_0>0$ such that for all $\delta>0$, there exists $x,y \in (0,1)$ such that $|x-y|<\delta$ but $|\frac{1}{x} - \frac{1}{y}| \geq \epsilon_0$.  Assume that $\delta < 1$. Let $x = y + \frac{\delta}{2} \in (0,1), y < \frac{\delta}{2} \in (0,1), \epsilon_0 = 1$. Then we have   $$|\frac{1}{x} - \frac{1}{y}| = |\frac{1}{y + \frac{\delta}{2}} - \frac{1}{y}| = \frac{\frac{\delta}{2}}{|y(y + \frac{\delta}{2})|} > \frac{\frac{\delta}{2}}{(\frac{\delta}{2})(\delta)} = \frac{1}{\delta} > 1 = \epsilon_0 $$  If $\delta \geq 1$, then let $\delta^{\prime} = \frac{1}{\delta}$ so that $\delta^{\prime} \leq 1$. The rest proceeds the same as above.   Question: Are my two approaches correct?


I want to get the current value of the EIP register with assembly language. Is that possible?

Can the program counter on Intel CPUs can be read directly (that is without 'tricks') in kernel mode or some other mode?


If $\gcd(a,b)=1$, show that $\gcd(a^2-b^2,a^2+b^2) = 1 \text{ or } 2$.  I tried this: $\gcd(a,b) = 1$.   Then, $\gcd(a^2, b^2)=1$.   Now, $a^2+b^2$ is divisible by $2$, and $a^2-b^2$ also divisible by $2$. So $2$ is a gcd of $a^2-b^2$ and $a^2+b^2$.  But what about $2$ or $1$?

If  $a,b$ are positive integers such that $\gcd(a,b)=1$, then show that $\gcd(a+b, a-b)=1$ or $2$ and $\gcd(a^2+b^2, a^2-b^2)=1$ or $2 $. Progress We have   $\gcd(a,b)=1\implies \exists u,v\in \mathbb Z$ such that $au+bv=1\implies a^2u'+bv'=1, u',v'\in \mathbb Z$. Let $\gcd(a+b, a-b)=d$. Then $\mid (a+b)x+(a-b)y, \forall x,y\in \mathbb Z$. How to show $\gcd(a+b, a-b)=1$ or $2$ and $\gcd(a^2+b^2, a^2-b^2)=1$ or $2 $.