When I want to install or upgrade something this message appears:  Reading package lists... Done Building dependency tree        Reading state information... Done E: The package ideservice needs to be reinstalled, but I can't find an archive for it.   I try to solve it but I am desperate, I've checked other forums but it´s the same, please I need help.

From time to time, Ubuntu users encounter errors from  or , of the form:  The package some-package needs to be reinstalled, but I can't find an archive for it.  I want to know what causes this error so that I can reproduce it and try to find safe ways of fixing it, even when the broken package is important and has many dependencies.  of the  might give a bit of a clue, but I don't know how packages get the status that causes the error.  How can I produce this error for testing on my (Ubuntu MATE 17.10) system?  This is prompted by  and my long-standing discomfort with closing questions about this error against , whose answer uses dpkg --force-all to remove the offending package.  suggests this solution has worked for many users, but I am not confident that using --force-all won't cause later problems, or that it's a good idea to use this method to remove important packages like APT.


I was reading a book, "" which, I think, was published in the middle of 1856, and I see "S" was replaced by the "ʃ" symbol (in small letter s, it looks more like "f'). Or perhaps it is not ʃ.  Very curious about the reason behinds it, but can't find any info from google search.

I was at a museum in London yesterday, and one of the items on exhibit is a document from the eighteenth century. It uses the letter f a lot where s should be used—for example, in Majefty.     Did the letter f once have the same sound as s today, or were some of those words actually spoken with an f ?


Am trying to install albert package with apt-get install albert but I get the following error:  The following packages have unmet dependencies:  albert : Depends: libqt5core5a (>= 5.11.0~rc1) but 5.9.5+dfsg-0ubuntu1 is to be installed   So I tried apt-get install libqt5core5a which says the newest version is already installed (5.9.5)  I found the .deb file for 5.11.1  but on installing that I get:  dpkg: error processing package libqt5core5a:amd64 (--install):  package libqt5core5a:amd64 5.11.1+dfsg-7ubuntu3 cannot be configured because libqt5core5a:i386 is at a different version (5.9.5+dfsg-0ubuntu1)   How to upgrade libqt5core5a version?

How do I install a .deb file via the command line?


The encounter phase is split into two, 1st the locations, then the otherworlds. So you do all the locations, then after that you do all the otherworlds.  So, if you are drawn through the a gate in the Arkham Encounter phase, do you also draw a 2nd otherworld encounter card?

Two investigators were in the same location in Arkham. The first investigator drew an encounter 'A monster and gate appear!'. He resolved that encounter by fighting the monster and then getting drawn through the gate. The second investigator also got drawn through the gate before having an encounter.  We also said that the two investigators did not have an Other World encounter as they were 'delayed' as they were drawn in to the gate. This ended up with the second investigator not having any encounters on this particular turn.  Was that the correct ruling?


I received this in my email.   Please be reminded in accordance with the below email.    Is something wrong with this sentence?

I frequently see statements that refer to something later in the text that use a phrase such as "the below information". Is it more correct instead to say "the information below" (or "the following information")?


In my program I create buttons with javascript and they should start an function but they don't. If I press the button on my program the browser says "can't find variable" how can I fix it that the button starts the function.  JS-Code  $(document).ready(function(){ function myfunction() { alert("pls"); } var Id = sessionStorage.getItem('Id'); var status = 0; var nummer = 0; $.ajax({ type: "POST", url: "http://localhost/jQuery&PHPnew/Markt.N.php", data:{status:status}, success: function(data){     var anzahl = 1;     status = 1;     while (anzahl>nummer) {       nummer++;     $.ajax({         type: "POST",         url: "http://localhost/jQuery&PHPnew/Markt.N.php",         data:{nummer:nummer, status:status},         success: function(data){           var Daten = JSON.parse(data);           var Ausgabebereich = document.getElementById('main');           var f = document.createElement("form");            var bInhalt = document.createElement('button');           var Inhalt = document.createTextNode("Senden");           bInhalt.appendChild(Inhalt);           bInhalt.setAttribute("type", "button");           bInhalt.setAttribute("onclick", "myfunction()");           f.appendChild(bInhalt);            Ausgabebereich.appendChild(f);          }         })       }      }     })   })

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


I have the Ubuntu 12.04 LTS version and I downloaded the .tar.gz file from the samsung website, I already extracted it content, but I don't know what to do now to install it.

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?


If I have the following data  n<-1000 x1<-rnorm(n,1,1) x2<-rnorm(n,2,2) x3<-rnorm(n,3,3) e<-rnorm(n) y<-3+0.5*x1+0.2*x2+0.3*x3+e   I want to fit a linear model between $y$ and $x$ like: $$y=\alpha+\beta_1x_1+\beta_2x_2+\beta_3x_3+\epsilon$$ The unconstraint linear regression in R is  fit=lm(y~x1+x2+x3)   Now if I have some extra constraints for the coefficients:  (i) $\beta_i\ge0$, for $i=1,2,3$;  (ii) $\displaystyle\sum_{i=1}^3\beta_i=1$.  I still want to run a linear regression but with the two constraints above. How can I implement this constrained linear regression in R?

I have the model that I need to estimate, $$ Y = \pi_0 + \pi_1 X_1 + \pi_2 X_2 + \pi_3 X_3 + \varepsilon, $$ with $\sum_k \pi_k = 1 \text{ for }k \geq 1$ and $\pi_k\ge0 \text{ for }k \geq 1$.   Elvis  solves this for the case of $\pi_0 = 0$. Here's his/her code of this solution:     > library("quadprog");    > X <- matrix(runif(300), ncol=3)    > Y <- X %*% c(0.2,0.3,0.5) + rnorm(100, sd=0.2)    > Rinv <- solve(chol(t(X) %*% X));    > C <- cbind(rep(1,3), diag(3))    > b <- c(1,rep(0,3))    > d <- t(Y) %*% X      > solve.QP(Dmat = Rinv, factorized = TRUE, dvec = d, Amat = C, bvec = b, meq = 1)    $solution    [1] 0.2049587 0.3098867 0.4851546     $value    [1] -16.0402     $unconstrained.solution    [1] 0.2295507 0.3217405 0.5002459     $iterations    [1] 2 0     $Lagrangian    [1] 1.454517 0.000000 0.000000 0.000000     $iact    [1] 1   How can I adjust this code such that it can estimate an intercept?  This has been cross-posted  because my group in my assignment is getting annoyed that I haven't estimated this regression yet. I will answer this question here if/when  the other forum participants get there first.


I am fairly new to the JavaFX side of things but so far I have managed to build a Java Web Browser that takes in local html files, however the html files I have also contain links to pdfs. I read that you can use getHostServices() to open up the default pdf application on the system, but I keep getting null pointer exceptions. Everything is imported correctly.  public class AbsorbBrowser extends Region{  public Application a;  final WebView browser = new WebView(); final WebEngine webEngine = browser.getEngine();  public AbsorbBrowser(){      webEngine.load(getClass().getResource("/resources/test.html").toExternalForm());     getChildren().add(browser);      browser.setOnMouseClicked(new EventHandler<MouseEvent>() {          public void handle(MouseEvent event) {              String str = webEngine.getLocation();             String newStr = str.substring(8);              a.getHostServices().showDocument(newStr);             // hostServices.showDocument(file.getAbsolutePath());          }     });   I have it so that when the mouse is clicked that it will assign whatever that location (URL) was to a string, that string would lead to the location:  file:///C:/Users/Me/Desktop/Absorb/bin/resources/test.pdf  So I take a substring and remove the first 8 characters to leave it just with the C:/ directory, then pass that string into the getHostServices().showDocument();  Null Pointer Exception  Exception in thread "JavaFX Application Thread" java.lang.NullPointerException   On the line a.getHostServices().showDocument(newStr);  I tried using java File, but to still no avail. I would appreciate any help or recommendations, thanks.

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


I have noticed that the Enterprise very often travels at speeds like warp 2, 3, 5, and so on.  This is especially true in the early seasons.  It almost seems that the warp speed they choose to travel at is a measure of the "importance" of whatever is going on.  Is there an in universe reason why don't always travel at, say, warp 8 or 9?  It seems that they could cut their travel times down significantly.  I understand that there are limits to the engine.  And that travelling at the higher ends of the warp 9 scale approaches those limits.  But surely there are high speeds that are not near the limits.

How does Picard, or anyone for that matter, decide at what warp speed to travel?  Obviously there are times when they need to get somewhere in a hurry and he says, warp 9 or maximum warp, but the rest of the time he just seems to pick a number at random. He rolls a warp 6.5 Is there some guide as to recommended speeds that he's following? Is there a speed that is the most efficient?


Let n be an integer greater than 1. Prove that if one of the numbers $$2^n-1, 2^n+1$$ is prime, then other is composite.

Not sure what approach to take with this:  Prove that at least $2^n-1 $ or $ 2^n+1$ is composite $\forall$ $n>2$


set -o posix will set the POSIX attribute of the bash shell.  How can we check if an attribute has been set up or not?

I have a bash terminal open. I want to find out whether the option extglob is enabled or disabled in this session, before I change its value. How can I do this?


I bought a used iPhone 5 not knowing it was locked. What do I do,I've tried to restore it by holding the power an home button but it's  still locked.

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?


I use Ubuntu 17.10.  When I start gedit, virt-manager as root I get a dubious error message: gtk warning cannot open display :0.0  I read many posts but none works with Ubuntu 17.10.  Thanks for any help.

I installed Ubuntu 17.10. Now I am having trouble with gksu:  $ gksu -dg synaptic No ask_pass set, using default! xauth: /tmp/libgksu-HgUjgQ/.Xauthority STARTUP_ID: gksu/synaptic/8760-0-alex-XPS-15-9530_TIME4974977 cmd[0]: /usr/bin/sudo cmd[1]: -H cmd[2]: -S cmd[3]: -p cmd[4]: GNOME_SUDO_PASS cmd[5]: -u cmd[6]: root cmd[7]: -- cmd[8]: synaptic buffer: -GNOME_SUDO_PASS- brute force GNOME_SUDO_PASS ended... Yeah, we're in... Unable to init server: Could not connect: Connection refused (synaptic:8767): Gtk-WARNING **: cannot open display: :1 xauth: /tmp/libgksu-HgUjgQ/.Xauthority xauth_env: (null) dir: /tmp/libgksu-HgUjgQ   If I don't use -g, the password dialog is disabled. So looks like a problem with creating a tty for root.  Any advice?


Is it legal to have a higher train fare for travel to/from airport when adjacent stops are way cheaper? I frequently travel to an airport that is connected to its serving city by rail service. A one way train fare to/from the airport to/from the city is 5 Euros. It's roughly a 15 minutes train ride. However, travelling on the same identical train that stops at the airport and boarding/alighting from any of the adjacent stops costs 1.10-1.20 Euros. E.g.  1 station before the airport's station to the city: 1.20 Euros Airport's station to the city: 5 Euros 1 station after the airport's station to the city: 1.10 Euros  I find the 5 Euros fare quite good compared to some prices that can be found elsewhere. However, I don't find this to be ethical and was wondering if there might be any justification for the 450% higher rate (e.g. arguing that the airport's station infrastructure is what adds to train fare). If this is indeed Price Discrimination, is it legal?

In the different places in the world, I always have the feeling that public transport from/to the airport is really expensive for what you actually get.  Here are a few prices for a couple of airport and additional information to be able to compare (I wanted to create a nice table but didn't find how to do it) :   Sydney Domestic Airport Station   15.90 AUD one way using  6.3 km to Sydney Central Station by car (from ) Sydney Central to Ashfield seems to be the same distance and costs 3.60 AUD (8.4 km) using   Sydney International Airport Station   16.70 AUD one way using  9.2 km to Sydney Central Station by car (from ) Sydney Central to Croydon seems to be the same distance and costs 3.60 AUD (9.44 km) using   Melbourne Tullamarine Airport   17 AUD one way, $28 return using  24 km to Melbourne Southern Cross Station by car (from )  Paris Charles-De Gaulle    : 9.25 EUR (RER) ; 10 EUR (Roissybus) 30 km to Chatelet les Halles by car (from )  Paris Orly    : 6.50 EUR (RER+BUS) ; 10.90 EUR (Orlyval), 7 EUR (Orlybus) 17 km to Chatelet les Halles by car (from ) Chatelet les Halles to Villeneuve-Saint Georges seems to be the same distance and costs 4.10 EUR using   London Gatwick   19.90 GBP using , a bit cheaper using other slower rail companies 43km to London Victoria  by car (from )    Why is the price so high ? If there's something which is to be paid to the airport when going there, why isn't it included in the airport taxes on the flight ticket prices?  I find the even weirder when it makes the cab/taxi, despite its price being increased too, cheaper than the train/bus/shuttle for a couple of passengers.  Also, as an additional question, is this price difference higher/lower in different part of the world?


As a native American English speaker, I wrote the following error message for our application: "There was an error. Please contact administrator."   A native German speaking colleague asked me why I didn't write, "Please contact the administrator."  Both of course sound correct to me, and I find thousands of instances of "Please contact administrator" when googling.  Why is it that as a native American English speaker, I find "Please contact administrator" correct while e.g. I don't find "There was error." correct?  Does anyone know of a linguistic rule which explains when one can leave out articles and when one can't?  It seems to have to do with headlines as someone suggested in the comments, but also instructions. Has there been any research on this to determine all the contexts in which articles can be omitted in this way?

Is there a particular term for the abbreviated language used in headlines (the removal of at least articles and conjunctions)?


I known how to package a jar to exe file using exe4j.   But now I also want to package the JAR with all required resources, such as html ,js files.   How can I do that?

If I have a Java source file (*.java) or a class file (*.class), how can I convert it to a .exe file?  I also need an installer for my program.


Palmyra Atoll, like all atolls, is a collection of features - islands, lagoons, coral reef and the surrounding ocean habitat.  Many of my colleages use the preposition "on" when refering to events occuring "at" Palmyra. Is "on" the correct preposition in this case, or would "at" be more appropriate?

I'm sure virtually everyone agrees that people live on the Isle of Wight, but in Ireland.  Apparently the usage depends somewhat on physical size, but that can't be the whole story. How exactly do we decide which form to use? And are there any really glaring 'outliers' that don't fit the normal pattern?  LATER - I must just add that the most uncertain case I've found so far is The Falklands. Most people go for in there, but a substantial minority (about 1 in 3) opt for on.


I have 11.10 and Windows 7 in dual boot. Today I tried to update grub and I run the following command in terminal:  sudo fdisk -l     sudo mount /dev/sda6 /mnt  sudo grub-install --root-directory=/mnt /dev/sda sudo grub-install   After installation and reboot, it does not show the grub menu (from which I can choose which OS to boot) and it directly boots Ubuntu.  Please help.

After trying (and failing) to install better ATI drivers in 11.10, I've somehow lost my grub menu at boot time.  The screen does change to the familiar purple colour, but instead of a list of boot options it's just blank solid colour, and then disappears quickly and boots into the default entry normally.    How can I get the bootloader back?  I've tried sudo update-grub and also various different combinations of resolutions and colour depths in startupmanager application with no success (640x480, 1024x768, 1600x1200, 16 bits, 8 bits, 10 second delay, 7 second delay, 2 second delay...)   edit:   I have already tried holding down Shift during bootup and it does not seem to change the behaviour.  I get the message "GRUB Loading" in the terminal, but then the place where the grub menu normally appears I get a solid blank magenta screen for a while.  Here are the contents of /etc/default/grub  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=" vga=798 splash"  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"


I've been trying to wrap my head around Lagrangian mechanics and Lagrangians in general, and I've found it difficult. After some thinking, I believe that the issue I have is with action principles. Why are they so consistently and widely useful and powerful?  Classical mechanics, classical field theories, quantum mechanics, quantum field theory, relativistic mechanics, and GR can all be formulated in terms of least action principles, as well as other emergent physical theories, and theories we could simply invent. This seems unreasonably effective, for a formulation that on the surface does not immediately strike a person as being extremely general.  So ultimately, I have two questions:   What would motivate you to even think of inventing the idea of a least action principle and using it to describe physics (I am not interested in the historical development of the idea, but rather, a sort of absurd hypothetical where we have all our physical theories but somehow without any least action formulations)? Why would we then expect such a theory to be so wildly general as to cover so many different physical theories of such wildly different character (classical/quantum, particle/rigid-body/field, etc.)?   I also want to strike down immediately an answer I've seen before, which I think is a total non-answer, which is that "classical lagrangian mechanics is just the macroscopic limit of quantum lagrangian mechanics, which comes from a quantum least action principle, and that's why you can explain so much stuff in terms of a least action principle". My issue with that argument is that we can imagine living a world that was actually, legitimately classical, and we would not then be unable to use lagrangian formulations. We can also look at emergent physical theories which have no direct reason to inherit least-action descriptions from their constituents, and yet still have such descriptions, seemingly for their own reasons.

It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. My question is how one can be sure that this approach has to be always right and fruitful. Isn't it possible, at least from the mathematical point of view that a future theory of physics does not subscribe to this approach?


Why is the equation in the red rectangle true? Why is it that if I have one solution y1(x), the second solution can be written as y2(x)=v(x)*y1(x)?Is it because they are linearly independent?  Someone wrote there "Any function y2(t) can be written as v(t)y1(t), at least on an interval where y1(t)≠0: you just take v(t)=y2(t)/y1(t). "- But the question is-why is this true?

Specifically, if we know that one solution is $y_1(t)$, then why is the second solution in the form $y_2(t) = v(t) y_1(t)$?  Where $v(t)$ is the function that you need to solve for.  Why does this assumption always work?


I'm trying to generate a slope raster from a DEM raster.  It seems there is a pretty significant error due to the 'z-factor' option.  I'm fairly new to this, but some other posts and responses indicate a general workflow:  1) obtain a DEM.  The ones I got (NED) are unprojected: horizontal coords are lat-lon, and vertical coords are meters.  Two possible branches here, A or B:  A2) project the DEM to UTM so that horizontal and vertical coords are in the same units A3) then do slope analysis on the UTM-projected DEM, using z-factor = 1.0  OR  B2) do slope analysis on the unprojected DEM, using z-factor = 111120 (which has been suggested in some posts as a number of meters per degree - see error discussion below) B3) then project the raster to UTM  Problem with option A: the projection process introduces gridded artifacts, and these get amplified in the slope raster:  Original DEM (NAD83, unprojected; zoomed in to one peak; min/max set to show high contrast here):    DEM projected to NAD83 UTM zone 10, note gridded artifacts:    slope analysis output from NAD83-UTMz10-projected DEM, note the same artifacts:    Problem with option B: 111120 seems vastly oversimplified and produces significant errors, see error table below - though, gridded artifacts are greatly reduced since they don't exist in the DEM that you run slope analysis on.  First, number of meters per degree of latitude is not the same at all latitudes, due to the earth not being a perfect sphere.  Second, and more obvious, number of meters per degree of longitude is a function of latitude, varying from ~111km at the equator to 0 at the poles.  For our area (Nevada County, California) here are some numbers from an online calculator, referenced in other places as a trusted source (but feel free to verify these):  Nevada County S extent ~ 39.0deg (WGS84) Nevada County N extent ~ 39.5deg (WGS84) Nevada City ~ 39.25deg (WGS84)  39.0 deg: 1 deg lat = 111015.45 meters 1 deg lon = 86626.37 meters  39.25 deg: 1 deg lat = 111020.23 meters 1 deg lon = 86320.71 meters  39.5 deg: 1 deg lat = 111025.01 meters  (about 9.5 meters longer than at S extent of Nevada County) 1 deg lon = 86013.39 meters (about 613 meters shorter than at S extent of Nevada County)  (at equator, for reference:) 0.0 deg: 1 deg lat = 110574.27 meters 1 deg lon = 111319.46 meters  So, making some straightforward assumptions about how qgis uses the 'Z Factor' argument, here are some resulting errors (note this is in Nevada County but not the same location as the above images), along with Range-Bearing Line from Terrain Navigator Pro which is treated as gospel in this case; also note that this is just for one sample set of from/to; error would vary by compass direction of the from-to line also:    (z-factor is entered by hand for each row; all the other columns are calculated from it)  So, any ideas?  Am I calculating something wrong, or is there a better workflow, or is there just no really good way to get around the error?

I have been attempting to use the Spatial Analyst Curvature tool with mixed results.  I originally tried to use it with a raster that was projected using a 1983 Teale Albers projection and the results were black, indicating the lowest values.  I then transformed the raster into UTM projection and ended up with grid-like lines on the raster which have values that are obviously not accurate.  Does anyone know why these lines have appeared or what I'm doing wrong.  Thanks.


Question: If $f$ is a function such that $$f(x+y) = f(x)+f(y) \qquad f(xy) = f(x)f(y)$$ for all $x$, then prove that $f(x) = 0$ or $f(x) = x$ for all $x$. (The fact that every positive number is a square of some number will be important.)  My attempt: I was able to show that this is satisfied for rational $x$ but we cant assume $f$ is continuous so can we prove this for all real $x$? Also, if I'm not mistaken, can I assume that $f(x) \ne 0$ or $f(x) \ne x$ for all $x$ and then prove that $f(x) = x$ or $f(x) = 0$ for all $x$ respectively?

The  asks about functions $f \colon \mathbb R \to \mathbb R$ such that $$f(x+y)=f(x)+f(y).$$ It is a very well-known functional equation, which appears in various areas of mathematics ranging from exercises in freshman classes to constructing useful counterexamples for some advanced questions. Solutions of this equation are often called . Also a few other equations related to this equation are often studied. (Equations which can be easily transformed to Cauchy functional equation or can be solved by using similar methods.) Is there some overview of basic facts about Cauchy equation and related functional equations - preferably available online?


Who can help me to find the following limit?  $\lim _{n\to \infty}\frac{e^n\times n!}{n^n}=?$

Let $c>0$ be a real number. I would like to study the convergence of $a_n := c^n n!/n^n$, when $n \to \infty$, in function of $c$.   I know (from  question) that $n!>(n/e)^n$, so that $c^n n!/n^n>1$ for $c ≥e$. But this doesn't imply that the sequence goes to infinity. And I'm not sure what to do for $c<e$. I tried usual tests (D'Alembert...), without any success. I would like to avoid using Stirling approximation.  Thank you for your help!


In linux, from /proc/PID/stat, I can get the start_time (22:nd) field, which indicates how long after the kernel booted the process was started.  What is a good way to convert that to a seconds-since-the-epoch format? Adding it to the btime of /proc/stat?  Basically, I'm looking for the age of the process, not exactly when it was started. My first approach would be to compare the start_time of the process being investigated with the start_time of the current process (assuming it has not been running for long).  Surely there must be way better ways.  I didn't find any obvious age-related parameters when looking at   So, What I have currently is:  process age = (current_utime - ([kernel]btime + [process]start_time))   Any alternative ways that are more efficient from within a shell script? (Ideally correct across DST changes)

I would like to avoid doing this by launching the process from a monitoring app.


If you plan to retire overseas, are you going to be taxed from the US or from the country overseas?   I was not able to find any rules that could answer that question for traditional 401k funds.   I would like to know for US-citizens and non-US-citizens.  Where do you have to pay the taxes?

From what I know about 401k's, when it's time to retire, we take our 401k money and pay federal and state tax. Some states don't have taxes on 401k's — Florida is a good example. So many people move to Florida for a retirement, not to pay taxes (that's why people call it heaven's waiting room). The question is - how does it work if a US citizen permanently moves to another country for a retirement (retaining citizenship, but not living in any of the US states)? Are there any state taxes? If yes, then why?


Can we prove that the thermodynamic state of a system is completely determined by any two out of the three factors $P,V$ and $T$ ? (Without using statistical mechanics. Only using Thermodynamics) NB: I have not learnt the axiomatic formulation of Thermodynamics.

The state postulate is as follows: The state of a simple compressible system is completely specified by two independent, intensive properties. My first question is whether there is any justification for this postulate or whether it is simply an empirical law? That is, why is it not the case that 3 intensive variables are required to fix the state or even 4? If it is an empirical law with no justification and just happens to be a law our universe abides by, then why is it not one of the laws of thermodynamics as it clearly provides foundational value to the field of thermodynamics? My second question pertains to how we can know whether 2 intensive variables are in fact independant. Say temperature $T$ and specific volume $v$ for example. If we are given a thermodynamic problem, how would we know whether these are independent or not? or perhaps specific internal energy $u$ and pressure $P$. Are there certain combinations that are simply always independent of each other or does independence between intensive variables vary from problem to problem and require a full understanding of the problem at hand? Let us take a phase change for example. From my understanding of phase changes, I know that the boiling temperature is dependent on the pressure and hence I won't be able to use $T$ and $P$ as 2 variables to completely specify the state. But how would I know know what combinations of intensive variables will be independent in this case or any other case for that matter? Does it simply require rote memorization of all independent pairs of intensive variables for all thermodynamic problems or is there a more simple way to figure out what is independent and what isn't? I hope this question makes some sense and any help would be most appreciated!


I want to make a presentation using beamer and I have the following problem with the hyperref package. I have already seen that this package causes many troubles for many people. Anyway... Here is the code:  \documentclass[]{beamer} \usetheme{Warsaw} %\usepackage{Definitions} \usepackage[english,greek]{babel} \usepackage[utf8]{inputenc} \usepackage{kerkis} %\usepackage[unicode, bookmarks = true]{hyperref}  \begin{document}  \begin{frame} \frametitle{\textlatin{Contents}} \tableofcontents \end{frame}  \section{\textlatin{Section 1}} \begin{frame} \frametitle{\textlatin{frame 1}} \textlatin{First frame of section 1}. \end{frame}  \section{Τμήμα 2} \subsection{Υποτμήμα 1} \begin{frame} \frametitle{\textlatin{frame 3}} \end{frame}  \end{document}   I get these errors and warnings:      "Option clash for package hyperref" and  "Glyph not defined in PD1 encoding".   How am I to avoid these errors and warnings? The consequence is clearly seen in the following image, where the most greek letters are missing on the bookmarks (left) side.

Hi. I've compiled a Persian language beamer file by both luapersian and persian babel package using LuaLaTex, and in both I've the same problem in pdf bookmark as shown in the figure (some strange characters are shown instead of correct characters).


SO has a mechanism to add one of the tags, if not alread appearing in the question's title, to the html page title, like this: {tag} - {question title}. In addition, even if tags represent terms that are normally written with some upper-cased letters (such as Python), it appears in the html title lower-cased.  It may worth mentioning that the world wide web is not normally case sensitive.  Normally this is not a problem at all - it is quite normal to see python and google-apps and not Python or Google Apps everywhere; however, r is not as recognizable. Do you think there should be a rule exception here, and r should be added to the page title as R - {question title}?

It might be a stupid question, but I always wondered (and was afraid to ask :)) why tags are written in lowercase whereas sometimes it's confusing and not really correct?  For example, IMHO, JComboBox is a better name than . The same about  and Java.  Is there any specific reason why all tags are lower-cased? It might confuse some users, as I always correct people who write ArrayIndexOutOfBounds instead of ..


I have built a MS Word Custom Taskpane addin.  When this addin is enabled in a Word Application, the entire Word application does not shutdown when i attempt to close Word.  The Active Document will disappear, but Word remains open.  I then have to go into Task Manager and kill the process.  When my addin is disabled, Word shuts down fine.  How do I shut down MS Word while having my addin enabled?  Update:  I open Word via OLE Automation

I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause:  while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers();   Although this kind of works, the Excel.exe process is still in the background even after I close Excel. It is only released once my application is manually closed.  What am I doing wrong, or is there an alternative to ensure interop objects are properly disposed of?


This is my code, I was trying to dummy encode the first column of X using OneHotEncoder but it was showing error and the documentation page of OneHotEncoder says that it has been changed and I wasn't able to figure out how I can do it using the changed version. the data type of X is numpy.ndarray.  from sklearn.preprocessing import LabelEncoder, OneHotEncoder onehotencoder=OneHotEncoder(categorical_features = [0]) X[:, 0]=onehotencoder.fit_transform(X).toarray()

I am reading everywhere on new questions and blogs that since version 0.20, OneHotEncoder is able to handle string features. Moreover, the documentation is what looks more ambiguous. Here are the first two lines from the documentation:  Encode categorical integer features as a one-hot numeric array. The input to this transformer should be an array-like of integers or strings, denoting the values taken on by categorical (discrete) features.  First line says it  encodes categorical integer features  and the next line says  input should be array like of integers or strings.  When i tried it, i still got the value error. print(X.columns) encoder = OneHotEncoder(categorical_features=[1,4,5]) encoder.fit(X)  Index(['age', 'sex', 'bmi', 'children', 'smoker', 'region'], dtype='object') ValueError: could not convert string to float: 'female'  I am aware of the means to handle encoding of string features with LabelEncoder, ColumnTransfomer and pd.getDummies() but specifically want to understand about this.


I know that the equality $$\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}$$ can be proved in numerous ways by using the Fourier series. However, is there a way to derive it using more fundamental tools? I've tried: $$ \sum_{n=1}^\infty \frac{1}{n^2} = \sum_{n=1}^\infty \int_0^1 x^{n-1} dx \int_0^1 y^{n-1} dy = \int_0^1 dx\int_0^1 dy \frac{1}{1-xy}$$  and by changing variables I was able to write it in several other forms:$$ = -\int_0^1\frac{\ln(1-x)}{x} dx = \int_0^\infty \frac{\ln (1+t)}{t(1+t)} dt = \int_0^\infty \frac{u }{e^u -1}du $$ but that's as far as I could get.  I specifically don't want to use Fourier series. More fundamental complex analysis, like contour integration, is fine.

As I have heard people did not trust Euler when he first discovered the formula (solution of the ) $$\zeta(2)=\sum_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}.$$ However, Euler was Euler and he gave other proofs.   I believe many of you know some nice proofs of this, can you please share it with us?


In Zermelo–Fraenkel (ZF) set theory, the natural numbers are defined as $0 = \emptyset$ and $n + 1 = n \cup \{n\}$  $$\begin{alignat}{2}    0 & {} = \{\} && {} = \emptyset,\\    1 & {} = \{0\} && {} = \{\emptyset\},\\    2 & {} = \{0,1\} && {} = \{\emptyset,\{\emptyset\}\},\\    3 & {} = \{0,1,2\} && {} = \{\emptyset,\{\emptyset\},\{\emptyset,\{\emptyset\}\}\}  \end{alignat}$$  My intuition would be, to define it as $0 = \emptyset$ and $n + 1 = \{n\}$  $$\begin{alignat}{0}    0 && = \emptyset,\\    1 && = \{\emptyset\},\\    2 && = \{\{\emptyset\}\},\\    3 && = \{\{\{\emptyset\}\}\}  \end{alignat}$$  Why is it defined that way? What makes it more straightforward than my definition?

Why do we use von Neumann ordinals, $$ 0 = \emptyset $$ $$ n+1 = n \cup \{n\} $$  and not Zermelo ordinals? $$ 0 = \emptyset $$ $$ n+1 = \{ n \} $$


I am trying to SSH from one ubuntu18.04 machine to another. For that created a separate user in both machines and added that user in sudo group and edited sshd_config file for PubKeyAuthentication=yes and restarted ssh service.  Then under the createduser in 1st machine, generated ssh-keygen, copied that id_rsa.pub key to 2nd machine under created user, ssh-copy-id -i id_rsa.pub newuser2@[ip-of-2ndmachine]  Now im able to ssh to the 2nd machine without password, but when i execute apt update, its showing permission denied, how to execute the same without password now?  Note: If I give sudo apt update, its asking password, after passing password the cmd is executing.  Can someone help me to execute all cmds in 2nd machine without providing password with newuser(not root).

Inspired by this ....  I am the sole person using my system with 12.04. Every time I issue a sudo command; the system asks for the user password (which is good in its own way).  However I was thinking; without activating the root account; how can I execute the sudo commands which will not ask for user password to authenticate.  NOTE: I want to execute sudo command without authenticating via password; only when they are executed via terminal. I don't want to remove this extra layer of security from other functions such a while using 'Ubuntu software center' or executing a bash script by drag-drop something.sh file to the terminal.


Update: Solution arrived since and is now accepted. Due to the clarity of the pseudo codes on this question the solution took only a few seconds. Trying to figure out the solution from the other seemingly "duplicate" questions took a lot of time already. I had the solution in 20 minutes from the moment I asked this question. So it is not a duplicate, probably the clearest of them all to date.  While several similar questions have been asked on this, I was still not able to put together a working code from them. My main application is not on a form, but in a separate class that is a plugin and executed by a host application.  So while it seems a duplicate question it is not. Please read on.  I have my main class doing stuff. Then I have a form that displays information to the user. I need to hide this form when the user switches away from the application (host application loses focus).   I am using very limited APIs so the only methods I have at my disposal events triggered by the host application.   I created a timer that fires every 100ms and checks whether the user had the application in focus. And if not a command is sent to the form to hide itself.  The reason for this approach is because the host application loosing focus is just one of the many scenarios that I need to hide the form and I need to channel all these through the same exact method.  All works from within the rest of the classes (the Hide() method is called from the rest of the application no problem.  But it does not work when the timer calls the Hide() method, because the timer is on a different thread when it fires. So the call becomes a cross-thread call.  The very specific question is that I need an exact sample code how to make this call from the timer event handler to the form's Hide() method thread-safe with Invoke.  Thanks.  This is the timer:  private void Controllel_Opened(object sender, EventArgs e) {     myTimer.Elapsed += new System.Timers.ElapsedEventHandler(DisplayTimeEvent);     myTimer.Interval = 50;     myTimer.Start(); }  public static System.Timers.Timer myTimer = new System.Timers.Timer(); // This method checks different scenarios when the tool tip should be hidden and calls the hiding method public static void DisplayTimeEvent(object source, System.Timers.ElapsedEventArgs e) {     FormHandler.Hide(); }   Then the "FormHandler" class:  public static class FormHandler {     private static Form1 frm1 = new Form1();      public delegate void Form1HideEventHandler();     public static event Form1HideEventHandler Form1Hide;      public static void Hide()     {         if (Form1Hide != null)         {             Form1Hide();         }      } }   Then the form's code:  public partial class Form1 : Form {        public Form1()     {         InitializeComponent();         FormHandler.Form1Hide += FormHandler_Form1Hide;     }      private void FormHandler_Form1Hide()     {         Hide();     } }   I would like to get a solution with exact code if possible. Thanks.

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


What is the word that is used to describe the oversimplification or non-academic discussion of a complex issue?   Typically, I'm looking for a word like pedantic, or puerile, except that the word covers the fact that the discussion is particularly non-academic. I know that such a word exists since I have used it before, but it has skipped my mind.

I am trying to think of a word used to describe someone who is intentionally oversimplifying an argument by making a statement that is technically true, but ignores a lot of issues. Its an adjective similar to describing the person as being intentionally obtuse or too clever for their own good.


This an extension to a previous question:    For example: If I can't earn the Cleanup badge, show the badge separated from the others I can earn. And if I can't earn it, show the requirements to reach the possibility to earn the badge

I read this:   and this:   If this badge is only available for users with 2000 rep and above, why do I see it? It should be invisible until I have 2000 rep.  I think it's better to not show it until user has 2000 rep. Expose the badges only when someone can get them.


As you'd expect, I've arrived at a question I can't answer and I can only guess.  Runtime polymorphism is the goal, using the virtual mechanism, but the result I'm getting is as if I called the method while suppressing it; like I called the base class method.  I can only guess then that I am somehow doing that, the call is from an object that is a base class, although it was constructed as a derived class. So, constructed as a derived, stored as a base.  I do store this as a static base class variable within a cpp and interfaced with multiple extern functions to access elsewhere. (perhaps, that's the gotcha?)  GameScene.h:  class GameScene { public:     GameScene() { SceneInit(); }     ~GameScene() { }      virtual void LevelInit() { } // gcc complains w/o {}     void SceneInit();      virtual void UpdateLevel( const float& timeDelta ) { } // gcc complains unless {} added     void UpdateScene( const float& timeDelta ); };  extern void NewScene( const GameScene& level ); extern void UpdateScene( const float& timeDelta );  class TestLevel : public GameScene { public:     TestLevel() { SceneInit(); }     // implementation here in header     void LevelInit() override     {         // level-specific initialization that is apparent at runtime     }     void UpdateLevel( const float& timeDelta ) override     {         // level-specific checks and performance         // but, to test, I simply log "This is the test level"     } };  class TutorialLevel : public GameScene { public:     TutorialLevel() { SceneInit(); }     // implementation here in header     void LevelInit() override     {         // level-specific initialization that is apparent at runtime     }     void UpdateLevel( const float& timeDelta )     {         // level-specific checks and performance         // debug log "This is the tutorial level"     } };   GameScene.cpp:  #include "GameScene.h"  static GameScene currentScene; // I am now wondering if this pattern is the problem (by explicitly storing this as the base class)  extern void NewScene( const GameScene& level ) {     currentScene = level; } extern void UpdateScene( const float& timeDelta ) {     currentScene.UpdateScene( timeDelta ); }  GameScene::SceneInit() {     // general init     LevelInit(); // this _properly_ calls the subclass overridden version     // init completion } GameScene::UpdateScene( const float& timeDelta ) {     // general updating and game handling      UpdateLevel( timeDelta ); // this was _meant_ to call the overridden version, it does not }   EntryPoint.cpp:  #include "GameScene.h"  int main() {     //NewScene( TestLevel() );     NewScene( TutorialLevel() );     float deltaTime;     while (gameLoop)     {         deltaTime = SecondsSinceLastFrame(); // pseudo         UpdateScene( deltaTime );     } }   So, I was following a pattern that worked with SceneInit() calling LevelInit(), which is overridden in the derived classes. If I use either derived class constructor in NewScene(), I get those LevelInit() results at runtime. I thought this would be safe to use this pattern with UpdateScene().  What I see is UpdateScene() called the GameScene::UpdateLevel(), even though it is clearly overridden in the subclasses, just like LevelInit() is.  My (wild) guess is, I am calling UpdateLevel() as if I had explicitly cast it as GameScene. :\  And maybe, this is because I store currentScene as GameScene? (but then, doesn't that defeat the purpose of having polymorphism?)  I am missing something about either storing currentScene, or calling UpdateLevel(). I've tried calling like this:      GameScene *s = currentScene;     s->UpdateLevel();   after reading that, as a pointer, the virtual mechanism should be finding the most-derived version of the method. (but alas...)  I wish I could have found an example here or elsewhere, but my searches pointed out problems with virtual in constructors/deconstructors, or just not using the 'virtual' keyword, etc.

Someone mentioned it in the IRC as the slicing problem.


#include<iostream> using namespace std;  void callByReference (int &);    //Function Prototype  int main() {   int num;                         //Variable Declaration   cout<<"Enter number";    cin>>num;   callByReference(num);             //Function Definition   cout<<"Number after triple is "<<num<<endl;   return 0; }  void callByReference (int & cRef)   //Funciton Definition {   cRef=cRef*cRef*cRef; }   If we are passing address in cRef then address should be multiplied thrice. How the value is multiplied thrice?

I would like to clarify the differences between by value and by reference.  I drew a picture     So, for passing by value,  a copy of an identical object is created with a different reference, and the local variable is assigned the new reference, so to point to the new copy  How to understand the words: " If the function modifies that value, the modifications appear also within the scope of the calling function for both passing by value and by reference "  Thanks!


So I've come to the understanding that a hadrons mass does not come from the constituent quarks but instead comes from a combination of things like binding energy and the mass energy of virtual gluons and quarks inside the hadron. But this doesn't make any sense from an energy stand point. If you have for example; 3 quarks that aren't bound together. And then you bind them together into a hadron, suddenly they gain mass. Wait a second! Doesn't this violate the conservation of energy? You could say that the mass is the result of the binding energy. But for a bound system, the binding energy must be negative. And so a bound system of quarks should be less massive than an unbound system. Why would quark ever want to bind together if the resulting system has much more energy? To summarize it all up, where does this mass come from?

We know that the sum of the masses of the quarks in a proton is approximately $9.4^{+1.9}_{-1.3}~\text{MeV}/c^2$, whereas the mass of a proton is $\approx931~\text{MeV}/c^2$. This extra mass is attributed to the kinetic energy of the confined quarks and the confining field of the strong force. Now, when we talk about energetically favourably bound systems, they have a total mass-energy less than the sum of the mass-energies of the constituent entities. How does a proton, a bound system of quarks with its mass-energy so much more than its constituent entities, remain stable? The strong force and other energetic interactions supposedly contribute this mass-energy by the mass-energy equivalence principle, but how exactly does this occur?


Consider measure space $(S, \Sigma, \mu) = (\mathbb R, \mathscr B(\mathbb R), \lambda)$.  Let $V^C \subseteq S$ denote the set of all numbers in $[0,1]$ whose decimal representations don't contain the number 7.   Prove that $V^C \in \Sigma$. Compute $\lambda(V^C)$.     What I tried:   I think we have   $$V = \bigcup_{n=1}^{\infty} V_n$$  where $v_n \in V_n$ can be written $v_n = 0.s_1s_2...$ where $s_1 \ne 7, ..., s_{n-1} \ne 7, s_n = 7$  $$V_n = \bigcup_{s_1, ..., s_{n-1} \ne 7} [0.s_1...s_{n-1}7, 0.s_1...s_{n-1}8)$$  $V$ is a finite union of pairwise disjoint $9^{n-1}$ intervals and hence is a Borel set, which is Lebesgue measurable.  $V$ is a countable union of  pairwise disjoint Borel sets and hence is a Borel set, which is Lebesgue measurable.  Thus, $V^C$ is Lebesgue measurable.  2.  $$\lambda(V) = \lambda(\bigcup_{n=1}^{\infty} V_n) = \sum_{n=1}^{\infty} \lambda(V_n)$$  $$\lambda(V_n) = \lambda \left(\bigcup_{s_1, ..., s_{n-1} \ne 7} [0.s_1...s_{n-1}7, 0.s_1...s_{n-1}8)\right)$$  $$= \sum_{i=1}^{9^{n-1}} \lambda ([0.s_1...s_{n-1}7, 0.s_1...s_{n-1}8))$$  $$= \sum_{i=1}^{9^{n-1}} \frac{1}{10^n} = \frac{1}{10^n} \sum_{i=1}^{9^{n-1}} (1) = \frac{1}{10^n} (9^{n-1} - 1 + 1) = \frac{9^{n-1}}{10^n}$$  $$\to \lambda(V) = \sum_{n=1}^{\infty} \lambda(V_n) = \sum_{n=1}^{\infty} \frac{9^{n-1}}{10^n} = 1$$  $$\therefore, \lambda(V^C) = 0$$

I just came across an exercise that asks to show that set of numbers in $[0,1]$ which possess decimal expansion not containing the digit $5$ has measure zero. How do I approach this? I tried thinking of relating this to Cantor set but, I see that numbers whose decimal expansion contains the digit $5$ are both contained in the Cantor set as well in its complement too, I thought if it was in the Cantor set and since measure of Cantor set is zero, so it's measure will be zero but this does not happen. In fact how is this set measurable? Any idea?


For example:  "Last week, I found out that NASA stands for 'National Aeronautics and Space Administration.'"  or  "Last week, I found out that NASA stood for 'National Aeronautics and Space Administration.'"

I know the past tense carries the past tense in every dependent clause, but referring specifically to places or to things that are eternal, like the Earth, seems a bit weird and therefore we sometimes (I believe incorrectly) say     He didn't know that New Jersey was actually on the East Coast.   Because it still is. Or     He thought the Earth was round.   So is it square now?  Logically speaking, would you consider the use of past tense here a bit confusing in a day-to-day speech in these examples? Would you instinctively opt for using the present tense?


I have some problem recently, after upgrade to Ubuntu 16.04 I can't read my exfat SD Card anymore.   I double checked, got exfat-fuse and exfat-utils installed, and when I check devices I can see my SD Card as /dev/sdd. However when I try to mount it manually it says error:  $ sudo mount -t exfat /dev/sdd /media/exfat FUSE exfat 1.2.3 ERROR: failed to read boot sector.

When trying to mount an exfat filesystem, I get the following error:  Error mounting /dev/sda6 at /media/gkp/Backup: Command-line  `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda6" "/media/gkp/Backup"'  exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'   Exfat is used on some USB sticks and camera sd cards. What can I do to mount this type of filesystem?


I am running windows 2008 and have published an app with remoteapp in terminal services. That works great.   My question is, can I prevent the user from logging in to the server with rdp while still allowing them to access the remoteapp?  Thanks!

I found the following question, with a similar premise, however the answer to the question, was the question rephrased as a statement!    How do I allow RemoteApp but disallow Remote Desktop? In order to allow remote app, I'm seemingly having to add the users to the "Remote Desktop Users" group. This allows Remote Desktop.  I tried using the "TS Web Access Computers" group, however this does not give them the authority to run RemoteApp.  Where is the configuration to disable Remote Desktop, while leaving RemoteApp capabilities intact?


Let $L:{\Bbb N} \to {\Bbb N}$ such that $L(n) = {\text{least prime factor p of n}}$. Let $g:{\Bbb N} \to {\Bbb N}$ such that $g(n) = {\text{biggest positive integer d such that d|n and 1}} \leqslant {\text{d < n}}$. Show that:$$g(n) = \frac{n}{{L(n)}},\forall n \in {\Bbb N}{\text{ such that }}n \geqslant 2$$ My proof: Since $n \geqslant 2$, $n$ is either composite or prime. If $n$ is prime(i.e $n = p$ where $p$ is prime), then $$g(n) = 1 = \frac{p}{p} = \frac{n}{{L(n)}}$$ This is because $L(n)$ is defined as least prime factor of n. If n is composite, by the Fundamental Theorem of Arithmetic: "Any positive integer bigger than 1 can be expressed as a product of primes." Let $p$ be the smallest prime of the product $$n = {p_1}^{{\alpha _1}}p_2^{{\alpha _2}}...{p_m}^{{\alpha _m}},{\text{ }}i < j,{\text{ }}{p_i} < {p_j}{\text{ and }}i,j \in {{\Bbb Z}^ + }{\text{ and }}{\alpha _i} \in {{\Bbb Z}^{ \geqslant 0}}$$ That is, pick $p = p_1$. Notice that $p$ is necessarily $L(n)$ because since $p = p_1$ implies that $p|n$ and is the smallest prime that divides n. Therefore, $$p_1 = p = L(n)$$ Then, if $x = p = L(n)$, then $1 < x < n$ and $x|n$ (by definition). This implies that $$\exists y \in {{\Bbb Z}^ + }:y = \frac{n}{x} = \frac{n}{{L(n)}} = {p_1}^{{\alpha _1} - 1}{p_2}^{{\alpha _2}}...{p_m}^{{\alpha _m}}$$ But $y|n$ such that $y < n$. Implies that $y$ is the greatest integer less than n such that $y|n$. Now let $d = g(n)$. Since $$\frac{n}{d} = \frac{n}{{g(n)}} = m$$ then $m$ is prime and $m = p$. BWOC, If $n=md$ and $m = ab$ where $1 < a,b < m \Rightarrow n = abd \Rightarrow ad|n$. Since $1<a<m \Rightarrow d<ad<md = n$. But we found another factor of $n$ ($ad$) that divides $n$! This contradicts the definition of $d=g(n)$. Also, since $d = g(n)$ is the biggest factor of n, implies that $m = \frac{n}{d} = \frac{n}{g(n)}$ is the smallest prime factor of n. So $m = L(n) = p$. Hence, we have that $$x = m = p = L(n) = \frac{n}{g(n)} \Rightarrow g(n) = \frac{n}{p} =\frac{n}{L(n)} = y$$ or just $$g(n) = \frac{n}{L(n)}$$ Q.E.D.

Suppose that $y$ is a positive integer, and $z$ is the largest factor of $y$ such that $z<y$, then let $x=y/z$. Prove that $x$ must be a prime number.  Is there a simple way to solve this? It should be obvious but it's stumping me :/


When I'm iterating over an iterator object is there a way to know what index i'm at by calling some function on the object?

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


I'm new about the config of the web server.  I asked my hosting company to set the DNS to point to my VALID IP address, in the university. My server is ubuntu 12.04 (desktop). I installed apache2 and bind9. Now the ns ping points to my IP (217.218.245.169), but when I ping my web site (ijnrs.com), it points to its previous IP address (5.61.27.195). I have included the db.ijnrs.com file. Would you please help me. I want www.ijnrs.com (and ijnrs.com) points to my IP address.  EDIT: I'm aware that it takes some time for IP addresses to be propagated, however, I can now ping ns.ijnrs.com and see the desired IP addressees, while the main address is not accessible. My question was about the difference between the way these names and IP addressees propagate.   Thanks.  db.ijnrs.com  ; ; BIND data file for local loopback interface ; $TTL    604800 @       IN      SOA     ns.ijnrs.com. root.ijnrs.com. (                              35         ; Serial                          604800         ; Refresh                           86400         ; Retry                         2419200         ; Expire                          604800 )       ; Negative Cache TTL ; ijnrs.com.      IN      NS      ns.ijnrs.com. @               IN      NS      ns.ijnrs.com. @               IN      A       217.218.245.169 ns              IN      A       217.218.245.169 www             IN      CNAME   ijnrs.com.

This is a  about DNS Propagation   How long does it take for an the various types of records to propagate? Do some propagate faster than others?  Why does it take time for DNS records to propagate and how does it work?


I have two styles for my user accounts:   Accounts under the Peilonrayz pseudonym.  Same username and picture, similar about me. Accounts that have been anonymized.  Random name and picture, and no about me or other settings.   Due to getting a couple of yearling badges I looked at an anonymized account and found that Stack Exchange has copied one of my 'about me' sections to every account I own.  This is causing some of my profiles to expose PII.    This seems to have affected me only after  affected my account. Or it's just an unhappy coincidence.

It’s the  question: Am I looking at someone’s legitimate pronouns or trolling?   (It’s unfortunate I have to ask, but this is just where we are right now.)  I’ve seen “my pronouns are [insert ridiculous fake stuff here]” trolling recently (in posts) when before I never did. Also stuff that looks to be trolling, but could also maybe not be. Trolls deserve red flags while everyone else specifying pronouns does not, right?  (To clarify, the problem is not just about not wanting to use a troll's words. The purpose of some of this trolling is to try and convince people that transgender people—or their neopronouns—are stupid or unreasonable. Ignoring the trolls allows us to avoid the first problem, but not the second since it allows them to still reach people with their message, which is not something that I want to see promoted.)  Some neopronouns are clearly legitimate. Some trolling is clearly trolling. But unfortunately there’s a big grey area where it’s not clear to me what is what.   Does anyone have a good method for dealing with this? There just doesn’t even seem to be a good way to ask about someone’s specified pronouns in such a way that doesn’t sound insulting if the user isn’t trolling.     Note: A while ago, I did some research on neo-/third person pronouns which can be found . There are several important things I found:   There are more neopronouns than I could ever hope to keep track of The most popular neopronouns are very uncommon. On the other end of the spectrum, it looks like some neopronouns are neologisms used by a single person  Some neopronouns come from unlikely places, such as SciFi


What is the simplest global shell way to remove 3 (or whatever) lines from the top of some output of varying length? I realized that tail will only work if you know how long the document length is.  Example: Say we want to process this but exclude first 2 lines of it's output  $ curl -s http://google.com <meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>301 Moved</TITLE>
301 Moved
 The document has moved here.    for fun here is python solution  $ curl -s http://google.com  | python -c "import sys; [sys.stdout.write(line) for line in list(sys.stdin)[2:]]" | sort here.
301 Moved
 The document has moved   Extending you shell this way  $ function from() { > python -c "import sys; [sys.stdout.write(line) for line in list(sys.stdin)[${1}:]]" > }   to do this with any number of lines  $ curl -s http://google.com  | from 3 | sort The document has moved here.

I need to repeatedly remove the first line from a huge text file using a bash script.  Right now I am using sed -i -e "1d" $FILE - but it takes around a minute to do the deletion.  Is there a more efficient way to accomplish this?


I had an issue with doing SCP between two machines, both machines had MTU value 8950 and in most of the time it hangs after transferring 4740 bytes and File size is 4697 Bytes, Below are some logs from SCP.  debug2: exec request accepted on channel 0 Sending file modes: C0555 4697 system_test_precheck debug3: Wrote 84 bytes for a total of 1953 debug2: channel 0: rcvd ext data 38 Sink: C0555 4697 system_test_precheck debug2: channel 0: written 38 to efd 6 system_test_precheck                                                                                100% 4697     4.6KB/s   00:00     debug3: Wrote 4740 bytes for a total of 6693 debug3: Wrote 52 bytes for a total of 6745   it hangs after that   I did google and found below links where I found solution for that  from below question but i need more details that is not in the answer  Why does SCP hang on copying files larger than 1405 bytes?  I changed MTU from 8950 to 1400 on source machine from where I am doing SCP.  I want to know what was the issue and how did it worked for me?

I'm trying to copy a file from one of my local machines to a remote machine. Copying a file with size upto 1405 bytes works fine. When I try to scp a larger file, the file gets copied but the scp process hangs up and doesn't exit. I have to hit Ctrl-C to return back to the shell.  I have observed the same behavior with FTP as well. Any ideas about what might be causing this?


Can anyone help me with this?  Consider the circle $C = \{f(x,y)\in\mathbb{R^2}: x^2 + y^2 = r^2\}$ and a point P2\in\mathbb{C}. A point P2\in\mathbb{C} is randomly chosen.  Compute the variance of the random variable X measuring the distance between P1 and P2.  The average between two points is 2rsin(θ/2) where θ is in [0,π]. But how can a find the pdf?

I have a circle centred at $(0,0)$ with radius $r$ and I have $2$ random points $P$ and $Q$ on the circumference of the circle. If $d$ is the distance between $P$ and $Q$, what is the variance of $d$?  My solution: I have taken $P$ with coordinates $(x_1,y_2)$ and $Q$ with coordinates $(x_2,y_2)$  $d=2r \sin(\frac{\theta}{2})$ as it is the equation of chord length.  I have the joint pdf of $x$ and $y$ as :  $f(x,y)=\frac{1}{\pi r^2}$ if $(x,y)$ is on the circle.  $f(x,y)=0$ otherwise.  Will the intergal of $xf(x,y)$ with respect to $x$ and $y$ , give me the expected value of $d$?


Here are my test cases.  Expected:  JUNKINFRONThttp://francium.tech should be http://francium.tech JUNKINFRONThttp://francium.tech/http should be http://francium.tech/http francium.tech/http should be francium.tech/http (unaffected)  Actual result:  http://francium.tech francium.tech/http http   I am trying to write a regex replace for this. I tried this,  text.sub(/.*http/,'http')   However, my second and third test cases fail because it searches till the end. It would help if the answer could also do the case insensitivity.  2.5.0 :001 > url = 'francium.tech/http'  => "francium.tech/http"  2.5.0 :002 > url.sub(/^.*?(?=http)/i,'')  => "http"

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Am trying to make a sum of an array which has double. However I am getting wrong answer.  var d1 = new double[] { 26392.23, 35192.23, -26392.23, -35192.23 }; var d2 = d1.Sum(x => x);   output: 7.27595761418343E-12  Expected Output: 0

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


I have 14.04. I read on the pip readthedocs that pip is included by default with Python 3. When I installed Python 3 on Windows it was there, but I'm getting pip command not found on Ubuntu. I checked dpkg and it is not there. I also looked at the Ubuntu Python 3 port page and did not see anything. If pip is here, where do I find it and get it working? If it is not here, why and what else is missing from the default Python 3 that I should know about so I don't waste time looking for it?

Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is.  Bonus question: what if it's a file that isn't installed on my system? Is there, say, a website that will let me look up a file and see what packages, if any, provide it?


Hello i have an eeepc 900 I want to install a light distro on 4gb sd card for simple tasks user must be able to launch mo3(through vlc), occasionally surf internet, and attach usb stick to get mp3 from everything should be easy, form desktop, usb automount, click on drive launch mp3, and may be save them on desktop no much trying to test several distro but can't get out of it with a simple and easy distro tried ubuntu mini, but after install packaing and desktop manager system seems not much usable, usb doesn't Mount, and other weird thing. I am not experienced, and i should need somenthing ready to use plaese an nelp for it thanks

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


I have a big problem with this problem... :  If $V_m(\mathbb{R})$ is a vector space whose dimension is "$m$" then   Proving that "$m$" is even number if and only if exist an endomorphism $J$ of $V_m(\mathbb{R})$ where $J^2=J\cdot J=-identity$. Use this endomorphism to proving that $V_m(\mathbb{R})$ is a complex vector space with dimension half of "$m$", namely, $ \frac{m}{2}$   Please Help!

Let $V$ be a real n dimensional vector space & let $T:V→V$ be a linear transformation satisfying $T^2(v)=-v$ for all $v\in V$. Then how can we show that $n$ is even?  I am completely stuck on it. Can anybody help me please?


$$\lim\limits_{x\to\frac\pi4}\frac{\sqrt2\cos(x)-1}{\cot(x)-1}=?$$  I tried using many formulae but am not able to cancel out the zero factor. Need help...thanks!!

I have been struggling to solve this limit.  What is the limit as $x$ approaches $45^0$ of $$\frac{\sqrt{2}\cos x-1}{\cot x-1}?$$   I know how to use L'Hospital's rule to calculate this limit and got the answer as $0.5$. But, how do I calculate the limit by manipulating the function? Please provide only some hints to proceed.


I was playing MTG with my lady and came across this scenario: She had a creature with 2 +1/+1 counters, and 2 . She attacks with the creature, both triggers hitting the stack. I play  while the triggered abilities on the stack, killing the creature. Since the creature isn't around anymore, I believe the triggered abilities will fizzle, meaning she doesn't get the lands as no +1/+1 counters are placed as the creature is dead. Can anyone confirm my resolution?

Player A taps  targeting Player B; its "deals 1 damage to target player" ability is placed on the stack.  Player B gets priority and responds with , targeting Goblin Fireslinger.  Both players pass priority. Snap resolves, and Goblin Fireslinger is returned to its owner's hand.  Does Player B still take 1 damage from Goblin Fireslinger's activated ability?  I know that if the creature had been killed/sent to the graveyard, the ability would still resolve, but I was told recently that because a player's hand is a private zone it couldn't. If anyone could confirm or deny this for me, it would be most appreciated.


The question about  was closed because:     "This question does not appear to be about the software that powers the Stack Exchange network, within the scope defined in the help center."   This seems to be a little bit odd to me. The question is definitely about something else but does it mean we now can ask questions only about software that powers the Stack Exchange network?

, they  removed a moderator for repeatedly violating our existing Code of Conduct and being unwilling to accept our CM’s repeated requests to change that behavior.  As ,  Representatives of the company including executives, a director, and the Community Management team have failed to respond to my repeated requests to be shown these alleged violations and warning...  So, what did Monica actually do?  Previous content so comments make sense: What did Monica say, according to SO? What did Monica actually say that  (pending Monica's acceptance, of course)? We've heard a lot about how she did, but not what she did.


I expect to be sent to Delhi on business for a month, probably August.  I have requested a week of leave in the middle of the visit.  A week of leave would allow 9 days as I could use the two adjacent weekends.  One plan that I am considering for this leave is a trip to Nepal.  My priority will be an interesting trip rather than a quick one.  Comfort is not a high priority. So, I am considering going by land.    I have spent a lot time in India but it was very long ago.  I backpacked around for over 6 months.  I am well used to low budget travel there. I have been more recently but not Delhi and just typical business travel with no side trips.    However, I am a lot older and more wealthy than in my backpacking days.  I still want to prioritise interest over comfort, hence land, but maybe not quite as tough as in backpacking days.    What are my options?  I am aware that a return trip by land in 9 days may leave me little time in Nepal.  That may be acceptable if the journey itself is interesting.  At least, I want to consider this option before the obvious one of flying.

I am going to Nepal and probably, same as everyone, through Delhi. I was considering going overland from Delhi to Kathmandu, however I have found many posts that advise against it in favor of a flight. The following concerns are the key to the proper decision, I think.  Does the overland route offer a good scenery and cultural experience or is it  better to spend that time in Nepal?  What is the rough cost of an overland journey and how does it compare with a flight?  In case of a flight, is the Indian visa necessary?


How can energy have inertia?    To my intuition, inertia is so closely associated with mass that my intuition says "Huh?"  Indirectly by mass energy equivalence it works fine, for example:  I have a closed system, and add energy. Now it has more mass according to $E=mc^2$, and the inertia associated with that mass increased.   I do not doubt it's right, but does it mean anything associated with physics, beyond being true?

As an explanation of why a large gravitational field (such as a black hole) can bend light, I have heard that light has momentum. This is given as a solution to the problem of only massive objects being affected by gravity. However, momentum is the product of mass and velocity, so, by this definition, massless photons cannot have momentum.  How can photons have momentum?   How is this momentum defined (equations)?


I know two ways of pass data from parent to child in the case of a static created child components: passing attribute values from parent to child and exposing child methods to parent.   The latter method can be easily used even with dinamically generated child components since the only thing needed is to give to each child a different aura:id.   I have troubles implementing the first method instead. I don't know how to pass an aura attribute to a dynamically generated child component but only how to pass a value. This means that I'm not able to change its value later.  Is it possible to pass an aura attribute to a dynamically generated child component? How?    Some references on the two ways of passing down data from parent to static generated child taken from a  on Salesforce Developer Blog.  Attributes  parent.cmp  <aura:component>    <aura:attribute name="parentAttribute" type="String"/>     <c:childComponent childAttribute="{!v.parentAttribute}"/> </aura:component>   child.cmp  <aura:component>    <aura:attribute name="childAttribute" type="String"/>  </aura:component>   Of course, a handler in the child component could be used to detach a change of childAttribute.  child.cmp (new version)  <aura:component>    <aura:attribute name="childAttribute" type="String"/>     <aura:handler name="change" value="{!v.childAttribute}" action="{!c.onChildAttributeChange}"/> </aura:component>   childController (new version)  ({     onChildAttributeChange : function (component, event, helper) {         console.log("Old value: " + event.getParam("oldValue"));         console.log("Current value: " + event.getParam("value"));     } })   Methods  child.cmp  <aura:component>     <aura:method name="myMethod" action="{!c.executeMyMethod}">          <aura:attribute name="param1" type="String"/>          <aura:attribute name="param2" type="String"/>      </aura:method> </aura:component>   childController.js  ({     executeMyMethod : function (component, event, helper) {         var params = event.getParam('arguments');         console.log('Param 1: '+ params.param1);         console.log('Param 2: '+ params.param2);     } })   parent.cmp  <aura:component>     <aura:attribute name="parentAttribute1" type="String" default="A"/>     <aura:attribute name="parentAttribute2" type="String" default="B"/>      <c:childComponent aura:id="child"/>      <lightning:button label="Call child method" onclick="{! c.onCallChildMethod }" /> </aura:component>   parentController.js  ({     onCallChildMethod : function(component, event, helper) {         var attribute1 = component.get('v.parentAttribute1');         var attribute2 = component.get('v.parentAttribute2');         var childComponent = component.find('child');         childComponent.myMethod(attribute1, attribute2);     } })

For example, is it possible to bind the label of a button to a "myButtonLabel" attribute by adding an expression string like in the following example?    $A.createComponent(         "ui:button",         {             "aura:id": "findableAuraId",         //EXAMPLE:             "label": "{!v.myButtonLabel}",         "press": cmp.getReference("c.handlePress")         },         function(newButton){             //Add the new button to the body array             if (cmp.isValid()) {                 var body = cmp.get("v.body");                 body.push(newButton);                 cmp.set("v.body", body);             }         }     );


Suppose that one considers the formal theory "ZFC+~CH", or the set of all axioms of ZFC plus the negation of the continuum hypothesis.  Then we have that there exists at least one set S whose cardinality lies between that of the integers and the real numbers.  Do set theorists know anything about S?  In particular, supposing that S is a subset of R, which elements from R does S contain?  Has there been any research into this?

If one assumes that the continuum hypothesis is false then there are subsets of the reals of intermediate cardinality, uncountable but smaller than the continuum. What can be said about the necessary  properties of such a set e.g. topological properties other than that it cannot be closed?


Often, I will downvote a post because of major spelling / grammar errors. The expectation is that if the post is improved, I would remove my downvote. That's better for everyone. But how can I be expected to keep track of each of these on my own? Couldn't we do something like this:     It's not perfect, and would probably be an implementation nightmare, but even if only the edit notification part was implemented it would make life easier. And more downvotes would get undone. I do realize that this would be a problem for edit wars. Couldn't we make the edit notifications stop for those involved after x rollbacks? We could even make it a 5k/10k privilege.

We are happy to announce that the  follow question and answer feature is now live across the Network, including Stack Overflow, all Stack Exchange sites, and all Meta sites. (International Stack Overflow sites will have it turned on in a day or two once we have translations all set.) You can follow any question or answer (that you did not author) by clicking on the [follow] button that is shown in the menu immediately below the post (alongside the [share] button):    After you have followed a post, you will get inbox notifications for all new answers (in the case where you followed a question), comments, edits, and notices. You will not receive notifications for any action that you performed. As was mentioned in the earlier post, we are not making changes at this point to the notifications received by a post owner, or due to @mentions. The initial release had been planned to only include question following. Thanks to many folks who chipped in over the past few weeks, we are happy to release both question and answer following at the same time. These are available in both the regular and mobile views. We are still planning on two more related releases:  Follows profile tab and question listing filter: A tab for follows will be added to your user profile activity page. Each user will be able to view this tab that will provide a listing of followed questions and answers, with standard sorts, and the ability to unfollow from the listing. Users (with the exception of moderators and authorized staff) will not be able to see this information about other users (nor will it be made public in the API, SEDE, or data dumps). We will be renaming the Favorites feature to Bookmarks. As we mentioned in the preview post, the feature will be the same as Favorites, with the name and icon updated to more accurately represent user expectations and usage. And you will be able to both "bookmark" and "follow" a question.  We hope that this new feature will allow you to have better access to the content that you care about and want to keep tabs on. Update (June 11, 2020): The user profile tab and the rename of Favorites to Bookmarks have been released.


I'm a college student who major in Computer Science. Our math professor is giving a lecture about Logic in depth, and has given us some handouts.  Because of the in-depth lecture, I find it really hard to understand symbols and the theory system inside the handouts.  Can anybody provide me with some directions (the things need to know mainly, some books to read)?  P.S. Some propositions in homework need to be proved accurately and the proof is  supposed to be written carefully. Any good ideas?  EDIT  What is PL Model, and something called Tarski semantics, like supp(phi)? And the lecture combines the Logic Foundation with Boolean Set Theoretic, which involves low-level formal definition of Boolean Algebra.

I just started to learn mathematical logic. I'm a graduate student. I need a book with relatively more examples. Any recommendation?


How can I typeset the hollow forward and backward slashes (in mathmode) as used in the attached image? They need to be used alongside normal forward and backward slashes.

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


In review articles it often happens that a figure is taken from another document which is mentioned in the \caption by a \cite macro. If such a caption  preceeds the first occurence of the corresponding \cite in the text, the number is increased when the caption is processed by TeX. Since the reader does not read the caption first, but will proceed with the main text until the next paragraph or headline, the numbering in the text has a gap.   Thus, I would like to reference an entry in the bibliography without creating it. a simple \ref does not work. Any ideas?  Update: The following exmaple produces the desired numbering in the text, but no citation in the caption. As soon as I use the comment version in the \caption, the numbering is not as I want it. (Don'T forget to re-run bibtex while testing).  \begin{filecontents}{./mybib.bib} @misc{foo,   author={Foo},   title={Foo}, } @misc{bar,   author={Bar},   title={Bar}, } @misc{baz,   author={Baz},   title={Baz}, } \end{filecontents}  \documentclass{article} \usepackage[super]{natbib} \bibliographystyle{unsrtnat} \begin{document}  \begin{figure}   \caption{Taken from Foo\ref{foo}}   %  \caption{Taken from Foo\cite{foo}}   \label{fig:foo} \end{figure}  Bar\cite{bar} and baz\cite{baz} have done some fascinating research, which is best summarized as shown in Figure~\ref{fig:foo} (originally  by Foo\cite{foo}).  \bibliography{./mybib} \end{document}

I am having an issue with LaTex/Bibtex presenting my citations in order of appearance. I know there a plenty of questions on this and I have read some of them, but the solutions posted don't seem to do me any good. I am using MacTeX and TeXmaker.  I am writing a large document, like a Thesis. Chapters are split between individual Tex files and included using the \include command.  I have a large .bib file that is maintained by Mendeley (program I use for storing my references and producing a BibTex file).  I am using the package, cite (mainly for doing references like [1-3,6,9])  I have a pretty standard looking document.  \documentclass[11pt,a4paper]{report} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3} \newcommand{\doubleSignature}[3][Alex Mason]{% \parbox{\textwidth}{ \centering #3 \today\\ \vspace{2cm}  \parbox{7cm}{   \centering   \rule{6cm}{1pt}\\    #1  } \hfill \parbox{7cm}{   \centering   \rule{6cm}{1pt}\\   #2 } } } \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} %\usepackage[sorting=none]{biblatex} %\bibliography{Alex} % Where journals.bib and phd-references.bi \usepackage[pdftex]{graphicx} \usepackage{enumerate} \usepackage{nomencl} \usepackage{wasysym} \usepackage{booktabs} \usepackage{cite} \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry} \graphicspath{{./Diagrams/}} \usepackage[labelfont={sf,bf}, margin=1cm]{caption} \usepackage{subcaption} \renewcommand{\figurename}{Fig.} \renewcommand{\tablename}{Tab.} \renewcommand{\bibname}{References} \author{NAME (MEng)} \title{TITLE} \date{\today} \makenomenclature %------------------------------------------------ \begin{document} \maketitle \pagenumbering{roman} %-----------------------------------------------certificate of originality----------------      -------------------------------------------- \input{CertofOrigin} \begin{abstract} ABSTRACT \end{abstract} %-----------------------------------------------contents------------------------------------------------------------ \tableofcontents \listoffigures \addcontentsline{toc}{chapter}{List of Figures} \listoftables \addcontentsline{toc}{chapter}{List of Tables} \chapter*{Acknowledgements} \addcontentsline{toc}{chapter}{Acknowledgements} ACKNOWLEDGEMENTS \printnomenclature[1.5in] \addcontentsline{toc}{chapter}{Nomenclature} \pagebreak \pagenumbering{arabic} \include{2ndYearReport_CHAP1} \include{2ndYearReport_CHAP2} \include{2ndYearReport_CHAP3} \bibliographystyle{unsrt} \bibliography{Alex} %\printbibliography \end{document}   The goofy looking part at the top (\newcommand{doubleSig.....) is just for when i input a special page I made containing a certificate of originality spiel with two boxes for signatures and my university logo.  As you can see I am using the standard bibtex way of doing bibliographies by stating the style then the stating the bib file to use right at the end of the document. I have tried biblatex but can't get it to work. It says it hasn't produced the bib file but doesn't really state why.  As far as I am aware everything was working A-OK until I started on the second chapter and began adding citations in there. Now my citations are all messed up and won't correct. My first citation starts with [9]!!!  [1] appears in a figure caption later down the page, after 10, 11 and 12 have been called!  I have tried deleting all the working files (bbl, aux, log etc) but nothing happens. I get the same result. IIRC I used to have this problem with MS Word and is part of the reason why I switched to LaTex...yet it seems to have followed me!   bibtex does through a few warnings when it runs stating that some references are missing journal names or volume numbers. Would that be a reason?  What have I done wrong with my code?


I have dual boot with Windows 10 Pro and Ubuntu 14.04 LTS. I want to reset my Windows, as well as delete the Linux partitions and allocate my whole SSD back to a fresh Windows 10 installation.  Would selecting "Reset this PC" delete the partitions, and install Windows as the only OS on my SSD? And is this safe to do?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I have just upgraded to Ubuntu 15.04 and get this on first and subsequent restarts "ACPI PCC probe failed, starting version 219" which just hangs my computer. I have to use recovery to get the computer to boot so I can send you this message. I am relatively new to Linux and would appreciate any help to resolve this issue. I have a dual boot with Windows 8.1 and don't want to upset anything that might mean a re-installation of both Windows and Ubuntu. Thanks in advance.

I've recently updated to Ubuntu 15.04 and after installing the latest nvidia drivers (346.59) which worked on ubuntu 14.10 seems to have caused some trouble on boot.  All I get is the following when booting:   A purple screen for about a second and then  [0.514409] ACPI PPC Probe failed. Starting version 219  A black screen with a message of my monitor saying : No Signal detected.   I am using a GTX 970.


I would like to know what the icon that looks like a backspace keyboard key in the upper-left hand side of the notification panel means (what application does it correspond to?).  In the screenshot given below the icon is found in the very left-most position in the notification icons area.    Thanks.

I'm running stock Android 4.4 on my Nexus 4, and I keep seeing this weird icon that looks like a gray tag or arrow with a plus sign in it.    I don't know any app that does this, and there's never a matching notification when I pull the notification bar down. What does this mean?


I have some noisy GPS data(Points) that they are not exactly on the road because of the noise. But I want to match them to the closest road linestrings. How to do this in PostgreSQL?    Data: accident_tn is the traffic accidents data that contains st_case as its unique id, and geom as its geometry (which is Point type); road is the road network that contains id as the unique id of the linestring, and geom_way as its geometry (which is linestring type); Goal: match each accident point with a road network linestring (the closest one). I tried:   select acc.st_case, road.id     from accident_tn acc, at_2po_4pgr road     where st_dwithin(acc.geom,road.geom_way,0.0002)     order by acc.st_case;   Sample result:    Remaining Problem: Because of the radian value in ST_DWITHIN(), some accidents match more than one linestring while some accidents match none.  I am thinking about how can I modify the query to keep only one linestring for those one point-many linestrings case. In this sense, I can then select a larger randian threshold to match all accident point to one and only one linestring.

I have a table of Roads in PostGIS which geometry is "geometry(MultiLineString,4326)".  Its attribute are      gid   osm_id  name    ref type    oneway  bridge  maxspeed    geom   Now i want to know the closest Road from latitude and longitude.  Also I want to set some distance from that Line/Road like 20m both side and if the point is within that distance then it should give the name of that line else not.


Salesforce Enterprise WSDL downloaded from my organization shows that there is Campaign reference on Lead object:      <complexType name="Lead">         <complexContent>             <extension base="ens:sObject">                 <sequence>                 <element name="Campaign" nillable="true" minOccurs="0" type="ens:Campaign"/>   Screenshot from Lead object:    And I don't see the campaign reference on this    When I run the below query :  SELECT Id,Campaign.Id FROM Lead   This is the error, it throws:     No such relation 'Campaign' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.   I guess I am doing a basic mistake..Can you guys please help me on this?

I created Rest post method for inserting new lead record but in lead Sobject there is Campaign Lookup filed name is 'Campaign' but when i save this method i got the error "Error: Compile Error: Invalid field Campaign for SObject Lead at line 53 column 5"  @HttpPost  global static void CreateRecord()  {      RestRequest req = RestContext.request;     Blob body = req.requestBody;     String bodyString = body.toString();      //Deserializing the data sent into concrete SFDC objects     LeadUtils jsonwrap =(LeadUtils)JSON.deserialize(bodyString,LeadUtils.class);      //Initlize the lead object     Lead ledID = new Lead();     Campaign camp =new Campaign();     camp =[select Name from Campaign where Name =:'SmartQuote'];     //Get requested parameter one by one     ledID.SQ_Account_ID__c = jsonwrap.AccountID;     ledID.FirstName = jsonwrap.First_nm;         ledID.LastName = jsonwrap.Last_nm;     ledID.Phone = jsonwrap.Phone;     ledID.Interest_Type__c='Other';     ledID.Rating='Hot';     ledID.LeadSource='SmartQuote';     ledID.Campaign =camp.Name;     ledID.Industry='Other';     ledID.Email = jsonwrap.Email_id;     ledID.Company= jsonwrap.Company;      // insert lead record in salesforce      insert ledID;     RestContext.response.addHeader('Content-Type', 'application/json');      // Return a single Lead as an example      RestContext.response.responseBody =       Blob.valueOf(JSON.serialize((Lead)[Select ID from Lead where ID=:ledID.ID]));  }  }


I know there are many questions here about stationary tests etc however I have a question about general time series modeling.   Is stationarity important for all models? For example, if I model a time series using a Gaussian process of the form   $$y_t = f(y_{t-1}) + \epsilon$$  where  $$f \sim GP(.,.)$$  Should I use differencing? If I should, how do I transform my predictions on the differenced time series back to the original axis?

A stochastic process is composed of a sequence of random variables ordered by time, and a time series is just a realization of such a process. The book that I'm reading says:  "if we assume stationarity, then we can get expectation and variance from time series data".    I don't understand this. Doesn't stationarity mean that every random variable in the stochastic process has same distribution?  If not, every time series data comes from different distributions how they can calculate expectation and variance from them?


This is my definition column in my database.    I have a problem with DateTime in C# and the value that is being saved into my  database SQL Server.  When the applications sends: 2019-06-14 17:10:39.0192950  Saves into SQL Server this: 2019-06-14 17:10:39.0200000.  And When I need to check if the file already exists in my database using the following function:  protected Func<DateTime?, DateTime?, bool> TimeEquals = (x, y) =>    x.Value.Hour == y.Value.Hour       && x.Value.Minute == y.Value.Minute         && x.Value.Second == y.Value.Second && x.Value.Millisecond == y.Value.Millisecond;   That is my code when I insert the values into my SQL Server database:              foreach (var parameter in parameters)             {                command.Parameters.Add(new SqlParameter(                         parameter.Label,                         parameter.Value                     ));             }   I start having problems loosing precision. What is the best way to not loose precision when dealing with dates between C# and SQL Server?

I have a table structured like this:  CREATE TABLE [TESTTABLE] (     [ID] [int] IDENTITY(1,1) NOT NULL,     [DateField] [datetime] NULL,     [StringField] [varchar](50),     [IntField] [int] NULL,     [BitField] [bit] NULL )   I execute the following code:  BEGIN     INSERT INTO TESTTABLE (IntField, BitField, StringField, DateField)     VALUES ('1', 1, 'hello', {ts '2009-04-03 15:41:27.378'});       SELECT SCOPE_IDENTITY()   END   And then   select * from testtable with (NOLOCK)   and my result shows:  2009-04-03 15:41:27.*377*   for the DateField column.  Any ideas why I seem to be losing a millisecond??


I would say it is NOT a duplicate of this question:  .   While I was studying Faraday's law of classical electromagnetism, I came across this picture:   It is called Faraday's disk and it works as a DC dynamo on a constant magnetic field. However, when I tried to apply Faraday's law I failed: $$ \epsilon = - \frac{d\phi_B}{dt} $$ If both the area of the circuit and the magnetic field are constant (even their direction), I would expect the flux to be also constant. Furthermore, knowing the flux is constant its derivative to time must be zero, so there shouldn't be any inducted electromotive force. It turns out there is.  This is called the Faraday Paradox and it even has its own  article and it is also mentioned here: .  Moreover, the second article (which gives a mathematical proof of the Law from Maxwell Equations) claims that Faraday's Law is not universally applicable and also that Faraday's Disk is a nice counterexample. Is this statement true?   If so, when can this Law be applied and why (mathematical explanations are also welcome)?  If it is an universal law, how can this case be explained?

I have studied that  and motional emf are two different lines of thinking but are essentially same. But then, how can Faraday's paradox be explained by Faraday's law of induction? Particularly in paradoxes in which Faraday's law of induction predicts zero EMF but there is a non-zero . The wikipedia article is more confusing rather than enlightening.  I need an explanation regarding  EDIT : I wanted to know how is flux changing if faraday's law is valid .