Say i have a bucket of water. I can understand that at any point inside the bucket there will be a force hence a pressure acting downwards, but why is there a pressure acting side ways as well at the same point? Could anyone give me a intuitive understanding of it.

We can show that pressure upward and downward in a fluid is caused by weight of fluid column or volume. A simple derivation of this:  $$\text{Pressure}=\frac{\text{Force}}{\text{Area}}=\frac{\text{Weight of the fluid column}}{\text{Area}}$$ $$~~~~~=\frac{\text{mg}}{\text{A}}=\frac{\rho Vg}{\text{A}}=\frac{\rho g\times Ah}{\text{A}}=\rho g h$$  I am able to show that pressure in a fluid at a height is $\rho gh$ upwards and downwards, but how can I show that it acts sideways too?  I found a pretty reasonable answer . So is this the correct reason?     Fluids are made of a large number of very small particles, much too   small to see. These particles are in constant, rapid motion. They bump   into one another. They bump into the walls of any container that holds   them. They bump into objects in the fluid.      As the particles of a fluid bump into an object in the fluid, they   apply forces to the object. The forces, acting over the object’s surface,   exert pressure on the object. When the pressure in a fluid increases, the   particles bump together more frequently. This increases the pressure   on objects in the fluid.      The pressure a fluid exerts on an object in the fluid is applied in   all directions. That is because the particles that make up the fluid can   move in any direction. These particles exert forces as they bump into   objects in the fluid.


I have a database schema that looks something like this:  create table t_order (orderid int, customerid int) create unique clustered index ix_order on t_order(orderid) create index ix_order_1 on t_order(customerid)  create table t_product (productid int) create unique clustered index ix_product on t_product(productid)  create table t_orderItem (itemid int, orderid int, productid int) create unique clustered index ix_orderItem on t_orderItem(itemid) create index ix_orderItem_1 on t_orderItem(orderId, productId) create index ix_orderItem_2 on t_orderItem(productId, orderId)   (i.e. the orderItem table is a many-to-many between orders and products). Now I have an SQL statement like this:  SELECT      t_product.productid,     t_order.orderid,     t_orderItem.itemid FROM     t_product     JOIN t_order ON t_order.customerid = 101      LEFT OUTER JOIN t_orderItem ON t_product.productid = t_orderItem.productid AND t_order.orderid=t_orderItem.orderid    when there are a lot of rows in the database (and with statistics updated), I get the "no join predicate" warning on the left outer join, and the query takes a long time to execute.  Unfortunately it's not code I wrote myself and I don't really understand what that outer join is trying to do. I quite expect the SQL is "wrong" (i.e. doesn't do what the author intended) but I can't fix it unless I can get a handle on what it's actually doing at the moment.  I have seen other examples on the net of using AND inside the ON clause, but not involving other tables that aren't part of the join.  Can someone explain what the effect of this join is and why it causes a Cartesian product to be generated.

My execution plan is posted on PasteThePlan.com. The  that there is no join predicate. I'm still new to this so I'm confused. Is that because I am using a CTE to determine the values for two of the attributes?  This presentation table is used in more that a few reports, and I don't want to create a second one for this very unique one.  Here's the query:  WITH Accumulators AS (  SELECT DISTINCT AreaNum, SuperintendentNum, SuperName    FROM FI.SLAnalysis   WHERE SuperName LIKE '%ACCUM%' ) SELECT     slard.[IO]   , slard.PhaseName             AS PhaseName   , slard.JobNum              AS JobNum --  , slard.JobName              AS JobName   , CASE    WHEN SUBSTRING(JobNum, 5, 2) IN ('05', '06')     THEN ac.SuperintendentNum    ELSE slard.SuperNum      END                AS SuperNum   , CASE    WHEN SUBSTRING(JobNum, 5, 2) IN ('05', '06')     THEN ac.SuperName    ELSE slard.SuperName      END                AS SuperName   , slard.AreaNum              AS AreaNum   , slard.AreaName             AS AreaName   , fp.WeekEndDate             AS WeekEndDate    -- WTD Metrics   , slard.WeeklyRevenue            AS WTDRevenue   , slard.WeeklyCost             AS WTDCost     , slard.WeeklyRevenue - slard.WeeklyCost       AS WTDGP   , CASE    WHEN slard.WeeklyRevenue = .01 THEN 0    ELSE slard.WeeklyRevenue      END                AS WTDRatio   , slard.Weekly_PER             AS WTDGPPer   , slard.WeeklyStandOvrheadAdmin          AS WTDOverAdmin   , slard.WeeklyStandOvrheadEquip          AS WTDOverEquip   , (slard.WeeklyRevenue    -slard.WeeklyCost    -slard.WeeklyStandOvrheadAdmin    -slard.WeeklyStandOvrheadEquip)         AS WTDOHGP    --MTD Metrics         , slard.MTDRevenue             AS MTDRevenue   , slard.MTDCost              AS MTDCost   , slard.MTDRevenue - MTDCost          AS MTD_GP   , CASE     WHEN slard.MTDRevenue <= .05 AND slard.MTDRevenue > 0 THEN 0    ELSE slard.MTDRevenue      END                AS MTDRatio   , CASE    WHEN slard.MTDRevenue <> 0     THEN CAST(slard.MTDCost / slard.MTDRevenue AS DECIMAL(18, 2))    ELSE CAST(0.00 AS DECIMAL(18, 2))      END                AS MTDGPPer   , slard.MonthlyStandOvrheadAdmin         AS MTDOverAdmin   , slard.MonthlyStandOvrheadEquip         AS MTDOverEquip   , (slard.MTDRevenue    -slard.MTDCost    -slard.MonthlyStandOvrheadAdmin    -slard.MonthlyStandOvrheadEquip)        AS MTDOHGP   -- YTD Metrics   , slard.YTDRevenue             AS YTDRevenue   , slard.YTDCost              AS YTDCost   , slard.YTDRevenue - YTDCost          AS YTD_GP   , CASE    WHEN slard.YTDRevenue <= .53 AND slard.YTDRevenue > 0 THEN 0    ELSE slard.YTDRevenue      END                 AS YTDRatio   , slard.YTDStandOvrheadAdmin          AS YTDOverAdmin   , slard.YTDStandOvrheadEquip          AS YTDOverEquip   , (slard.YTDRevenue    -slard.YTDCost    -slard.YTDStandOvrheadAdmin    -slard.YTDStandOvrheadEquip)         AS YTDOHGP   FROM [DW].[FI].[SLAnalysisReportData] slard  INNER JOIN Accumulators ac    ON slard.AreaNum = ac.AreaNum  INNER JOIN CORP.FiscalPeriod fp   ON slard.FY = fp.FY    AND slard.[Period] = fp.[Period] WHERE slard.FY = 2018  AND slard.[Period]  = 3     AND slard.AreaNum IN ('40')    AND NOT (    WeeklyRevenue = 0             AND WeeklyCost = 0             AND WeeklyStandOvrheadAdmin = 0             AND WeeklyStandOvrheadEquip = 0             AND MTDRevenue = 0             AND MTDCost = 0             AND MonthlyStandOvrheadAdmin = 0             AND MonthlyStandOvrheadEquip = 0             AND YTDRevenue = 0             AND YTDCost = 0             AND YTDStandOvrheadAdmin = 0             AND YTDStandOvrheadEquip = 0            )


I've been a bit obsessed with customizing Ubuntu. I have a really cool logo animation in a mp4 file. I'm trying to use that video as my login screen background，like Dreamscene in Windows. But I'm not sure how to accomplish that.  I Googled relevant information and noticed that LightDM can change login background to another image. I haven't seen any program that can make the login background a video though.

How can I use a video as my desktop wallpaper? I would like to have it like normal wallpaper so the icons etc. sit on top of it, just as in a static wallpaper picture.  A similar question was asked at  but no answer was given that support icons, for example, it seems.


Pretty self explanatory.   The first argument should be:   Checked if the file exists Echo that file's absolute path   For example:  +akiva@akiva-ThinkPad-X230:~$ ./myscript myfile.txt /home/akiva/myfile.txt   Thanks

How can you quickly get the complete path to a file for use in terminal?


square = [[0 for i in range(3)] for j in range(3)] square >> [[0, 0, 0], [0, 0, 0], [0, 0, 0]] square[0][0] = 1 >> [[1, 0, 0], [0, 0, 0], [0, 0, 0]]   This is the expected behavior.  But then:  square = [[0] * 3] * 3 square >> [[0, 0, 0], [0, 0, 0], [0, 0, 0]] square[0][0] = 1 >> [[1, 0, 0], [1, 0, 0], [1, 0, 0]]   It seems like each list within the list is passed by reference to a list stored in memory.  I found this to be weird behaviour since I didn't explicitly create the sublist as an independent variable, and I wondered if anybody had thoughts to share on this...

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


It is well-known that, given a vector space with an inner product $\langle \cdot,\cdot\rangle$, there is an induced metric $d$ given by $$d(x,y)=\sqrt{\langle x-y,x-y\rangle}$$ Is it true that given a vector space with a metric $d$, there exists an inner product with the above property? I suspect it is not. What conditions are required so that this is true? Specifically, I am interested in finding an inner product consistent with the one-point compactification topology of $\mathbb{R}^n$, so if there is some condition this space satisfies that is sufficient but not necessary, that is an adequate answer as well.

Let $ V $ be a normed vector space (over $\mathbb{R}$, say, for simplicity) with norm $ \lVert\cdot\rVert$.  It's not hard to show that if $\lVert \cdot \rVert = \sqrt{\langle \cdot, \cdot \rangle}$ for some (real) inner product $\langle \cdot, \cdot \rangle$, then the parallelogram equality $$ 2\lVert u\rVert^2 + 2\lVert v\rVert^2 = \lVert u + v\rVert^2 + \lVert u - v\rVert^2 $$ holds for all pairs $u, v \in V$.  I'm having difficulty with the converse.  Assuming the parallelogram identity, I'm able to convince myself that the inner product should be $$ \langle u, v \rangle = \frac{\lVert u\rVert^2 + \lVert v\rVert^2 - \lVert u - v\rVert^2}{2} = \frac{\lVert u + v\rVert^2 - \lVert u\rVert^2 - \lVert v\rVert^2}{2} = \frac{\lVert u + v\rVert^2 - \lVert u - v\rVert^2}{4} $$  I cannot seem to get that $\langle \lambda u,v \rangle = \lambda \langle u,v \rangle$ for $\lambda \in \mathbb{R}$.  How would one go about proving this?


Trying to install windows 8.1 on an MSI gs73vr 6rf. Fresh install goes well as do drivers and such. Problems begin when using windows update and trying to install .net 3.5 or any updates at all. I can use an offline updater but windows update will not work nor can I install the aforementioned .net framework. I have installed the recommended updates, ran the update repair, DISM and sfc all to no avail. Is it a BIOS thing? At a loss.

I am trying to install .NET 3.5 to work on few legacy applications and this has been burning my head for past few weeks.   During installation a pop up window requests me to install .NET 3.5 and when i hit download it fails stating issues with internet connection. But internet works just fine Tried enabling .NET 3.5 from Control panel it redirects to " Download from Windows update " and the download goes on forever ( best try 6 hours on 18mbps wifi keeps loading..) Using Dism with and without /LimitAccess the process gets stuck at 65.8% and then throws a  Downloaded offline package 253 MB from microsoft when i tried to install it again asks me download 3.5 to launch dotfx35.exe which is the setup file :( Tried everything from  no luck   Please help.. :(


Environment: jdk1.7  javax.servlet-api-3.0.1.jar is needed for this test.  Reproduce steps:   javac Test1.java -cp javax.servlet-api-3.0.1.jar build Test1.java with javax.servlet-api-3.0.1.jar javac Test2.java -cp javax.servlet-api-3.0.1.jar build Test2.java with javax.servlet-api-3.0.1.jar javac Test3.java build Test3.java java -classpath .:javax.servlet-api-3.0.1.jar Test3 run Test3 with dependency. Following is the output. It's OK here.  hello world1 hello world2  But when this command java Test3 run, Exception is thrown. The result at the end of this post. The weird thing is that "hello world1" could be printed out, but instead of printing out "hello world2" an exception is thrown.   Test1.java  import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; public class Test1 {     public void getRequest(HttpServletResponse resp) throws IOException {          OutputStream os = resp.getOutputStream();         resp.getOutputStream().close();     }      public void hello(String world) {         System.out.println("hello " + world);     } }   Test2.java  import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; public class Test2 {      public void getRequest(HttpServletResponse resp) throws IOException {         OutputStream os = resp.getOutputStream();         try {             resp.getOutputStream().close();         } catch (Exception e) {         }     }      public void hello(String world) {         System.out.println("hello " + world);     } }   Test3.java  public class Test3 {     public static void main(String[] args) {         new Test1().hello("world1");         new Test2().hello("world2");     } }   output of the final step. Test2.hello("world2") throw an exception:  hello world1 Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream     at cn.test.abc1.Test3.main(Test3.java:9)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletOutputStream     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)     ... 6 more   I am very confused with the Exception. Because I didn't use any code in the Class ServletOutputStream. And the difference of the Test1 and Test2 is only a try blocked.  This Question is not a duplicated question as it marked. Because JVM should not throw an Exception when a try block get involved.

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


I want to take the feat Improved Familiar to get a familiar that can use wands and other such magic items, but I really enjoy the +4 initiative my current familiar gives.  I haven't seen anything listing bonuses the various improved familiars give. Do they give bonuses? Do I keep my original familiar's bonus?

I was looking at the list of familiars you can obtain with the Improved Familiar feat when I noticed none of them had a stat bonus like the normal familiars did.(Example: The Cat familiar grants "Master gains a +3 bonus on Stealth checks")  Are you sacrificing a feat slot AND the bonuses familiars grant to you to have a better familiar? It isn't a huge blow but it seems that if you sacrifice a feat you shouldn't lose a bonus that is given as a base ability.


I have realized that it is very hard to play with red ball for the batsman like in test matches when he plays any unnecessary shot like from outside the off stump he gets out immediately.The scenario is completely different with white ball.

In Test Cricket, the red colored ball is used while in ODI and T20I, the white colored ball is used. What is the difference between these balls(apart from color)? Why are different balls used in different formats?  Ball used in Test Cricket      Ball used in ODI and T20I Cricket


Here is the error that I have been getting: java.lang.NullPointerException: Attempt to invoke virtual method 'androidx.fragment.app.Fragment androidx.fragment.app.FragmentManager.findFragmentById(int)' on a null object reference         at com.skyloromnisecurity.skylor.common.ContactEditTexts.findEditText(ContactEditTexts.java:44) Line 44 is 'Fragment fragment = fragmentManager.findFragmentById(fragmentId);'  `public class ContactEditTexts {     private List contacts = new ArrayList<>();     private Context context;  public ContactEditTexts(FragmentManager fragmentManager, final Button bActionButton,                         Context context) {     this.context = context;      TextWatcher phoneNumberTextWatcher = phoneNumberWatcher(bActionButton);     List<Integer> ids = Arrays.asList(first_contact, second_contact, third_contact);     for (Integer id : ids) {         EditText editText = findEditText(id, fragmentManager);         editText.addTextChangedListener(phoneNumberTextWatcher);         contacts.add(editText);     } }  private EditText findEditText(int fragmentId, FragmentManager fragmentManager) { Fragment fragment = fragmentManager.findFragmentById(fragmentId);     assert fragment != null;     return (EditText) fragment.requireView().findViewById(R.id.contact_edit_text); }`

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?


say I had an array (Hello,1,2,HI,1,2)  How would I check if index 1 was = to 'Hello' is a very simple question, but cannot find an answer.  This is what I have tried,it is inside a for loop, my array is of type string:    if(array[i] == "Hello" ){   // do something    }

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


I have a broken screen and a wireless mouse. Is there another way I can transfer my photos?

I have a Samsung Galaxy S4. I broke the screen a few days back and it was locked at the time. The phone is working because it can charge and I can hear the alarm and incoming calls and messages but I can't see a thing because it is all black. I can't possibly unlock the phone because the touch is not working too. I need to retrieve my files from the phone. So when I connect my phone using a USB to my MAC, it shows me absolutely nothing except this error:   If your device's screen is locked, disconnect its USB cable, unlock your screen, and then reconnect the USB cable.    Like I said, I cannot unlock the screen. I can't use Samsung's Find my Phone application because I never added a Samsung Account to it and so my device is not registered for remote data recovery.   When I connect my phone to my HP laptop via USB, it shows nothing, not even an error.   Is there any way I can unlock my phone remotely and retrieve my files?


I understand that stochastic gradient descent has a batch size of 1, but while reading inception v2 paper, I found this text in training methodology "We have trained our networks with stochastic gradient utilizing the TensorFlow [1] distributed machine learning system using 50 replicas running each on a NVidia Kepler GPU with batch size 32 for 100 epochs." can anyone help me out with this?

Is stochastic gradient descent basically the name given to mini-batch training where batch size = 1 and selecting random training rows? i.e. it is the same as 'normal' gradient descent, it's just the manner in which the training data is supplied that makes the difference?  One thing that confuses me is I've seen people say that even with SGD you can supply more than 1 data point, and have larger batches, so won't that just make it 'normal' mini-batch gradient descent?


I am trying to use the choice.js library inside a lightning component handling select HTML Element.  I think there might be a conflict with the LockerService but there is no error displayed on the page or in the HTML.  Is there a way to know if this library is LockerService compliant ?

Components often seem to work with external libraries until the Locker Service is enabled. What libraries work with locker service enabled and where can I go to find out?


I have heard in multiple locations that in the case of a flat universe, the universe is infinite. This seems to present multiple issues:  a) If a flat universe were infinite, would would the space of the Big Bang then not be infinite?  b) If the above is not the case, that seems to suggest that the geometry of the universe can evolve over time?  c) If the space of the Big Bang was infinite, and since space, time, matter, and energy came from the Big Bang, wouldn't the density of the universe at the start of the universe be equal to that of the universe now?  d) If the above is true, why are we told that the universe began in a very dense state? And also, if the universe indeed was more dense initially, would this not suggest that space must not be flat?  Note: Some of these questions depend on the answer to previous questions.

TV documentaries invariably show the Big Bang as an exploding ball of fire expanding outwards. Did the Big Bang really explode outwards from a point like this? If not, what did happen?


The wavefunction for an electron within a hydrogen atom in the $2s$ state has the following wavefunction:  $$\psi(r,\phi,\theta)=\psi(r)=\frac{1}{2\sqrt{\pi}}\left(2-\frac{r}{a_0}\right)\frac{e^{-r/2a_0}}{(2a_0)^{3/2}}$$  However, at $r=0$,   $$\psi^*\psi\left.\right|_{r=0}=\left(\frac{1}{2\sqrt{\pi}}\left(2-\frac{0}{a_0}\right)\frac{e^{-0/2a_0}}{(2a_0)^{3/2}}\right)^2=\frac{1}{\pi(2a_0)^{3}}$$  I don't understand how this should be possible. My answer doesn't match logic and it doesn't match graphs that I find online. (every graph I see goes to zero at $r=0$)     However, this does seem to really be the wavefunction for the 2s state.  Where have I gone wrong?

When trying to solve the Schrödinger equation for hydrogen, one usually splits up the wave function into two parts: $$\psi(r,\phi,\theta)= R(r)Y_{\ell,m}(\phi,\theta).$$ I understand that the radial part usually has a singularity for the $1s$ state at $r=0$ and this is why you remove it by writing: $$R(r) = \frac{u(r)}{r}$$ But what is the physical meaning of $$R(r=0) = \infty~?$$ Wouldn't this mean that the electron cloud is only at the centre of the atomic nucleus?


i am currently using linux mint 20 but i want to make it windows 10 and want to dual boot ubuntu and kali linux on my external HDD. Is this possible?

OS: Windows 7. I want install Linux Ubuntu on portable external Hard Drive USB 2.0. I read a variety of methods, but I'm confused by contradictory advices and methods. Actually, installing Ubuntu on anything other than clean PC looks much more complicated than installing Windows. I need to have Ubuntu package + Python 2.7 + C compiler installed. My external hard drive is partially filled, I need to keep all files.   Will Ubuntu run entirely on external hardrive, without writing anythinhg to Windows system folders and to registry?  Can anyone post detailed guide how install Ubuntu on external hard drive?


“I have a mustache but I have  not started to twirl it yet” What is the implication of having a mustache, but not yet twirling it?

Today, the New York Times online edition  The review contains the following sentence:     The filmmakers don’t villainize anyone, though a few participants come awfully close to twirling waxed mustaches, like an American manager who jokes to a Chinese colleague that it would be a good idea to duct-tape the mouths of talky American workers.   It's clearly nothing positive, but I have never heard of it, cannot deduce the exact meaning from context and could not find anything online, partly because most hits concern physical mustaches.


I'm a programmer, and I'll probably have to write code for some kind of a Geoserver based platform. (probably will have to maintain the server too). My knowledge in geography is (shamefully) quite minimal and my background in GIS  is 0.  I seek a programmer-oriented list of things I better add to my to-do list, in order to turn from someone new to an expert in the least painful way possible.  What I've done so far:   Skimmed through the Geoserver manual (including the REST API manual) Got a book called "GeoServer Beginner’s Guide" and read a little.

What are sources where I can learn how to use GeoServer?  I know of these two sites:    - which in fact is not working (at least at the moment)  - not only (tutorials) for GeoServer   But I am interested in more complex information, and not to read only documentation.


I want to play mobile games on my Mac. How do I do that? I have been seeing a lot of iPhones controlling Macs. Where is the Mac controlling the iPhone?

I would like to take control of my app on an iOS device (mostly an iPhone) from my MacBook Pro or Windows, doesn't matter which one.  I know that it can be accomplished via Veency, and that's exactly what I need - but I do NOT want to jailbreak my iPhone.  Is there a similar legal alternative?  If not - is it something I could develop perhaps, or will I run into some SDK limitations for such a thing?


I am going to start learning photography, can you please suggest which type of camera or phone camera i should buy on beginning of photography?

I am thinking of buying a digital SLR camera. What things should I be looking for?


I am looking to build a video chatroom app where users can create / join private chat rooms, and I would appreciate some advice on how to go about storing the chat data. Whenever a new user joins the room, they should receive a history of all the previous chat messages, as well as the list of current users in the room.  On average, I expect chat rooms to be destroyed (ie. everyone has left the room) within a few hours of their creation. Thus, most of the data that needs to be stored is very temporary. On the other hand, messages in the chat will probably be somewhat frequent, and the data will be updated often.  Where should I go to ask for recommendations on how to store this data? It doesn't sound like this fits on Stack Overflow. Software Engineering or Databases seem like better options, though I don't necessarily want to restrict my options to databases only (maybe there are solutions that don't require a database, for example storing the data on the client side).

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I am wondering if a time dependent magnetic field due to a time varying current can be calculated with the Biot Savart law, even though a time varying current is produced by a time varying electric field.

I have just finished learning the basics of magnetism, and it should be noted that I am not very familiar with Maxwell's equations.  Note:    In the question, when I say , I am referring to the equation without Maxwell's correction. Also, when I say , I am referring to the equation: $\mathrm dB= (\mu_0/4\pi)(I)(\mathrm dL~ X~\hat r)/r^2$     Consider an infinitely long straight wire, carrying a time varying current I(t) such that dI(t)/dt is non-zero. Also consider a point P which is at a distance r from the wire. Using Biot Savart Law, we find out that the magnetic field is $\mu_0\cdot I(t)/2\pi \cdot r$, at any instant t.   Now, I have read that Ampere's Circuital law is NOT valid for cases in which the currents are time varying. However, if we consider an Amperian loop along a circle of radius r and centre at the perpendicular from P to the wire, using symmetry arguments, we obtain the same value of field: $\mu_0 I(t)/2\pi\cdot r$. Since Ampere's law is invalid for such a current, the expression mentioned for the magnetic field must be incorrect.  So, can Biot Savart Law also NOT be used for time varying currents? Also, just out of curiosity, what would be the actual value of the magnetic field at time t?  My book (Halliday and Resnick) derives the equation for the magnetic field created due to a moving point charge. However, after the derivation, it states that the result obtained is not really valid, since "a point charge cannot be assumed as a steady current by any stretch of imagination". This makes me believe that even Biot-Savart Law is only true for non time varying currents. Am I right or wrong?


I want to generate a list that contains several dictionaries, but I encountered a weird problem:  for i in xrange(0, len(merchant_id_list)):         for j in xrange(count, count + int(product_list_size[i])):             unit_price = get_unit_price_by_id(merchant_id_list[i], product_id_list[j])              product['id'] = product_id_list[j]             product['quantity'] = quantity_list[j]             product['price'] = unit_price             product_id.append(product)          print i         print merchant_id_list[i]         compound_data['id'] = merchant_id_list[i]         compound_data['product_id'] = product_id         merchant.append(compound_data)         print merchant          count += int(product_list_size[i])   I want to get the list looks like this:  [                 {                     "id":1,                     "product_id":[                         {                             "id":1,                             "quantity": 3,                             "price": 11                         },                         {                             "id":2,                             "quantity": 2,                             "price": 12                         }                     ]                  },                 {                     "id":2,                     "product_id":[                         {                             "id":16,                             "quantity": 2,                             "price": 22.22                         }                     ]   But finally it looks like this:  [                 {                     "id":2,                     "product_id":[                         {                             "id":16,                             "quantity": 2,                             "price": 22.22                         },                 {                     "id":2,                     "product_id":[                         {                             "id":16,                             "quantity": 2,                             "price": 22.22                         }                     ]   It looks that the last element override all previous dictionary. I've print the variable 'i' and 'merchant_id_list' and it is OK.  How to fix it? Thanks

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


This is about the 4th or 5th time i have encountered this. Im very new to latex but I'm growing tired of not understanding why this is happening  I place a figure in document with the following code  \begin{figure}[h] \subfloat{ \includegraphics[width=.7\textwidth]{currentdischarge} } \caption{Expected current discharge} \end{figure}   Then i go and start a new section and continue on with my article  \section{blah blah}   I do a typeset to check my work and every single time my figures are no under my new section instead of where they are suppose to be!  Someone please help! I spend more time fighting latex then i do actually working

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?


> sal <- read.csv("/Users/YellowFellow/Desktop/Salaries.csv",header   = TRUE) > regressionModel = lm(sal$Salary~sal$Yrs.since.phd) > summary(regressionModel)  Call:  lm(formula = sal$Salary ~ sal$Yrs.since.phd)  Residuals:    Min     1Q Median     3Q    Max  -84171 -19432  -2858  16086 102383   Coefficients:                   Estimate Std. Error t value Pr(>|t|)     (Intercept)        91718.7     2765.8  33.162   <2e-16 *** sal$Yrs.since.phd    985.3      107.4   9.177   <2e-16 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 27530 on 395 degrees of freedom Multiple R-squared:  0.1758,    Adjusted R-squared:  0.1737  F-statistic: 84.23 on 1 and 395 DF,  p-value: < 2.2e-16   The above is my result from the basic linear model that I've created. I've been trying to interpret these results for some time but I don't understand the mathematical formula's behind them or how to explain results such as Coefficients, Residuals & Multiple R-squared. Please be kind enough to explain this to me in a simplified manner.

The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. There might (will) be mistakes, as I'll just write what I assume. Mainly I'd like to know what the t-value in the coefficients mean, and why they print the residual standard error.   Call: lm(formula = iris$Sepal.Width ~ iris$Petal.Width)  Residuals:      Min       1Q   Median       3Q      Max  -1.09907 -0.23626 -0.01064  0.23345  1.17532    This is a 5-point-summary of the residuals (their mean is always 0, right?). The numbers can be used (I'm guessing here) to quickly see if there are any big outliers. Also you can already see it here if the residuals are far from normally distributed (they should be normally distributed).  Coefficients:                  Estimate Std. Error t value Pr(>|t|)     (Intercept)       3.30843    0.06210  53.278  < 2e-16 *** iris$Petal.Width -0.20936    0.04374  -4.786 4.07e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    Estimates $\hat{\beta_i}$, computed by least squares regression. Also, the standard error is $\sigma_{\beta_i}$. I'd like to know how this is calculated.  I have no idea where the t-value and the corresponding p-value come from. I know $\hat{\beta}$ should be normal distributed, but how is the t-value calculated?  Residual standard error: 0.407 on 148 degrees of freedom   $\sqrt{ \frac{1}{n-p} \epsilon^T\epsilon }$, I guess. But why do we calculate that, and what does it tell us?  Multiple R-squared: 0.134,  Adjusted R-squared: 0.1282    $ R^2 = \frac{s_\hat{y}^2}{s_y^2} $, which is $ \frac{\sum_{i=1}^n (\hat{y_i}-\bar{y})^2}{\sum_{i=1}^n (y_i-\bar{y})^2} $. The ratio is close to 1 if the points lie on a straight line, and 0 if they are random.  What is the adjusted R-squared?  F-statistic: 22.91 on 1 and 148 DF,  p-value: 4.073e-06    F and p for the whole model, not only for single $\beta_i$s as previous. The F value is $ \frac{s^2_{\hat{y}}}{\sum\epsilon_i} $. The bigger it grows, the more unlikely it is that the $\beta$'s do not have any effect at all.


I have a List in Sharepoint 2016 Site Collection called Feedback. I want anonymous users be able to Add items to the list.  But I do not want anyone to read the query that list using a REST api like below  ('Feedback')  NOTE: My site collection is a public facing site (Publishing Portal)

When you don't want users to use any web services it seems like you can turn off the permission to Use Remote Interfaces. However that permission does not mention REST.  This made me wonder if there was any way to turn it off, at any level. I did some searching but couldn't find anything.   Besides that, even Limited Access grants Use Remote Interfaces. So as soon as some permissions are broken, they are granted that permission even though the perhaps stripped permission level does not grant it.  So, do you know any way to turn off the possibility to use the REST API? Either at farm level, site level or via permissions. And is there any real secure way to turn off Use Remote Interfaces?


I am long time (actually very long time) ATI video card user, and I've worked my way through all sort of issue with the drivers on Linux. So, now that I am an ATI expert, let's get down to business with Nvidia.  I've never worked with Nvidia cards under Linux, so I'm a bit unsure which drivers are best suited for my powerful GTX 970. The official ones from Nvidia site, or some 3rd party ones from ppa?  Note: I don't plan on gaming in Ubuntu, I'm dual-booting to windows for that.  Thanks in advance.  P.S. Ubuntu 15.10 here.

I've just installed Ubuntu and I need either video, wireless, or some sort of other manufacturer (non-opensource) driver. How can I run the tool that will fetch all of these for me? I'd like graphical instructions.  Related:


I want to know about the whole professional web development process (PHP - MySQL) from getting the client, to delivery of the project, the full cycle of web development and which software (free software) can be used?  May the question be asked here? If not where can I ask the question with its elaborate version?

I would like to ask a question about Java that doesn't have a specific answer. It's a question to see what people think and to share their opinion.    Will Stack Overflow tolerate this, or is there another Stack Exchange resource where I may ask a question like this?


I am trying to install BusyBox on panda board which has an ICS Android kernel.  I used the steps below:   Download binary file which supports the panda board Push it into /system/busybox folder Install the BusyBox command line tools on the target by executing the following commands on booted filesystem: pc ./adb shell target$ cd /system/busybox target$ ./busybox --install . target$ ./sh  #here i am getting error like ./sh: precmd: not found Save the original sh executable by renaming it, and then create a soft-link to BusyBox sh:target$ cd /system/bin target$ mv sh sh.android target$ ln -s /system/busybox/sh sh Export export PATH=$PATH:/system/busybox:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin   Step 3 is to install BusyBox, and step 4 is to make BusyBox shell as default shell. But I am getting an error in the 3rd step. I want to make BusyBox shell as default shell, so I can run scripts on panda board.  I appreciate any type of suggestions or solutions. Thanks in advance.

I'm kind of used to linux. I'm using Busybox from the Busybox Free installer, with Busybox 1.21.0-Stericson. Trying to chance my shell to the Busybox shell using busybox ash gives the following error after every single command:  ash: precmd: not found echo $PS1 $(precmd)$USER@$HOSTNAME:${PWD: -?} $    I tried to go back to the normal shell and find out WHERE precmd is:  which precmd   It just changes the prompt to have "1|" in front of it, without giving me WHERE it is. I found a solution , but have no idea where to put it. I'm basically trying to do the same as  (make Busybox shell the default).


I am trying to import a  in Esri GRID format from the USDA into QGIS.  One file ("w0001.adf") can be added using "add raster", but the attribute table and other info register as error or errors.  Using the "ArcInfo/Binary directory" does not work either.


Use Taylor Series to arrive at the expression for the forward approximation for a derivative. $$f'(x)\approx \frac1h\left(-\frac32f(x)+2f(x+h)-\frac12f(x+2h)\right)$$  I'm not sure how to even go about this so any help is sincerely appreciated!

I'm not really sure how to go about this.. any help is appreciated.


A critically wounded soldier who recovers gets a permanent Will penalty due to the psychological trauma. Does this stack for each time the soldier has to recover? If so, what's the limit on how low a soldier's Will can go? Does the penalty eventually stop stacking? Do low-Will soldiers always die instead of getting critically wounded? Or can I eventually deploy negative-Will panicky messes?

How much willpower do gravely wounded soldiers lose? The text says they suffer a permanent reduction?


Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array?  I am implementing the IComparer interface in my sorts.


What are common techniques to grade/mark assignments efficiently? Is it better to focus on one question and go through the pile or do them assignment after assignment? Or are there other techniques and tips people have?

I have been assigned to mark student reports for an engineering coursework, which mainly involves the use of a software. The main content of each report is around 15 pages. There are 45 reports in total. I am also required to write feedback to each student. I have not been involved in designing the assignment nor teaching the course.   The professor who assigned me this task told me that the marker last year took about 4 full days to complete the markings, and yet I have spent more than two weeks doing this (and not really doing anything else), and I am not yet done. I did need to spend some time familiarising myself with the subject matter and the software in the beginning, because I have never used the software before, but it is not that difficult to use.   Since this is my first marking experience, I am wondering whether it is normal to have spent so much time marking. Is there any strategy I can adopt to complete the task more efficiently, especially in my case where I am not involved in designing the assignment?


I'm running Ubuntu 16.04  I can't install the latest updates and the error it's giving me is that /boot is full.  Looking in /boot, I see a lot of the following files:  initrd.img-4.4.0-**xx**-generic  vmlinuz-4.4.0-**xx**-generic  vmlinuz-4.4.0-**xx**-generic.efi.signed  config-4.4.0-**xx**-generic  abi-4.4.0-**xx**-generic  System.map-4.4.0-**xx**-generic   **xx** varies from 21 to 38...   Can I and should I delete anything that's not the latest?

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.


I have a following issue. I have a CombBox which should display names of my Quiz class (this class has furthemore a list of Tasks) and I want to remove every single Quiz from the available selection. I also have the Quizzes separated by the Teacher who created them, and I only want to display the according Quizzes to the selected owner in the 2nd ComboBox (I had no issues with this part so far).  Here's my code.  QuizComboBox  public class QuizComboBox extends ComboBox {  public QuizComboBox() {     List<Quiz> quizList = new QuizDao().getAllQuizes();      startTask(quizList);      Platform.runLater(() -> {         setCellFactory(new Callback<ListView<Quiz>, ListCell<Quiz>>() {             @Override             public ListCell<Quiz> call(ListView<Quiz> arg0) {                 return new ListCell<Quiz>() {                     @Override                     protected void updateItem(Quiz item, boolean empty) {                         super.updateItem(item, empty);                          if (item == null || empty) {                             setGraphic(null);                         } else {                             String quizText = item.getName();                             setText(quizText);                         }                     }                 };             }         });     }); }  public void startTask(List<Quiz> quizList){     Runnable task = () -> removeEmptyQuizzes(quizList);     Thread backgroundThread = new Thread(task);     backgroundThread.setDaemon(true);     backgroundThread.start(); }  private void removeEmptyQuizzes(List<Quiz> quizList){     for(Quiz q : quizList){         if(q.getTaskList().isEmpty()){             quizList.remove(q);         }     }     Platform.runLater(() -> setItems(FXCollections.observableArrayList(quizList))); }   }  Here's the listener of the ComboBox with Teachers which updates the items      private void teacherComboBoxListener(){     view.getTeacherComboBox().getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Teacher>() {         @Override         public void changed(ObservableValue<? extends Teacher> arg0, Teacher oldValue, Teacher newValue) {              view.getQuizComboBox().setValue(null);              if(newValue == view.getAllTeachersChoice()){                 List<Quiz> quizList = new QuizDao().getAllQuizes();                 view.getQuizComboBox().startTask(quizList);             }             else {                 Teacher selectedTeacher = (Teacher) view.getTeacherComboBox().getSelectionModel().getSelectedItem();                 List<Quiz> quizList = selectedTeacher.getQuizList();                 view.getQuizComboBox().startTask(quizList);             }         }     }); }   I'm getting the following exception    Exception in thread "Thread-5" java.util.ConcurrentModificationException     at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)     at java.util.ArrayList$Itr.next(ArrayList.java:851)     at view.controlElements.QuizComboBox.removeEmptyQuizzes(QuizComboBox.java:51)     at view.controlElements.QuizComboBox.lambda$startTask$1(QuizComboBox.java:44)     at java.lang.Thread.run(Thread.java:745)   EDIT: I've tried @fabian's solution and it works with quite a big bug, it removes all the Quizzez with empty TaskList from my database.      private void removeEmptyQuizzes(List<Quiz> quizList){     for(Iterator<Quiz> iterator = quizList.iterator(); iterator.hasNext();){         Quiz q = iterator.next();         if(q.getTaskList().isEmpty()){             iterator.remove(); // removed from db also         }     }     Platform.runLater(() -> setItems(FXCollections.observableArrayList(quizList))); }

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I have had my dedicated server for 2 months or so, having transferred from a different, very expensive, old and slow dedicated server, for all those reasons. Initially it got onto 1 or 2 blacklists which I hastily got them off (I now have a monitor on this with mxtoolbox.com) and my new IP address now has a good reputation on every checker I can find and a score of 97 on SenderScore. I have set up my clients domains with the appropriate rDNS, DKIM and DMARC DNS records and as a result they score either a 9/10 or 10/10 rating on mail-tester.com but I have daily reports from my clients of experiencing bounce backs from people they have been sending emails to successfully for years! These seem to mostly be returned with the following error:  550 rejected      is temporarily blocked  or  550 5.7.1     : Recipient address rejected  My server is a Linux server running Plesk Onyx. It runs Postfix as it's mail server and Dovecot as the POP3/IMAP server. It allows relaying but only with SMTP authorisation (I have to allow this as one of my largest clients uses Shopify and requires relaying to be allowed). I'm not an expert in this particular field (I'm a developer and app programmer) but I have SpamAssasin working on all accounts with a low threshold of 4 as people have been receiving a lot of spam in the past and I wanted to sort it with this new server. I also have other things in place to protect from incoming spam, but it's this outgoing bouncing that's really bothering me... what more can I do when everything I check tells me I have a decent server setup and reputation?! Expert help needed!!  I should add that none of my customers have sites that allowing spam to be sent through them and none are sending abusive mass emails.

This is a  about avoiding outgoing mail being classified as spam.   Also related:                    I'm wondering how to prevent my emails from my site being marked as spam? I'm using sendmail.  I'm trying to send emails through my ruby-on-rails application. The mails are all written in swedish (if that does make a difference?). I don't know why they keep getting marked as spam.  Are there any things that I can do to minimize the risk?


I already have Windows 10 and ubuntu dual booted in my laptop and I would like to triple boot it with El Capitan.   Is it safe? And will it affect other OSes?

I would love to triple-boot Windows XP Pro, Ubuntu 12.10, and Backtrack 5 R3, but is this safe for my harddrive/other OSs on the computer?


In Star Wars, Episode 4, Owen Lars appears to be mistrustful of Obi-Wan.  I presume he knows who Luke's father is, and obviously Obi-Wan is the one who drops off Luke with Owen and Beru.  Is there any information on the relationship between the Lars' and Obi-Wan on Tatooine?  I suppose the real subtext of this question is:  What is it that caused Owen to be mistrustful?  Was it just out of fear for Luke, knowing what Obi-Wan planned for him as part of the rebellion, or was there anything in their history, post Episode 3, that explains it?

From the movies we know that Obi-Wan Kenobi delivered Luke Skywalker to Owen and Beru Lars to raise on Tatooine shortly after Luke was born at the end of RotS (Episode 3).   The next think we know is Luke running into Ben Kenobi during A New Hope.   There seems to be a hint that there was at least SOME communication between Kenobi and Lars family based on him telling Luke:     Your father wanted you to have this when you were old enough, but your uncle wouldn't allow it.   (though it's possible that was referring to Kenobi offering to leave the lightsaber to Larses at the same time he dropped off Luke)  I was wondering if any details of what transpired between Kenobi and Larses in the years between RotS and ANH were noted in any canonical works (of any canon, including EU books/games/comics/etc...)?


Death Star 2 is protected by a shield generated on the sanctuary moon of Endor.    This opens up a tactical risk of the shield generator being attacked on the ground.      If the shield was generated by the Death Star itself, that risk would be mitigated. Is there any practical or technical explanation (any level of canonicity, and fine if it's Star Wars tech mumbo jumbo) for why it has to be generated from the moon?

Isn't the point of the Death Star that you can use its lasers to destroy any planet or capital ship nearby? Then how could the Empire use the Death Star if it has to stay close to Endor at all times, because its shield generator is there? It seems that the Rebels just need to wait for the Death Star to move away from Endor and render itself vulnerable.


I need to show that $x^3 - 6 = 25y^2 + 35y$ has no non-zero integer solutions. I tried moving things around and factor. Or use modulo 5 and 7 reductions for something shady to become a quadratic residue of a prime. I also couldn't really come up with something to use infinite descent. Hints would be appreciated. This was a problem for non-linear diophantine equations (Pythagorean triples, rational points on curves, Fermat's last theorem, Pell's equations, etc.) in last year's elementary number theory exam.

Proof by contradiction:  1. Suppose  $x^3 + 3 =4y(y+1)$ has an integer solution   Then  $x^3 + 3 =4y^2+4y$ Then  $x^3 + 3 + 4 = 4y^2 + 4y + 4$ Then $x^3 + 7  = (2y + 2)^2$   Not sure how to simplify it further...


For each of the eight subsets of {reflexive, symmetric, transitive}, find a relation on $\{1, 2, 3\}$ that has the properties in that subset, but not the properties that are not in the subset.  What I have done This is the same question asked . I have found the same possible subsets. But for each of them instead of establishing the relationship via ordered pairs, I have defined them with an operation. The possible subsets of {reflexive, symmetric, transitive} are $T_0=\{\varnothing \}, T_1=\{\text{Reflexive}\}, T_2=\{\text{Symmetric}\}, T_3=\{\text{Transitive}\}, T_4=\{\text{Reflexive, Symmetric}\},  T_5=\{\text{Reflexive, Transitive}\}, T_6=\{\text{Symmetric, Transitive}\}, T_7=\{\text{Reflexive, Symmetric, Transitive}\}$. For $T_{0}$, define the relation $\rho$ on $\{1, 2, 3\}$ via  $a\rho b$ iff $a-b=1$. For $T_{1}$? For $T_{2}$, define the relation $\rho$ on $\{1, 2, 3\}$ via  $a\rho b$ iff $ab$ is even. For $T_{3}$, define the relation $\rho$ on $\{1, 2, 3\}$ via  $a\rho b$ iff $a<b$. For $T_{4}$, define the relation $\rho$ on $\{1, 2, 3\}$ via  $a\rho b$ iff $|a-b|\leq 1$. For $T_{5}$, define the relation $\rho$ on $\{1, 2, 3\}$ via  $a\rho b$ iff $a\leq b$. For $T_{6}$? For $T_{7}$, define the relation $\rho$ on $\{1, 2, 3\}$ via  $a\rho b$ iff $a= b$. For $T_1$ and for $T_6$ it is easy to find the relation via ordered pairs, but defining the relation by means of an operation has not been possible for me, could you please help me? If I completed the list using ordered pairs, I think it would be inelegant.

Definition: Given a set $X$, a relation $R$ on $X$ is any subset of $X\times X$.  A relation $R$ on $X$ is said to be  reflexive if $(x,x) \in R$ for all $x \in X$, irreflexive if $(x,x) \not\in R$ for all $x \in X$, transitive if $(x,y) \in R$ and $(y,z) \in R$ implies that $(x,z)\in R$, intransitive (or antitransitive) if $(x,y) \in R$ and $(y,z) \in R$ implies that $(x,z)\not\in R$, symmetric if $(x,y) \in R$ implies that $(y,x) \in R$, antisymmetric if $(x,y) \in R$ and $(y,x) \in R$ implies that $x=y$.   Given any combination of the properties listed above, is there a nontrivial (i.e. nonempty) relation which satisfies that combination of properties?


I have a little problem with the template in c++ I want to build a reusable (generic) class with a generic variable  in c# should be like   public class TestGeneric<T> {     public T Data {get; set;} }   (very stupid example but is just for understand)  I have this three files   TestGeneric.h   #ifndef TEST_GENERIC_H #define TEST_GENERIC_H  template<class T> class TestGeneric {    public:       void setData( T val );       //T getData( void );       TestGeneric();      private:       T data; }; #endif   TestGeneric.cpp   #include "TestGeneric.h" #include <Arduino.h>  template<typename T> TestGeneric::TestGeneric() {   Serial.println("TestGeneric Init"); }   /* template<typename T> T TestGeneric<T>::getData( void ) {   Serial.println("TestGeneric get data");   T d;   return d; } */  template<typename T> void TestGeneric<T>::setData( T val ) {   Serial.println("TestGeneric set data");   data= val;  }   and finally  MainFile.ino  #include "TestGeneric.h"  void setup() {    Serial.begin(9600);     Serial.println("--- Start Serial Monitor---");    Serial.println("--- Start Generic method ---");    TestGeneric<int> myGeneric();   myGeneric.setData();   //Serial.println(v);    Serial.println("### END ###"); }  void loop() {   // put your main code here, to run repeatedly:  }   if I compile my code i'll recieve     /Users/********/Documents/Arduino/****/******.ino: In function 'void   setup()':   ***:##: error: request for member 'setData' in 'myGeneric', which is of non-class type 'TestGeneric()'    myGeneric.setData();                ^ exit status 1 request for member 'setData' in 'myGeneric', which is of non-class type 'TestGeneric()'   someone can help me?

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


When speaking about The Netherlands as a country, should it be considered as a plural or singular word?  Examples:   The Netherlands is a country. The Netherlands are famous for cheese and windmills.   Is there a general rule for this? Do instances such as "The United States of America" and "The United Arab Emirates" follow the same rule?

I was wondering if there was a sentence that contains a country name (or generally a proper noun) that has a plural word in it - e.g., the United States or The United Emirates - how do we treat it? (Sorry if I sound non-technical, as I'm not exactly very good at language).     The United States of America have done something.   OR     The United States of America has done something.   which one is appropriate? Usually, I've been using "has" for countries (treating it as one entity).


Should there be a comma after you in the following sentence?     Here's to you darling.

I see a lot of people saying things such as      Nice work, Nick   Or     Thanks, Mat   Is the comma really needed? I'm not 100% sure because my spelling and grammar is not great, but I think it reads very strange.


Does anyone know what the difference between the /etc/profile and the ~/.bash_profile file is? Which one is executed first?

I would like to concentrate all my login config in my ~/.bash_profile.  There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile.  However, when I log in, something before my ~/.bash_profile gets sourced and displays the following:  Linux ubnt10-dev1 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux Ubuntu 10.04.4 LTS  Welcome to the Ubuntu Server!  * Documentation:  http://www.ubuntu.com/server/doc    System information as of Fri May  9 12:17:39 EDT 2014    System load:  0.01              Processes:           74   Usage of /:   5.5% of 18.58GB   Users logged in:     0   Memory usage: 4%                IP address for eth0: 123.x.x.x   Swap usage:   0%    Graph this data and manage this system at https://landscape.canonical.com/  New release 'precise' available. Run 'do-release-upgrade' to upgrade to it.  Last login: Fri May  9 12:11:52 2014 from 123.x.x.x   I would like to remove that so that only my own splash greeting defined in my ~/.bash_profile gets displays but I am not sure about the logic/sequence of scripts sourced/executed when a user logs in.  Can you enlighten me?  As a bonus, I would also like to know the sequence of automated sourcings/execs when the system starts, not just when a user starts a session by logging in, albeit this is a concern of lesser importance to me right now.


When I look into my Firefox history trying to find a page I've visited recently, the history is usually overwhelmed with google.com search, GMail, Google+ and Google Reader pages (and some other pages equally useless to account).  Is there a way (an extension perhaps) to fight this?

I use Firefox very intensively, and from time to time I clear the browser history. But unfortunately the history is being filled very fast and it always keeps the history I'm not interested in:   Some sites does not make any interest for me at all, and I would like never include them to the history tracker. Other web applications, like Google Reader, use #-links to navigate through the application content, and e.g. for Google Reader the old URLs simply become obsolete because I use "Mark as read". So I don't even see any reason of tracking the #-links in history.   Is there any way/extension/etc to support the features to support either white-lists or black-lists, or particular URL tracking for Firefox? Thanks in advance.


I am trying to install Ubuntu 14.04 LTS on my Sony Vaio desktop. I put the DVD in the drive and get the icon on the bottom showing a keyboard and arrow, and then the screen goes blank and does not ever get beyond that point.  I have tried to install Ubuntu 10.10 on the computer, and that one works, but not the 14.04 I just downloaded. It is not a bad disk, because I have tested it on my laptop and it boots from the DVD just fine.  My computer is a PCV-RZ44G, not sure what specs are needed, but it is a Pentium 4, 2.8 GHZ with a NVIDIA GeForce FX5200 video card with 128 MB memory. Have no idea why it does not boot, unless 14.04 LTS is not compatible with that video card.  Computer used to run Windows XP Media Center, but since XP is no longer supported and I had to replace the HD, I decided to install Ubuntu instead. Also tried booting with no HD connected, same result.  I would like to run the latest version of Ubuntu if possible, and if 14.04 is not compatible, can someone tell me what the latest version I should be able to run would be? The only versions I have a DVD for are 14.04 and 10.10.  Any assistance anyone can provide would be greatly appreciated.  Thanks.

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


I accidentally deleted files including photos from file manager. I tried multiple recovery apps like Dr. Fone, disk digger, etc. but nothing seems to work as my thumbnails, cache and everything from the recycle bin has been deleted. Google photos also doesn't have backup. Can anyone suggest how to retrieve data, especially the DCIM folder without rooting my phone?

Yesterday, I suddenly discovered that I had lost all the user files on the internal memory of my android phone. All my photos, my music, my PDFs, audio recordings, everything. I will explain the events leading up to this in a separate paragraph below.  I have a Lava Z90 phone and I do not use an external SD card, so I must work with my phone to recover all data. I've been googling and following stuff I get from the internet(including Stack Overflow). Here's what I have done so far.   Tried using photo recovery apps available on Play Store. None of them worked. Decided to go more technical. Enabled USB Debugging and OEM Unlocking from Developer options in my phone. Then I used ADB pull command, pull /dev/block/mmcblk0 /home/data.img to try create an image of the entire internal storage so I can analyse it using PhotoRec. It says pull: not found I assumed this is because my phone isn't rooted?  I tried to root it with the KingoRoot apk but that didn't work. I have Ubuntu on my PC and there is not KingoRoot for Ubuntu. My next step would be to use Wine to run KingoRoot on my machine and try to root my phone that way.   I have the following questions:   How can I create an image, a data dump of my entire internal storage that i can later analyse for my data? Can I do it with an unrooted phone? If not, how can I root my phone with ADB? Am I going about this right? Is there a better, easier way to recover data that I should use instead?   Thank you very much.  How I lost my data  I recently uninstalled the TikTok app from my phone. Yesterday I connected my phone to my PC over mtp and found that there were certain leftover folders on the internal memory. One was a folder with Chinese name, one was a folder called ByteDance and one folder called Thumbnails. I assumed that the first two were leftovers from the TikTok app and the third was mere thumbnails. So I deleted them to save space. Nothing happened that day, except that I couldn't access any of my WhatsApp images through WhatsApp(they were still accessible through the gallery). However, when I woke up the next morning, all my data on the internal memory was gone. I still have contacts my messages and my settings, just that everything that was accessible through the file explorer has disappeared.


How can I navigate to a folder by writing it's full path?   /home/john/Desktop/Music instead of navigating to it from the base or from the Home folder?  Is there any program that turn this graphical search bar to a "path searching bar"-ish? Just like the one in Windows?  Graphical path:-

As most of you know, you can switch between the visual location entry, and the text based one in Nautilus, by hitting Ctrl+L.   When I tried to set this value permanently in gconf-editor, it doesn't exist. When I tried to do it via the terminal, this is the message that I receive:  No value to set for key: /apps/nautilus/preferences/always_use_location_entry  I can still switch between the two via the Ctrl+L, but I'm stumped about the fix.


When Euler solved the Basel Problem in 1735, his proof involved the fact that $\frac{\sin x}x$ is the product of the linear factors given by the roots, i.e.   $$\frac{\sin x}x=\cdots\left(1+\frac x{2\pi}\right)\left(x+\frac x\pi\right)\left(1-\frac x\pi\right)\left(1-\frac x{2\pi}\right)\cdots$$  However, one could argue that $f(x)\frac{\sin x}x=\cdots\left(1+\frac x{2\pi}\right)\left(x+\frac x\pi\right)\left(1-\frac x\pi\right)\left(1-\frac x{2\pi}\right)\cdots$ for any $f(x)$ which does not have any roots and is finite for all $x\in\mathbb{R}$, since the roots of $f(x)\frac{\sin x}x$ and $\frac{\sin x}x$ are the same. An example would be $e^x\frac{\sin x}x$.  So, why is it valid to say that  $\frac{\sin x}x=\cdots\left(1+\frac x{2\pi}\right)\left(x+\frac x\pi\right)\left(1-\frac x\pi\right)\left(1-\frac x{2\pi}\right)\cdots$?

How to prove the following product? $$\frac{\sin(x)}{x}= \left(1+\frac{x}{\pi}\right) \left(1-\frac{x}{\pi}\right) \left(1+\frac{x}{2\pi}\right) \left(1-\frac{x}{2\pi}\right) \left(1+\frac{x}{3\pi}\right) \left(1-\frac{x}{3\pi}\right)\cdots$$


I posted a couple of questions as an unregistered user (this is not a Google account or a standard OpenID account).  Later, I added myself as a registered user through my Gmail account.  Is there a way to club both the e-mail addresses and use one account?  I am able to post comments and ask questions, but am unable to delete anything I post (the existing work as an unregistered user).   Has anyone else faced this problem and is there a workaround?

I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit "" in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms)


In Gottesman's introduction, it writes     A code that corrects t errors is said to have distance 2t + 1, because it takes 2t + 1 single-qubit changes to get from one codeword to another.   Other reviews have slight different definitions but I think they are all equivalent. I am still new to QEC...and a little confused about how these $2t+1$ single-qubit changes take place during quantum error correction..Could anyone give a more detailed explanation?  Thanks!

I am confused by a property.  In the N&Chuang it is said that an $[n,k,2t+1]$ stabilizer code is able to correct up to $t$ errors. But for me if the code has distance $d$ it should be able to correct up to $d-1$ error.  Indeed, the distance of a quantum code is defined as the minimal weight of an element in $Z(S)-S$ (uncorrectable errors).  But then, if my error has a weight $d-1$, it is not in $Z(S)-S$ and I will be able to correct it ? Thus an $[n,k,d]$ code is able to correct up to $d-1$ error.  Where is my mistake ?


Suppose $G$ is a finite group and I know for every $k \leq |G|$ that exactly $n_k$ elements in $G$ have order $k$. Do I know what the group is? Is there a counterexample where two groups $G$ and $H$ have the same number of elements for each order, but $G$ is not isomorphic to $H$? I suspect that there is, but I haven't thought of one.

Suppose we are given a finite group $G$, and suppose we know the order of $G$ as well as the orders of each of its elements.  Does this information alone uniquely determine the group up to isomorphism?  What if we add extra hypotheses about $G$ (solvable, simple, etc)?  If not, can we at least extract some useful information regarding its structure?    For example, if $|G| = 8$ and $G$ contains three elements of order $2$ and four elements of order $4$, then I know $G \cong \mathbb{Z}_4\times\mathbb{Z}_2$.


I'm making a room with a table in Blender 2.90.1. It was working fine, until suddenly almost every object started randomly flickering in the viewport. If I don't move at all, somethings are visible and somethings aren't, and when I move or rotate in the viewport, things start turning visible or invisible. It looks fine when I render, but I can't really work on it when I can't see anything useful. Is there a way to fix this or do I have to start over?

I have recently started using blender and one of the models I'm working on has dark shadows along edges. I started this model from scratch. I can't remember them being there when I first started the model, but I had trouble joining areas together and think I've pressed something I shouldn't have. However, there are so many options I'm not sure what I did.  Here is an image of what I mean   The one on the left has the shadow. As a test I started a new model, which is on the right in the image, and as you can see it doesn't have any shadows.  Also, occluded vertices partially show through the model. Occlusion doesn't work properly.   In orthogonal view small darkened triangles appear along the the edges.    I don't really want to start the model again from scratch so any ideas on how to remove this shadow would be great. Thanks.


My preamble is as follows:  \documentclass{llncs} \usepackage{xcolor} \usepackage{harvard} \usepackage{listings} \usepackage{chngcntr} \makeatletter \lst@InstallKeywords k{attributes}{attributestyle}\slshape{attributestyle}{}ld \makeatother  \definecolor{bluekeywords}{rgb}{0,0,1} \definecolor{greencomments}{rgb}{0,0.5,0} \definecolor{redstrings}{rgb}{0.64,0.08,0.08} \definecolor{xmlcomments}{rgb}{0.5,0.5,0.5} \definecolor{types}{rgb}{0.17,0.57,0.68} \definecolor{cyan}{rgb}{0.168,0.568,0.686}  %\counterwithin{lstlisting}{section}  \lstset{language=C++, basicstyle=\ttfamily, literate={~} {$\sim$}{1}, showspaces=false, showtabs=false, breaklines=true, showstringspaces=false, breakatwhitespace=true, escapeinside={(*@}{@*)}, commentstyle=\color{greencomments}, keywordstyle=\color{bluekeywords}\bfseries, stringstyle=\color{redstrings}, basicstyle=\ttfamily, morekeywords= {  abstract, event, new, struct,    as, explicit, null, switch,    base, extern, object, this,    bool, false, operator, throw,    break, finally, out, true,    byte, fixed, override, try,    case, float, params, typeof,    catch, for, private, uint,    char, foreach, protected, ulong,    checked, goto, public, unchecked,    class, if, readonly, unsafe,    const, implicit, ref, ushort,    continue, in, return, using,    decimal, int, sbyte, virtual,    default, interface, sealed, volatile,    delegate, internal, short, void,    do, is, sizeof, while,    double, lock, stackalloc,    else, long, static,    enum, namespace, string, var, \#region, \#endregion }, moreattributes={Assert, Test, GeneticAlgorithmHarmonizer, ExpectedException, InvalidElitismRate, InvalidMutationRate, InvalidPopulationSize,  ScoreManagementUnitTests, TestFixture, Double, Int32, MusicalStyle, KeySignature,     TimeSignature}, % etc... attributestyle = \bfseries\color{cyan}, % (for instance) backgroundcolor=\color{black!5}, % set backgroundcolor basicstyle=\footnotesize% basic font setting }   I have the following listing in my document:  \begin{lstlisting}[basicstyle=\ttfamily, caption={class foo managing private memory},label={lst:baseFoo}]  class foo {   public:     foo() { aReallyLargeArray = new char[123456789]; }     ~foo() { delete [] aReallyLargeArray; }   private:     char* aReallyLargeArray; };  int main(int argc, char** argv) {    foo bar;   }  \end{lstlisting}\bigskip   However, indentation in the input is not preserved in the output. Note how the ~foo() destructor is indented much more than foo on the previous line. This improper indentation occurs in other listings of mine as well. I suspect it has to do with the ~... Any thoughts?

This is a follow-up question to . Why do I experience problems when I copy and paste code inside the lstlisting environment? Should I be careful about tabs or spaces in listings? And if yes, then why is that? How exactly do tabs and spaces affect horizontal spacing in source code typeset with the listings package?


prices = {     "banana": 4,     "apple": 2,     "orange": 1.5,     "pear": 3 } stock = {     "banana": 6,     "apple" : 0,     "orange": 32,     "pear": 15 }  for item in prices:     print item     print "price: %s" % prices[item]     print "stock: %s" % stock[item]   The outout of the following code gives the following output  orange price: 1.5 stock: 32 pear price: 3 stock: 15 banana price: 4 stock: 6 apple price: 2 stock: 0 None   I want to ask why is it displayed in this way (in sorted order) . Isn't banana should come first , then apple , orange and pear ?

Here is the dictionary I have  propertyList = {     "id":           "int",     "name":         "char(40)",      "team":         "int",     "realOwner":    "int",      "x":            "int",     "y":            "int",      "description":  "char(255)",      "port":         "bool",     "secret":       "bool",     "dead":         "bool",     "nomadic":      "bool",      "population":   "int",     "slaves":       "int", }   But when I print it out with "\n".join(myDict) I get this  name nomadic dead port realOwner secret slaves team y x population id description   I know that a dictionary is unordered but it comes out the same every time and I've no idea why.


Very new to python and trying to create a program which takes an inputed number and tells the user if the number is odd or even. I have part of it working, it takes an number and gives the correct output depending on weather its odd or even, but the problem is, if you enter anything but a number, the program dosn't recongise it and crashes the program.   My solution dosn't work and I don't understand the error message.  Enter any number above 0   45 Traceback (most recent call last): line 5, in <module>     if not number.isdecimal(): AttributeError: 'int' object has no attribute 'isdecimal'   My implementation:    while True:     print()     number = int(input("Enter any number above 0   ")) # Ask user to input a number      if not number.isdecimal(): # Trying to get code to reject a input that is not a number instead of crashing the program         print()         print("Incorrect format, please enter numbers")         print()     else:         if number % 2 == 0: # Tell user inputed number is even if number is even             print()             print("That number is even!")         else:             print()              print("That number is odd!")  # Tell user inputed number is odd if number is odd

I have some HTML I am trying to parse.  There are cases where the html attributes alone are not going to help me identify the row type (header versus data).  Fortunately, if my row is a data row then it should have some values that can be converted to integers.  I have figured out how to convert the unicode to an integer for those cases that it is possible to make the conversion.  I am struggling to write the logic to move past the cells that the conversion will not work because the cell has content that must be treated as text.  for example if rowColumn[1][3] can be converted to an integer I can do so by   int(rowColumn[1][3].replace(',','').strip('$'))   but I get an error if rowColumn[1][3] has text content.


I am working on a problem that requires finding the line integral of a vector field along a curve. The vector field is defined by the function:  $$F(x,y)=\left(\frac{y}{x^2+y^2},\frac{-x}{x^2+y^2}\right)$$  which is well defined everywhere except the point $(0,0)$, where it is not defined. The line integral to be done is across the curve defined by:  $$(\cos(t),-\sin(t)),t\in[0,2\pi]$$  The curve is closed, as can be seen and the vector field is conservative as it can be shown to be the gradient of the function $U(x,y)=\arctan\left(\frac xy\right)$ This means that the line integral should be $0$, as the line integral of a conservative vector field over a closed curve is $0$. However after computing it by hand it turns out to be $2\pi$. Why is this the case?

My question is really ''what is the definition of a conservative vector field''?  I've consulted 3 textbooks that all say a vector field $\vec{F}$ is conservative by definition if there exists a scalar potential $\phi$ such that $\nabla \phi = \vec{F}$. Then, they go on to talk about connected domains, path independence and the equality of mixed partials and how they are all related.   In particular, they emphasize that e.g. in $\mathbb{R}^2$ given $\vec{F} = \bigl<F_1,\,F_2\bigr>$, if $\frac{\partial F_1}{\partial y} = \frac{\partial F_2}{\partial x}$ on a simply-connected domain, then $\vec{F}$ is conservative on that domain.  However, without fail, all of them then offer the example of $\vec{F} = \bigl< \frac{-y}{x^2+y^2},\, \frac{x}{x^2+y^2} \bigr>$, pointing out:   it's line integral is not path independent, even though $\frac{\partial F_1}{\partial y} = \frac{\partial F_2}{\partial x}$   and this is explained by pointing out that the domain is not simply connected (if the path contains the origin).  That much makes sense to me: we cannot conclude $\vec{F}$ is conservative based on the partial derivatives, because the domain is not simply connected - totally consistent with what has been presented.  What none of them address is why $\vec{F} = \bigl< \frac{-y}{x^2+y^2},\, \frac{x}{x^2+y^2} \bigr>$ is not conservative when there exists a potential $\phi = \arctan(y/x)$ such that $\nabla \phi = \vec{F}$. None of the texts mention any necessary conditions on the scalar potential. So is the existence of a scalar potential the definition of a vector field being conservative or not?


A teacher of mine says to me that the real numbers is NOT a subset of complex numbers, but that complex numbers has an isomorphic copy of real numbers with the isomorphism $x$ $\rightarrow$ $(x,0)$. I can see this if we consider the complex numbers as $$C=\{(a,b):a,b \in \mathbb{R} \}$$ because the real numbers are not ordered couples.  But what if I consider $$C=\{x+iy:x,y \in \mathbb{R}, i^2=-1\}?$$ Then $\mathbb{R}$ is a subset of $\mathbb{C}$ because $x= x+0$ for all $x \in \mathbb{R}$.  So... $\mathbb{R}$ is a subset of $\mathbb{C}$ or not?  Any help would be appreciated.  NOTE: My question is slightly different from the one "$a=a+0i$?" because I'm taking two definitions of $\mathbb{C}$ but there is more sets isomorphic to $\mathbb{C}$ and I want to know if always the reals are a subset of the complex numbers or not.

I'm having a little argument with my friend. He says that "$a + 0i$" is, in every way, absolutely equal to "$a$" (e.g.: $2 + 0i = 2$).  I say this is practically the case, so in every calculation you just assume that "$a + 0i$" is equal to the real number "$a$" and you always get the right results (this might not even be true, but I am no expert and as far as I can see this is the case). But then again, I believe that just cutting away "$+ 0i$" makes this number is not the same kind of number anymore, it's changed its structure and is not totally equivalent anymore. This is where he says I am absolutely wrong.  So, is it mathematically (strictly speaking!) perfectly fine to say that every complex number with an imaginary part of $0$ is just a real number? Or does this change the mathematical structure so much that it cannot be mathematically-valid but just something that happens to work (which is what I believe)?  I must say that I believe a complex number is one entity, whilst he believes that it is just a conglomerate of other entitites. So, as one said here, "$(a + bi) - bi = a$", I believe is barely a good argument. But then again: is it correct to view $a + bi$ as a single entity (like "$5$" or "$2$", just consisting of multiple symbols)? I'm (as a non-mathematician) not sure there either.


Can a charged point particle ever have spin zero?  If not why?

In the spirit of a  I would like to know if there's a basis for understanding why there  that have non-zero electric charge but zero spin?  Can such a quantum theory be written down and self-consistent? Do the current symmetries of our present QFTs not allow such a particle?


I'd like to know any hints, tips, or pretty much anything on how to find strongholds. I already know that they're frequently found under swamps, and that you can find them with an Eye of Ender, but there has to be an easier way than that right?

I've been searching for hours in the game to find a Stronghold and haven't seen one. Apparently lots of mobs and treasures can be found there, but the question is where can we find those?  Can we find them near a ravine or abandoned tunnels?


For the below code, why the value of cellSide is not 0.80000000000000000 but 0.80000000000000004.  /*****Additional info ******* *#define RADIUS 4 *double cellSide = 0.0  ; *int iCelleParameter=10; *****************************/  cellSide = 2 * RADIUS / (double)iCelleParameter;

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


Can someone explain how an intereface can be forced to be implemented as private or public. Usually when I define an interface, every method/property are public. In the example, using "IEnumerable" produce a public method "GetEnumerator()" but using the interface "IEnumerable" the method "IEnumerable.GetEnumerator()" is private by default.  public class customEnumerable<T> : IEnumerable<T>, IEnumerable {      public IEnumerator<T> GetEnumerator()     {         throw new NotImplementedException();     }      IEnumerator System.Collections.IEnumerable.GetEnumerator()     {         throw new NotImplementedException();     } }   Thanks!

What are the differences in implementing interfaces implicitly and explicitly in C#?  When should you use implicit and when should you use explicit?  Are there any pros and/or cons to one or the other?    Microsoft's official guidelines (from first edition ) states that using explicit implementations are not recommended, since it gives the code unexpected behaviour.  I think this guideline is very valid in a pre-IoC-time, when you don't pass things around as interfaces.  Could anyone touch on that aspect as well?


How can I prove that $$\sum_{n=1}^\infty \frac{1}{n(n+1)} = 1 \,\,\, ?$$  I do know a way to prove this (see my answer) but I'm curious to know what other approaches could be taken in dealing with it.

How can I find the formula for the following equation?  $$\frac{1}{1\cdot 2}+\frac{1}{2\cdot 3}+\frac{1}{3\cdot 4}+\cdots +\frac{1}{n(n+1)}$$  More importantly, how would you approach finding the formula? I have found that every time, the denominator number seems to go up by $n+2$, but that's about as far as I have been able to get:  $\frac12 + \frac16 + \frac1{12} + \frac1{20} + \frac1{30}...$ the denominator increases by $4,6,8,10,12,\ldots$ etc.  So how should I approach finding the formula? Thanks!


Is there any way to find the physical address of a file if the path is provided?

While answering this U&L question titled: , I tried to figure out if it was possible to determine a file's LBA using it's inode.  My answer determined that I could use hdparm as one method for finding LBAs:  $ sudo hdparm --fibmap afile   afile:  filesystem blocksize 4096, begins at LBA 0; assuming 512 byte sectors.  byte_offset  begin_LBA    end_LBA    sectors            0  282439184  282439191          8   But I was curious if there was some method using a file's inode to also get the LBA's; without using hdparm.  I think there might be alternative methods hiding in the tools filefrag, stat, debugfs, and tune2fs but teasing it out is eluding me.  Can anyone think of alternatives?    Here's some of my research thus far that might be useful to those brave enough to attempt to answer this.  filefrag  I suspect you could use the tool filefrag to do it, specifically using the results from its -e switch, perhaps by performing several calculations to get there that I'm not that familiar with.  sample output  $ filefrag -e afile Filesystem type is: ef53 File size of afile is 20 (1 block of 4096 bytes)  ext:     logical_offset:        physical_offset: length:   expected: flags:    0:        0..       0:   35304898..  35304898:      1:             eof afile: 1 extent found   inodes  Another potential method I suspect might have potential is to use a file's inode information, either directly or through some complex math that is poorly documented on the interwebs.  Example  First we find out the file's inode. We can do this using either the stat command or ls -i.  stat  $ stat afile    File: ‘afile’   Size: 20          Blocks: 8          IO Block: 4096   regular file Device: fd02h/64770d    Inode: 6560281     Links: 1 Access: (0664/-rw-rw-r--)  Uid: ( 1000/    saml)   Gid: ( 1000/    saml) Context: unconfined_u:object_r:user_home_t:s0 Access: 2013-12-27 18:40:12.788333778 -0500 Modify: 2013-12-27 18:40:23.103333073 -0500 Change: 2013-12-27 18:44:03.697317989 -0500  Birth: -   ls -i  $ ls -i  6560281 afile   With the inode information in hand, we can now open up the filesystem this file resides on using the tool, debugfs.  NOTE: To determine the filesystem a file resides on you can use the command df <filename>.  Now if we run debugfs and run the command stat <inode #> we can get a list of extents that contain this file's data.  $ sudo debugfs -R "stat <6560281>" /dev/mapper/fedora_greeneggs-home debugfs 1.42.7 (21-Jan-2013) Inode: 6560281   Type: regular    Mode:  0664   Flags: 0x80000 Generation: 1999478298    Version: 0x00000000:00000001 User:  1000   Group:  1000   Size: 20 File ACL: 0    Directory ACL: 0 Links: 1   Blockcount: 8 Fragment:  Address: 0    Number: 0    Size: 0  ctime: 0x52be10c3:a640e994 -- Fri Dec 27 18:44:03 2013  atime: 0x52be0fdc:bbf41348 -- Fri Dec 27 18:40:12 2013  mtime: 0x52be0fe7:18a2f344 -- Fri Dec 27 18:40:23 2013 crtime: 0x52be0dd8:64394b00 -- Fri Dec 27 18:31:36 2013 Size of extra inode fields: 28 Extended attributes stored in inode body:    selinux = "unconfined_u:object_r:user_home_t:s0\000" (37) EXTENTS: (0):35304898   Now we have the extents information above, and this is where I get lost and do not know how to proceed.  References


I'm currently dual booting OSX 10.13.3 and ubuntu 16.04. But today i think i messsed up my kernel cache and i could no longer boot OSX. I need to mount my OSX partition from ubuntu and manually delete the kernel cache. So I installed hfslus and i tried to mount, but it failed.  ➜ sudo fdisk -l Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 6CCD78C4-5E7F-428E-95C6-07B752925E72  Device             Start       End   Sectors   Size Type /dev/nvme0n1p1      2048   1050623   1048576   512M EFI System /dev/nvme0n1p2   1050624 262000639 260950016 124.4G Linux filesystem /dev/nvme0n1p3 262000640 466800639 204800000  97.7G unknown /dev/nvme0n1p4 466800640 500117503  33316864  15.9G Linux swap   My mount attempt    ➜ sudo mount -t hfsplus /dev/nvme0n1p3 /mnt/macdrive [sudo] password for seun:  mount: wrong fs type, bad option, bad superblock on /dev/nvme0n1p3,    missing codepage or helper program, or other error     In some cases useful info is found in syslog - try    dmesg | tail or so.   I checked syslog and found:  ➜ dmesg -wH | grep "hfsplus" [Feb10 11:00] hfsplus: unable to find HFS+ superblock [Feb10 11:11] hfsplus: unable to find HFS+ superblock [ +20.703327] hfsplus: unable to find HFS+ superblock

My Macbook (Snow Leopard OS) was giving me the rainbow wheel of death so I tried booting into safe mode and repairing the disk, with no luck. So I decided to pull the drive out and plug it into my Ubuntu 12.04 desktop with a SATA to USB cable to recover some data before reinstalling the OS. I'm having a lot of trouble trying to mount the drive. I have installed hfsplus hfsprogs and hfsutils and run the following command.  sudo mount -t hfsplus /dev/sdd1 /mnt/"AppleMount"   Which gives me this error.  wrong fs type, bad option, bad superblock on /dev/sdd1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail  or so   Running dmesg tells me this.  [39666.815423] end_request: critical target error, dev sdd, sector 536 [39666.815429] Buffer I/O error on device sdd1, logical block 62 [39670.526393] sd 6:0:0:0: [sdd] Unhandled sense code [39670.526397] sd 6:0:0:0: [sdd]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE [39670.526402] sd 6:0:0:0: [sdd]  Sense Key : Medium Error [current] [39670.526407] sd 6:0:0:0: [sdd]  Add. Sense: Unrecovered read error [39670.526412] sd 6:0:0:0: [sdd] CDB: Read(10): 28 00 00 00 02 18 00 00 08 00 [39670.526422] end_request: critical target error, dev sdd, sector 536 [39670.526427] Buffer I/O error on device sdd1, logical block 62 [39763.562415] hfs: unable to find HFS+ superblock   So I think I'm stuck at this point. Can anyone guide me in the right direction? Thank you!


My time and date not on the menu bar and the clock is not in the system settings.   I ran sudo apt-get install indicator-datetime and received this error:  Package indicator-datetime is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'indicator-datetime' has no installation candidate

Just like you can see in the screenshot above, sometimes the clock & date won't show up on boot. I have to log off to make it appear again.   Is that because I have a custom-time format in dconf editor ( %a, %d. %h  %H:%M ) ?


I am using android-x86 4.4 RC2 with linux ubuntu on an intel laptop. is there any way to install .apk in ubuntu since they are from linux. If there is a chance for it, please let me know.

Is it possible to run Android apps on Ubuntu? And I don't mean inside an emulator, but natively, as you would with any other application installed using the Ubuntu Software Center.


class Boxing2 {      static Integer x;      public static void main(String[] args) {         doStuff(x);     }      static void doStuff(int z) {         int z2 = 5;         System.out.println(z2 + z);     } }   This code compiles fine, but the JVM throws a NullPointerException     Exception in thread "main" java.lang.NullPointerException     at   Boxing2.main(Test.java:4)   I cannot figure out the reason of this.

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’m trying to motion track a shot where the position it ends on is totally different from the starting position. In other words there are no tracking points that stay throughout the whole video.   How can I set up a tracking scene for the whole video instead of just part of it?

Is it possible to track an handheld shot (there is already an answer on here about tripod shots: ) that doesn't have any visible points in common between the first and the last frame? As an example, imagine a shot of someone driving in a car for thirty minutes. Obviously everything from the first couple of seconds won't be there anymore at minute 15.


I have a very simple project with two sources and one header:   math_precision_io_test.cc (containing main). main contains the following lines:  int retval = 0; retval = write_datum<float>(file1, &f2, "float"); retval = write_datum<double>(file2, &d2, "double");  math_precision_io.cc, containing the functions to be used, including  template<class T> int write_datum(std::ofstream & file, const T * datum, const char* descr) {     static_assert(std::is_same<T, double>::value ||             std::is_same<T, float>::value ||             std::is_same<T, int>::value ||             std::is_same<T, char>::value,             "write_datum is not defined on this class");      if (file.good()) {         const size_t data_size = sizeof(T);         file.write((char *) datum, data_size);         if (descr != NULL) {             std::cout << "Writing datum " << descr << std::endl;         }         return 0;     } else {         return 1;     } }  math_precision_io.h, included in math_precision_io_test.cc, with (among others) the declaration  template<class T> int write_datum(std::ofstream & file, const T * datum, const char* descr = NULL);    Both sources compile ok (objects are placed in dir obj/). When linking with  g++ -g -g3 -Wall -Wunused -Wuninitialized -Wextra -fmessage-length=0 -std=gnu++11 -o math_precision_io_test obj/math_precision_io_test.o obj/math_precision_io.o    I get  math_precision_io_test.cc:74: undefined reference to `int write_datum<float>(std::basic_ofstream<char, std::char_traits<char> >&, float const*, char const*)' math_precision_io_test.cc:75: undefined reference to `int write_datum<double>(std::basic_ofstream<char, std::char_traits<char> >&, double const*, char const*)'   But if I only move the lines of function write_datum from math_precision_io.cc to math_precision_io_test.cc, compile and link, the error disappears.  I cannot understand why.  What is the reason for the error, and how can it be fixed? (meaning keeping the function definition in math_precision_io.cc and linking ok).  Note: The solution to the problem I found is indeed present in answers to the question linked to at the top. But the question itself is different, and one may not find the connection between the two right away. That is precisely what happened to me (otherwise, I would not ask the question).

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