How to check if webpage page is scrolled?

Is there any way in javascript to check if web page has been vertically scrolled? specially for Internet Explorer? I need to get the mouse position in IE but using jQuery event e.pageY it gives correct value when page is not scrolled but when page is scrolled down then it gives wrong position.


Why this python code  print 888888803. == 8888888.03*100. prints False?


Is there an OSX shortcut to highlight the cursor position?

I have recently moved from Windows to OSX. I work with multiple screens, so was used to losing the cursor on occasion.  There was a setting in Windows to highlight the cursor location by pressing Ctrl. Is there a similar setting in OSX?


What is a good etiquette to correct a person using wrong title for me?

I currently have a masters degree in an engineering field and I don't currently have any PhD degrees (I may study for a doctorate degree in future). It happens that when I go to conferences or scientific occasions, even in the emails I receive from people; they use a doctor prefix for my name; but I do not have a PhD degree.  What is a good etiquette to deal with such thing? Should I directly tell them that I do not have a doctorate degree? Or should I neglect such a mistake by them and don't do anything?  I think it is unethical not to correct such thing, because the person may still think that I have a PhD degree; and such wrong usage of title should be corrected some way. Once a person used doctor title for my name in an email and I just added a line in my reply to his email, stating that I have a masters degree.


panda reads 0.6 as 0.59999999999999998 - wrong decimal places

Via panda the values in the table below are read with non existing decimal place e.g.: 0.6 is read as 0.59999999999999998 (see code below)  I would have expected to read 0.6 as 0.6.  Why is it interpreted like this and what do I have to code to get the expected behaviour?  ldcSc = pd.read_csv(os.path.join(basepath, 'kmod_table.csv'), skiprows=2) ldcSc      LDC             1        2        3 0   permanent      0.6      0.6     0.50 1   long-term      0.7      0.7     0.55 2   medium-term    0.8      0.8     0.65 3   short-term     0.9      0.9     0.70 4   instantaneous  1.1      1.1     0.90  print(ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'permanent'].index[0]), '2')) print(ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'short-term'].index[0]), '1')) print(ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'medium-term'].index[0]), '3'))   prints to:  0.6 0.9 0.65  BUT:  ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'permanent'].index[0]), '2')   0.59999999999999998  ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'short-term'].index[0]), '1')   0.90000000000000002  ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'medium-term'].index[0]), '3')   0.65000000000000002


He turned his face toward the window without stopping scrolling on his smartphone. Is it grammatically correct to use a gerund after the gerund form of the verb "to stop", which needs to be followed by a gerund in this case?


Format decimal value to currency with 2 decimal places

I am getting data from a csv file and parsing it to my application. In my csv file I have a column price whose value I use as of course the price of an item in my project.   However, the price in the csv file does not contain trailing 0s, For example, if the price of and item is $5.00, the csv file has it as $5, if the price is $9.60, the csv has it as $9.6. Other prices such as $9.56 are fine though.  This is how I retrieve the price from the csv file:   Price = string.IsNullOrEmpty(columns[3].Trim()) ?      null : (decimal?)decimal.Parse(columns[3]),    In my class Price is set as public decimal? Price { get; set; }.  How do I format what is returned to fix this problem?  Price = String.Format("Price: {0:C}",       string.IsNullOrEmpty(columns[3].Trim()) ?          null : (decimal?)decimal.Parse(columns[3]));   I tried the above but didn't work.  How do I fix it so that values in the csv as $5.9 are formatted to $5.90.  EDIT:  Tried:  Price=decimal.Round(string.IsNullOrEmpty(columns[3].Trim()) ?      null :      (decimal?)decimal.Parse(columns[3]), 2, MidpointRounding.AwayFromZero);   Not sure if I did that right?  Also, I'm not certain how I can use the below option in my code:  decimalVar.ToString ("#.##");   Also tried:   Price = string.IsNullOrEmpty(columns[3].Trim()) ?        null : (decimal?)decimal.Parse(columns[3], NumberStyles.Currency)   But still doesn't work.


The electron: why can't it have both momentum and position

Total amateur here. I've been watching video lectures on Quantum Mechanics and it's said that there is no way to know both position and momentum of an electron at the same time. But is it because when people measure one they change the other or because the particle somehow can't have both inherently. If it is the latter, is there any non-mathematical way to explain how come?


When I attempt to use Drush 8.0.3 on a clean Drupal 8.1.1 install, I receive the following error:     Command pm-list needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.   This is on a Digital Ocean server running Ubuntu and nginx.  Drush status:  root@*********:/var/www/html/drupal/sites/default# drush status  Drupal version         :  8.1.1                                        Site URI               :  http://default                               Database driver        :  mysql                                        Database hostname      :  localhost                                    Database port          :                                               Database username      :  drupal                                       Database name          :  drupal                                       PHP configuration      :  /etc/php5/cli/php.ini                        PHP OS                 :  Linux                                        Drush script           :  /usr/local/bin/drush                         Drush version          :  8.0.3                                        Drush temp directory   :  /tmp                                         Drush configuration    :                                               Drush alias files      :                                               Drupal root            :  /var/www/html/drupal                         Drupal Settings File   :  sites/default/settings.php                   Site path              :  sites/default                                Sync config path       :  sites/default/files/config_JYMyTTYRsOD-Wxu0fI7lfugHI6rk2DbhO5g-jrfjsPyy46mmesB1aTpSuq2RAUIOUC4N2q_IkQ/sync                                                                    Oddly (to me, at least) I can clear caches:  root@***************:/var/www/html/drupal/sites/default# drush cr Cache rebuild complete.


I am running Ubuntu 12.04 with Gnome 3. All was working well except that graphics were slow and even moving a window on the screen seemed slow.   I installed the fglrx ati driver. Which seems to have improved matters. But on first login I had all gnome items duplicated. That is my task bar has the ubuntu sign, then says Applications, then places then the ubuntu sign then Aplications and then places.   Any application I run produces two icons at the bottom of the screen. This was after a reboot. I rebooted again. Now I have 3!! On the right each set of icons such as printer is also trippled!!   See screenshot at  See Dmesg at   Any suggestions welcome.   Reboot -> now I have 4!! So one set gets added on each reboot. Help!! I am going to be task barred out before long!!   Does no one have any suggestions at all? Or suggestions about where to look ?   This looks very like bug 650154 at bugzilla.gnome.org/show_bug.cgi?id=650164,   But this bug is closed obsolete. And not only that the code referred to in the fix, in file  /usr/share/gnome-shell/js/ui/appDisplay.js line 129 is completely different to that quoted.   So is this a regression?   Still no comment from this board. I am up to 6 instances now, have lost my application menu since its covered by the other stuff.   So, I make a file, then reboot and immediately after reboot, do a find to find all files newer than the file just made.  This comes up with more than 100000 file, wow. Whittling them down a bit, the following seemed suspicious:   ls /home/mark/.gconf/apps/gnome-terminal/profiles  Default  %gconf.xml  Profile0  Profile1  Profile2  Profile3  There were 5 duplicates at the time so this seemed suspicious.   I removed all directories beginning 'P' in the list above, so there was just Default and %gconf.xml which is empty. (Each of these contains a just one file %gconf.xml)   None of this helped at all. I am up to 7 instances.   Update 18 Dec.  Still no solution.   I discovered that the problem utility is gnome-panel.   Running gnome-panel --replace gets me yet another set without even having to logout and in. I have 10 now.   I tried to reinstall gnome-panel and wow, all seemed good. There was an err, that unfortunatly I did not not.   I tried it again and I was back to many versions running.   Now I am unsure if I had one gnome-panels or none.   I can get rid of all of them by hitting control C on the4 (now) terminal that ran gnome-panel. Thats refreshing but not quite what I want.   Let me try this re-install and relaunch again ...   No, it didnt work 2nd time round.   Hmm. Control C out of that (as Now I just have too many gnome-panels visible to even leave the darned thing running.   If I run gnome-panel, no options as sudo, I am back to just 2, thats interesting.  And thats also pretty refreshing after having more than 12.


How do I create a public view from a private view

It seems like I can't modify a private view to be public, or duplicate a private view to be public.  Am I restricted to copying by hand all the settings of my private view, then creating a fresh public view and selecting all the right columns in the same order with all the sort and filter options?


What reality has more advanced technology?

Which reality has more advanced technology in the Star Trek universe, prime or alternate? It seems that the prime universe has more advanced technology in terms of sensors etc, but alternate pushes development of weapons etc, and has leaps in technology such as transwarp beaming.


There's a way to safely try KDE on top of an Ubuntu installation, keeping the possibility to revert the changes in case I dislike how it runs?


Why couldn't Harry or anybody else see Peter Pettigrew aka Scabbers on the Marauder's Map when Lupin could?

Fred and George stumbled upon the Marauder's map in their first year. They passed it on to Harry while in their fifth year. Also note that, while talking to Harry on the train, Ron described Scabbers as being "Percy's old rat".   Hence, we can safely assume that the twins had the Marauder's Map for about five years. How could they not see Peter Pettigrew on the map, with Percy for first two years and with Ron for the next three years?  How come Harry didn't see Peter? How was Lupin the only one able to see Peter on the map?


Which is Most TimeMachine-like Backup Program for Ubuntu?

I know this  but there is no comparison to OSX's TimeMachine.  I would like to find a backup software which is about the same as TimeMachine or better.  I would like to have such a software which can use some format of HDD which is suitable for big files (50 GB) in Linux.  I noticed that   OSX format of HFS+ is not supported by Linux distros, since no maintainer of HFS in Linux since 2006 NTFS format made by Debian 8.1 is not supported by older Linux distros   If Windows support, good.   Try with the Backups (Deja Dup) software  I did start the backup first time but I wanted to go to lunch after backup was running already two hours of just 10 GB files.  So it gave me this after the lunch    which is really insane, reported now , since the software is not designed to have pauses in doing the backups.


Is interval arithmetic an integral domain?


This one never ceases to confuse me. When to use 'such as' and when to use 'like' while giving examples? Is there any clear rule?        Metros like Mumbai, Delhi and Karachi are unsafe after dark.    Metros such as Mumbai, Delhi and Karachi are unsafe after dark.       (Before anyone points out, Delhi and Karachi are unsafe round-the-clock, but it's just an example.)


Traveling Asia & need to switch to my other passport

I haven two passports (US & Irish). I'm currently traveling on my US passport but it's getting full & want to switch to my Irish passport so I will be able to get a visa when in Indonesia. Will I have any problems at immigration? Should I just stay in Malaysia and get another American passport?


Simulating a Brownian Excursion Process using Software

I would like to simulate a Brownian excursion process using a computer. I want to create sample paths of a Brownian excursion (a Brownian excursion is a Brownian bridge conditioned to be positive at all t between 0 and 1). Is there an easy was for me to do this, maybe in R or Matlab?


Minimum area of the parallelepiped surface

Among all the retangular parallelpipeds of volume $V$, find one whose total surface área is minimum  Using the Lagrange Multipliers method, I've found that it is a cube with dimensions $ \sqrt[3]{V} $. But I don't know how to prove that it is, indeed, a cube with those dimensions, since I couldn't prove that the function $S_A(x,y,z)=2xy + 2xz + 2yz$ (surface total area) have a minimum. Can you help me with it?   Thanks in advance


Problem using head to remove last line of file

I was recently looking for a way to remove the last line of a file foo.txt and came across the following solution     head -n -1 foo.txt temp.txt; mv temp.txt foo.txt   which works fine. However, I also tried simply     head -n -1 foo.txt > foo.txt   which to my surprise left foo.txt an empty text file, and I would like to know why.  I'm just getting started with unix, so it's possible my question is rather silly.


Remove Google Chrome Icon From Dash Search

I just installed Chromium today and removed Google Chrome via sudo apt-get purge Google-Chrome-stable  The application is gone, but the shortcut in my menu is still there. Does anyone have any ideas on how to remove it?  Here's a screenshot of what I see when I type in "Chr(om)", which is how I typically search for Chromium.


The badge “Analytical” says “Visited every section of the FAQ (retired)”. This sounds like nobody can get this badge anymore, but, still, there are some people who earned it recently:     How did they do that?


I have a Dell XPS 13 that originally had Windows, but I removed it because I wanted to use Ubuntu. Unfortunately after some time I started having issues with the Wifi (which are a common problem with this laptop) and have decided to resintall windows.  Can I use the OEM key for activating it?  At some point the official Dell support changed a part of my pc because it was making a lot of noise and I was giving a paper with the new OEM key used to activate it.


Is it okay to use my tablet while charging it? I just got a new tablet. I havn't done it cause I wasn't sure.


I got this error but my game still works. Should I be worried? I can provide the coding that cause this error if needed.  Error:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException         at main.GamePanel.paintComponent(GamePanel.java:77)         at javax.swing.JComponent.paint(Unknown Source)         at javax.swing.JComponent.paintChildren(Unknown Source)         at javax.swing.JComponent.paint(Unknown Source)         at javax.swing.JComponent.paintChildren(Unknown Source)         at javax.swing.JComponent.paint(Unknown Source)         at javax.swing.JLayeredPane.paint(Unknown Source)         at javax.swing.JComponent.paintChildren(Unknown Source)         at javax.swing.JComponent.paintToOffscreen(Unknown Source)         at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)         at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)         at javax.swing.RepaintManager.paint(Unknown Source)         at javax.swing.JComponent.paint(Unknown Source)         at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)         at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)         at java.awt.Container.paint(Unknown Source)         at java.awt.Window.paint(Unknown Source)         at javax.swing.RepaintManager$4.run(Unknown Source)         at javax.swing.RepaintManager$4.run(Unknown Source)         at java.security.AccessController.doPrivileged(Native Method)         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)         at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)         at javax.swing.RepaintManager.access$1300(Unknown Source)         at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)         at java.awt.event.InvocationEvent.dispatch(Unknown Source)         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)         at java.awt.EventQueue.access$500(Unknown Source)         at java.awt.EventQueue$3.run(Unknown Source)         at java.awt.EventQueue$3.run(Unknown Source)         at java.security.AccessController.doPrivileged(Native Method)         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)         at java.awt.EventQueue.dispatchEvent(Unknown Source)         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)         at java.awt.EventDispatchThread.run(Unknown Source)


how to add an directory to "Places" list

I have directory where it is placed in a deep path. so I want to put that in here: How I can do that?


I am making an A0 poster using the lmodern package, which has a strange influence on formula formatting.  Removing this package makes everything work well, but I would like to know what I have done wrong.  With lmodern package :    Without lmodern package :    Here is the corresponding code.  \documentclass[landscape,30pt]{sciposter} \usepackage{amsmath,amssymb,amsrefs} \usepackage[english]{babel} \usepackage{lmodern}   \begin{document}  $$\int_0^\infty \sqrt{\frac{f(t)}{g(t)}}dt$$  \end{document}


When can a pair of groups be embedded in each other?

This is a question I made up, but couldn't solve even after some days' thought. Also if any terminology is unclear or nonstandard, please complain.  Given groups $G$ and $H$, we say that $G$ can be embedded in $H$ if there exists an injective homomorphism $\varphi : G \to H$. (Note that the image $\varphi(G)$ is then isomorphic to $G$.) I am interested in the situation where a pair of groups $G$ and $H$ can be embedded in each other. Of course, this is guaranteed to be the case when $G \cong H$. But is the converse true? More precisely:     Q1. Do there exist non-isomorphic groups $G$ and $H$ such that each of them can be embedded in the other?   I am interested in this because, in my mind, this question is analogous to the  in set theory. Of course, this view could be too naive or useless. Oh well.  The only "progress" I could make is to create another question. Let $\varphi_G:G \to H$ and $\varphi_H:H \to G$ be a pair of embeddings as in the question. Then the homomorphism $\varphi := \varphi_H \circ \varphi_G : G \to G$ is also injective; i.e., it is an embedding. I can show that the image of this map ($K := \varphi(G)$) is a proper subgroup of $G$ unless $G \cong H$. This leads me to another question:      Q2. Does there exists a group $G$ that is isomorphic to a proper subgroup of itself?   If the answer to this is negative, then so is the case for Q1. Though both of these seem "obviously false", I cannot prove them. Nor can I construct a counterexample. Any suggestions?   Some remarks:   Nothing is inherently special about groups here. I suppose one could ask the same question for rings, fields, or other structures; I focused on this specific question for clarity. I tried to search through Wikipedia and Google books, but I cannot figure out the answer or where I can find the answer.  I have no idea as to how easy or difficult these questions are. If they are trivial/easy (say, the level of a standard undergrad homework exercise), then please give me hints rather than a complete solution :-).


Two pictures side by side but with arrows between them

Can somebody help me to draw something like this:   What I tried:  \documentclass[border={10}]{standalone}  \usepackage{tikz}  \begin{document}  \begin{tikzpicture}[x=10pt,y=10pt,>=stealth, scale=.75] \draw[fill=white] (-6,4) .. controls (-3,6) and (1,6) .. (3,4) .. controls (3.5,3.5) and (5,-8) .. (2.5,-10) .. controls (1,-11) and (-1,-11.5) .. (-4,-11) .. controls (-8,-10) and (-9,-8) .. (-6,4);  \end{tikzpicture} \begin{tikzpicture}[x=10pt,y=10pt,>=stealth, scale=.75] \draw[fill=white] (-6,4) .. controls (-3,6) and (1,6) .. (3,4) .. controls (3.5,3.5) and (5,-8) .. (2.5,-10) .. controls (1,-11) and (-1,-11.5) .. (-4,-11) .. controls (-8,-10) and (-9,-8) .. (-6,4); \end{tikzpicture}   \end{document}     These are the two outside contours... I have no idea how to put the arrows or the inside contours.


This is a question you can read everywhere on the web with various answers:  $ext = end(explode('.', $filename)); $ext = substr(strrchr($filename, '.'), 1); $ext = substr($filename, strrpos($filename, '.') + 1); $ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename);  $exts = split("[/\\.]", $filename); $n    = count($exts)-1; $ext  = $exts[$n];   etc.  However, there is always "the best way" and it should be on Stack Overflow.


Name for a phrase, whose words communicate the similar meaning (fluid liquid, white bleach)

How would you call this kind of lexical errors, when two words of a phrase communicate generally similar meaning?   fluid liquid sunny sun white bleach decorative ornament sorrowful misery


Prove continuity for cubic root using epsilon-delta

I am trying to prove that a function is continuous at a point a using the $\epsilon$-$\delta$ theorem. I managed to find a $\delta$ in this case $|2x^2+1 - (2a^2+1)| < \epsilon$. But I have a hard time when the function under consideration is $f(x) = \sqrt[3]{x}$. That is, I want to have if $|x-a|<\delta$, then $|\sqrt[3]{x}-\sqrt[3]{a}| < \epsilon$. Any suggestions?


want to ask a simple thing that when I separate the one face of the cube and now want to apply the material to only that one face but it's applying on the whole cube any reason what I am doing wrong


I am trying to find a way to print the contents of the array, while using a for loop. This is a fairly new section in java to me, as I am a beginner. Any help is appreciate in concerns to my question. My question is would I move the "Random" assessor method into the mutator method or am I just completely wrong and have to do something else.    import java.util.Random;  public class ArrayPractice { private int[] arr; private final int MAX_ARRAY_SIZE = 300; private final int MAX_VALUE = 100;  public ArrayPractice() { // initialize array arr = new int[MAX_ARRAY_SIZE];  // randomly fill array with numbers Random rand = new Random(1234567890); for (int i = 0; i < MAX_ARRAY_SIZE; ++i) {   arr[i] = rand.nextInt(MAX_VALUE) + 1;      }   }  public void printArray( ) {  }  public static void main(String[] args) { ArrayPractice ap = new ArrayPractice();  System.out.println("The contents of my array are: "); ap.printArray(); System.out.println("");     } }


Outputting each chapter of a LaTeX document to a separate PDF

Is it possible to output each chapter of a LaTeX document to a separate PDF? I have a document with 10 chapters and I would like to get 10 PDFs when I compile my document. Could someone help me on this?


Let $K$ be a field and $A$ an affine $K$-algebra. Show that $A$ has (Krull) dimension zero (is artinian) if and only if it is finite dimensional over $K$.


Take the repeating substring in a string

I have a string in Python like the following:   str = "Surname:.......1 of 10 Surname:........2 of 10 Surname.........3 of 10............."   I want to take every substring of the form:  "Surname:.......<number> of 10"  and edit it.  How could I take the n (above is 10) substrings that starts and end with the same form? I have tried the following :       str = 'Surname:mike 1 of 3 Surname:uknown of 3 Surname:little 3 of 3'     x = re.findall("Surname:.*[0-9]*\s*of", str)     print(x)   but the result is :  ['Surname:mike 1 of 3 Surname:uknown of 3 Surname:little 3 of 3']   and I want something like this :   ['Surname:mike 1 of 3','Surname:unkown 2 of 3','Surname:little 3 of 3']   Of course I think there is a solution to iterate through the string but firstly I want to see if there is another solution with less code.


Why are black holes called singularities?

I have researched black holes but I can't seem to find the answer. Any help would be appreciated.


Install suspension forks on non-suspension bike

I have a 1990s Saracen PowerTrax. Is there a way I can install a suspension fork, or will that muck up the bike somehow? I'm actually interested in ways to raise the bars with respect to the seat, so that wouldn't be a problem. My toes rubbing in the wheel, in the other hand, would definitely be a problem.


Prevent bad rankings on a Q and A site for questions without an answer by using noindex until answered

I have a website on which users can ask a question & also they can answer it.  So, when a user asks a question, it creates a new web-page on the website & below that question lies it's answers (if any).  I don't want search engines to index those pages (or questions) which doesn't have an answer, so I added a if condition, stating if the question don't have answer show the noindex meta tag, if it does, then don't show it (so that google can index now).  I was wondering if it the right way to do so?  I mean, first when the question is asked & google will crawl it, it will see the noindex tag. But after some time when it will have an answer google will see that it can be index.  So, will it affect the ranking & overall performance in google search results?


Windows 7 blue screen memory error bugcheck 0x0000001a

Here is my system specifications.    Error:     The computer has rebooted from a bugcheck.  The bugcheck was:   0x0000001a (0x0000000000041790, 0xfffffa8003d23de0,   0x000000000000ffff, 0x0000000000000000). A dump was saved in:   C:\Windows\MEMORY.DMP. Report Id: 080515-65988-01.   Log >


Non-associative commutative binary operation

Is there an example of a non-associative, commutative binary operation?  What about a non-associative, commutative binary operation with identity and inverses?  The only example of a non-associative binary operation I have in mind is the commutator/Lie bracket. But it is not commutative!


My object is not moving smoothly, but in increments of one unit

What is preventing my objects from moving smoothly? Instead of moving slowly and precisely, the object moves by one unit    .


Show "helpful flags" counter and link on the mobile site profile page

There is no "helpful flags" counter (with a link to ) on the mobile version of profile page. And I see no other way to reach flagging summary page and check your flagging history from mobile rather than switching to the full site view.  Desktop version     Mobile version


@ symbol not allowed more than once on comments

Possible Duplicate:             I faced this issue today when I was replying to a comment posted which used @Transaction annotation.     @Trevor: @Transaction and ... @Transaction   When typing this comment, I got a warning.


Last update does not allow to connect to wifi

First time post. Basically after an wifi firmware update my laptop doesn't have WiFi anymore.   When I go to "Software & Updates" >> "Additional Drivers" it says device is not working with two options (which before i remember having about 4 options for this device) -"Do not use device" which is enabled -"Using oem-wifi-intel-iwlwifi-lp1757035-4.4-dkms driver in DKMS format wrapped by dkms-helper...(open source) When I try to select this it fails.  Dell precision 5520  Ubuntu 16.04 intel 8265/8275   Verified iwlwifi-8265-XX.ucode is located in /lib/firmware  rfkill list all > no soft or hard blocks on wifi, but soft block on bluetooth.  iwconfig > lo no wireless extensions  Please let me know what other information you need. Thanks!


Can't boot up Windows 10 after I installed Ubuntu

I have a Windows 10 laptop (Lenovo Z570) and I decided to give Ubuntu a try and install it alongside Windows. So I shrank my D: partition using Windows disk management utility, downloaded the Ubuntu ISO image and booted it from USB. During the setup I chose the Something else option (Note: Ubuntu didn't detect Windows and didn't offer me the option to install it alongside Windows so I chose the Something else option) and made 3 partitions for root, swap and home. When I proceeded with the installation process, an error appeared saying      The 'grub-efi-amd64-signed package failed to install into an target. without the GRUB boot loader, the installed system will not boot.   So I ran the setup again and this time I chose to overwrite the existing Ubuntu installation that wasn't completed and this time the setup succeeded. But when I restarted my laptop, I found out my laptop booted directly into Ubuntu instead of showing me the bootloader. Just when I turn on my laptop and before Ubuntu logo appears, I encounter this error (this error got fixed but GRUB still can't detect Windows 10)   System BootOrder not found. Initializing defaults.   Things I have tried:   Running sudo update-grub and restarting Running boot-repair and restarting and repeating that again (Here's the pastebin for the first time:  and the second:  Changing the boot order to give Ubuntu the priority Mounting the Windows partition, then running sudo os-prober then sudo update-grub Opening GRUB manually by pressing Esc in BIOS, but i just see Ubuntu listed and Windows isn't there   One thing I noticed when changing the boot order is that there were two values called ubuntu not one. Maybe this has to do with the first failed setup I did and then when I did a second setup so maybe it got a little messed up? (This also got fixed and instead it's a single value)


I want to get a .html or .txt file from a folder with PHP, but this file is UTF-8 encoded, and if I use $html=file_get_contents('somewhere/somewhat.html'); and after that I echo $html; then this won't be UTF-8 encoded. I see many "�" in the text. Any idea? How can I prevent this?


Let $f : [0, 2] → \mathbb{R}$ be a continuous, positive function and  $$\int_{0}^1 f(x)\,dx = \int_{1}^2 f(x)\,dx= 1$$ For each $x \in [0, 1]$, prove that there exists a unique function $g(x) \in [1, 2]$ such that $$\int_{x}^{g(x)} f(t)\,dt = 1$$ and $g \in C^1$. Well, I think in $g(x) = x +1$, but I'm not sure. Any hint is appreciated.  Thank you.


Do/Should moderators have the ability to see edits performed during the "grace" period?

I'm not sure if this is a legitimate question for Meta, since it may involve information that is purposefully hidden from the public eye to prevent abuse.  But the reason I ask is due to an issue on .  I flagged  for moderator attention because it was a direct copy-and-paste of  which had already been there for several minutes.  Unfortunately, the original answerer was still actively editing their post, and because these edits were occurring during the grace period, none of them show up in the edit history.  Because of this, I can't show that the two versions actually were identical.  Is there any way for moderators or administrators to see the previous versions in order to prove that the person had just copy-and-pasted the other answer?  Or is that information genuinely lost forever during the grace period and a moderator would just have to "take my word for it"?  (I'd assume that there are still enough similarities between the posts to make it obvious, but you see how it could be an issue or something useful in future cases of such abuse.)  If this isn't an ability that moderators have, should it be one?  Should this data be preserved in some way for just this kind of record keeping?


How to make a progress bar that stays on screen in bash?

I'm new to bash scripts and I'd like to make a simple progressbar  init pb do stuff pb add 10% do other stuff ...   But, the scripts that'll lunch will print some log, and I don't want the progress bar to disappear, I'd like it to stay at the bottom of the screen. Is that possible ?  thanks a lot,  Arthur  Here is my code :  #!/bin/bash echo 'Welcome to autoIrc' echo 'This will automaticly create a gephi file for you' echo 'I suggest running the script in a screen if you are with ssh' # Are you sure ? location=`pwd` echo "We are in $location. Do you want to install the script there ? [Y/n]" read -p 'Y/n >' confirm if [ $confirm != "Y" ] then     echo "I am exiting"     exit fi clear echo 'Cleaning up...' echo -e "\e[100m" echo "We are in $location." echo "Files list here:" echo `ls ./` echo "File list in ../" echo `ls ../` rm ./ircsnapshot -R echo -e "\e[49m" clear # Okay, now, go on echo 'First, a bit of config' read -p "Please enter the bot nickname >" nickname read -p "Please enter the bot username >" username read -p "Please enter the bot realname >" realname read -p "Now, please enter the number of seconds between commands >" throttle read -p "Please enter the server adress >" server  # Git, python, toilet echo 'Downloading dependencies. You may have to enter your SU password.' echo -e "\e[100m" sudo apt-get update -y && apt-get install -y git python toilet echo -e "\e[49m" clear echo 'Dependencies are now installed.'  # Main script echo 'Cloning the script from github to here' echo -e "\e[100m" git clone https://github.com/bwall/ircsnapshot.git echo -e "\e[49m" cd "./ircsnapshot/ircsnapshot" location=`pwd` echo "We are in $location." echo "Files list here:" echo `ls ./` echo "File list in ../" echo `ls ../` echo -e "\e[41m" rm ./example.png echo -e "\e[49m" clear # GeoIP data echo "I will download the database" echo -e "\e[100m" wget -O geolite.zip http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.zip echo -e "\e[49m" clear echo 'Download complete. Unzipping' echo -e "\e[100m" unzip geolite.zip -d ./GeoLiteData echo -e "\e[49m"  mv ./GeoLiteData/*/* ./GeoLiteData  clear echo "Is it OK ?" ping -c 1 $server # script clear echo "We are in $location." echo "Files list here:" echo `ls ./` echo "File list in ../" echo `ls ../` echo "I will lunch the script now It will print some lines and take some time'" echo -e "\e[100m" python "./ircsnapshot.py" "-n $nickname" "-u $username" "-r $realname" "$server" echo -e "\e[49m" # 2nd script echo 'Great !' clear echo "I'll now convert the json generated to something readable by gephi" echo "This will take some time" echo -e "\e[100m" sudo chmod +x ./to.gexf.py var=$(./to.gexf.py -m "./GeoLiteData" "UserToLink" "./$server.json") echo -e "\e[49m" clear echo 'Good.' gexf="./$server.gexf" echo "$var" >> "$gexf" echo "Here it is : ./ircsnapshot/ircsnapshot/$gexf" toilet -t --filter gay Finished install ! exit   EDIT : The "duplicate" does not show a progress bar that stays at the bottom of the screen


I just got the new update, and the app logged me out.  I tried logging in with Google, but when I log in, it redirects me to the Google homepage. I click done and all it does is prompt me to log in again. I do again and it redirects me to Google again. I click done and this time, it shows a white screen.


In , $\exists$ this exercise.  What's fair about a fair game?  Let $X_i$, i = 1, 2, ... be indp RVs s.t. $X_i = i^2 - 1$ with prob $1/i^2$ and $-1$ with prob $1-1/i^2$.  I find it clear that $E(X_n)=0$. However, I do not understand why:  if $S_n = \sum_{i=1}^{n} X_i$, then $S_n/n \to -1$ a.s.  My attempt:  Proving $S_n/n \to -1$ a.s. is equivalent to proving $P(S_n/n = -1 \ i.o.) = 1$ or $P(S_n/n = -1 \ ev.) = 1$. I think?  If so, I just take the first one $P(S_n/n = -1)$, sum it over n's,hope it's infinity and use Borel-Cantelli 2...after proving the events $S_n/n = -1$ are independent, of course.  $P(S_n/n = -1)$  $=P(\sum_{i=1}^{n} X_i = -n)$  $=P(\bigcap_{i=1}^{n} X_i=-1)$ I think?  $=\Pi_{i=1}^{n} P(X_i=-1)$ by independence  $=0$ if I plug in i=1.  Help please?


I just came across to this code , I know how variable length parameter works but i am confuse with this line func(*((userId,)+pargs)  def pwapi_auth(func):     def inner(authToken, *pargs, **kwargs):         # ...         users = {'a':0,                  'b':1,                  'c':2}         userId = users[authToken]         return func(*((userId,)+pargs), **kwargs)     return inner >>> print getUsername('b') Name_2 >>> changeUsername('b', 'New_Person') >>> print getUsername('b') New_Person


In  answer (which I suggested an edit for), the owner of the answer did not use spoiler tags. I suggested an edit with the spoiler tags added, but they are not functioning as expected. Instead of hiding the text in the quote, the ! (from >!) is showing up. Any ideas why this happens?


jQuery UI datepicker dateformat on ajax didn't work

I am having weird problem. I want to have jQuery UI DatePicker with a Dropdown of date format.   I found , and tested and working fine on page load. However, same code is not working when I load the page via ajax call.  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">   <link rel="stylesheet" href="/resources/demos/style.css">   <script src="https://code.jquery.com/jquery-1.12.4.js"></script>   <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>   <script type="text/javascript">   $( function() {     $( "#id_management_date" ).datepicker();     $( "#id_management_date_format" ).on( "change", function() {     alert(3);       $( "#id_management_date" ).datepicker( "option", "dateFormat", $( this ).val() );     });   } );   </script>   On loading the ajax content, I am able to select the calendar. But when I change the format dropdown, it's not formatting date in datepicker.


Let $x,y,z>0$. Show that $$\sum_{cyc}(1-x)^2\ge \sum_{cyc}\dfrac{z^2(1-x^2)(1-y^2)}{(xy+z)^2}.$$ Here's what I have done. The expression $$\sum_{cyc}(1-x)\left((1-x)-\dfrac{z^2(1+x)(1-y^2)}{(xy+z)^2}\right)\ge 0$$ or $$\sum_{cyc}(1-x)\cdot\dfrac{x^2y^2+y^2z^2+xy^2z^2+2xyz-2xz^2-2x^2yz-x^3y^2}{(xy+z)^2}\ge 0.$$ But this way does not help for the starting inequality.


How to vertically center each row of a table

I'm trying to vertically center every row of the table, but I can't. How can I do it?  %\documentclass{article} \documentclass[margin=10pt]{standalone} \usepackage{array,booktabs,siunitx} \newcolumntype{Q}[1]{>{\hfil$}p{#1}<{$\hfill}} % centered, automatic math mode \usepackage[table]{xcolor} % for "\rowcolor" macro \usepackage{amsmath}  \renewcommand{\rmdefault}{phv} %\usepackage{mathpple} %\usepackage{palatino}  \usepackage{lxfonts} % %   \usepackage{multicol}  \begin{document} \centering \setlength{\extrarowheight}{20pt} % for a more "open" look \begin{tabular}{|*{5}{Q{2cm}|}} % or: {|*{b}{c|}} \hline \rowcolor{yellow} \textbf{$a$} & \textbf{$b$}& \textbf{$a+b$} & \textbf{$a-b$} \\ \hline \dfrac{157}{3}   & \dfrac{14}{9}       &   \dfrac{485}{9} & \dfrac{457{9}  \\ \hline \dfrac{704}{25}      & 3      &   \dfrac{779}{25} & \dfrac{625}{25}     \\ \hline \end{tabular} \end{document}


Highlight patterns in command output (grep-like but without excluding lines)

I need a command that colorizes some symbol sequence in output of a certain command. I'd like it like grep make it.  $ some-command | grep symbol-sequence   However grep removed lines that isn't contained symbol-sequence. I'd like to have all original lines with highlighted symbol-sequence. How it can be done?    I have alias grep='grep --color=auto' in ~/.bashrc


Why is Star fleet headquarters in  San Francisco California, instead of New York city  or Lyon France ?  United Nations or Interpol represent international functions somewhat reflective of the Federation of Planets. San Francisco seems unlikely to be a historical and symbolic choice for the representation of unity of  the earth. The UN and Interpol and it's geographical sites and purpose would serve as a better memory of Unity.


(Binomal Distribution) With n = 20, p = 0.2, calculate the probability that 2X >4 (Homework)

This is a homework question. The scenario is as follows: A dishwasher can accommodate 20 plates in one loading. With every loading, there is a 20% chance that 1 plate will not be cleaned properly. With X representing the number of plates that are not cleaned properly, find P(2X > 4). n = 20, p = 0.2  I have no idea how to find P(2X > 4). Any hints or thoughts on this is greatly appreciated


Check 2 tables for differences, use programming language or pure SQL

I'm trying to check 2 tables (10k plus rows) for inconsistent data. e.g. both table have a "id" and "price" column and I want to know when id are equal are the price also equal. I would like to create a output that tells me exactly which id have different/inconsistent prices.  I have to do this check 3 times where 1a,1b,1c is all on different servers. table1 - table1a table1 - table1b table1 - table1c  Is this more efficiently done with pure SQL or with a programming language + SQL (python with pyodbc or java with jdbc etc). Since I'm new to SQL I don't know how trivial this would be with pure SQL.


Best alternative to prepared statement when using SELECT SQLite?

I am running this function:  public int getSubjectId(int level, String subject){     SQLiteDatabase db = this.getWritableDatabase();     Cursor subjectCursor = db.rawQuery("select * from " + SUBJECTS_TABLE_NAME + " where "+ SUBJECTS_COL_2 + " = " + subject + " and " + SUBJECTS_COL_3 + "="+level,null);     ArrayList<Integer> mArrayList = new ArrayList<Integer>();     for(subjectCursor.moveToFirst(); !subjectCursor.isAfterLast(); subjectCursor.moveToNext()) {         mArrayList.add(subjectCursor.getInt(0));     }     return mArrayList.get(0); }   in an attempt to return the id of the first item in the table where both column 2 and 3 match the function arguments. However when it does run I get an error message as the function is searching for a column with the name of the subject inputted and not the row containing that value.   I get the error:   Error Code : 1 (SQLITE_ERROR) Caused By : SQL(query) error or missing database. (no such column: Maths (code 1):   Normally I would fix this problem using a prepared statement, but I have read that they should not be used when you are trying to return a value, which in this case I am as I want to return the ArrayList. Perhaps I have misinterpreted and prepared statements are ok in this situation, but either way I would appreciate any help finding the best solution to the error I am getting.  Thanks  EDIT:  SQLiteDatabase db = this.getWritableDatabase();     String sql = "select * from " + SUBJECTS_TABLE_NAME + " where "+ SUBJECTS_COL_2 + " =?" + " and " + SUBJECTS_COL_3 + "=? ";     SQLiteStatement statement = db.compileStatement(sql);     statement.bindString(1, subject);     statement.bindString(2, level);      Cursor subjectCursor = statement.???();


Indent Theorem like \hangindent, but for multiple paragraphs

I would like to create a theorem style which indents the theorem exactly like a \hangindent would do, expect that the indention should continue for all paragraphs of the theorem.   For example:  Theorem 1.2.3: Lipsum Lorem ipsum dolor sit amet,     consectetuer adipiscing elit.  Ut purus elit,      vestibulum ut, placerat ac, adipiscing vitae, felis.      Curabitur dictum gravida mauris. Nam arcu libero,      nonummy eget, consectetuer id, vulputate ...   I tried this, but it does not work correctly:  \documentclass[parskip=half]{scrartcl} \usepackage{amsthm,thmtools} \usepackage{lipsum} \usepackage{showframe}  \let\thm\relax \declaretheoremstyle[     headfont=\bfseries,     bodyfont=\normalfont\leftskip2.5em,     headindent={-2.5em} ]{INDENTthm} \declaretheorem[     within=section,     style=INDENTthm,     name=Theorem ]{thm}  \begin{document} \begin{thm}     \lipsum[1]      \lipsum[2] \end{thm} \end{document}   What happens is that the theorem header suddenly has a negative indention relative to the page, i.e. starts just a little to the left of the actual page, although I would expect "2.5em-2.5em=0em"... :-)


I'm creating a new VPN service, to enable players of the Crysis 1, Crysis Wars, and Crysis 2 games to continue playing after the online multiplayer is shut down at the end of this month.  The purpose of this VPN service is to provide a private LAN, where players can connect to the VPN and view the LAN server list to connect to servers (servers obviously have to be connected to the VPN also).  This is where the problem lies; I only want the VPN server to support this server network, and not allow people access to the internet. This is because if they download torrents, watch video, etc, it will make the VPN server slow. Obviously I can just block all access to the web, but unfortunately most players like to browse the internet, play music on YouTube, etc, while playing.  Is it possible on Windows to only allow the games and servers to use the VPN, while forcing users to bypass the VPN for other internet communication? Is there some Windows Firewall rule that can be applied to create this behaviour? I only want the gameservers and games to use the VPN server.  If this isn't possible, is it possible programmatically? C++ and Lua can only be used for this.  The VPN is on Linux.


I am using Windows Server 2008 Enterprise with SQL Server 2008 Enterprise. I am considering whether using SAN or using NAS is better to store database data files. Are there any industry readings to compare whether NAS or SAN is better for database storage scenario?  Besides my database storage scenario, any industry readings to compare SAN with NAS to see which technology is better suitable for which scenario?  thanks in advance, George


I was just wondering What would happen if the earth spins the other way around purely interms of Physics ?


I want to make a lightsaber where the edjes/sides are more red and in the middle it is white, so I tried using the layer weight node with a color ramp and I got a nice result when looking from the front, but when I look sideways its all red without any white in the middle (first picture). (My material  nodes are shown in the second picture). Any solutions? I have another idea but I don't think it will look that good. I was thinking to add bloom in the final render and use only an emission shader with red color and strength a big number like 200 so it would look white, and the bloom would add that red color around it.  I am using cycles


Do I end up richer paying down a mortgage or contributing to an IRA?

I have $10,000 extra cash that I can either use to pay down my 5% mortgage, or contribute to my IRA.  I'm 30 years old.  I hope to pay off the mortgage in about 5 years.  I'm stymied, because:   Paying $10,000 into my mortgage earns me $500 a year (in interest savings) for the life of the mortgage -- hopefully 5 years. Paying $10,000 into my IRA earns me roughly a $3000 lowering of my tax bill now (plus CD ROI of about 1% at retirement time.)   So I can get $2500 ($500 a year over 5 years), after which I will have paid my mortgage off with other money; or I could get $3000 in cash right now plus a bit of extra money when I retire.  Even ignoring the future benefits of the IRA contribution, it feels like I should put the money into my IRA: it's an immediate 30% return on investment, as opposed to a 5% return for 5 years.  But if I always make that decision, I won't be paying off my mortgage early, and that $500 will stretch out over 30 years, costing me $15,000!  Which actually leaves me with more money in the end?  What basic principle of math am I missing?  Update:  The principle of math I was missing is that, assuming I'm taxed at the same rate when I retire as I am taxed now, I end up with exactly as much money as if I had invested the $10k and not received a $3k tax reduction.  (Of course, my income level and tax laws will have changed by then, but let's ignore that.)  So the question simplifies to, "Should I put $10k toward eliminating a 5% debt or toward a 1% investment?" in which case I should clearly put it toward the mortgage.  I was confused by the government incentive into thinking that retirement investment was a sweeter deal than it actually is.  This is probably their goal, and probably a noble one :)


Financial proof to get a Schengen visa to France

I am planning to apply for a Schengen visa to visit France. I have an attestation d'acceuil, but the visa requires I submit bank statement for the past 3 months. I can get this statement, but the problem is that my company has been paying my salary in cash for the past months, and I place the money into the account by myself.  Can I submit the following?   my accounting book (current account)  letter from the bank stating that I have money in it payslips for the past 3 months   Will that satisfy the financial requirements for the visa?


Could it be correct to have the word "however" flanked by two commas?

Could it be correct to have the word "however" in the middle of the sentence flanked by two commas instead of a semicolon and a comma?  When I want to write something like this:     His passive vocabulary has definitely increased, however, his   ability to express himself in English still needs to be developed.   The software application "Word" always automatically changes it into this:     His passive vocabulary has definitely increased; however, his   ability to express himself in English still needs to be developed.   Does that mean that two commas on each side of however is always wrong and will give a wrong meaning?


Indexing different subdomains on a sitemap

I'm building a sitemap for a page available in different languages, however the URL construction was done with subdomains and not folders. I'd like to know if it's possible to indicate a different sitemap for the subdomain pages inside the main page, as follows:  </url> <loc>http://www.example.com/</loc> </url> <url> <loc>http://fr.example.com/index-sitemap.xml</loc> </url> <url> <loc>http://es.example.com/index-sitemap.xml</loc> </url> <url> <loc>http://it.example.com/index-sitemap.xml</loc> </url> <url> <loc>http://blog.example.com/index-sitemap.xml</loc> </url>


Coprime cofactors of n'th powers are n'th powers, up to associates, for Gaussian integers & UFD

I'm trying to do the following exercise from Neukirch's Algebraic Number Theory (exercise 2, $\S 1$, chapter 1):  Show that, in the ring $\mathbb{Z}[i]$, the relation $\alpha\beta=\varepsilon\gamma^n$, for $\alpha,\beta$ relatively prime numbers and $\varepsilon$ a unit, implies $\alpha=\varepsilon^{\prime}\xi^n$ and $\beta=\varepsilon^{\prime\prime}\eta^n$, with $\varepsilon^{\prime},\varepsilon^{\prime\prime}$ units.  My attempt: once $\alpha$ and $\beta$ are relatively prime, $\alpha\nmid\beta$ and $\beta\nmid\alpha$. Therefore $N(\alpha)$ and $N(\beta)$ are relatively prime too (where $N(a+ib)=a^2+b^2$). Therefore,  $$N(\alpha\beta)=N(\alpha)N(\beta)=N(\varepsilon)N(\gamma^n)=N(\gamma)^n=(p_1\cdot\ldots\cdot p_r)^n=p_1^n\cdot\ldots\cdot p_r^n$$  And once $N(\alpha)$ and $N(\beta)$ are relatively prime, we have (if necessary, we reorder the $p_i$'s):  $$N(\alpha)=p_1^n\cdot\ldots\cdot p_k^n=(p_1\cdot\ldots\cdot p_k)^n=N(\xi)^n=N(\xi^n)$$ and $$N(\beta)=p_{k+1}^n\cdot\ldots\cdot p_r^n=(p_{k+1}\cdot\ldots\cdot p_r)^n=N(\eta)^n=N(\eta^n)$$  And the result follows.  But I'm not sure about one step. It is $\alpha$ and $\beta$ relatively prime $\Rightarrow$ $N(\alpha)$ and $N(\beta)$ relatively prime. I know that if $\alpha|\beta$ then $N(\alpha)|N(\beta)$, but the previous assertion is not necesseraly true, and if it is, and don't know how to prove it. If it is true, the result follows, unless I made something wrong in the rest of the proof.  That's it. If you know another way of doing the exercise, please show me.


Near Analysis takes much longer in ArcPy?

I have a feature class of about 12 points, a feature class of hundreds of roads, and need to find the nearest road to each point. So the obvious solution () takes about 20 seconds, and the results are fine.  When I try to put it in a script (see below), it takes 90 minutes. Also, even though it doesn't crash/error, the results aren't right (the NEAR_FID and NEAR_DIST for each point are both "-1"). I'm running it within ArcMap as a tool, and the run time is all from the Near analysis (it quickly gets through importing the parameters, and then just thinks for a very long time).  I didn't use any of the optional parameters (radius, record angle, record xy, etc.) when running Near either manually or in the script. The data are the same.  Any ideas what is causing the trouble?  import arcpy from arcpy import env  pointsFC = arcpy.GetParameterAsText(0) arcpy.AddMessage("Feature Class to be analyzed: " + pointsFC)  spatialRef = arcpy.Describe(pointsFC).spatialReference  outputWorkspace = arcpy.GetParameterAsText(1) env.workspace = outputWorkspace arcpy.AddMessage("Output Workspace " + outputWorkspace)  roadsFC = arcpy.GetParameterAsText(2) arcpy.AddMessage("Roads Layer: " + roadsFC)  # try to find the nearest road try:     in_feature = pointsFC     near_feature = roadsFC     arcpy.AddMessage("Finding nearest " + roadsFC + " to " + pointsFC)     arcpy.Near_analysis(in_feature, near_feature) except:     arcpy.AddMessage(">> NEAR didn't work")


My friend who recently introduced me to LaTeX always pronounced it "Lay-Tek". Is he wrong? assuming he isn't why is LaTeX pronounced this way when it clearly has nothing to with the X at the end?


How can I produce an unnumbered chapter for the introduction?

If I did  \setcounter{chapter}{-1} \chapter{Introduction}   then I get Chapter 0 Introduction. I just want the word Introduction, and I want it also in the contents when I use   \tableofcontents   How can I do that?


I have been asked to create a new post with my question. So it is about starting from a distribution function and proving that we can always find a probability space. My attempt is this :   So assume we have a probability space $(\Omega, \mathcal{F}, P)$ and a random variable $X : \Omega \rightarrow \mathbb{R}^*$. * Here we start with the distribution function $F$. increasing and right continuous, st. $F(\infty) = 1$ and $F(-\infty) = 0$. We define :  \begin{align} P_I : I &\longmapsto [0,1] \quad I \in \mathbb{R}^2 \text{ (interval)} \\ [a,b] &\longmapsto F(b) - F(a) \end{align}   We can define $P_X$ on the borel sets by decomposing the set into disjoint intervals :    \begin{align} P_X : \mathcal{B}(\mathbb{R}^*) &\longmapsto [0,1] \quad B = \dot \bigcup B_i \quad B_i \in \mathbb{R}^2 \\ B &\longmapsto \sum_i P_I[a_i,b_i]  \end{align}   By taking $X$ as the identity function we have $\Omega = \mathbb{R}^*$ and $P = (P_X)_{\Omega}$   One user pointed out that not every borel sets is a countable union/ intersection of intervals. So my question is how to proceed from there to finish the demonstration ?  EDIT :   I finally ended up with that :   We can define $P_X$ on the algebra $\mathcal{A} = \{A:A = \sum_i [a_i, b_i]\}$ with $-\infty < a_i \leq b_i < \infty$    \begin{align} P_X : \mathcal{A} &\longmapsto [0,1] \\ A &\longmapsto \sum_i P_I[a_i,b_i]  \end{align}   $P_X$ is a probability measure on the algebra $\mathcal{A}$ so it can be extended to the minimal $\sigma$-algebra containing all closed intervals. We have then $\sigma(\mathcal{A}) = \mathcal{B}(\mathbb{R})$. We just finally take this new measure $P$ and construct the probability space $(\mathbb{R}, \mathcal{B}(\mathbb{R}),P)$   Thoughts ?


Can you use Wish to duplicate a spell at a higher level?

Wish allows you to duplicate the effects of any spell L8 or lower. Does that include a lower-level spell, cast at L8? Say, as a Wizard, casting Heal at L8.  I'm leaning towards yes, but it wouldn't be the first time I assume the wrong answer...


After various issues with Nvidia drivers (GT1030), trying various ones in the Ubuntu software manager with different levels of success, I went to the Nvidia site and searched for Linux drivers, for which very recent ones for my card seem to exist. But the download was a .run file, something I'd not seen before. Is this right for Ubuntu? It would only let me run it in recovery mode (as said an Nvidia driver was already loaded) and once installed, instead of auto logging on, I got the login window with my account, but was unable to log in. I restored from Time Shift. Can someone please enlighten me as to what I did wrong? Many thanks.


Oneboxing is a handy feature in chat for quickly previewing links, but the list of supported sites is very small, and occasionally boxes for sites such as Wikipedia can break and fetch any image/text.  Instead of having to request additional sites to be added to the onebox list (, , , , , and of course ), we could let the sites themselves handle the oneboxing with some <meta> tags, such as:  <meta name="onebox-title" content="The Onebox Title"/> <meta name="onebox-image" content="/image.png"/> <meta name="onebox-summary" content="This is the summary for a site's onebox"/>   Then when a link is placed on its own in chat, the oneboxing spider would look for these tags and, if they are found, show the appropriate data.  Support for these tags would certainly be bad (for lack of any real better term) at first, though most users of SO chat could easily add it to their personal / company's sites (should they be in such a position) and writing friendly suggestions to other sites to implement them isn't exactly a gargantuan effort.  This would also present an opportunity for currently oneboxed sites to set in stone what should be shown, such as each Wikipedia article setting the main image to be oneboxed instead of SO's spider picking one willy-nilly.  Finally, sites implementing these tags would lay the foundation for other sites and services to develop similar features to the onebox, without having to write per-site scrapers.


Auto logging / tracking records changes at MS SQL

how can I set automatic recording all changes that were done at tables records (Updates) and to get some info / logging summery? thanks


Bibliography is not Printed Using Tex Studio

This is a question from the answer given in the  I used the following codes given there,  \documentclass{article}  \usepackage[defernumbers=true]{biblatex}  \DeclareBibliographyCategory{cited} \AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}  \usepackage{filecontents}  \begin{filecontents}{\jobname.bib} @misc{A01,   author = {Author, A.},   year = {2001},   title = {Alpha}, } @misc{B02,   author = {Buthor, B.},   year = {2002},   title = {Bravo}, } @misc{C03,   author = {Cuthor, C.},   year = {2003},   title = {Charlie}, } \end{filecontents}  \addbibresource{\jobname.bib}  \nocite{*}  \begin{document}  Some text \autocite{A01,B02}.\cite{A01,B02}  \printbibliography[category=cited]% default title for `article` class: "References"  \printbibliography[title={Further Reading},notcategory=cited]  \end{document}   But while I am running, it is giving this output, not like whatever given in that answer.    Questions:   And one more important thing, it is not listing the reference items. Means I could not find the Reference in my article at last page. In citation, it is not giving the numerical values, whereas it is giving the keys. I want the numerical values like [1], [2], etc.   What is the problem? Help me  Technical Details:   I am using Linux mint and Texstudio to compile this...


how to create an alert box using tcolorbox

I have tried to align the exclamation mark and I could not center it both vertically and horizontally, well my goal is to make it look the same as this image   \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[most]{tcolorbox} \usepackage[x11names,table]{xcolor} %------------------------- \definecolor{orang}{RGB}{255,155,0}  \newtcolorbox[auto counter,number within=section]{caja}[1][]{   enhanced jigsaw,colback=white,colframe=orang,coltitle=orang,   fonttitle=\bfseries\sffamily,   sharp corners,   detach title,   leftrule=22mm,   underlay unbroken and first={\node[below,text=white,font=\sffamily\bfseries,align=center]     at ([xshift=-11mm,yshift=-1mm]interior.north west) {\Huge \centering  \textbf{!}};},   breakable,pad at break=1mm,   #1,   code={\ifdefempty{\tcbtitletext}{}{\tcbset{before upper={\tcbtitle\par\medskip}}}}, } %---------------------- \begin{document} \section{example}  \begin{caja}[title=warning] The vertical alignment settings are only relevant for boxes which are larger than their natural height, see Section 4.10 on page 53. \end{caja} \end{document}   As you may have noticed, this box has a title and seems to have an effect on the alignment


How much force is required to lift the back of a 2,480 lb car in the air from the bumper?

I don't know the EXACT measurements, but I can closely guess that the bumper is about 18 inches from the ground, and the engine is in the front, yes(the engine is about 20 inches from the front bumper inside the hood, and about 23 inches centered between the hood on both sides). I don't know what the engine weighs, but the car's overall curb weight (whatever that means) is 2,480 lbs. Convert to any other weight measurements if you wish, but I'm most used to pounds.  I can assume you can easily find the specs of the size ... it's a Toyota Corolla 2002 blue SE limited-edition model.   Specs:  It is about fourteen feet and six inches long.  It is five feet and size inches wide from both doors on the front left to right seats.  The wheelbase is around eight feet.  The car is in total four feet and five inches from the floor to the roof in height.  I don't know if this question is relevant or meets the standards here, but I would really appreciate someone decent at physics and maths to help me find the weight here that is lifted from the back bumper's height, and the total force necessary to raise both wheels in the air about one inch.  Some have said that since there's shocks, the weight is favorable to the lifter somewhat, but to what degree I'm uncertain.  Any help would be greatly appreciated in your findings on this issue.


How should degrees be listed in an e-mail signature?

I have the following degrees:   PhD in Information Technology (Computer Science concentration)  MS in Systems Engineering (MSE)  MS in Engineering Management (MEM) BS in Computer Science   What would a proper e-mail signature look like?  Examples:  Dr. Bob Roberts PhD IT, MSE, MEM   or  Dr. Bob Roberts PhD Information Technology MS Systems Engineering MS Engineering Management BS Computer Science


What is a mixin, and why are they useful?

In "", Mark Lutz mentions "mixins". I'm from a C/C++/C# background and I have not heard the term before. What is a mixin?   Reading between the lines of  (which I've linked to because it's quite long), I'm presuming it's a case of using multiple inheritance to extend a class as opposed to 'proper' subclassing. Is this right?   Why would I want to do that rather than put the new functionality into a subclass? For that matter, why would a mixin/multiple inheritance approach be better than using composition?  What separates a mixin from multiple inheritance? Is it just a matter of semantics?


People should be treated equally be it rich or be it poor.  Is it a correct sentence. If yes what does it mean???


Evaluate $\lim\limits_{n\rightarrow \infty}\frac{n+n^2+n^3+\cdots +n^n}{1^n+2^n+3^n+\cdots +n^n}.$

Problem Evaluate  $$\lim\limits_{n\rightarrow \infty}\frac{n+n^2+n^3+\cdots +n^n}{1^n+2^n+3^n+\cdots +n^n}.$$ My solution Notice that $$\lim_{n \to \infty}\frac{n+n^2+n^3+\cdots +n^n}{n^n}=\lim_{n \to \infty}\frac{n(n^n-1)}{(n-1)n^n}=\lim_{n \to \infty}\frac{1-\dfrac{1}{n^n}}{1-\dfrac{1}{n}}=1,$$and  $$\lim_{n \to \infty}\frac{1+2^n+3^n+\cdots+n^n}{n^n}=\frac{e}{e-1}.$$  Hence,\begin{align*}\lim\limits_{n\rightarrow \infty}\frac{n+n^2+n^3+\cdots +n^n}{1^n+2^n+3^n+\cdots +n^n}&=\lim_{n \to \infty}\frac{\dfrac{n+n^2+n^3+\cdots +n^n}{n^n}}{\dfrac{1+2^n+3^n+\cdots +n^n}{n^n}}\\&=\frac{\lim\limits_{n \to \infty}\dfrac{n+n^2+n^3+\cdots +n^n}{n^n}}{\lim\limits_{n \to \infty}\dfrac{1+2^n+3^n+\cdots +n^n}{n^n}}\\&=1-\frac{1}{e}.\end{align*} The solution posted above need to quote an uncommon limit. Is there another more simple and more direct solution?


Here is the question:     $$\frac{\sqrt{10+\sqrt{1}}+\sqrt{10+\sqrt{2}}+\cdots+\sqrt{10+\sqrt{99}} }{\sqrt{10-\sqrt{1}}+\sqrt{10-\sqrt{2}}+\cdots+\sqrt{10-\sqrt{99}}} = \;?$$   ()  I think we need to simplify it writing it in summation sign as you can see here:  $$\frac{\sum\limits_{n=1}^{99} \sqrt{10 + \sqrt{n}}}{\sum\limits_{n=1}^{99} \sqrt{10 - \sqrt{n}}}$$  or in Wolfram Alpha input in comments.  I can compute it too! It's easy to write a script for this kind of question. I need a way to solve it. How would you solve it on a piece of paper?


What makes induction a valid proof technique?

What makes induction (over natural numbers) a valid proof technique? Is $$ \dfrac{ P(0) \quad \forall i \in \mathbb{N}. P(i) \Rightarrow P(i+1) }{ \forall n \in \mathbb{N}.  P(n)} $$ just taken for granted as a proof rule, or can it be derived from more foundational axioms?  Similarly, can the principle of induction over well-founded sets be derived from something more foundational, or does it have to be assumed to be a valid inference rule?


I have an idea for a small game which would generate random 3D planets.   I already have found a way to create a random heightmap in XNA ().   How would I be able to wrap the heightmap around a sphere and then render it on the sphere, creating a planet-like terrain?  Also, would I be able to do something similiar with the .NET port of libnoise (XNA port: )?  I'm not asking for code or anything, just some ideas on how to do something like that.   Thanks.


How to prove that $x^2+1=5^y$ has no positive integer solutions for $y\geq 2$?

I am sure I saw a similar question like this one before but I can't find it now. I tried using "order" but failed. It is quite obvious when $y$ is an even number. The real problem is when $y$ is odd. Is there any easy way to solve this? Thanks.


Need a batch renamer app for Linux.  I have 4 folders with 3 folders each. after the rename operation, I want to have  folder1   - file1.txt   - file2.txt   - file3.txt folder2   - file1.txt   - file2.txt   - file3.txt and so on.   When I try to use Krename => [$dirname]####, I get   folder1   - file1.txt   - file2.txt   - file3.txt folder2   - file4.txt   - file5.txt   - file6.txt and so on.   Any suggestion for a GUI app that can do it? Thanks


Power supply noise problem in a measurement system

This might be a bit long to explain but actually a power supply noise is affecting a system's measurements. I will briefly try to explain the system and the noise issue with several pics. This is directly related to my previous question:   I'm using this [system][1] together with this [module][2](SECTION 4 shows ELECTRONIC COMPONENTS). This is a pressure scanner system. Basically the ZOC modules amplifies and multiplexes 64 pressure channels(500Hz sampling freq. for each channel) and sends the particular channel's analog voltage output(chosen by a decoder code sent from the system) to the RAD_unit which then converts this voltage to a digital by its ADCs and sends to a PC.  Here is the basic illustration of the system setup:  [![enter image description here][3]][3]  All system is fed from one AC mains outlet using a power strip.  Depending on the day, time of the day or powering the system through different AC mains outlets I was getting different magnitude of spiky noises in my measurements. Below shows this difference. Both voltage is on vertical axis represents sensor data and scaled with factor 100.(For example 10 in vertical pressure axis is 0.1 Volt). Here is a comparison of two measurements where the bottom is when there is spiky noise:  [![enter image description here][4]][4]  Later on I checked the +-15VDC power supply outputs(RPM100 in above illustartion) which powers the module and sensors, and I found out there is noise similar to the one in measurements.   Here is how the power supply connects to the module:  [![enter image description here][5]][5]  And here are some screenshots of the power supply's +15V to GND measurements from scope in AC coupling:  A very noisy situation:  In FFT view:  A less spiky/noisy situation:  [![enter image description here][8]][8]  And here when there is almost no significant noise(the gap is scope's artifact):  Question:  It seems to me there is a big correlation between the measurement noise and the power supply noise here. Power supply is very old at least a decade old but a special one and powers all the units with its special connector.  1-) What kind of power supply noise can it be? It is obviously effected by the AC lines)  2-) For a quick solution, Im planning to cut the cable and place 100nF caps between +15V to GND and -15V to GND. Do you think it can be a solution? And if so would 100nF be okay?


Do the septons and septas of the Seven have magic powers?

In Game of Thrones, the priests of the Red God and the Old Gods of the Forest exhibit magic powers. Do the devotees of the Seven exhibit similar power?


Looking for a short story about a boy discovering that the government puts mind control chemicals in his cereal

I would have read this around 1985-1998 because I remember being in school at the time. It may have been in a short story collection with "The Ugly Little Boy" and a story about a family dealing with people in the future coming back to enhance the intelligence of their baby with enfante terrible results. A boy, grade school age or so and very intelligent, discovers (or possibly just decides) that there are drugs in the food that prevent one from thinking critically. The details are kind of fuzzy in my head, but I remember that he at one point distills the chemical from his cereal, which he'd detected as having a high concentration, and overdoses. He's convinced that the government is trying to silence him — a scene that sticks out in my mind was him falling on a moving sidewalk and tearing his clothing as he tries to escape two "men in black" type figures that are pursuing him. The short story ended with him deciding that he was better off just consuming the food and being happy in his ignorance.  Years later, as an adult learning about mental illness, it struck me that the story was slightly ambiguous as to whether there actually were chemicals, and that the use of drugs that dulled his creativity and intelligence, and the decision to take them anyhow, was reminiscent of the feelings that manic people have toward their medications.  Anyone know what this one was?


I have a late 2012 27" iMac running El Capitan (10.11.5). It is a 3.2 GHz i5 with 32GB of 1600MHz DDR3, 3TB fusion drive. It's worth noting that as of right now I can't get Graphics/Display information from the System Info tool.  While using the the mac, it randomly powers off. It will not power on again until I have unplugged it for a minute or two.  Within the last 6 months, Apple Genius techs have replaced:   Logic Board Harddrive power supply Power supply connector cable (not sure what this actually is). GPU? I don't remember if they replaced the GPU, but one of the last times I had it serviced they deliberately ran a graphics "stress test" for a few hours before letting me pick it up again and the test came out fine.   Here is a portion of my Console log right before the last startup:    My GPU has been restarting a lot recently as well. I can provide more from the gpuRestart kernel logs if necessary.  How do I trouble shoot this issue? I don't see any errors in the Console logs and when the mac starts back up, there is no dialog indicating that it knows it recovered from an error.  Other notes:   Hardware check was clean. Identical mac plugged in on the same surge protector and not having issues. Bluetooth is disabled. I am using a USB mouse, keyboard and headset. My mac 'otherwise' feels healthy - nice graphics when playing a game, no UI slowness in other apps, wifi is fast. I/O is fast. I am the only user on this mac, other than the guest account. I cannot correlate shutdowns to running any specific program. I have changed from using Chrome to Safari with no luck. I have been running nothing but Finder when crashes happen. I have also been playing games when crashes happen.   I am trying to debug this myself after countless sessions with Apple support repeating the same steps for an hour only to get to a point where they ask me to take it in to a Genius appointment only to have them say they can't reproduce it.


Let $a$, $b$ and $c$ be three distinct integers and $P$ a polynomial with integer coefficients. Show: $P(a)=b, P(b)=c$ and $P(c)=a$ isn't possible

Let $a$, $b$ and $c$ be three distinct integers and $P$ a polynomial with integer coefficients. Show that the conditions $P(a)=b, P(b)=c$ and $P(c)=a$ cannot be satisfied simultaneously.  Using polynomial remainder theorem:   Remainder of the division of a polynomial $P(a)$ by a polynomial $a-b$ is equal to $P(b)$. Remainder of the division of a polynomial $P(b)$ by a polynomial $b-c$ is equal to $P(c)$. Remainder of the division of a polynomial $P(c)$ by a polynomial $c-a$ is equal to $P(a)$.   I can't find example where $P(a)=b,P(b)=c,P(c)=a$.  How to prove this contradiction?


How can I install GNOME 3.12 on saucy (13.10)?

After reading the following blog post and YouTube video:       I would like to try out GNOME 3.12. How do I install it on my saucy(amd64)?


Oldish Scfi dystopian horror movie with monsters that have spikes for arms

I can't remember much about it other than something/one unleashed a machine within a giant pit, and then what I assume is either space marines, or regular military had to deal with the issue. It didn't go well obviously. The monsters had arms that were basically spikes and were very fast, and every human slain was dropped into the pit to become a monster via a conveyor belt and saw blades. However the hero overcame the machine after he was put in and won.


How do I interpret all these parameters?

Call: lm(formula = log(psoda) ~ prpblck + log(income) + prppov, data = wooldridge::discrim)  Residuals:      Min       1Q   Median       3Q      Max  -0.32218 -0.04648  0.00651  0.04272  0.35622   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept) -1.46333    0.29371  -4.982  9.4e-07 *** prpblck      0.07281    0.03068   2.373   0.0181 *   log(income)  0.13696    0.02676   5.119  4.8e-07 *** prppov       0.38036    0.13279   2.864   0.0044 **  --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 0.08137 on 397 degrees of freedom   (9 observations deleted due to missingness) Multiple R-squared:  0.08696,   Adjusted R-squared:  0.08006  F-statistic:  12.6 on 3 and 397 DF,  p-value: 6.917e-08 ```


Proving $f(x) = \frac{\sin x}{x}$ converges by improper integral test?

So my professor talked about one example of improper integrals and I'm having difficulty understanding the general proof outline for proving convergence.   I was given the problem to prove that $$f(x) = \begin{cases} \frac{\sin x}{x}, & x>0 \\ 1, & x=0 \end{cases}$$ converges . The proof then goes like (proof is in blockquotes and my question/comments follow underneath it):     $f$ is continuous at $x \ \forall \ x >0$ and $f$ is continuous at $x=0$.   My question: I know how to show continuity with the epsilon-delta argument, but other than that how can I tell if something is continuous? Specifically for this case, why do we have continuity for all $x>0$ and $x=0$?      Therefore $f$ is RI on $[a,b] \ \forall \ b>0$. In particular, $f$ is RI on $[0,1]$. So $\displaystyle \int_0^{\infty} f(x) dx$ converges iff $\displaystyle \int_1^{\infty} f(x)dx$ converges.   I'm guessing that this is from the comparison test for improper integrals where if $|f(x)| \leq g(x)$ then $\displaystyle \int_a^{\infty} g(x) dx$ converges. Clearly the integral from $1$ to infinity is smaller than the integral from $0$ to infinity.     And so we look at   \begin{align*} \lim_{b \rightarrow \infty} \int_1^{b} \frac{\sin x}{x} dx &= \lim_{b \rightarrow \infty} \left[-\frac{1}{x} \cos x\right]_1^{b} - \int_1^{b} \frac{\cos x}{x^2} dx \\ &= \lim_{b \rightarrow \infty} \left(\frac{-\cos b}{b} +\cos(1)\right) - \int_1^{\infty} \frac{\cos x}{x^2} dx. \end{align*}   I understand this is done by integration by parts.      Finally, we have that $\displaystyle \int_1^{\infty} \frac{\cos x}{x^2} dx$ converges because $\displaystyle \left|\frac{\cos x}{x^2}\right| < \frac{1}{x^2}$ and $\displaystyle \int_1^{\infty} \frac{1}{x^2}$ converges.   Does $\displaystyle \int_1^{\infty} \frac{1}{x^2}$ converge from the fact that $\displaystyle \sum \frac{1}{n^p}$ converges if $p>1$?


Estimate file space usage on a device (not in a directory)

I have two devices /dev/sdc1 and /dev/sdc3.  /dev/sdc1 is mounted on / and /dev/sdc3 is mounted on /home.  The problem is that the device sdc1 is full whereas sdc3 has a lot of spare space. I want to determine where all that space on sdc1 gone (I suspect installed packages. a lot of them).  I tried to use du (and ncdu which makes this info more visual) but it calculates size of the whole tree (/home is nested on /) and I want to know only what's filling one of my devices. Is there a way to do that?  To clarify: I need some way to calculate usage of a device, not just exclude some subdirectories (which may be applicable in my situation, but I believe it can be more complex than that)


There are so many good answers to my questions that it's sometimes hard to decide what answer to designate as accepted. I really feel that more than one is "accepted."   What should one do in this case? Pick one randomly or just leave no answer marked as accepted?


Environment for two columns with lstlistings

In order to reduce copy-pasting, I want to create an environment that will produce a two-column table with headers and two listings in different languages, like below:  \begin{tabular}{l l} Python & Haskell \\ \hline \\ \lstset{language=Python} \begin{lstlisting} A \end{lstlisting} & \lstset{language=Haskell} \begin{lstlisting} B \end{lstlisting} \end{tabular}   I want to use it like below, hiding everything but code:  \begin{comparison} A \vs B \end{comparison}   So far I tried making two new environments (instead of a \vs command inside) with \lstnewenvironment, where first environment had \tabularx command and second \endtabularx. I also tried creating normal \newenvironment for this tabular, & for \vs command and manually inserting \begin{lstlistings} and \end{lstlistings} with code, but it stopped compiling when I put lstlistings inside.  How can I create such an environment?  EDIT: The most compact version I've came up with until now is  \newenvironment{comparison} {\begin{parcolumns}[nofirstindent,distance=0pt,colwidths={1=0.35\textwidth}]{2}} {\end{parcolumns}}  \lstnewenvironment{python} {Python \lstset{language=Python,frame=t}} {}  \lstnewenvironment{haskell} {Haskell \lstset{language=Haskell,frame=t}} {}   which is used like that:  \begin{comparison} \colchunk{ \begin{python} A \end{python} } \colchunk{ \begin{haskell} B \end{haskell} } \end{comparison}   I'm still unable to hide \colchunk{} within python or haskell environments.


I am a math student and I am taking my first physics course of Mechanics. But I don't know the difference between the $w=mg$ force and $F=G\cfrac{m_1 m_2}{r^2}$ (why we don't use the first one when talking about the interaction between our planet and me).   For me, the two forces are related since $g$ is the gravitational acceleration. I know that $F=G\cfrac{m_1 m_2}{r^2}$  is the force with which the earth attracts us (because we have mass).


$-1$ isn't a quadratic residue $\pmod{p}, p=4k+3$.

I remember coming across this fact a while ago in a pdf somewhere, but I haven't been able to find it again. Can someone show me how to prove it? I would appreciate easier proofs.  EDIT: I'm very sorry, I forgot to actually state it.  Prove that $-1$ is not a quadratic residue modulo primes of the form $4k+3$.  Thanks!


in -> inner  out -> outer / (outter?)  What is the history or set of rules behind why 'inner' doubles the 'n' but 'outer' doesn't double the 't'?


How to Convert Calculation String to Double

Following string in my input  "(((5292-5325)-(5401/5))/5325)"   I need to calculate this one and wants to get output in float. For that I used string to float conversion but I got exception. how to do that one?


Show the given function is not continuous

Let $f:\Bbb C\to \Bbb C$ by $$f(z)=\begin{cases} e^{-1/z^4}\ \text{if}\ z\neq 0\\ 0\ \text{if}\ z=0\end{cases}$$ Show $f$ is not continuous at $0$.  I tired to solve this by finding some appropriate curve so along that curve, its directional derivative is nonzero. Could you help?


Singular noun objects of plural subjects

What is the rule for singular noun objects of plural subjects? For example I and  agree that     They gave their word.   is better than     They gave their words.   To my mind, this is because each has but a single word to give and cannot give more. However, google seems to  on     They gave their life.   vs     They gave their lives.   As you can see in the linked N-gram, the second is far more common than the first. What's going on here? People (cats excluded) only have one life and it seems passing strange that they would be able, let alone willing, to give more.   If pressed, I would claim that the object should only be plural if each of the subjects has many. For example     They called their friends   If each of the "they" in question has only one of whatever object we are talking about I would call it ungrammatical to have that object in the plural form. Am I wrong?    EDIT:  This question was prompted by a comment on  on S&F.SE defending the use of consciousnesses as the plural form of consciousness by referring to . The word was used in this sentence:     Looking for a story where people download their consciousnesses into bodies   It occurred to me that whether or not consciousnesses is correct, it should not be used in that (admittedly bizarre) context since each person only has one consciousness to download. I would have therefore said     Looking for a story where people download their consciousness into bodies   This to me seems like an equivalent sentence to they gave their word or they gave their life. In all three cases I would use the singular form of the noun since each of the subjects can only give (or download as the case may be) one.


Usage of respectively with "or" vs "and"

Is this a correct way of using respectively in the following sentence  The word respectively should link "X" with "above" and "Y with "below".      X and Y may have incentives to keep and push stock prices above or below thresholds, respectively.   I would like that readers understand it as:   X has only the incentive to push and keep prices above thresholds.   Y has only the incentive to push and keep prices below thresholds.   Is it better to use "or" or "and" between "above" and "below"?


Me and my friends did a project during final semester. It got accepted for publication. Later I came to abroad for studies. My friends didn’t add my name as a co author.I have given my input and it’s my project idea to initiate. Can we add my name as a co author later?


Please give me full instrunction for dual boot of two linux one is ubuntu and second is fedora. i like ubuntu but, also fedora Thank you


introduce a restrictive clause without using that

That/which/who are commonly used to introduce a restrictive clause. But some sentences sound fine even without it.  Example:     John received medicines under development in the research lab.   OR     John received medicines that were under development in the research   lab.   Is there a grammar issue with the first sentence for formal piece? If so, why?


Describe the image of the set $\{z=x+iy:x>0,y>0\}$ under the mapping $w=\frac{z-i}{z+i}$  So from this mapping , I can see that $a=1, b=-i, c=1, d=i$ thus $ad-bc=i+i=2i \not =0$ so this is a Mobius transformation. Solving for $z$ I got  $$z=\frac{i+iw}{1-w}$$  for $w=u+iv$, we have   $$z=\frac{-2v+i(1-u^2-v^2)}{(1-u^2)+v^2}$$  so $x=\frac{-2v}{(1-u^2)+v^2}$ and $y=\frac{1-u^2-v^2}{(1-u^2)+v^2}$  Since $x>0$, $v<0$  and since $y>0$, $1-u^2 -v^2 >0$, thus $u^2 +v^2 <1$, this implies that the image is the interior of a unit circle center at the origin, but since $v<0$, we only take the negative part.


Uninstalling QGIS that was installed using OSGeo

I installed QGIS using OSGEO4W, and would love to know how to uninstall it, because when I go to "Control Panel > Programs > Uninstall" the program does not appear in the list of installed programs.   How can I do this?


Why 'go to source' reaching the end of the correspondig frame in Beamer in TexStudio?

'Go to Source':  Which allows to go the right source code when you right click and choose the option 'go to source' in TexStudio pdf viewer.   It works well and good in other classes such as article, report, etc.   But in beamer, this gets me only to the end of the corresponding frame not the exact source code.      Why 'go to source' reaching the end of the corresponding frame in Beamer in Tex Studio?


Where is the profile picture stored on OSX?

I would like to know where the profile picture is stored on OSX that is created when you setup the account first.


Why didn't Dr.strange use the time stone when this event occurred?

In Avengers: Infinity War, why didn't Dr. Strange use the time stone when Star-Lord woke up Thanos?  Did he forget?


I am using an external Web-cam with a build-in Microphone. When I am using Skype or some other Software it doesn’t recognise the Microphone automatically. So I always have to activate it myself in the Audio Settings. How can I avoid this and set it as default Web-cam.  This PC doesn't have another Webcam or Mic. And the Web-cam is always pluged in.  Ubuntu 12.04 beta with latest updates (I also had this problems with 10.04) Logitech, Inc. Web-cam B500


Why does not the Euclidean space support a countably additive measure defined for all subsets?

The three axioms that a measure function $m$ need satisfy are as follows. Let the word "measure" mean the value returned by this measure function, $m$ defined on a set in $\mathbb{R^n}$.   The measure of an interval $I$ is its length: $m(I)= l(I)$; The measure is translation invariant: $m(E+y) = m(E)$; The measure is countably additive over countable disjoint union of sets: $$m(\bigcup_{k=1}^\infty E_k)=\sum_{k=1}^{\infty} m(E_k)$$.   My questions are: Why cannot a set function be defined that satisfy all the above? What is the geometry or structure of $\mathbb{R^n}$ that prevents this from happening?  Considering $\mathbb{R^n}$ is complete, totally ordered, it seems like a space that is not pathological at all, yet it harbors this problem when comes to measure. Could someone explain why? Thank you.  Also, even though existence of a non-measurable set can be shown, can one be actually constructed?


In what dialects is "I don't like it too" grammatical?

Consider:  Too — (adv.) also, as well, in addition.    We don’t usually use too in negative clauses; we use either instead:   I don’t like that kind of stuff. I don’t like it either.   That said, here’s my concern: I’ve heard a native speaker from the Lake District (in the UK) say “I won’t do it and she won't do it too.”    When asked if that's how he usually phrases such sentences, I got an affirmative answer. This then reminded me of John Lennon’s lyrics to his song “Imagine”, which I had always thought must be wrong:     Imagine there’s no countries    It isn’t hard to do    Nothing to kill or die for    And no religion too   Is it grammatical in the UK (or in certain regions) to use too instead of either in such sentences?


How to generate 4 digit random numbers in java from 0000 to 9999

I tried the following  int number = ThreadLocalRandom.current().nextInt(1000, 9999 + 1);   But it won't generate 4 digit numbers like 0004,0035 and so on...  I searched for similar questions but none solved, they were different from what I need, if there's already an existing question please let me know.  I need no genarate numbers like 1485 and 0180, not only numbers starting with 0.


Regaining control of a group after being removed by another admin

I created a Facebook group and was later removed by another admin.   How do I get my group back?


If two particles are entangled at a distance of light years, does changing one affect the other instantaneously, or does it take years to occur?   What gives us the answer to this question?


Centre of Mass of Electrons in an Orbital

Without going deep into mathematics and simply using symmetry arguments I made the following observations-  An electron has a probability of being at a particular position Let's take the 1s orbital of a Hydrogen like single electron species and a uniform sphere at some distance $r$ from it. By Symmetry we can conclude the electron is equally likely to be present at any point on the sphere. Hence for any point P on the sphere there will be a diametrically opposite point Q passing through the nucleus where the electron is equally likely present. Let's say at 2 different times the electron is actually present there so for those instants the mass of electron is present at that point. All of this happens very quickly in fractions of seconds it can be on some point and then at another so for an observer it would seem it's present at multiple points right? If the observer then tries to calculate the average position of the electron taking symmetry arguments wouldn't it lie on the nucleus itself as the average of two diametrically opposite points is the midpoint of the diameter i.e. the nucleus.  With this isn't this somewhat similar to saying the Centre of Mass of the electron lies at the nucleus as the centre of mass is the point where we can assume the mass to be concentrated and we can take similar symmetry methods to calculate say the centre of mass of a uniform solid sphere to be at the centre. This is just something I thought of a while ago, does this make sense to conclude? Also if I were to extend this to multi electron species how would the reasoning go? How would I incorporate the effects of other electronic interactions? Edit: As pointed out by  in the comments the assumption that the electron is at a particular position is wrong, however even if we leave out that part i still feel the symmetry argument should hold


How to get this only in small letters (lowercase)?

I used the following code to give out the category name (without link) in a single post.  How would it be possible for the category name that is given out to only appears in small letters ?  I just think this has to be made with substring, but I dont get it :) Could somebody please help me :)  <?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?>


So... I just got a new hat today. I can't understand how I got it, and since it's secret hat (which is also weird), it doesn't show up in the "WinterBash 2014" page. It's called "Fascinating" hat, and I'm wearing it now.  Any idea?


type French accents with US international keyboard

I am running Lubuntu on my laptop and would like to write French accents with a US keyboard. I find the compose key solution ([Alt]+[accent] at the same time, followed by a [letter]) not that handy...  On Windows, there is a better solution: switch the keyboard layout to US-international and then type [`] followed by [a] to display [à]. Still on Windows, the software  makes it even easier: press once [e] to get [e], twice [e] to get [é], three times [e] to get [è]...  Is there a way to achieve that on lubuntu? With a script or something?  PS: My keyboard is Vietnamese, but exactly corresponds to the US keyboard.


I'm studying linearized gravity, for which the weakness of the gravitational field is expressed as ability to decompose the metric into the (flat) Minkowski metric plus a small perturbation, i.e. $$g_{\mu\nu}=\eta_{\mu\nu}+h_{\mu\nu},\;\;\;\;\; \left|h_{\mu\nu}\ll 1\right|.$$ Let's restrict to coordinates in which $\eta_{\mu\nu}$ takes its canonical form, $\eta_{\mu\nu}=\mathrm{diag}\left(-1,+1,+1,+1\right)$. The assumption that $h_{\mu\nu}$ is "small" allows us to ignore anything that is higher than first order in this quantity. My teacher said that we thus obtain $$g^{\mu\nu}=\eta^{\mu\nu}-h^{\mu\nu},$$ where $h^{\mu\nu}=\eta^{\mu\rho}\eta^{\nu\sigma}h_{\rho\sigma}$.  I understand why we can raise and lower indices with $\eta$ (due to perturbative order of corrections), but - and I know it's silly - I can't see why there should be a relative minus sign in the expression for $g^{\mu\nu}$.


Is it allowed to for two tables to have two types of relationships between them?

I have been going back and forth working with relational and no-sql databases for some time now and my questions may be the result of mixing the way of thinking about how to approach a problem. So consider a simple multiple-choice quiz scenario where a question has an undefined number of answers (meaning it is not a fixed number of answers that each question has. One question could have two alternatives and another could have five). This question will have one correct answer. As such, if we want to have an initial translation between what I just wrote to SQL terms, it will be something like this: Question                Answer ===============|       |========== Id             |       |Id ---------------|------<|---------- Title          |       |Body ---------------|-------|---------- CorrectAnswerId|       |QuestionId  So in my mind, a question can have many answers, and an answer can only be linked to one question -> One-to-Many relationship between Question and Asnwer. Also each question has one and only one correct answer -> One-to-One relationship between Question and Asnwer. What I am trying to ask is, Is this design acceptable? If not what approach can I take? One thing that I could do is to add a IsCorrectAnswer flag to the Answer entity. However it makes updating the correct answer to a question more difficult and (in my opinion) error-prone. Clarification of what I mean by "allowed" I would like the data to be normalized as much as possible (which I think won't be with my first solution) and I would like not to have any update, insert and delete anomalies either (which I think the second solution "might" have)


Downsides of switching from default LaTeX document classes to KOMA-Script variants?

I'm considering switching from the article class to KOMA-Script's scrartcl, due to the availability of a \subtitle environment - a rather weak reason. I've read the  of useful features / benefits of KOMA-Script classes, but I wonder - are there issues which should discourage me from switching? e.g. compatibility with certain packages, multi-language/directionality gotchas, and so on?


Can Xbox 360 and PS3 players go online together in Grand Theft Auto 5?

My friend and I really want to play GTA 5 together but we cant figure out how. Were friends on Rockstar Social Club so will that help?  Please answer


Why isn't the texture in rendered view transparent but the material view is

When setting up the alpha mapping for the wings I noticed the feathers were transparent in material view but not in the rendered view.


How to create/update OS level environment variable using the java programming?

I have spent enough time on google to get the satiesfied answer, but couldn't get any luck.  Finally, I decided to post a question over here.  Generally, using JAVA we are able to read the OS environment variable using the following code:  String value = System.getenv(env); or  Map<String, String> env = System.getenv();   Now, i am looking for System.setenv(key, value) kind of thing.  I am using jdk-1.8 & currently working on the Windows but looking for cross platform.  Thank you in advance if any one can help me at this point of time.  UPDATED :-     If this is duplicate then give me the answered URL of this question   which needs to be satisfy me.   I Believe, The  is not correctly touch the point what i am asking.


Why does force along center of mass produce translation motion?

I am not sure if I am asking a very complicated question but I want to know exactly what is happening at the molecular level that exerting force along center of mass produces linear motion and not torque and force away from COM produces torque and not pure linear motion. Does force not get distributed properly or something when force is away from COM thus producing torque where individual molecules of an object move at different velocity, acceleration. If this is part of the explanation, what is the mechanism for this. I have searched the net exhaustively for an intuitive and non mathematical explanation and so far I feel like I have not progressed as all on this question. Can anyone please give a non-mathematical explanation for why this is so?


How to make quick disabling/enabling of all the elements in any div (inputs, links and jQ Buttons)?


How to shutdown a computer remotely from outside LAN?

I would like to be able to shutdown or restart a computer on a remote network. If it were on my local area network, I would use the shutdown -i command. How can I do this remotely? I cannot use Remote Desktop Connection. The network has a static IP address.


How to install a new package in TeXstudio? Spesifically I want to install TikZ package to draw automata.


Fix missing ssl-cert for subdomain www. using redirect or similar

We're using setup with an nginx on one machine and (currently) one application server on apache in the back.  For multiple domains we got ssl certs, but only for the domain itself. So without subdomain www. Everything works as expected, we do not use the  anywhere. But we have customers who are typing this in by hand, resulting in a warning in the browser on the clientside. ..and a new seo guy insisting on working www subdomain WITH ssl.  What am i looking for: A creative solution which does not require new certificates for 20+ domains.  I already thought about getting certificates from let's encrypt for our www subdomain, then 301 to domain.tld.. but it's still in beta.  Any ideas ?