I don't have all that much SQL experience and honestly don't have a clue where to go from here, most people that ask a question like this are using MS Server or something, and can use a bunch of parameters/values that I can't. I'm using MySQL.  Here's the code in Java I use to create a random location within X miles.   public static GeoPosition randomLocation(GeoPosition location, double radius) {         Random random = new Random();          // Convert radius from miles to meters         double meters = radius * 1609.34;          // Convert radius from meters to degrees         double radiusInDegrees = meters / 111300f;          double u = random.nextDouble();         double v = random.nextDouble();         double w = radiusInDegrees * Math.sqrt(u);         double t = 2 * Math.PI * v;         double x = w * Math.cos(t);         double y = w * Math.sin(t);          // Adjust the x-coordinate for the shrinking of the east-west distances         double new_x = x / Math.cos(location.latitude());          double foundLongitude = new_x + location.longitude();         double foundLatitude = y + location.latitude();         return new GeoPosition(foundLongitude, foundLatitude);     }   These GeoPositions (Groups of longitude/latitude) are stored in the database. However now I need to figure out how to get all of the rows in the database within a radius of X miles.  When writing this out in Java, the distanceBetween method looked like this:  public static double distanceBetween(GeoPosition a, GeoPosition b) {         double longDif = a.longitude() - b.longitude();          double distance =                  Math.sin(deg2rad(a.latitude()))                 *                 Math.sin(deg2rad(b.latitude()))                 +                 Math.cos(deg2rad(a.latitude()))                 *                 Math.cos(deg2rad(b.latitude()))                 *                 Math.cos(deg2rad(longDif));         distance = Math.acos(distance);         distance = rad2deg(distance);         distance = distance * 60 * 1.1515; // Convert to meters         distance = distance * 0.8684; // Convert to miles.         return distance;     }  private static double rad2deg(double rad) {     return (rad * 180.0 / Math.PI); }  private static double deg2rad(double deg) {     return (deg * Math.PI / 180.0); }   and I just had to loop through a collection to find all of the positions, where distanceBetween was true. However this seems like more work on the client that needs to be done.  Is there a proper way to handle returning all results within X miles of a latitude/longitude from the database? because returning every result from the server is going to become a bandwidth killer really fast.   Question marked as PHP as well, because that's what I'm going to be using to poll the database.

I've got a working PHP script that gets Longitude and Latitude values and then inputs them into a MySQL query. I'd like to make it solely MySQL. Here's my current PHP Code:  if ($distance != "Any" && $customer_zip != "") { //get the great circle distance      //get the origin zip code info     $zip_sql = "SELECT * FROM zip_code WHERE zip_code = '$customer_zip'";     $result = mysql_query($zip_sql);     $row = mysql_fetch_array($result);     $origin_lat = $row['lat'];     $origin_lon = $row['lon'];      //get the range     $lat_range = $distance/69.172;     $lon_range = abs($distance/(cos($details[0]) * 69.172));     $min_lat = number_format($origin_lat - $lat_range, "4", ".", "");     $max_lat = number_format($origin_lat + $lat_range, "4", ".", "");     $min_lon = number_format($origin_lon - $lon_range, "4", ".", "");     $max_lon = number_format($origin_lon + $lon_range, "4", ".", "");     $sql .= "lat BETWEEN '$min_lat' AND '$max_lat' AND lon BETWEEN '$min_lon' AND '$max_lon' AND ";     }   Does anyone know how to make this entirely MySQL? I've browsed the Internet a bit but most of the literature on it is pretty confusing.


My Quantum Mechanics' teacher said today on the class that photons don't have mass. I was puzzled because I knew that photons have momentum. If a particle hasn't mass then its momentum sould be $0$ because $p=mv$.   So, how is this possible? Is $p=mv$ only true for Classical Mechanics?

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 have this script  select  *  from psPatDiscounts  where cancelflag = '0'  and refdate between  '2014-01-01 14:03:00'  and '2014-01-31 14:03:00' group by FK_psPatRegisters   however, after running this script it gives me this error message :     Msg 8120, Level 16, State 1, Line 1   Column 'psPatDiscounts.PK_TRXNO' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

I know I need to have (although I don't know why) a GROUP BY clause on the end of a SQL query that uses any aggregate functions like count, sum, avg, etc:  SELECT count(userID), userName FROM users GROUP BY userName   When else would GROUP BY be useful, and what are the performance ramifications?


I'm new to web applications, and have some broad questions about designing a back end, and model view controllers. Where is the best place to ask?

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


I want to multiply the result of Math.Pow by a double (2 decimals). Here is an example:  const number = 2.01*Math.pow(10,9);   Expected result: 2010000000  Actual Result: 2009999999.9999998  What causes this slight deviation? Is there a solution to this problem without rounding the incorrect number?

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


If f: $\mathbb{R} \rightarrow \mathbb{R}$, $f'$ exists (finite or infinite) for all reals, and $\lim_{x\to\infty} f'(x) = K$.   Prove $\lim_{x\to\infty} \frac{f(x)}{x} = K$  I started trying to prove it for $K = 0$.  By definition of infinity limit: $\lim_{x\to\infty} f'(x) = K \rightarrow$ given $\epsilon > 0$, $\exists x_{0} \in  \mathbb{R}$ such that $\forall x > x_{0}$ we have $|f'(x) - 0| < \epsilon$.  By the Mean Value Theorem: for $a,b > x_{0}$, $\exists c \in (a,b)$ such that $f'(c) = \frac{f(b)-f(a)}{b-a}$.  Since $c > x_{0}$, we have that $|f'(c)| = |\frac{f(b)-f(a)}{b-a}| < \epsilon$.  not sure where to go from here  ...  Conclude: $|f(x)/x| < \epsilon \rightarrow \lim_{x\to\infty} f'(x) = 0 = K$.

I have come up with a theorem. (It probably doesn't qualify as a theorem, but I don't know what else to call it) This is what it states:  If  $$\lim_{x\to\infty}f'(x)$$ exists (is finite), then $$\lim_{x\to\infty}\frac{f(x)}x=\lim_{x\to\infty}f'(x)$$ I have yet to find a counterexample, and it just seems to make sense to me, but I can't actually prove it.  This "theorem" is crucial to an answer to a question that I was asked to give, but my answer won't be a very good one if I can't prove why it works.    What I've tried:  I have been able to prove it if $f(x)$ has a linear asymptote (I think my terminology is correct).  If:  $$\lim_{x\to\infty}f(x)=\lim_{x\to\infty}mx+b$$  Then:  $$\lim_{x\to\infty}\frac{f(x)}x=\lim_{x\to\infty}\frac{mx+b}x=m$$  But that doesn't work if there is no asymptote. Take $f(x)=\ln(x)$ for example. the $b$ in $mx+b$ would be infinite.


When I installed Ubuntu, I had a keyboard with the " above 2.  Later on, I changed my keyboard to one with EN-US layout with the @ above the 2 and changed my password in the terminal with the passwd command. The password was changed successfully, but when I open a terminal with CTRL+ALT+F1 and try to log in with my username and password, it says "login incorrect" unless I switch " and @. Then I can login.  Now my question is: Why is the keyboard layout different in the terminal than in other software?

I am using Ubuntu 12.04. The keyboard layout is English US everywhere except for the Command Line where it works in English UK. Terminal also has English US. How do I change the default keyboard layout in Command Line to English US?  Also, I think it might be worth noting here, that when I had installed Ubuntu (dual boot with Windows 8. 1), I had initially set the language as English UK, but later changed it to English US from the system settings.


On the matter of "self" in "myself", "himself", etc.  Myself seems to be formed from the possessive (my)and "self".  That appears at first blush to be a single word that is formed from the "self that belongs to me".  Himself seems to be formed from the objective (him) and "self".  That appears to be a single word from the plain "him" and an extra word that indicates a kind of reflexive.  Italian and Spanish use that form by using the word for "same" (stesso, mismo).    Herself is the same as himself, but you can't tell, since the masculine object and possessive pronouns are different (him, his) but feminine are the same (her).  But, in the case of the second person, we use the possessive again -- yourself. (The self that belongs to you.)  Now, the hobgoblin of this particular small mind would like to get the history of how this happened. You see, in MY acquired language, to say "He did it by hisself is dialect and WRONG", yet it seems perfectly reasonable to regularize the whole scheme into something coherent.  I have read "meself", but only when regional dialect is in play.  It sounds wrong to me, but it would regularize the scheme.  I'd like to get a handle on this, because we have the neuter "they" coming up, when he/she is inappropriate.  In my fantasy grammar, I'd say   In the convent: Let everyone do as she wants.    In the monastery: Let everyone do as he wants.    In the public place of indeterminate gender: Let everyone do as they wants.    (Get it?  Third person singular.  "They" works fine, since the conjugation defines the singular/plural issue.)    I like my little scheme for the neuter "they", but if I start mixing that with "self", it's going to get sorely non-standard, but at least it's unambiguous.  I LOVE clarity, and will be willing to sacrifice some conventions to make it happen, but it will be weird.  If I have to mix in a "self" to that, my speech will become incomprehensible, so I tread slowly.  Any thoughts on the matter?

In the earliest grades of elementary schools, students learn that "hisself" and "theirselves" are not words. I do not understand why this is.  If you wanted to refer to 'his' sock, you would say "his sock," not "him sock." Similarly, you would say "their socks," not "them socks."   Why do you not call 'his' self hisself and 'their' selves as theirselves?


I was wondering if there is any possible way to make a console application open in the parent console. Like how MS-DOS opens the app when you type something like <path_to_file>\<filename>.exe, it doesn't close the CMD window, it just opens the app you typed the name for in the current window.  I need to do this in C++, without using system(), as everyone knows about the security risks etc.  I tried CreateProcess() but that opened another window. I am not worried about portability, this is a Windows only application anyways.

When I call CreateProcess in Windows, the new process doesn't seem to inherit the console of the calling process.  I made a test program that runs "ruby xtest", xtest being a script that writes "hello" to standard output.  I ran this test program from Emacs, and get no output.  I also tried the following code calling GetStdHandle, but again, no output.  Then I tried passing CREATE_NEW_CONSOLE in dwCreationFlags to CreateProcess, which made a whole new window with the Ruby output.  Finally, I made a simple fork/exec test program and compiled it using Cygwin's GCC.  This program worked: the Ruby output showed up in Emacs as expected.  I tried to decipher the Cygwin source code in  but failed.  So, how do you make the new process inherit the console of the parent process such that the output from the child shows up as expected?  STARTUPINFO si; PROCESS_INFORMATION pi; memset(&si, 0, sizeof(si)); memset(&pi, 0, sizeof(pi)); si.dwFlags |= STARTF_USESTDHANDLES; si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); si.hStdError = GetStdHandle(STD_ERROR_HANDLE); if(!CreateProcess(0, "ruby xtest", 0, 0, 1, 0, 0, 0, &si, &pi)) die("CreateProcess");


How can I show the following inequality for any real numbers $x,y,z$?  $$\frac{|x-z|}{1+|x-z|}\le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}.$$   The triangle inequality could be useful, but I am not sure in what way.   Thank you

I'm trying to prove the following inequality by purely algebraic means  $$\frac{|x-y|}{1+|x-y|}\leq \frac{|x-z|}{1+|x-z|}+\frac{|z-y|}{1+|z-y|}.$$  My arguement is as follows:   Notice that, $|x-z|+|z-y| \geq |x-y|$ and from this inequality we can write $1+|x-z|+|z-y| \geq 1+|x-z| $ and $1+|x-z|+|z-y| \geq 1+|z-y|$. Now,   $$\frac{|x-y|}{1+|x-y|} \leq \frac{|x-z|+|z-y|}{1+|x-z|+|z-y|}\leq \frac{|x-z|}{1+|x-z|}+\frac{|z-y|}{1+|z-y|}.$$  Is this correct?


for a in range(1,1000):     for b in range(1,1000):         c2 = a**2 + b**2         c = c2**0.5          if a + b + c == 1000:             answer = a * b * c             print(answer)             break   answer gets printed twice, meaning the loop still goes after break. How do I stop the whole loop after I get my desired answer?

Given the following code (that doesn't work):  while True:     #snip: print out current state     while True:         ok = get_input("Is this ok? (y/n)")         if ok.lower() == "y": break 2 #this doesn't work :(         if ok.lower() == "n": break     #do more processing with menus and stuff   Is there a way to make this work? Or do I have do one check to break out of the input loop, then another, more limited, check in the outside loop to break out all together if the user is satisfied?


I've heard many people say "big black eyes," and I'm curious whether or not we must put an and in-between big and black.   To me, since big and black are describing eyes, it is necessary to put an and between the two. Is it just a careless mistake?

If I had the phrase       two blond haired, blue eyed people    would the comma be out of place?    should I hyphenate "blond haired" and "blue eyed"?


I have a bivariate normal distribution  $$f(x,y)=\frac{1}{2\pi \sigma_{1}\sigma_{2}\sqrt{1-\rho^{2}}}\exp\left(-\frac{z}{2(1-\rho^{2})}\right) $$  where $$z=\frac{x^2}{\sigma_{1}^2}+\frac{y^2}{\sigma_{2}^2}-\frac{2\rho xy}{\sigma_{1}\sigma_{2}}$$  Is there a simple way to calculate way to calculate the standard deviation of the difference (x-y) ?

Assume we have two dependent populations with variances $\sigma^2_{a}$ and $\sigma^2_{b}$ and we want to consider the distribution of difference scores for all dependent pairs. Typically the variance of the distribution of difference scores is defined as $\sigma^2_{D}$ = $\sigma^2_{a}$+$\sigma^2_{b}$-2cov(a,b).  But an equivalent form seems to be $\sigma^2_{D}$ = 2($\sigma^2_{a}$+$\sigma^2_{b}$-2$\sigma^2_{s}$), where $\sigma^2_{s}$ is the variance of the distribution of mean scores for the dependent pairs; i.e., the distribution of $(a_{i} + b_{i} )/2$.  Can you point me to a proof that this is the case?


When I have a class that's declared completely within a header file (templated types), and that header file is included by multiple cpp source files, compilation errors appear to be reported once per source file that includes the header. So, if I have a header that's used in 8 different places, each error is reported 8 times.  Suggestions? Do I have to live with this, am I doing it wrong, or what?  Edit  Aside from just being generally annoying, this also messes up the error popup when hovering over the red squiggly line in VS. Yay.    (Using Visual Studio 2012)

I know I can compile individual source files, but sometimes -- say, when editing a header file used by many .cpp files -- multiple source files need to be recompiled.  That's what Build is for.  Default behavior of the "Build" command in VC9 (Visual C++ 2008) is to attempt to compile all files that need it.  Sometimes this just results in many failed compiles.  I usually just watch for errors and hit ctrl-break to stop the build manually.  Is there a way to configure it such the build stops at the very first compile error (not the first failed project build) automatically?


So I tried doing this command  root@server:~#   teamviewer --info print version, status, id  TeamViewer                      10.0.35002  teamviewerd status              teamviewerd start/running  TeamViewer ID: Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)   but apparently it can't find my ID and I must restart the tv daemon, I do this but it still says the same thing?? Is there any way to get my Teamviewer ID without this? I also tried checking the logs but there's nothing in there that's a Teamviewer ID.  My issue is different to others because there is no information in the log files that indicate a client ID whatsoever.

When I tried to run the command teamviewer --info I am getting the following output  root@vps [~]# /opt/teamviewer8/tv_bin/TeamViewer --info   TeamViewer                      8.0.20931    teamviewerd status              teamviewerd start/running, process 9584   TeamViewer ID: not found Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)   but I can't find my TeamViewer ID. Is there any other in Configuration settings where I can find my TeamViewer ID?


In this schematic example they are using a 0 value resistor for R3 on the right side. Why should I do that?    Is this only because of the TP? As I dropped the TP for my design I would think of dropping the 0 resistor also.

I am new to PCB design and I noticed that some schematics use 0Ω or 100mΩ resistors. What is their purpose and why do we need to use them in our PCB design?  Normally if we wish to probe how much current the load is taking, we put a jumper pin across the PCB trace (then measure current across the pin using a multimeter). Adding resistors for this purpose seems like it would waste a lot of PCB real-estate. Is this the sole reason why 100mΩ resistors are being placed (since I = V/0.1Ω) instead of a jumper pin?   If so, is there any consideration we should take when placing such a mΩ resistor on board so it doesn't affect the signal or behaviour of the circuit?


I am playing a level 13 sorcerer and take 1 level in artificer, how does that affect my spells known and spell slots of each class?

I am making a character for a campaign that is starting soon. The character is going to start out as a cleric (War Domain) and will multiclass into artificer (Battle Smith).   I have looked at the multiclassing rules, but I am having trouble making heads or tails of it for a multi-class involving a 2/3 caster (the Artificer) and a full caster (the Cleric).  That leads me to my question: what would a level 15 War Domain cleric/level 5 Battle Smith artificer look like? How many spells per level? How many cantrips? Does the artificer's ability to replace cantrips still apply?


How to keep the dock on top of all windows? (I don't want windows to be smaller because of the dock when the dock is visible)  I don't want to hide the dock. I don't want to place it to the left or right of the screen.  I don't want to move the cursor to the dock to make it visible. I want the dock to be visible allways.  I want windows to act as if the dock is hidden (maximize their size) BUT I want the dock to be on top of all windows. Preferably, including full screen windows.  How can we make this happen?

I've set up my fair share of Macs over the years, but I've never been able to pinpoint what setting tells OS X that you're ok with being able to drag-resize a window vertically so that it goes behind the dock (assuming the dock is in its default position at the bottom of the screen), as opposed to only being able to resize it vertically so that it is touching the top of the dock's "space".  My work computer is a 21" iMac Core 2 Duo and it drives me crazy because I'll quickly drag-resize a window larger by pulling down and to the right but instead of staying locked vertically above the dock it'll slide behind it which I don't like so then I've gotta jiggle the window around to get it all back into visible space... my home computer (6 core tower) doesn't have this problem even though I've, from what I can tell, set it up nearly identically.  Both machines running the latest version of snow leopard.  Here's a video captured from my machine at home showing the window resize behaviour I prefer. If it helps at all I can do another one from my work machine tomorrow showing the windows resizing behind the dock.


Given a port number how can we find which process is using it?

I suspect a program is listening on port 8000 on my machine.  When I run the following command, I get this error:  > python -m SimpleHTTPServer # Lots of python error socket.error: [Errno 98] Address already in use   If I use another port (8000 is the default), the web server runs fine.  If I run wget localhost:8000 from the command line, it returns 404 Not Found.  What can I do (or what tools are available) to find what program is listening on port 8000, and from there where that program is configured?


This is an extension to  previous question, and is related to exercise 4.7 from .  When is the Bayesian posterior mean $m(y) \equiv E[\theta \mid y]$ unbiased for $\theta$, considering theta either as a random variable (Bayesian perspective) or fixed (Frequentist perspective)?

I am wondering about the different ways that Bayesian and Frequentist statistic connect with each other. I recalled that the Maximum Likelihood estimate of a parameter $\theta$ is  of that parameter. That made me wonder: Is the Mean Posterior estimate of $\theta$ an unbiased estimator? That is,  Does $\phi(x)=E(\theta\mid x)$, imply $E(\phi(x)\mid\theta)=\theta$?  Note that this is indeed a meaningful question, since $\phi(x)$, while it is a Bayesian estimator, is simply a function from the data to the real line and so can also be seen as a classical frequentist estimator. If this question cannot be answered in general, please assume the prior is uniform. If not, is there some other Bayesian estimator (i.e. a function from the posterior to $\mathbb R$) that is always an unbiased estimator in the frequentist sense?


I'm creating a export dialog in JavaFX which is loaded from a .fxml file. To initialize the method I would like to use the initialize() method. However, when accessing @FXML gui elements during the initialize() call, i'm getting a NullPointerException because they are still null.  Here my code which is creating the dialog in my controller.MainController class:          // Create dialog         FXMLLoader loader = new FXMLLoader(this.getClass().getResource("/view/exportDialog.fxml" ));         AnchorPane exportDialog = (AnchorPane) loader.load();         exportController = (ExportDialogController)loader.getController();         Stage dialogStage = new Stage();         dialogStage.setTitle("Export...");         dialogStage.initModality(Modality.WINDOW_MODAL);         dialogStage.initOwner(this.stage);         Scene scene = new Scene(exportDialog);         dialogStage.setScene(scene);         dialogStage.show();   And here is the controller of the export dialog which is stored in controller.ExportDialogController:  public class ExportDialogController {     Stage stage = null;      // GUI Elements     @FXML     private AnchorPane anchorPane;      @FXML     private ProgressBar exportProgressBar;      @FXML     private Label exportStatusLabel;      @FXML     private Button exportButton;      public void initialize() {         Stage stage = (Stage)exportButton.getScene().getWindow();         stage.setOnCloseRequest(event -> close());     } }   Here is the code of my .fxml file which is stored in view.exportDialog:  <?xml version="1.0" encoding="UTF-8"?>  <?import javafx.scene.control.Button?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.ProgressBar?> <?import javafx.scene.layout.AnchorPane?>  <AnchorPane prefWidth="600.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.ExportDialogController">    <children>       <ProgressBar fx:id="exportProgressBar" layoutX="75.0" layoutY="155.0" prefHeight="28.0" prefWidth="450.0" progress="0.0" AnchorPane.leftAnchor="25.0" AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="50.0" />       <Label layoutX="47.0" layoutY="42.0" prefHeight="17.0" prefWidth="218.0" text="Exporting dataset....." AnchorPane.leftAnchor="25.0" AnchorPane.topAnchor="25.0" />       <Label fx:id="exportStatusLabel" alignment="CENTER" layoutX="286.0" layoutY="203.0" text="Export successful!" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="90.0" />       <Button fx:id="exportButton" layoutX="261.0" layoutY="115.0" mnemonicParsing="false" onAction="#exportButtonPressed" prefHeight="25.0" prefWidth="79.0" text="Cancel" AnchorPane.bottomAnchor="25.0" AnchorPane.topAnchor="120.0" />    </children> </AnchorPane>   I've linked the controller in the .fxml file and I also added the fx:ids.    According to the documentaion of JavaFX, the gui elements should at this point already been injected.  What I'm doing wrong here?

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?


ERROR:  The signup request failed because this organization has reached its active scratch org limit. 11:13:42.653 sfdx force:org:create -f config\project-scratch-def.json --setalias treailhead --durationdays 30 --setdefaultusername ended with exit code 1  above the error are occured every time . please help me any one out there

As a package developer scratch orgs look like a great solution for automated CI testing and Salesforce has even done some great demos using Github and TravisCI to show automatically testing code using the DX CLI. However, in reviewing the details of DX, it looks like the limit is currently set to 50 orgs a day. If we want to test pull requests against 5 different org configurations, this limits us to 10 test runs a day. On a moderately sized team, this is going to be a tough limit to deal with. Has anyone had any success in working around this limit (or heard of any planned limit increases in the future). My initial thoughts are:   Get Salesforce to increase the limit (does not seem likely since this is a very young feature) Reuse scratch orgs for a period of time (this would require a good way to clean them and some savvy CI build code) Run fewer tests (not going to go over well the first time a bug for a specific org configuration slips through)


How can I do a disk low level formatting in Ubuntu on an external hard disk so that any data recovery tools like test-disk or photorec cannot retrieve any data once formatted to ext4 or any file-system? As I was playing around with Test disk, I found that it can recover almost all old files even after formatting it many times and I want to use my external hard disk as new because it is only one year old and in warranty but without any old data.

Is there a way to make sure that a deleted file can not be recovered?   As you know, deleting a file by pressing shift-del or using trash doesn't mean that file is gone forever. It resides somewhere in the computer.  In day to day life, law enforcement or thieves use recovery programs to reveal our private data or something else.   They can recover all data that resides on hard disk, in RAM, and even USB.  To protect us from these people, what should one do? Which program should one use?  Note: I don't want an answer like first use a recovery program then erase that file with shred. With just one program, I want to erase all unused/deleted files on my computer.


Looking around Amazon, it seems that different types of batteries are measured differently:  Does anyone know why?   Li-ion are measured in mWh   1200mWh Cheap-Os  3200mWh Deleepow  3000mWh AmpTorrent   NiMH are measured in mAh   2000mAh Eneloop  2800mAh EBL   Alkalines are typically not measured   "Long Lasting" Duracell  "Longest Lasting" Energizer     I assume that Alkalines are not measured for some sort of historical reason with marketing departments?  ... or is it that alkalines so mystical and unreliable that giving them a measurement is too aggressive? Or that switching to non-toxic / non-mercury was such a bad move in performance that measurements had to be removed in the 90s so people wouldn't know?  Perhaps NiMH are measured in mAh because the voltage can very so greatly and mWh doesn't make sense?  Are Li-ion measured in mWh because that's more consistent with non-battery measurements and they do deliver reliable voltage?

Looking around Amazon, it seems that different types of batteries are measured differently:  Does anyone know why?   Li-ion are measured in mWh    (Cheap-Os)  3000mWh AmpTorrent  NiMH are measured in mAh      Alkalines are typically not measured   "Long Lasting" Duracell "Longest Lasting" Energizer    I assume that Alkalines are not measured for some sort of historical reason with marketing departments?  ... or is it that alkalines so mystical and unreliable that giving them a measurement is too aggressive? Or that switching to non-toxic / non-mercury was such a bad move in performance that measurements had to be removed in the 90s so people wouldn't know?  Perhaps NiMH are measured in mAh because the voltage can very so greatly and mWh doesn't make sense?  Are Li-ion measured in mWh because that's more consistent with non-battery measurements and they do deliver reliable voltage?


I downloaded Oracle JDK-8 using  sudo apt-get install oracle-java8-installer and set this version to default using sudo update-alternatives --config java but when I run java -version I get   java version "10.0.1" 2018-04-17 Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

I followed all the instructions stated at this , but am encountering some problems with the last part of it.  I actually have version 6.22 of java and would like to update to version 6.30.  So after moving the extracted directory java-6-oracle into /usr/lib/jvm I do not know what to do, since the script that is pointed out in the answer above updates from java 5 to java 6.  For sake of clearness here is output if I do an ls in dir /usr/lib/jvm:  $ ls -l /usr/lib/jvm total 8  lrwxrwxrwx  1 root root   14 2011-07-12 15:18 default-java -> java-6-openjdk lrwxrwxrwx  1 root root   14 2011-07-12 12:19 java-1.6.0-openjdk -> java-6-openjdk  drwxr-xr-x 10 root root 4096 2012-04-12 12:06 java-6.31-oracle  drwxr-xr-x  7 root root 4096 2012-02-24 14:43 java-6-openjdk   What should I do now?    ADDED PART  Under the suggestion of @fossfreedom I ran the script anyway and actually it updated the java version.  In fact if I run command java -version output will be the following:  $ java -version java version "1.6.0_31" Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) Server VM (build 20.6-b01, mixed mode)   There is still a problem, if Irun javac -version it gives me the old version installed:  $ javac -version javac 1.6.0_22   And if I use the tester at this  it will tell me that version is   Java Version 1.6.0_22 from Sun Microsystems Inc.   What's going wrong?  It seems that Java Runtime Environment has updated, but Java Compiler and Java plugin for browser have not.  How can I update them?    OTHER ADDED PART  sudo update-alternatives --config java will return following output  $ sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin/java).    Selection    Path                                      Priority   Status ------------------------------------------------------------ * 0            /usr/lib/jvm/java-6.31-oracle/bin/java     1062      auto mode   1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode   2            /usr/lib/jvm/java-6.31-oracle/bin/java     1062      manual mode  Press enter to keep the current choice[*], or type selection number:   these makes sense with the fact that JRE is correctly updated to version 6.31, issues are on Java Compiler and Java browser plugin.  Any ideas?


How do I transfer data between Ubuntu and CentOS  using LAN cable, in the same network? I tried installing Samba which did not go well in CentOS.

Given two Linux boxes on a LAN, what's the simplest way to transfer files between them?


I want to know if the list of Time Machine excluded files (pictured below) can be found in a file somewhere.    I know about the question  which has a lot of good information about StdExclusions.plist, mdfind and tmutil – but not the answer for this question.   also talks about .exclusions.plist, which is almost the answer to this question. But there's a catch, I haven't done a backup yet, so I can't read the .exclusions.plist file from the Time Machine backup volume.  I'm doing cd / ; sudo find . -iname "*exclusions*" now, keeping my fingers crossed.

I'm looking for the file that contains all the Time Machine exclusions entered in its Options dialogue. I know that (some of?) the scheduling related settings are stored in the com.apple.backupd-*.plist files at /System/Library/LaunchDaemons but I haven't been able to find the exclusions.


free() only needs the pointer value to release allocated memory. Which means that C knows how big assigned memory blocks are. Then how come there isn't some built-in function to find the size of a pointer array?    I know the convention is to keep track of array sizes, but given that there already is some memory management happening natively, why don't we harness that to have a convenient size() function for arrays?

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


I would like to understand the specific differences in power adapters that have similar input/output spec's but have different described purposes. In other words, can I use any power supply/adapter as long as the spec's are the same?  In this case, I have a hard disk system that has a supplied adapter that I suspect is bad.  I have measured the voltage and it is within spec at 12.6Vdc.  I do not know how to measure the amperage output without taking it apart, but I assume it is not outputting the needed amps because the hard disk enclosure does not start.  So I want to first replace the power supply. Power supply is: Input: 100-240Vac Output: 12Vdc up to 6.67A  If I order one from the manufacturer, it is $70.  But there are many LED and general system power adapters on Amazon that have specs like: Input: 100-240Vac Output: 12Vdc up to 8A  for about $20.  So what am I purchasing for $70 versus $20?  I understand the mfr would be more for their own costs, but they're OEMing the product as well.  So am I safe in getting a 12Vdc 8A output power adapter, like LED purposed or other, or is there some specific reasons I cannot do this?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


In response to having this question marked as a duplicate, I added at the end a section explaining why this is not a generic malware removal question.  Today, I got a popup saying that I would be logged off in 1 minute.  Sure enough, it happened.  I updated the malware definitions of MSE, Malwarebytes Free, and Spybot S&D free, then ran full scans in sequence.  The latter two came up with nothing concerning, but MSE reported Nemucod, and cited c:\ProgramData\Microsoft\Search\Data\Applications\Windows\tmp.edb.  I made the GUI selections to remove that, and was prompted to reboot.  Upon logging in again, MSE displays a message saying that it was cleaning the malware, and that nothing need be done.  Minutes later, MSE displays a warning again, and the details refer to Nemucod again.  So I go through the removal routine again, but this seems to go in and "endless" loop (by which I mean  iterations so far).  The time stamp of tmp.edb always seems about as recent as the most recent reboot.  I used an admin account and tried manually deleting tmp.edb, but am told that the resource is busy.  I booted in safe mode, but tmp.edb was nowhere to be found.  Only when I booted in normal mode again did tmp.edb gets recreated.  Web browsing indicates that tmp.edb is a database file used by Windows, though I'm not sure if it is exactly the same path as above.  I am afraid that the malware isn't truly gone, and that MSE will pop up the warning again.  What should I do?  I am using Windows 7 Professional 64-bit.   Why this is not a generic malware removal question  One reader marked this question as a duplicating a generic best practice and recovery thread, but if it is accepted as a duplicate, then it means that the generic original precludes any further question on malware.  The specificness of this question includes the fact that it isn't necessarily asking how to remove a virus. It doesn't even presume that there is an infection.  I describe how two other AVs do not flag the problem that MSE does, and the fact that the cited file is a Windows file.  One that goes away when I boot in safe mode.  Some new details that make this even harder to assess is the fact that the indicators of Nemucod's presence is highly varied (e.g.  and ), which makes it hard to check whether this is a false positive.  UPDATE  To see if new MSE definitions might now exclude this trigger, I updated definitions at 2am 2018-12-16 EST and ran a full scan.  The trigger recurs. Since the definitions were still those created on 2018-12-15, however, this should not be a suprise. As the tmp.edb is a Windows Search file, I disabled Windows Search as suggested by Jatmin and confirmed the absence of tmp.edb after rebooting.  As a further measure, I downloaded new MSE definitions created 2018-12-16 07:44 EST and did a full scan, which came up clean.  I find Windows Search useful, however, so I re-enabled it, which caused the MSE alarms after reboot (and tmp.edb was present again).  I was hopeful that new definitions created 12:47 EST would not generate the alarm, but they still did. On a positive front, I updated MalwareBytes Free definitions, and enabled rootkit detection -- the scan came up clean.  UPDATE  I can't believe that this problem persists with virus definitions dated 2018-12-25.  Why does no one else encounter this?  I have posted this to the  and reported this to Microsoft.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


$$0<u_1<u_2 \text{ and } u_{n+2} =\sqrt{u_{n+1}. u_n}$$ Show that the limit of this sequence is ${(u_1.u_2^2)}^{1/3}$.  My attempt: By computing individual terms I see that every term can be written in terms of $u_1$and $u_2$. Also this sequence is monotonic increasing and it also has an upper bound by the AM GM inequality. But it doesnot seem to get me anywhere. Please help.

I managed to show that the limit exists, but I don't know how to compute it.  EDIT:  There are initial terms: $a_1=1$ and $a_2=2$.


I have IP database for a certain country. I have paid version of Ip2Lcoation and i got all the IPv6 ranges and IPv4. In my web app I am converting all the IPs to long using ip2long function. It works perfectly with IPv4 but with IPv6 it fails? i searched and found few functions which didn't work. My Code is as follows if (!empty($_SERVER['HTTP_CLIENT_IP'])) {         $ip = $_SERVER['HTTP_CLIENT_IP'];     } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {         $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];     } else {         $ip = $_SERVER['REMOTE_ADDR'];     }               $long = ip2long($ip);// fails at IPv6     //mysql query to check the ip ranges     $cri= new CDbCriteria();     $cri->condition="$long>=ip_range_start AND $long<=ip_range_end";     if (UsaIps::model()->exists($cri))     {        return true;     }     else     {         return false;     }  How can i achieve this ?? Any guide any help??

After searching around somewhat thoroughly, I noticed a slight lack of functions in PHP for handling . For my own personal satisfaction I created a few functions to help the transition.  The IPv6ToLong() function is a temporary solution to that brought up here: . It will split the IP in to two integers and return them in an array.  /**  * Convert an IPv4 address to IPv6  *  * @param string IP Address in dot notation (192.168.1.100)  * @return string IPv6 formatted address or false if invalid input  */ function IPv4To6($Ip) {     static $Mask = '::ffff:'; // This tells IPv6 it has an IPv4 address     $IPv6 = (strpos($Ip, '::') === 0);     $IPv4 = (strpos($Ip, '.') > 0);      if (!$IPv4 && !$IPv6) return false;     if ($IPv6 && $IPv4) $Ip = substr($Ip, strrpos($Ip, ':')+1); // Strip IPv4 Compatibility notation     elseif (!$IPv4) return $Ip; // Seems to be IPv6 already?     $Ip = array_pad(explode('.', $Ip), 4, 0);     if (count($Ip) > 4) return false;     for ($i = 0; $i < 4; $i++) if ($Ip[$i] > 255) return false;      $Part7 = base_convert(($Ip[0] * 256) + $Ip[1], 10, 16);     $Part8 = base_convert(($Ip[2] * 256) + $Ip[3], 10, 16);     return $Mask.$Part7.':'.$Part8; }  /**  * Replace '::' with appropriate number of ':0'  */ function ExpandIPv6Notation($Ip) {     if (strpos($Ip, '::') !== false)         $Ip = str_replace('::', str_repeat(':0', 8 - substr_count($Ip, ':')).':', $Ip);     if (strpos($Ip, ':') === 0) $Ip = '0'.$Ip;     return $Ip; }  /**  * Convert IPv6 address to an integer  *  * Optionally split in to two parts.  *  * @see https://stackoverflow.com/questions/420680/  */ function IPv6ToLong($Ip, $DatabaseParts= 2) {     $Ip = ExpandIPv6Notation($Ip);     $Parts = explode(':', $Ip);     $Ip = array('', '');     for ($i = 0; $i < 4; $i++) $Ip[0] .= str_pad(base_convert($Parts[$i], 16, 2), 16, 0, STR_PAD_LEFT);     for ($i = 4; $i < 8; $i++) $Ip[1] .= str_pad(base_convert($Parts[$i], 16, 2), 16, 0, STR_PAD_LEFT);      if ($DatabaseParts == 2)             return array(base_convert($Ip[0], 2, 10), base_convert($Ip[1], 2, 10));     else    return base_convert($Ip[0], 2, 10) + base_convert($Ip[1], 2, 10); }   For these functions I typically implement them by calling this function first:  /**  * Attempt to find the client's IP Address  *  * @param bool Should the IP be converted using ip2long?  * @return string|long The IP Address  */ function GetRealRemoteIp($ForDatabase= false, $DatabaseParts= 2) {     $Ip = '0.0.0.0';     if (isset($_SERVER['HTTP_CLIENT_IP']) && $_SERVER['HTTP_CLIENT_IP'] != '')         $Ip = $_SERVER['HTTP_CLIENT_IP'];     elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '')         $Ip = $_SERVER['HTTP_X_FORWARDED_FOR'];     elseif (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != '')         $Ip = $_SERVER['REMOTE_ADDR'];     if (($CommaPos = strpos($Ip, ',')) > 0)         $Ip = substr($Ip, 0, ($CommaPos - 1));      $Ip = IPv4To6($Ip);     return ($ForDatabase ? IPv6ToLong($Ip, $DatabaseParts) : $Ip); }   Someone please tell me if I'm reinventing the wheel here or I've done something wrong.  This implementation converts IPv4 to IPv6. Any IPv6 address it doesn't touch.


I've installed eclipse by eclipse installer downloaded from eclipse's website, then I've added it's directory adding the following line to my $HOME/.bashrc  export PATH="$PATH:~/development/eclipse"   But when I try to launch using the command eclipse it shows:  eclipse was unable to locate its companion shared library. If I go to eclipse installation folder and double click eclipse launcher it's launch without any troublle

This doesn't work:  $ ls "~/.wine/drive_c/tools/Family Tree v2.0" ls: cannot access '~/.wine/drive_c/tools/Family Tree v2.0': No such file or directory   But this does:  $ ls "/home/daniel/.wine/drive_c/tools/Family Tree v2.0" Dossiers                           Dossiers_orig   Infos.opt      Racines.exe  'Register OCX.bat'   racines.CNT Dossiers-2019.11.03-11.46.tar.gz   Html            REGSVR32.exe   Racines.hlp   Uninst.isu          readme.txt   Given that ~ is supposed to be the same as /home/daniel, what's going on here?


i'm trying to install putty and i got the following error   E: Malformed entry 4 in list file /etc/apt/sources.list.d/additional-repositories.list (Component) E: The list of sources could not be read. E: Malformed entry 4 in list file /etc/apt/sources.list.d/additional-repositories.list (Component) E: The list of sources could not be read.   after going through some posts on this forum . i opened the file using sudo nano /etc/apt/sources.list.d/additional-repositories.list i have the following content  deb [arch=amd64] https://download.docker.com/linux/debian    sylvia    stable deb [arch=amd64] https://download.docker.com/linux/debian    sylvia    stable deb [arch=amd64] https://download.docker.com/linux/ubuntu    sylvia sudo add-ap$ deb [arch=amd64] https://download.docker.com/linux/ubuntustable deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable   i created a space between ubuntu and stable in line 4 . but still got the sane error? what is wrong with it ?  P.S:- While getting my hands on first time on docker, i uninstalled some packages which i don't need . so, i would like to remove all docker files and install freshly for linux mint.

I'm relatively new to Ubuntu 16.04, and everything has been going fine until my OS threw this error today.   Below is the source code from /etc/apt/sources.list for line 54:  deb http://archive.canonical.com/ partner   I have tried appending ubuntu after the / and before partner, but this does not seem to work.   Any ideas what else to try? I can't run sudo apt-get update until this is fixed.


How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


So,  In Harry Potter & the Sorcerer's Stone (movie, at least) it is mentioned that the Dursleys are the only family that Harry Potter has got to take care of him, despite their abusive nature. How come Harry didn't have any grandparents from either his mother's side or his father's side? It's unlikely that all his grandparents have died of old age already. Other then the Dursleys, there is no extended family mentioned at all. It's also never mentioned whether James Potter has any siblings or not, from what I know.  Was there really no grandparents to allow him a better childhood than living with his aunt and uncle?

You'd think that as soon as Harry met someone who was friends with his dad, he'd have asked about his family.  Certainly Lupin or Sirius could have told him something of his family, given that they were James' closest friends, and Sirius was "always welcome at the Potters".  Obviously there's nothing in the books, but did J.K. Rowling ever explain why there was no mention of any living relative other than Aunt Petunia, or even what happened to Harry's grandparents?


I'new in the Machintosh world. I'am running out of space on my Mac, so i try to install Epic Games and Fortnite on external HDD. Is it possible? How can I do?  Thanks

I need to install more applications - can I use my external HD (samsung T5) and add an additional applications folder? I have loads of space on it and it the speeds are great.


I'm using Excel (2013). I have a workbook with numerous different worksheets, and would like to have them take up two rows of worksheet tabs rather than just one. Can I achieve this somehow? I can't find an appropriate setting in the Excel Options dialog.

Some days I'm working with extremely large Excel files.  They have too many sheets that can't be shown in one sheet tab. (see image)      So, I'm wondering whether or not we can show Excel sheet on more than 1 row. Many tries with Google don't help much.    Many tries but I still can't make Excel show the sheet bar the way I want (≥ 2 rows), so I'm working with some VBA Scripts kopischke suggested.    FYI, right click on |< << >> >| button on the bottom-right corner show you a list of up to 15 sheets.  For more, click on View more in the list appeared.


I migrated a project to a new host. So I transferred my files and my database. But since then, my sql queries with accented characters no longer work (NULL):  php file:  $ product = 'Gestion réseaux sociaux'; $ handle-> query ('SELECT social_networks FROM sale WHERE id_customer = "'. $ id. '" AND product = "'. $ product. '"');   In addition, the accented characters displayed in the view from the database are not displayed correctly.  However, the rest of the written text content that does not come from the database displays the accented characters.  I still put the meta:  <meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8" />   So I deduce that it comes from the encoding of the database but it is identical to that of my former host (UTF8_unicode_ci)  What can be the reason for you?  Thank you in advance for your help !!

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I have to include this picture in my slides that I teach to my students. Can someone help me in drawing this picture using tikz package. Thanks

Ok so I have been trying to draw this figure:     I have made it till the above diagram. The three captions that I made in the topmost picture is what that is remaining. 1. The outer boundary of the rectangle should also be colored blue or some color.  2. The small circles should be labeled with a matrix.  3. The rectangle should be filled with horizontal lines  Here is the code for what I have done:      \documentclass{article} % say \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw  (0,5) node (yaxis) [above] {$y$} |- (5,0) node (xaxis) [right] {$x$}; \draw (-0.5,0) -- (4,0); \draw (0,-0.5) -- (0,4); \definecolor{mycolor}{RGB}{178,181,255} \filldraw[fill=mycolor] (0,0) rectangle (2,2); \filldraw [cyan] (0,2) circle [radius=2pt]; \filldraw [cyan] (2,0) circle [radius=2pt];  \end{tikzpicture} \end{document}   Any help would be appreciated.


If I have multiple loaves of bread on the table, and I'm referring to all of them, which usage of the verb "need" is correct?  The bread need to be put in the fridge.  The bread needs to be put in the fridge.

Should the verb, in the following sentence, be singular or plural?  A series of samples was produced.  In a  I found a . However the text in that reference seems to contradict itself.  Nouns that are “collective” take a singular verb when the group as a whole is meant. Commonly used collective nouns include “number,” “majority,” “series,” and “variety.” Note that when collective nouns refer to a singular group as a whole they are often preceded by the word “a”;  Based on these rules, I would expect that, since I am using an indefinite article a series, the singular form of the verb is to be used. However the reference uses plural in an example  A series of western blots were performed to assay protein expression.


I tried changing my sudoers.d file to remove authentication from my pc by typing %admin  ALL=(ALL) NOPASSWD:ALL without using visudo. However, after doing that anywhere where the sudo command is used, it says that the password that I've entered is incorrect. I tried correcting it, by logging with my username to virtual terminal and running sudo visudo and typing %<username> ALL=(ALL) ALL in vain.  How do I get sudo to recognize my password?

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.


I saw the  the other day and was curious why the sets were wrapped in an extra level of singleton. It might be to handle urelements? I'm not sure. $$ (a,b) \;\;\text{is defined as}\;\; \{\{\{a\}, \varnothing\}, \{\{b\}\}\} $$ Does $\{\{a\}, \{b, \varnothing\}\}$ work as a definition of an ordered pair? This is a shorter version of a Wiener pair with the $\varnothing$ moved to the second element for convenience. Here is my attempt to prove it. Let $\pi_2(p)$ be equal to $\cup \{\cup z : z \in p \land |z| = 2\}$. Note that if the second element of $(a, b)$ is $\varnothing$, then $\{\{a\}, \{\varnothing, \varnothing\}\}$ will contain no 2-element sets. Let $\pi_1(p)$ be equal to $\cup \{\cup z : z \in p \land |z| = 1\}$. If the second and first element are both $\varnothing$, then $\pi_1$ returns $\varnothing$. If just the second element is $\varnothing$, then there are two singletons, but $ (\cup \{a\}) \cup (\cup \{ \varnothing, \varnothing \}) $ is $a$. If neither $a$ nor $b$ are $\varnothing$, then there's only one singleton. Since we can defined both $\pi_1$ and $\pi_2$, this means that this definition of an ordered pair satisfies the required properties.

In  is written that Kuratowski definition of ordered pair is now-accepted (I use down-right index "K" to mark Kuratowski formula):  $p_K = (a,b)_K := \{ \{a\}, \{a,b\} \}$  My question is why people not use below simpler definition instead:  $p = (a,b) := \{ \{a\}, \{b, \varnothing \} \}$  ?    UPDATE  After discussion on comments we get following   Advantages of $(a,b)$:   for paris $(a,\varnothing)$ the result of $(a,\varnothing) = \{ \{a\}, \{  \varnothing \} \}$ is simpler than $(a,\varnothing)_K = \{ \{a\}, \{ a, \varnothing \} \}$ (we don't need to duplicate $a$) for case when $a=b$ formula $(a,a)=\{ \{a\}, \{a,\varnothing \} \}$ save property that we have two elements(pairs) in set, which is loose by formula $(a,a)_K=\{\{a\}\}$   Disatvantages of $(a,b)$:   for case  $(\{\varnothing\},\varnothing) = \{ \{\{\varnothing\}\}, \{ \varnothing \}  \}$ we loose property that when $a\neq b$ the first element of pair  cardinality is $=1$ and second element cardinality is $=2$ which is saved for Kuratowski formula: $(\{\varnothing\},\varnothing)_K = \{ \{\{\varnothing\}\}, \{ \{\varnothing\}, \varnothing \}  \}$. In this case both elements has cardinality $=1$.  for case $a=b$ formula $(a,a)_K=\{\{a\}\}$ is simpler than $(a,a)=\{ \{a\}, \{a,\varnothing \} \}$ for Kuratowski formula is easy to extract pair elements using union/intersection (which is not possible/easy for my formulat):   $\pi_1( p_K ) = \bigcap (a,b)_K = \{a\}\cap \{a,b\} = \{a\}$  $\pi_2( p_K ) = \bigcup (a,b)_K = \{a\}\cup \{a,b\} = \{a, b\}$    I also realized that my definition is similar (but not the same) to


How $$ax ≡ ay\ (mod\ n)$$  ==>  $$x ≡ y\ (mod\ \frac{\ n}{gcd(a,n)})$$  How we got gcd here? Please assume I know nothing about ring theory.

How would you show that if $ac≡bc$ $\mod m$ and $\gcd(c,m)=d$, then  $a≡b$ $\mod \frac{m}{d}$?  Any help would be much appreciated!


I've seen questions about if fighting damage is combat damage, but I don't think this is the same thing. The other questions I saw were asking if fight damage will trigger combat abilities. They say they're separate from each other, and nothing in the official rules say anything about my dilemma.  My question involves a . When it's played, it will fight target creature, like . Because it's fighting, it triggers its second ability to give it two +1/+1 counters at the next end step.  So my question is, will creatures attacking during the combat step trigger the Foe-Razer Regent's second ability? Or will it only be things like Savage Punch, where it says fight.

The text for  says:     {1}{G}, {T} : Target creature you control fights another target creature. (Each deals damage equal to its power to the other.)   Does this have anything to do with combat? Or is it just direct damage between two creatures? For example, can one of the creatures have defender? Or what if one of them is tapped?   I've been assuming it is more like the damage dealt by a .  Also: are the two creatures then “tapped” until their next untap step? ie: could you use Ulenvald Tracker to make two creatures fight in your pre-combat step, then enter the combat phase with a creature who just “fought” untapped? Could you make two creatures fight who are both tapped?


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


Let $G$ be a compact Lie group and consider a $G$-universal bundle $\pi: EG \to BG $ where $BG$ is the classifying space for the group $G$ and the bundle $\pi: EG \to BG $ is defined as the principal $G$-bundle such that $EG$ is a contractible space equipped with a free $G$-action and $BG:=EG / G$. Now let $X$ be a topological space. How can I prove that every principal $G$-bundle $\xi=(E,p,X)$ with base-space $X$ can be realized as the pull-back of the universal bundle $\pi: EG \to BG $?

A classifying space for a group $G$ is a topological space $BG$ with a principle $G$-bundle $p : EG \to BG$ where $EG$ is contractile, so that $BG = EG/G$. A classifying space is universal in the sense that if $q : E \to B$ is a principle $G$-bundle, then there is a continuous map $B \rightarrow BG$, unique up to homotopy, such that $E$ is the fiber product $f^*EG$. Why this definition implies tha there is a one-to-one corrispondence between the isomorphism classes of $G$-bundle on a space $X$ (that I denote with $\mathcal{P}_G(X)$) and the homotopy classes of maps $X \to BG$ ([X,BG])? In practice, how can I show that $$ [\mathcal{P}_G(X)] \simeq [X,BG] $$


I am very new to the bashshell and unix. I am proficient with Java and I know a bit of C, so bash and scripting is very new to me.  I am trying to modify the .profile in my home profile to have it echo my name every time I log on - however I encountered a situation. It is missing. I have checked for the hidden files in my directory using ls - a but it isn't there.  So do I just create a .profile file? I know that there is a /etc/profile that is given to me by my administrator but I am not allowed to overwrite that file.   Also, what would I include in the .profile file if I make my own? Would it just be as simple as creating the file and adding an echo statement with it accessing my username? I have tried this, and it failed.  Here is what my current script looks like(that fails):  PATH=/usr/bin:/usr/lbin:$HOME/bin:.:  export PATH echo "My user profile has executed. Greetings!"   I'd like to add I'm not sure if this PATH is showing the correct path either - it is what I copied from my book.

So I'm pretty new to Linux and recently installed Fedora 19 on my netbook. I want to have a deeper understanding of Linux and the CLI so I'm now reading .  In exercise 3 the author gives the following commands:   ls -al cat .profile   I try to follow these instructions but to no avail. There is no .profile file in my user name directory as I can see from ls -al. From what I've learned the .bash_profile and .profile file are practically the same. The only difference I concluded from my research is that .bash_profile gets checked first.   What I don't understand is why are there multiple files for the same function in Linux, why is the Author using .profile and not .bash_profile (if I understand correctly .profile won't be read when the system finds .bash_profile first) and how comes that I don't have the .profile file on my system?


Why is the following code illegal?    using System;  class Program {     static void Main(string[] args) {         int i = 0;         --i++;         Console.WriteLine(i);     } }   It gives me the following error on the --i++:      The operand of an increment or decrement operator must be a variable, property or indexer   I know that this code has no practical use; I'm merely curious why it is not allowed.  I don't care that it can be fixed by removing that line with no other effects.  As this is tagged with , please include evidence from the language specification.

In C#, does anybody know why the following will compile:  int i = 1; ++i; i++;   but this will not compile?  int i = 1; ++i++;   (Compiler error: The operand of an increment or decrement operator must be a variable, property or indexer.)


Might be a waste of time, but  how do I debug excess space that appears in resulting pdf?  ,  the file might be able to be shortened but I found the spacing is really pronounced if I leave it long To be clear I would like the algorithm to appear where it does (relative to everything else) but would like spacing to  follow the standard put everything right afterwards unless it's a float that doesn't fit in which case move it to the next page.

I am having trouble finding out why the white space between my paragraphs is variable. Sorry, I am not allowed to post images but sometimes there is no white space (like it should be), just an indent to denote that a new paragraph has started. While sometimes the paragraphs start with an indent AND there is (sometimes substantial and thus variable) white space between the last sentence of the previous paragraph and the first sentence of the new paragraph.  In my tex file, there is no difference between what I do in the first and second examples of my text: just two hard returns to denote the start of a new paragraph. I was wondering whether it could be due to placement of figures and footnotes but I have no idea how to change it. I don't mind a little variable white space between paragraphs but the above example is too extreme for my taste. Thanks for your advice!


For communities where you still don’t have an account you do see the Join box at the top of the page. This box currently contains a broken minimize/close button:        You can see the same for any site opened in browser private mode.

The "Click to hide" icon in the hero content (welcoming message) for the non joined communities are not aligned correctly for most of the private beta and some other communities.  A few examples are:        Can the icon be aligned to the right hand side with correct padding?


I'm using fat, rounded strokes to create objects with rounded corners. I've been combining, using Union, an unstroked version of my object with the results of 'Stroke to Path' but it seems like there must be a quicker way. What's the most direct way to go from A to B?  EDIT: Sorry, forgot to mention this question applies to Inkscape.

I've created a path with a stroke and a fill of the same color, and I'd like to remove the stroke while preserving the size/shape of the object. Is there a simple way to do this?  In other words, I'm looking for something like a "Stroke-and-Fill to Path"  The best solution that I have come up with so far is to use "Stroke To Path" and then delete all of the inner nodes.


I'm fairly new to D&D, and I'm going to multiclass for the first time - Bard/Cleric, to be specific.  What kind of spellcasting bonus do I use for spells like Healing Word which is bard and cleric? Do I have to choose between 1d4+Wis and 1d4+Cha?

I would really love to play wizard/warlock multiclass with low charisma (just 13 for mutliclass). The handbook says that I can use Pact Magic slots to cast wizard spells, but doesn't specify which ability I use for spellcasting.     Pact Magic.   If you have both the Spellcasting class feature and the Pact Magic class feature from the warlock class, you can use the spell slots you gain from the Pact Magic feature to cast spells you know or have prepared from classes with the Spellcasting class feature, and [vice versa].   When I cast wizard spells using Pact Magic slots (or warlock spells using wizard's "Spellcasting" slots) do I use spellcasting ability of the slot, or do I get to choose?


My girlfriend is Russian. Last night we tried to fly her to the US on a valid tourist visa. She was stopped at DME and told she would be required to have $2700 USD to get back home immediately even though she had a return ticket. She said this was an "unwritten" rule because of the nonsense i keep seeing on CNN , Anybody else know anything? She is literally trapped and scared to death.

If they already have the documentation, visa, passport and air tickets, can they be stopped at the Moscow airport by their own Customs agents and be made to show proof of funds before being allowed to board?


Let x ∈ R.  Consider  the sequence ${a_n}$, where $a_1$ = x and $ a_{n+1 }= cos(a_n)$.  From picture I can observe that ${a_n}$ converges. But how to prove it analytically. I tried to show it is Cauchy. But that doesn't work.   Because $| a_n-a_m| \leq  |a_n- cos a_{n+1}|+....+|a_{m-1}- a_m|$.  But I don't know how to prove $  |a_n- cos a_{n+1}|$ approaches zero.  Any help (other methods too) will be appreciated.    Edit: There is a question which deals exactly with the same sequence. But That question  doesn't have the proof for the convergence of the sequence. The answers for that question just state that the sequence is convergent. But I want to know how it's convergent. That question actually deals with the denseness and not with convergence

I've been experimenting with recursive sequences lately and I've come up with this problem:     Let  $a_n= \cos(a_{n-1})$ with $a_0 \in \Bbb{R}$ and $L=[a_1,a_2,...,a_n,...].$   Does there exist an $a_0$ such that $L$ is dense in $[-1,1]?$     I know of $3$ ways of examining whether a set is dense:  $i)$The definition, that is, whether its closure is the set on which it is dense, in our case this means if: $\bar L=[-1,1]$.  ii)$(\forall x \in [-1,1])(\forall \epsilon>0)(\exists b \in L):|x-b|<\epsilon$ $iii)$ $(\forall x \in [-1,1])(\exists b_n \subseteq L):b_n\rightarrow  x$   So far I haven't been able to use these to answer the question. I tried plugging in different values of $a_0$ and see where that leads but I have not found any corresponding promising "pattern" for $a_n$. Any ideas on how to approach this?


In  a case is being discussed about a user that got 200 reputation in one of the Stack Exchange sites and hence he gets the  whenever they sign up in a new one. Then, they have a reputation of 101 points and they offer a 100 bounty to some question.  As of writing, this has been done in over 100 sites, and in most of them they just joined today and their first action was offering such bounty. Sometimes, also a comment was written down. Nothing else in most of the cases.  A bounty has a big impact: it attracts a lot of traffic, which in a sense is "taken" from others in the front page. Thus, placing one is a big action towards the site.  While the purpose of these bounties can be OK and offered to questions that are worthy, this very specific case has showed that the system can be a bit perverted and a non-experienced user can have a big impact on a site (or multiple ones).  Currently, the  is set to  (beta and graduated). This means that you have this privilege if you ever when signing up in a site if you ever got 200 in any other site. That is, if you are granted the association bonus.  For this, I suggest raising the reputation for the bounty privilege to something that involves having been somehow active in the site, for example 125, to the same level of the privilege of .

When a user with at least 200 rep on any Stack Exchange site registers a new account on another SE site, they immediately receive 100 rep on that site as an .  This is a deliberate feature to give users who are already familiar with how the SE platform and community works a bit of an extra boost (e.g. letting them upvote and comment immediately), and it's pretty much working as intended. What's probably not intended is that, currently, this bonus rep can be given away as . In fact, because awarding bounties currently requires only 75 rep, any user with 200+ rep on at least one site can join another site, receive the 100 rep bonus, and immediately award it all as a bounty to another user, without having to earn any actual rep on the site at all.  Not only does this seem contrary to the design intent of bounties (and of the association bonus), but it also seems ripe for potential abuse. (In fact, the only thing stopping a sockpuppet ring from gaining unlimited rep this way is the fact that the bounties would likely be sooner or later noticed by mods.) It's also possible for experienced users to (more or less) accidentally bounty their reputation so low that that they lose access to basic site features that they'd normally have due to the bonus.  Arguably, of course, this is entirely the user's own fault, but it can still be .  Also, this behavior , which currently require 110 rep to answer for users with the association bonus. The fix I'd like to suggest is simple:  If a user has been awarded the association bonus, don't let them award a bounty that would take their rep below 100.  Of course, it would still be possible for users with the bonus to drop below 100 rep via other means, e.g. by having their posts downvoted.  But they wouldn't be able to just give away this baseline rep to other users any more.


I have a dataframe which contains   "HYD_SOA_UNBLOCK~SOA_BLOCK-UK|SOA_BLOCK-DE||SOA_BLOCK-FR||SOA_BLOCK-IT||SOA_BLOCK-ES|"  I want the result to be -  "HYD_SOA_UNBLOCK~SOA_BLOCK-UK|SOA_BLOCK-DE|SOA_BLOCK-FR|SOA_BLOCK-IT|SOA_BLOCK-ES|"  I tried:    leadtemp$collate = gsub("||","|",leadtemp$collate)    but it is not working.    Please help me replace "||" with "|"

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I have an attribute table with some fields and I want to display on map the values of a field of this table. Table is a shapefile. I need to turn on label of a field automatically with arcpy, so I tried to use contour annotation but it gives error.  Field= "Teste" env.workspace = "F:/ArcGIS/Trab/Model/Subestações.shp" arcpy.ContourAnnotation_cartography('Subestações', env.workspace, Field , 50000, "ContourTeste", "BLACK",  "", "PAGE", "")  ERROR 000366: Invalid geometry type   I could to use this function for a polyline feature, and with this error I think that problem is this function can't be used with point feature.  How I can turn on label of a field with arcpy?

I am unable to turn on the labels within my Python script:  import arcpy mxd = arcpy.mapping.MapDocument(r"Mypathhere") #Map document reference layer = arcpy.mapping.ListLayers(mxd, "Layername")[0] #Indexing list for 1st layer if layer.supports("LABELCLASSES"):     for lblclass in layer.labelClasses:         lblclass.showClassLabels = True arcpy.RefreshActiveView() mxd.save() del mxd   If I need to enable labeling in the label manager first, can that be done with ArcPy?  The script does not break. I do not get any errors. The points just do not get labeled.


I need to flash a Ubuntu ISO image to my flash drive, but I'm running OS X 10.6, which isn't supported by Etcher. Is there any way to do this?  (I'm going to flash the lubuntu ISO, specifically.)

I'd like to create an Ubuntu live USB stick on a Mac to use to install Ubuntu on another machine. How do I accomplish this?


for example you toss a coin three times then let $X$ be the number of times you get heads.  so since the coin is tossed three times it means the sample space is $ \Omega = \{HHH,HHT,HTH,HTT,TTT,TTH,THT,THH\}$  with each sample point from the sample space above we can associate a number for X (either 3 or 2 or 1 or 0).  this means X is a function from $\Omega$ to the real numbers so It follows that X is a random variable.  but how can we prove that formally, I mean is there a more formal proof of it.

I'm not new to the concept of random variable and I know the measure theory. Anyway, I started reading the book "Stochastic Differential Equation" by B. Oksendal, and I'm having some problem in understanding.  Given a probability space $(\Omega, \mathcal{F}, P)$, $X : \Omega  \rightarrow \mathbb{R}^n$ is a random variable if $X$ is a $\mathcal{F}$-measurable function, or equivalently, if $$ X^{-1}(U) = \{\omega \in \Omega; X(w) \in U\} \in \mathcal{F} $$ for all the open set $U \subset \mathbb{R}^n$.  My main problem is that I always thought that $$X \in \Omega$$ while the book by B. Oksendal asserts that $X : \Omega \rightarrow \mathbb{R}^n$ and hence $X \in \mathbb{R}^n$. Addition For example, consider a fair dice. Then, $\Omega = \{1, 2, 3, 4, 5, 6\}$. One can be concerned to evaluate the probability that the dice result is even. In this case, we write: $$P(X \in \{2, 4, 6\}) = ...$$ In general, the probability of an event $U \subset \Omega$ ($U \in \mathcal{F}$) is normally written as follows: $$P(X \in U)$$ This notation suggest me that $X \in \Omega$. Again, I don't understand what means that $X : \Omega \rightarrow \mathbb{R}^n$.


It is $10$ o'clock, and I have a box.    Inside the box is a ball marked $1$.      At $10$:$30$, I will remove the ball marked $1$, and add two balls, labeled $2$ and $3$. At $10$:$45$, I will remove the balls labeled $2$ and $3$, and add $4$ balls, marked $4$, $5$, $6$, and $7$. $7.5$ minutes before $11$, I will remove the balls labeled $4$, $5$, and $6$, and add $8$ balls, labeled $8$, $9$, $10$, $11$, $12$, $13$, $14$, and $15$. This pattern continues.   Each time I reach the halfway point between my previous action and $11$ o'clock, I add some balls, and remove some other balls. Each time I remove one more ball than I removed last time, but add twice as many balls as I added last time.    The result is that as it gets closer and closer to $11$, the number of balls in the box continues to increase. Yet every ball that I put in was eventually removed.   So just how many balls will be in the box when the clock strikes $11$? $0$, or infinitely many? What's going on here?

A friend of mine asked me the following question:      Suppose you have a basket in which there is a coin. The coin is marked   with the number one. At noon less one minute, someone takes the coin   number one and put into the basket two coins: the number two and the   number three. At noon less $\frac{1}{2}$ minute, he takes the coin   number two and put into the basket the coins number $4$ and the number   $5$ and so on. At noon less $\frac{1}{k}$ he takes the coin number $k$   and put two other coins.       The question is: How many coins I can find in the basket at noon?   Intuitively the answer is $\infty$ because I added one coin for infinite times. But the correct answer seems to be $0$ because every coin numbered $k$ has been removed at noon less $\frac{1}{k}$ of minute. What is the correct answer? Thanks.


In non-relativistic QM, does it make a difference if an energy shift is applied to the systems's Lagrangian or Hamiltonian?

Sorry if this is really naive, but we learned in Newtonian physics that the total energy of a system is only defined up to an additive constant, since you can always add a constant to the potential energy function without changing the equation of motion (since force is negative the gradient of the potential energy).   Then in Quantum Mechanics we showed how the ground state of a system with potential energy $V(x) = \frac{1}{2} m \omega^{2} x^{2}$ has an energy $E_{0}=\frac{1}{2} \hbar \omega $.   But if we add a constant to $V(x)$ won't that just shift the ground state energy by the same constant? So in what sense can we actually say that the ground state energy has an absolute value (as opposed to just a relative value)? Is there some way to measure it?   I ask this in part because I have heard that Dark Energy might be the ground state energy of quantum fields, but if this energy is only defined up to a constant, how can we say what it's value is?


I have several albums with photos taken on an iPhone, which I view and work with at . I can select individual pictures and create a share link, and I do this all the time.  But when I select an album, all the share links ghost out.    How can I use iCloud Photo to share whole albums with others?  PS: I'm aware of  but this recommends to use iCloud Photo Sharing which isn't available from iCloud Photos.

I just switched to using the iCloud Photo Library and I enjoy the possibility to view my photos on any computer via the icloud.com web interface.  However, my  do not appear in the iCloud Photos web interface.  Is that a limitation of icloud.com, or are there any steps to enable shared albums on icloud.com?


If I close "Start a bounty" window with a "Cancel" button, page scrolls to the top.        This is not happen if I choose close button (right top) or simply click anywhere on the page outside this window.

When you click "start a bounty" then "cancel," href="#" exiles you to the top of the page and you lose your spot near the end of the question's comments. Clicking anywhere else on the page simply closes the bounty popup; clicking "cancel" ought to do the same.  In case that wasn't clear:    Dramatization aside, it's a nuisance. Can the click event on that anchor be preventDefaulted?


I'm trying to follow      Ubuntu Servers (Recommended) Install update-manager-core if it is not   already installed:      sudo apt-get install update-manager-core Launch the upgrade tool:      do-release-upgrade Follow the on-screen instructions.   to upgrade a 13.04 box to 13.10, but I can't even get update-manager-core installed at this point. Any ideas how to proceed? I really don't want to rebuild the box from scratch if it can be avoided.  Here's the output from the attempt to install update-manager-core  nathan@nasty-vault:~$ sudo apt-get install update-manager-core Reading package lists... Done Building dependency tree        Reading state information... Done The following extra packages will be installed:   python3-update-manager The following packages will be upgraded:   python3-update-manager update-manager-core 2 upgraded, 0 newly installed, 0 to remove and 120 not upgraded. Need to get 39.0 kB of archives. After this operation, 4,096 B disk space will be freed. Do you want to continue [Y/n]? y WARNING: The following packages cannot be authenticated!   python3-update-manager update-manager-core Install these packages without verification [y/N]? y Err http://us.archive.ubuntu.com/ubuntu/ raring-updates/main python3-update-manager all 1:0.186.2   404  Not Found [IP: 91.189.91.14 80] Err http://us.archive.ubuntu.com/ubuntu/ raring-updates/main update-manager-core all 1:0.186.2   404  Not Found [IP: 91.189.91.14 80] Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/u/update-manager/python3-update-manager_0.186.2_all.deb  404  Not Found [IP: 91.189.91.14 80] Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/u/update-manager/update-manager-core_0.186.2_all.deb  404  Not Found [IP: 91.189.91.14 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?   I've run apt-get update which also complains at this point with these types of errors  Err http://us.archive.ubuntu.com raring-backports/universe i386 Packages   404  Not Found [IP: 91.189.91.13 80] Err http://us.archive.ubuntu.com raring-backports/multiverse i386 Packages   404  Not Found [IP: 91.189.91.13 80] W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/source/Sources  404  Not Found [IP: 91.189.91.14 80]

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


As mentioned in the title i don't understand which differences are and when is better tu use one render than another

We all know what Cycles is, at least to a first approximation: Cycles is  a path tracing engine [...] Specifically, cycles is a "backwards" path tracer, which means that it traces light rays by sending them from the camera instead of sending them from light source(s)  —from   Understanding its implementation clearly requires some more technicalities, like the BVH, the specificity of volumetric shaders etc, but even without all those details it's pretty clear what's the "idea" behind it. In short (Cycles): rays are traced back from the camera until they reach a source of light or the sky. Every time they "hit" something they have different possible routes -- each with its own probability, as described by the material settings: they can reflect at specular angle (specularity), bounce at random angle (rough diffuse), transmit through the surface (refraction), etc -- and during this route they accrue color, intensity etc. Since there are probabilistic choices along the route, multiple rays with different random seeds are cast and then averaged (samples) (1). As for , we know what it's for: it is a «modern, high-quality viewport that will perform better than the current Blender viewport» (); we know what it is not for: it «uses approximations on the behavior of light and will not be as accurate» as Cycles (). But I think it hasn't been written yet "what it does". How would you shortly explain the workings of EEVEE to a friend (or to a class of non experts)? What are the main steps that go into the rendering process? Lit/shaded areas, occlusion, interaction with the materials, (possibly even subsurface scattering and volumetrics, that I guess must be somewhat tricky), etc... My description of Cycles above (1) is the type of understanding I'd like to get about Eevee. Thanks!


I have a question bout euclid polynomials.  If $C(x) =x^4−1$ and $D(x) =x^3+x^2$  How do I find a polynomials $A(x)$ and $B(x)$ such that $A(x)C(x) +B(x)D(x) =x+1$ for all $x$?

Find polynomials $A(x)$ and $B(x)$ such that $A(x)P(x) + B(x)Q(x) = x + 1$ for all $x$ where $P(x) = x^4 - 1$ and $Q(x) = x^3 + x^2$. I'm stumped on this question. I know that I'm supposed to apply the extended version of Euclid's algorithm for polynomials but I'm unsure of how to do that. I thought about trying to create some kind of linear system but guessing arbitrary coefficients but that wouldn't work as $A$ and $B$ don't have fixed degrees.


Does factory resetting a rooted phone unroot it? Does it vary by ROM - I'm on CyanogenMod 11 M7 Nexus 4, will it?

I rooted my Dream/G1 last night and finally gave up on modding it (not for good mind you, but for the moment) and opted instead to just restore it to factory settings via Settings > SD card & phone storage > Factory data reset, which did solve all the problems I was having with multitasking (and not being able to answer it, etc.)  Curiously, I still seem to have root on the phone, despite having reset it. I'd love to understand how that is possible! Superuser Permissions is the only non-stock app still on the phone, and I'm still able to use su to gain root privileges from adb shell. Is this because BusyBox installs to my SD Card?  My phone works just fine, so this is hardly critical, but the whole exercise was/is about knowing my phone better and this is most def. a mystery. Thanks!


I'm new and learning android studio and understanding it more, but I'm stuck here. I can't reload my mainActivity using a button in a different class which has a custom Dialog. I've searched many solutions but none of them work, it always end up 'NullPointerException' error. Can anyone please help me understand this problem more.  this is my mainAcitivity  `  public class MainActivity extends AppCompatActivity {  DialogHandler dialogHandler; Context mainContext; Dialog dialog; @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      mainContext = this;     dialog = new Dialog(this);     dialogHandler = new DialogHandler(MainActivity.this);      Button showButton = (Button) findViewById(R.id.showButton);      showButton.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             dialogHandler.showDialog(mainContext);         }     }); }   `  and this is my second class (DialogHandler)  '  public class DialogHandler {    Activity activity;    MainActivity mainActivity;    Dialog dialog;  public DialogHandler (Activity activity) {     this.activity = activity; }  public void showDialog (Context context) {     mainActivity = new MainActivity();     dialog = new Dialog(context);       dialog.setContentView(R.layout.activity_dialog);     dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));     dialog.show();      Button changeButton = dialog.findViewById(R.id.changeButton);      changeButton.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             mainActivity.finish();             mainActivity.startActivity(mainActivity.getIntent()); // error occurs this line         }     }); }   } '  This is my error  '  E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.dialogpractice, PID: 30511 java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.ActivityThread$ApplicationThread android.app.ActivityThread.getApplicationThread()' on a null object reference     at android.app.Activity.startActivityForResult(Activity.java:3843)     at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)     at android.app.Activity.startActivityForResult(Activity.java:3804)     at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663)     at android.app.Activity.startActivity(Activity.java:4114)     at android.app.Activity.startActivity(Activity.java:4082)     at com.example.dialogpractice.DialogHandler$1.onClick(DialogHandler.java:41)     at android.view.View.performClick(View.java:4781)     at android.view.View$PerformClick.run(View.java:19907)     at android.os.Handler.handleCallback(Handler.java:739)     at android.os.Handler.dispatchMessage(Handler.java:95)     at android.os.Looper.loop(Looper.java:160)     at android.app.ActivityThread.main(ActivityThread.java:5541)     at java.lang.reflect.Method.invoke(Native Method)     at java.lang.reflect.Method.invoke(Method.java:372)     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)   '

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?


In a common struct , the size of a struct equals the sum of size of all its members, however when I want to apply this for the linked list based on struct ,it does not hold.     I run the following code on a 64-bit windows system, and my complier is gcc   typedef struct node {      int val;     struct node *head; } node_t;  typedef struct point {     int x;     int y; } point_t ;  int main(){      point_t a = {1,1};     node_t b={1,NULL};      printf("%d %d %d\n",sizeof(node_t),sizeof(b.head),sizeof(b.val));     printf("%d %d %d",sizeof(point_t),sizeof(a.x),sizeof(a.y)); }   the output turns out to be  16 8 4 8  4 4   what I expect is that sum of sizeof(b.val) and sizeof(b.head) should euqual sizeof(node_t) just as what happens for sizeof(point_t),sizeof(a.x),sizeof(a.y).  so is there anything special of the struct that forms a linked list in the storage?

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I've found this sentence in a dictionary (LDOCE5), so I assume it is correct. But I can't understand why the noun salary is singular although it has a plural form. Could you explain it to me?  The sentence:  Research indicates that over 81% of teachers are dissatisfied with their salary.   EDIT:  As you pointed out there are several similar questions in this topic ( , ). I found  answer the most fitting that claims that teachers should have salaries in my sentence. But  answer implies that Robusto's answer is just a rule of thumb. So I can't find the explicit answer  in the referred questions, I can only guess.  Is there a general rule that clarifies my sentence and the quoted answers?

After the therapy, eight children (43%) became able to crawl/move on their back.   Or should I use "on their backs"?   Singular because each child only has one back, or plural because we're dealing with eight backs?


The problem is to prove the following inequality:  $$ (e^x - 1) \ln(1+x) > x^2 , \quad\text{ for } x >0 $$  Let me introduce notation $f(x) > g(x)$.  At $x=0$ both sides are equal to $0$. So, to prove the inequality one could prove it not for original functions, but for their derivatives. Unfortunately, derivatives of the functions doesn't seem to simplify the situation at all.  I've also tried to substitute some parts of the original inequality with the new variable like this:   $ z = e^x $; $ z = \ln(1+x) $.   Finally, I've tried to separate $e^x$ and $\ln(1+x)$ (which is the major obstacle for good differentiation) by dividing both sides of the inequality by one of these functions.  None of the above helped me to move significantly towards proof.  I'm kindly asking for your help. Both hints and complete solutions are very appreciated.

I was given a task to prove that inequality is true for x>0: $(e^x-1)\ln(1+x) > x^2$. I've tried to use derivatives to show that the $f(x) = (e^x-1)\ln(1+x)-x^2$ is greater than zero, but has never succeeded.  Any help will be appreciated.


I recently accidentally discovered that command is a command, however typing --help or -h after it only seems to yield results similar to this:  bash: command: --: invalid option command: usage: command [-pVv] command [arg ...]   It has no manpage, it is not a separate package in itself, and I can't figure out which package it is in nor what it does... I am running Ubuntu GNOME 15.10 with GNOME 3.18. So, what does the command command do? And how does one use it?

Recently I found command: command which has no manual entry but help displays as follows:  $ help command command: command [-pVv] command [arg ...]     Execute a simple command or display information about commands.      Runs COMMAND with ARGS suppressing  shell function lookup, or display     information about the specified COMMANDs.  Can be used to invoke commands     on disk when a function with the same name exists.      Options:       -p    use a default value for PATH that is guaranteed to find all of         the standard utilities       -v    print a description of COMMAND similar to the `type' builtin       -V    print a more verbose description of each COMMAND      Exit Status:     Returns exit status of COMMAND, or failure if COMMAND is not found.   Is command -v is alternative of which?  What arguments are accepted by this command and how/when to use command?


Please help me as I do not want to reset the password. I inherited this mac and I do not know the admin password but i aslo dont want to change it

I am not a administrator and I would like to find the administrator password. I would not like to reset it however. Is there anyway to find and not reset the administrator password?


Let $T$ be a zone of completeness and $p(x) \in T[x]$. For $\alpha \in T$ to be a multiple root of $p(x)$, a necessary and sufficient condition is that $p(\alpha)=0$ and $p'(\alpha)=0$. Show me. I tried a lot but I don't know how to do it please help.

I don't know how to start the question. The title is self explanatory. How to approach and make a formal proof?


In the beginning of the Guardians of the Galaxy movie, Star-Lord walks around and has no trouble finding the Infinity Stone. Seconds later, the other Troopers arrive as well.   Why did no one before find it? Or search for it?   According to  the Stones are searched for. But was one of them laying around like that particular stone?   Is there a plot about this in one of the comics?

In Guardians of the Galaxy, I couldn't help but notice that      the Infinity Stone   was inside a force field, inside some kind of containment unit.  Star-Lord easily extracts the containment orb using some high powered magnet and, later on in the movie, the Collector effortlessly opens the containment unit, revealing the gem within. Why then was this      gem of infinite power   left unguarded on a deserted planet?    There seemed to have been life on the planet at one point (as revealed by Star-Lord's projection equipment), but by the time Star-Lord arrives all signs of life are largely gone, except for the few rats that he kicks.  Moreover, the only environmental dangers shown in the movie were huge geysers.  Therefore it's safe to say the stone was guarded neither by the environment nor by a society or anything remotely sentient.  Since the gem was a source of infinite power, surely someone would've taken it in the time since the prior civilization was destroyed.    The time span was definitely large because the level of destruction on the planet could be caused either by time and natural entropy, or by      another infinity stone...   but not the one already stored in the force field.  But even if a separate stone did destroy the planet, there was still enough time between destruction and Star-Lord's arrival for the evolution of primitive rats to occur from a planet that was wiped of all life.  Why was the stone even there when Star-Lord arrived?  It was obviously sought after by the Kree/Nova antique dealer so its whereabouts were known.  Why did no one else take the stone?


I'm a Windows 10 user and I wanna use LaTeX to make notes during lectures. But, as you know, it is not very efficient. So, after looking up on the internet, I found this ...    The author is a Vim user and he created snippets to make writing on LaTeX efficient.  My question is that is there any way to make snippets in windows too, in an editor other than Vim?

One of the problems that I have read that people say about LaTeX is it isn't very good for quick note taking.  Has anyone used LaTeX for quick note taking? If so what template have you used? And how have you setup your system so it is relatively easy to make quick notes?  EDIT In response to some of the comments, I am currently using vim as my editor. Which I am very proficient in using.