java.lang.NullPointerException when running a test case using selenium appium

I am facing this issue while i am trying to make use of abstraction concepts for my tests.  My SignIn page class:  public class SigninPage {  protected AndroidDriver driver;  String app_package_name = "com.xyz.abc:id/"; By signInBtn = By.id(app_package_name + "btn_sign_in"); By enterEmail = By.id(app_package_name + "et_email"); By enterPassword = By.id(app_package_name + "et_password");  public void signInProcess(String username, String password) {     System.out.println("Clicking on Sign in button");     driver.findElement(signInBtn).click();     System.out.println("Enter valid Email");     driver.findElement(enterEmail).sendKeys(username);     System.out.println("Enter password");     driver.findElement(enterPassword).sendKeys(password);     System.out.println("SignIn");     driver.findElement(signInBtn).click();   } }   My Test Class:   public class SignIn extends LaunchEmulatorAndDeployAPK {  SigninPage sp = new SigninPage();  @Test public void signInByRegisteredUser() throws Exception {     sp.signInProcess("xyz@test.com", "testpassword");     //Launch Page     Thread.sleep(3000);     By successMessage = By.id("testpath");     Thread.sleep(3000);     boolean result = driver.findElement(successMessage).isDisplayed();     System.out.println("The success message is displayed: " + result);     String text = driver.findElement(successMessage).getText();     System.out.println("The success message text is : " + text);    } }   My Base Class:    public class LaunchEmulatorAndDeployAPK {   protected AndroidDriver driver;  @BeforeTest protected void prepareAndroidForAppium() throws MalformedURLException {     File appDir = new File("E://path");     File app = new File(appDir, "test.apk");     DesiredCapabilities capabilities = new DesiredCapabilities();     capabilities.setCapability("device", "emulator-5554");      // mandatory capabilities     capabilities.setCapability("deviceName", "emulator-5554");     capabilities.setCapability("platformName", "Android");      // other caps     capabilities.setCapability("app", app.getAbsolutePath());     driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); }  @AfterTest public void teardown() {     driver.quit();   } }   I am getting nullpointer exception while running my test class  Clicking on Sign in button FAILED: signInByRegisteredUser java.lang.NullPointerException at com.xyz.abc.pages.SigninPage.signInProcess(SigninPage.java:20) at com.xyz.abc.scenarios.SignIn.signInByRegisteredUser(SignIn.java:17)


How to switch to a TTY in Virtual Box VM?

I am running an Ubuntu 16.04 VM in VirtualBox 5.0.18 and I need to switch to TTY1, how can this be achieved? Is there a keyboard shortcut to achieve this in the guest session because doing the normal one just switches to TTY1 in the host?


dpkg-divert: error: rename involves overwriting error after upgrading from 16.04 to 16.10

I got a strange error after upgrading Ubuntu 16.04 to 16.10.  The Software Updater suggests a partial update:     Could not install 'systemd-shim'      The upgrade will continue but the 'systemd-shim' package may not be in a working state. Please consider submitting a bug report about it.  subprocess installed post-removal script returned error exit status 2    sudo apt-get update finishes without any error.  sudo apt-get remove outputs this  The following packages will be REMOVED:   systemd-shim 0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade. 1 not fully installed or removed. After this operation, 71.7 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 1451244 files and directories currently installed.) Removing systemd-shim (9-1bzr4ubuntu1) ... Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim' dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service' with   different file '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd', not allowed dpkg: error processing package systemd-shim (--remove):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  systemd-shim E: Sub-process /usr/bin/dpkg returned an error code (1)   Please help me to fix this error. Thank you.


I have a few red Toads and a Toad is just hanging out in town. I see an option to buy a red Toad house, ostensibly for him. Are there any added benefits of purchasing this or are the colored Toad houses just cosmetic?


My question is somewhat different from the traditional ones. I expect to receive a desktop that has preinstalled Windows but I am not interested even in booting them, so the question is: Do I have to do anything before plugging a usb stick with Ubuntu? Do I have to, at least once, boot in Windows and then install Ubuntu? Or could I from the first boot of the desktop, just boot the usb stick and install Ubuntu?


I have encountered an odd vertical misalignment when using mathop to define some one-character macros. Specifically, I am (re)defining \i via  \renewcommand{\i}{\mathop{\mathbbl{i}}}   (for quaternions, if you're curious), but the problems starts with   \renewcommand{\i}{\mathop{i}}   and in equations, the symbol \i is pushed down a bit, enough to be noticeable, and ugly (see picture below, arrow is added)! This does not happen with a two-character macro (or more). Dropping the \mathop would solve the problem, but at the expense of bad spacing after the macro.  I am therefore looking for a fix either in the vertical spacing with \mathop or the horizontal spacing after the \newcommand. Thanks.


I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:  In a constructor:  public Light(Vector v) {     this.dir = new Vector(v); }   Elsewhere  public void SomeMethod() {     Vector vec = new Vector();     double d = (vec * vec) - (this.radius * this.radius); }


"people aged from 15 to 24" vs "people ages from 15 to 24": which is grammatically correct?

Here is a sentence excerpted from ,     Teen suicide is a growing health concern. It is the third-leading cause of death for young people ages 15 to 24, surpassed only by homicide and accidents, according to the U.S. Center for Disease Control and Prevention.   I've heard people use both "people aged from X to Y" and "people ages from X to Y" quite often, but I've always been believing that only the former is grammatically correct, whereas in the latter the "ages" doesn't seem to serve as any grammatical component of this sentence. So when I see an APA paper use "ages" in that way, I am just quite surprised: I just can't believe such an authoritative and rigourous academic institution will let such an explicit (and indeed naive, even to a non-native speaker's eyes) grammatical mistake survive in their publications. I'm aware that in daily language usage one ought not to become so fussy over insignificant matters like this, but I do wonder whether it should be paid attention to in academic writings.  OR, using "ages" in that way is no longer considered a grammatical mistake? Honestly I don't think this'd be true, but if it really is, I'd be grateful to be informed. Thanks!


Novel about space marine dealing with relativity?

I read half a book in a library a while ago that followed a guy from the first set of marines to actually go fight. They have gel-pod-beds to survive accelerations in space. after the first mission, which goes poorly, he gets back to earth like 20 years later and finds everyone else got really old, there's massive crowding, and society has gotten very corrupt. He rescues his fellow female marine from her family farm, and they go back into service, wanting to escape but not really being able to deal with society as it races past them.  Any ideas on what this book is called?


a) Compute the full Fourier series representation of $f(x) = e^{ax}, −π ≤ x < π.$      b) By using the result of a) or otherwise determine the full Fourier series expansion for the function $g(x)=\sinh(x), −π ≤ x < π.$   For part a) this is what I did and I'm pretty sure it's all correct. (Please let me know if it isn't!)  $$\begin{align} a_0\ &=\frac{1}{π}\int_{-π}^{π} f(x)\cos(0x)\;dx\\ &=\frac{1}{π}\int_{-π}^{π} e^{ax}\;dx=\frac{1}{π}\left[\frac{e^{ax}}{a}\right]^π_{-π}=\frac{e^{aπ}-e^{-aπ}}{aπ}\\ a_m\ &=\frac{1}{π}\int_{-π}^{π} e^{ax}\cos(mx)\;dx\\ &=\frac{1}{π}\left[\frac{e^{ax}\sin(mx)}{m}\right]^π_{-π}-\frac{1}{π}\int_{-π}^{π} \frac{ae^{ax}\sin(mx)}{m} dx\\ &=\frac{1}{π}\left[\frac{e^{ax}\sin(mx)}{m}\right]^π_{-π}+\frac{1}{π}\left[\frac{ae^{ax}\cos(mx)}{m^2}\right]^π_{-π}-\frac{1}{π}\int_{-π}^{π} \frac{a^2e^{ax}\cos(mx)}{m^2} dx\\ &=\frac{1}{π}\left[\frac{e^{ax}\sin(mx)}{m}+\frac{ae^{ax}\cos(mx)}{m^2}\right]^π_{-π}-\frac{a^2}{m^2}a_m\\ a_m\left(\frac{m^2+a^2}{m^2}\right)&=\frac{ae^{aπ}(-1)^m-e^{-aπ}(-1)^m}{πm^2}\\ a_m&=\frac{(-1)^m\left(ae^{aπ}-e^{-aπ}\right)}{π\left(m^2+a^2\right)} \end{align}$$  Then $$\begin{align} b_m&=\frac{1}{π}\int_{-π}^{π} e^{ax}sin(mx)\;dx\\ &=\frac{1}{π}\left[\frac{-e^{ax}\cos(mx)}{m}\right]^π_{-π}+\frac{1}{π}\int_{-π}^{π} \frac{ae^{ax}\cos(mx)}{m}\;dx\\ &=\frac{1}{π}\left[\frac{-e^{ax}\cos(mx)}{m}\right]^π_{-π}+\frac{1}{π}\left[\frac{ae^{ax}\sin(mx)}{m^2}\right]^π_{-π}-\frac{1}{π}\int_{-π}^{π} \frac{a^2e^{ax}\sin(mx)}{m^2}\;dx\\ &=\frac{1}{π}\left[\frac{-e^{ax}\cos(mx)}{m}+\frac{ae^{ax}\sin(mx)}{m^2}\right]^π_{-π}-\frac{a^2}{m^2}b_m\\ b_m\left(\frac{m^2+a^2}{m^2}\right)&=\frac{(-1)^{m+1}\left(e^{aπ}-e^{-aπ}\right)}{πm}\\ b_m&=\frac{m(-1)^{m+1}\left(e^{aπ}-e^{-aπ}\right)}{π\left(m^2+a^2\right)} \end{align}$$  so $$\begin{align} f(x)&=\frac{1}{2}a_0+\sum_{n=1}^{\infty}a_n\cos(nx)+b_n\sin(nx)\\ e^{ax}&=\frac{e^{aπ}-e^{-aπ}}{π}\left[\frac{1}{2a}+\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2+a^2}(\cos(nx)-n\sin(nx))\right]\\ e^{ax}&=\frac{2}{π}\sinh(aπ)\left[\frac{1}{2a}+\sum_{n=1}^{\infty}\frac{(-1)^n}{n^2+a^2}(\cos(nx)-n\sin(nx))\right] \end{align}$$  but for part b) I wasn't sure of how to get the answer from part a) so instead I did this. I am also unsure if this is right. How do you do part b) using part a) ?  $$\begin{align} g(x)&=\sinh(x)\\ a_0\ &=\frac{1}{π}\int_{-π}^{π}\sinh(x)\cos(0x)\;dx\\ &=\frac{1}{π}\left[\cosh(x)\right]^π_{-π}=0\\ a_m\ &=\frac{1}{π}\int_{-π}^{π}\sinh(x)\cos(mx)\;dx\\ &=\frac{1}{π}\left[\frac{\sinh(x)\sin(mx)}{m}\right]^π_{-π}-\frac{1}{π}\int_{-π}^{π}\frac{\cosh(x)\sin(mx)}{m}\;dx\\ &=\frac{1}{π}\left[\frac{sinh(x)\sin(mx)}{m}\right]^π_{-π}+\frac{1}{π}\left[\frac{\cosh(x)\cos(mx)}{m^2}\right]^π_{-π}-\frac{1}{π}\int_{-π}^{π} \frac{\sinh(x)\cos(mx)}{m^2}\\ a_m\left(\frac{m^2+1}{m^2}\right)&=\frac{1}{π}\left[\frac{\sinh(x)sin(mx)}{m}+\frac{\cosh(x)\cos(mx)}{m^2}\right]^π_{-π}=0 \end{align}$$  Then $$\begin{align} b_m&=\frac{1}{π}\int_{-π}^{π}\sinh(x)\sin(mx)\;dx\\ b_m\left(\frac{m^2+a^2}{m^2}\right)&=\left[\frac{-\sinh(x)(-1)^{m}}{πm}\right]^π_{-π}\\ b_m&=\frac{-2m\sinh(π)(-1)^m}{π(m^2+1)} \end{align}$$  so $$\begin{align} g(x)&=\frac{1}{2}a_0+\sum_{n=1}^{\infty}a_n\cos(nx)+b_n\sin(nx)\\ \sinh(x)&=\frac{-2\sinh(π)}{π}\sum_{n=1}^{\infty}\frac{(-1)^nn\sin(nx)}{n^2+1} \end{align}$$


Is using "their hairs" grammatically wrong?

I'm Soumya, an author from India.  A reader has challenged me about the use of the word 'hairs' in my book. I have used, 'a few hairs' and that's justified, as hair is a countable noun in that very phrase. But I'm at a confusion for some other sentences. Could you kindly tell me if I'm wrong grammatically?   "The evening zephyr ruffled their long flowing hairs - the Indian village girl's shiny, black hair, and Audrey's curly blonde hair." "They had golden or brown or ashen hairs." "His black and white hairs had now turned into complete white."   Could you please help? Thank you!


I'm trying to find out what font this is. It seems to have support for math mode.


Allow application through firewall Linux

I installed clean CentOS 8 machine. copied my app to it. started. i can get response by curl https://localhost:5001 -- insecure but if I try a local or external ip or browser from remote location for example sudo firewall-cmd --zone=public --add-port 5001/tcp --permanent sudo firewall-cmd --reload  curl https://10.128.0.10:5001 -- insecure curl: (7) Failed to connect to 10.128.0.10 port 5001: Connection refused


How does this button make the piston work?

If you set up a button, a piston and a redstone dust in this composition...    The piston will be activated while the button is on (and will retract when off).    However, I can't find the rationale why this gadget works. I guess this is some kind of BUD mechanism, but still don't understand what route the piston is powered through.  As far as I know, if I remove the dust below the button, it'll no longer trigger the piston.    Nor when the dust is powered otherly.


What's wrong with this experiment showing that either FTL communication is possible or complementarity doesn't hold?

The assumptions are:    Alice and Bob have perfectly synchronized clocks Alice and Bob have successfully exchanged a pair of entangled photons   The idea is simply to have Alice and Bob perform the Quantum Eraser Experiment (doesn't need to be the delayed choice).   Alice and Bob agree on a specific time when Bob's photon will be between the "path marker" (which is usually just after the slits) and the detector.  If Alice acts collpasing the wave-function on her photon, the interference pattern will disappear. If not it won't.  Alice and Bob can be spatially separated...  What am I misunderstanding?   The only meaningful difference from this spatially separated quantum eraser experiment to one done on tabletop is that you won't be able to use a coincidence detector, but that is not impeditive to identifying the interference pattern, just will make errors more probable. Which we should be able to deal with a appropriate protocol...  There is a experimental paper with a small amount of citations pointing out to the breaking of complementarity in a very similar setup:


Will Windows 8.1 reset tool erase all the partitions or only the one on which windows 8.1 is located? In case if there is data on one partition and windows 8.1 is on the other partition? Thank you!


My Java application crashes because of this method

My application crashes because of this method. Please help :=)  public void sortedList() {     String goodLetter = "B";      for (String myItem : myArrayList) {         String myFirstChar = myItem.substring(0, 1);         if (myFirstChar != goodLetter) {             myArrayList.remove(myItem);         }     } }


If $A \in M(n , \mathbb R) $ be such that $A^2=A$ , then is it true that $rank (A)=Trace(A)$ ? What I have done is to just observe that all the eigenvalues must be either $1$ or $0$ ; but no headway any further . Please help


Does Time Machine backup system files, kernel files and other OS-related files?   I have corrupted system drivers and files and I want to do a fresh install of OS X but I also want to back up my applications, files and folders.   I wonder if I should go with Time Machine or manually backing up each file.


I'm trying to replace the content of a box in a video, I have used the tracking system to match the movement of the video box with the interior of the one rendered in Blender, but I am running trough what seems a simple thing but I can't manage to get done.   I want the outside faces of the box to be invisible while hiding the inside of the box where the front wall of the box hides it, and the inside of the box to be rendered where visible. To do that I thought it would be as simple as making the face normals point to the inside of the box and giving a color only to the faces where normals are pointing to. But I can't manage to get that, am I going the wrong road? How can I achieve my goal?


Prove that if $ab$ is a perfect square and $GCD(a,b)=1$, then $a$ and $b$ are perfect squares

Let $a$ and $b$ be positive integers. How can I easily prove that if $ab$ is a perfect square and $GCD(a,b)=1$ then $a$ and $b$ are perfect squares.   I actually managed to prove that this way:  if an integer $n$ is a perfect square, then all the powers of the prime numbers of its integer factorization are even. So if an integer is not a perfect square, then at least one the prime numbers of its integer factorization is odd.  Then, reasoning by the absurd, we suppose that $a$ and $b$ are not perfect squares and considering that their GCD is 1, no prime number of its integer factorizations is the same, so $ab$ is not a perfect square, which is absurd.  Even if this proof seems convincing, I'd like to know if it was possible to solve the problem another easier way (In exam conditions, I'd have to prove the proposition that if "if an integer $n$ is a perfect square, then all the powers of the prime numbers of its integer factorization are even" considering that it's not included in the course given by the teacher, so It would get a little tedious)


Tools for tracking NPC/PC relationships and attitudes

I have always had difficulty keeping track of NPCs, their attitudes and their relationships with each other and the PCs. I find relationship webs/diagrams are helpful, but find them difficult to keep up to date and accurate from session to session.  Are there any tools that would help with this task? I am aware that some general mapping software exists, but am more interested in tools specifically designed for RPGs. Also, I would prefer a graphical interface if software is suggested, and to not have to learn a text based language to define the diagram. However, if it turns out that the only tools available are more generalised, and/or complex, I would still like to hear about them as answers.


Avoiding Question Flagged as Duplicate when Couldn't Find Question in Search

I've recently been flagged for a question and it was marked as duplicate.  How do I not get flagged for duplicate questions when I searched for a similar question but the search did not result in the questions and answers that I was looking for?


Avoiding "(Not Responding)" label in windows while processing lots of data in one lump

I occasionally need to process a large amount of data from one package off the network, which takes sufficiently long that when the user tries to interact with the application windows adds the "(Not Responding)" string to the window title. I am aware this is because the processing is being done within a call to handle a message (some way up the stack) and therefore is blocking the message pump. I'm also aware the ideal way to deal with this is to process the data asynchronously in a separate thread so the pump can continue running, however this is a LARGE desktop application which is single threaded from top to toe and safely spinning this processing off is not feasible in our time frame.  So with that in mind, is there by any chance a way I can at least avoid the "not responding" moniker (which to most users reads as "has crashed") by telling windows my application is about to be busy before I begin the work? I believe there is something along these lines when responding to a request to close, one can keep asking windows for more time to avoid it proclaiming that your not "closing in a timely fashion"  I should add this is a C++ MFC application.


Why is the detection of gravitational waves so significant?

LIGO has announced the detection of gravitational waves on 11 Feb, 2016. I was wondering why the detection of gravitational waves was so significant?   I know it is another confirmation of general relativity (GR), but I thought we had already confirmed GR beyond much doubt. What extra stuff would finding gravitational waves teach us? Is the detection of gravitational waves significant in and of itself, or is there data which can be extracted from the waves which will be more useful?


Why didn't Loki fall into the Asgardian sea instead of falling into space (abyss) after the destruction of the Rainbow bridge?

In Thor (2011) after Thor shattered the Rainbow Bridge with Mjolnir both him and Loki were going to fall into space (abyss) before Odin arrived for their help. But in the movie we can see water (Asgardian sea) below the Rainbow Bridge during the combat between Loki and Thor. Once the bridge is shattered water gushes above the bridge and both the brothers were thrown up in air. When they landed down we can see both the brothers were going to fall down into space from the verge of the shattered Rainbow Bridge before Odin came for their rescue. Were they both supposed to fall in water (Asgardian sea)? Because, initially there was water below the bridge prior to its destruction.


How can I stop objects like images or tables to move to unwanted position?

I'm currently writing something with overleaf latex but I'm having the issue that images or tables get set to positions I don't want it to. \begin{figure}[htb]  \centering  \includegraphics[width=0.8\textwidth,angle=0]{src/pics/ex.PNG}  \caption[caption]{Image} \label{fig:caption} \end{figure}  \begin{table}[]     \centering     \begin{tabular}{c|c}          &  \\          &      \end{tabular}     \caption{Caption}     \label{tab:my_label} \end{table}  So the table should appear right beneath the image but gets moved to the subsection above. Is there a way to change this?


I just ordered a NAS from synology and I'm looking at hard drives.  What exactly are the benefits of NAS HDDs? I understand that they tend to be running at lower RPM to reduce heat, but obviously I can just buy a lower speed internal drive. Are NAS drives better for hot swappable applications? My NAS will be running 24/7 in RAID 1, but I don't expect I'll be accessing it a lot, it will be mostly for backups of pictures etc.


Unable to open Windows Disk partitions in solaris 11

Not sure if I have come to the right place with the right problem but I don't really have much option as I have not found even a close solution to my problems in any other website during my tireless search times in the internet. So, here it goes-------  I have recently installed solaris 11. The main problem I am facing at the moment is that the NTFS windows HD partitions are not appearing in solaris file system, which was not the case when I used ubuntu. Every single file on my HD was exposed to me when I was in ubuntu.  I installed something called ntfs -g drive but I think I am not using it correctly as most of the time I am copying and pasting commands because I do not have sufficient knowledge to write them myself.  Any assistance in this matter?  ** Yeah I am talking about the exact same ntfs -3g. But how can I see the windows HD partitions in solaris?


Does Moore's law apply to quantum computing?

Plain and simple. Does  apply to quantum computing, or is it similar but with the numbers adjusted (ex. triples every 2 years). Also, if Moore's law doesn't apply, why do qubits change it?


How to let random users add a card to a public Trello board?

I want to use a public Trello board as a public suggestion box. Optimally, I'd include the link in a blog post in the header of my website, and I'd ask users to "add a card" for each unique suggestion.  Unfortunately, at the moment it appears Trello users (who are not members of a board) cannot create cards on public boards. They can only comment on cards themselves.  Is there any way around this? Is there any way to allow all Trello users to create cards on a public Trello board?


Why is it important that physics consists of unitary phenomena?

AFAIK all known quantum laws are  (except the collapse postulate, which is dubious anyway).  Why is it important that the laws be unitary?


Options for object creation are greyed out

I am trying to model a tree. I turned on the Add a sapling add-on in user preferences, however once I want to begin editing the settings, they come up but is grey and doesn't let me click on it.    I have also attached my blend file here:


Placing a figure in the bottom of a page spanning the two columns of an IEEE document

I am writing an IEEEtran article. I use graphicx for inserting .pdf images. Normally, LaTeX selects a position like A. I want LaTeX automatically find and insert the image to a position like B. How can I do that? This is my code:  \usepackage{graphicx} \begin{document} \begin{figure}   \centering   % Requires \usepackage{graphicx}   \includegraphics{Figures/Fig1.pdf}\\   \caption{hi}\label{hi} \end{figure} \end{document}


How to enable/disable suggestions for character alternatives?

I'm talking about the suggestions you (usually) get after you hold a key down for a few seconds. See image:    For some reason they suddenly stopped working for me. I honestly don't recall changing some preference directly related to this.  I would to re-enable it again but I cannot find a way to do it. Does someone know how to accomplish this?


How to format my Python dictionary output?

This line for i,k in (p[0].__dict__).items():     print (i,type(k))  prints code_event <class 'str'> code_event_system <class 'str'> event_no <class 'int'> group_no <class 'int'>  My desired output(for collections.nametuple0 code_event str code_event str  How to fix this?


In $Ax=b$. If $A$ is not invertible there are no solutions or infinity. How to determine what the case is?

I learnt that for the equation: $Ax=b$   There is one solution if $A$ is invertible.  But if $A$ is singular there are infinity solutions or no solutions at all.  If $A$ is singular is it possible to determine whether there are no solutions or infinity solutions?


the command to get generic operating system information

When working on a new linux machine, are there any command that I can use to get the generic information of the system, e.g.,  the version of the installed linux system, the kern


Are there people who cheat around fog of war in Starcraft 2?

Are there people who map cheat the fog of war away in Starcraft 2 on Battle.net? Do I have to worry about this?


apt-get update get GPG error running Ubuntu 14.04 in VMWare

I am currently on Ubuntu 14.04 in VMware Workstation12. I tried install cmake 3.6.2 at first, while I get the error   Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)   Then I searched it on the Internet, get this answer , when run  sudo apt-get upgrade, get   E: GPG error: http://ubuntu.cn99.com precise InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)   I looked into multiple solution on the Internet including these     , and  .   All doesn't work for me.  How to solve the problem? Thanks, allanna.  I don't wanna re-install Ubuntu, now I can't install any software. When I type   apt-get update, I get  E: GPG error:  precise InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)


So I am attempting to make a modular environment in Blender, so I'm modeling many pieces in one scene to make sure they all match up properly before separating them out.  However, whenever I restart Blender after saving and closing it, many of my grouped objects (and their subobjects) have positions reset NOT to where I placed them.  For example, take a look at this:   Here you can see that the door pieces are in the "open" state, when I left them closed AND the "column" for the wall on the left has been moved from being flush with the wall (on the side) to being inside it.  It appears to be trying to move all of the objects to 0,0,0 which is what is messing this up. I'm not sure if it's an object hierarchy problem, but here is my hierarchy if anyone has ideas there:  Wall_Normal (parent)   Wall_Normal_Column (child)   Empty Axis Object (parent)   Door_Left (child a) Door_Right (child b)   Is there a reason why object positions (and their relative subobjects) aren't being saved?


is there any Function to extract all the view modes for specific node?

Is there any function which can give you all the types of view modes available for specific node?  Also is there any direct(UI) way to check it ?  Is going to edit->manage_display the only way to get the view modes ?


Can I use Ubuntu touch on my Samsung Galaxy Grand duos gt-i9082?

I like to learn linux based operating system. If not, what are the steps to make it work in this device? I am really interested in getting Ubuntu touch in my phone. I rooted my phone and i had tried custom roms also.


Difference between System monitor and free -h

I have a Lenovo T430 laptop with 3.7GB of RAM. Since I started using this machine I observe the following strange behavior. If I do a lot of things, say have rails server running, a few nodejs processes, Spotify, Skype, but especially important - a lot of open tabs in Chrome, the system gets really sluggish. However in system monitor I see two things under memory and swap history:   used memory is never more then 2.8 - 3GB out of 3.7; the swap is about 1.5-2 GB out of 4 GB;   So I am asking myself the following questions:  Why would the machine use the swap before the used RAM reaches something like 3.5 or 3.6 out of 3.7? Why would it swap so early?  If there is about 1GB of free RAM, why does it become sluggish?  Today I noticed something interesting though - right now system monitor shows 1.9GB of 3.7GB used memory, but the tool free -h shows the following stats:  total       used       free     shared    buffers     cached Mem:          3,7G       2,7G       967M       420M       8,9M       830M -/+ buffers/cache:       1,9G       1,8G Swap:         3,8G         0B       3,8G   So how comes there is this big difference of 1.9GB in system monitor vs 2.7GB in free -h. This leads me to the following conclusion - system monitor does not show all of the used memory, so apparently I run out of memory sooner than I see in system monitor, which explains the "early" usage of swap and the sluggishness of my computer. Am I correct?  P.S. I've set the swappiness to 10, but that doesn't help a lot.


How to properly compare string in Android?

i'm making an anagramm app in android. I have some problem, i have buttons with text "A", "B", "C" for example. My code generate string "ABC", and my ans[i] = "ABC". But when i compare them, it returns me false. Help pls.  There are code example, i have problem in   if (word == "ERATO") Toast.makeText(this, ans.get(0), Toast.LENGTH_SHORT).show();  public class MainActivity extends AppCompatActivity { public List<Button> btns; public List<String> ans; String word = ""; String checkStr; EditText text; private static final int[] btn_id = {         R.id.btn1,         R.id.btn2,         R.id.btn3,         R.id.btn4,         R.id.btn5,         R.id.btn6,         R.id.btn7,         R.id.btn8 };  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      btns = new ArrayList<Button>();     ans = new ArrayList<String>();     text = findViewById(R.id.txt);     text.setEnabled(false);     fillAnswers();      for (int i = 0; i < btn_id.length; i++){         Button b = findViewById(btn_id[i]);         btns.add(b);     } }  public void fillAnswers(){     ans.add("ERATO");     ans.add("MARI");     ans.add("AIR"); }  public void onClick(View v){     Button b = (Button)v;     char str = b.getText().charAt(0);     addToString(str);     text.setText(word);     b.setEnabled(false);    // Toast.makeText(this, word, Toast.LENGTH_SHORT).show(); }  public void okClick(View v){      //Toast.makeText(this, word, Toast.LENGTH_SHORT).show();     if (word == "ERATO") Toast.makeText(this, ans.get(0), Toast.LENGTH_SHORT).show();   /*  for (int i = 0; i < 3; i++){        // Toast.makeText(this, word, Toast.LENGTH_SHORT).show();          if (checkStr == ans.get(i)){             Toast.makeText(this, word, Toast.LENGTH_SHORT).show();         }     }*/      word = "";     text.setText(word);     for (int i = 0; i < btn_id.length; i++){         Button b = findViewById(btn_id[i]);         b.setEnabled(true);     } }  public void addToString(char s){     word += s; }   }


How to prevent CTRL+C to break ssh connection?

When I want to stop tail -f I press CTRL+C and return to prompt. But when I run ssh connection the CTRL+C breaks the connection. (meanings of flags described )  ssh -t svf "cd ~/w/logs; tail -f some_file.log; exec $SHELL -l"    post does not describes how to prevent remote shell to exit for ssh -t remotehost command args ...  How to stop command (in this example tail -f) with CTRL+C and do not break ssh connection?


Google Map API gives Null Pointer Exception on android 5+

I am trying to get the location of the user from location api of android. I have written following lines of code to get the latitude and longitude and then send the data to some other activity via Intent.  LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);      locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1000, 10f, this);      Criteria criteria = new Criteria();      String provider = locationManager.getBestProvider(criteria, true);       location = locationManager.getLastKnownLocation(provider);      try{         latitude = location.getLatitude();          longitude = location.getLongitude();          LatLng latLng = new LatLng(latitude, longitude);          myPosition = new LatLng(latitude, longitude);         mMap.addMarker(new MarkerOptions().position(myPosition));     }catch (NullPointerException e){         e.printStackTrace();     }   But I got 1 error, when I run on android 5+ device I get Null pointer Exception on each line from getting latitude variable. But for other android sdks Null pointer exception does not appear also.   And also the marker is not visible So I think this is the where NPE comes into picture. But I don't know why android 5+ gives this behaviour. I have compiled this app using android 6.  So for this purpose I have written code in try catch block and added NPE.  Why this is causing error? I am not able to figure it out. Thanks in advance!!


As a nonnative speaker of English I was always taught in school that there are verbs that cannot be used in the continuous form, i.e.  the stative verbs. However, I've seen some stative verbs used in the continuous form in American English, especially the verbs wish, feel, hope, guess, love and like. Is using these stative verbs in the continuous form wrong? If it's not, what's the difference between using them in the simple and continuous forms?


Why is the term "Monte Carlo simulation" used instead of "Random simulation"?

I always read/hear "Monte Carlo" simulations. I have done "Monte Carlo" simulations before to calculate the odds in certain gambling games as part of my job and it was nothing more than basically using an RNG to simulate random results (slot machines spinning wheels) and build upon them to get the final result of the game, repeat and get an estimated average outcome. Anyone would be doing this without ever knowing that what they're doing is called "Monte Carlo" X.  My question is, is there any reason to call a random simulation a "Monte Carlo" simulation other than sounding sophisticated/clever? Any technical/legitimate reasons?  EDIT: I suggest people read . It represents what I wanted to ask about better. I was trying to find out if there are technical reasons to distinguish between a "Monte Carlo" and a "random" simulation, disregarding any historical reasons.


Replacing commas in text file with vertical line, except for in quotes

I have a txt file:   ,"Hi, I am Tom",,"16" "I3","Hi, I am Jerry","Mouse","17"   in which the file is UTF-8. What I'm trying to do is to replace the commas with | except for the ones in quotes "". So the new resulting txt file would be:  |"Hi, I am Tom"||"16" "I3"|"Hi, I am Jerry"|"Mouse"|"17"   I do not have much knowledge on sed or awk script but i heard it can be used to accomplish this. Could anyone show me how it's done?


How to produce a longer \sim with a small letter on top

I am able to produce a standard length \sim with a tiny S above it, but I would like the \sim tilde to be longer (maybe one and half times as wide as a capital letter).  Any tips on how to change the width/length of \sim?


Problem: Consider two parabolae such that their axes of symmetry form a right angle. Prove that all four points of intersection lie on a common circle (it is an assumption that there exist such four points). Could you help me obtain a non-algebraic solution? (The algebraic one I did is given below.)  Algebraic solution:  There is a very simple algebraic approach, just introduce a Cartesian coordinate system such that the parabolae are given by equations:  $$y = \alpha_1 x^2 + \beta_1 $$ $$x = \alpha_2 y^2 + \beta_2 $$  and by scaling, adding and simplifying we can get the following ordinary circle equation (the right-hand side is positive because parabolae intersect): $$ \left(x-\frac{1}{2\alpha_2}\right)^2 + \left(y - \frac{1}{2\alpha_1}\right)^2 = \frac{-\beta_1}{\alpha_1} + \frac{-\beta_2}{\alpha_2} + \left(\frac{1}{2\alpha_1}\right)^2 + \left(\frac{1}{2\alpha_2}\right)^2$$  Non-algebraic solution: ??


How to detect file location in Java Classes?

Lets take a class A. class A{     public getAbsoluteLocation(){         ....   } }  How can this class know in which directory it is located?


Suppose I have an Atwood machine, that is, two different masses connected with an inextensible, massless rope over a pulley. Assuming no friction between the rope and the pulley, the heavier mass will accelerate towards the ground, the lighter mass will accelerate towards the pulley, and the rope will accelerate towards the heavier mass. These three accelerations will be equal in magnitude. But this makes no sense to me. Force causes acceleration. But there is no force acting on the rope. And even if there was, the acceleration of the rope would be infinite because its mass is 0. So why does the rope accelerate? And how can the magnitude of this acceleration be finite?


I am using Spark with Java to read a file from a text file that I store in documents. Then I split the documents by line then by word.  But when I print the words I get     [[Ljava.lang.String;@2819c460] [[Ljava.lang.String;@30364216] [[Ljava.lang.String;@38bb9d7a] [[Ljava.lang.String;@1e8ab90f] [[Ljava.lang.String;@78d6447a]     Below is my code    JavaRDD<String> documents = sc.textFile(path, 1000);                  JavaRDD<ArrayList<String[]>> lines = documents.map(document -> {          return document.split("\\r?\\n");         }).map(_lines -> {      ArrayList<String[]> parsedLines = new ArrayList<>();     Arrays.asList(_lines).stream().parallel().forEach(line -> {     parsedLines.add(line.split("\\t"));    });    return parsedLines;          });          lines.take(5).forEach(column -> {           System.out.println(column);         });     System.out.println(Arrays.toString(column)) gives me this error :    Error:(62, 50) java: no suitable method found for toString(java.util.ArrayList<java.lang.String[]>)     method java.util.Arrays.toString(long[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to long[])     method java.util.Arrays.toString(int[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to int[])     method java.util.Arrays.toString(short[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to short[])     method java.util.Arrays.toString(char[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to char[])     method java.util.Arrays.toString(byte[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to byte[])     method java.util.Arrays.toString(boolean[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to boolean[])     method java.util.Arrays.toString(float[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to float[])     method java.util.Arrays.toString(double[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to double[])     method java.util.Arrays.toString(java.lang.Object[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to java.lang.Object[])


Member function template of class template can't find definition despite explicit instantiation present. Doesn't link

Edit: This is not a duplicate of the linked question since I am using explicit instantiation and only a specific type of member functions do not link (others do).  The following code compiles but doesn't link and I don't understand why. It is explicitly instantiating the Vector class to limit the number of possible arguments for T and therefore hides the definition of Vector<T> in a .cpp file.  // fwd_decl.hpp #pragma once template<typename T> struct Vector; // Forward declare Vector to be used in other headers  // Vector.hpp #pragma once #include "fwd_decl.hpp"  template<typename T> struct Vector {     template<typename U> // To allow for other types than T to be used     Vector operator+(const Vector<U> & other) const;     T x;     T y;      // more stuff.. };  // Vector.cpp #include "Vector.hpp" template<typename T> template<typename U> Vector<T> Vector<T>::operator+(const Vector<U> & other) const {     return { static_cast<T>(x + other.x), static_cast<T>(y + other.y) }; } template struct Vector<int>; // Explicitly instantiate Vector<T> with int  // main.cpp #include "Vector.hpp" int main() {     Vector<int> b = Vector<int>{ 2, 3 } + Vector<int>{ 4, 5 }; }   The error I'm getting is:  1>main.obj : error LNK2001: unresolved external symbol "public: struct Vector<int> __thiscall Vector<int>::operator+<int>(struct Vector<int> const &)const " (??$?HH@?$Vector@H@@QBE?AU0@ABU0@@Z)   I'm compiling with VC++ 17 in VS 15.9.4.  Note that calls to members of Vector<int> that are not function templates do link normally.


How can I copy multiple files inside a bash script

I want to know how can I copy or shell copy multiple files within a bash script. What I mean is that cp /path/to/source/{file1,file2,file3} /path/to/dest  and scp /path/to/source/{file1,file2,file3} user@host:/path/to/dest  will work fine but as example #!/bin/sh scp /path/to/source/{file1,file2,file3} user@host:/path/to/dest  will throw an error like this: /path/to/source/{file1,file2,file3}: No such file or directory  If you will copy or shell copy a single file it works, so the problem are multiple files. Also it works if I would use * for all files but I do not want to copy all files. I should only copy selected files because in both folders are files with the same name but their content is different. Thereby to copy all files and then remove the not needed files would not work. For better understanding following would work: #!/bin/sh scp /path/to/source/file1 user@host:/path/to/dest  Also following: #!/bin/sh scp /path/to/source/* user@host:/path/to/dest  So it has something to do with the correct use of { ... } for multiple files which will work inside the terminal but not if I run the bash script in it. Thanks in advance. //Edit: I add the error if I try it with cp: cp: cannot stat '/path/to/source/{file1,file2,file3}': No such file or directory


How to get to black market on bo3 multiplayer

Please me and my brother are trying to get classified guns but it takes the black market


I'm an a-level student. While studying quantum physics I came across this statement:"According to electromagnetic theory an accelerating charge emits energy".  The bottom-line was that an electron (which is an accelerating charge in an atom) should, according to this, emit electromagnetic radiation, but it does not.  Can someone please explain the electromagmetic theory and why the electron does not emit energy? Please  keep in mind I'm only an a-level student.


pdf graphic produced by Inkscape doesn't print properly

This question was marked as a duplicate: This question already has an answer here:  but I don't see that it is.  I had previously looked at that question, and even tried some of the suggested remedies. But my issue is not with the display (which seems to be the subject of that question) but with the printing. Perhaps I am missing something about the way in which pdf graphics are handled.  Original message:   I am writing a document that has a number of images produced via Inkscape (0.91) and included in my latex document (I'm using TeXshop on a Mac OS 11.5) as pdf files via \includegraphics. These render just fine on screen, but don't print well using various printers; you can see the issue already from printing to a pdf file.   The issue is that regions that have shading or blurring (two effects you can produce in Inkscape) don't print at all.  At the bottom is an example; you can find the graphics file at .  If you want to see the native Inkscape .svg version, it's there too:   Any suggestions on how to handle this? Thanks!  \documentclass[11pt]{amsart} \usepackage{graphicx} \begin{document} \begin{figure}[htb] \centering \includegraphics[scale=1]{concordance2} \end{figure} \end{document}


python, list, array, all rows automatically get updated

a = [[0, 0, 0]] * 3 print(a) [[0, 0, 0], [0, 0, 0], [0, 0, 0]] a[1][0] = 99 print(a) [[99, 0, 0], [99, 0, 0], [99, 0, 0]]   here when I am trying to update a[1][0] every row automatically get updated how to overcome this


Sitemap submission : Do sitemaps need to be resubmitted when they are updated?

In short:  Should I resubmit my sitemap through Google Webmasters Tools every time I replace a sitemap.xml with an existing sitemap.xml (i.e., www.domain.com/sitemap.xml)? Or does it check it automatically?  Detail explanation:  Once a week, I add  new articles to my website, and each time after uploading new content, I am replacing my existing sitemap.xml with a newly generated sitemap.xml in my website folder.  So, do you think I need to do the same changes (i.e., again submitting the sitemap.xml) to search engines (e.g., Google, Bing, etc...) and in Google Webmaster Tools also?  Yandex Webmaster Tools says this regarding sitemaps:     Please note: there is no need to delete or add another Sitemap file if it has been modified as the Yandex indexing robot regularly checks for changes.


How do we define capillary number in 2D (two dimensions)

In 3D the capillary number $Ca$ is defined as: $$Ca=\frac{\nu \rho U}{\gamma}$$ where $\nu$ is the kinematic viscosity ($m^2/s$), $U$ is the velocity ($m/s$)and $\gamma$ is the interfacial tension ($N/m$) and $\rho$ is the density in $kg/m^3$ . However in 2D I will have $\rho$ in units of $kg/m^2$ (2D simulation), so how to find capillary number?


How to set the 1st paragraph indentation...and space

I have been editing a book using memoir...and saw this ..  Every 1st paragraph in every chapter simply doesn't have indentation, so I managed to include \paragraph{} in every chapter...so far, so good....but I checked the spaces...and the 1st paragraph indentation is smaller than the following paragraphs..please, check the picture...the red arrow...    Is there a way to set the \paragraph{} spacing to be the same size as the following paragraphs?   I acknowledge that maybe there are more than one solution, e.g.: Changing every first chapter to start with a paragraph automatically...  And also, I don't understand why it does not set the 1st paragraph indentation automatically.


Executing a command after a package has been loaded

In  I ended up with  \DeclareMathSymbol{:}{\mathpunct}{operators}{"3A}   But now I'm using the fontspec package which redefines : with \AtBeginDocument itself. So as my own definition comes before fontspec is loaded, even putting it in \AtBeginDocument won't help.  Is there a way to say “Execute this after fontspec has loaded!” or “Execute this at the very end of \AtBeginDocument!”?


How can I trade fish/bugs between characters?

Something I did in the first Animal Crossing was make a house on an alternate character solely to showcase bugs/fish I felt were too cool to only leave in the museum. However bugs can't be mailed or dropped, so I'm at a loss as to how to do this.  Is there a way I can give bugs/fish to a second character or will that character have to find them themselves?


Mark first file in filemanager starting on letter "x" (mimicking windows)

In windows, when I am looking for a file in the current directory which name I (at-least partly) know. I simply start by pressing the first letter in the name, to jump to the first item starting with that letter.  In the default Ubuntu file-manager, it instead starts a search showing all items containing whatever input. How can I mimic the windows way?


Arabic language inserted " ???? " in online database

I have a problem with Arabic language in online server  I use PDO, and this's my connection code   $db = new PDO("mysql:host=".Config::DB_HOST.";dbname=".Config::DB_NAME.";charset=UTF8",Config::DB_USER,Config::DB_PASSWORD);  $db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);  $db->query("SET NAMES utf8"); $db->query("SET CHARACTER SET utf8");  return $db;   it's work correctly in local server but when I make it on Online server the data in database is always (??????) ( collation of database is utf8_general_ci )  is there any solution ?


How can I testfor a nearby player in minecraft 1.13

Have been searching a couple of hours now just so I can find out how I can testfor a nearby player... One thing I noticed is that testfor doesn't even work anymore so whats the deal with that? I have been using /testfor @a[r=5] but yeah, not anymore...


change a bash script while it is running

I have a script test  #! /bin/bash  sleep 60 echo hello   I ran it by setting it executable and ./test, and while it was running the sleep command, I changed it  to   #! /bin/bash  sleep 60 echo hello!!   The output is hello!!. I wonder why not hello?  How can I make it output hello regardless of later change?


Finding distances associated with change in latitude and longitude at given location

I am writing a program that uses GPS lat and long coordinates and a time change to determine speed with the output in units of m/s (precise to 0.1 m if feasible, but 1 m is sufficient).  When researching the distances associated with a change in latitude and longitude, however, I saw just how variable it was.  When continuing my research to find the distances associated with the general location I'm interested in, I could not find such a resource.  I know what area this program will be used in (Boston, Massachusetts) and the distance travelled during each time step is short enough that I can assume it moved across a plane.  As such, I am not looking for a formula to use in the general case over long distances but a look-up table or data base that has the relevant distances I need.  Where should I look online (or elsewhere) for this information?


I would like to derive Euler's equations of rigid body motion from least action principle.   Suppose we are in free space so we have no gravity so Lagrangian is equal to kinetic energy.   $$ L = T = \int_M \rho(x)(x\cdot \Omega_B)^2 d^3x $$  where $\rho$ is density, $\Omega_B$ is angular velocity bivector in reference body frame and $M$ is the rigid body.  The action principle says(if I haven't messed up something) that   $$ 0 = \frac{d}{ds}\bigg|_{s=0}\int_0^T \int_M \rho(x)[x\cdot (\Omega_B(t)+s \delta \Omega(t))]^2 d^3x $$  for every $\delta \Omega$ with zero ends i.e. $\delta \Omega(0)=\delta \Omega(T) = 0$. I should get these equations:  $$ I(\Omega_B) - \Omega \times I(\Omega_B)=0 $$  where  $$ I(\Omega) = \int_M \rho(x) (x\wedge (x\cdot \Omega)) d^3x. $$  But I can't see where I would get the time derivative of $\Omega_B$ from the action principle. Can someone tell me what I'm doing wrong? I guess there is some trouble with that $\delta \Omega$ can't be completely arbitrary.


Markdown does not allow for bold italic, then bold, then bold italic

I am trying in one of my posts to do this:  ***how many*** **and** ***where***   Which for some reason comes out like this:    Why is that happening?  Shouldn't the middle word be bold?  Is this  for markdown or is it (as I assume) a ?


Metropolis-Adjusted Langevin Monte Carlo on a Bounded Domain

I am trying to apply Langevin Monte Carlo (LMC) to generate samples in a bounded domain, for example, $[0, 1]^D$. How should I properly treat boundaries to ensure valid sampling? I have tried clipping, i.e. np.clip(x, 0, 1). This could be the simplest solution. However, clipping makes the application of Metropolis-style rejection complicated. When the rejection step is omitted, clipping tends to drive samples to the boundaries. LMC proceeds as follows: Starting from randomly initialized $x_0$,  Propose the next point according to Langevin dynamics $x_{t+1}=x_t+\lambda \nabla\log p(x_t)+\epsilon_t$ where $\lambda$ is step size and $\epsilon_t \sim \mathcal{N}(0,2\lambda\mathbf{I})$. (Optional)(Metropolis-Hastings Adjustment) Accept $x_t$ with a probability of $\min\{1, \frac{p(x_{t+1})T(x_{t+1} \to x_{t}) }{p(x_t)T(x_t \to x_{t+1})})\}$ where $T$ denotes the transition probability.  Any references are welcomed!


How many regenerations does the Doctor have after The Time of the Doctor?

In The Time of the Doctor, the Doctor says that he has a "new regeneration cycle". Does this mean he has another set of 12 regenerations, or just the one?


No solutions exist for $2a^2 + 3b^2 = 6c^2$ for $a,b,c \in N$?

How to prove that No solutions exist for $2a^2 + 3b^2 = 6c^2$ for $a,b,c  \in N$   Attempt: Since  $3∣3b^2$  and  $3∣6c^2$ , we must have  $3∣2a^2$   and thus  $3∣a$. Since  $2∣2a^2$  and  $2∣6c^2$ , we must have  $2∣3a^2$   and thus  $2∣b$. Let $a = 3A , b = 2B$ $18A^2 + 12B^2 = 6c^2$ $3A^2 + 2B^2 = c^2$  I am stuck here. Reducing this equation using modular arithmetic does not seem to help.


Homework - Prove that a given set is a group

I have a homework question and I don't know how to approach this exercise.  The exercise is the following:     Let's suppose $G$ is a set with binary function * defined for its members, which is:         closings;   associative;   there's $e\in G$, so that $a\star e=a$ where $a\in G$;   for each $a\in G$, there's a $b\in G$ so that $a\star b=e$.         Prove that $G$ is a group.   I have no Idea how  approach this exercise.  pay attention that 3,4 are Noncommutative.


Let n be a natural number with unique prime factorization $p^m$... $q^k$ . Show that n can be written as a square if and only if  all (m, ...k) are even


Setting length using `plus` operator not calculating as expected

Consider the following MWE: \documentclass{article}  \usepackage{blindtext}  \newlength\myheight \newlength\mypadding \setlength{\myheight}{2em} \setlength{\mypadding}{5em}  \begin{document} \blindtext\\ \vspace{10em} \vspace{-\mypadding}\\ This is a sentence that has been vertically shifted.\\ \vspace{\mypadding}\\ \blindtext\\ \end{document}  If we, instead of writing \setlength{\mypadding}{5em}, have \setlength{\mypadding}{3em plus \myheight}, we should get the same result (as 3 + 2 = 5).  However, as you see if you run this code and compare the outputs, these do not produce the same result.  Why is this?


How to create a raster from csv points file

I have a CSV points file, with NDVI values. My goal is to create a GeoTiff with 10 meters pixel, where each pixel value is calculated as the mean of points values in this square.  I read the CSV with Pandas and convert it to a geodataframe with GeoPandas.  How can build an empty raster and fill it with mean of NDVI value ? Maybe with GDAL?  Here is my code:  import sys, os, math, csv import pandas as pd import geopandas as gpd from shapely.geometry import Point  csv_file = (sys.argv[1]) # Path fichier csv  os.chdir = os.path.dirname(csv_file) csv_name = os.path.basename(csv_file) print(os.chdir, '-->', csv_name)  pixel = 10 # Taille du pixel en mètre  # CSV parcellaire en GeoDataFrame csv_df = pd.read_csv(csv_file, header = 0) # Lecture du CSV csv_gdf = gpd.GeoDataFrame(csv_df) # Conversion en GeoDataFrame  csv_gdf['geometry'] = 'geom' # Création de la colonne geometry  for i, row in csv_gdf.iterrows():     csv_gdf.geometry[i] = Point([(csv_gdf.X[i], csv_gdf.Y[i])]) # Remplissage de la geometry avec les points de coords X-Y  #Résolution du raster xmin, ymin, xmax, ymax = csv_gdf.total_bounds # coordonées de la bounding box du csv  xres = math.ceil((xmax - xmin) / pixel) yres = math.ceil((ymax - ymin) / pixel)


Replace the Keys in a dictionary by Integers

my_dict = {k:v for k, v in sorted_freq} # sorted_freq is a list containing key:value.  {'like': 4870, 'taste': 4508, 'good': 3569, 'flavor': 3449, 'one': 3217, 'product': 3197, 'use': 3165, 'love': 3141, 'great': 3056, 'eat': 1614...}   How do I replace the Key in this dictionary by natural numbers starting from 1 for all the Keys in dictionary?   [('like', 4870),  ('tast', 4508),  ('good', 3569),  ('flavor', 3449),  ('one', 3217),  ('product', 3197),  ('use', 3165),  ('love', 3141),  ('great', 3056),  'get', 2400)...]


I computed the determinant to $D= a^{3} - 27a-54$. When I solve $D=0$, I get $a=6$ and $a=-3$ Now when I plug in these values and bring the matrix to rref, I end up with the identity matrix, both for $a=6$ and $a=-3$. That's confusing because that would mean the matrix $A$ has $rank=3$ for all values of $a$, and that can't be. So what is going on here?  EDIT: I have already looked at similar questions so please don't mark this as duplicate. From those questions I have understood how to solve this, so that is not the problem. I took the route involving determinants but it gave me results that weren't expected. I have checked the algebra quite a few times and it always seems to come down to this, so I'm posting in the hope that someone can tell me what's wrong.


Which command to make multiplication like this?


Hello I have a doubt about the next partition identities  $P(n: even \; number \; of \; odd \; parts)=P(n: distinct\; parts, \; number \; of \; odd\;  parts\;  is\; even)$  Also for the case when both instances of "even"  are changed to odd.  I need to show a bijection of but I can't figure out how. I have been trying with one example (n=6) to see any particular characteristic however I can not have the equality.  I trying to solve the problem by using a bijection between the partitions of each side because I am not allowed to use function now.  So, any  hint would be appreciated!


Performing Point Distance analysis using Basic level license of ArcGIS Desktop?

I am using ArcView (ArcGIS Desktop Basic) 10.1 and I need to perform a point distance analysis.   What are the steps to determine the distance from A to B-Z, B to A-Z, C to A-Z, etc?


Hide errors from users but show to admin?

Under 'Error messages to display' I can hide errors (as is recommended for production sites). However is it possible to hide errors for everyone except a certain role?


Is there a way to make a fullscreen on VirtualBox?

I tried many ways to make a bigger screen in VirtualBox because I do not like the small size of the guest window? Is there is a way to make it big?


I want to prove that if $Ref(z)$>0 for every $z$ in the complex plane, then the function is constant  I know that if $Ref(z)$>0 and $f$ is entire then $Ref(z)$<0 and $-f$ is also entire the |$e^{-f(z)}$|= $e^{Re(-f)}$ so how can I conclude that $f$ is constant?  Thanks


Proof that a $k$-regular bipartite graph has a $1$-factor

So I'm trying to proof that a $k$-regular bipartite graph has a $1$-factor, for $k>0$.  Proof:  Let $G=(V,E)$ be a $k$-regular bipartite graph such that $E\subset\{e=\{a,b\}\in E\::a\in U, b\in W\}$ for certain $U,W\subset V$. Then certainly $|U|=|W|:=n$ and thus $|V|=2n$ since $U\cap W=\varnothing$. Because $G$ is $k$-regular, $G$ is $k$-edge colourable. Because $|E|=\frac12\sum_{v\in V}d(v)=\frac122nk=nk$, every colour is used on exactly $n$ edges, since in that case the colour is used on $2n$ different vertices, and it cannot be used on any vertex twice. Choose a colour $i$ and let $E_i=\{e\in E \ | \ k(e)=i\}$, then $G_i=(V,E_i)$ is a $1$-factor. Done.  Question: Is this proof correct, and if not how do I proof the statement? And second: obviously not every $k$-regular graph has a $1$-factor, so if my proof works, which part of my proof does not extend to any $k$-regular graph? Is it the part where I conclude that we have an even amount of edges? And if so, does a $k$-regular graph on an even amount of vertices contain a $1$-factor?   Edit: My proof does not seem exactly the same to me as the linked one; also I don't quite understand the notation and much of the terminology in the linked post, I have only followed an 80-hour course on graph theory, covering an introduction, colouring and directed graphs/edges/menger's theorem and the like. I'm looking for some feedback on my proof; is it correct?


Sudo command no longer functions properly

When I use the sudo command I get an error message.  sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   If I try to use chmod on sudoers I get the message "Operation not permitted". Can someone help me fix things so sudo works again?


URLs from my site appear in Google search results even though they are disallowed in robots.txt

Here is content of my robots.txt file:  User-agent: * Disallow: /images/ Disallow: /upload/ Disallow: /admin/   As you can see, I explicitly disallowed all robots to index the folders images, upload and admin. The problem is that one of my clients sent request for removing the content from the images folder because .pdf document from the images folder appeared in the google search results. Can anyone explain me what I'm doing wrong here, and why google indexed my folders?


Find out all solutions of the congruence $x^2 \equiv29 \mod 5$.  [Hint:Find the solutions of this congruence $\mod 5$ , $\mod 7$ , and $\mod 7$ , and then use the Chinese Remainder Theorem.]


Why is this famous proof of the chain rule called "technically incorrect" in this pdf?

So I was looking through various proofs of the chain rule...and I came across  paper. The first proof given is complete and quite well-explained. But another simplistic proof is given in the end...which is mentioned as "technically incorrect". Can anyone tell me why?  Here is the incorrect proof in question:  $$\begin{aligned} (f \circ g)'(x) &= \lim_{h \to 0}\frac{f(g(x+h)) - f(g(x))}{h} \\ \implies (f \circ g)'(x) \cdot \left(\frac{1}{g'(x)}\right) &= \lim_{h \to 0}\left(\frac{f(g(x+h)) - f(g(x))}{h}\right)\cdot\left(\frac{h}{g(x+h)-g(x)}\right)\\ &= \lim_{h \to 0}\left(\frac{f(g(x+h)) - f(g(x))}{g(x+h)-g(x)}\right) \\ &= f'(g(x)) \\ \end{aligned}$$


Any data for average number of papers per year at different career stages?

Is there any data for the average number of papers published per year by individuals at different career stages (ph.d. student, postdoc, tenure-track, tenured associate/full professor)? It would obviously be dependent on research areas and I also realize that such data may not be easy to obtain - hence the question to put it out and hope to get some direction for my study. I am interested in data from the Computer Science and/or Applied Mathematics fields, but answers for other research areas could also be interesting. In absence of data, anecdotal experience in one's branch may also be helpful.  UPDATE:  - Obviously, the number of paper per year is highly field specific. So is citation counts (which includes all the analysis it comes with such as average citation counts, h factors, impact factor of a journal and so on). - Several countries such as the New Zealand, have their own research evaluation system in which one of the important evaluation criterion for research-groups or even individuals is the number of papers published in one to six years span. The data for average number of papers by individuals in different disciplines may put these evaluations in perspective with the global averages. e.g., individual publishing two paper per year in a sub branch where the average number of papers per year by individuals is one should not be directly compared to those publishing 10 papers a year in subbranches in which 15 papers per year is the average norm. In short, the purpose of obtaining such data is to provide corrections to the evaluation systems in such countries.


I can't figure it out, minus 2 for me BUT for the 100th time, is it whom or which?  "...a group of people for whom I have the utmost respect for."  OR  "...a group of people for which I have the utmost respect for."


If we assume that $a,b$ are real numbers such that $9a^2+8ab+7b^2\le 6$, how to prove that :  $$7a+5b+12ab\le9$$


How to draw a line passing through a point and perpendicular to another?

I'm having a bit of a headache right now as I can't draw this basic figure:  A straight line goes through points A and B. Another line is perpendicular to AB and goes through an arbitrary point P.  I fiddled with the |- operator but it only seems to work with horizontal or vertical lines. Is this even possible?  Bonus question: when drawing AB, is it possible to let the line poke out a little? For example, when writing \draw (A) -- (B); the line strictly goes from A to B. I'd rather have a line passing through these points but starting 1cm in front of A and ending 1cm after B (for example).  Thank you for your help :)


Compilation fails with eqnarray after reinstalling Miktex

I have a script that extracts math formulae from a tex file, produces a small standalone file for each formula and compiles it with pdflatex. The standalone pdf files are then used to produce png images of the formulae. The script has always worked smoothly with Miktex 2.8 under windows Vista. Now that I have updated to version 2.9 and Windows 7, it does not work any longer. Every time it encounters an eqnarray environment, it gives the following error:   ! Missing \endgroup inserted. <inserted text>                 \endgroup l.6 \begin{eqnarray}   For example, I get this error when I run pdflatex on the following simple file:  \documentclass[12pt]{standalone}    \begin{document} \begin{eqnarray}     1&=&1\\ 1&=&1    \end{eqnarray}     \end{document}   Why am I getting this error? Has support for eqnarray been discontinued in new versions of latex?  Thanks for any help you might provide.


Prove that If GCD(a,m)=d and GCD(b,m)=1, then GCD(ab,m)=d

I am trying to prove this claim by contradiction. So far I've come up with the following: Assume for the sake of contradiction that GCD(ab,m) is not equal to d whenever the GCD(a,m)=d and GCD(b,m)=1. Let delta=GCD(ab,m), then by the Q.R.T. we have that ab=(delta)(theta) and m=(delta)(beta), where theta and beta are integers. Now, since GCD(a,m)=d, then this implies that a=(d)(sigma) and m=(d)(gamma) where sigma and gamma are integers; and by Bezout's identity, we have that GCD(b,m)=1 implies that bx+my=1 for some integers x and y. I'm stuck here, How do I go about finding a contradiction that GCD(ab,m) must equal d? Since GCD(a,m)=d, we know m=(d)(gamma) so would this be a contradiction to the premise that m=(delta)(beta)? I would appreciate it if you could give me some insight as to what the right approach should be here.


I have a 1/1  and use a +1/+1 pump spell to make it a 2/2. My opponent casts a  to deal 3 damage to it. I respond with  for +2/+2 and Hexproof, he responds with .  Does the Kitesail Scout die?  I know the last in first out stack rule, but didn't my Kitesail have Hexproof, so therefore his Murder could not be cast as the Kitesail was no longer a legal target?


Open the folder associated with the Command Prompt's working directory?

I am wondering if there is a command one could type into The Windows Command Prompt which would cause Windows Explorer to open a folder set at the Command Prompt's current working directory?   (This is kind of the opposite problem where people want to open the Command Prompt from the folder. I.e., opposite of this: )


My DM insists on rolling a single save for groups affected by AoE save spells. How does this affect my odds of successfully affecting the enemy?

As the title question, my DM rolls a single d20 save for groups affected by my area of effect spells that require a save, in order to save time.  I can't help but feel like I'm being ripped off by this as a wizard with primarily AoE save-or-suck spells.  I don't know if this is just a feeling or if the probabilities actually back this up.  I know this can also work in my favor but it still feels off.  How are the probabilities affected when a (homogenous) group gets a single save vs. each individual in the group having their own save?  I want to know specifically if this works more in my favor or more in the favor of my enemies, or if it is statistically speaking a 50/50 split.  I am looking for evidence that this is a bad idea (whether it benefits me or harms me) and that the DM should roll separately for each affected target in the area of effect.    I realize this probably puts the odds in my favor when targeting weak saves in the group (i.e., WIS save on a group of ogres or orcs), but this will not always be the case and especially when there are mixed enemies in the AoE.  So far we have only faced groups that contained single enemy types so I don't know what happens when there are two different enemies with two different saves.  Ideally answers will address a sliding group size (2..N group members, 5 is probably a good stopping point) and a range of save DCs -- DC 14-19 should address most levels of play.


Suppose we have a group $G$ and $H,N \leq G$ such that $HN \leq G$. Then how do I justify the formula:  $$ |HN| = \frac{|H||N|}{|H\cap N|} $$  Also, are there any other assumptions neccesary for the formula to hold? Thanks


How to create NTFS partition in ubuntu 13.04

I'm am new to this ubuntu but wanna use it. I got a HP laptop with 1tb hard disk in it with windows 7 as default os i had erased my windows and installed ubuntu 13.04 fresh. So can any one help me how to create ntfs partition so i can store my files, movies etc in it please.


I am looking for a shortcut to copy the path of a file in Mac OS. I generally require it to copy paste in editor.


Does a Barbarian with Brutal Critical get an extra 1d6 or 2d6 if they get a critical hit with a Greatsword?

The Barbarian has the class feature Brutal Critical that reads:     Beginning at 9th level, you can roll one additional weapon damage die when determining the extra damage for a critical hit with a melee attack. (PHB 49)   The half orc has a similar racial trait as well (Savage Attacks).   This is a straight forward process if your weapon damage is a single die (great axe or smaller). However, with a greatsword, your weapon damage "die" is 2d6.  Does this feature mean you get to roll both d6s for the extra damage, or just one d6?


Numerical Differentiation using Taylor series

Hi Guys currently doing some Numerical Differentiation and I was looking at the different formulas such as 1) forward difference method 2) backward difference method 3) central difference method  $$\frac{f(x+h)-f(x)}{h}$$  $$\frac{f(x)-f(x-h)}{h}$$  $$\frac{f(x+h)-f(x-h)}{2}$$  Now based on using taylor's series, I know we can derive different or higher orders for the derivatives for example if i required $$f''(x)$$  using Taylor's series  $$f(x+h) = f(x)+f'(x)h+\frac{f''(x)h^2}{2!}+\frac{f'''(x)h^3}{3!}$$  $$f(x-h) = f(x)-f'(x)h+\frac{f''(x)h^2}{2!}-\frac{f'''(x)h^3}{3!}$$  $$\frac{f(x+h)-2f(x)+f(x-h)}{h^2} = f''(x)$$  My question is as I am bot confused to define the third derivative when using the Taylor series when making the substitution from the Taylor series and this is my approach then adding both equations $$f(x+h) + f(x-h)$$  $$f(x+h)-2f(x)+h^2f''(x)+f(x-h) = \frac{h^3f^3(x)}{3!} - \frac{h^3f^3(x)}{3!}$$  then I decided to try $$f(x+h) - f(x-h) = hf(x)+hf(x)+\frac{2h^3f'''(x)}{3!}$$  $$\frac{3![f(x+h)+2h(x)-f(x-h)]}{2h^3} = f^3(x)$$  and this is incorrect so I am hoping someone can help me understand defining higher order derivatives when using the Taylor series for these methods.   Essentially I am trying to understand how to attain  $$f^3(x),f^4(x),.. etc $$  etc using the Taylor series


Do the benefits of a feat granted by a class count as that feat?

This is really three questions.  If a class says that it grants the benefits of a certain feat, do I need to meet the prerequisites for that feat in order to actually receive the benefits? For example, a  "gains the benefit of the Deflect Arrows feat when using a light or one-handed piercing weapon" at 9th level. Although it does state that I don't need a free hand to use the ability, do I still need IUS and Dex 13 as per ? I would assume not, because the ability gives the duelist the benefits of the feat, not the actual feat.  Can I take the actual Deflect Arrows feat in addition to this ability? Because the conditions are different (holding a light/one-handed piercing weapon for the duelist ability; free hand for the feat), it would still carry some benefit.  Do I need to take Deflect Arrows separately, as a feat, in order to meet some other requirement that I have Deflect Arrows?


What are the depictions of the Elfen Lied opening?

In the opening, I understood the lyrics, as it has been translated and as I also take Latin. But the art and depictions I did not understand. What are significance of them and what do they mean?


When to use interfaces compared to Abstract classes?

I understand the technical difference between the two, but I don't understand why one is better to use than the others? Can anyone give me an example that would help me distinguish an advantage one has over the other?  For example: If I was making an rpg game, and I was working on some healing items. What would the uml diagram look like. Would I be using an interface for items, and then healing items or abstract classes.


What 1980's kids book series about boy learning magic spells?

About 1987, I read an adventure/fantasy novel series about a boy who learns magic and his adventures. He would learn new spells with each new book of the series. I'm looking for any additional info or suggestions.  The titles went along this line based on a new spell:   "I" is for Invisible or Illuminate   "T" is for Teleport(ation)   "L" is for Levitate or similar.   The story was consecutive in flow, book to book, and 150ish pages each and they were geared toward grade-school to middle-school kids.  Illustrations were included in the writing occasionally.  The writing and publishing was going on in the 1980's.  The locations and names were all fictitious.  The boys friends were not necessarily human as creatures were involved.


How do I download full resolution photos on my iphone (8+) to use offline?

I used to keep all of my photos (literally 40K or so) on my iPhone. I did eventually fall into the iCloud trap, and have still not figured out a way to assure that a healthy number of my full resolution photos will be available to me when I am on a plane: the one time I know I'll have 5 hours with nothing to do but edit photos from the last decade. I know that "recent" full resolution photos are stored  on the phone, but going back to what date? And how does that help if I choose a  picture from 2014 to edit? Thoughts about how to edit while in "airplane mode?"


In The Silmarillion and this , Buzz mentioned that "Fëanor will finally repent his crimes and be released from the Halls of Mandos" so that the two trees can be resurrected once more.  What were Fëanor's crimes?


User deleting code after question has been answered

If a user keeps  (thus making the answer meaningless), what should we do? Rollback the edit (what if the user just deletes the code again)? Delete the question?  More examples (same user): ,  (see also edit histories).


The OpenVPN client machine has two interfaces to Internet: a low-speed and high-speed one. Default route goes throught the low-speed one. I'd like OpenVPN to connect to server through the high-speed one. How can that be done?  Like in ping, I can use "-I 1.2.3.4", or in telnet "-b 1.2.3.4" and then the 1.2.3.4 IP is used.


Consider the wave equation $$\frac{\partial^2u}{\partial t^2}-c^2\frac{\partial^2u}{\partial x^2}=0\tag{1}$$ which can be written as $$\Big(\frac{\partial}{\partial t}-c\frac{\partial}{\partial x}\Big)\Big(\frac{\partial}{\partial t}+c\frac{\partial}{\partial x}\Big)u=0\tag{2}.$$  The question  claims that (2) implies both $\Big(\frac{\partial}{\partial t}+c\frac{\partial}{\partial x}\Big)u=0$ as well as $\Big(\frac{\partial}{\partial t}-c\frac{\partial}{\partial x}\Big)u=0$.  I do not get this. Eq. (2) can be satisfied if $\Big(\frac{\partial}{\partial t}+c\frac{\partial}{\partial x}\Big)u=v\neq 0$ and $$\Big(\frac{\partial}{\partial t}+c\frac{\partial}{\partial x}\Big)v=0.$$  Am I missing something?


Does a bigger radio room translate into higher chances for a rare or legendary dweller?

Okay, first things first: can you actually get a rare/legendary dweller from the radio room?    First I built a 2-wide radio room with high-charisma dwellers working it and average dwellers were arriving nicely enough, okay. But, if I want rare/legendary dwellers, can I expect them to show up from broadcasting?    If I build a bigger radio room, will that attract rare dwellers? (I don't really see the point in manning a larger room if all it does is tweak the timer... am I wrong?)


If I know for two numbers a and b that    $${a < b }$$  Then is it correct to say that    $$ a \leq b $$  I know that the second statement is true as long as the first one is. It seems OK as it is true but from the other side it seems kinda weird (to me), to say that, if you know, that a is strictly less that b.It's like you lose some extra information.


I set an environment variable in /etc/environment, but it's not in printenv using bash.exe with Windows cmd. Why?

I'm using WSL and I'm quite new on Linux. I have set an environment variable in /etc/environment called TESTVAR. This variable is required for some projects and it's working just fine when I'm running Bash directly.  But if I'm running a Linux command using the Windows cmd like: bash.exe -c "printenv", the variable doesn't exist. So I can't run my commands using cmd otherwise I'll get many errors because the variable contains an important path.  What do I need to do?  Thanks.


How to Count Duplicates in List with LINQ

I have a list of items   John ID Matt ID John ID Scott ID Matt ID John ID Lucas ID   I want to shove them back into a list like so which also means I want to sort by the highest number of duplicates.   John ID 3 Matt ID 2 Scott ID 1 Lucas ID 1   Let me know how I can do this with LINQ and C#.  Thanks All  EDIT 2 Showing Code:      List<game> inventory = new List<game>();     drinkingforDataContext db = new drinkingforDataContext();     foreach (string item in tbTitle.Text.Split(' '))     {          List<game> getItems = (from dfg in db.drinkingfor_Games                                where dfg.game_Name.Contains(tbTitle.Text)                                select new game                                {                                    gameName = dfg.game_Name,                                    gameID = Boomers.Utilities.Guids.Encoder.EncodeURLs(dfg.uid)                                }).ToList<game>();          for (int i = 0; i < getItems.Count(); i++)         {             inventory.Add(getItems[i]);         }     }      var items = (from xx in inventory                  group xx by xx into g                  let count = g.Count()                  orderby count descending                  select new                     {                         Count = count,                         gameName = g.Key.gameName,                         gameID = g.Key.gameID                     });      lvRelatedGames.DataSource = items;     lvRelatedGames.DataBind();   This query displays these results:   1 hello world times 1 hello world times 1 Hello World. 1 hello world times 1 hello world times 1 hello world times 1 Hello World. 1 hello world times   It gives me the count and name, but it doesn't give me the ID of the game....  It should display:   6 hello world times   234234 2 Hello World.  23432432


I'm currently writing a user guide containing a lot of keyboard shortcuts. I'm looking for a "keyboard" font where single characters or special keys (like tab or backspace) appear like the "real" key (i.e. with a box around; hope you get the idea).  Is there any package available for this or do I have to wrap one of the existing PS/TTF Fonts?


What is the relationship between autocorrelation and non-stationary?  Is it true that non-zero autocorrelation $\implies$ non-stationary, but not vice versa?


How to move windows on Mac as in windows from keyboard?

I'm an ex windows user and I loved to move windows clicking on the windows logo button and using arrows.  Is there something similar on Mac?


I know the 3D Cursor can be used to position new objects, or snap existing ones to a certain location - but what else can it be used for?  An exhaustive list of every possible use would be great (without repeating similar things like "pivot for spin tool", "pivot for screw tool" - which could simply be said as "Pivot for modeling tools").


A word that describes two opposing effects rooted in the same thing?

For example, when a law might cause a good effect to the poor but a bad effect to the rich.


Can I enter Romania from Dubai with a Schengen visa?

Would I be able to enter Romania on a Schengen visa if I'm staying less than 5 days? Basically I would be doing Dubai-Romania-Dubai.


Do you need the Axiom of Choice to accept Cantor's Diagonal Proof?

Math people:  It is my understanding that set theorists/logicians compare cardinalities of sets using injections rather than surjections.  Wikipedia defines countable sets in terms of injections.  Cantor's diagonal proof that the real numbers are uncountable involves showing that there is no surjection from $\mathbb{N}$ to $(0,1)$.  So do I need the Axiom of Choice to accept Cantor's Diagonal Proof?  I browsed the Similar Questions and I could not find an answer.  I apologize if this is a duplicate.  StEFAN (Stack Exchange FAN)


How to prevent the creation of annoying .DS_Store files?

I am working on a MacBook Air (10.14.6), using network mounted filesystems. It then happens that for no reason at all files like .DS_Store ._.DS_Store  appear randomly in folders, breaking my workflow. This is especially annoying if they appear in a git repository and you have to remove them manually. Therefore my simple question: How can I prevent once and for all the creation of these useless and annoying files? An answer provided in another thread was to use the following commands: defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true  Maybe it does work for network mounted filesystems, but for the local filesystem it does not seem to work.


I am having trouble proving that $n! \ge \frac{n}{2}^{\frac{n}{2}}$ for all $n \ge 2$. Intuitively, I can see how this is true. However, I am struggling with a formal proof and dont know which way to go


I have a main doubt here. I've heard that just a thin layer of coating is sprayed on one side of the glass due to which there are minute gaps between the molecules through which light passes.  But the same should happen on both sides, but it doesn't. Why?


Why does $( \operatorname e^x)' = \operatorname e^x?$

It's known the the derivative of exponential function  $a^x$ is $xa^{x-1}$.  If I play $e$ as $a$, we'll get $(a^x = \operatorname e^x)' = x \operatorname e^{x-1}$.  Why does $(\operatorname e^x)' = \operatorname e^x$?


Im trying to find if the first two letters of a string are "hi". If it does it shold return true, and if not it should return false. I used substring to find the values of the given string, but when the condition comes up true it isn't returning true. I must not be understanding something about Java, which Im new to.   Here is my code:  class Main {     public boolean startHi(String str) {           String str1 = str.substring(0,1);         String str2 = str.substring(1,2);          if(str1=="h" && str2=="i"){             return true;         }         if(str!="hi" || str.length()<=2){             return false;         }         else{             return false;         }     }     public static void main(String[] args) {         System.out.println(new Main().startHi("hi ho"));         System.out.println(new Main().startHi("hi"));         System.out.println(new Main().startHi("howhi"));     } }   The string starts with "hi" and it sees that, but it returns false.


Why does this one-liner fail to produce output?

The following produces nothing in bash:  while true ; do upower -d ; sleep 1 ; done | grep percentage | uniq   I've discovered that it doesn't matter what the last- or even the second to last- program are in this chain. The second-to-last program always produces expected output, and the last always fails to produce anything.  It also doesn't appear to matter if I wrap the while loop in a subshell (via ( while ... done ) ), or wrap everything but the last command in a subshell and pipe into that last command.  I am deeply confused by this behavior.  My gut tells me...  ...that there's some sort of I/O deadlocking in the chain created by blocking reads and writes and the fact that the while loop isn't always producing output. But, on the other hand, I've done this kind of thing plenty of times before, with no issue. Besides, if it were that, wouldn't the problem exist between the while loop and the next command? So I'm flummoxed. Will provide bash version information if no one else can reproduce.  In case it isn't immediately obvious...  The point of this line of code is to print every change in battery percentage, but only print new battery levels. It uses polling. I suppose I could get the same behavior with simply running  upower --monitor-detail | grep percentage | uniq   But this is a one-off thing, and I didn't plan on expending more than 5 seconds of thought on this until the above started to fail. At which point it became an interesting problem. Plus, I don't know whether monitor-detail just does polling under the hood, anyway (and I'm not running an strace to check).  EDIT: Apparently, the above --monitor-detail version also doesn't produce anything (or, at least, it seems to. The polling / update frequency is pretty low, so I might just not have waited long enough. Although I know I waited long enough for the original issue). Now I'm very, very confused. I guess I should run that strace after all...


The dataset 'left_right_merge' at the bottom of my screen shot shows the dataset that I'm currently working with.  The NODE values indicate a single point feature, but is duplicated with many attributes.  I want to collapse the dataset so that it looks like the 'test_data_nodes' at the top of the screen shot.  How would I do this in python?


I'm applying standard 0-1 scaling of features before SVM classification for financial data but the results are worse. This is the results before scaling      NORMAL DATA AVERAGE RESULTS       Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum           SS          SSl   4389060.90         6.85        -0.00        60.69         0.50        16086        10973            5            8            1            5   and this is after scaling  NORMAL DATA AVERAGE RESULTS       Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum           SS          SSl   2256204.80      2044.51        -0.07        52.53         0.46        14577        12220            4            8            1            5   Scaling is performed in 0-1 range, test data is scaled according to scaling factor of train data. From the above results you can see that precision went down (avPP) from 60.69 to 52.53, average Mathew Correlation Index from 0 to -0.07 number of true positives went down from 16086 to 14577 and number of false positives grown from 10973 to 12220. The presented result is an outcome of 80 classifications on different financial instruments data for 80 data sets 20000x200 so i think result is quite significant.  So my question is: In such situation how I should proceed? Shall I stick to scaling? Or maybe I should generate different data set to check if this behavior is consistent? What sort of analysis of my features I can make? My data set is a mix of binary and continuous features in different scales.


Intuitive Understanding of the constant "$e$"

Potentially related-questions, shown before posting, didn't have anything like this, so I apologize in advance if this is a duplicate.    I know there are many ways of calculating (or should I say "ending up at") the constant e.  How would you explain e concisely?  It's a rather beautiful number, but when friends have asked me "what is e?" I'm usually at a loss for words -- I always figured the math explains it, but I would really like to know how others conceptualize it, especially in common-language (say, "English").     related but not the same:


How to get better pictures out of my Canon 400D?

I have a Canon 400D with the EF-S 18-55mm 1:3.5-5.6 II kit lens and a Nikon D800 with an AF-S NIKKOR 24-120mm 1:4 G ED.  Today I took the same picture with both cameras and I like the Nikon's much better (second image).     However, I love the Canon camera because it's much lighter, I find the controls much more intuitive and I have several flashes for it.  Is there an upgrade I can make to get similar photos from the/a similar Canon camera?


Why did Near start to suspect the presence of a second Death Note?

At what point and why did Near start to suspect the presence of a second Death Note? How and why did he consider that Mikami used a faked one?


I'm trying to make a simple animation for a recently added element with ajax.  So inside success function and after working with my result I've tried this code.  success: function (result) {     /* Working with result */     $('myselector').animate({backgroundColor:'#4E1402'}, 300);  }   It does change the bg color but it look so ugly and not smooth as expected and this happen just inside the AJAX call. Please anyone can give me some advise to solve this. Thanks.


Do there exist any Pythagorean triples that share two out of three numbers?

The following question occurred to me while sketching out vector diagrams earlier today:  Do there exist positive integers $a, b, c, d$ such that $a^2 + b^2 = c^2$ and $a^2 - b^2 = d^2$?  In other words, do there exist any Pythagorean triples that share a "leg", and for which the "leg" of one is the "hypotenuse" of the other?  If not, can it be proven that such triples do not exist?  What I've tried: I've played around a bit with Euclid's formula, and it's easy enough to show that if such a pair of triples exists, it must be the case that there are integers $m$ and $n$ such that $$ d^2 = m^4 - 6 m^2 n^2 + n^4 $$ is a perfect square.  ($m$ and $n$ are the integers on which the triple $(a,b,c)$ is based.)  Similarly, if the triple $(a,d,b)$ is based on the integers $m'$ and $n'$, we end up with $$ c^2 = 2\left({m'}^4 + {n'}^4\right) $$ This latter equation looks a little more plausible as something that doesn't have integer solutions.  But I don't really know where to go from here, or even if this is the best way to think about it.


Best time to buy a flight to South America from Europe

I want to buy a open jaw flight to South America. Bucharest - Buenos Aires at the beginning of January Bogota/Barranquilla/Cartagena(Colombia) - Bucharest, somewhere between 10 and 16 April.  When is the best time to buy them? Is it cheaper to buy them both on the same time or separately?


How to make an area transparent in Illustrator

In the image below you'll see the white section (highlighted blue). The black section behind it is one path, and the white another. How do I remove the white from the black so it becomes transparent? Hope that makes sense <3


I have two activities lets say Level Activity and Result Activity, so what happens is when I go from level -> level1 -> result activity I check if the score is > 4 if it is I unlock the next level in level activity by simply removing an imageview on a button in level activity by doing something like this in Result Activity  SharedPreferences pref = getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);         final int score111 = pref.getInt("score111", 0);         v1.setOnClickListener(new View.OnClickListener(){             @Override             public void onClick(View v) {                 startActivity(new Intent(ResultActivity2.this,Lyricswho.class));                 if (score111 >= 4) {                                            Intent act2= new Intent(ResultActivity2.this,Lyricswho.class);                     act2.putExtra("hideImageView", true);                     startActivity(act2);                 }             }         });     }   and then in Level activity   if(score111 >=4 ){                 hideImageView = getIntent().getExtras().getBoolean("hideImageView");             if (hideImageView) {                 v.setVisibility(View.INVISIBLE);             }         }   It works fine for the first time but when I restart the app by closing it down and go to Level Activity it crashes and goes back to previous activity. The reason as I have figured out is the hideImageView gives null pointer error when I restart the app because it satisfies the condition that is score is greater then 4 (which previously it doesn't because the score is 0 so the code doesn't go in if condition) but there is nothing in hideImageView so it throws null exception. I tried using boolean variable so that if condition is ran only once but then my imageview appears again so I can't use that. How can I solve this problem? Been stuck there for days.


I compose in Russian (Cyrillique).  I've just dowloaded TexShop 3.48. When opened, all my old .tex files with Russian fonts, the text in main TexShop window is no more correct (encoding pb). The composition works well, the output PDF file is well in Russian. But I can't visualise the Cyrillique source-code.  Could you please indicate how I can write in Russian (source code)?


String comparison not returning correct result

So I am building a simple user authentication system, users will input their name into username and password fields and then the code should test what the user enters against a database. I have used a string comparator to do this but it does not execute code in the if statement when correct user and pass are fed through it.  Here is a snippet of the code  Boolean authpassed = false while(rs.next() && (authpassed == false)){           int id  = rs.getInt("id");          String first = rs.getString("first");          String last = rs.getString("last");          String username = rs.getString("username");          String password = rs.getString("password");            System.out.print("ID: " + id);          System.out.print(", First: " + first);          System.out.print(", Last: " + last);          System.out.print(", Username: " + username);          System.out.println(", Password: " + password);           if((authuser == username) && (authpass == password) ) {              System.out.println("Logged In!");              authpassed = true;          }       }   When code is executed with correct login details the "Logged in" is not displayed?  Thanks for having a look :)


Problem with sorting of bibliography with biblatex-chicago in Sharelatex

I am having a bit of a problem with a paper I am working on in Sharelatex. For some reason I can not get the bibliography to sort alphabetically.  The code looks like this:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{hyperref} \usepackage[swedish]{babel} \usepackage{csquotes} \usepackage{dirtytalk} \usepackage[backend=biber,authordate,sorting=nyt,cmsdate=both,maxcitenames=3]{biblatex-chicago}  \addbibresource{bibliography.bib}  \urlstyle{same}  \begin{document}  Text \nocite{*}  \printbibliography  \end{document}   And my bib-file looks like this:  @book{almqvist1984, author={Solveig Almqvist}, title={Geng{\aa}ngarf{\"o}rest{\"a}llningar i svensk folktro ur genreanalytisk synpunkt}, publisher={Almqvist {\&} Wiksell international}, address={Stockholm}, year={1984}, titleaddon={(\bibstring{phdthesis})}, }   @book{hall2013, author={Mikael Häll}, title={Skogsrået, näcken och Djävulen: Erotiska naturväsen och demonisk sexualitet i 1600- och 1700-talens Sverige}, year={2013}, publisher={Malört}, address={Stockholm}, titleaddon={(\bibstring{phdthesis})}, }  @book{stattin1984, author={Jochum Stattin}, title={Näcken: spelman eller gränsvakt?}, year={1992}, origdate={1984}, publisher={Carlsson}, address={Stockholm}, titleaddon={(\bibstring{phdthesis})}, }  @book{worsley1968, author={Peter Worsley}, title={The trumpet shall sound: A study of ”cargo” cults in Melanesia}, year={1968}, publisher={Schocken Books}, address={New York}, }   For some reason the output I get sorts the bibliography in way that puts Worsley 1968 first in the list:    What am I doing wrong?


Discrepancy between file size and disks occupied

I created a file with a single "A" character in it. Ran the stat command and got as part of the information: Size: 2             Blocks: 8          IO Block: 4096   regular file Why does a 2 bytes file occupy 8 512 bytes blocks on disk? Also,is there a command that shows you how big one logic block is? Thanks!


Ubuntu takes so long to get to Login screen

I have installed Ubuntu 17.04 on my spare SSD and everything went smoothly but when starting up, it takes forever to get to the Login Screen.  I saw  and I too have the encryption enabled but I don't understand the answer in it. I checked the links provided but I don't think there's a solution in them.