Let $f:[0,1] \longrightarrow \mathbb R$ be a continuous function, and let $g:\mathbb R \longrightarrow \mathbb R$ be a continuous and periodic function with period $1$. Prove that   $\displaystyle\lim_{n\to \infty}\int_0^1f(x)g(nx)dx=\left(\int_0^1f(x)dx\right)\left(\int_0^1g(x)dx\right)$.  any Ideas?


Proving that if $A$ is a $8\times 8$ matrix over $\mathbb{R}$ and $A^3=A$, then $A$ is diagonalizable.

If $A$ is a $8\times 8$ matrix over $\mathbb{R}$ and $A^3=A$ then prove that $A$ is diagonalizable.   I have got that the minimal polynomial of $A$ may be $x^3-x$ or $x$ or $x(x+1)$ or $x(x-1)$ in the 2nd case it is not possible in the 3rd and 4th cases the matrix will be the identity matrix or identity matrix multiplied by a scalar!  But I cannot reach any further.


Network Profile reputation graph does not obey the sanity rules

Take a look : (no bragging just focus on the part in red circle)    209 reputation on , right? Well, !    This is not the ordinary cache here, it's like that for long months now. This made me curious, then furious and finally vicious so I went bug hunting. Here is my story. Once upon a time,  has been put on the table. One of its  was:  if you’ve contributed something worthwhile to the site, you should keep the reputation for that even if it eventually gets deleted. “Worthwhile” here is defined as,  A score of 3 or greater Visible on the site for at least 60 days   Awesome! And indeed, on  I had a question which had score of more than 3 and was visible for more than 60 days before getting deleted. The reputation I gained from it is preserved in all places... except my network profile reputation graph. :( I thought to myself "209? Let's prove that's the reputation I have if using the old rules". So I had.  Start with 1 reputation point. Association bonus of 100 → 101 points total  with 11 upvotes and 2 downvotes → 110-4 = 106 net change → 207 points total One approved  → 2 rep → 209 points total ##Q.E.D  Can the network profile reputation graph follow the same rules as the rest of the reputation calculations?


Why are the eigenvalues of symmetric real matrices real?

How can I show that a real symmetric matrix has real eigenvalues?


How to do Time Series analysis with only 10 data points

I think this is a basic question but really I just need a definite starting point. I am working in R. I have a dataset as follows  rowid    TimePoint1   TimePoint2    TimePoint3    TimePoint4   TimePoint5   etc. 1          54            34           55           74             474     2          36            63           83           344            636     3          151           61           1643         34             976 etc.   (There are actually 10 TimePoints and hundreds of rows)  I want to basically create a best fit line (likely non-linear) which I can then compare to another group with the same dataset structure.  I think I really need to know what this type of analysis might be called- firstly to create the best fit (is it just regression?) and then to compare with another group.


For the first time I am using Ubuntu and I installed Ubuntu MATE 16.04. I wanted to install code block  and heard from a friend that I should look for it on Software Center.  I tried searching for it on the Software Center and got it but I couldn't figure out how to install it, and also Software center icon is missing. Please help me since I am new to it.


An app that can give me the amount of time using an app?

I need an app that tracks automatically every time I use Final Cut X or another app and gives me the total usage time. Any ideas?


Getting Null Object Reference when Trying to Access Dynamic Data - Android Studio

I'm using it to decrypt a password (said password is in a URI is in another class).  If I hardcode the key, it works.  I'm trying a dynamic approach, and this is where I struggle due to my lack of experience.  I'm not able to get the two classes to work together. public class Decrypt {        public void myMethod(Context context) {         try {             context.getContentResolver().openInputStream(targURI);         } catch (FileNotFoundException e1) {                 Toast.makeText(context.getApplicationContext(), "Could not read the content. Please check the URI is correct", Toast.LENGTH_LONG).show();                 return;             }             BufferedReader reader1 = new BufferedReader(new InputStreamReader(content));             StringBuffer buffer = new StringBuffer();             try {                  while ((line = reader1.readLine()) != null) {                     md5key = md5key + line;                 }                 index = md5key.indexOf("\"MD5_PIN\"");                 md5key = md5key.substring(index + 10, index + 42);                 Log.i("Test:  ", md5key);             } catch (IOException e1) {                 e1.printStackTrace();             }         }  //Decrypts password     public String encryppass(String pass) {         return this.decrypt(pass);     }      private String decrypt(String paramString) {         byte[] arrayOfByte = Base64.decode(paramString.getBytes(), 0);         try {             this.cipher = Cipher.getInstance("AES");             this.cipher.init(2, this.keySpec);             String str = new String(this.cipher.doFinal(arrayOfByte), "UTF-8");             return str;         }         catch (Exception exception) {             exception.printStackTrace();             return null;         }     } }  MainActivity:      @Override     public void onClick(View view) {          switch (view.getId()) {              case R.id.exploit1:                 String[] arrayOfString = {"name", "pwd"};                 Cursor cursor = getContentResolver().query(                         Uri.parse(PWDMANAGER_URI), arrayOfString, null, null, null);                  Decrypt pp = new Decrypt();                 try {                     if (cursor.moveToFirst()) {                         do {                             String name = cursor.getString(0);                             String encrypted = cursor.getString(1);                             String decrypted1 = pp.encryppass(encrypted);                             Log.i("Title:     ", name);                             Log.i("Password:  ", decrypted1);                         } while (cursor.moveToNext());                     }                 } catch (NullPointerException exception) {                     exception.printStackTrace();                 }       Any suggestions on how to get these classes working together?


I have lists where strings correspond with values. For example, in a company list I could have Microsoft correspond with the letters MS.  Obviously, this could be transposed as a table in MySQL to make the list extensible but, from curiosity, how would you express this in constant form in PHP ?  P.S: There is the class-with-constants approach (see accepted answer here: ) to act as an enumeration but would that really be of any use seeing that enumerations map to integer values ?


How to stop automatic time update via terminal?

This question shows how to stop automatic time update (and switch to manual):    I want to do this exact thing but I can only ssh onto my machine so I need to make this change through the terminal. Is there any way to do this?


I have a computer with windows OS and i would create an app for AppleStore. I must have a computer with apple's OS or can i program with windows?


Unable to completely uninstall standalone app called Etcher from Ubuntu

I'm on Ubuntu 16.04 and I downloaded and installed Etcher for Linux x64 (64-bit) (AppImage), a standalone application to make bootable usb drives. Supposedly, to uninstall the application I simply havee to remove it. However, on first use a message popped up asking "Should a desktop file for /home/myhome/Downloads/etcher-electron-1.4.4-x86_64.AppImage be installed?" I selected yes, and now I can't get the message to come back. I deleted the AppImage file and extracted a new one from the downloaded zip file, but the message will no longer pop up. This seems to indicates that the application has not completely removed. How do I completely remove it?  For those claiming this is a duplicate, the answer to the provided "duplicate" does not apply here because this is a standalone application. Please read more carefully next time.


Old sci-fi cartoon movie about underground slaves, space empire and a Chosen One from 80s/90s

When I was a kid I saw a cartoon probably made in the 80s or early 90s. In this cartoon, underground inhabitants extracted resources under the supervision of overseers/demons.   The protagonist attacks one of the overseers and escapes to the surface. He discovers that overseers aren't people or demons, they are androids.  He finds a spaceport, meets a smuggler and a princess, and discovers that he is some kind of Chosen One.   With help of friends he defeats the Evil Prophet (and his robot army). This Evil Prophet tried to conquer the Universe millennia ago under different name. The main villain is an android/cyborg too.   In the finale, the protagonist liberates his people from slavery and his people come out to the surface (they thought that their underworld was the real world and that surface is myth).   I don't remember the names of the characters or the title. The cartoon is drawn in the style of He-Man, but it's too long for a regular He-Man episode, it's a cartoon movie.


Midway through the loading sequence, the screen is jumping to UBUNTU: clean, 23393/748336 files, 6613342/29730048 blocks

I have attempted manually rebooting which was unsuccessful


What's the best way to report SPAM user accounts?

Possible Duplicate:          A question i asked got a reply from a spam user account.    what's the best way to report these findings?


Show "Tap to show spoiler" message for spoilers in responsive design

Related question: , but that is about the (deprecated) mobile web interface, not the new responsive design.  is related but , and I'm not asking for it to be implemented on desktops. Not as many people were using touch screens to browse Stack Exchange back then, and the new responsive design has been explicitly designed to accommodate touch screens.    Now to the feature request itself: I realized there that it's rather easy on desktop to discover how to interact with spoilers; when you point your mouse at it, the contents will appear on hovering over it. This might even happen accidentally; the animation will get your attention anyway. Many (new) users are using Stack Exchange on their smartphone or tablet, where this interaction is simply not possible. As  mentions, it just looks like somebody made a mistake and posted an empty blockquote.  Because the new responsive design will (eventually) replace the old  interface, can it show the "Click Tap to show spoiler" message as well if the  indicates it's a mobile device?


Unable to upgrade from 14.04 to 14.10 "Cannot Calculate Upgrades"

I just finished backing up my system and when I try to upgrade to Utopic Unicorn, I get the error "Cannot Calculate the upgrades." I ran the upgrade by sudo apt-get dist-upgrade, sudo do-release-upgrade after the GUI method failed, they all gave the same error.  The feedback gives some recommendations:  This can be caused by:  * Upgrading to a pre-release version of Ubuntu  * Running the current pre-release version of Ubuntu  * Unofficial software packages not provided by Ubuntu    I am not upgrading to a pre-release version nor coming from one, I'm going from Ubuntu 14.04 LTS to 14.10. I have no broken packages and I have unchecked all my non-official software sources in the 'Software & Updates' manager.  My guess left is the Unofficial software packages not provided by Ubuntu. If anyone could give any help as to how to check for unofficial packages using Synaptic or another, my appreciation.  Are there any other factors that may be causing this error and how would I go about checking/fixing those?  Thanks.  Edit: I have no broken or held packages. Everything is up-to-date, and restarting everything or anything has no effect.


How can I type-check variables in Python?

I have a Python function that takes a numeric argument that must be an integer in order for it behave correctly. What is the preferred way of verifying this in Python?  My first reaction is to do something like this:  def isInteger(n):     return int(n) == n   But I can't help thinking that this is 1) expensive 2) ugly and 3) subject to the tender mercies of machine epsilon.   Does Python provide any native means of type checking variables? Or is this considered to be a violation of the language's dynamically typed design?  EDIT: since a number of people have asked - the application in question works with IPv4 prefixes, sourcing data from flat text files. If any input is parsed into a float, that record should be viewed as malformed and ignored.


Include a more descriptive message when accounts are deleted on the effected accounts that have rep removed?

Question is a bit of a mouthful but I see users that are dismayed by the drop in their rep and got to thinking if it would be possible to display a more appropriate message instead of just "user removed" and a -10 in their reputation section of their user page.  Perhaps just the text of the user account that was deleted and what question it pertained to?


Can I use wildcards in Windows 8 search?

When using a new Windows 8 search bar:    What is the syntax of the search expression? Is it possible to use wildcards like "*", "?" or any other special symbol?  For example, when searching with Google i can use:   '-' (minus) for excluding certain words; "quoted phrase" for exact phrase matching.


Strange case while rounding to the nearest 0.05 - special case

For rounding to the nearest 0.05, I am just dividing it by 0.05 and then multiply by 0.05. As described in other similar questions.  In [119]: (127.651//0.05)*0.05 Out[119]: 127.65  In [120]: (127.6501//0.05)*0.05 Out[120]: 127.65  In [121]: (127.65000001//0.05)*0.05 Out[121]: 127.65  In [122]: (127.65000000001//0.05)*0.05 Out[122]: 127.65  In [123]: (127.6500000000001//0.05)*0.05 Out[123]: 127.65   Till here its doing as expected. However for this special case:  In [124]: (127.650000000000000001//0.05)*0.05 Out[124]: 127.60000000000001   I would have expected 127.65 here.  Tried rounding off before dividing, but again.. strange. Not only i am getting unexpected result(expecting 127.65), but also it is giving results that is beyond 2 decimal places, which will result into failure in my further processing functions.  In [125]: (round(127.650000000000000001,5)//0.05)*0.05 Out[125]: 127.60000000000001   If i execute just the inner round,  o/p is 127.65...   In [126]: round(127.650000000000000001,5) Out[126]: 127.65   But on adding the divide and multiply logic.. the result becomes unexpected.  In [125]: (round(127.650000000000000001,5)//0.05)*0.05 Out[125]: 127.60000000000001   Should there be any datatype issue? or internal precision limitations of python?  how do i overcome it in an elegant way?  PS:   1) I am using python 2.7  2) I am eventually using it in a function. Which is giving unexpected results for this special case. I cannot control the input data quality and its data precision, as it is coming from reading a csv file to dataframe.  def RP(price):# Round down to the nearest price quotable ...i.e. multiple of 0.05         return(round(price//0.05*0.05,2))


Avoid using remote identity file when using ssh on remote server

I'm connected to serverA with SSH. I have one identity file on my local computer, which I use to authenticate to serverA, and one identity file on serverA which I use when I'm at that computer physically. I have ForwardAgent yes in my local ssh config file.  Now, from serverA, I'm trying to open another ssh session to serverB. However, SSH will then try to use the identity file on serverA to connect to serverB, but I would like to use the identity file on my local computer (forwarded using ForwardAgent).  How can I tell SSH on serverA to use the keys forwarded, instead of the keys on serverA, when I am connected to serverA through SSH?  Answer: The problem, it turned out, was that my local computer was running macOS, which does not add keys to the agent by default. Therefore, no keys were forwarded to serverA. After adding AddKeysToAgent yes as well as ForwardAgent yes to my local config, ssh on the remote linux machine uses the forwarded key instead of the remote key by default. So no changes had to be made to the remote machine.


Why is this attribute writer not being called?

The code:  class Weird   DEFAULT_FOO = 'fo0'    attr_accessor :foo    def initialize(val)     @foo = val   end    def run     unless foo       foo = DEFAULT_FOO         # Fails       # @foo = DEFAULT_FOO      # Works     end      bar(foo)   end    def bar(f)     puts "The foo is '#{f}'"   end end  RSpec.describe Weird do   subject(:weird) do     described_class.new(foo_val)   end   let(:foo_val) { nil }    describe '#run' do     context 'without foo' do       it 'bars the foo' do         expect(subject).to receive(:bar).with(described_class::DEFAULT_FOO)         subject.run       end     end      context 'with foo' do       let(:foo_val) { 'quux' }        it 'bars the foo' do         expect(subject).to receive(:bar).with(foo_val)         subject.run       end     end   end end   Run this with RSpec (rspec weird.rb) and the second test fails with:    1) Weird#run with foo bars the foo      Failure/Error: bar(foo)         #<Weird:0x007fc1948727f8 @foo="quux"> received :bar with unexpected arguments          expected: ("quux")               got: (nil)        Diff:        @@ -1,2 +1,2 @@        -["quux"]        +[nil]       # ./test_case_2.rb:21:in `run'      # ./test_case_2.rb:48:in `block (4 levels) in <top (required)>'   The implicitly defined foo=() attribute writer method is not being called; explicitly defining one does not work either. Instead, it seems a method-local variable foo is being created (and set) where it shouldn't be. Why is this happening?  Ruby version is ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin15].


sql injection/login page, query about my code

Good morning all,  I recently made a post on this website regarding a login page for a website. It was pointed out to me that I was very vulnerable to an SQL injection. I have spent the past weekend researching into SQL injections and I am getting a bit of a better idea about how they function, however I am still very new to PHP (I taught myself the basics in a day). I was wondering if anyone could help me with my code please.   I have read every link that people posted and researched it till my head exploded (no need to edit, its not literal), but I am still struggling as to the code itself.   Here is my code:  <?php     session_start();     // dBase file     include "dbConfig.php";      if ($_GET["op"] == "login")     {        if (!$_POST["username"] || !$_POST["password"])        {          die("You need to provide a username and password.");        }         // Create query        $q = "SELECT * FROM `dbusers` "        ."WHERE `username`='".$_POST["username"]."' "        ."AND `password`=PASSWORD('".$_POST["password"]."') "        ."LIMIT 1";        // Run query        $r = mysql_query($q);        if ( $obj = @mysql_fetch_object($r) )       {         // Login good, create session variables         $_SESSION["valid_id"] = $obj->id;         $_SESSION["valid_user"] = $_POST["username"];         $_SESSION["valid_time"] = time();          // Redirect to member page         Header("Location: members.php");       }       else       {         // Login not successful         die("Sorry, could not log you in. Wrong login information.");       }    }    else    {     //If all went right the Web form appears and users can log in     echo "<form action=\"?op=login\" method=\"POST\">";     echo "Username: <input name=\"username\" size=\"15\">
";     echo "Password: <input type=\"password\" name=\"password\" size=\"8\">
";     echo "<input type=\"submit\" value=\"Login\">";     echo "</form>";    }  ?>   Now I know it needs validation AND sanitisation in PDO, am just struggling as to what to actually write in my code. I am hoping that someone could help rather than just link me to another page please  as an edit, if anyone has a link to a tutorial about logins which are SQLinjection safe that could help me/other people looking to protect against that would be much appreciated. Thanks


Why is there no Chromium for 64 bit Ubuntu Mate?

I tried installing 64 bit Ubuntu MATE 18.04 on RPi3B+ but there was no package available for it in Software Boutique. Is there no 64 bit version of Chromium for 64 bit Ubuntu MATE 18.04?


There should be an indication about Total Question views, it should be either under Question title or votes.  One more thing, it would be looking good if question views can be accommodated inside every question row in questions list screen.


I'm trying to match SHA1's in generic text with a regular expression.  Ideally I want to avoid matching words.   It's safe to say that full SHA1's have a distinctive pattern (they're long and a consistent length) - so I can match these reliably - but what about abbreviated SHA1's?  Can I rely on the presence of numbers?  Looking at the SHA1's in my commit log - numbers always appear in the first 3 characters. But is this too short? How many characters of SHA1 do I need to consider before I can assume a number would have appeared?    This does not have to be 100% accurate - I just need to match an abbreviated SHA1 99% of the time.


What happened to the bodies in American Psycho?

Towards the end of the movie, we see  in an apartment full of dead bodies. He ends up confessing what he's done to his lawyer. Later he goes back to the apartment, only to find the bodies are all gone. What happened to the bodies?


Suppose I have 3 dice. Each has some mechanism that can prevent other dice being in 2 if itself is 2 when they are rolled together. Now I roll the 3 dice at the same time. Then what is the probability of having a 2 appearing?  Is the answer 1/6 + 1/6 + 1/6 = 1/2 since the event are mutually exclusive and each has a probability of 1/6?  But without the mechanism the probability of at least one 2 appearing is 1 - (5/6)^3 = 91/216 < 1/2?  Why should the probability decrease?


I currently try to document a project where a lot of image processing goes on. The problem is, that often tiny details are important to show, but also the reference in the bigger picture is required.  What I'd like to archive is something like this:    I have an overview picture in Figure 1a and show a zoomed-in part of the picture in Figure 1b. So far I am able to do this nicely using bounding box. However it would be nice to add an indicator like the dotted red lines to clarify. This is especially important, when there are multiple areas that need a detail-view in one image.  One other thing I need to do is to add rulers over multiple images, like in Figure 2, in the same sense as you would in a graphics-program.  An answer in  pointed me to the  which is an nice alternative way to solve case 1.  Update  pointed me to the spy-library. With that I found  which has solutions and a lot of nice examples.


Left an uncooked thawed store made pizza in the car for 4 hours in 54 degree weather

Left an unfrozen uncooked store made pizza in the car for 4 hours in 54 degree weather. Is this safe to cook?


PFX file import to Webhosting store in C#

I'm using this code to import a certicifate from a PFX file:            string certPath = @"C:\a\something.eu.pfx"; string certPass = "password";  // Create a collection object and populate it using the PFX file X509Certificate2 certifikat = new X509Certificate2(); certifikat.Import(certPath, certPass, X509KeyStorageFlags.PersistKeySet);  X509Store store = new X509Store(); store.Open(OpenFlags.MaxAllowed); store.Add(certifikat); store.Close();   It executes without errors, but the certificate doesn't appear in the "Web Hosting" store. How can I import it in that store?


Is there a way to trim art boards in illustrator like in photoshop?

I will find myself often resizing art boards in illustrator when Im designing websites (if a page needs to be longer or shorter) and wanted to know if there is a way to trim away transparent pixels on an art board just like in photoshop. Right now I just use the art board tool to resize it manually but if theres a quicker way Im all ears. It would be quite a nifty tip to know


Prove that if $I$ is maximal, then $R[X]$ is a PID.

Let $R$ be a commutative ring with unity such that $R[X]$ is a UFD. Denote the ideal $\langle X\rangle $ by $I$.  Prove that    If $I$ is maximal, then $R[X]$ is a PID. If $R[X]$ is a Euclidean Domain then $I$ is maximal. If $R[X]$ is a PID then it is a ED.   We know that $R[X]/\langle X\rangle \cong R$. Since $I$ is maximal then $R$ is a field. Also every field is a Euclidean Domain and hence a PID and also a UFD.  By Gauss Lemma $R[X]$ is a UFD.  But these facts are not helping anything in these statements to prove.  Please give some hints.


Reducing Lion OS Footprint by removing unnecessary files/folders

I am trying to downsize my iMac 640Gb disk to make it fit onto a 120Gb (113Gb usable) SSD.  The total size of use files is currently approximately 340Gb, of which my home folder accounts for 265Gb (which I intend to not put on the SSD, or at least not all of it).  Very rough calculations suggest that my OS and application files are taking up roughly 75Gb, which puts me approximately 2/3rds full - not bad.  But, I would like to reduce this a little further if possible, to ensure that as and when I continue to use the computer (and I have a number of large apps that do not currently have installed including music production apps with a lot of data) I am not worried about running out of space on the boot drive.  To this end I already own XSlimmer which I will use periodically to remove PowerPC and language variants from my apps, but I was wondering if there are any areas of the Base OS that I can safely remove to save further space?  I am thinking about things like OS localisation, the location of the included screensavers and wallpapers, the voice files that are used for text-to-speech etc.  Is there a significant amount of such data that can be easily removed to save a few extra Gb on the boot disk?


How to compress the directory and its contents

How do I compress a directory and its contents in ksh on AIX  for a file I do compress filename


Residue calculus: $\int_{-\infty}^\infty e^{-x^2} \mathrm{d}x$

I am pretty sure I have read the answer somewhere on this site, but sadly I am unable to find the question.  How to evaluate $\int_{-\infty}^\infty e^{-x^2} \mathrm{d}x$ using the residue theorem?


Сanonical form of a quadratic form by Lagrange's method

This is just an eg. to understand how to solve it.  There is a quadratic form as below we need to bring to canonical form using Lagrange's method and find the coordinate transformation.   Then find the positive & negative indexes, rank of the quadratic form. Finnally, to investigate sign-definiteness of the quadratic form by two ways: according to it's canonical form and the criterion of Sylvester: $4x_{1}^2+2x_{2}^2+10x_{3}^2-4x_{1}x_{2}-12x_{1}x_{3}-8x_{2}x_{3}$  Any clarification on how to do it are very welcomed.


Windows installation once Ubuntu 18 is already installed

I have Ubuntu 18 installed on my laptop's SSD and I would like to install Windows 10 in a partition that I've made on the HDD drive.   I haven't started because I have some doubts related with the GRUB. Is it completely safe to install Windows after Ubuntu is already installed? Will I have to do something (GRUB re-installation or mount related things) even when I'm installing Windows on a different hard drive?   I need to keep all my Ubuntu files and software as it is my main OS and I will only use Windows to play some games.  I know there are several similar threads but none of them solves this particular issue, in my opinion.  Thanks in advance!


I added the new vector layer in QGIS and I want to draw a circle of 500M or 1000M from center.  I also added the pluginn Rectangles ovals digitizing in QGIS. But the options of this pluginn is not active.   How do I use this plugin?


Why is velocity squared in kinetic energy?

I'm not looking for how it's derrived. I'm wondering why it works out this way that doubling the speed quadrouples the KE.   Here's my thought process:   A car is moving down the road (ignoring air resistance and any other external force reliant on speed) at 10 m/s. To get to 20 m/s the engine should burn x amount of gas, containing x amount of energy. To do the same acceleration over again it should burn x gas again, resulting in 2x gas burned total and resulting in another 10 m/s increase in speed. This would leave it at 30 m/s.   Say the amount of gas burned to increase speed by 10 m/s is 100 energy units, and the car's mass is 2. Then increasing from 10 to 20 with ke = 1/2 mv2 should increase the KE by 100. Therefore from 20 to 30 it should also be 100, resulting in 200 total energy units and 2x gas burned. But using the equation and plugging in the same mass value with the total acceleration from 10 to 30 (30 -- 10 = 20 and plugging that in for v rather than 10) you get the total ke as 400 units rather than 200, but you theoretically should have still used 2x gas.  If someone could explain to me what the issue is in my reasoning and explain why speed is squared, that would be much appreciated.


Is 2/3 always, sometimes or never plural?  E.g.     1a) 2/3 of the pizza were eaten.     1b) 2/3 of the pizza was eaten.      2a) 2/3 of the visitors were men.     2b) 2/3 of the visitors was men.   I feel that example 1 could go either way but example 2b sounds very wrong.  Is there a rule for this?


TeXShop search not working for multiple file source

I am using TeXShop 3.26 under Mavericks. I have SyncTeX selected as the sync method. Searching works both ways in general (source to pdf and pdf to source). However, when editing a multifile source where there is a "root" document with sections included with \input{}, and similarly subsections within those, forward search (source to PDF) doesn't work. Nothing happens. PDF to source still works fine.  Is this known/expected behaviour? Is there any setting I can make to fix it?


$1 + \frac{1}{3}\frac{1}{4} + \frac{1}{5}\frac{1}{4^2} + \frac{1}{7}\frac{1}{4^3} + ......$ Can anyone help me out how to solve this.   My try : I was thinking about the expansion of $tan^{-1}x$. But in that series  positive and negative will come alternatively.


My incorrect answer for a TOEFL question

While I am training for my TOEFL exam using an Android mobile application, I found this question which seemed trivial to me but it turned out to be more complicated. Can somebody help me understand the grammar behind this answer because all what I could find using Google is what I already know:  Before a person may drive a car on a public highway, it is necessary that he _____ a driving test.  take (the right answer) is taking took takes (my answer)


Where do we draw the line on esoteric tag additions?

A user has suggested many edits adding tags to questions like    to a question involving an if statement  to a question titled "c#: Add element to second nesting in xml"  to a question titled "How to get exact cursor position in RichTextbox to display Popup "   these seem worthless to me. However, he claims otherwise (we are having a polite discussion about it, everybody be nice to him even if you agree with me!):     Hmm I see what your after and from your POV I do agree. But there are people like myself searching for these tag belive it or not. I use them to mostly to illustrate common problems programmers run into. Otherwise they wouldn't be tags created by the SO community. I read the article you supplied to me good read.. but I think you focus to much on the value adding from YOUR pov. I always read the question and study the problem, and if theres a problem with a nested or and if-statement why not tag it. I mean when are those questions ever going to be tagged otherwise with those tags??   And indeed,   for some reason. Still, I'd make the argument that none of these tags add any value to the question or its searchability.  Does a general guideline exist how to deal with this? How do we account for the fact that we may not be able to see the value in a borderline esoteric tag, but others do? How do we still have clear rules for this kind of situation?  Bonus question: what do we call tagging that simply describes what happens to be the question's subject matter, without really adding any relevance? It's not Meta tags, but it's something like them.


SQL SELECT Only the column with max date


What is the name and command for the symbol next to the infinity?

I want to know what the name and command of the symbol next to the infinity is. This is a partial screenshot from my homework. I'm expected to submit a typeset homework that requires this symbol in the answer.  Anyone know what it is and its command?


How to Avoid Precision Errors While Creating Numpy Arrays?

I have to get certain precision in my code. However, I think due to summing up of errors in long arrays, it accumulates on a bigger error. Would you identify why element 38260 is not equal to 5.6? import numpy as np  xmin = -377 xmax = 345 spacing = 0.01  a = np.arange(xmin,xmax,spacing) print('{0:.25f}'.format(a[38260])) # Prints 5.5999999996520273271016777 print(a[38260] == 5.6) # Prints false  b = np.arange(xmin/spacing,xmax/spacing)*spacing print('{0:.25f}'.format(b[38260])) #Prints 5.6000000000000005329070518 print(b[38260] == 5.6) #Prints false


Why does no line appear when using Interpolate Line in ArcMap?

I'm attempting to make an elevation profile from a DEM in ArcMap using the Interpolate Line tool.  I've done this before, and it has worked great--basically I just draw a line with Interpolate Line, then click Profile Graph to get the elevation profile.  However, for some reason, it's not working now: when I draw out my line, nothing shows up on the map.  I don't get a line, and I can't figure out what I'm doing wrong.  I've searched online for an answer, but to no avail.    Any tips?


how did these things end in their climactic location?

In the final battle of Avengers: Endgame, Tony Stark manages to steal the Infinity Stones from Thanos’s gauntlet and insert them in his own glove. We don’t see how he pries them loose from Thanos’s gauntlet, but it was done so smoothly that Thanos himself does not see or feel it happening.  We then see the stones hovering over the glove for a moment before they settle into place and give Tony vast power.  What was causing the hovering? Was it the same effect that allowed the stones to the stolen in the first place? Was the glove specially made for holding the stones? If so, when was the plan made for Tony to take the stones and why did they think he would be able to wield them (the point is made earlier that only the Hulk can do so without being destroyed). I thought Scarlett Witch might have been involved, but she had been dead until moments before and there was no chance for Tony to coordinate plans with her. So, basically, how did the stones end up in the glove?


How exactly is the input message of SHA-256 (pre-)processed?

I’m very interested how SHA-256 handles messages, but I’ve got 3 questions. (As I have already read in some answers before, SHA-256 is not directly performed on the message but on an array, thanks for that.)   In my understanding after padding the message to a multiple of 512 bit length, we put the message into a     64 entry message schedule array w[0..63] of 32-bit words   Is this an array with 64 elements, each allowed to be 32 bits long?     copy chunk into first 16 words w[0..15] of the message schedule array   But then I ask myself, if we have a message that is, for example 4096 bits long and we only fill the first 16 elements of the array with the original message, what happens to the other (4096-16*32 = 3584) 3584 bits of the message?    s0 := (w[i-15] rightrotate 7) xor (w[i-15] rightrotate 18) xor (w[i-15] rightshift 3)   What are the rightrotate and rightshift operators doing to the elements in the array?


Area of solid revolution using integration.

When we calculate the volume of a solid generated by rotating a curve around $x$-axis, We divide it into disks.  So ,we get  $dv = \pi  r^2 dx$. where $r=y$ and then we integrate.   That OK, but when we calculate the area of the outer\external surface of the solid,  why don't we let $da=2 \pi r dx$ , and then integrate to get the area?  why is it wrong? note that   $r=y$.   Any intuitive insights to tackle this ?


Error "ReferenceError: StackExchange is not defined"

I am getting this error in this console when loading pages:  ReferenceError: StackExchange is not defined   The side effect is that these are not working:   Inbox Reputation changes Vote up or down   This is happening with Firefox and Internet Explorer. Help?


find all natural solution that satisfy $x^2+y^2 = 3z^2$

I need to find all natural $x,y,z$ that satisfy the following   $x^2+y^2 = 3z^2$   $(0,0,0)$ is an answer of course.  What I tried: I tried solving with congruences. I know that every square number is either $0\pmod4$ or $1\pmod4$ so the sum of two squares is either $0\pmod4$ or $2\pmod4$. Now I'm stuck... Any help will be appreciated.


I can store it in an array, ok, but after how can i paint it? Because if i do  enemy = new Enemy(); enemy2 = new Enemy();  i create two istances of the object, but afer how can i paint it? I use: g2d.drawImage(Enemy.getImage(), Enemy.getX(), Enemy.getY(), this); But obviously it use the class, not the variable. Images will not be overlyed because coordinates are random. Excuse me my terrible english.


I just noticed . Along with it, I noticed this:    It seems the system isn't recognizing the link as a link. What gives?


In both jungles I heard there are special places between the trees that you can put your ward in order to block the neutral camps, and the ward is placed in a place where is difficult to access without skills or items that cut trees. These spots are known as magic bushes as far as I remember.  Can anyone point where are these spots? Pictures are desired, but not needed.


Is the Big Bang occurring or did it already occur (a question about time)

I understand how time (space/time) is perceived according to the theories of relativity, but I still don’t understand: Did the Big Bang occur 13.8 billion years ago or is it occurring relative to us 13.8 billion years ago? Is the day I was born occurring x years ago relative to me or did it occur x years ago? Is the day I die occurring x years from now, or will it occur only in x years from now? When using the word relative in my examples, I am not necessarily meaning it in the sense of special relativity.


I'm trying to vertically center a span or div element within another div element. However when I put vertical-align: middle, nothing happens. I've tried changing the display properties of both elements, and nothing seems to work.  This is what I'm currently doing in my webpage:  <!DOCTYPE HTML>
Test


How important academic affiliation really is for getting published in a reputable journal?

More specifically how likely it is for me to get published as an independent researcher working as hard as an affiliated researcher? How much difference does it really make?


Python: UnicodeEncodeError charmap codec can't encode characters

Definition  Below is a code that open a file 'problem_1_submission.txt'. file 'problem_1_submission.txt' is a list of 20 lines of twitter messages.  These twitter messages then json.load and compiled unto list 'tweet'.  After that this code is intended to print out the text of twitter messages.  ''' testing open and store all lines on problem_1_submission.txt to dictionary ''' import json import sys  tweet = []  TweetFile = open("problem_1_submission.txt")  for line in TweetFile:   tweet.append(json.loads(line)) '''tweet is a list of dict file. each dict file is a product of json,loads of     each line in problem_1_submission.txt.      the problem_1_submission.txt is basically text file that list 20 lines of twitter       message'''    print 'Tweetrange:',range(len(tweet)) print 'len(tweet):', len(tweet)  for index in range(len(tweet)):     if 'text' in tweet[index]: #Check for tweets with 'text' only!         print 'Tweet index:',index,'tweettext:',tweet[index]['text']   Problem  This code failed to print out the text of twitter messages. The error appeared is UnicodeEncodeError.  this is the error:  PS C:\users\diancharlo\desktop> python TestJsonLoadsStackOverflow.py Tweetrange: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] len(tweet): 20 Tweet index: 1 tweettext: Traceback (most recent call last):   File "TestJsonLoadsStackOverflow.py", line 23, in <module>     print 'Tweet index:',index,'tweettext:',tweet[index]['text']   File "C:\Python27\lib\encodings\cp437.py", line 12, in encode     return codecs.charmap_encode(input,errors,encoding_map) UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-12: character maps to <undefined> PS C:\users\diancharlo\desktop> py   Any idea?


Civilisation battles enemy along time-warped front. May be fighting itself

City is involved in a very long war along a front which is subject to some kind of warping, such that you can never actually get there—just fire through it. At the end, protagonists suggests that the front is a mirror, and the city is battling itself.


python list append value depending on an if clause

I am new to Python, so apologize if the question is very simple.  I want to append a value to a list. However, I need to check if the value computed is less than 5000.   If the value is less than 5000 then append the computed value, else append 5000. How can I do this?  e.g   mylist.append(a*list1[t]+b*list1[t+1])   My current approach:  if a*list1[t]+b*list1[t+1] < 5000:     mylist.append(a*list1[t]+b*list1[t+1]) else:     mylist.append(5000)   Can I do this in one line?


How to fix "-5 No address associated with hostname error" while updating?

I am getting this error frequently while updating Ubuntu 12.04 LTS. How can I fix it? Log is:  Ign http://archive.scrapy.org precise/main Translation-en Fetched 6,620 kB in 1min 21s (81.2 kB/s) W: Failed to fetch http://archive.scrapy.org/ubuntu/dists/precise/Release.gpg Something wicked happened resolving 'archive.scrapy.org:http' (-5 - No address associated with hostname)


Principal ideal rings that are not integral domains

In the usual definition, a principal ideal domain $R$ is also assumed to be an integral domain. However, the property that every ideal is generated by a single element does not seem to immediately imply that the ring is integral. Is this correct and if so:  Do there exist rings where every ideal is generated by a single element and has zero divisors?  I am most interested in the case where $R$ is commutative with unity, but don't mind examples where these properties don't hold. Also, assuming there are examples, is there any reason why we make this assumption?


I know that there is a preselected candidate for a position to be filled at my department. What should I do?

There is a rather attractive position to be filled at my department. The heads of department are already quite sure about who should fill this position. Jobs being filled with preselected candidates are not exactly legal, but common practice in my country. Thus, there legally has to be a job announcement, as everybody has to be given the chance to apply for the job. There further is an equal opportunities office that ensures that all candidates are being judged by the same categories and no one gets preferential treatment.  I never found this practice of preselecting candidates particularly fair or ethical, but let's just say that up until now I had to deal with other challenges. Then I recently stumbled across the list of applicants for that position by accident (was still lying in the printer) and saw that I know one of the applicants who apparently will have no chance against the preselected candidate. It's not that I desperately want this acquaintance ("friend" is too much) to fill the job, but knowing a name on the "you're never gonna get the job"-list made the unfair treatment so much more real. I don't find it acceptable.    Things that speak for me to do nothing:   Most importantly: My contract will be finished soon and I was, am and will be dependent on my boss's willingness to  give me a contract or rather (because there is no funding) her cooperation on further projects. The head of department is my direct boss and (in my opinion) a very likeable person. I highly appreciate her concern for her staff, she nevertheless needs to make strategic decisions at some points, which comes with the job and is only professional - I understand. Furthermore, as much as I know the preselected candidate seems to be a very good, high impact candidate who will fit in the department.   Things that speak for me to do something   Most importantly: It's a unfair/ unethical system and I don't want to stand by and watch There is no funding for a future contract anyway (although my boss tried) There may be many other candidates just as good or better than the preselected one   What should I do? I'm not gonna lie: talking to my boss (head of department) scares me quite a bit. But then again I don't want to go to higher levels, be the whistleblower and ruin parts of my boss's career...    [Update] Based on your answers I did/will do the following:   I talked to a colleague, turns out she had the same impression and wanted to talk to me about it as well. So concerning the question "do you have proof?": at least I have another witness now. But then again, as Anonymous Physicist wrote: up until now, no rule was broken. However, we decided to closely follow the application process in hope that our concerns were exaggerated (which I highly doubt) "maybe it was just a statement about the quality of the candidate?" It very much exceeded this, as my boss was talking about how important it is that they get the participant through the application process and what possible pitfalls could be. Nevertheless I'll talk to her in order to find out, what her behavior would look like if "someone better" shows up and if that'd be a case of nepotism (see answer of xLeitix).


This might seem a trivial problem, but I would like to be sure about my intuitions.  In the method of maximum likelihood estimation, people use very often the natural logarithm in order to simplify the differentiation of the function; specifically, I was reading the following:     That is, if $x1 < x2$, then $f(x1) < f(x2)$. That means that the value of $p$ that maximizes the natural logarithm of the likelihood function $ln(L(p))$ is also the value of $p$ that maximizes the likelihood function $L(p)$.   My question is     Why, if the natural logarithm is an increasing function, then we can use it for finding the same maximum of $L(p)$?   I understand that the differentiation of $L(p)$ will be easier, but I am not seeing why the critical points would be the same, and thus the maxima would be the same.


I have 320 GB hard drive which is partitioned as follows:   / is 16 GB, and is reiserfs /home is 300 GB, and is reiserfs swap is 4 GB   Now I want to install Windows and have a dual-boot system, but I don't have a free partition. I have more than enough free space on the /home partition, though, and I've heard about tools like resize_reiserfs, so my question is, can I shrink that partition to 280 GB and create a new 20 GB partition on which to install Windows, and what is the best way to do it?


How to take an image of the entire hard disk?

I am using Ubuntu 12.4 I like to take an image of entire hard disk is there any software for this operating system or we can take image through Norton ghost?


x tick label style issue, anchor=east and text width command not working together

I have a figure where one of my labels is very long. I would like this label to be split to two rows. Currently my code is like this  \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{compat=1.10}  \begin{document}  \begin{tikzpicture} \pgfplotsset{width=10 cm} \begin{axis} [ symbolic x coords={0, Label 1, Label 2, This is a very very very long label, Label 4, Label 5, Label 6, Label 7,Label 8}, xtick={Label 1, Label 2, This is a very very very long label, Label 4, Label 5, Label 6, Label 7}, x tick label style={rotate=45, anchor=east, align=center}, axis lines*=left, ymajorgrids = true, legend style={at={(0.5,-0.30)},anchor=north}, ymin=0, ymax=175, bar width=5mm, ybar=-0.5cm,  enlarge x limits={abs=0.6cm}, nodes near coords,         every node near coord/.append style={color=black}, ] \addplot [red,fill=red]  coordinates{ (Label 1,100) (Label 2,90) (This is a very very very long label,80) (Label 4,140) } ; \addplot [blue,fill=blue] coordinates{ (Label 5,80) (Label 6,25) (Label 7,66) } ; \addlegendentry{Legend 1} \addlegendentry{Legend 2} \end{axis} \end{tikzpicture}  \end{document}   Which produces this:   Now if I try to change the x tick label style to be  x tick label style={rotate=45, anchor=east, align=center,text width=3.5cm}   This happens:   So the anchor=east command doesn't seem to go along with the text width command. Other anchor commands like anchor=west, anchor=base seem to be working perfectly normal. Does anyone know why the anchor east command doesn't seem to work with the text width command and is there a way to go around this?


Integral domain characteristic: contradictory ideas?

In my book (Herstein) this is a statement:      An integral domain $D$ is said to be of finite characteristic if there exists a positive integer $m$ such that $ma=0$ for all $a$ in $D$.   But by definition an integral domain can't have zero-divisors right? So how can an integral domain have finite characteristic because isn't the characteristic a zero-divisor for every a in D? Is it that m can't be in D? I'm confused, if anyone could clarify this for me I'd really appreciate it.


What is the ideal way to handle data pins D+ and D- on a USB power adapter to be compatible with fast charging on devices?

I have found that many USB wall chargers use a resistive voltage divider to set the D+ and D- pins to a specific voltage, usually between 2 and 3 volts.  Other USB wall chargers short the D+ and D- pins together with no connection to anything else.  From my experience some devices will not accept a charge rate above 500mA on the chargers using the voltage dividers, but will charge up to their max input on a charger with the data pins shorted. I have read things that suggest the opposite may be true as well, but have been unable to verify this. I am hoping to figure out which method provides the best compatibility with all USB devices.


3D modeling- is it possible to map image to 3d mesh

im a new  to blender as well as 3d modeling.... i have 3d model that i make from other 3d photogrammetry software such as remake.. but the model is not nice... so i want to ask .... is it possible if i want to export the model into blender then map the image onto it.. but the problem is the triangular mesh is too many ( because the model is tree model capture from sequence of photos).. or any solution ..as next i need to export the model into unity to build vr.. thanks..


Given that   $x^x = y$; and  given some value for $y$   is there a way to expressly solve that equation for $x$?


imageView setImageBitmap() | null pointer exception

I'm trying to download and show an image with Bitmap and ImageView. I'm using an AsyncTask which takes url arguments but I always get a  I'm trying to download and show an image with Bitmap and ImageView. I'm using an AsyncTask which takes url arguments but I always get a  java.lang.NullPointerException: Attempt to invoke virtual method 'void  android.widget.ImageView.setImageBitmap(android.graphics.Bitmap)' on a  null object reference  Code:  public class MainActivity extends AppCompatActivity {   ImageView imageView;   public void images(View view)  {       ImageDownloader task=new ImageDownloader();      Bitmap myImage;      try      {          myImage=task.execute("https://upload.wikimedia.org/wikipedia/en/a/aa/Bart_Simpson_200px.png").get();           imageView.setImageBitmap(myImage);     //Here is the part where i am                                                 //Getting exception      }      catch (InterruptedException e)      {          e.printStackTrace();      }      catch (ExecutionException e)      {          e.printStackTrace();      }  }    @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     imageView=(ImageView)findViewById(R.id.myimg);  //imageView      setContentView(R.layout.activity_main);  }    public class ImageDownloader extends AsyncTask<String,Void,Bitmap>{     @Override     protected Bitmap doInBackground(String... urls)     {         try {             URL url=new URL(urls[0]);             HttpsURLConnection connection=(HttpsURLConnection)url.openConnection();             connection.connect();             InputStream inputStream=connection.getInputStream();             Bitmap bitmap= BitmapFactory.decodeStream(inputStream);             return bitmap;           } catch (MalformedURLException e) {             e.printStackTrace();         } catch (IOException e) {             e.printStackTrace();         }         return null;     } } }


Getting grid points for DEM purpose that is bounded by surveyor points?

I have a list of surveyor points, and I will need to create a DEM model out of it ( in geotiff format if possible for space consideration, if not, then in ASCII grid format).  I need the DEM for watershed and catchment delineation purpose.   Instead of using existing software like ArcGIS, I want to write my code to do it ( in C++ or C#), so that I can later integrate them into my own GIS software. is there anything in GDAL or other open source tools that do this well? Or do I have to write from scratch?


If k-fold cross validation is not for model selection, then how do I know which instance to use?

I have a dataset of roughly 1000 subjects' data and their labels. The ultimate goal is to build a neural network which can classify the data as either 0 or 1. My current strategy is to do 10-fold CV, wherein I take a different 10% of the data for testing while training on the remaining 90% (repeated many times). There are many hyperparameters (hidden layer size, net type, etc) which I am optimizing based on the average accuracy of the 10-folds. So at the end of this, I've obtained the best hyperparameters to get the highest average accuracy.   When it is time to actually use this classifier on new data, which model do I use? If my training set is now those 1000 datapoints, then my previously optimized hyperparameters are no longer optimal for that training set.  I may have a fundamental misunderstanding of k-fold, but if not then how do I go about doing this (designing a classifier with labels to be used on unlabeled data in the future)?


Concerning what is between two consecutive squares.

Is there a  squarefree ( with two prime divisors) betweem any two consecutive squares?


Positrons versus holes as positive charge carriers

: [The Dirac sea is a theoretical model of the vacuum as an infinite sea of particles with negative energy. It was first postulated by the British physicist Paul Dirac in 1930 to explain the anomalous negative-energy quantum states predicted by the Dirac equation for relativistic electrons. The positron, the antimatter counterpart of the electron, was originally conceived of as a hole in the Dirac sea, well before its experimental discovery in 1932.]  and:  [Dirac's idea is completely correct in the context of solid state physics, where the valence band in a solid can be regarded as a "sea" of electrons. Holes in this sea indeed occur, and are extremely important for understanding the effects of semiconductors, though they are never referred to as "positrons". Unlike in particle physics, there is an underlying positive charge — the charge of the ionic lattice — that cancels out the electric charge of the sea.]  It always confused me to think of holes as positive charge carriers in semi-conductors as not being real: real electrons move from one lattice-position to another lattice-position, which effectively looks like a positive hole in the lattice that is moving in the other direction, but in reality a real electron moves, the hole is kind of an "illusion".  On the other hand the positrons are always introduced as real hard-core particles.   The quotes from the Wikipedia article make me unsure: how should I look upon these phenomena?   Edit: holes in a Dirac sea give rise to real pos. entities in one case and to unreal pos. entities in another - how can we distinguish, is it a matter of formalism?


Delphi : how to completely remove String from the memory

Var S1:String; S2:String; begin    S1:='Sensitive Data';    S2:=Crypt(S1,'encryption key');    S1:='';    FreeAndNil(S1); end;   now when i search on my process memory using programs like "WinHex" i can easly find the un-crypted String ! even i tried to make new form to encrypt this string then unload the form but it still exist   is there any way to completely remove it  thanks in advance


Does maintaining a lower indoor temperature cost the same heating energy as maintaining a higher indoor temperature

When heating in a house is on in winter, does maintaining a higher house temperature cost the same amount of energy as maintaining a lower house temperature?  I often heard that it will not save heating utility (gas or electricity) if adjust a house's thermo controller to a lower temperature, as far as maintaining the temperature (after reaching to the temperature) is concerned.  Thanks.


Combinatorics : Claude wants to invite 5 people to dinner in a pool of 11 friends, but two of these can't be with each other. How many ways?

So the question has three parts and I'm stuck on the third, that's how it goes :  Claude wants to invite 5 friends to dinner in a pool of 11 friends.  a) How many ways can he do this?  My answer : $\binom{11}{5} = 462$  It's correct  b) 2 of these friends can't be separated from each other, how many ways?  My answer : $\binom{10}{4} = 210$  It's correct  c) 2 of them are mad at each other and can't be invited together, how many ways?  My answer : ''a) - b)'' = $\binom{11}{5} - \binom{10}{4} = 252$  It's false  The answer: 378    I can't seem to understand, plus there is no explanation in my textbook, it's straight the answer, so I'm completely lost. I've tried lots of different things but never got it right.   Thank you for helping me understand. Combinatorics are like hell to me.


Is it "I read one of your comment" or "I read one of your comments"?

Which one is correct? The first one implies that I read one specific comment but the second one that I read one comment out of many the person made? Thanks!


"File Open" dialog is missing sidebar items

I'm having the strangest issue since updating to OS X El Capitan. My "Open File" dialogs show the sidebar but all my main (and useful) locations are missing. Take a look at this screenshot. This screenshot shows Keychain Access but this happens in Safari when I'm trying to attach a file to Gmail for example, or uploading an image to Facebook.  What I would like is for the sidebar to show my home directories, such as Desktop, Documents, Downloads, etc.  Help?


Upgrading from 12.04 to 12.10 resulted in boot process sticking with "The disk drive for /dev/mapper/cryptswap1 is not ready or present"

I just performed an upgrade from 12.04 to 12.10, and everything seemed to go as expected. As the upgrade was finishing I was asked to restart the computer, which I did. Once I restarted, however, the boot process got stuck with the message:  "The disk drive for /tmp is not ready"  I left it for a while and nothing happened, so I restarted the system. This time (and every single time since) the boot process now gets stuck with the message:  "The disk drive for /dev/mapper/cryptswap1 is not ready yet or not present.  Continue to wait, or press S to skip mounting or M for manual recovery"  I've tried several things so far:  1) Wait. I've waited 20+ minutes and nothing happens. After some time it also doesn't matter if I press S or M to choose one of the options, nothing happens (I have to press these quickly if I want to select an option).  2) Choose "skip" - all that happens is I see the Ubuntu logo screen as if it was booting, but nothing happens.  3) Choose "manual recovery" and it begins to load a maintenance shell  (I think that is what it is doing at least) but then very quickly the following error appears:  "udevd[109]: '/sbin/modprobe -bv pci:v00008086d00000116sv0000103Csd0000166Fbc03sc 00e00' [156] terminated by signal 9 (Killed)"  Once this message appears the system freezes on this screen.   I've searched around online but not found a solution so far.


Does $\lim_{n\to\infty}\frac{\xi_n}{n}$ for poisson distribution exists?

How can i find, does $\lim_{n\to\infty}\frac{\eta_n}{n}$ where $\eta_n$ has poisson distribution with  $\lambda = n$ exists?


Touch and open file in same command alias

I find myself typing these commands a lot (on Mac):  $ touch example.txt $ open example.txt   I was wondering if there was an easier way to do this. I tried this:  $ alias t='touch $0 && open $0’   But I got this:  $ t awef.txt touch: illegal option -- b   Note: I do not want to empty the file. If the file already has content, I just want to open it.


Is there a shortcut to close the current window?   ⌘W closes the current tab ⌥⌘W closes all windows ⌘Q quits the app completely   However, I’m looking for an intermediate between 1 and 2, to close the current window as if I’m pressing the red x.


I have 2 Google accounts - work and personal. Every time I open Chrome it uses my work account to remember browsing history etc. I find I have to switch user to get my home Chrome version with all my bookmarks etc. Can I change this to always start Chrome with my home Google account?


Is there a way to tell if LaTeX knows how to hyphenate a word?

I regularly write chemistry documents with odd words in them. Is there a way to know if LaTeX knows it can hyphenate a word? I'm wondering as the person beside me just discovered that the person whose thesis he is using as a base told LaTeX how to hyphenate polymer, which he thought would be common enough that LaTeX would know it already.


How to create files named 'a to z' - any trick?

I need to create 26 files named a to z in single command. I thought touch command would be sufficient with the regex, but it doesn't expand [a-z] instead it creates a single file with name "[a-z]".  $ touch [a-z]   Any way to achieve these?  Note:   $ bash -version  GNU bash, version 4.3.30(1)-release (i686-pc-linux-gnu)


Java check against null object unexpected behavior

I am trying to understand some unexpected behavior in my Java code.  Here is the code:  TimeclockEntry t = db.getLastTimeclockEntryByEmployee(Integer.parseInt(employee)); String status = (t==null?"IN":t.getStatus()); if (operation != null)     confirmation = getString(R.string.ttsJobIn); else     confirmation = getString(R.string.ttsClockIn); if(t!=null) {     if(status=="IN") {         status = "OUT";         in = "false";         if (operation != null)             confirmation = getString(R.string.ttsJobOut);         else             confirmation = getString(R.string.ttsClockOut);     } } db.addTimeclockEntry(new TimeclockEntry(Integer.valueOf(employee), now, status));   The variable "status" holds the text representation of the user status. All I'm doing in this logic is swapping, for an auto-timeout function (so IN becomes OUT and vice-versa). Here I am checking the value of status against "IN", and when true, I want to do swap values.   However, when status is equal to "IN", the code does not execute (I am verifying with the Eclipse debugger, I watch the value of status, it's "IN", I have breakpoints set everywhere and it completely skips the inside of the if statement).  I can't understand what is happening. I am going to try to attach images of the debugging process to show what happens when status is "IN", how it skips the if clause entirely.  What could be happening? I originally had -- if(t!=null && status=="IN") but noticed this behavior, so I split up the if statement, no help either way.  status check, debugging value  This image shows the value of status at the time of the if statement. Breakpoints are set all around it, and the code inside the if statement should execute (changing the value of status from "IN" to "OUT").    status check, impossible value  This image shows the (seemingly) impossible value of status at the line that the debugger jumps to (instead of going inside the if statement, it jumps down past the if statement). In this case t is not null and status is equal to "IN", so the code inside the if statement should change the value of status to "OUT", but it is still set to "IN" at the breakpoint.


How can I add all the texters that should be on the obj soldier model? When I want to add texture, my whole model stands out. Because of this, I can add only one texture. So, I threw a photo on where there are a lot of textures, how to add them?  I can’t find the answer, I’ve been suffering for several days.  /LGhYb.jpg


I don't know what to do about my generic array. I keep getting this error     Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Comparable;   the error is related to this bit of code  T[] a = (T[]) new Object[temp];   My class extends comparable, and I don't know why I keep getting this error. Any hints on how to fix this will be greatly appreciated. Here is the code.   public void balance()  {   int temp = size();   int low = temp -(temp - 1);   T[] a = (T[]) new Object[temp];   reset(INORDER);   for (int i =0;i<temp; i++)  {      a[i]= getNext(INORDER);       root = null;      insertRec( a, 0 ,temp-1);      add((T) a [i]);   } }   I don't have any issues with the rest of the code, but thought it would be helpful to see the whole method. This is part of a much larger class that manipulates Binary search trees, this method is supposed to balance the tree.


I get the error:       ! Undefined control sequence.<recently read> \c@lor@to@ps }   when trying the following graph  \documentclass[11pt]{article} \usepackage[usenames,dvipsnames]{pstricks} \usepackage{epsfig} \usepackage{pst-grad} % For gradients \usepackage{pst-plot} % For axes \usepackage{mathtext}  \begin{document}  \psscalebox{1.0 1.0} % Change this value to rescale the drawing. { \begin{pspicture}(0,-2.4101124)(5.36,2.4101124) \psline[linecolor=black, linewidth=0.04, arrowsize=0.05291666666666667cm     2.0,arrowlength=1.4,arrowinset=0.0]{->}(0.8,-2.3398876)(0.8,2.4601123) \psline[linecolor=black, linewidth=0.04, arrowsize=0.05291666666666667cm                 2.0,arrowlength=1.4,arrowinset=0.0]{->}(0.4,-1.9398876)(5.2,-1.9398876) \psline[linecolor=red, linewidth=0.04](1.2,-1.5398877)(4.8,2.0601122)(4.8,2.0601122) \rput[bl](0.0,2.0601122){\textcolor{red}{f(x)}} \rput[bl](5.2,-2.3398876){\textcolor{red}{x}} \end{pspicture} }  \end{document}   It should be something easy, but I'm not a pro. Please, help me!


I have recently started using LaTeX, to do my chemistry homework and I wish to display this but I have no idea on how to, is anyone able to help me


UK Tier 5 Youth Mobility Visa - "Refused entry at border" definition

I am a Canadian applying for a UK Tier 5 Youth Mobility Visa.  At one point during the application process, it asks if I have ever been denied entry into the UK, but I am not sure what to answer with.  A few months ago I was returning to the UK again after visiting it recently on a tourist visa. I was coming for the birthday of my friend and her son (their birthdays are close together).  Immigration was wondering why I was back again so soon and were a bit suspicious about my funds so they detained me for around 3-4 hours. They took my fingerprints and interviewed me. Afterwards they phoned my friend and after talking to her on the phone (she explained everything) they let me go through and enter the UK.  So in the end, they let me enter the UK.  So was I technically refused entry? Should I say that I was refused entry on my application? I'm afraid that it looks bad and might automatically get me denied, even though I was let through in the end.


Where have the Keyboard Layout Options gone in Ubuntu 13.10?

In Ubuntu 13.04 it was possible to disable the Caps Lock Key. It was also possible to make the key sequence Ctrl - Alt - Backspace to kill the X-server.  That was all done using System Settings -> Keyboard Layout -> Options.   Keyboard Layout in 13.04 is called Text Entry in 13.10. But the options are no longer available. Where have they gone?


An inequality with a load of variables: $ (1-a_1)(1-a_2)...(1-a_n) \ge 1/2$

It is known about numbers $$a_1, a_2, ... a_n$$ that $$a_1 + a_2 +...+a_n \le 1/2.$$ Prove that $$ (1-a_1)(1-a_2)...(1-a_n) \ge 1/2$$ I have tried using $a^2 \geq 0$, it led to nothing. How can I make my inequality look like in the possible duplicate?


How do I increase the resize margin on windows?

It takes me about 5 tries to resize a window on my computer.  Is there a way to increase the resize margin on the edge of windows?


Canada to India via Germany on Expired Canadian Visa

I am an Indian citizen living in Canada on work permit which expired on 31st May.   I have already applied for Work Permit extension but it is still in process and have not received yet.   I need to travel to India via Frankfurt/Munich.  Will there be any problem? Would a Transit Visa help?   Although my wife and I have valid US B1 visas, my daughter (4 yr old) does not have one.


Keep working with bash while a program is running

I know, this is a very stupid question and the answer is out there in Googleland. But I just can't find it.  I want to start a process/program (e.g. firefox) in bash and keep working with the terminal. Is there a way to do this?  Thanks in advance, Markus


Magic The Gathering: Indestructible vs damage and -1/-1 effect

If I give my 1/1 creatures +3/+3 in response to my opponent getting  out, then my opponent cast  and I give my creatures indestructible. Will my creatures live or will they die?


Assume $f$ is continuous over $[a,b]$ and $f$ has a local maximum value at every point in $(a,b)$. Show that $f$ is constant.   Intuitively it makes sense that the constant function should be the constant function, but maybe one strategy is to prove that it is a necessary and sufficient condition on $f$. In other words, $f$ is continuous over $[a,b]$ and $f$ has a local maximum value at every point in $(a,b)$ if and only if $f$ is constant. Alternatively we can think of it as such: at every point $A_i$ over $[a,b]$, there exists some interval $J_i$ such that $A_i$ is greater than or equal to every value in of $f$ in $J_i$.  I am unsure which route to take to solve this.


Solving $\lim_{x\to 0} \frac{e^x-1-x}{x^2}$ without L'Hôpital's Rule.

I want to solve this limit without the use of L'Hôpital's rule:  $$\lim_{x\to 0} \frac{e^x-1-x}{x^2}.$$


Background:  I'm working on an evaluator (I know there's solutions available, but I need some features that I need to implement myself). I need to find all occurrences of open brackets in the evaluation. However, for that I need all the indexes of the brackets.  Question:  Is there something like an AllIndexesOf method that returns a int[], or IEnumerable<int>?


Without header(stdio.h) file, how can the following code run?

How this following code can run without including header file for printf function?  int main(){ printf("%d",1); return 0;}


Let $R$ be a ring that satisfies ACC on the set of its left ideals and   $M$ be a finite generated $R$-module. Prove that every submodule of   $M$ is finitely generated.   I know that if $M$ satisfies ACC condition then every submodules of it are finite generated. I only want to show that $M$ satisfies ACC condition.  Help me some hints.  Thanks a lot.


I recently switched to Ubuntu and after I installed my NVidia driver package by using  sudo apt-get install nvidia-current I relaunched my pc and everything seemed fine in the login screen but after I logged in the only thing I could was moving my mouse around on my background  I tried following the  thread and I got to the ccsm menu and checked the Ubuntu unity plugin as described but my icons would not appear so I rebooted but I ended up with the same problem   I would appreciate if someone could find a solution to my problem.


In win7, when I want to restart computer via keyboard until my operating system hasn't been loaded yet, I press Ctrl+Alt+Del.  What is equivalent to this command in Ubuntu?  (Note that I'm not asking for Task manager).  I wish to restart it if, for example, I pressed F10 but BIOS didn't load successfully so I have to reboot it. I really don't like brute way (using physical shutdown button).


How to use the RdBu Colors with Colorbrewer Cycle with PGFplots?

I would like to use the color cycle function for my graphs. Currently I am just using cycle list name=exotic but I would like to change to the RdBu color set from the colorbrewer. \begin{axis}[      ybar, domain=0:1, cycle list name=exotic, every axis plot/.append style={no markers}, ylabel= NmCherry$^{+}$ Cells/mm$^{2}$, width=\textwidth, height=7cm, ymax=125, ymin=0, xmin=-0.5, xmax=7.5, xticklabels={A,B,C,D,E,F,G,H},xtick={0,1,2,3,4,5,6,7}, x tick label style={rotate=90}, legend style={at={(0.77,0.82)},anchor=west}]  \addplot+[error bars/.cd,     y dir=both,y explicit]  Thanks for the advice :)


Definition and delimitation of regression model

An embarrassingly simple question -- but it seems it has not been asked on Cross Validated before:   What is the definition of a regression model?    Also a support question,   What is not a regression model?   With regards to the latter, I am interested in tricky examples where the answer is not immediately obvious, e.g. ARIMA or GARCH.


TL;DR : default shell man page says there's vi editing mode, but set -o vi doesn't actually enable it  In many shells, including dash the POSIX standard dictates that set -o vi will enable vi editing mode, in which user of interactive shell can navigate line using vi-style of shortcuts. In dash ( Ubuntu's default shell symlinked to /bin/sh ) this doesn't work, even though man page specifies that this feature is available.  Example :  $ dash $ set -o vi $ hello wolrd^[I   What was supposed to happen there is that with Esc , Shift + i shortcut the cursor should have jumped to the beginning of the line. As you can see, I get a control character as output instead. I've asked a few users to test this in AskUbuntu Chat, and they confirmed the same behavior.   Note, that this is not related to terminal emulator - I tested it in 3 different ones: xterm, gnome-terminal, and terminator. I've tested this with other shells, bash, mksh and ksh93 - all work properly as expected, so this is dash-only issue.


Is there a way to double print a file in bash?

I'm new to Linux and programming. My problem is the following: I have a file listing 3 columns. I want to swap the first and the last column, print it to prompt AND to a new file in one line. So I swapped the columns and printed it to prompt OR to a file. $ awk -F, ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=,  liste.csv This is my base line to print it to prompt. But it seems impossible to print it to a new file in the same command line. Does anyone have the idea? Here are some examples that didn't work: $ awk -F, ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=,  liste.csv | >liste2.csv $ printf "$(sudo awk -F, ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=,  liste.csv > liste2.csv)"  $ cat $(sudo awk -F, ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=,  liste.csv > liste2.csv) I think you catch the drift of what I ask. Thanks!


What is the "Run Command" dialogue that comes up when you press Alt+F2?  Is it the same thing or in someway related to the menu that comes up when you press Alt from inside a application (like Firefox for example)?  What kinds of commands can you run inside it?  How similar is it to the ?   I use Ubuntu 14.04.


"At Amararaja Batteries Limited" vs. "in Amararaja Batteries Limited"

I have done my internship at Amararaja Batteries Limited.   I have done my internship in Amararaja Batteries Limited.       Which of the above sentences is correct? I want to know when to use at and when to use in.


WARNING DO NOT ATTEMPT TO RUN THIS ON A PRODUCTION MACHINE   In reading the  I generally follow what's going on with the following code:  :(){ :|:& };:   excerpt of description     The following fork bomb was presented as art in 2002;   its exact origin is unknown, but it existed on Usenet prior to 2002.   The bomb is executed by pasting the following 13 characters into a    shell such as  or . It operates by defining   a function called ':', which calls itself twice, once in the   foreground and once in the background.   However the last bit isn't entirely clear to me. I see the function definition:  :(){ ... }   But what else is going on?  Also do other shells such as ksh, csh, and tcsh also suffer the same fate of being able to construct something similar?


Can you restore log file backups to a mirror database after failure?

Purely a theoretical question as I've been considering possible DR scenarios...  In this scenario:   The link between a principle and a mirror server becomes unavailable for a period of time (e.g. network outage) Incremental log backups are still being taken during this time Then the principle database fails and is unrecoverable   Is it possible to restore the incremental log backups onto the mirror to bring it up to date and back online, or would you need to start from scratch with a restore of a full backup?  Depending on the size of the database the difference could be hours of downtime so it would be nice to know.  I'm predominantly interested in SQL Server 2008 R2 and 2012 but other people may be interested in other versions if there's a difference.


With no load on a circuit, I measure approx 15volts

I picked off 120v from an outlet (parallel) to power a dual switch that inturn will switch on a light and the other to switch on a bathrom fan using a 3/12 with grnd.  The circuit is connected through the dual switch by providing the black "hot" wire to the "com" terminal of the dual switch.  The other side of one switch will go to the light (wht) and the other side of the second switch will go to the fan (red) and all the grounds and nuetrals are continuously connected respectively.  The open wires are waiting to be connected to their respective fixture.  With my multimeter on the open wires I turn the switch on and I get 120volts but when I turn the switch off I get a 15volt reading.  Is this normal because I am reading through a switch that doesn't have a load on it?


I try to create an archive with tar using relative paths. I use the following command:  tar czf ~/files/wp/my-page-order.tar.gz -C ~/webapps/zers/wp-content/plugins/ ~/webapps/zers/wp-content/plugins/my-page-order   But the archived files still have absolute paths. How can I use tar with relative paths?


Can anyone tell me why rsync is no copying files from the source's subfolders?

I've been trying to use rsync to simply copy all my TIF image files from the current folder onto a 'HR' folder under 'Documents' with no success so far, by the following command:  rsync -r *.tif /home/myusername/Documents/HR   As I see it the -r option is the one used for recursive copying but said command only copies whatever TIF file there is on the current folder.  Could anyone please tell me where I went wrong with it?  Suffice to say,said current folder has lots of multilevel  subfolders containing hundreds of TIF files.


LaTeX Error: File `lastpage.sty' not found

I'm using a   I've converted the .tex file to a minimal example:  \documentclass[fleqn,10pt]{SelfArx}  \begin{document}  \subsection*{Results}  \end{document}   The file   When I compile the LaTeX code above, I get these errors:    How can I resolve this problem?


It seems that refcheck does not recognize references made by cleveref:  \documentclass{article} \usepackage{amsmath} \usepackage{cleveref} \usepackage{refcheck}  \begin{document} \begin{align}   a & = b \label{eq:a} \\   c & = d \label{eq:b} \end{align}  See~\eqref{eq:a}, \cref{eq:b}.  \begin{figure}   \caption{Figure 1}   \label{fig:a} \end{figure} \begin{figure}   \caption{Figure 2}   \label{fig:b} \end{figure}  See Figure~\ref{fig:a}, \cref{fig:b}.  \end{document}   Here, refcheck marks eq:b and fig:b as unreferenced.   Is there a way to make the two packages work together? Alternatively, are there replacement packages that do work better? If the answer to 1) is yes, can this even be achieved for \crefrange?


Example of a function whose Fourier Series fails to converge at One point

Can one think of an example of a continuous $2\pi$ periodic function whose Fourier series fails to converge on $\mathbb{R}$.  I referred this in the wikipedia page but no avail: It might be interesting to note that Jean-Pierre Kahane and Yitzhak Katznelson proved that for any given set E of measure zero, there exists a continuous function ƒ such that the Fourier series of ƒ fails to converge on any point of E.


Why isn't the entropy of gas infinite if there are infinite microstates available?

How could it be that the entropy of gas is not infinite?  If we use the formula $S=k\ln(\Omega)$ we get infinity because there are an infinite number of possible situations (because there are infinite possibilities of position and momentum for each molecule).


Let $\lbrace \tau_n:n\in \mathbb{N}\rbrace$ be an ascending chain of topologies on a nonempty set $X$. Then is $\bigcup\limits^{\infty}_{n=0}\tau_n$ a topology on $X$?   I have a strong notion that it may not be a topology. But I am not getting the proper counter example. Please help. I know this must be a topology if the collection is finite.


For bash script, I can use "$@" to access arguments. What's the equivalent when I use an alias?


Python conditional operator 'if else' not equal 'and or'

I think below two function result will be same, but it is not.  def fib2(n):   return n and n < 2 or fib2(n-1) + fib2(n-2)  def fib3(m):   return m if m < 2 else fib3(m-1) + fib3(m-2)   When argument value is 4, fib2's output is 7, fib3's output is 3. Why this situation happen? I don't know about this. My Python version is 2.7.9 and os is osX 10.11.1


For $0 < x < \pi/2 $, prove that $x + \frac{x^{3}}{3} <\tan x $

I proved as follows:  Let $f(x) = \tan x -  x - \frac{x^{3}}{3}.$ Then $f '(x) = \sec^{2}x - 1 - x^{2}$ and $f''(x) = 2\sec^{2}x\tan x-x > \tan x - x,$ since $\\tan x > x,$ $f''(x) > 0$ so $f'(x)$ is increasing. Since $f '(0) = 0,$ $f '(x) > 0$ for all $x \in (0, \frac{\pi}{2}).$ So $f(x)$ is increasing. since $f(0) = 0,$ $f(x) > 0$ for all $x \in (0, \frac{\pi}{2}).$  But my proof seems complex. Is there any simpler way to prove this?


I'm not versed in Linux, but my father-in-law gave me Ubuntu 10.10 on a USB, because my Hardrive had failed and I put in a new one. I ran Ubuntu from the USB for a while and decided that I would give it a try and installed it onto my brand new empty hardrive. I now see that I really need to upgrade to a newer version. I thought that I could use the Update Manager and just work my way up the version, but upgrading to 11.04 fails with the message "Failed to fetch, this may be a network problem".   I can download 12.04 and 13.04, but all I get are .iso files. What do I do with them?   Running Wubi.exe doesn't work. I've searched here and can't seem to find an answer which addresses my issue, or at least one written in a way I can understand. Please bear with my inexperience with Linux.    UPDATE: So with further research I have found this:  As a release gets old (especially if it is not a LTS release), it becomes no longer   hosted at archive.ubuntu.com. However, the repository is still hosted at    So try changing your repository source to .  This is great, but I'm now having difficulty finding somewhere that describes "Changing your repository" for a layman. I have found these:  help.ubuntu.com/community/Repositories/Ubuntu  help.ubuntu.com/community/Repositories/CommandLine  But I can't seem to follow how to add the "old releases" url to the repository.


Is the global section ring of a Noetherian Scheme Noetherian as well?

As the title suggests, I am asked to prove that, given a Noetherian scheme $(X,\ \mathcal{O}_{X})$ and any open subset $U\subseteq X$, $\Gamma(U,\ \mathcal{O}_{X}):=\mathcal{O}_{X}(U)$ is a Noetherian ring.  Up to now, I have been able to show that the result is true if $U$ is an affine open subset of $X$, i.e. $U\simeq\mathrm{Spec}(A)$ for some ring $A$ (and this is actually true when $X$ is just locally Noetherian). I have also shown that, given $U$ as above, $(U, \mathcal{O}_{X\vert U})$ is a Noetherian scheme as well, which should then allow me to reduce the problem to the case $U=X$. So, when all is said and done, I should try to prove that the ring $\mathcal{O}_{X}(X)$ is Noetherian. However, I can not go any further and I am stuck here.  Any help or suggestion would be grately appreciated.  Thank you.


Why does echoing $? vary differently when running in this script?

I have the following in my script:  connectionTest=$(sshpass -p "${pass}" ssh -q -o ConnectTimeout=5 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "${remoteUser}"@"${IP}" "echo quit | netcat -w 5 local.server.local ${telnetPort}; echo $?")   When I take the command out and run it manually on the machine, I get the exit code I'm expecting. However, whenever the script runs, the resulting exit code is always 0.  Why would the exit code always return as 0?


How to get own process pid from the command prompt in Windows

I'm trying to find a way to get my own PID from a command prompt (for later use in bat scripts).  So far the only useful way I found was to use getpids.exe from here : , but I'm looking for a command that's "built in" to Windows.  I'm looking for a "bullet proof" way. No assumptions about my process being the only cmd.exe or anything.


Can an aluminized blanket hide a person from thermal cameras?

Well, if the person is wrapped tightly I expect the answer is "no", but could an aluminized loose "cloak" hide a person from thermal imaging cameras by reflecting the cold surroundings? Or, if the blanket is used as a hide (impromptu tent) with a person inside, would that work?


proof that (2,4) is the only natural solution to $x^y=y^x$.

I want to prove that $(2,4)$ is the only natural solution to $x^y=y^x$. I tried to prove by defining $d=\gcd(x,y), x=d*s,  y=d*r$ for some $s$, $r$. Using some algebra, I got that s must be equal to 1. I don't know how to continue from here.    My steps: ${ds}^{dr}={dr}^{ds} ->$ $d^rs^r=d^sr^s ->$ $d^{r-s}s^r=r^s ->$ there for $s|r^s$, and because $\gcd(s,r^s)=1$ must be $s=1$.


How to change image quality in a pdfTeX output and keep hyperlinks?

I am trying to get a small PDF output from pdftex.  From  I found the useful command  gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf big.pdf   that allows me to set the image resolution for the PDF. But this command removes all the document hyperlinks generated by \cite and \ref in LaTeX.  So, how can I decrease the PDF size but keep the hypertext information?


How to rotate all images in a directory with imagemagick?

I want to rotate all the images in a directory that match a pattern.  So far I have:  for file in `ls /tmp/p/DSC*.JPG`; do   convert $file -rotate 90 file+'_rotated'.JPG done   but that gives no output?


Could anyone tell me why my code is producing an error?

I have a Huffman Tree, and a character, and I want to return what that character's encoding within the Huffman Tree should be.  I've implemented it using the breadth-first traversal method, and each time I'm checking the left and right tree, I'm checking if the tree's data is equal to character I'm looking for. Each time I go right or left, though, I add 0 or 1 to the encoding so far. Eventually, when I find the character equal to the tree's data, I return that tree's encoding value.  Code:      public static String findCharEncoding(BinaryTree<CharProfile> bTree, char character) {         Queue<BinaryTree<CharProfile>> treeQueue = new LinkedList<BinaryTree<CharProfile>>();          // Create a TreeWithEncoding object from the given arguments and add it to the queue         treeQueue.add(bTree);          while (!treeQueue.isEmpty()) {             BinaryTree<CharProfile> t = treeQueue.remove();  ->          if (t.getLeft().getData().getCharacter() == character) {                 return t.getLeft().getData().getEncoding();             }             if (t.getLeft() != null) {                 t.getLeft().getData().setEncoding(t.getLeft().getData().getEncoding() + "0");                 treeQueue.add(t.getLeft());             }              if (t.getRight().getData().getCharacter() == character) {                 return t.getRight().getData().getEncoding();             }             if (t.getRight() != null) {                 t.getRight().getData().setEncoding(t.getRight().getData().getEncoding() + "1");                 treeQueue.add(t.getRight());             }         }          // If it gets to here, the while loop was unsuccessful in finding the encoding         System.out.println("Unable to find.");         return "-1";     }   Which I've implemented as follows:          for (int i = 0; i < charOccurrences.size(); i++) {             char character = charOccurrences.get(i).getCharacter();              charOccurrences.get(i).setEncoding(findCharEncoding(huffmanTree, character));             System.out.println(charOccurrences.get(i).getEncoding());         }   CharProfile is a custom class that holds the character value, the probability of the character and the encoding.  It keeps returning a NullPointerExceptionError at the line if (t.getLeft().getData().getCharacter() == character) {, which I've indicated with an arrow. I've tried and tried, but I can't seem to figure out why.


How to change the word size of "list of table"?

I use below code,  \listofrequirement  \listoftables   but the output is like this, the size of  "list of tables" is too big, how to make it smaller like the size of "list of requirements"?


Is quantized spacetime more like a chessboard or a matrix of lights? I have heard two analogies, the light bulb one appears to allow for movement whilst the chess piece one seems to violate zenos paradox. Whilst is a better example?


Why should I be installing my applications in the /opt location?

I don't quite understand why /opt is recommended for 3rd-party software. I have to use sudo when I run my programs from /opt via the command line. Doesn't that provide a security risk since sudo allows the program to run as super user?  I am also having trouble adding a .desktop file to a program in /opt. For example if I have a .jar file in opt I have to run it with sudo java -jar name.jar to run the java program, but sudo & gksudo do not seem to work when in a .desktop file, so I can't execute the program from my launch menu without going through the command line.  Where should untrusted software be installed?  Where should applications that need a .desktop be installed?  Is there a way to make .desktop files run the application in /opt?


How to make excel file password-protected in apex?

I have visualforce page which is downloaded as .xls file using contentType="application/vnd.ms-excel#excelFile.xls". I want to make this file as password protected. Is there any way to make excel file password-protected?


how to call subclass function of interface at runtime?

I have an interface which is implemented by 4 different classes. Now, I want to call a setter method of one of the classes through the reference of this interface. The class is decided at run time, and the interface doesn't contain any methods or variables. So how can I set the value of private variables of one of those classes? I provide you the sample of code.  public interface InterfaceClass { }  public class ClassOne implements InterfaceClass{     private String name;      public void setName(String name) {         this.name = name;     } }  public class ClassTwo implements InterfaceClass {     private String name;      public void setName(String name) {         this.name = name;     } }  class CaalingClass {     String className = "ClassOne";// the value of the string is decide at the run time     InterfaceClass i = (InterfaceClass) Class.forName(className).newInstance();     i.setName("ABC"); //this gives an error     /*      * I know it should be ((ClassOne) i).setName("ABC"); but at runtime i      * don know which class is to be called so is there any other way to      * find or it has to be done in this fashion?      */ }


Is there a command that will deny anyone else to edit the directory I created? They also have admin rights, but I only want to let them read the file not able to edit/delete it. I know chmod commands, but that provides the permission only and anyone with root privilege can still make the changes.


Share external hard drive between two Ubuntu computers

This is my third attempt to do a simple share of an external hard drive between two Ubuntu 18 computers. I have worked with half a dozen help documents on the web and none of them worked and they all had different instructions.   I would prefer to use the samba GUI and the option to right click on a folder and share it but even with samba users set I get nothing. Setting the share to allow all users does nothing.   I have uninstalled and reinstalled samba to get a clean version. The only thing that has happened so far is that the shares are visible on the second computer but get an error that it cannot log on to windows share.  Is there a tutorial available?


What is this message icon in the lower right in Destiny 2?

This icon has just been constantly flashing at me since I got to the Farm. I checked with the post bot, checked for friend invites or messages, Bnet message, nothing!  Any ideas?


Is it possible to install an Ubuntu One server in my personal data center, so that all the work that is done will not be lost?


Can't delete or take permission of a eyfmunxx.sys In drivers folder

I have been hit by a virus, i noticed the virus infection during the setup of infectious scam app. It installed so many other apps and registry keys, the usual viral changes.  i was able to clean my pc so far, but there's one file left in the system32/drivers folder ... eyfmunxx.sys file  i can't find the corresponding service in the list of services, and i suspect it's the reasonthat trustedinstaller is being invoked after everytime i clean my pc and somehow without even internet access, two viral processes "winsrv.exe" and "winxsrv.exe" are recreated in my windows folder...   Anyway, i think that's the only thing left if i remove this .sys file i'll be able to completely remove this infection. The problem is, for this particular file, i'm not even able to take ownership of it. Everything is access denied, from copying it, renaming it, deleting it of course... as well as trying to view permissions or change permission to the extent of not being able to take ownership.  I mean how can such a file get so much priority in my windows? Or is it cheating locking resources or something like interrupting intentionally to disallow any way for windows to deal with it?  I still have two other solutions, system restore, or get some other booting system and connect to the harddisk and delete while windows is down.  I'm asking here maybe there's another solution, coz usually this type of virus might corrupt/infect system restore.  I tried unlocker, didn't help, it doesn't show any open handle on it.  Any ideas?


Loading addins when Excel is instantiated programmatically

I am trying to create a new instance of Excel using VBA using:  Set XlApp = New Excel.Application   The problem is that this new instance of Excel doesn't load all the addins that load when I open Excel normally...Is there anything in the Excel Application object for loading in all the user-specified addins?  I'm not trying to load a specific add-in, but rather make the new Excel application behave as though the user opened it themself, so I'm really looking for a list of all the user-selected add-ins that usually load when opening Excel.


Centering images and overprint in Beamer

I'm trying to create a beamer presentation with several images replacing each other on consecutive slides. I've gotten it to work with overprint and \onslide, but cannot get the images centered on the slide.  \begin{center}   \begin{overprint}     \onslide<2>\includegraphics[scale=0.3]{images/stack1.pdf}         \onslide<3>\includegraphics[scale=0.3]{images/stack2.pdf}     \onslide<4>\includegraphics[scale=0.3]{images/stack3.pdf}     \onslide<5>\includegraphics[scale=0.3]{images/stack4.pdf}     \onslide<6>\includegraphics[scale=0.3]{images/stack5.pdf}     \onslide<7>\includegraphics[scale=0.3]{images/stack6.pdf}     \onslide<8>\includegraphics[scale=0.3]{images/stack7.pdf}   \end{overprint} \end{center}   Anything outside of the overprint environment gets properly centered, but not the images themselves.


ARM Cortex M software update via bootloader

I wish to update the software running on a node having a ARM Cortex M4 MCU.  to do so, I understand I will have to run a bootloader in my TI  that can receive a binary file over-the-air and program certain section of flash. I understand the functionality of receiving binary file over-the-air will have to be added to this bootloader.  This sounds all correct but I do not understand how this can be achieved. How is it possible that I program parts of the flash in the MCU by the same MCU itself?   Do I need additional hardware to do update software running on my node? All I want to do it to update the software running on my node over-the-air. A bin fine can be downloaded over HSDPA. For easy testing I can do this over Ethernet.   I would so much appreciate if someone can elaborate how this process is done in a more detailed format  for me to understand the procedure. Thank you very much.


What's the best way to return multiple values from a function?

I have a function where I need to do something to a string.  I need the function to return a boolean indicating whether or not the operation succeeded, and I also need to return the modified string.    In C#, I would use an out parameter for the string, but there is no equivalent in Python.  I'm still very new to Python and the only thing I can think of is to return a tuple with the boolean and modified string.  Related question: