I am trying to upload shapefile polygons onto my Garmin 60Cx GPS.  I use the Trace tool and load shapefiles via Minnesota DNR's application.  There are almost always gaps in the shapefile on the GPS, making lines and the shapefile hard to read.  Oddly enough, these gaps are often where I have not lifted the mouse/clicked anything to offset the trace tool.    Is there something that I am doing wrong?

I have a roads shapefile layer in ArcMap and I want to be able to view it on my Garmin64st. Ideally, it would be overlaid on a basemap so I would always be able to see it. It seems like that means I need to convert my .shp file to .img.   I'm finding various programs that claim to help with some step of this, but some of them are really expensive, and none of the free ones I've tried have gotten me to .img so far. I did download an ArcGIS Toolbox which converts .shp to .gpx, but I haven't been able to find a way to convert that to .img for free yet.   Am I missing something?   Does anyone know a simple and free way to convert a .shp to be viewed in a Garmin GPS like I've described?   If I absolutely must purchase a program, do you know of one that works?


String obj1 = new String("abc");     String obj2 = new String("abc");      if(obj1.hashCode() == obj2.hashCode())         System.out.println("hashcode()");       if(obj1==obj2))         System.out.println("==");     it prints hashcode() ,but why it does not print == as hashcode of both objects are same ?  having  same hashcode doesn't mean references are pointing to same object?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


What is that I am doing wrong with the below query   Error Message :  You can't specify target table 'cp_asseteventinquiry' for update in FROM clause   Query :  UPDATE cp_asseteventinquiry SET Due_Date= curdate() WHERE TopLevelAsset_Num = (    SELECT Distinct(TopLevelAsset_Num) FROM cp_asseteventinquiry    WHERE cp_asseteventinquiry.History='NO'    AND NOT EXISTS(SELECT Scheduled_Date FROM flightlogs    WHERE flightlogs.Asset=cp_asseteventinquiry.TopLevelAsset_Num     AND flightlogs.Scheduled_Date=date_format (curdate(), '%m/%d/%Y')) );

I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this?


<?php     var_dump($isHoster); // prints int(0)      if ($isHoster == 'all')         $conditionsHoster = '0, 1';     else         $conditionsHoster = intval($isHoster);      var_dump($conditionsHoster); // prints string(4) "0, 1" ?>   What is going on?? Who can explain that? This never happened to me...

What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?


Why are we using anything like wp_enqueue_script at all? or register, etc.  Why are we sending Javascript through the PHP subsystem?  There are all kinds of incompatibilities and inconsistencies across front-end systems, and these are hard enough to troubleshoot without WP getting in the way.  So why are we mixing the controller with the view?  What's the model, here?

Is there any real benefit to using wp_enqueue_script on small self-managed sites? For instance, Modernizr, why enqueue it through a function rather than call it directly inside the document head?  I can see the benefit on large sites, where you may move around directories or have multiple people mucking around in the files, or in a publicly available theme with numerous unknowns, but what's the benefit on a small site like a personal blog that never - or rarely - changes and has a single user? It just seems like extra lines of code in that case.


Given a function $g(x)$ which has a derivative $g'(x)$ for all $x$ satisfying    $g'(0) = 2$ and    $$ g(x+y) = e^x g(y) + e^y g(x) $$ for all $x \in \mathbb{R}$. How to show that    $$ g'(x) + g(x) - 2e^x = 0\ ? $$

Given a function $g$ which has derivative $g'$ for all x $\in {R}$ and satisfying $g'(0)=2$ and $g(x+y)=e^yg(x)+e^xg(y)$ for all $x,y\in {R}$ Show that $g'(x)+g(x)-2e^x=0$  $\dfrac{g(x+y)}{e^{x+y}}=\dfrac{g(x)}{e^{x}}+\dfrac{g(y)}{e^{y}}$ Putting $x=0$, $g'(y)=2e^y+g(x)$ Also putting $y=0$,we get, $0=e^xg(0)\implies g(0)=0$ I had a strong hunch that $g(x)=e^x-e^{-x}$ but it does not satisfy $g(x+y)=e^yg(x)+e^xg(y)$ Please help.


Is the uncertainty principle a technical difficulty in measurement or is it an intrinsic concept in quantum mechanics irrelevant of any measurement?  Everyone knows the thought experiment of measuring the position of an electron. One can detect electron's position by hitting it with a photon, due to Compton scattering the collision of the photon with electron will change electron's momentum. This experiment is used to explain uncertainty principle to layman, but it is over simplified, isn't it? It also gives an impression that if there was a better suited experimental method the uncertainty principle becomes irrelevant.   I personally think it is intrinsic as it arises from the non-zero commutator of position and momentum operators irrespective of the measurement process. Am I right?  EDIT: My question is similar to certain extent to  and . The answers there are nice but they focus on explaining basics of quantum mechanics more than they comment on the technical difficulty part. In the answers of question 2 there are statements like "So, it's not a knowledge limit" and "you're sort of correct when you say it's an observational limit" without further comments  To summarize, assume hypothetically we managed to find a way in the future where we can have a look at an electron without disturbing it by measurement or causing its wave function to collapse, would the uncertainty principle still hold in such a case?? Why/Why not?

I ask this question because I have read two different quotes on the  that don't seem to match very well. There are similar questions around here but I would like an explanation that reconciles these two interpretations specifically:   Feynman talks about the uncertainty principle in one of his lectures and mentions it as the reason why electrons don't crash into the atom's nucleus: If they did they would have an exact location and momentum which is not allowed by the uncertainty principle. In saying this it is clear that the uncertainty principle is a fundamental property of nature because it has an effect on where an electron can reside. Recently I read - somewhere else but I forgot where exactly - an account of the uncertainty principle where there was explained how we can measure position of a particle by firing another particle into it, the collision disturbs the velocity of the observed particle therefore we can not know its momentum anymore.   Now, 2) very much seems like a limitation of what the observer can know, while 1) attributes a fundamental property of nature to it (electrons don't crash into the nucleus). What is the correct way to think about this?


I would like to alter the link displayed on the language switcher for the second language of my site, for a certain node. Essentially when you viewing a certain node in the main language, and then use the language switcher to view the secondary language, I want the language switcher to serve a different link from the one that links to the translation of the node on the main language. (The design of this node is different from the one on the main language, so just translating the node won't help in this case)  I've tried both  MYTHEME_preprocess_links__language_block(&$variables) and MYMODULE_language_switch_links_alter(array &$links, $type, \Drupal\Core\Url $url) but in both cases either the variable I was interested was protected or private or I couldn't get any interesting variables to work with.  Is it allowed to use these hooks above for what I'm after, or it needs to be a more hacky way?

I am looking to modify the default output of Drupal 8 of links in a certain situation, the language switcher. Ideally I want to be able to do that in a twig template and not have to produce a  that overwwrites that whole link generation system and add a BIG if for the cases I need to overwrite.  I think the output layout should be controllable in the twig template similar to  (this answer outputs the same url for every languages)  I am using bootstrap as a base theme so i'd like to use the bootstrap markup for my links (btn btn-primary, dropdown)  Here is my code I am trying to make links--language-block.html.twig  {%- if links|length == 2 -%}     {# show only alternate language button #}     {%- for key, item in links -%}         {%- if not item.attributes['#options']['set_active_class'] -%} {# <--- this is always true!? #}             {{ item.link['#title'] }} {# #url is always the same what ever the language it is pointing to! #}         {%- endif -%}     {%- endfor -%} {%- elseif links|length > 2  -%}     {# show selected language in button and other languages in drop down #}     <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{ selectedLanguage }}</button>
         {% for key, item in links %}             {%- if not item.attributes['#options']['set_active_class'] -%} {# <--- this is always true!? #}
{{ item.link['#title'] }}
             {% endif %}         {% endfor %}
 {%- endif -%}   Anyone has an idea on how to do this?


I am wondering how can We pluralize the abbreviation "TS" (Training Sequence)? Is it " TSes" or "TS's", I think It can't be "TSs"

Possible Duplicate:          I was answering something on Super User and wrote OSes as part of my normal flow without really thinking about it. On a re-read I decided that it didn't look right, so I changed it to OSs, which still felt incorrect. I also considered OS's, but that didn't feel right either, so I thought I'd ask on here.  In this specific case, what is the written plural form for OS? The intention is to mean multiple Operating Systems.  And, is there a general rule for the plural form of an initialism that ends with the letter S?


I ask whether there is a counter example to the following statement:  Let G be a finite group. All the subgroups of G are normal if and only if G is cyclic.  Alternatively, if this is thought to be a true statement, a proof.

This is , I think an easy problem just that I am not getting the catch of it. How to show whether or not the statement is true?  All subgroups of a group are normal$\implies$ the group is an abelian group?  I have been able to show the other way round.


Say I'm a non-admin user who wants to put an executable somewhere in his path so that he can run it like a regular program.  What is the "proper" accepted location for that path? is it ~/bin? ~/.local/bin? Elsewhere?

I have an executable for the perforce version control client (p4). I can't place it in /opt/local because I don't have root privileges. Is there a standard location where it needs to be placed under $HOME?  Does the File System Hierarchy have a convention that says that local executables/binaries need to be placed in $HOME/bin?  I couldn't find such a convention mentioned on the .  Also, if there indeed is a convention, would I have to explicitly include the path to the $HOME/bin directory or whatever the location of the bin directory is?


I'm stuck on this question:     user inputs a word, program outputs the unicode of each letter in the word   this is how the input statement would look:  word = input("Enter a word: ")   Supposing the user enters the word "Cat", the output would look like this:  C: 67 a: 97 t: 116

How do I get the  value of a character as an int in ?


Can anyone clarify how to capture a photo as shown below?    Is there any specific settings in camera, or is it done via post-processing using Photoshop or any other photo editing software?  I own Nikon D5100, 18-55mm lens kit. Is it possible to capture a photo as shown above? If so, please share me the settings I need to use. Thanks.

I'd like to create one of those "stacked" action shot images where multiple exposures are combined to show the subject moving across a static background.   (by ):   Ideally, I'd like tips both for the photography part of this and for post-processing.  For example, I'd imagine I want to shoot manual w/ the same exposure for all shots (as with a panorama), but I'm not sure if there are any other helpful tips for taking the shots.  At one point, for example, I thought I'd have to tripod-mount the camera and keep the same framing for all shots, but I've now seen several examples where the composition moved from shot-to-shot.  I'm also interested in recommendations for post-processing -- software, technique, etc.  I can envision a manual process where I stack layers and align them by hand in Photoshop Express, but I'd be surprised if there wasn't a better way — maybe using a pano tool like Hugin.


I've got an error while trying to add the R cran mirror for Switzerland to the sources.list file (), even though I followed the instructions from page  (I'm running Ubuntu 13.04) I really can't find what I'm doing wrong... here are my steps:   sudo gedit /etc/apt/sources.list   then, in the source.list file, I added a line like that, at the very end:  #R repositories switzerland  http://stat.ethz.ch/CRAN/bin/linux/ubuntu raring/     then, save and exit and the error appears when typing the sudo apt-get update command:   sudo apt-get update  E: Type 'http://stat.ethz.ch/CRAN/bin/linux/ubuntu' is not known on line 60 in source list /etc/apt/sources.list E: The list of sources could not be read.       why?   Thank you for your answers!

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


I think I understand how induction works, but I wasn't able to justify all the steps necessary to prove this proposition: $(1+x)^n≥1+nx, ∀x>-1, ∀n∈N$  One thing that confuses me is that I don't know whether I should use induction with both x and n. I didn't pay attention to the x and I still couldn't justify all the steps.  Thanks.

I'm asked to used induction to prove Bernoulli's Inequality: If $1+x>0$, then $(1+x)^n\geq 1+nx$ for all $n\in\mathbb{N}$. This what I have so far:  Let $n=1$. Then $1+x\geq 1+x$. This is true. Now assume that the proposed inequality holds for some arbitrary $k$, namely that $$1+x>0\implies (1+x)^k\geq 1+kx,~\forall~k\in\mathbb{N}\setminus\{1\}$$ is true. We want to show that the proposed inequality holds for $k+1$. Thus multiplication of $(1+x)$ on each side of the above inequality produces the following result: $$(1+x)(1+x)^k\geq (1+kx)(1+x)\implies (1+x)^{k+1}\geq 1+x+kx+kx^2\cdots\cdots\cdots$$  I'm not sure where to go from here.


Is it okay to start a sentence with "Following"? For example: "Following is an example of a carnivorous animal:" Also, should I start the sentence from "The following" or simply "Following" works?

I wrote      "Following examples show ..."   and my colleague revised it as      "The following examples show ..."   Why do we need "the" here even though the examples have not been mentioned before?


From a philosophical standpoint, $0!=1$ as it is possible to arrange nothing in one way--there isn't.  Are there any rigorous proofs showing this concept?

How can I prove  from first principles that $0!$ is equal to $1$?


I know there are ways to do case ignore comparison that involve iterating through strings or one  on SO needs another library. I need to put this on other computers that might not have it installed. Is there a way to use the standard libraries to do this? Right now I am just doing...  if (foo == "Bar" || foo == "bar") { cout << "foo is bar" << endl; }  else if (foo == "Stack Overflow" || foo == "stack Overflow" || foo == "Stack overflow" || foo == "etc.") { cout << "I am too lazy to do the whole thing..." << endl; }   This could drastically improve the readability and usability of my code. Thanks for reading this far.

What is the best way of doing case-insensitive string comparison in C++ without transforming a string to all uppercase or all lowercase?  Please indicate whether the methods are Unicode-friendly and how portable they are.


int main(int argc, char **argv) {}    Is it possible that argc equals 0? Must argv[0] be the executable file's name? Is there any standard for these issues?

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


I am trying to model credit risk for retail loans, with my dependent variable being a default flag. I have 15 independent factors, which I need to cut down, using principal component analysis. While I have conducted PCA, I am not really sure as to how do I identify the final variables based on the principal factors generated. The PCA output results in generation of 7 principal factors, as also component matrix containing the Coefficient of Principal Component Score of Variables. Can I group the variables having high correlation for each of the principal factors and use these for regression (say log regression)? If the preceding statement is correct, how do I identify the most relevant variable within each group that I can further shortlist for regression.    Edit: Thanks for the prompt revert guys, really appreciate it. Let me state some more details I am actually working with a very large number of variables (92 to be precise) and hence using a correlation matrix may be very tedious. I essentially what to find out which variables have similar corelation to default and hence select one of these, from various groups of related variables. And in turn, use the most suitable set of original variables (not factors of variables) for log regression. Is there an alternative approach to achieve the same, if not PCA.  @amoeba: I not trying to use the original variables here, while the similar thread you shared does not really answer what I am asking.

I'm new to feature selection and I was wondering how you would use PCA to perform feature selection. Does PCA compute a relative score for each input variable that you can use to filter out noninformative input variables? Basically, I want to be able to order the original features in the data by variance or amount of information contained.


I want to start a script, which set the system time automatically after booting. I wrote the command date -s "12/31/12 23:59" in rc.d/rc.local. That didn't work. How to solve that?

I would like to run the simple shell command echo 1 > /proc/sys/kernel/sysrq at each boot, to enable the sysrq keys. When in boot should this be done, and where should I put a script to do it?


I have heard these two terms the most, whenever people talk about Android OS. One of them is Rooting or root access, and the other one is unlocking the Boot Loader. Are these two terms exactly the same ? If not, kindly let me know the differences. P.S I am a beginner to android, and already searched a lot on the google, but could not come to a conclusion. A specific answer would be really helpful. Thanks in advance.

What is the difference between:   Unlocking the bootloader (prerequisite for doing many, though not all, other things below) Rooting Jailbreaking ROM NAND and Nandroid Operating System Mod (e.g. CyanogenMod) Recovery (ClockworkMod, Amon Ra) Custom Kernel (e.g. LeshaK's kernel) Firmware Driver Over The Air (OTA) update Fastboot SIM unlocking Flashing SPL (Second Program Loader)   (any other often-confused terms that I've missed?)


In QGIS, Can we render a layer's label as HTML to be able to style label partially?  For example, a feature's label including two attribute, an attribute will render bold while the other one will render italic.  Maybe something like; bold("an_attr") || italic("another_attr")

I have concatenate the values of two field like  "BYKV_BTYP"  || '/' ||  "FFH"   Is it possible to draw the value of the column  "FFH" in italic if it is not empty and the value of "BYKV_BTYP"  normal? Such as  G212-6510


I have a list of objects of a class with a string "name". I need to create a new string array of all "name" values of the objects in the list. Is that possible using linq? Can I also filter our some of the objects in the list by a different string variable of the class? As in getting an array of the values of 'name' where 'category'="something". public class druhPrace     {         public string category;         public string name;         public double workPrice;          public druhPrace(string category, string name, double workPrice)         {                      //...         }     } }

I'm trying to use Linq to return a list of ids given a list of objects where the id is a property. I'd like to be able to do this without looping through each object and pulling out the unique ids that I find.  I have a list of objects of type MyClass and one of the properties of this class is an ID.  public class MyClass {   public int ID { get; set; } }   What I want to do is write a Linq query to return me a list of those Ids  How do I do that given an IList<MyClass> such that it returns an IEnumerable<int> of the ids?  I'm sure it must be possible to do it in one or two lines using Linq rather than looping through each item in the MyClass list and adding the unique values into a list.  Any help in creating an elegant solution would be much appreciated!


According to this Wikipedia article:  there is more than a dozen command-line interpreters.  Which one is most efficient in a term of performance. Why should I use something else then standard bash?  I am not asking about  as I cannot find nothing about performance there.  I am simply asking if you run same code (if it's compatible) with different Shell interpreter on the same hardware, would it be some difference in performance?

What are the fundamental differences between the mainstream *NIX shells and what scenarios might prompt you to use one over the other?  I understand that some of it probably comes down to user preference but I've only ever used Bash and I'm interested to hear where another shell might be useful. Also, is there an impact on user-written shell scripts when running under one shell or another or is it simply a matter of changing the shell at the top of the file?  My instinct says it's not that easy.


Perhaps not the most cardinal question on this site, but:   The Debian project has been  release names which are characters from the Pixar animation film 'Toy Story'. But - they're about to run out of characters soon. What will they use afterwards? I'm curious.

I've got a few, quite silly, non-technical questions about giving  to  releases.  Each Debian release has its unique codename, which is (so far) a characters' name from  movies by .  Here is list of all assigned codenames so far:   release 1.1 is  (Buzz Lightyear) - the spaceman, release 1.2 is  - the tyrannosaurus, release 1.3.x is  (Bo Peep) - the girl who took care of the sheep, release 2.0 is  - the piggy bank, release 2.1 is  (Slinky Dog) - the toy dog, release 2.2 is  - Mr. Potato, release 3.0 is  -  the cowboy, release 3.1 is  - the sergeant of the Green Plastic Army Men, release 4.0 is  - the toy blackboard (Etch-a-Sketch), release 5.0 is  - the toy binoculars, release 6.0 is  - the name for the three-eyed aliens, release 7.0 is  - the name of the rubber toy penguin with a red bow tie, release 8.0 is  - the name of the yodelling cowgirl, release 9.0 is  - a purple rubbery octopus toy at , release 10.0 is  - 's pet dachshund (currently ).   List of upcoming major Debian releases' codenames after :   release 11.0 is  - 's horse (currently ), release 12.0 is  - intelligent worm toy with a built-in flashlight.   There are also:   special codename  () which is symbolic link to codename which is currently unstable,  which is symbolic link to codename which is currently stable,  which is symbolic link to codename which is currently testing.   The list of Toy Story  is quite  but at some time, there will be no more characters' names to assign.  My questions are:   What codenames will be assigned if we run out of characters' names? Who decides what is codename of next release (please don't answer ambiguously like: 'community')? How many releases' names are planned ahead?   BTW: Interesting quote from :     The  of using Toy Story names was  by  who   was, at the time, the Debian Project Leader and was working also at   , the company that produced the movies.     by  (: ).


I'm writing an academic paper in economics, and I'm using several different instantiations (I guess) of the Greek letter mu in several different mathematical equations. If I want to refer to all of them in my descriptive text, how should I do so? Should I write "mus"? Or "mu's"? Or should I insert the character itself, followed by just an "s"? Or followed by an " 's "?

When writing (a blog post, script, etc..) what is the proper way to indicate two or more instances of a single letter? For instance, in Monty Python's Bookshop Sketch:     C: I wonder if you might have a copy of "Rarnaby Budge"?      P: No, as I say, we're right out of Edmund Wells!      C: No, not Edmund Wells - Charles Dikkens.      P: (pause - eagerly) Charles Dickens??      C: Yes.      P: (excitedly) You mean "Barnaby Rudge"!      C: No, "Rarnaby Budge" by Charles Dikkens.  That's Dikkens with two Ks, the      well-known Dutch author.      P: (slight pause) No, well we don't have "Rarnaby Budge" by Charles Dikkens      with two Ks, the well-known Dutch author, and perhaps to save time I      should add that we don't have "Karnaby Fudge" by Darles Chickens, or      "Farmer of Sludge" by Marles Pickens, or even "Stickwick Stapers" by Farles      Wickens with four M's and a silent Q!!!!!  Why don't you try W. H. Smith's?      C: Ah did, They sent me here.   I had always believed that plural never uses an apostrophe before the 's' (it's only used for possession), but I have rarely seen in written material the format "four Ms". (On a side note, whoever wrote  also used "two Ks".)  On a side note, and perhaps this should be a separate question, if a Compact Disc is a CD, then two Compact Discs would be two CDs right? (I see "CD's" written everywhere)


I'm running Ubuntu 14.04 on a laptop with an nVidia 850m. I installed proprietary drivers and bumblebee and everything worked fine for weeks.  I have a black screen on boot. I tried reconfiguring Xorg but I receive an error message  Missing output drivers. Configuration failed.   What could I do?

I've  and rebooted my machine and now I get a black or blank screen.   How can I fix this?


I was playing around with the command date to create timestamps and profile the execution of a script. I decided to set four of them, named t1 through t4. For t2 I created an empty file whose last modification time I could use at a later stage to retrieve the stamp.  As a test I launched the following line:  t1=$(date +%s.%N) && t2=$(date +%s.%N) && touch t3 && t4=$(date +%s.%N)   When reading the values stored in the variables/files with  echo $t1 ; echo $t2 ; date -r t3 +%s.%N ; echo $t4   I obtain  1552985555.199182223 1552985555.200921201  # t2 1552985555.199194549  # t3 1552985555.204244831   There I was surprised to see that t3<t2, that is the file t3 appears to have been created before the variable t2 that has been defined earlier.   This behaviour is reproducible (I make sure to remove the file t3 before each repetition). Once in a while. though, I get the expected time order:  1552985629.214695802 1552985629.216438952  # t2 1552985629.295196920  # t3 1552985629.300037794   Both date and touch are from GNU coreutils 8.12. For the rest: Ubuntu 14.04 LTS, GNU bash 4.3, filesystem ext4.  Would someone please double-check this evidence, point to oversights and suggest solutions? In the end the aim is to monitor the development of a script in a consistent and correct way   Addition: for example these are 20 repetitions launched 1 second apart: the same output is in one line, so please look at the second and third column  1552986458.449690567 1552986458.451507586 1552986458.451223453 1552986458.454980321 1552986459.462222634 1552986459.464054243 1552986459.463223485 1552986459.467449036 1552986460.474568039 1552986460.476331886 1552986460.475223518 1552986460.479723115 1552986461.486642776 1552986461.488337967 1552986461.487223550 1552986461.491586674 1552986462.498636420 1552986462.500441307 1552986462.499223582 1552986462.503847530 1552986463.510775519 1552986463.512552869 1552986463.511223615 1552986463.515951772 1552986464.522958303 1552986464.524715464 1552986464.523223647 1552986464.528149986 1552986465.535135630 1552986465.536956933 1552986465.535223679 1552986465.540370390 1552986466.547042343 1552986466.548551235 1552986466.547223712 1552986466.551542698 1552986467.558193986 1552986467.560011358 1552986467.559223744 1552986467.563421722 1552986468.570405064 1552986468.572197220 1552986468.571223777 1552986468.575637535 1552986469.582805473 1552986469.584617345 1552986469.583223809 1552986469.588061790 1552986470.595186569 1552986470.596950654 1552986470.595223841 1552986470.600317667 1552986471.607334711 1552986471.609094157 1552986471.607223874 1552986471.612469522 1552986472.619539297 1552986472.621338541 1552986472.619223906 1552986472.624619165 1552986473.631362828 1552986473.633185880 1552986473.631223939 1552986473.636591552 1552986474.643786598 1552986474.645547837 1552986474.643223971 1552986474.648885524 1552986475.656067174 1552986475.657817777 1552986475.659224003 1552986475.661214859 1552986476.668232234 1552986476.670022104 1552986476.671224036 1552986476.673411532   created with  while :; do    rm -f t3   t1=$(date +%s.%N) && t2=$(date +%s.%N) && touch t3 && t4=$(date +%s.%N)   echo $t1 $t2 $(date -r t3 +%s.%N) $t4   sleep 1 done

On my linux system if I display the current date "t1", touch a file "f" then display the modification time "t2" of that "f" I would expect t1 < t2.  But that's not what I always get when I execute this on my system:  date +'%Y-%m-%d %H:%M:%S.%N'; \ touch f; \ stat -c %y f   Example output:  2017-09-18 21:47:48.855229801 2017-09-18 21:47:48.853831698 +0200   Notice the second timestamp (stat) is before the first one (date): 855229801 > 853831698  My fs is ext4, but I also tried with a file on tmpfs, same effect. Why is it the case?  Thanks    Some info about the setup  % which date /usr/bin/date  % which touch /usr/bin/touch  % pacman -Qo /usr/bin/date /usr/bin/touch /usr/bin/date is owned by coreutils 8.28-1 /usr/bin/touch is owned by coreutils 8.28-1  % uname -a Linux machine 4.12.12-1-ARCH #1 SMP PREEMPT Sun Sep 10 09:41:14 CEST 2017 x86_64 GNU/Linux  % findmnt TARGET                                SOURCE     FSTYPE    OPTIONS /                                     /dev/sda1  ext4      rw,relatime,data=ordered └─/tmp                                tmpfs      tmpfs     rw,nosuid,nodev


Is there a way to make a smooth shaded mesh look like the third column in this example? The six sides of the cube should have their vertex normals aligned with the face normal.  Here is what I've tried so far:   Beveled, smooth shaded (faces are not flat) beveled, smooth shaded, edge split (faces aren't joined) Modified in external application (faces are flat, bevels are smooth)

I frequently come to the problem of having a mesh with parts I would like to render smooth and "hard" edges connecting them.   How can I set the mesh to show the sharp edges but render everything else smooth?  In the example I would like the sides of the individual cylinders render smooth but the intersection between bottom and top to be sharp/flat


After inserting a Python file into my latex file via \lstinputlisting[language=Python]{Thesis.py}, I get    Normally, it should be ~, but it is at higher than it should be. When I copy it from the output PDF , I no longer get ~.  Could you please elaborate on this issue and how to get the normal ~?

How do I insert a nice tilde that is centered in the middle in a lstlisting? I found another thread about  but I can't apply it because the method described there only works outside of lstlisting as lstlisting displays all the text literally. Any ideas?  Here is how the tilde looks in my document at the moment - it's at the very top of the font and I would like it to be in the middle (like ~ this).    Here is the LaTeX for this fragment:  \section{Remove duplicate, consecutive lines (emulate "uniq")}  \begin{lstlisting} awk 'a !~ $0; { a = $0 }' \end{lstlisting}  Variables in Awk don't need to be initialized or declared before they are being used.


I was tryng to track my scene. I made and image sequence then exported all the jpg pictures. To get tracing points I used the "Detect Features" option to create keyframes. When I was ready I pushed the button "Solve Camera Motion" And it displayed that: Atleast 8 trackers...  Can someone help me find out why it says that and could help me fix it? Video:

sorry for my English, I write from Italy. I'll try to explain my problem. I'm tracking a footage with a solver error 0.2973. When I try to set the floor, the orientation of the camera is wrong (see screenshot).  So I tried to manually orient the camera, but even if well oriented respect to the xyz axes, geometry is incorrect as you can see from the screenshots below (the selected marker appears to be on the same plane but it is lower).  The video was recorded by a roof of a house so much higher than the road. It seems that Blender is not able to recognize this height and set the floor in a wrong point of view. Can someone help me solve this problem? Thank you


When should we write the word "church" with a capital C, Church, and when should we only write it as church?

While googling about whether "atheist" should be capitalized, and skimming past posts by people blogging about atheism rather than about English grammar, I came across    It says     [Capitalize] Religions and religious terms       Examples:      Catholicism, Hinduism, Buddha, the Bible, Christian, the Ten   Commandments, Baptist church, Mt. Zion Methodist Church      NOTE: Do not capitalize the following:       Examples:      church, communion, atheist, agnostic, spirituality   but I don't recall hearing of such a prescription before. Wouldn't most of the examples listed be capitalized because they're proper nouns? Are there good examples of words being capitalized solely because they're religious terms?  I'm mainly interested in modern English, rather than days of past where a lot more words were capitalized than they are nowadays.  Somewhat related:  - use "God" when referring to the name of the god of Judaism and Christianity (a proper noun), but "god" when referring to the general concept of a deity (common noun).


Let $U \in \mathbb{R^n}$ be a closed space and $p > q \geq1$. Show that $L^p(U) \subseteq L^q(U)$.   I need some hint to start with this!

Let $(X, \mathcal B, m)$ be a measure space.  For $1 \leq p < q \leq \infty$, under what condition is it true that $L^q(X, \mathcal B, m) \subset L^p(X, \mathcal B, m)$ and what is a counterexample in the case the condition is not satisfied?


I am using the hyperref and autoref package to do cross-referencing in my document. When I am referring to subsubsection such as 3.1.1, I want to it to compile as section 3.1.1 and not subsubsection 3.1.1. How do I do that?

I am using the autoref package to make labelling of sections, figures and graphs much easier, and it really is much easier. However, when I am referring to a particular subsubsection, I just want it to appear in the final document as section 3.1.1 yet it appears to render as subsubsection 3.1.1.   How do I disable the usage of subsubsection X.Y.Z and just have it say section instead?


Can yogurt made with raw goat's milk be used to bake with after 2 months?

How do you know when yougurt (for example) is no longer safe to consume? Do I know it from the taste, how it smells, or something else?


I have to proof the fact that $H^*(\mathbb{G}(k,n))$ is, as an abelian group, free with basis the partitions that index the Schubert varieties, but I'm having trouble doing it myself.  Denote $\sigma_{\lambda}=[X_\lambda]$ the Schubert class associated to a partition $\lambda \subset m\times n$. For all partitions $\lambda$ contained in an $m\times n$ rectangle, the Schubert class $\sigma_{\lambda}$ is an element of $H^{2|\lambda|}(\mathbb{G}(m,m+n))$, and we have the decomposition  $H^*(\mathbb{G}(m,m+n))=\bigoplus_{\lambda \subset m\times n} \mathbb{Z}\sigma_\lambda$  Thanks in advance  Edit: The question linked does not have an answer and the notes contain a dead link. Moreover the question asks for an example while I need a more general proof or at least an outline for it.  Edit 2: How can I use the fact that $\Omega_\lambda \simeq \mathbb{C}^{mn-|\lambda|}$ and $\mathbb{G}(m,n)$ is the disjoint union of Schubert cells?

Let $G(r, n)$ be the Grassmannian of the set of all $r$-planes in a $n$-dim vector space. How to show that the cohomology of a Grassmannian has a basis consisting of the equivalent classes represented by Schubert cycles? I am confused since I don't know how to compute the cohomology of a variety (how to construct the co-chain complex). I am really appreciate if you can compute the cohomology of, for example, $G(2,4)$ and show that it has a basis consisting of the equivalent classes represented by Schubert cycles.


I read this in a math textbook, stated as obvious fact. I cannot wrap my head around why this works. I understood the division lemma, and also got the algorithm to work: but the proof of why the algorithm works, just said "because of the equation" that I put in the question.  Could you please elaborate on why it works?

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


When I move my mouse over the little inbox icon, it gets highlighted pretty well:  　  Sure, it's half a pixel off-center, but it's pretty good.  But when I move my mouse over my reputation notification:  　  The grey is the wrong size!  It looks weird.  Not only is it not centered, it's too thin.   This happens in Firefox 39.0 and Chrome 41.0.2272.43.  It doesn't affect the mobile site.

When I hover it. I think its grey background should be resized too.


Is it correct to say:   A: You can't say a word to anyone. B: Yes, but you can't say a word to anyone either.   or   A: You can't say a word to anyone. B:You can't say a word to anyone neither.   Neither a person A, nor a person B can't say a word. Shouldn't it be neither? (In the example I found it's either)

Given these facts:   The tool cannot be found in the kitchen. The tool cannot be found in the bathroom.   Which is the correct sentence to represent the situation above?        I can find the tool neither in the kitchen nor in the bathroom.   I cannot find the tool neither in the kitchen nor in the bathroom.   I cannot find the tool, neither in the kitchen nor in the bathroom.


I am having a problem loading delimited text files into QGIS 2.18.8 Las Palmas (the same error also happened in past versions). Every time I try to upload a delimited text file the following error  happens:     Minidump in C: qgis-20170524-101344-6300-16268-cde1d78.dmp   I have tried disabling and uninstalling all plugins, and have deleted the .qgis2 folder (older suggestions from other posts). But I am still not having any luck.   I am using Windows 10.   Does anybody have any suggestions?

I got a problem when I try to load tab-separated text files in the "Create a layer from the delimited text file" tab (that one with de comma symbol). After normally selecting the X and Y fields and clicking OK, the reference coordinate system (SRC) selector screen appears, then the program closes by itself. I had uploaded more than a hundred of this type of file by the same procedure in the previous version of QGIS (2.14 Essen) and have no problem, but since I updated to version 2.18.8 (Las Palmas) I can not load any files or .CSV type.   Do anyone knows what's happening? Am I doing anything wrong?


I have to solve the following real integral $$ \int_{0}^{\infty}  \frac{x^3} {{e^x -1}{}} dx$$ Using complex analysis I split it in 4 different integral, according to big Circle lemma the integral along the big circle is zero that heads to: $$ P.V. \int_{0}^{\infty}  \frac{x^3} {{e^x -1}{}} dx = \int_{\gamma_\epsilon}^{}  \frac{x^3} {{e^x -1}{}} $$ Using little circle lemma the second integral gives $$ 8\pi^4 $$ It's this result correct?

What contour and integrand do we use to evaluate $$ \int_0^\infty \frac{x^3}{e^x-1} dx $$  Or is this going to need some other technique?


In the designs of all sites, the original poster of the question is highlighted in comments, however in the new design of MSE, the highlighting is missing.  The OP looks just like any other user.  Example from MSE without highlighting:        However, in a question from MSO, the highlighting is present:        Can the OP get his/her highlighting back on MSE?

When the owner of a question comments on their question or an answer to their question or self-answers their question, they get a special color for the box around their username.  The problem is, you can't see the box:        Can you please make this not white on white?


I have already dual boot Mint with Win8.1 on old 1tb hard drive for 2 years. all is ok..i want install Ubuntu on new msata drive and remove Mint from old HDD..

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


Assuming the file exists (using os.path.exists(filename) to first make sure that it does), how do I display the time a file was last modified?  This is on Linux if that makes any difference.

I have a script that needs to do some stuff based on file creation & modification dates but has to run on Linux & Windows.  What's the best cross-platform way to get file creation & modification date/times in Python?


I have this function in my .zshrc:  activated=false  function test_toggle() {   if [ $activated=false ]; then     echo "WAS FALSE"     activated=true   else     echo "WAS TRUE"     activated=false   fi }   I'd like the function to toggle the state of var activated between false and true. But if I open a terminal and run the function I only get this:  $ test_toggle WAS FALSE $ test_toggle WAS FALSE $ test_toggle WAS FALSE   How can I make the function use and change the variable: activated from parent scope correctly?

I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month="01"] && [$day="01"]; then         date="$last_month/$yes_day/$last_year"         fulldate="$last_month/$yes_day/$last_year" else         if [$month="01"] && [$day="02"]; then                 date="$last_month/$yes_day/$last_year"                 fulldate="$last_month/$yes_day/$last_year"         else                 if [ $day = "01" ]; then                         date="$last_month/$yes_day/$year"                         fulldate="$year$last_month$yes_day"                 else                         if [ $day = "02" ]; then                                 date="$last_month/$yes_day/$year"                                 fulldate="$year$last_month$yes_day"                         else                                 date="$month/$yes_day/$year"                                 fulldate="$year$month$yes_day"                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found


I have no idea how to proceed with proving this. If $X$ is a continuous random variable, $P(X > 0) = 1$,  $E(X)$ is defined and $F(x)$ is the CDF, then prove $\lim_{x\to\infty} x . [1 - F(x)] = 0$

I ask this because I'm trying to understand a proof of the expected value of a non negative random variable is equal to $\int_{0}^{\infty}(1-F(x))dx$ ($F$ is the distribution function of $X$) when $E[X]$ exists, and in some step I have $\lim\limits_{x\to\infty}({x·P[X>x])}=0$ and I don't know why it verifies. The problem I see is the indetermination in the limit $\infty·0$.


Code :  list = ["\r\n                    Opportunities\r\n                ", "\r\n                    Careers\r\n                ", "\r\n                    Education & training\r\n                ", "\r\n                Find Your Future\r\n ","\r\n\tSanderson        Recruitment, Solutions, Executive, Consulting\r\n"]   Output I want:   ["Opportunities","Careers","Education & training","Find Your Future","Sanderson Recruitment, Solutions, Executive, Consulting"]   Since it is a list

What is the Python equivalent of Perl's chomp function, which removes the last character of a string if it is a newline?


What would be the size of MyStruct on windows 7 , 64 bit  ?      typedef struct MyStruct_tag    {        char        c;        double      d;        int         s;     } MyStruct;   My answer:   1 (Char) + 7 (Padding) + 8 (double) + 4 (int) = 20 bytes    But the answer is coming out 24 bytes. What is going on ?

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


When I run software updater and the repository tries to reload, always produces the error message below?   W:GPG error: http://ppa.launchpad.net/gezakovacs/ppa/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D45DF2E8FC91AE7E, E:The repository 'http://ppa.launchpad.net/gezakovacs/ppa/ubuntu bionic InRelease' is not signed.

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


Can I just replace the socket with the 3 prong and not worry about grounding?

I have some 2-prong non-grounding type receptacles, and I'd like to replace them with 3-prong grounding type receptacles.  According to National Electrical Code, what are my options?


I'm having a problem with my computer. It displays      reboot and select proper Boot device or insert boot media in selected boot device and press a key   Why does it display that message and how can I resolve it?

My computer no longer boots Windows or the installed operating system. Instead, I may get this error:  PXE-E61: Media test failure, check cable -or- Check cable connection!  PXE-M0F: Exiting PXE ROM.   and/or one of the following messages or similar:  Operating System not found  No boot device available- No bootable devices--strike F1 to retry boot, F2 for setup utility  No bootable device -- insert boot disk and press any key  No Boot Device Found. Press any key to reboot the machine  Default Boot Device Missing or Boot Failed  Reboot and Select proper Boot device or Insert Boot Media in selected Boot device   What does this mean and what can I do?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


How to show that $(0,1)$ and $[0,1)$ are not homeomorphic?  My attempt:  On contrary suppose it is then  there exist $f:[0,1)\to (0,1)$ which is continuous   But inverse image of open set is open   So contradiction  Is my argument is correct?

Suppose $f:[0,1)\to (0,1)$ is bijective. Prove that $f$ is not continuous.     I know that $(0,1)$ and $[0,1)$ are not homeomorphic spaces because of the connected property. Can we then conclude that $f$ is not continuous because of that?


I have a laptop ACER 10, and when I try to load Ubuntu I get back an error that says:  This kernel requires an x86-64 CPU, but only detected an i686 CPU -please use a kernel appropriate for your CPU.    Please let me know what to do, in order to load Ubuntu.

I'm trying to install Lubuntu on my laptop (sorta old 2005). [Laptop stats: Intel® Celeron® CPU 410 @ 1.46 GHz 1.47GHz, 448 MB of RAM]  I press Install and this message appears:   This kernel requires an x86-64 CPU, but only detected an i686 CPU.  Unable to boot - please use a kernel appropriate for your CPU.   What can I do to install Lubuntu on my computer?


i have an array of objects, i want to add objects in this array using a method named "AddProd()" .but in order to add in the right case of the array i have to know where the first empty case in the array is .  this is the Add Method :     public void AddProd(Produit p){      int notempty = 0;     int i = 0;     while(produits[i] != null){         notempty++;         i++;     }      if (notempty < 49) {         produits[notempty + 1] = p;     } }   let me explain to you first i have a while loop that checks where the first null case is. the while loop keeps incrementing (i++) till it finds an empty case .  the problem is when i run i get two errors :   Exception in thread "main" java.lang.NullPointerException     at prosit.pkg2.v1.pkg0.Magasin.AddProd(Magasin.java:27)     at prosit.pkg2.v1.pkg0.main.main(main.java:22) Java Result: 1 BUILD SUCCESSFUL (total time: 1 second)   this is (Magasin.java:27) :   while(produits[i] == null){ i think that the comparaison to null is not correct and the second error is when i  call the method in the main class .  Any solutions please and thanks .

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


I've drawn a table using the following:  \begin{table}[hbt] \begin{center} \begin{tabular}{| l | l | c | c |}     \cline{2-4}     \hhline{~---} & \multicolumn{3}{c|}{Examples}\\     \hhline{~---}     & description & $M$ & ${\bf{u}}$\\     \hline     translation & through vector $\left(\begin{smallmatrix} 6 \\ 7 \end{smallmatrix}\right)$ & $\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$ & $\begin{pmatrix} 6 \\ 7 \end{pmatrix}$ \\     \hline     reflection & in line $x = 2$ & $\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}$ & $\begin{pmatrix} 4 \\ 0 \end{pmatrix}$ \\     \hline     rotation & about ${\bf{0}}$ through $\pi$ radians & $\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}$ & $\begin{pmatrix} 0 \\ 0 \end{pmatrix}$ \\     \hline     glide reflection & in line $y = x$, then through $\left(\begin{smallmatrix} 1 \\ 1 \end{smallmatrix}\right)$ & $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$ & $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ \\     \hline \end{tabular} \caption{Examples of Euclidean Transformations} \label{tab1} \end{center} \end{table}   How to I remove the top left vertical lines?

I have produced this table in LaTeX:     \begin{table}[hbt]                     \begin{center}                         \begin{tabular}{|l|l|l|l|}                             \hline & \multicolumn{3}{c|}{Examples}\\                             \cline{2-4}                             & description & $M$ & \textbf{u}\\                             \hline translation & through vector $\begin{pmatrix}6\\7\end{pmatrix}$ & $\begin{pmatrix}                                 1 & 0 \\ 0 & 1                             \end{pmatrix}$ & $\begin{pmatrix}6\\7\end{pmatrix}$\\                             \hline reflection & in line $x=2$ & $\begin{pmatrix}                             -1 & 0 \\ 0 & 1                             \end{pmatrix}$ & $\begin{pmatrix}4\\0\end{pmatrix}$\\                             \hline rotation & about \textbf{0} through $\pi$ radians & $\begin{pmatrix}                             -1 & 0 \\ 0 & -1                             \end{pmatrix}$ & $\begin{pmatrix}0\\0\end{pmatrix}$\\                             \hline glide reflection & in line $y=x$, then through $\begin{pmatrix}1\\1\end{pmatrix}$ & $\begin{pmatrix}                             0 & 1 \\ 1 & 0                             \end{pmatrix}$ & $\begin{pmatrix}1\\1\end{pmatrix}$\\                             \hline                             \end{tabular}                             \caption{Examples of Euclidean Transformations} \label{tab1}                     \end{center}                     \end{table}   How do I remove the two external lines from the top left empty corner cell? I want lines only around the other parts.  Also it looks a bit cramped, is there a way I can present it more nicely?


I use Lyx 2.1, class document : report. I created a general introduction as unnumbered chapter, but at the table of Contents, the introduction does not exist.

My question is just like the title. Here is a MWE for my case :  \usepackage[paperwidth=16cm,paperheight=24cm]{geometry} \usepackage{amsmath,amsxtra,amssymb,latexsym,amscd,amsfonts,enumerate,ifthen,stmaryrd,amsthm,amstext} \usepackage[mathscr]{eucal} \usepackage[pdftex]{graphicx} \usepackage{xspace} \usepackage{multicol,color} \usepackage{mathrsfs} \usepackage{makeidx} \usepackage{indentfirst} \usepackage[utf8]{inputenc} \usepackage[utf8]{vietnam}  \usepackage{eso-pic} \usepackage{perpage}  \MakePerPage{footnote} \usepackage{fancyhdr} \renewcommand{\headrulewidth}{0pt}  \makeindex \begin{document} \pagenumbering{roman} \pagestyle{fancy} \tableofcontents  \chapter*{Foreword}  Blah blah blah  \chapter*{Preface}  \pagenumbering{arabic}     Blah Blah   Mirella gọi là papa, dạy toán ở nhà cho Mirella.   \thispagestyle{plain}  \chapter{Dido's problem}  \label{chapter:Dido}  \index{Dido (công chúa)} \index{bài toán công chúa Dido}    Blah blah blah   \end{document}   Why the unnumered chapter does not appear in the table of content ? Please help me. Thanks.


We know Jorah gives them to Daenerys, but where did he get them from? Why are there no more Dragons?

... you know, the ones that he famously ?  Disregarding whether he knew what they actually were or not, I think knowing where the eggs originated from might be fairly important, too.


We know that work done $W$ to assemble $q_1$,...,$q_n$ point charges is $$ W = \frac{1}{2} \sum_{i = 1}^{n} q_i V(r_i) \tag{I} $$ Now for the continous charge distribution with charge density $k$, we find $W$ by integrating over appropriate region, $$ W = \frac{1}{2}\int \rho V \, d\tau \tag{II} $$ Now using Gauss law , $\rho = \epsilon_{0} \nabla\cdot\vec{E})$ and vector calculus identities we find that $$ W = \frac{\epsilon_0}{2} \int_{\text{all space}} E^2 \, d\tau  \tag{III} $$ Now my doubt is this expression is always positive while the former expression (in case of discrete case) could take negative values as well. How this is possible even though continous case is considered as limit of finite cases?

This question is motivated by Section 3.2.3 in Griffiths. Therein, we are considering the force of attraction between a point charge and an infinite conducting plane.  One can calculate the field using the method of images, and from that the force of attraction exerted by the induced charge to be  $$\mathbf{F}=-\frac{1}{4\pi\epsilon_0}\frac{q^2}{(2d)^2}\widehat{\mathbf{z}}.$$  One one hand, the energy associated with a field is given by $$W=\frac{\epsilon_0}{2}\int\! E^2\ \mathrm{d}\tau.$$  Since the dot product is positive definite, this implies that $W$ must be positive.  On the other hand, the work is also given by \begin{align} W&=\int_\infty^a\! (-\mathbf{F})\cdot \mathrm{d}\mathbf{l}\\ &=\frac{1}{4\pi\epsilon_0}\int_\infty^a \frac{q^2}{4z^2}\ \mathrm{d}z\\ &=-\frac{1}{4\pi\epsilon_0}\frac{q^2}{4d}<0 \end{align} Intuitively, it makes sense that the work should be negative: to bring the particle in from infinity under constant acceleration, we must oppose the attractive force of the induced charge.  But I am having trouble reconciling this with the equation $W=(\epsilon_0/2)\int\! E^2\ \mathrm{d}\tau.$  I am sure I am missing something, and would greatly appreciate a nudge in the right direction.


I currently have a list of objects that have an attribute called "name" and I want to sort the list in an alphabetical order using the objects "name". The problem is that I do not know how to do this.  I've found a way to sort the list by the objects "names" but I want to convert it back to a list of objects but still keep the order of the sorted list.  players = list()  class Player(): name = None  def __init__(self, name):     self.name = name  players.append(Entity('Adam')) players.append(Entity('James')) players.append(Entity('Sebastian'))  sorted_player_names = sorted([player.name for player in players], key=str.lower)   I have tried to sort the list by the names but I do not know how to convert it back to a list of players instead of a list of names.

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves.  The list looks like:  >>> ut [<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>,  <Tag: aes>, <Tag: ajax> ...]   Each object has a count:  >>> ut[1].count 1L   I need to sort the list by number of counts descending.  I've seen several methods for this, but I'm looking for best practice in Python.


I'm not an native English speaker, and sometimes I'm confused with the pronunciation of 'g' and 'j' in words. It seems that 'j' is usually pronounced as /dʒ/ for example "job", "jaw". But 'g' can be pronounced as /dʒ/ or /g/. For example "gorgeous" is pronounced as  /'ɡɔrdʒəs/, but "georgia" is pronounced as /'dʒɔ:dʒjə/. So I have two questions:   How could I know whether I should pronouciation as /g/ or /dʒ/ if I see a word start with letter 'g'? How could I know whether the word starts with a 'g' or 'j' if the pronunciation start with a /g/?

In English, words with a 'g' followed by a front vowel (e, i, y) can be pronounced with a soft g or a hard g:   Words with Germanic roots are usually pronounced with a hard g: gear, get, gift, give Words with Latin and Greek roots are usually pronounced with a soft g: gem, general, giraffe, giant   But how should a purely English word (if such thing even exists) with a 'g' followed by a front vowel be pronounced? In other words, if an English speaker saw a new word of unknown origin (eg: a neologism) that starts with gi- or ge-, how would they pronounce it?


I have the following code for calling the images in the slider but no idea on how to get the alt tag. I tried varied methods but I could be missing something. Please help. Possibly I am missing this in calling the respective variables but no idea thereof.   foreach ( get_field('images') as $image ): ?> <div> <img src="<?php echo $image['image']['url']; ?>" width="90" alt="<?php echo $alt; ?>" /> </div> <?php endforeach;   Please help.

I am using an attachment.php file to show large versions of images that have been clicked on elsewhere.  I'd like to pull the image alt text as a caption under the image with javascript, but the alt text isn't included when when wp_get_attachment_image_src() is used.  I don't think WP has a function to retrieve it, so I need my own.  To write that function I need to know...Where is the alt text for an image stored?  My attachment page uses wp_get_attachment_image_src(), which doesn't include the alt text.
 <?php  if ( wp_attachment_is_image( $post->id ) ) :      $att_image = wp_get_attachment_image_src( $post->id, "large");?>      <a href="<?php echo wp_get_attachment_url($post->id); ?>"          title="<?php the_title(); ?>"          rel="attachment">     <img class="attached_img"          src="<?php echo $att_image[0];?>"          width="<?php echo $att_image[1];?>"          height="<?php echo $att_image[2];?>"           class="attachment-medium"          alt="<?php $post->post_excerpt; ?>" />       } <?php endif;?>
   This shows:

     I'm aware that the $post->post_excerpt is being called in the above code, but I am not sure what to replace it with to get the image's alt attribute.


I keep sending iMessages from my mac before I have finished typing them by accidentally hitting the return key.  Is there a way to change the behaviour to send on Cmd-Enter instead?

I am using Messages on both Macs & iPhones and I am typing a lot of E-mails. Within all these environment I am used to the normal behaviour of the return key.  Within Messages this key doesn't behave as a return key thus causing me to prematurely send truncated messages.  I found this very similar question:  and I already knew the workarounds proposed ctrl+return, alt+return. But these workarounds didn't answer the original question. Moreover I already use them but this still leave me with an unacceptable error rate.  From my point of vue, the return should never be associated with a "function" within an environment where you are at typing text. This is a huge ergonomic design error.  I tried to override the actual shortcut mapping with:  defaults write com.apple.iChat NSUserKeyEquivalents '{ "                             " = "insertNewline:" ; }   Which is a silent failure.  I suspect that the syntax of the function might be wrong, but Messages doesn't write any error about this.  Is there a documentation about the exact syntax of internal Messages functions which can be called from a shortcut?  Is there any other correct way to make the return behave as a plain return?


I have a dataset with categorical features. I want to segment the data using clustering techniques. What could be the possible choices for this scenariogiven the fact that data has categorical features. Is there any variation of k-means which can be used here.

I am working on a project and currently experimenting cluster analysis. The dataset is mainly categorical variables and discrete numbers. Please pardon my poor programming skills as I am not very familiar with MathJax, but I will try to summarize the data set in words in the following three examples.   imagine column 1 is participants names of course, from column2 - 5, each column's value range from 1 (least important) - 5 (most important). so in this case, column 2-8 only have discrete data.  column 6 for example, since this is a multiple choice question. row 1 chose "nice" as an answer, however, row 2 chose "poor". In this case, we have one column that contains multiple categorical answers. for column 7-9, this is another type of multiple choice questions. However this time, each column represents only one answer. column 7 only allows string values "true", column 8 only allows string "somewhat". So in this case, we have multiple columns that represent multiple answers of the same question.    Any ideas how to solve this? Thankful to any input!   A2       A3       A4       A5       A6       A7         A8         A9 1        4        5        4        nice     true       somewhate  false 2        4        3        1        poor     true                  false 1        5        2        1        nice                somewhate     3        2        1        5        nice     true                  false


In Windows after a fresh install I go to the device manager to find out which devices have yellow question mark on them ie driver is missing  what about Ubuntu? sometimes you cant even tell that the driver is missing cause the device function is not visible like co-processor or something like that  In Windows you can find out about similar devices using the device manager

I was wondering how to list all the hardware info in my computer?   Both terminal and GUI solutions please. Is there a single utility to monitor most hardware's working status? Just like some software in Windows?   Thanks and regards!


Hello Blender Stack Exchange !  I'm having a bit of an issu on a personal project right now, and that issue is that I can't seem to "blur out" or "fade" a material on a part of a mesh how I want to. Here's a pic of the situation :    I'd like for the gold material to fade on the edge to the silver color, but I do not know of an efficient way of doing so... please help.  Thanks in advance ! :)  Here's a link to the file :

I have created this with cycles:  But the edge between the glowing and non glowing materials is very sharp. The material was manually applied to faces in edit mode. Is there any way I can smooth the edge between them in cycles?


I have two independent variables: "vaccination status" and "antibody titer assessment". Vaccination is coded as 0 and 1. The other variable is supposed to explain if the person has checked that whether the vaccination has increased his antibody titer sufficiently. The second variable has two states: yes or no.  The problem is that people who are not vaccinated do not need to check their antibody titer (it is not logical). So I don't know if I should leave the cells in the column pertaining to tier check blank or not, when the persons' vaccination status is zero. Or should I enter zero even for the lack of antibody titer assessment, even if the person has not received any vaccination in the first place?  The difference between the two is that if I fill those blank cells with zero, these two independent variables would become highly correlated (source of multicollinearity). Otherwise, if i leave those cells blank, I would loose data in listwise deletion unless I use other methods such as pairwise deletion or mean substitution (in SPSS).  What do you suggest? Do you have any other ideas that these two options?

I'm building a predictive model for a medical condition that happens in both men and women. Physicians have reported that in some cases for women, their menstrual history seems to be a risk factor, though epidemiologists haven't been able to verify this claim. My data includes information about female subjects' menstrual history. My goal is to build a logistic regression model that determines the probability of the existence of this condition.  Here's my problem: I'd like to build a model that includes gender and includes menstrual history questions for female subjects, but how do I assign values for male subjects for things like "number of months since last pregnancy"?  Is there a general method to deal with this kind of problem?


Microsoft word says that "are" should be replaced with "is", but to me, it doesn't read well.      In Battle Royale, a group of high school students are forced to   choose a weapon before being sent to battle each other to the death.

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


Diffuse $5$ points on a sphere. Prove there is a closed half-sphere that has at least $4$ points on it.

If there are 5 points on the surface of a sphere, then there is a closed half sphere, containing at least 4 of them.  It's in a pigeonhole list of problems. But, I think I have to use rotations in more than 1 dimension.  Regards


Which is correct?  I wish everything was as easy OR I wish everything were as easy

had declared the sentence below as follow: 1) STAR TURN, 2) BEST LINES.      I wish Bernard Cribbins was my grandad. Perhaps he would be willing to   adopt?     Rattigan: “If only that was possible.” The Doctor: “If only that were   possible. Conditional clause.”    Is 'was' after 'I wish', 'if only' and 'if' (in conditional clauses) colloquial?  Does it be used in formal speech and writing?


In a project with old code I'm having to deal with, I have this Coord structure. As best as I can tell it's size should be either 12 bytes, or 24. However, sizeof(Coord returns 40. Could someone please explain where this extra size comes from?  struct Coord {     Coord();     float inate[3] = {0,0,0};     float& x = inate[0];     float& y = inate[1];     float& z = inate[2];     Coord operator*(const float&);     Coord operator=(const Coord&);     Coord operator=(const float[3]);     Coord dot(const Coord& c);     Coord cross(const Coord& c); };

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


A family member of mine is a dual citizen with an EU (VWP) and a non-VWP passport. He applied for a US tourist visa on the non-EU passport and was rejected.   My question is if this rejection would have any effect if he wants to apply for an ESTA on the other passport that is under the VWP.

I applied for a B1 visa to attend a conference in the USA in 2013. I had another nationality (Non- VWP) at the time and my B1 application rejected under section 306 of border security. I now can apply for ESTA under my new nationality. Can my ESTA application get approved? If not and I need to apply for visa is it every time I need to travel to stated or is it just the first time?


I want to show that if $1 <  a \in \mathbb{N} $ is odd, then there exists $b,c\in \mathbb{N}$ s.t (a,b,c) is a primitive Pythagorean triplet. I believe it would be enough to show there exists $s<t\in \mathbb{N}$ with $\gcd (s,t)=1$, $2 \nmid s+t$  and $a=s^2-t^2$. But I couldn't find a way to do this.

$(a,b,c)$ where $a^2+b^2=c^2$ is a Pythagorean triple.  My first thought was to do a proof by cases. I have three cases :   a is odd, b is odd. a is odd, b is even. a is even, b is odd.   I'll just show case one :  $(2k+1)^2 + (2k)^2 = c^2$  I am kind of stuck relating how this answers the question. Thank you for any guidance in the right direction.


Closely related to , except I am running ArcGIS 10.4. It should be possible for me to make 10.1 copies of all my 10.4 mxds. Here is my code:  import arcpy, sys, os, string   dir = r"D:\Path\To\Maps" outloc = os.path.join(dir, "Compatible_MXDs") version = '10.1'  suffix = "_"+ version.replace(".", "")  # Get all mxds in this directory arcpy.env.workspace = dir mxdList = arcpy.ListFiles("*.mxd")  for file in mxdList:     print(file) # mymap.mxd     mxd = arcpy.mapping.MapDocument(os.path.join(dir, file))     base = os.path.basename(file)     print(base)     # ('D:/Path/To/Maps/mymap', '.mxd')     base = os.path.splitext(base)[0] + suffix + os.path.splitext(base)[1]      mxd.saveACopy(outloc + os.sep + base, version)     print(os.path.basename(file) + " has been converted")   But I get the same error:  Traceback (most recent call last): File "MakeMXDsBackwardsCompatible.py", line 21, in <module> mxd.saveACopy(outloc + os.sep + base, version) File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\utils.py", line 182, in fn_ return fn(*args, **kw) File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\_mapping.py", line 877, in saveACopy self._arc_object.saveACopy(file_name, version) AttributeError: MapDocObject: Unable to save.  Check to make sure you have  write access to the specified file and that there is enough space on the  storage device to hold your document.   I'd rather not use the "File -> Save a Copy -> change mxd version" dialogue for 500 separate mxds over multiple directories.    While my question is also closely related to , the answers are still not satisfactory for my problem. The relevant (simplified) code:  mxd = arcpy.mapping.MapDocument(r"D:\Path\To\Maps\mymap.mxd")  mxd.saveACopy(r"D:\Path\To\Maps\Compatible_MXDs\mymap_101.mxd", '10.1')   Now with regard to that question's answers...  1) I have no mxds with the same name already on disk, nor am I trying to overwrite.  2) I am not attempting to overwrite an mxd file that is already in use. No other scripts are concurrently accessing it. Furthermore nothing changes even after I add  del mxd   at the end.  3) Again, I am not calling anything like  mxd.saveACopy(mxd)   I have read the .  I have tried rebooting and running my script without starting ArcMap. I don't use an IDE, but use Notepad++ to write my scripts and execute them on my command line with python MakeMXDsBackwardsCompatible.py

I'm trying to use arcpy to save an .mxd and am having an issue.  It doesn't matter if I use mxd.save or mxd.saveACopy I get the same error.  I know it doesn't look like I am doing anything w/ it here, but it's just a portion of my code:  import arcpy import arcpy.mapping as map arcpy.env.overwriteOutput = True  env.workspace = r"C:\MGIS\FinalProject2.gdb     mxd = map.MapDocument(r"C:\MGIS\Finalproject2.mxd") df = map.ListDataFrames(mxd)[0]  for df in map.ListDataFrames(mxd): df.scale = 2000000  #Add layers into map document addLayer = map.Layer(OKXcounties) addLayer1 = map.Layer(contourLabelText) addLayer2 = map.Layer(contoursClipLyr) addLayer3 = map.Layer(clipOKXLyr) map.AddLayer(df, addLayer, "AUTO_ARRANGE") map.AddLayer(df, addLayer1, "AUTO_ARRANGE") map.AddLayer(df, addLayer2, "AUTO_ARRANGE") map.AddLayer(df, addLayer3, "AUTO_ARRANGE")  # Add contour Labels for lyr in map.ListLayers(mxd):     if lyr.name == "contourLabelText":         lyr.showLabels = True     if lyr.name == "Contour Features":         lyr.transparency = 100  mxd.saveACopy(mxd)   I get the following error:   Traceback (most recent call last):   File "C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 312, in RunScript     exec codeObject in __main__.__dict__   File "C:\MGIS\geog485\FinalProject2\mxdtest.py", line 7, in <module>     mxd.saveACopy(mxd)   File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\utils.py", line 181, in fn_     return fn(*args, **kw)   File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\_mapping.py", line 668, in saveACopy     self._arc_object.saveACopy(file_name) AttributeError: MapDocObject: Unable to save.  Check to make sure you have write access to the specified file and that there is enough space on the storage device to hold your document.   Space is not the issue, I have 60 GB of free space and I've checked the windows properties of the .mxd file.  Read-only box is unchecked and I've "allowed" all permissions for all groups:    Does anyone have any idea how if this is a bug or how I can fix this?  I'm using ArcInfo 10.0 SP4.


Compute the factor group:  $\mathbb{Z} \times \mathbb{Z} \big / \langle (1,2) \rangle$ I don't understand why the answer is $\mathbb{Z}$. Isn't  $\mathbb{Z} \times \mathbb{Z} \big / \langle (1,2) \rangle \cong \mathbb{Z} / \langle 1 \rangle \times \mathbb{Z} / \langle 2 \rangle$?  What is the order of the cyclic groups $\langle 1 \rangle$ $\langle 2 \rangle$? Why is $\mathbb{Z} \times \mathbb{Z} \big / \langle (1,2) \rangle \cong \mathbb{Z}$

How do you describe the quotient group $\mathbb{Z} \times \mathbb{Z} / \langle (1, 2) \rangle$? It is easy to get it when it is $\mathbb{Z}_n$, but it is difficult when it is $\mathbb{Z}$.  How should I start and solve the problem?


When I was doing Math Training, the coach gave a inequality problem.     If $x,y,z\in\mathbb{R}^+$, prove that $$\sqrt{x^2-xz+z^2}+\sqrt{y^2-yz+z^2}\ge\sqrt{x^2+xy+y^2}.$$   I tried to use the brute force method, and found out it was to hard and it involves lot of terms.  The coach later said that there is a beautiful way to solve this problem.  Can someone help me?

Let $a$, $b$, and $c$ be positive real numbers. Prove that  $$\sqrt{a^2 - ab + b^2} + \sqrt{a^2 - ac + c^2} \ge \sqrt{b^2 + bc + c^2}$$  Under what conditions does equality occur? That is, for what values of $a$, $b$, and $c$ are the two sides equal?


According to the answer key, the correct answer is (a)....  This is obviously a mistake, right?  If a square matrix is invertible, then it has full rank.

The following is a question from the sample GRE Mathematics Subject Test found on the ETS website:  Let $M$ be a $5\times 5$ real matrix. Exactly four of the following five conditions on $M$ are equivalent to each other. Which of the five conditions is equivalent to NONE of the other four?  (A) For any two distinct column vectors $u$ and $v$ of $M$, the set {$u,v$} is linearly independent.  (B) The homogeneous system $Mx=0$ has only the trivial solution.  (C) The system of equations $Mx=b$ has a unique solution for each real $5\times 1$ column vector $b$.  (D) The determinant of $M$ is nonzero.  (E) There exists a $5\times 5$ real matrix $N$ such that $NM$ is the $5\times 5$ identity matrix.  Apparently, the correct answer is (A), but I can't figure out why this is true. If $M$ is nonsingular, as is implied by statements (B)-(E), then isn't that equivalent to its column vectors being linearly independent? And if the 5 column vectors are independent, then I can easily show that each pair of vectors are independent. What am I missing?


I am not sure what started this, but my start button, when pressed won't show the start menu button. The start menu also won't show when pressing on the windows button. This issue also affects some buttons on the taskbar, like the Network, Time, Sound and some others that usually gives a popup, but now does nothing when pressed.  After  around, I tried some suggestions online, and found out that sfc reported that I have corrupted files (Error messsage: Windows Resource Protection found corrupt files but was unable to fix some (or all) of them).  sfc /scannow   Running dism also fails (Error message: Error: 0x800f081f. The source files could not be found.). Since I don't have the installation media, this isn't a good option as for now.  DISM /Online /Cleanup-Image /RestoreHealth   Trying it on another user, shows that start menu still works fine which indicates the issue is not actually with Windows itself, but my account (connected to Live).  Assuming that I don't want to go to drastic measures like doing a Refresh, or changing accounts, is there a way to solve this?  Update: I don't think it is a , since the answer given seems to be outdated according to the source I used above, it gives issues when executed from builds after November. I am currently using the latest build. Also, according to the given answer there, the solution is to execute command via powershell to reinstall packages. Doing only that part doesn't resolve the issue, in my case. (See comment below).

I have Windows 10 Pro.  Everything was working, but today when I pressed the Start button, nothing happened. The Start menu is not showing.  I have restarted the PC several times, but it's the same situation. What can I do?


I have recently acquired a laptop that runs ubuntu 9.04. I personally have never heard of or seen this OS and am pretty confused by it, after spending all day trying to log into it, i finally go in but now i cant seem to update it to the newest version. Please help this noob update his new laptop.

I would like to see a full how-to guide on how to install Ubuntu.


Recently I study the category and I confused with the concept of the class.Sometimes a class is not a set,and sometimes it said a class is.What I know the class is the equivalent class.So what's the class?

I am looking for a reference on mathematically strict definition of class. For example, how do you construct the class of all ZFC-sets?


I performed a factory reset on my Lenovo A390. I forgot to keep backups of my contacts, and I lost a .vcf file and my contacts are gone. I have important official documents and contacts. How to get that .vcf file back?

I just deleted a file on my Nexus S that I really need back. (It was actually part of an app using a sqlite database that did a drop table when upgrading to a new version.)  Presumably I need to root the phone first (which I hear is easy on Nexus phones) but am I in a catch-22 here? Namely, does rooting the phone mean wiping/overwriting the partition where the data lives?  If not, what do you recommend for data recovery tools? Presumably the file was just unlinked and not actively overwritten (per usual when "deleting" a file) so technically the data must be there...


I'm a high school student and I'm fairly familiar with basic electronics, but I've always wondered one thing.  So how generators make electricity from motion is the move a magnet around or through a coil of conductive wire,  which causes the electrons from the metal to move in the direction of the magnet. But that could theoretically happen forever. When does the metal wire run out of electrons? Are electrons being formed? Is matter being created?   Also if you want to help me out a bit more, please explain how transformers work and how voltage and amperage are related.

Where do the electrons come from when an electric generator is making electricity?  Is from the air?  Would a generator work in a vacuum?  Electrons have mass so where would they be pulled from if there is nothing?


I want to ask if there is a way to get the current selected tag name from a form .To make it more clear please take a look at the example below .  <form name='get_state'  id="catalog" action='post.php' method='POST' >  <select name='plateDescr' onchange="window.loadStates()"></select>  <select id="matType"  name="matType" onchange="window.loadStates()" hidden="hidden"></select> </form>   For example if the select tag with name 'plateDescr' is currently selected i want to get exactly this value 'plateDescr'. Is there anyway of doing this. Thanks in advance!

I would like to find out, in JavaScript, which element currently has focus. I've been looking through the DOM and haven't found what I need, yet. Is there a way to do this, and how?  The reason I was looking for this:  I'm trying to make keys like the arrows and enter navigate through a table of input elements. Tab works now, but enter, and arrows do not by default it seems. I've got the key handling part set up but now I need to figure out how to move the focus over in the event handling functions.


I am new in Python (and in programming at all) and trying to build the program for .csv data analysis. I have multiple .csv files and for each of them I build a plot. How do I add the name of the corresponding file to the title of the plot? Thanks!    Below is the coresponding part of the code:  import numpy as np import pandas as pd import matplotlib.pyplot as plt import glob  for fName in glob.glob('*.csv'):      df, loops = openF(fName)     fig, ax = plt.subplots(1, 1)      for i in range(loops):         df.loc[df['loop']==i+1][['freq','phase']].plot(x='freq', y='phase', logx=True, ax=ax)     ax.set_title('Phase/Freq'.format(fName))     ax.set_xlabel('Frequency, [Hz]')     ax.set_ylabel('Phase, [rad]')    plt.show()

I want to do something like String.Format("[{0}, {1}, {2}]", 1, 2, 3) which returns:  [1, 2, 3]   How do I do this in Python?


When trying to send a large number of requests (>500), I get a connection error like so:  ConnectionError: ('Connection aborted.', gaierror(8, 'nodename nor servname provided, or not known'))  The code:     def compare_and_fix(mac, reqSession):          url = hosturl + <api as a string> + mac          try:                 resp = json.loads(reqSession.get(url, headers=headers, cert=(…), timeout=10, verify=False).text)                 response_code = resp['status']                 if response_code == 200:                         result = resp['data']                 else:                         print “oo-ooh!”         except Exception as ex:                 print ex.message       def worker(reqSession):             while True:                     mac = q.get()                     if validate_mac(mac):                             compare_and_fix(mac, reqSession)                     q.task_done()      num_worker_threads=500     q = Queue()      for i in range(num_worker_threads):             session = requests.session().client()             t = Thread(target=worker, args=(session,))             t.daemon = True             t.start()      for mac in mac_list:             q.put(mac)     print "Waiting for threads to join"                                                                                q.join()   This works well if num_worker_threads is low ~100-200. Anything more, and I start to see the above error. If I go more than 500, I see it happen quite a bit (~15% of all calls fail with this error at this point).  Trace:      exception : Traceback (most recent call last):            File “xyz.py", line 62, in abc                 resp = json.loads(reqSession.get(url, headers=headers, cert=(…), timeout=10, verify=False).text)            File "/Library/Python/2.7/site-packages/requests/sessions.py", line 476, in get                 return self.request('GET', url, **kwargs)            File "/Library/Python/2.7/site-packages/requests/sessions.py", line 464, in request                 resp = self.send(prep, **send_kwargs)            File "/Library/Python/2.7/site-packages/requests/sessions.py", line 576, in send                 r = adapter.send(request, **kwargs)            File "/Library/Python/2.7/site-packages/requests/adapters.py", line 415, in send      ConnectionError: ('Connection aborted.', gaierror(8, 'nodename nor servname provided, or not known'))   Any insight into this issue is appreciated. Thanks!

Does anyone know?  And a bigger question is what happens when you encounter this maximum? Is this the same number with other Windows OSs such as Vista, XP etc.?


When performing a factory reset, does Android remove all the added applications and user data or does it completely reflash an image of the OS  I am running on jelly bean 4.3 stock

I'm going to reset my Android tab because its internal memory is low.  Is it safe to erase the system data of my android tablet (not rooted)? If I restore the factory setting of my Android, will the uninstallable apps be also removed or only those that can be uninstalled?


Very occasionally, users leave edit summaries which are downright inappropriate. At present, the best we can do in such instances is to contact a Stack Exchange employee and ask for a revision purge, which is a very invasive operation.  Diamond moderators are entrusted with the ability to edit almost anything on their sites, including other peoples' comments also after the normal five minute grace period. (This is something not even the poster of the comment can do.)  I am proposing that diamond moderators be given the ability to somehow edit the edit summary of a post revision after the fact, in such a way that the originally entered edit summary is visible to other moderators and possibly high-rep users (but not others) in much the same way as deleted posts are visible to moderators and high-rep users only.

Nice hole in the system... You can pretty much say anything in a revision comment and it cannot be removed or cleaned up by a mod.  See  for an example.  Mods need the ability to at least remove the comment, if not the ability to edit the text of it.


So I'm a C++ programmer and i'm learning Java, I've had several issues while reading int and strings, since after the int in Java it doesn't ignore the \n, like it would be in c++ with the cin.ignore, but, that's why I decided to use the Integer.parseInt...   Although, that's not my real problem, my real problem comes later, in the second while loop, that it never ends, even though it reads the end character *, it just won't end.  This is the file content:  CircumsTest 25 150754 UnitedPhase UP 18852 John C 12345678A Marcal B 23456789B * ComunismT CT 6969 Laura D 22233300T Alex M 22355567I * *   And the code, nomCandidat is just a string Name which will indicate me the name of the Candidate and in case there are no more to read, it will be an * to end.   public static void llegirCircumscripcio(Circumscripcio c) throws FileNotFoundException {     File file = new File("ProcesElectoral.txt");     Scanner sc = new Scanner(file);      String nomCircumscripcio = sc.nextLine();     int nEscons = Integer.parseInt(sc.nextLine());     int votsValids = Integer.parseInt(sc.nextLine());      String nomPartit, siglesPartit; int votsPartit;     String nomCandidat, dniCandidat;     c = new Circumscripcio(nomCircumscripcio,nEscons,votsValids);      nomPartit = sc.nextLine();     while(nomPartit != "*"){         siglesPartit = sc.nextLine();         votsPartit = Integer.parseInt(sc.nextLine());         Partit p = new Partit(siglesPartit,nomPartit,votsPartit);          nomCandidat = sc.nextLine();         while(nomCandidat != "*"){             System.out.println(nomCandidat);             dniCandidat = sc.nextLine();             p.afegirCandidat(new Candidat(nomCandidat,dniCandidat));             nomCandidat = sc.nextLine();         }         System.out.println("arribo");         p.mostrarPartit();         c.afegirPartit(p);         nomPartit = sc.nextLine();     }     sc.close();  } public static void main(String[] args) throws FileNotFoundException {     Circumscripcio c = new Circumscripcio();     llegirCircumscripcio(c);     c.mostrarCircumscripcio();     // TODO code application logic here }   Thanks for your help.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


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 ?

I know that PHP doesn't yet have native Enumerations. But I have become accustomed to them from the Java world. I would love to use enums as a way to give predefined values which IDEs' auto-completion features could understand. Constants do the trick, but there's the namespace collision problem and (or actually because) they're global. Arrays don't have the namespace problem, but they're too vague, they can be overwritten at runtime and IDEs rarely know how to autofill their keys without additional static analysis annotations or attributes. Are there any solutions/workarounds you commonly use? Does anyone recall whether the PHP guys have had any thoughts or decisions around enumerations?


I'm new to OSL and Blender. I'm using the following code to generate a circle on a plane. The plane, however, appears to be split into two triangles. Can anyone explain how to fix this so my OSL circle is mapped correctly? Thank you! shader Circle(         float rad=0.75 [[float min=0, float max=1]],         float sharp=0.8 [[float min=0, float max=1]],         int rep=1[[int min=1, int max=10]],         point cent=point(0.5, 0.5, 0),     output color c = 0) {     point pt = point(rep*u, rep*v,0);     float ctx = floor(pt[0])+cent[0];     float cty = floor(pt[1])+cent[1];     point ct = point(ctx, cty, 0);     float d = fmod(distance(ct, pt), rep)/rad;      c = 1-smoothstep(0.5*sharp, 1-0.5*sharp, d);  }

This is my very first day of learning Open Shading Language. I have watched few videos in Youtube and learned a little.   Right now, for learning purpose only, I want to know what OSL codes can draw one black circle against the white ground of plane, but I can't find any tutorial to teach me that.   Next, I want to know how to do a circle grid like this below.    And this too.


How can I get the name of the original function?  def wrap(f):     def wrapped_f(*args, **kwargs):         # do something     return wrapped_f  @wrap def A(params):    # do something  print(A.__name__)   result: wrapped_f, but I need A!

In a comment on this , someone said that they weren't sure what functools.wraps was doing. So, I'm asking this question so that there will be a record of it on StackOverflow for future reference: what does functools.wraps do, exactly?


This is the edit button I was trying to press - nothing comes up when I do.    I went to the link provided and clicked on edit there; it showed me the error message.

I was reviewing a post in the First Posts Queue when I came across a question I wanted to answer, for reference the question I am talking about is linked this one:    I noticed some easy edits that would make it look nice however when I clicked the edit button nothing happened (as if the edit link was dead).  I opened the question in a normal link and the warning regarding an edit is curently waiting popped up:    I would imagine that in the a review queue if someone tries to edit a question (as they would in a normal question) this warning should also pop up but it did not for me.  Is this a bug?


I know the needs of a basic cryptographic hash function (one way, collision unlikely, and minor changes in input are likely to produce major changes in output) and I can read the code for Sha-2 (it is only about 100 lines long or so). However, I have no idea what, and can find nobody who can explain, the intuition behind the algorithm. Why does the Sha family satisfy these requirements? I understand that "why" questions can be difficult to answer, but there needs to be some rhyme or reason behind its implementation.

For example, RSA relies on a mathematically hard problem, factoring, while ECDSA or similar rely on discrete logarithm problem.  What makes SHA-256 and similar hash functions, of the same family, secure against pre-image and collision attacks? What's the math behind it?


Which one will give me more intense background blur with sharp foreground subject?

I know that this effect occurs when there's a shallow depth of field.  My question is, what are the various ways I can increase this effect in my photos when I'm taking them?    Note that I'm not asking  how to use an editing program to achieve this effect after in post production or after the image is captured.


I have read this official documentation: .  There is something i do not understand in constructor injection:  Let's have a look to my code, which works fine:  public class HomeController : Controller {     private readonly UserManager<Utilisateurs> _userManager;     private readonly SignInManager<Utilisateurs> _signInManager;     private readonly RoleManager<IdentityRole> _roleManager;      public HomeController(         SignInManager<Utilisateurs> signInManager,         UserManager<Utilisateurs> userManager,         RoleManager<IdentityRole> roleManager)     {         _userManager = userManager;         _signInManager = signInManager;         _roleManager = roleManager;     }   It works fine too if change constructor parameter orders or if i remove some parameters like this:  public class HomeController : Controller {     private readonly UserManager<Utilisateurs> _userManager;     private readonly SignInManager<Utilisateurs> _signInManager;      public HomeController(         UserManager<Utilisateurs> userManager         SignInManager<Utilisateurs> signInManager,         )     {         _userManager = userManager;         _signInManager = signInManager;     }   I have understood the concept of DI. What i do not understand is how does it works in C# to have something dynamic in constructor parameters ? Is there a set of all kind of overload constructors ?  Thanks

There have been several questions already posted with specific questions about , such as when to use it and what frameworks are there for it. However,  What is dependency injection and when/why should or shouldn't it be used?


I have some packages in .deb format like: google-chrome, teamviewer, brackets and so on that I have downloaded.  My Internet connection is slow, so I need to avoid downloading them again if possible.  I want to install these packages by a command line method, because Ubuntu Software seems unable to install them.

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


I am currently a fixed-term faculty, with the hopes of a tenure-track position somewhere. The last two years I’ve bounced between fixed-term position, both in at least reasonable long-distance driving from where my fiancé and I live. Now a tenure track position has come available for next year still not close to us but again reasonable long distance driving (I've worked anywhere from 1.5-3 hours away).   I am hoping in the time it would take to get tenure at this new position, a tenure track position in our actual city will become available (pretty big metro). Would I be screwing myself to leave the long-distance tenure track position without tenure, if I got a tenure-track position in our local city? Would it be a red-flag that I’m even applying without tenure or could I explain location as the reason for the move in my cover letter?

I hope to receive my PhD in Mathematics in May of 2015, so I am currently applying for jobs.  Due to life circumstances, I'm fairly certain that I will only be staying at my next position for about 2 years.  Does this mean I shouldn't even try to apply for tenure-track positions?  Will a hiring committee not even consider me for the position if I'm not willing to commit to staying with them for a certain amount of time?  I would love to get a teaching/lecturing position at any institute of higher education (4-year research university, liberal arts school, community college), but as I look for openings, a lot of them are tenure-track assistant professor positions.  Should I go through the effort of sending in an application, or will that be a waste of my, and the committee's, time?  Thanks for any advice you have!  Edit (to address Nate's comment):  My wife is currently applying for 2 year graduate degree programs in various cities in the US, so I'm applying for jobs in the same cities.  When she finishes her program, we plan to move outside of the US (Africa or Southeast Asia), where I do hope to remain in academia, teaching mathematics to college-aged students.