I have this question on SO:    which I originally asked on CrossValidate, and was migrated. But - that happened 6 years ago, and by now, nobody cares it was migrated: Not CV.SX people, not SO people, and not me.  Now, until a short while ago, the migration notification was smaller, less intrusive and below the message. Now it's more prominent - more contrast from page background, and above the message. (Which is why this is not quite a dupe of ).  Why should anybody be bothered with the migration notice for so long, then?  I suggest a time limit be set for the notice appearing. (I don't care that much about the exact number - let's say, maybe 1 month should be ok.)

When a question is migrated from another site, a stub is temporarily left on the original site before being automatically deleted after 30 days. (See )  While questions stubs are automatically deleted from the origin site after 30 days, questions that are nearly a decade old will prominently display their migration status.   Migration notice for   I can't think of any reason a 7-8 year old migration notice would be helpful for the average user, or why it should displayed before protected notices.  If a user does want to see if a question was migrated, they can check a question's , or search .


Firstly, I apologize if this is the wrong place to post this question; I'm not a scientist, just curious. So: if the speed of light (299 792 458 m/s according to Google) is an absolute limit even for relative speeds, then what happens if I throw a rock such that it achieves the speed of light, and then throw another in exactly the opposite direction (at any speed I guess, but lets say speed of light)? What is their velocity relative to one another?

Let's say we have $2$ particles facing each other and each traveling (almost) at speed of light.    Let's say I'm sitting on #$1$ particle so in my point of view #$2$ particle's speed is (almost) $c+c=2c$, double light speed? Please say why I am incorrect :)    EDIT: About sitting me is just example, so in point of view of #1 particle, the second one moves at (almost) $c+c=2c$ speed?


After the Windows 10 1803 update, I started seeing random BSODs.  This was not a problem prior to the update. After trying the Windows 10 Troubleshooting tools and going through the recommendations on the forums, I am still getting a BSOD every 5 to 10 minutes.    The commands:  SFC /SCANNOW   DISM /Online /cleanup-image /restore-health  Report no problems.  The Microsoft Bluescreen Troubleshooter finds no issues.  The Bluescreen Viewer from NirSoft points to NTOSKRNL.EXE but I don't see a specific driver that caused the crash.  This seems to indicate that the 1803 updates are not compatible with one or more of the drivers on the machine.  Are there any third-party tools that can be used to determine the drivers?  Also are there any ways to "ghost" the applications and data on the machine to an External Drive so that they may be used on another PC?  This PC has never recovered from the initial 1803 update.  Are there any diagnostic tools or procedures that can detect issues that are not found by the Windows 10 Troubleshooting Utilities?

Possible Duplicate:          Sometimes I get a BSOD screen for a split second and I have no chance to see the cause of it. It also happens when I am not at the computer. The event log doesn't have enough information. Is there a way or tool that captures the screen when it happens so I can look at the cause later.  I already did a memory diagnostics test so that's not the problem.


I have been doing some reasearch on the proper usage of the phrase "would rather", when there is a change of subject. Most websites I have found suggest that, in that case, "would rather" must necessarily be followed by a past simple clause (a.k.a. unreal past), but some others state that "would rather" can also be followed by the subjunctive form of a verb. For example, consider the following sentences:   I would rather he played with Tim. I would rather he play with Tim.   Which would be an example of the correct use of "would rather"?  Thanks in advance!  Edit: I have searched both in various websites and in my grammar books about this matter, and although mostly every one of them states that the use of unreal past is mandatory when the subject changes, I am trying to figure our whether the subjunctive form would also be correct. That said, I would really appreciate it if you could cite specific quotes or grammar rules along with your reply, so that I can have a well-documented answer to my question. Thanks again!

Consider:     I would rather the walls remain painted in a neutral tint.   Is this proper use of 'I would rather..', without an infinitive immediately following it?  EDIT  suggests that 'I would rather ...' is either followed by an infinitive or by an object (?) + past tense if you would want to include other people. But not the use I propose.


I have this mass of probability is proportional to $$exp[-\frac{\beta}{2}\parallel x-Hz\parallel^{2}-\frac{\alpha}{2}z^{t}C^{t}Cz]$$ and I have to calculate to its distribution but I don't know how, its distribution is $$\mathcal{N}((\alpha C^{t}C+\beta H^{t}H)^{-1}\beta H^{t} x,(\alpha C^{t}C+\beta H^{t}H)^{-1}.$$ $z$ and $x$ are vectors and $H$ and $C$ matrices, Any idea?

I have been trying to derive the posterior distribution in the case of weighted Bayesian regression in the case of multivariate normal distribution for a few days and have been stuck. I am not sure if this is due to lack of my linear algebra skills or if I have done something really wrong.  In my case, the distributional assumptions are:  $$ y = N (B x, W^{-1} \nabla) $$  The parameters $B$ have a normal prior.   $$ P(B) = N (B_0, \Sigma_{B}) $$  The conditional posterior distribution for $B$ is proportional to $P(y|B) P(B)$. This is proportional to:  $$ \exp \big((B - B_0)^T \Sigma (B - B_0) + (y - Bx)^T \nabla (y - Bx)\big) $$  I have seen the textbooks mention something called completing the square which as far as I can tell equates to matching like terms. Even though I could work out for scalar variance terms, I am having trouble figuring out how to deal with the precision matrices and how this can be decoupled.   [EDIT]:  So, I tried to make a run with Glen_b's suggestion and came this far:  Original expression without the exponential (I will simplify notation slightly):  $$ (B - B_0)^T \Sigma (B - B_0) + ( y - Bx)^T \nabla (y - Bx) $$ Expanding:  $$ B^T\Sigma B - 2 B_0^T \Sigma B + B_0^T \Sigma B_0 + y^T \nabla y - 2 y^T \nabla B x + (Bx)^T \nabla Bx $$  $$ = B^T(\Sigma + x^T \nabla x)B - 2 (B_0^T \Sigma B + y^T \nabla B x) + C $$  So I am not sure how to make further progress with the second term. I guess I have to make it in the form 2(some_term)B but not sure how that can be done.


I am a Canadian citizen. I will leave about 70 days into the Schengen visa given 90 days upon my arrival in Italy. I will go to Thailand for 12 days, and then return into England, with the wish for the chances of getting 90 days again (the stamp is for some reason in the middle of my otherwise blank passport you don't open to it directly.) Can I get a renewal done if I get a letter from a non-profit community saying I am wanting to learn and volunteer more? Can I get one in Italy? Portugal? If I re-enter Europe into England, how will they know in Italy when I entered if I then take the train from England to either Italy or Portugal? I was thinking to do this instead of fly to get around the stamp into Schengen.

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


my chrome browsers crashed and I had a lot of tabs open, im unable to restore them. can someone please help?!

How do you restore the window of tabs crashed 1 day ago in Google Chrome? if I have used another window of many tabs in Chrome for 1 day.


I want to know how to make Grub load up when my laptop boots! I searched all over askubuntu forums and the answers I found were from 9 years ago! Feel free to ask questions! I will accept all edits to this post!

My system is not dual-boot, I run a standard Ubuntu desktop system "on the metal" (I think running it in a VM is the same).  Pressing c while booting does not cause the GRUB menu to appear (which I believe it does for a dual-boot system).  How can I get the GRUB-menu to present itself on a single-boot system?


Why didn't I receive an "" hat, when I clearly have 20 hats?  At the moment I received my 20th hat on the SE network, I wasn't awarded a "Aztec" hat. Even after 30 minutes of the hat counter displaying 20, the Aztec wasn't added. Only when I got my 21st hat, the Aztec was immediately added.

I have reached the twenty hat threshold! However, I have not been awarded with The Milliner. At first I thought this could just be a case of being impatient, so I waited, but it still hasn't arrived!    Does this have something to do with my 20th hat being a secret hat? Should I just suck it up and wait until I get my 21st hat?


I want to calculate the distances between some locations in an Excel file using longitude and latitude,with R Software, i've never tried to do it before. If someone can help me, it would be very good.   Many Thanks in advance .

How do I calculate the distance between two points specified by latitude and longitude?  For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to understand the relative accuracies of the approaches available.


I was in a conversation with my senior engineer where he kept on insisting that we can use plural when we write down any unit. I argued that it is not the 'common' practice or even throughout my whole academic career (unfortunately) I haven't found any instance where there was any plural unit used in the text books. He argued that if I said that it was not correct then it should have a good reason for that.  When I searched for this topic I couldn't come to any conclusive decision. Such as  thread and the other links those have been referred there (some leads to English.SE). These answers gave me the impression that it is grammatically acceptable provided the right circumstances.  But I felt that it would be rather ambiguous to accept plurals on scientific and engineering notations.  For example we were talking about output rate of a boiler which is measured in $\mathrm{kg/hr}$. My senior said that it is okay if anyone writes $\mathrm{kgs/hr}$.  To me it looks ambiguous. If anyone writes $\mathrm{s}$ after $\mathrm{kg}$ it may give a plural sense but as well it may refer to second also. Moreover if anyone argues that this is acceptable in some cases (like $\mathrm{kgs/hr}$) then what would be the yard stick to find out accepted cases? For instance can we add $\mathrm{s}$ in $\mathrm{m/s}$ or $\mathrm{km/hr}$ like $\mathrm{ms/s}$ or $\mathrm{kms/hr}$?  There is , which has this .     the length of the laser is $5\ \mathrm{m}$ but not: the length of the laser is five meters   But I want to have more conclusive answer to which one is acceptable i.e. $\mathrm{kg/hr}$ or $\mathrm{kgs/hr}$ (or other similar instances).

I have multiple doubts related to the usage of singular or plural SI base units when written in both symbol as well as name.  I have framed this question under two parts, namely, Part (a) and Part (b). Each part has three sentences which I have written on the basis of my understanding.  Please answer these 6 sentences/questions.   Part (a):   says that while using prefix for e.g., centi as in centimeter, it is   l = 75 cm long.(correct) l = 75 cms long. (wrong)    Does this rule is used for all SI prefixes (having powers of 10)? In this regard, we should be saying, or writing that, "how many cm are there in one metre?" (while saying we should say centimter or centimetres?) Please strike-through the wrong SI unit in the following sentences.  My weight is 70 kg / kgs,  or My weight is 70 kilogram / kilograms.   Part (b):  and the page next to above web link says, we should write:  2.6 m/s, or 2.6 metres per second.   In this regard, we should say, or write:   Its speed is 0.26 metres per second.  This pipe is 0.75 metres long. How many cm are there in 2 metres?


I am creating a contract in excel and I do not want the line item pricing to appear when printed.  Changing the font color to white is time consuming so not an option.  Hiding the group of cells would destroy the sheet when printed.  Is there a way to format the group of cells so the text will appear on the screen but not when it is printed?

How can I prevent the contents of specific cells (or entire row or column) from printing in Excel, while keeping them visible on the screen when I'm editing the file? Ideally I should be able to do this to cells in the interior of the spreadsheet (i.e., not just the rightmost column(s) or the bottom row(s)). Hiding row(s) or column(s) is not acceptable because I need to maintain the cell size, to maintain the overall appearance of the sheet.  I've looked for a way to define a conditional format that's conditional on whether Excel is currently printing, but there doesn't seem to be any such thing. I've been manually setting the text color to white before printing (and manually reverting it afterwards), but it seems there should be an automagic way of doing this.


I've looked through quite a few other posts about this issue and they always seem to get resolved by some iTunes or document storage that the Mac is accidentally tracking as part of the "other" storage. But my Mac has no files on it except for System files and Steam. I used it a long time ago but wiped everything clean, now there's 87GB of other files somewhere? I don't see them in any directory, DiskDaisy shows them as in hidden hidden space, but I don't have the money to pay for DiskDaisy to do Admin Scan. I just want to be able to use my Mac again lol. No TimeMachine, no caches that I can find, I've tried quite a few things so far  I'll continue looking while I wait to see if this gets any responses, getting frustrated here :/

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


PHP's http_build_query function Generates URL-encoded query string I need the exact same functionality in javascript.   Function example:  $data = array(     'foo' => 'bar',     'baz' => 'boom',     'cow' => 'milk',     'php' => 'hypertext processor' );  echo http_build_query($data) . "n";   Output:  foo=bar&baz=boom&cow=milk&php=hypertext+processor   I want the same output in javascript. I tried encodeURIComponent but it's solving adifferent purpose.

Is there any way to create the query parameters for doing a GET request in JavaScript?  Just like in Python you have , which takes in a dictionary (or list of two tuples) and creates a string like 'var1=value1&var2=value2'.


I bought a 4th generation iPad in 2013 and it is still serving me well. However, I recently broke the 12W power adapter that came with the iPad. I have looked for a replacement on the Apple website and have found a 12W adapter that looks the same as the one I received with my iPad. However, on the list of devices that are said to be compatible with this adapter, the 4th generation iPad does not appear. I was wondering if the adapter that Apple sells is still the same or if it is different now? If it is different, would I be able to use it with my iPad? I want to make sure to take these precautions so that I don’t damage the battery life on my device.

If there is only the Macbook 12 inch USB-C charger nearby, can it be used to charge other USB-C devices, such as any Android phones that also use USB-C? (will it be "too powerful" and damage other devices?)  Vice versa, if there is a Quick Charge 2.0 or 3.0 USB-C charger from other devices nearby, can it be used to charge the Macbook 12 inch?  The main concern is about whether it could damage the device or battery.


How to prove $(\sqrt2 n^2)_{n\in \mathbb{N}}$ is uniformly distributed mod 1.  I tried using Weyl's criterion but I seem to go nowhere.   Thank You very much.

The Weyl equidistribution theorem states that the sequence of fractional parts ${n \xi}$, $n = 0, 1, 2, \dots$ is uniformly distributed for $\xi$ irrational.   This can be proved using a bit of ergodic theory, specifically the fact that an irrational rotation is uniquely ergodic with respect to Lebesgue measure. It can also be proved by simply playing with trigonometric polynomials (i.e., polynomials in $e^{2\pi i k x}$ for $k$ an integer) and using the fact they are dense in the space of all continuous functions with period 1.  In particular, one shows that if $f(x)$ is a continuous function with period 1, then for any $t$,  $\int_0^1 f(x) dx = \lim \frac{1}{N} \sum_{i=0}^{N-1} f(t+i \xi)$. One shows this by checking this (directly) for trigonometric polynomials via the geometric series.  This is a very elementary and nice proof.  The general form of Weyl's theorem states that if $p$ is a monic integer-valued polynomial, then the sequence ${p(n \xi)}$ for $\xi$ irrational is uniformly distributed modulo 1.  I believe this can be proved using extensions of these ergodic theory techniques -- it's an exercise in Katok and Hasselblatt.  I'd like to see an elementary proof.  Can the general form of Weyl's theorem be proved using the same elementary techniques as in the basic version?


I am trying create a transparent plastic material. I am not sure why I am getting black areas on the transparent material...    What should I do to fix this and/or what might be some good resources to learn about what causes this?  Thanks for any help.

Using v2.73, cycles and a very simple scene: an array of cubes, no big deal.   If I set the shader's material to transparent, the cubes in the foreground do become transparent but those far away in the back do not disappear completely and this strange dark things appear (visible in rendered mode and in final renders)    I've played with the clipping distance on the viewport and camera, but I can't figure out how to make those ghosts go away...


I have Mac Version of office 2011. Can I install that in Ubuntu 14.04LTS?

Just wondering, are there any projects like WINE, but for Mac software? That is, can we use a program that acts like a compatibility layer to run Mac apps?


If $p$ is a prime. Then $x^{2} \equiv-1\ \pmod p$ has a solution if and only if $p\equiv 1\ \pmod 4$. Please explain in the easiest way.

I came across this problem and I believe Lagrange's theorem is the key to its solution.  The question is:     Let $p$ be an odd prime. Prove that there is some integer $x$ such that $x^2 \equiv −1 \pmod p$ if and only if $p \equiv 1 \pmod 4$.   I appreciate any help.  Thanks.


I'm trying to figure out the best way to layout this rough in. I'm ok with the location of the toilet and shower. However the sink rough in is throwing me a bit. The pipe running down from the ceiling sticks out on the way down. How would I overcome this issue? I believe I would have to dig up the concrete and move it so it's more vertical. Otherwise it doesn't seem like there's much room from the toilet to finished wall.

The attached picture might show better, but I want to get as much room as I can and based on the current rough ins, it looks like the pipe comes out at an angle from the wall. Does it make sense to dig up the concrete and make a more vertical path? I'd like the framing to be more straight.  Here's the proposed layout (the left layout, ignore the other two). Basically I want a stand up shower on the left, toilet in the middle, and sink on the right. The drain going into the ground for the sink is what's throwing me off.   Added a new picture of wider angle.


In Blender Internal we can use light probes (setting: angmap) to illuminate scenes. I'd like to use the same light probes in Cycles as in Blender Internal. However, I can't find the right settings in Cycles and therefore the background is distorted.   Any ideas how to fix it?

I'm interested in inserting 3D rendered objects into a real scene in a photo (and eventually video) and using image-based lighting.  I took the following photo of a mirror ball (pretty low-res):    I then tried following  which was one of this only resources I could find giving step-by-step instructions for mirror balls:   switch to Cycles go to the World tab add a Background surface specify Environment Texture open the above sphere.jpg select Mirror Ball select Vector = Mapping select  Vector = Texture Coordinate > Generated   This generates the attached garbage.  Why, and what should I do instead?  I'd like to stick with mirror balls since they're much faster/easier to capture than a 360-panorama.  Thanks!    Update: here are the results after following Spencer's answer, before (original) and after—still seems kinda fake (any tips?), but it was fun for a first stab.  Some details:   I just pointed the camera from the front view I left the background transparent and gimped it in later I clicked the Smooth button under Shading on the left toolbox or else the monkey looked extremely polygonal I added Glossy BSDF material on the monkey I added a Sun light - not sure that that helped actually


tl;dr: I failed to enable BitLocker on my tablet's system drive for the first time and now I see an error each time I restart Windows or try to enable BitLocker again. Windows claims that this is due to not configured Windows Recovery Environment and I don't know, what to do next.  I have a Windows 10 Pro-based tablet with TPM available and wated to enable BitLocker encryption on drive C: (system drive and the only one in fact, of that matters).  I enabled it for the first time and I went through few steps of its wizard. First, Windows checked, if my hardware allows to use BitLocker. This step passed without problems. Next, I saw a screen in which Windows claimed, that it is moving Windows Recovery Environment to some other (hidden) partition. Reasons for such move remains unknown to me.  In third screen or step I saw I question, where to I want to store encryption key and three options:   save it to Microsoft account, store it on USB, print it.   This is a tablet with only microUSB port. I didn't have microUSB-based pendrive or microUSB OTG cable when enabling BitLocker for the first time. And I have my Windows 10 with only single local account. Thus, non of above options was available for me and Next button was disabled.  I've clicked X, seen some error message and shut down my tablet.  When I started it again next day I saw following error during Windows start-up:    Now, I can see it with every Windows 10 restart. This is really weird for me, because -- as I wrote above -- BitLocker configuration was not finished and thus neither BitLocker is enabled nor encryption key is put to TPM.  Each time I try to re-enable BitLocker for C: drive I see following error:    I don't understand, how it is possible that Windows managed to move Windows Recovery Environment from C: drive to a hidden partition, but isn't able to move it back?  Anyway, can anyone shed some light and explain me, what should I do now or how to proceed from this point? How to move back Windows Recovery Environment manually? How to get rid of that startup error message? And the most important -- how to enable BitLocker and encrypt my system drive on my tablet?

Using a brand new Surface Pro (first generation) out of the box, installed current updates, then 8.1, and any further recommended updates after 8.1 was installed.   I've installed a two other things that don't seem connected to the issue: the Cisco Anywhere VPN client and Visual Studio 2013.  I'd like to enable Bitlocker, but during the verification step, the following error is displayed, with no options to continue:     This PC deosn't support entering a BitLocker recovery password during startup. Ask your   administrator to configure Windows Recovery Environment so that you can use BitLocker.   The "administrator" in this case is me, and I don't:   ... understand why this has happened ... know how to fix the issue, as if it's really necessary to make this change, what would I do?


I am writing java code for sorting an Integer array using my own custom Comparator, the code I written has a block :  Arrays.sort(arrI, new Comparator<Integer>() {      @Override     public int compare(Integer o1, Integer o2) {          return o2.compareTo(o1);     } });   Where I'm getting a NullPointerException at this line :  return o2.compareTo(o1);   The reason is perhaps in the method where I'm taking the arguments are just the reference variables (they haven't been initialized with the object value). But knowing that I can't do anything. I'm simply over riding the method which I don't know how and when it is called. So I can't actually solve this problem.  How can I remove the exception?  My complete code is:  import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; import java.util.*;  public class Prob1 {      public static void main(String []args)     {         int arr[] = new int[10+5];         Scanner scanner = new Scanner(System.in);         int n = scanner.nextInt();         for (int i = 0; i < n; ++i)         {             arr[i] = scanner.nextInt();         }         Integer arrI[] = new Integer[arr.length];         int i = 0;         for(int value  = 0; value < n; ++value)         {             arrI[value] = Integer.valueOf(arr[value]);         }         Arrays.sort(arrI, new Comparator<Integer>()         {             @Override             public int compare(Integer o1, Integer o2) {                  return o2.compareTo(o1);             }         });         for (int k = 0; k < arrI.length; ++k)         {             System.out.println(arrI[k]);         }            }  }

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?


Over 100 years, Methane has a  34 times bigger than Carbon dioxide. Over 20 years, it's even 86 times bigger. How does one arrive at these numbers?  Looking at the following graphic doesn't help either, as the area for Methane barely covers the left margin of the upgoing thermal radiation and Carbon dioxide is at the right margin. The area under the absorption curve for Carbon dioxide is definitely bigger than the one for Methane.    Source:   So what makes Methane a more effective greenhouse gas?

Methane’s absorption bands are centered at 3.2 and 7.2 microns -- far off the peak of the Planck spectrum for a 290 K blackbody near 16 microns.  Moreover, its absorption bands overlap with the water absorption region.  So why is methane considered a stronger greenhouse gas than carbon dioxide, which has an absorption band at 15 microns?


For the past 10 years, we've had 2 5-year variable rate mortgages.  We have more or less won the bet in the fixed vs. variable game.   In the past, the variable was always a lower rate than the fixed.  However, while doing my research I discovered that fixed is now cheaper than variable.  What does this indicate about rate prediction over the next few years?  Is this a prediction that the interest rates will drop?  Typical rate chart: 5 Year Variable Mortgage 3.25% 1 Year Fixed Mortgage 3.49% 2 Year Fixed Mortgage 2.74% 3 Year Fixed Mortgage 2.79% 4 Year Fixed Mortgage 2.94% 5 Year Fixed Mortgage 2.89% 7 Year Fixed Mortgage 2.99% 10 Year Fixed Mortgage 3.19%

This is one of the major banks in Australia:   At present time, the variable rate is 7.80% but the fixed rate is 6.99% for one year.  And it seems most banks in Australia, if you fix the rate (at the moment), you will get a lower rate.  Is this an indication that in the eyes of the banks, that they believe the interest rates are going to down? I just ask because it seems most people in the media think the rates are going up and they've risen about 6 times in a row now.  Could it be that the banks are secretly preparing for rates to drop?


Does it play a role which of both variables X, Y is determined on the other one?  I think in case of a straight linear curve it should provide the same results(?) but what about a quadratic curve: y(x) = x² ?  Will y(x=?)=10=x² be the same like y=x² with x=3,162..?

Let's say that there exists some "true" relationship between $y$ and $x$ such that $y = ax + b + \epsilon$, where $a$ and $b$ are constants and $\epsilon$ is i.i.d normal noise. When I randomly generate data from that R code: x <- 1:100; y <- ax + b + rnorm(length(x)) and then fit a model like y ~ x, I obviously get reasonably good estimates for $a$ and $b$.  If I switch the role of the variables as in (x ~ y), however, and then rewrite the result for $y$ to be a function of $x$, the resulting slope is always steeper (either more negative or more positive) than that estimated by the y ~ x regression. I'm trying to understand exactly why that is and would appreciate it if anyone could give me an intuition as to what's going on there.


How is adding something like     If my answer has helped you, please accept it by ticking the green check mark   interpreted by other SO folks?  Would I be considered a beggar? Do I have the right to demand it in first place or is it totally down to the OP?

I've had a couple of answers today where the OP indicated via a comment that I solved their problem, but the question wasn't upvoted or accepted.  In both cases the person probably wasn't able to upvote since they were new, but they could have accepted my answer. I felt a little guilty asking them to accept the answer, but since it solved their problem I felt that it would help others who stumbled on the question trying to solve their own problem to know that my solution really was the answer. Is asking the OP to accept your answer when they've said that it solved their problem a reasonable thing to do or does that feel like nagging for reputation?


Ubuntu 14.04 - installed apt-get install openssh-server, username is sun and password is 1234 and root also has password 1234.  Remotely connecting and failing to allow me.  suns-MacBook-Air:js sun$ ssh sun@192.168.1.6 sun@192.168.1.6's password:  Permission denied, please try again. sun@192.168.1.6's password:  Permission denied, please try again. sun@192.168.1.6's password:  Permission denied (publickey,password).  suns-MacBook-Air:js sun$ ssh sun@192.168.1.6 sun@192.168.1.6's password:  Permission denied, please try again. sun@192.168.1.6's password:  Permission denied, please try again. sun@192.168.1.6's password:   suns-MacBook-Air:js sun$ ssh root@192.168.1.6 root@192.168.1.6's password:  Permission denied, please try again. root@192.168.1.6's password:  Permission denied, please try again. root@192.168.1.6's password:    EDIT: PC is using ipv4 and ipv6  $ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host         valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000     link/ether d4:be:d9:fd:84:fe brd ff:ff:ff:ff:ff:ff     inet 192.168.1.6/24 brd 192.168.1.255 scope global eth0        valid_lft forever preferred_lft forever     inet6 2a02:a03f:24af:bd00:898f:6294:6b5e:94f6/64 scope global temporary dynamic         valid_lft 345642sec preferred_lft 85306sec     inet6 2a02:a03f:24af:bd00:d6be:d9ff:fefd:84fe/64 scope global dynamic         valid_lft 345642sec preferred_lft 345642sec     inet6 fe80::d6be:d9ff:fefd:84fe/64 scope link         valid_lft forever preferred_lft forever 3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000     link/ether 1c:3e:84:01:bf:86 brd ff:ff:ff:ff:ff:ff

I'm using the default installation of openssh-server for my Ubuntu 14.04 server. I can connect through the console as root like normal, with my username and password. When I try to SSH with the same username/password, however, I repeatedly get Access Denied errors. /var/log/auth.log reports Failed password for root from <ip address> port <port> ssh2, but I'm entering the correct password.  Why can't I connect to the server via SSH, even though the username and password ARE correct?


I found the following squared-loss function for the regression of classification problem: I learned that the expected loss of any classification problem is given by the following: $\begin{gather*}     E[L] = \iint L(t, y(x))\times p(x,t) \,dx\,dt \\\end{gather*}$ $\text{Where L(t, y(x)) is our loss function and x is our input vector and t is the class label }$ $\text{that x will be assigned to}$ $\text{Now, I also learned that a choice of loss function is the squared-loss where L(t, y(x)) = }$ $(y(x)-t)^2$ $Accordingly,$ $\begin{gather*}      E[L] = \iint (y(x)-t)^2 \times p(x,t) \,dx\,dt \\\end{gather*}$ $\text{Since our goal is to minimize the expected loss, we find the derivative of}$ $\text{E[L] with respect to y(x)} \space equal \space to:$ $\frac{\partial E[L]}{\partial y(x)} = 2 \int(y(x)-t) \times p(x,t) dt$ $Setting \frac{\partial E[L]}{\partial y(x)}=0  \text{ means that } y(x) = \frac{\int t p(x,t) \space dt}{p(x)}$ $\text{My questions are: How did we find} \frac{\partial E[L]}{\partial y(x)} \text{ and how did we find the value of y(x) = }$ $\frac{\int t p(x,t) \space dt}{p(x)}$? As in, what are detailed steps to find both values? I'm asking this because the sources that gave these formulas/functions did not provide the detailed steps, they simply went straight to the final solutions.

Referring to , I wonder how to get the derivative of $q(z_k)$, the distribution of $z_k$, in eq. 23 from eq. 22.   Namely, eq. 22 is $L_k = \int q(z_k) \mathbb{E}_{-k}[\log p(z_k | z_{-k},x)]dz_k - \int q(z_k)\log q(z_k) dz_k$ and,  eq. 23 is $\frac{dL_k}{dq(z_k)} = \mathbb{E}_{-k}[\log p(z_k | z_{-k},x)] - \log q(z_k) - 1$  I suppose the derivation uses functional derivatives, which I know little about. I'd very appreciate a detailed derivation.


where can I find the GUI of the ubuntu home directory which is installed from Windows 10 Microsoft store.  how can I move the files present in the C directory of windows 10 to one of the directory in the ubuntu

I am a super newbie for Ubuntu and basically need Ubuntu for a Python package.  I would like to run a Python file in say e:/username/folder1/folder2/python.py. I tried every method online and the only reply is bash: cd./e: No such file or directory. I am not sure whether it is because of the bash windows or virtualenv.  When I use bash on Ubuntu on Windows, ls, it says VIRTUALENV_DIR. cd, it says /home/username. The cd .. etc changes the directory a little, but not another drive, nor the folder I would like it to find.


I want to make a program which outputs the text as if it is typed live. For that, I am printing a word and waiting for 0.2 seconds and then other. I have saw this website:  But the thing is print() keeps on collecting the characters that are to be printed and then flush them after the loop is over. So I am not able to get the result that I want. This is the code: import time  time.sleep(2)  welcome = "Welcome. We will plot a graph in this program"  for i in range(len(welcome)):     time.sleep(0.2)     print(welcome[i], end="")  Please help me. Thanks.

How do I force Python's print function to output to the screen?


If I were to jump one meter in the air and hang for one second, would I fall back down in the same spot or would the earth rotate ever so slightly under me, causing me to land a short distance away from my original point of departure?   I am conflicted on this.  If I look at the equation for angular velocity, I see that $w = v/r$ where $w$ is the angular velocity, $v$ is the linear velocity, and $r$ is the radius of the object I am on (in this case the Earth).  There is another version of this stating that $w$ = $2\pi/t_{rev}$ where $t_{rev}$ is the time it takes to complete one revolution.    Being on the Earth, I have a certain linear velocity, $v_{G}$.  When I jump in the air 1 meter, I am not applying any force except for vertically so I do not believe my linear velocity would change.  However, I am increasing the distance I am from the center of the earth so now my angular velocity would be $w_{A} = v_{G}/(r+1)$.  Therefore, it seems that my angular velocity in the air ($w_{A})$ would be slightly less than my angular velocity on the ground ($w_{G}$).  If I were to recalculate the linear velocity given this discrepancy in $w$, I would get $v_{G}=w_{G}r$ and $v_{A}=w_{A}r$.  This shows I get a small difference unless the radius in $v_{A}$ must account for the jump ($r+1$), in which case I end up with $v_{A} = v_{G}$.  I've gone around in circles trying to decide if one would actually move.  This top answer seems to think you would:   Any insight would be appreciated.  Thank you!

I was reading somewhere about a really cheap way of travelling: using balloons to get ourselves away from the surface of the earth. The idea held that because the earth rotates, we should be able to land in a different place after some time. As we all know, this doesn't happen.  Someone said that the reason why this doesn't happen is because the atmosphere (air, clouds etc.) also revolves around the earth (with the same angular velocity as the earth's rotation). Since we are also part of the atmosphere, our position doesn't change relatively.  Well, I'm not convinced with that answer. Why does the atmosphere rotate along with earth?  Gravitational force is towards the centre of the earth, but I don't see how it's making the atmosphere rotate.


The exercise asked to proof this identity: $$\sum_{n=0}^Ncos(nx) = \frac{1}{2} + \frac{1}{2}\frac{sin((N+\frac{1}{2})x)}{sin(\frac{x}{2})}$$  $$ $$ The solution is using Euler's identity and goes as follows:  $$\sum_{n=0}^Ne^{inx} = \frac{1-e^{i(N+1)x}}{1-e^{ix}}$$ now, taking only the real part:  $$\sum_{n=0}^Ncos(nx) = Re\frac{(1-e^{i(N+1)x})(1-e^{-ix})}{|1-e^{ix}|^2} = Re\frac{1-e^{-x}-e^{i(N+1)x}+e^{iNx}}{(1-cosx)^2+sin^2x} = Re\frac{1-cosx-cos((N+1)x)+cos(Nx)}{2-2cosx} =$$ $$ =^\star \frac{1}{2}+\frac{sin(\frac{2N+1}{2}x)sin\frac{x}{2}}{2-2cosx} =^\star \frac{1}{2}+\frac{1}{2}\frac{sin((N+\frac{1}{2})x)}{sin\frac{x}{2}}$$   Now, I understand everything except the last two equalities (I marked them with $\star$ so it will be clearer). What were the trigonometric identities used in them? I was thinking double angle but I couldn't figure it out exactly. (The $\frac{1}{2}+$ part is understood obviously, since it's just splitting the nominator).  Thanks!

Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$


I am getting the error "<somepath>\obj\x86\Debug\ucBrowser.dll" or one of its dependencies can't be found.  I have not fully investigated what the real problem is, but I really wonder why the IDE would try to find something in the "\obj\x86..." folder.  I would like to have everything placed in one folder, not something in "\obj\", something in "\obj\x86", something in "\bin\x86\Debug". etc-  Can I get this straight?

Does anyone know how to tell VS(2008) where to save the obj folder when building the solution? We have it save the bin folder to another path in order to keep the source file folders small (ie. emailable), but can't find any way to tell it to do the same with obj...


I'm trying to fix this but it doesn't work. Inside the command block. I typed in   /setblock 125 64 617 minecraft:command_block 0 replace {Command:"testfor @a {Inventory:[{id:"minecraft:bedrock"}]}"}   and it said:     [09:58:00] Data tag parsing failed: Unexpected token 'm' at: minecraft:bedrock"}]}"

I need help with a specific command that I am using in a new game that I am creating inside of Minecraft. The command is:  /give @p sign 1 0 {BlockEntityTag:{Text1:"{"text":" [MF2]","color":"gold","clickEvent": {"action":"run_command","value":"tellraw @a [""{"text":"[MF2]  ","color":"gold"},{"selector":"@p","color":"dark_aqua"},{"text":" is now an admin of the server!","color":"white"}]"}}",Text3:"{"text":"Click to join Admin","color":"dark_aqua","clickEvent": {"action":"run_command","value":"scoreboard teams join admin @p"}}"},display: {Name:"Custom Sign"}}   If I take out the /tellraw command then the command works fine, but I need the command in there to announce to the game that a new admin has joined.  With the tellraw command, the error message is the following:  Data tag parsing failed: Unexpected token 't' at: text":" [MF2]","color":"gold","clickEvent":{"action":"run_command","value":"tellraw @a [""{"text":"[MF2] ","color":"gold"}, {"selector":"@p","color":"dark_aqua"},{"text":" is now an admin  of the server!","color":"white"}]"}}",Text3:"{"text":"Click to join Admin","color":"dark_aqua","clickEvent": {"action":"run_command","value":"scoreboard teams join admin @p"}}"   If anyone knows how to fix this, please let me know.


I am a student intending to apply for a 6-month visitor visa. I have monthly savings of about £200 for the last 6 months, which I mentioned in the application, and it's reflected on my bank account. I am going to apply next month. In the last month my mom transferd about £2,500 from her bank account to mine to support my visit, but I mentioned in the application that “no one is paying for my trip”, because if she only has those £2500+£300 in her bank account so if i say that she is paying for my trip I should then provide her bank statement, which I want to avoid.  What should I do to prove the source of this fund to avoid refusal due to money parking? I have a “bank transfer form” for the transaction and a “debit advice”. Would it be enough to provide them with the application? Is there is any other way?

I read somewhere that 'funds parking' in your bank account during last minute is considered as  'mild deception' by consular officers which may lead to a denial.  Please explain why 'funds parking' in your bank account is considered a mild deception?. I see no reason why there is something wrong with this. People are free to do whatever they want with their bank account (e.g could even borrow funds from family) for travel.  I believe visa officers are always looking for several reasons to just deny you a visa.


What is the shortest distance between two circles, the first having center (5,3) and radius 12 and the other with center (2,-1) and radius 6.  When I draw the circle,  I can figure out that the shortest distance between the circles can be calculating by drawing a line through the center point of both of circles, but that is only visual understanding.  Is there any theorem behind this to make sure that my visual understanding is correct?

I know from visual inspection that to find the shortest distance between two non-intersecting circles as shown in diagram below, one needs to connect their centers and then find the distance between the points where this segment intersects the two circles.   But I could not come up with a geometrical proof for this fact.  Question  How would I go about proving the above fact? Any hint would be helpful.


Assuming I'm a bank which seeks for secure hash functions to use in the process of  signing on digital contents.  I'd like to explain / prove why using each one of the following hash functions might be less secure than using SHA-1 (yes, I know SHA-1 no longer considered secure, but the question does consider it as one, or at least states "do not be less secure than sha-1").   $h_{666}(m) = $ some new hash function with 666 bit long output. $h_{ib}(m)=h_{sha-1}(h_{md5}(m))$ $h_{hm}(m)=h_{md5}(m) \oplus h_{sha-1}(m) \oplus h_{ib}(m) \oplus h_{666}(m)$, while the XORing operation here xors the matching bits between two outputs, padding with 0s the smaller ones.   I would say…   I can tell that using new hash function is a bad idea since no one has yet to research and attack it, aside from the fact that more bits is less efficient. Apart from this explanation, I don't see other reason to disqualify this answer. md5 is broken and collisions can be made quite easy, so two different inputs to this function can collide and have the same input to the sha-1 function, which will result in collision between the final outputs. I have no clue how to disqualify this one. The intuition says 'xoring with bad hash functions is not a good idea', but I can't really justify my answer. I also think the padding doesn't actually affect anything, becuase if SHA-1 result is secure then padding 0s to it won't make it collide with other inputs suddenly.   Am I correct, or did I miss something obvious somewhere?  Edit  This is different from  since here the idea is to combine unsecure hash with a secure one. This is not about just combining hashes.

There have been several attacks against hash functions such as $h_{sha1}$ and $h_{md5}$.  Professor A suggests a new function $h_{666}$ with an output length of 666 bits.   Professor B suggests combining the two functions $h_B=h_{sha1}(h_{md5}(m))$.   Professor C suggests combining all four functions $h_C=h_{md5}(m) \oplus h_{sha1}(m) \oplus h_B(m) \oplus h_{666}(m)$, where short messages are padded with zeros where necessary.     Explain / prove why each and every one of these functions may be less safe than $h_{sha1}$.   I couldn't think of anything to say about $h_{666}$, since we know nothing about it, except that it has a constant output length, which I know many other hash function have. I thought it might have to do with the length not being a multiplication of 2, but couldn't reach a specific conclusion.  I think $h_B$ is bad because we know that $h_{md5}$ is known to have collisions, and such collisions will affect $h_B$ as well.  Couldn't exactly understand what's wrong with $h_C$, unless again it has to do with collisions of $h_{md5}$ and/or the safety of $h_{666}$.  Any help would be appreciated, thanks!


I need to prove: If any two norms on a vector space are equivalent then the space is finite-dimensional.  I am aware of the converse of this result that on a finite dimensional vector space any two norms are equivalent. Any kind of hint is appreciated.  Thanks in advance!

The following is a well-known result in functional analysis:     If the vector space $X$ is finite dimensional, all norms are equivalent.     Here is the standard proof in one textbook. First, pick a norm for $X$, say  $$\|x\|_1=\sum_{i=1}^n|\alpha_i|$$ where $x=\sum_{i=1}^n\alpha_ix_i$, and $(x_i)_{i=1}^n$ is a basis for $X$. Then show that every norm for $X$ is equivalent to $\|\cdot\|_1$, i.e.,  $$c\|x\|\leq\|x\|_1\leq C\|x\|.$$ For the first inequality, one can easily get $c$ by triangle inequality for the norm. For the second inequality, instead of constructing $C$, the  is applied to construct a contradiction.   The strategies for proving these two inequalities are so different. Here is my question,      Can one prove this theorem without Bolzano-Weierstrass theorem?   UPDATE:     Is the converse of the theorem true? In other words, if all norms for a vector space $X$ are equivalent, then can one conclude that $X$ is of finite dimension?


I want to change the color of my terminal prompt to black color which is now in green color.

Is it possible to change the colors in the command prompt for the user@computer, as well as the the current directory and command parts of the prompt display?   I've already seen something like this done by OSX users, but I don't know how to do the same thing in gnome terminal (I can only change foreground and background colors).   It'd be very useful when, for example, trying to compile programs that have errors, since long, unformatted messages make it hard to distinguish which lines are commands and which are output.


Objective: Get R-3.4.2 Working on Ubuntu 14.04  I would like to get R-3.4.2 working on Ubuntu 14.04. I've had no success with apt-get.   What I've tried already  Installing Ubuntu 16.04:   For reasons that escape me, the 16.04 installation doesn't play nicely with my computer--the installation crashes when it attempts to install GRUB and screws up the master boot record. To repair it, I have to boot from media and run an repair utility, at which point I'm back to square one.  Using apt-get install r-base:  It installs R-3.0.x and then attempting to upgrade to 3.4.2 using the instructions  failed. The initial install goes fine, but I have packages that rely on R 3.2 or higher that I need to execute some of my code.  Using the tarball from CRAN:  Opening the INSTALL readme gives the following instructions     As you are reading this file, you have unpacked the R sources and are   presumably in the top directory.  Issue the following commands:   ./configure make   Running ./configure returns      configure: error: No F77 compiler found   which I Googled and came up with a link to this , which recommended that I install the latest version of gcc with yum install gcc, which I tried with sudo apt-get install gccand received a message that gcc is already installed and already the latest version.  My question  What can I do to make the R tarball find the correct gcc compiler upon sudo apt-get configure?

I am using Ubuntu 16 to run an old code written in Fortran. I get this error when running the "make" command (I have a "makefile"):  "f77: Command not found"  I have tried installing others such as gfortran or g77, but they do not resolve the issue. I guess I need the exact f77 package to do so, which seems unavailable in Ubuntu 16. Any idea how to get this package?  Thanks,


In simple linear regression for the problem Y=aX+b; the "goodness" of the coefficient a can be estimated through a hypothesis test which computes the statistic, $t=\frac{a'-0}{SE(a')}$.   Which of the following follows a t distribution:  1- Is it t?  2- Is it a?  3- Is it both?  If one computed some other measure such as $t_2=\frac{2a'-0}{8SE(a')}$, would it also follow a t-distribution as long as it is computed on a sample? why/why not?

In practice, using a standard T-test to check the significance of a linear regression coefficient is common practice. The mechanics of the calculation make sense to me.  Why is it that the T-distribution can be used to model the standard test statistic used in linear regression hypothesis testing? Standard test statistic I am referring to here:   $$ T_{0} = \frac{\widehat{\beta} - \beta_{0}}{SE(\widehat{\beta})} $$


I have often observed this: A release of a package has long been made on Github, but if I upgrade it with apt, it is not found. Example:  : They show that 3.9 has already been released for Ubuntu. sudo apt-get install --upgrade libgeos-dev, however, gives me 3.8.0-1build1. Is there a special cause for this? Why do not people upload their code so that it can get installed by apt? Thanks.

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


I've got an iMac from . Will I be able to use this as an external display for the new MacBook Pro? If yes, which adapters will I need? I'm not sure what to make of this info from  about the MacBook ports:     The USB-C port on your Mac notebook supports charging, data transfer, and other modes such as DisplayPort video. You can use a USB-C adapter to connect to HDMI and VGA displays or connect other standard USB devices. This includes devices like iPhones, iPads, and iPods for charging and syncing, and cameras, hard drives, and thumb drives for transferring data.   The USB-C port on your Mac notebook doesn't support Thunderbolt devices or displays.

I have a Surface Pro 4 and an iMac (late 2019). I would like to connect my Surface Pro to the iMac to use the iMac screen as a second monitor.  Is that possible?  What are the requirements to use an iMac as a second screen?


How can I login to original. Want me to start over. Level 18

So I had 20+ Pokemon on my account and today when I tapped on the app, it brought me back to the original screen when you first start playing. My friend who signed up tested using my username when she first started and my username was unavailable, meaning the account still exists. I don't have the password for the account, but I do have the email. So I wanted to know if it was possible to log back into an account?


I am trying to define my own column type and am running in to a misplaced noalign error when using it at the end of a table. I figured out a way to circumvent this using multicolumns, but am still interested in knowing what I am doing wrong. I made a minimal code example:  \documentclass[11pt, a4paper,twoside]{article}  \usepackage{array}   \newcolumntype{C}[1]{>{\centering\hspace{0pt}}p{#1}}   \begin{document}   \begin{table}   \begin{tabular}{ | C{2cm} | C{2cm} | }    \hline     \textbf{foo} &\multicolumn{1}{C{1cm}|}{bar}   \\ %works    %\textbf{foo} & bar   \\ % doesnt work    \hline   \end{tabular}   \end{table} \end{document}   I would be grateful for any insight in what might be the problem here.

Suppose I have simple table. While I want the columns in general to be flush both right and left, there are certain cells that I want to be centered.  \documentclass[12pt,a4paper]{book}  \def\x{This is a paragraph of text that should be flush both right and left. Centering an adjacent cell should not cause this cell to be centered.} \def\y{Centered text}  \begin{document} \centering \begin{tabular}{p{2in}|p{2in}} \x & \y \\ \y & \x \\ \x & \x \end{tabular}  \end{document}   This has the output that I expected.    But what do I do when I want to center the cells that say "Centered text"? I tried to do it with the \centering command,  \def\y{\centering Centered text}   but it comes up with the following error:  ! Extra alignment tab has been changed to \cr.   How can I center individual cells?


I have a button that triggers all buttons on a page, but I need to add a delay of around 5 seconds after each button is pressed. Is this possible? Any help would be appreciated.  function B4() {       document.getElementById("Searchdate").click();   document.getElementById("Search").click(),                                                         document.getElementById("Search1").click();   document.getElementById("Search2").click();   document.getElementById("Search3").click();   document.getElementById("Search4").click();   document.getElementById("Search5").click();   document.getElementById("Search6").click();   document.getElementById("Search7").click();   document.getElementById("Search8").click();   document.getElementById("Search9").click();   document.getElementById("Search10").click(); }

Is there any JavaScript method similar to the jQuery delay() or wait() (to delay the execution of a script for a specific amount of time)?


I have three BoolProperties in my addon (they represent the X Y and Z axes).  At the moment when I add add them in the draw method my panel, they are displaying as checkboxes.  I'd prefer a pushbutton display style where if they are drawn to look like buttons (and displayed as pressed when they are true).  Is there a way to do this?

I want to make a toggle button for my custom operator. It works similar to checkbox: once the button is clicked, the operator keeps running until the button gets another click, so will the button itself greyed out. I tried to achieve the grey-out effect by implementing poll() function like this:  @classmethod def poll(cls, context):           return context.area.type == 'VIEW_3D' and context.region.type == 'WINDOW' and plane_toggle_flag   Every time the button is clicked I want the toggle state to change, so in the operator's init(), I write:  def __init__(self):        plane_toggle_flag=not plane_toggle_flag   However, it seems as long as poll() returns false, the init() function never get the chance to be called. Any idea how to solve this? Thank you in advance.


I need to configure a machine so software installation can be automated remotely via SSH. Following , I was able to setup SSH keys so my user can access the machine without a password, but I still need to manually enter my password when I use sudo, which obviously an automated process shouldn't have to do.  Although my /etc/ssh/sshd_config has PermitRootLogin yes, I can't seem to be able to log in as root, presumably because it's not a "real" account with a separate password.  How do I configure SSH keys, so a process can remotely log in as root on Ubuntu?

I know I can become root (super user) via the su command but I have to authorize it after entering the commands. Is there a way I can become root and authorize (with password) in one line


The problem is that NullPointException occurs at           st = con.createStatement();          rs = st.executeQuery("select * from noit");          rs.next();  but they are declared to be null. The first code is for connection to MySQL and the second is to give a function to a button.  public class database {     public void con(){     Connection con = null;     Statement st = null;     ResultSet rs = null;     String nqkuvsi = null;     try{         con = (Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/userlogin","root","1234");                if(con!=null){             System.out.println("successfull");            }}catch(Exception e){         System.out.println("no connection");         e.printStackTrace();     } } }       connection answers "successful"  public void actionPerformed(ActionEvent a){ db.con();         ResultSet res = null;            int resul = 0;     Object s = a.getSource();                if(s==jbut){      Random rand = new Random();         Random rand1 = new Random();              int rnd = rand.nextInt(2)+1;                         int rnd1 = rand1.nextInt(2) + 2;          String nqkuv = null;          String nqkuv1 = null,nqkuv2 = null,nqkuv3 = null;          if(rnd==1){                               try{                             st = con.createStatement();              rs = st.executeQuery("select * from noit");              rs.next();              nqkuv = rs.getString(rnd1);          }catch(SQLException e){              e.printStackTrace();          }

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?


"Vomit" is not a recent addition to English, and nor does it have a peculiar pronunciation. Yet, the past tense of vomit does not follow the notion that a vowel followed by a consonant and emphasis on the consonant. (For example, past tense of 'emit' is 'emitted'.)

What's the past participle form of the word exit? Is it exit (irregular, like set)? exited? exitted? On one page I found exited but if that's the case why isn't it exitted (double t) like with the word emit - emitted? Is there a rule when the consonant at the end is doubled and when not?


At first we forgot the passcode for our iPad, so we tried to change the passcode but it was connected to an old email address we no longer use.   The iPad is now disabled.  How do we reset it totally without using iTunes?

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


With all the knowledge I possess at this very moment I cannot decide which shall I use for my use case.  This is now example with struct.  The first class looks like this:  class Owner {   public A[] Kids;    public Owner(int count)   {     Kids = new A [count];      // If I would use classes I would need to create new class for each item, right?     // It would look like below and my worries are memory impacts because of new A()     // for(int i = 0; i < count; Kids[i++] = new A());   } }   The second class looks like this:  class Node {   private Owner o;   private int num;   private A[] kids;    public Node(Owner o, int num)   {    this.o = o;    this.num = num;   }    public A[] Kids   {     get     {       this.kids = o.Kids[num].NextList;       return this.kids;     }   } }   The type A looks like this  <struct or class> A {   public int Value;   public A[] NextList; }   The question is now when using structs would the access run faster than when using classes?  Would I get memory overhead when using classes since I would need to initalize each class.  Would I need to take care of killing references when using classes?  Which would you use guys in this case?  I apologize in case this is a duplicate or if i did something wrong. Please tell me what I did wrong before downgrading the question. I am still new to this forum.

Is there any advantage over using a class over a struct in cases such as these?  (note: it will only hold variables, there will never be functions)  class Foo {  private:       struct Pos { int x, y, z }; public:        Pos Position;  };   Versus:  struct Foo {    struct Pos { int x, y, z } Pos; };     Similar questions:


Let $f = x^3+x+1 \in \mathbb{F}_2[x]$. We know that $K = \mathbb{F}_2[x] / \langle f \rangle$ is a ring. I just need to show that is also a field.   Its actually the first time that I need to work with a polynomial in $\mathbb{F}_2[x]$ and Im not sure how to show that $K$ is a field.

I'm new to field extensions and I can neither see why or how to prove this statement.  If I'm not mistaken, to construct a splitting field, you construct rupture fields one after the other, using that the $8$ element field is the splitting field of $X^8-X$ over $\mathbb F_2$, since $2$ is the only prime divisor of 8.  Over $\mathbb F_2$ $X^8-X$ has two roots : $0$ and $1$. Therefore $X^8-X=X(X-1)(1+X+...+X^6)$. The last factor, call it $P$, has no roots. So let $\alpha$ be a root in some extension $\mathbb F_2(\alpha)$ of $\mathbb F_2$.  We now have $P=(X-\alpha)(X^5+\alpha X^4+...+\alpha^4X+\alpha^5)$.  I suspect $\alpha$ might not be the way to go and if so, my second plan would be to reduce $P$. I don't know how to do this but assuming it to be done, hence having $P=P_1...P_n$, I could start using $P_1$'s rupture field, and then my best guess is that if $\mathbb F_2[X]/(P_1)$ is not sufficient, I re-reduce $P$ over this new field and consider the rupture field of one of the factors, and so on.  Now assuming I wasn't given the statement itself, is it elementary to construct the $8$ element field using $\mathbb F_2$ ?


my PC crashed and after reinstalling LaTeX I'm faced with the following errors when trying to plot a large data set from a text file. I'm using LuaLaTeX. I can't seem to find out what is causing this error, but it appears only be at the end of the code, can anyone identify the problem? Thank you  ! Undefined control sequence. \sa@placebox ->\newpage \global \pdfpagewidth =\wd \sa@box \global \pdfpageh... l.47 \end{document}  ! You can't use a prefix with `the character ='. <to be read again> = l.47 \end{document}  ! Missing number, treated as zero. <to be read again> \global l.47 \end{document}  ! Illegal unit of measure (pt inserted). <to be read again> \global l.47 \end{document}   MWE:  \documentclass{standalone}  \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{width=10cm,compat=1.15} \usepgfplotslibrary{external} \pagestyle{empty}  \begin{document} \begin{tikzpicture} \begin{axis}[  y tick label style={         /pgf/number format/.cd,             fixed,             fixed zerofill,             precision=0,         /tikz/.cd     },     %title={Displacement time-history},     xlabel={Time [s]},     ylabel={Displacement [mm]},     xmin=0, xmax=35,     ymin=-10, ymax=4,     xtick={0,5,10,15,20,25,30,35},     ytick={-10,-8,-6,-4,-2,0,2,4},     legend pos=south east,     ymajorgrids=true,     xmajorgrids=true,     grid style=solid,     every axis plot/.append style={thin} ]  \addplot[     color=black     ]     table{45M_S11_M1_U-Z1021.txt}     ;       \legend{Displacement}      \end{axis} \end{tikzpicture} \end{document}   My text file is in the format:  DYNA-HIST   u-Z      1021    0.0000000   0    0.0020000   2.36066E-08  0.0040000   3.0517E-07   0.0060000   1.87772E-06  0.0080000   7.65819E-06  0.0100000   2.34945E-05  0.0120000   5.77034E-05  0.0140000   0.000117438  0.0160000   0.000201915  0.0180000   0.000295498  0.0200000   0.000365356

Since I installed TeXLive 2016 I cannot build documents with the standalone document class any more using LuaLaTeX (PDFLaTeX works fine). For example:  \documentclass{standalone} \begin{document} hi \end{document}   Gives me:  ! Undefined control sequence. \sa@placebox ->\newpage \global \pdfpagewidth                                                =\wd \sa@box \global \pdfpageh...  l.4 \end{document}   How to fix that?


I can't to be able to re-size windows 10 file system partition using Gparted.  The partition is un-mounted and this is not about swap-partitioning    Do help me?

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


In WiFi, I noticed that besides the heading ‘choose a network:’ I have also encountered a heading that says ‘devices’. What does this mean? In the other question, it says this is achieved by creating a network on a Mac, is this possible in any other way?

Has anyone ever seen this ‘Devices’ section in the Wi-Fi Settings page?  It very strange, it's my first time I've seen this. Even more, when I tried to connect to this SSID, iOS pops up a dialog which says "x is not connected to the Internet; Are you sure you want to use this network?"  What is this? How was this achieved?


I want to convert an rtf string to plain text without using Regular expressions  rtfstring = '{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0 Arial;}}{\colortbl;\red255\green0\blue0;\red1\green1\blue1;}\viewkind4\uc1\pard\f0\fs18 {\b Amount/complexity of data to be reviewed:\b0}\par{- Review and summarization of old records}\par}'   Plain text will be  Plaintext = "Amount/complexity of data to be reviewed:- Review and summarization of old records"

I was looking for a way to remove text from and RTF string and I found the following regex:  ({\\)(.+?)(})|(\\)(.+?)(\b)   However the resulting string has two right angle brackets "}"  Before: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}{\f1\fnil MS Shell Dlg 2;}} {\colortbl ;\red0\green0\blue0;} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\tx720\cf1\f0\fs20 can u send me info for the call pls\f1\par }  After: }   can u send me info for the call pls }  Any thoughts on how to improve the regex?  Edit:  A more complicated string such as this one does not work:  {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}}  {\colortbl ;\red0\green0\blue0;}  {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\tx720\cf1\f0\fs20 HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\test\\myapp\\Apps\\\{3423234-283B-43d2-BCE6-A324B84CC70E\}\par  }


I am running a fixed effects regression and I found that one of the significant independent variables has a substantial positive correlation with the dependent variable but a negative unique effect in the regression results.  Can someone explain to me what is going on?  Josh

Perhaps a very basic question but one that has me confused. Say, in a correlation table the relationship between A and the DV (B) is .351, but -.150 in the OLS model (where you have added C, D and E variables), what does this then mean? In other words: if the C to E variables not only change the coefficient of A but even make it go from negative to positive, does that indicate an undesirable interaction effect between the variables used in the OLS? I have been checking the VIF scores for this but based on low VIF I have no reason to fear multicollinearity. What (if anything) is wrong?  I'm trying to wrap my head around this constructing a simple example for myself to understand. Say A is a person's height and B is the distance this person jumps. There probably is a positive correlation (higher means longer legs, means longer distance jumping). What variables C to E would offset this person's height, even to the extent that this person's height is working against him when jumping (making the coefficient between A and DV B in the OLS negative)?


I have roughly the following code. Could this be made nicer or more efficient? Perhaps using std::remove_if? Can you remove items from the map while traversing it? Can we avoid using the temporary map?  typedef std::map<Action, What> Actions; static Actions _actions;  bool expired(const Actions::value_type &action) {   return <something>; }  void bar(const Actions::value_type &action) {   // do some stuff }  void foo() {   // loop the actions finding expired items   Actions actions;   BOOST_FOREACH(Actions::value_type &action, _actions)   {     if (expired(action))       bar(action);     else       actions[action.first]=action.second;     }   }   actions.swap(_actions); }

In the following code I loop through a map and test if an element needs to be erased.  Is it safe to erase the element and keep iterating or do I need to collect the keys in another container and do a second loop to call the erase()?  map<string, SerialdMsg::SerialFunction_t>::iterator pm_it; for (pm_it = port_map.begin(); pm_it != port_map.end(); pm_it++) {     if (pm_it->second == delete_this_id) {         port_map.erase(pm_it->first);     } }   UPDATE: Of course, I then  which I didn't think would be related but answers my question.


Finding $\displaystyle \lim_{x\rightarrow 0}\frac{(1+x)^{\frac{1}{x}}-e+\frac{ex}{2}}{x^2}$ without using series expansion.   I am trying to solve it  using D L Hopital Rule  So $\displaystyle \lim_{x\rightarrow 0}\frac{(1+x)^{\frac{1}{x}}\cdot \frac{1}{x^2}\bigg[\frac{x}{1+x}-\ln(1+x)\bigg]+\frac{e}{2}}{2x}$  again i want to Diff with r to $x,$ but this is to complex  please help me how to short my calculation , Thanks

$$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$   by directly substituting $x=0$ i got $\infty$ by using L-H's rule, i got $-1/8$   the given options are  $a)\frac{24e}{11}$    $b)\frac{11e}{24}$    $c)\frac{e}{11}$    $d)\frac{e}{24}$    may be the question would be  $$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$


keeps trying to change it to "this police." I am talking about multiple police. What am I supposed to say in this case?

In instructional videos I see on the internet, the teacher says "in the U.S and Canada, they automatically use police as plural noun", if it is already plural, then what's the singular of police?


For each $x \in \mathbb{R}$ and $A \subseteq \mathbb{R}$, define $x + A = \big\{ x + a \mid a \in A \big\}$.  Prove that if $A$ is a Borel set, then so is $x + A$, for every $x \in \mathbb{R}$.

Can anyone explain: Let $B$ be a Borel set and $B + a = \{ x + a : x \in B\}$. Why is $B + a$ a Borel set?  I think I have to use some good set principle but not sure how to complete the proof.


My bagel recipe calls for 1 tbsp barley malt syrup. I have diastatic malt powder. How much powder would equal the tbsp of syrup?

When using a water bath for bagels what is preferred to attain the nice brown exterior, Barley Malt Syrup or Non-Diastatic Malt Powder? I see recipes that use either one. What would be the difference in the finished bagel? Will either one effect the texture?


Recently I wanted to get info of struct timespec a field of lstat structure, but I couldn't get any. I tried  $ man timespec $ man -k timespec  timespec: nothing appropriate.   After some time I went through man page of clock_gettime for unrelated query and there I got to know the structure of timespec. But this was accidentally. So timespec word was present in man page of clock_gettime but I was not able to search it.  So, I would like to know, how to search for a word in all manpages? or do a grep kind of search? Any hints?

apropos works great for searching manual page names and descriptions. Is there a similar command for searching the entire contents of the manual pages?


Why is the infinite sum of $ \sum_{k=0}^{\infty} q^k = \frac{1}{1-q}$ when $|q| < 1$  I don't understand how the $\frac{1}{1-q}$ got calculated. I am not a math expert so I am looking for an easy to understand explanation.

Why does the following hold:  \begin{equation*} \displaystyle \sum\limits_{n=0}^{\infty} 0.7^n=\frac{1}{1-0.7} = 10/3\quad ? \end{equation*}  Can we generalize the above to      $\displaystyle \sum_{n=0}^{\infty} x^n = \frac{1}{1-x}$ ?   Are there some values of $x$ for which the above formula is invalid?  What about if we take only a finite number of terms? Is there a simpler formula?     $\displaystyle \sum_{n=0}^{N} x^n$   Is there a name for such a sequence?    This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


My system is Debian 8 (armv7l, a 32-bit processor). I can not understand why two script below are the same format but the second one return error.  root@abcxyz:~# date -s "2037-1-20" Tue Jan 20 00:00:00 JST 2037 root@abcxyz:~# date -s "2047-1-20" date: invalid date '2047-1-20'

I wrote a little bash script that made me stumble across the . I did not know about this problem before and I just dare on posting the --debug output I got from date when my script tried to calculate across this magic date (03:14:07 UTC on 19 January 2038).  date -d "20380119"  date: parsed number part: today/this/now date: input timezone: +01:00 (set from system default) date: warning: using midnight as starting time: 00:00:00 date: starting date/time: '(Y-M-D) 2038-01-19 00:00:00 TZ=+01:00' date: '(Y-M-D) 2038-01-19 00:00:00 TZ=+01:00' = 2147468400 epoch-seconds date: output timezone: +01:00 (set from system default) date: final: 2147468400.000000000 (epoch-seconds) date: final: (Y-M-D) 2038-01-18 23:00:00 (UTC0) date: final: (Y-M-D) 2038-01-19 00:00:00 (output timezone TZ=+01:00) Tue Jan 19 00:00:00 CET 2038   date -d "20380119 + 1 days"  date: parsed hybrid part: +1 day(s) date: input timezone: +01:00 (set from system default) date: warning: using midnight as starting time: 00:00:00 date: starting date/time: '(Y-M-D) 2038-01-19 00:00:00 TZ=+01:00' date: warning: when adding relative days, it is recommended to specify 12:00pm date: error: adding relative date resulted in an invalid date: '(Y-M-D) 2038-01-20 00:00:00 TZ=+01:00' date: invalid date '20380119 + 1 days'   date -d "20380120" --debug  date: parsed number part: today/this/now date: input timezone: +01:00 (set from system default) date: warning: using midnight as starting time: 00:00:00 date: error: invalid date/time value: date:     user provided time: '(Y-M-D) 2038-01-20 00:00:00 TZ=+01:00' date:        normalized time: '(Y-M-D) 2038-01-20 00:00:00 TZ=+01:00' date:  date:      possible reasons: date:        numeric values overflow; date:        missing timezone date: invalid date '20380120'   Is there any way to make GNU date calculate across this date? (on a LINUX 32 bit system)    Operating System: Debian GNU/Linux buster/sid             Kernel: Linux 4.12.0-2-686-pae       Architecture: x86


According to Einstein's  mass and energy are interchangeable. Can you provide some examples where:   Mass gets converted into energy. Energy gets converted into mass.

I know that there's a difference between relativistic and rest mass. Relativistic mass is "acquired" when an object is moving at speeds comparable to the speed of light. Rest mass is the inherent mass that something has regardless of the speed its moving at.  When fusion happens, a certain percentage of the rest mass of two hydrogen atoms is converted into energy. I understand that $E = m_{rest}c^2$.   How does the rest mass of an object turn into energy? Does this involve particle physics? Doesn't this suggest that rest mass can be viewed as some sort of potential energy? It seems to me that it's a sort of locked energy that has to undergo a certain process to expel its energy to surrounding particles.  Also, Why does only a small percentage of rest mass turn into energy? Why not all of it. What dictates how much rest mass gets converted into energy?


For PHP what is the best email validation using preg, NOT ereg because it's deprecated/removed.  I don't need to check if the website exists (it's not like maximum security).  I've found many ways with ereg but they (obviously) aren't good practice.

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


I would like to cleanly install windows 7 on another partition to ubuntu 12.04.  I originally had a windows 7 only machine. I subsequently installed ubuntu 12.04 alongside it by creating a partition.  Windows 7 now seems to be corrupted - when it starts loading it eventually shows a blue screen with what looks like a memory related error message. The boot loader (if that is the right terminology) appears to be working as I can get into ubuntu fine, and windows does start to load.  I am confused about what hard drives and partitions I actually have, and where each OS is. I am not even sure if I have one or two physical hard drives. Here are screenshots of my drives / partitions.     I have a windows 7 CD (came with my PC).  What do I need to do to get windows 7 working again?  FYI: I am not experienced with partitioning, nor massively experienced with windows nor linux. However, I do have a few years of coding experience.

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


I'm new using latex, someone can help mw with this equation, please  How can I do this equation?

How do I insert the line "|" after the equation in LaTeX (see image below)? I'm using LyX so if you can point me to the symbol of that line is also OK.    I don't know if this line has a proper name so the title of this question may be very vague. If you could provide me a name, I'll edit this question's title.


Assume I have a set of data and would like o apply multiple linear regression. As we know multiple linear regression has assumptions such independent variables shouldn't be highly correlated (coefficient <0.8). My question is what to do when assumptions dont hold? Apply nonlinear regressin? If so, how to decide which form to apply?

I learned in my linear models class that if two predictors are correlated and both are included in a model, one will be insignificant. For example, assume the size of a house and the number of bedrooms are correlated. When predicting the cost of a house using these two predictors, one of them can be dropped because they are both providing a lot of the same information. Intuitively, this makes sense, but I have a some more technical questions:   How does this effect manifest itself in p-values of the regression coefficients when including only one or including both predictors in the model? How does the variance of the regression coefficients get affected by including both predictors in the model or just having one? How do I know which predictor the model will choose to be less significant? How does including only one or including both predictors change the value/variance of my forecasted cost?


While staying with some relatives, I noticed that all their windows experience terrible interior condensation at night and am wondering about what they can do to prevent it.  The house is kept to 70 degrees with gas-powered hot water baseboard heaters, and the windows are vinyl double-paned units. The house is 2x4 frame construction with interior drywall, exterior stucco, and I'm being told that the walls are uninsulated(!!!).  They live in a colder part of the high desert southwest where the humidity is very low during the day but rises at night, and where the temperature gets down into the single digits at night during the winter. During this season, the interior of their windows become entirely covered with condensation at around 8 or 9 PM every night without fail. It's kinda weird. What's causing this, and what can they do about it?

On the street, temperatures at night are about -5 °С and about 8 °C during the day. In the apartment it is about 25 °C. So, there is condensation on the windows and I don't want to wipe the windows every time.  How do I prevent condensation on the balcony windows?


My requirement is I have to read data from one service and push this data into different tables(t1,t2,t3 or many more)  For this I created one table to map data field from service to table name and field name.  Eg: fname belongs to user table first name field   Now I am looping through this and creating objects before hand and assigning values from data returned from service by using switch case  T1 objt1; T2 objT2; T3 objT3; For loop mapping data     Switch(mapping data field)     Case "T1":       var obj1 =          entity.GetType().GetProperty(propertyName);     Obj1.SetValue(entity, data.Substring(1, data.Length - 2) == "Y", null);      break;       Case "T2":       // code             break;  Now how do we do this without creating instance of T1, T2 before hand and by not using switch case for every table type  We cannot use System.activator.createinstance because of performance issues with it  I want some solution using dictionary, so that we need not create instances of every class created

Is there a way to create an instance of a class based on the fact I know the name of the class at runtime. Basically I would have the name of the class in a string.


This is the top   \begin {table} \caption {Table Title} \begin{center} \begin{tabular}{| l | l | l |} \hline Measurement& Uncertainty & Range  \\ \hline \hline \end{tabular} \caption*{What is going on} \end{center} \end {table}  This is bottom   When latex compiles,  This is bottom   came right after   This is the top   with the table beneath  This is the top   Is there a way I can fix this  Edit:  % Search for all the places that say "PUT SOMETHING HERE".   \documentclass[11pt]{article} \usepackage{amsmath,textcomp,amssymb,geometry,graphicx} \usepackage[english]{babel}  % Y \usepackage{mathtools} \usepackage{listings} \usepackage{color} \usepackage{fullpage} \usepackage{graphicx} \usepackage[section]{placeins} \usepackage{changepage} \usepackage{tabularx,ragged2e,booktabs,caption}   \setlength{\headsep}{0.5in}   \begin{document}   \textbf{Introduction}  Lorem ipsum dolor sit amet, te noster impetus vix. Bonorum suscipit te vis, ad mutat dissentiet eos, sea probo voluptatum no. Nullam ridens ex usu. An tincidunt posidonium est. Ut sed iriure nominavi expetenda, duo apeirian prodesset at, affert adolescens accommodare mel cu. Purto habemus sed an, qui voluptatibus conclusionemque et.  Ut brute labitur cotidieque sed, duo iudico erroribus suscipiantur ne. Mea illud ridens postea et. In ius quando partiendo aliquando, duo ei graece veritus disputando, sea iusto oportere philosophia at. Quo in ceteros assentior accommodare, sit quod modus et. \\\\  \section*{1.}  \begin{itemize}  \item[1.1)]  Lorem ipsum dolor sit amet, te noster impetus vix. Bonorum suscipit te vis, ad mutat dissentiet eos, sea probo voluptatum no. Nullam ridens ex usu. An tincidunt posidonium est. Ut sed iriure nominavi expetenda, duo apeirian prodesset at, affert adolescens accommodare mel cu. Purto habemus sed an, qui voluptatibus conclusionemque et.  Ut brute labitur cotidieque sed, duo iudico erroribus suscipiantur ne. Mea illud ridens postea et. In ius quando partiendo aliquando, duo ei graece veritus disputando, sea iusto oportere philosophia at. Quo in ceteros assentior accommodare, sit quod modus et. d, duo iudico erroribus suscipiantur ne. Mea illud ridens postea et. In ius quando partiendo aliquando, duo ei graece veritus disputando, sea iusto oportere philosophia at. Quo in ceteros assentior accommodare, sit quod modus et.  \begin {table} \caption {Table Title} \begin{center}     \begin{tabular}{| l | l | l |}     \hline     Measurement& Uncertainty & Range  \\ \hline     \hline    \end{tabular}    \caption*{Caption} \end{center}  \end {table}     Lorem ipsum dolor sit amet, te noster impetus vix. Bonorum suscipit te vis, ad mutat dissentiet eos, sea probo voluptatum no. Nullam ridens ex usu. An tincidunt posidonium est. Ut sed iriure nominavi expetenda, duo apeirian prodesset at, affert adolescens accommodare mel cu. Purto habemus sed an, qui voluptatibus conclusionemque et.  Ut brute labitur cotidieque sed, duo iudico erroribus suscipiantur ne. Mea illud ridens postea et. In ius quando partiendo aliquando, duo ei graece veritus disputando, sea iusto oportere philosophia at. Quo in ceteros assentior accommodare, sit quod modus et.   \end{itemize}    \end{document}

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


I'm coding python 2.7/python 3.8 in linux, and i've been trying to code following function,, def main(database):     try:         connection = None         connection = sqlite3.connect(database) ##this is the error i think         if connection is not None:             print('success')             break         else:             print('oops')             break     except mysqlite3.Error as e:         print(e) if __name__ == "__main__":   main('$HOME/.databases/database.db')  returns following. unable to open database file  i'm wondering, if my python can't somehow access any other directory than directory, where python file is located (/home/user/apps/sqlite3.py), because if i use following code, it works. if __name__ == "__main__":   main('myDB.db') #now the file is located same directory that the python file is located.

I have a string representing a path.  Because this application is used on Windows, OSX and Linux, we've defined environment variables to properly map volumes from the different file systems.  The result is:  "$C/test/testing"   What I want to do is evaluate the environment variables in the string so that they're replaced by their respective volume names.  Is there a specific command I'm missing, or do I have to take os.environ.keys() and manually replace the strings?


I recently did this in a campaign of mine and it... ruffled the DM's feathers to say the least. Arcane Abeyance is a 10th level Arcane Tradition for the Chronurgy Wizard that allows the caster to condense a 4th level spell or lower into a "mote":  When you cast a spell using a spell slot of 4th level or lower, you can condense the spell's magic into a mote. The spell is frozen in time at the moment of casting and held within a gray bead for 1 hour. This bead is a Tiny object with AC 15 and 1 hit point, and it is immune to poison and psychic damage. When the duration ends, or if the bead is destroyed, it vanishes in a flash of light, and the spell is lost. A creature holding the bead can use its action to release the spell within, whereupon the bead disappears. The spell uses your spell attack bonus and save DC, and the spell treats the creature who released it as the caster for all other purposes.  Emphasis mine. As one might tell from my profile, I'm a huge fan of the wonderfully balanced . The following occurred last night in our campaign:  Obnoxious, power-gaming Wizard and party come face to face with a horrible monster with many claws. With an initiative of 31 (because Chronurgy Wizard is wonderfully balanced), the Wizard releases his pre-prepared mote of Leomund's Tiny Hut and summons a hemispherical dome inside of the dungeon, blocking the exit with the party inside. Because Leomund's Tiny Hut allows for objects to pass out of the barrier but not in, the party peppered to death the poor monster without it having any ability to respond while the Wizard smoked his pipe wistfully. The monster, having no magical ability whatsoever, proceeds to waste its turns digging and attempting to dodge as the party massacres the creature in its own home.  My question is, was the above situation legal, RAW? Is this really allowed and can Arcane Abeyance allow for spells with long cast times to be shortened to a single Action?

Some spells have casting times of 1m (Tsunami, Conjure Elementals, etc). I am a low level caster with no access to Wish. Is there a way to prepare the spell (maybe somehow pre-cast it the day before into an item) to be able to use it in combat in a single turn?  If I'm in a defensive position, I can combine a spell with Glyph of Warding. But the Glyph can't move too far, so it won't work if I'm storming the enemy castle and I need my trusty elementals. Spell scrolls and Rings of Spell Storing also maintain the spell's casting time, as far as I know. Sorcerers can only quicken 1 action to 1 bonus action.  What other options are there?


I can't see any Pokémon, but I can see the map, and it won't let me tap the screen. There also aren't any Pokéstops nearby me.

I have found ~3 Pokémon out in the wild I have wanted to catch but when I try to tap them on the map but it doesn't do anything. They eventually run away/disappear after a certain period of time.   When I do manage to click on them to start the battle, I can throw the Pokéball just fine. It just sometimes won't load off the map and onto where I catch them I guess.  I do have my location on and have Wifi! I need help to Catch 'Em All!


Since this morning I can make reviews in SO. I got a question which is answered with a , what should I do rather than commenting the user to ask this as a question?

What is the "Not an Answer" flag and what is its purpose? When should I use this flag? When should I not use this flag? But I'm still not sure if I'm using the flag correctly... An answer is "Not an Answer", but the flag was declined or disputed!   See also:


$a_1=\frac{1}{2},a_2=\frac{\frac{1}{2}}{\frac{3}{4}},a_3=\frac{\frac{\frac{1}{2}}{\frac{3}{4}}}{\frac{\frac{5}{6}}{\frac{7}{8}}}$... Prove that $\lim\limits_{n\rightarrow \infty}{a_n}=\frac{\sqrt{2}}{2}$  Notice that if $\frac{i}{i+1}$ is a numerator, then $\frac{i+2^n}{i+1+2^n}$ is a denominator. Each pair of number which is numerator is different from the pair of number that minus $2^n$.  For example, we notice that $a_3=\frac{1}{2}\frac{4}{3}\frac{6}{5}\frac{7}{8}$ and $\frac{1}{2}\rightarrow 00,\frac{3}{4}\rightarrow 01,\frac{5}{6}\rightarrow 10,\frac{7}{8}\rightarrow 11$  I check the result by MATLAB.

Problem  Let $a_{0}(n) = \frac{2n-1}{2n}$ and $a_{k+1}(n) = \frac{a_{k}(n)}{a_{k}(n+2^k)}$ for $k \geq 0.$  The first several terms in the series $a_k(1)$ for $k \geq 0$ are:  $$\frac{1}{2}, \, \frac{1/2}{3/4}, \, \frac{\frac{1}{2}/\frac{3}{4}}{\frac{5}{6}/\frac{7}{8}}, \, \frac{\frac{1/2}{3/4}/\frac{5/6}{7/8}}{\frac{9/10}{11/12}/\frac{13/14}{15/16}}, \, \ldots$$  What limit do the values of these fractions approach?  My idea  I have calculated the series using recursion in C programming, and it turns out that for $k \geq 8$, the first several digits of $a_k(1)$ are $ 0.7071067811 \ldots,$ so I guess that the limit exists and would be $\frac{1}{\sqrt{2}}$.


I was using the answer to this question ->  to create select box dropdowns. I am wanting to clone a row and reuse the dropdowns that are included in it. I have got it to clone the row, but the dropdowns in the cloned version doesn't work. The clicks do not register. I have also added a class 'hide' to the 2nd dropdown in row 1. I only want to show the 2nd dropdown if the first option is selected, so I remove the class if the 1st option is selected in dropdown 1. This is why I cloned the row outside the function, as when the row is cloned, i want the 2nd dropdown to remain hidden and have the 'hide' class. How can I clone the row (row1) and have the dropdown work in the cloned row?  HTML

     <input type="text" disabled placeholder="Select n1">

Business

Hair

     <input type="text" disabled placeholder="new test">

test

option 2

     <input type="text" disabled placeholder="Select n2">

Something

Else

 click me

  CSS * {   margin: 0;   padding: 0; }  /* ugly reset */  .cselect {   position: relative; }  .cselect input {   background: #fff; }  .cselect ul {   display: none;   position: absolute;   z-index: 999;   left: 0;   top: 1.2rem;   margin: 0;   width: 100%;   background: #fff;   border: 1px solid #d6d6d6; }  .cselect li {   padding: 10px 5%;   list-style: none; }  .cselect li:hover {   background: rgba(41, 128, 185, 0.2); }  .hide{   display:none; }  JS $(function() { // DOM ready     $(".cselect").each(function() {      var $input = $(this).find("input");     var $dropDown = $(this).find("ul");      $(this).on("click", function() {       $dropDown.stop().slideToggle();     });      $dropDown.on("click", "li", function() {       $input.val($(this).text());     });    });  });  var newnewid = 0; var $cloneplayerclause = jQuery(".row1").clone(true);  function clonerow(){      newnewid++;   var $sectionClone = $cloneplayerclause.attr("id", newnewid).clone(true);   $('.rows').append($sectionClone);       }  function unhideoption2(){  $(".option").removeClass('selected');  $(this).addClass('selected');  if($('.option1').hasClass('selected')){  $('.options2').removeClass('hide');  }  }  $(".option").on("click", unhideoption2); $(".clonerow").on("click", clonerow);   ** EDIT ** The question was closed as it is linked to event delegation ->  I use the .on for my click event $(".option").on("click", unhideoption2);  but with each parent/static selector i add in, it still doesn't register any clicks on the cloned versions e.g $(".optionlist").on("click", ".option", unhideoption2);  or $(".cselect").on("click", ".option", unhideoption2);  or $(".row1").on("click", ".option", unhideoption2);  Where am i going wrong with the event delegation?

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


I very new to StackExchange and I have already have an Answer Ban, but I only have one question (which has no down votes) and I have zero answers. I don't even know who to ask on what to do to fix this. I've read the Help Center message, but it doesn't make any sense and seems like a catch 22. I rarely will have questions to ask, but I wanted to start answering some questions. As it is right now, I can't answer, vote or anything, but ask questions, is that right?

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


I’m on an . If I delete Windows 10 and install  Ubuntu, will I have to reinstall drivers such as graphics, networking, hardware, etc.?

Is there a package of Ubuntu drivers as driver pack solution? I tried to search for it, but I did not find it. If there is, how can I easily get it?