Prove that $\{\frac{\phi (n)}{n}\}_{n \in \Bbb N}$ is dense in $[0,1]$

suppose that $\phi(n)$ is Euler function. prove that, $\{\frac{\phi (n)}{n}\}_{n \in \Bbb N}$ is dense in $[0,1]$  (if $A_n=\{1 \leq m \leq n \mid m \in \Bbb N ; \gcd(n,m)=1\}$ then $\phi(n)=|A_n|$)  I think : If $p$ is prime then $\phi(p)=p-1$. for any $ \varepsilon > 0 $ there is a prime number $p$ such that $1-\varepsilon \leq \frac{p-1}{p} \leq 1$. for other elements i don't know what can i do.


I want to lock the file whenever I perform read/write operation on that file. No other program or function can access file until I do not release the file. How do you do this in Python?


I have a seagate 320 GB hdd on my linux machine. From a week, SMART utility has been warning me to backup as the disk failure is imminent.   Report failed on the "Bad sectors attribute" which is  Normalized: 1 Worst: 1 Threshold: 36 Value: 4095 sectors  I don't know the meaning of these terms. Can someone please explain and suggest me what to do? Will reformatting the entire hard disk help?  P.S. I can't post the images of the SMART report since my reputation points are less than 10.  EDIT: How can I tell when will the disk fail? Any measures to extend the life by some weeks?


How could I best write a hotkey script that opens an url in the webbrowser (firefox)?  Example:  ALT+G = www.google.de ALT+W = www.wikipedia.de   Or would I have to use some kind of existing software therefore?


I found the following proof for Mantel's theorem in Lecture 1 of . I cannot understand the equality that I have highlighted in the image was arrived at. I would appreciate some assistance.     Theorem 1 (Mantel's theorem) *If a graph $G$ on $n$ vertices contains no triangle then it contains at most $\frac {n^2}{4}$ edges.       First proof Suppose that $G$ has $m$ edges. Let $x$ and $y$ be two vertices in $G$ which are joined by an edge. If $d(v)$ is the degree of a vertex $v$, we see that $d(x)+d(y)\leq n$. This is because every vertex in the graph $G$ is connected to at most one of $x$ and $y$. Note now that    $$\bbox[5px,border:2px solid red]{    \sum_x d^2(x)=\sum_{x,y\in E} \big( d(x)+d(y)\big)    }    \leq mn.$$   On the other hand, since $\sum_x d(x)=2m$, the Cauchy-Schwarz inequality implies that    $$\sum_x d^2(x)\geq\frac{\big(\sum_x d(x)\big)^2}{n} \geq \frac{4m^2}{n}.$$   Therfore   $$\frac{4m^2}{n} \leq mn,$$   and the result follows. $\tag*{$\square$}$   For people with visulal limitations, the highlighted part is: $$\sum_x d^2(x)=\sum_{x,y\in E} \big( d(x)+d(y)\big) \leq mn.$$


$\ell^p\!,$ for $p\neq2$, is not an inner product space.

Consider sequence spaces of the form,  $$\ell^p=\Big\{x=\left(x_j\right)_{j=1}^\infty  \mathrel{}\big|\mathrel{} \sum_{j=1}^\infty \left\lvert x_j \right\rvert ^p\lt\infty\Big\}$$  for $1\le p\lt\infty$, equipped with the norm,  $$\left\|x\right\|_p:=\left(\sum_{j=1}^\infty\left\lvert x_j \right\rvert ^p\right)^{\frac{1}{p}}$$  for $x\in\ell^p$.  Now, in the case that $n=2$, the familiar norm on $\ell^2$ is obtained from the inner product, that is to say that the norm is induced by the inner product. And since $\ell^2$ is a infinite-dimensional Banach space, it follows that it is in fact an infinite dimensional Hilbert space.  Why is it, that when $p\neq2$, the space $\ell^p$ is not an inner product space?


Commuting to work for the first time, what do I need to bring?

I've never biked to work, but am going to start next week. It's only about 15 miles round trip. I'm using a single speed bike, but it should be fine because I've gone on farther trips.  Besides a change of clothes, what are the essential items that I need to bring with me? Safety is important so besides a helmet, what safety equipment do I need to have/use?  Any tips would also be helpful because I'm pretty new to this.


For example, I run  sleep 1 | sleep 2 | sleep 3 &   How do I get process ids of each part? I could examine output of jobs -l but its format may wary among shells and I am looking for a simpler way.


The free U2 album was downloaded to my iPod Touch. It does not show up in my iTunes library on the computer. I do not want this album. How do I now delete the songs from my iPod Touch?


how to package a python application for publishing in Ubuntu Software Center

I have a running python application, I am wondering how package it for publishing into myapps


Subtract one day from date with format as mm/dd/yyyy

I have a date field that is being placed into a .csv and I need to subtract one day from each date. These dates are taken from one csv as a String variable, and placed into another as a String variable. These dates are all formatted as mm/dd/yyyy, and I need to subtract one day from each of these dates. I am looking for the best solution on how to do this.   For example I have a date as 7/28/2016 which I need to be taken to 7/27/2016.  All help is very appreciated, thanks in advance.  EDIT: I really appreciate all the answers so fast, really ended up separating this into steps like the first comment, I could have used the JodaTime answer but I just went other options that i was seeing around.   This is the code:   private String subtractDate(String date) {         SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");         String returnValue = "";         try {             Date newDate = formatter.parse(date);             Calendar cal = Calendar.getInstance();             cal.setTime(newDate);             cal.add(Calendar.DATE, -1);             Date minusOne = cal.getTime();             returnValue = formatter.format(minusOne);         } catch (Exception e) {             e.printStackTrace();         }         return returnValue;     }   This is working correctly now, again I really appreciate all the answers. I'm going to accept the first answer as I see it would work, but I just did not go that route.


Efficient way to sort a column of 2D array

I need to sort a column of a 2D array. What is the most efficient way to do so? Can I copy the entire column of 2D array to a new 1D array then sort it from there. I need it to be fast.


I'm asking here a question which was asked on the italian TeX group forum.  Is there a way to produce Epub output automatically from a LaTeX source?  I should remark that Epub is just HTML+a subset of CSS+some XML for metadata, packed in a ZIP file. So one can settle with the existing tools for HTML conversion. Still something better could be done for Epub output.  In the first place, Epub accepts only a subset of CSS. Then it would be nice to produce the file with the metadata from the LaTeX source too. Finally, I'm not sure how it works, but Epub files allow for automatic hyphenation of words. By this I mean that hyphenation can be specified in the Epub file itself, so that a reader will not need to know hyphenation rules. Note that since Epub files are resizable, all possible points of hyphenation must be specified.


Proving the Identity Theorem for polynomials

Bob tells me that the Identity Theorem is the three following statements   If a polynomial has infinitely many roots, then it is equal to $0$. If two polynomials satisfy $P(x)=Q(x)$ for infinitely many $x$, then the two polynomials are equal. If two polynomials of at most degree $n$ satisfy $P(x)=Q(x)$ for $n+1$ values of $x$, then the two polynomials are equal.   I do not know how to prove these; I think the Factor, Remainder, and Division Theorems will be useful.  I tried using Fundamental Theorem of Algebra, but it did not get me anywhere.


Allocate each five elements of an array to a block

I have 15 elements in an array and I want to allocate each five of them to a block respectively. The elements are:  elements=["a",'b','c','d','e','f','g','h','i','j','k','l','m','n','o']   I wanted to say first 5 elements are belonged to block#1, second five are belonged to block#2 and so on. I need to do it in a loop structure as later on, I need to use the information of each block for a special task. As I am new to python I don't know how to write it. Any advice will be highly appreciated.


Interpolating heights in DEM using ArcGIS API's in C#

I am new to ArcGIS and not familiar with it. I want to interpolate heights in a DEM file using ArcGIS? Is it possible? Actually, I want to write a C# code that will read the height from DEM file for given coordinates, and if the height is missing then I will perform interpolation and return the height.  I want to use ArcGIS interpolation algorithms instead of writing my own.


Why do researchers sometimes use extremely complicated English sentences to convey their meaning?

I will begin with a disclaimer, I am not an English native speaker, but I can speak fluent English and understand English in almost all research papers I read.   However, occasionally I come across some papers published in peer reviewed journals  with ridiculously complicated sentence structure using relic non-technical vocabulary that no one in the past century has heard of!   Here is one of my favorites:     The algorithm fathoms in a synergetic manner globally, and an antagonistic depth quest locally.   Whatever that means!  Don't get me wrong, the content of such papers can sometimes be informative, but I can't help but get frustrated over such over complication in language! I can spend days trying to decipher what the author was trying to convey and I occasionally give up on the entire paper.  So my question is, why do authors feel the need to hide their amazing ideas/contributions behind such language barrier? Would it hurt to write the paper in a simple fashion such that any reader with the required technical background can understand it?      auth'rs, wherefore thee doth this?


The question states the following: Prove that the system $x \equiv a \bmod m, x \equiv b \bmod n$ has solution iff $\gcd(m,n) \vert a-b.$ The first implication is immediate since $x-a = km,x-b=qn$, hence subtracting both expressions we get that $a-b = qn - km$, $a-b \in (m,n)$, $\gcd(m,n) \mid (a-b)$. However, I don't know how to prove the reciprocal. Any suggestions?


Does it increase security if the CBC chunks of a AES-256 encrypted bytestream are uploaded to different clouds?

I want to backup my data according to the 3-2-1 rule. I am already back up to 2 different drives (2 different systems) at home. In addition, I would like to use cloud storage (Google, Amazon, etc.). Considering the future weakening of cryptography by advancements in computing power (e.g. key guessing by quantum computing) I want my data to be as safe as possible because once it's uploaded it's prone to decryption in the future (i can't guarantee the data is deleted if I delete it from the cloud(s)). Does it increase the security of my data if I split the CBC chunks to let's say 2 clouds? Uploading the even-numbered CBC elements to e.g. Google and the odd-numbered elements to Amazon. Since one storage hoster is constantly missing the next part of the CBC-Chain (1/2 in total) shouldn't this increase security of the data even if the AES key is known by the hoster(s)?


Proving $\sum_{k=1}^n\frac1{\sqrt k}<2\sqrt n$ by induction

I am just starting out learning mathematical induction and I got this homework question to prove with induction but I am not managing. $$\sum_{k=1}^n\frac1{\sqrt k}<2\sqrt n$$ Please help!


I have an alias defined in my .bashrc  alias l.='ls -d .* --color=auto'   It's very useful :) but it doesn't work via ssh:  $ ssh localhost l. bash: l.: command not found   Why is that?


Why is the sum over all positive integers equal to -1/12?

Recently, sources for mathematical infotainment, for example , have given some information on the interpretation of divergent series as real numbers, for example  $\sum_{i=0}^\infty i = -{1 \over 12}$  This equation in particular is said to have some importance in modern physics, but, being infotainment, there is not much detail beyond that.  As an IT Major, I am intrigued by the implications of this, and also the mathematical backgrounds, especially since this equality is also used in the expansion of the domain of the Riemann-Zeta function.  But how does this work? Where does this equation come from, and how can we think of it in more intuitive terms?


How to get many more diamonds in Minecraft?

Diamonds are so rare that you can hardly build diamond tools or armour. Even with a Fortune 3 pickaxe, the supply is small.How can you have many more diamonds with which you can easily go through Nether and The End,but also beat enemies in the Overworld?


Should I copy my answer to a duplicate question to the original question?

I answered to  and it was marked as possible duplicate. Then I looked at  (the original question) and thought that my answer can be helpful there, even though the question has an already accepted answer. Should I copy my answer to the original question? Would it be better to wait the possible duplicate to be closed?


Can Mage Hand be used in combat to grab something from an opponent?  For example, one could grab a bow out of their hands or the arrows from a quiver, or try to push them out of a tree, etc.  Mage Hand can carry up to 10 pounds, but what is its ability to interact in situations like these?


Are there any experiments going related to gravitational shielding?

Is it possible somehow to achieve gravitational shielding? Are there any experiments presently going on or future projects?


How to figure if it is safe to travel to the area I am interested in?

When planning a trip, I like to make sure I will feel safe enough (I am talking about war/terrorism risk, not pickpockets), or at least I like to have an idea about the risks. I know the risk could be subject to political views (for example the political stability of a region might not be acknowledged by every country) and therefore I am mostly interested in a Western country view.  In order to figure that, I thought about checking travel operators offers. I suppose if they do not organise trips to a specific region, it might be due to political instability risks. But it might be due to a lack of tourist interest too. As I tend to travel without their help, I am not really considering this kind of source as very helpful.  So I am interested in one (or two, for cross-checking) source(s) of information with a western view (I mean I understand the view could be biased) regarding the security of ideally any area in the world. My expectation is that, the same way I can browse a tour operator's catalog of visited areas, I could browse through the areas and see if it is recommended or not to travel there.


Windows Spotlight Source and Save locations?

Where are the images from  coming from?  Where are they being saved on my system?  Is there any way for me to point this at my own source of images?


How do I decrease the font size on the default Unity theme?

How do I decrease the overall general system font size on the default Unity theme?  I just want fonts to generally be one notch smaller.


Polynom to linear factors above the complex numbers

How do i find the linear factors from which the polynom: $$ x^2+i $$ Is built from. I remember that every polynom above the complex can be represent as linear factors, but how do i do that in my example?


Problem on integration and continuous functions

Let $f:[0,1] \to R$ be a continuous function. Then prove   $\int_0^1f^2(x)dx \ge (\int_0^1|f(x)|dx)^2$.    I am getting a lot of problems of this type and I don't know how to even begin solving this type of problems.   Can anyone please tell me how to approach problems of this type?  Thank you.


Beamer keeping line position constant on itemize

I want to have a slide in beamer with itemize exposing new line on each click while at the bottom part of the slide there are some equations. This is my attempt  \begin{frame}   \begin{overprint}{\textwidth}     \leavevmode     \begin{itemize}[<+->]     \item <1-> Poisson Boltzman equation (PB)     \item <2-> Debye-H\"uckle equation  (DH)     \item <3-> The naive approach - applying (DH) equation to PE     \end{itemize}   \end{overprint}   \begin{tikzpicture}     \node at (0,0) {};         \node<1,2> [text width = 20cm]at (10.5,-1) {$ \nabla^2 \phi =\sum_i \frac{n_i q_i\text{e}^{-q_i \phi/kT}}{4 \pi \epsilon}$};         \node <2> [text width = 20cm]at (10.5,-2) {$q_i \phi/kT \ll 1 \Rightarrow \nabla^2 \phi \simeq \kappa^2 \phi$};         \node <2> [text width = 20cm, font=\footnotesize]at (10.5,-2.5) {$\kappa^2 = \lambda^{-1/2} =  \sum_i \frac{n_i q_i}{4 \pi \epsilon}$};         \node <3> [text width = 20cm] at(10.5,-1) {$\frac{F_{el}}{VkT} = - \left ( \frac{ 4 \pi e^2}{\epsilon kT}     \sum_{i=1} n_i z_i^2 \right )^{3/2} \left ( 12 \pi \right )^{-1}$};   \end{tikzpicture} \end{frame}   However, the itemized line jump up and down between slides. I've tried to use itemize without any environment surrounding it. I've also tried to use overlayarea instead of overprint. How can I keep the line position constant?  I've uploaded a gif animation to display this. On my machine it run really fast and I can't fix this. Hope the problem is understood.   When I run this, I get


I want to know, can I use hero in this sentence to refer to someone who is female?  Does it make sense?      Mom you are my hero.   Or is it better to say      Mom you are my heroine.


Postgres-xc installing error `E: Unable to correct problems, you have held broken packages`

I am facing problem when I try to install postgres-xc from terminal.  badar:~$ sudo apt-get install postgres-xc  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: postgres-xc : Depends: postgres-xc-client but it is not going to be installed  E: Unable to correct problems, you have held broken packages.   badar:~$ sudo apt-get install postgres-xc  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: postgres-xc : Depends: postgres-xc-client but it is not going to be installed E: Unable to correct problems, you have held broken package


Should table heading units follow a slash or be in parentheses?

What is the standard in Computer Science and Physics?     Independent variable (units) Dependent variable (units)     1 1   2 4   3 9     or     Independent variable / units Dependent variable / units     1 1   2 4   3 9


Username of a deleted user visible on CW posts

It seems to me that if a user makes a post on an SE site, the post is made community wiki, and then the user deletes the account, the post still shows their username. I am not sure if producing examples is OK since some people delete their accounts to dissociate their contributions from their name. Should this behaviour be changed?


I have the following. When I call it, in the page, the content within the page will always be AFTER the plugin rather than before. Please can some help?  <?php function category_has_children($term_id) {     $children = get_term_children($term_id, "category");     if (is_array($children)) {         return $children;     } else {         return false;     } }  // Add Shortcode function dataservices_category($atts) {      // Attributes     extract(shortcode_atts(array(         'id' => ''     ), $atts));      // Code     if (isset($id)) {         $categories = get_categories('child_of=' . $id);         foreach ($categories as $category) {             if ($category->parent != $id) {                 echo '
';                 echo '
' . $category->name . '
';             } else {                 echo '
' . $category->name . '
';             }             if (category_has_children($category->term_id) == false):                 echo '
';                 foreach (get_posts('cat=' . $category->term_id) as $post) {                     setup_postdata($post);                     echo '
ID) . '">' . get_the_title($post->ID) . '
';                 }                 echo '
';             endif;             if ($category->parent != $id) {                 echo '
';             }         }     }  } add_shortcode('dataservices', 'dataservices_category'); ?>


how can I delete apps that aren't installed in dash?

I installed Navicat with Wine then I uninstall it and delete the folder .wine in home directory but when I search Navicat in the dash always appears, I already tried to restart my laptop, log out and log in as well, but no matter what I do


Use Integration by Parts to find  $\int \cos x\cdot e^x\;dx$.  How is this done? Please, feel sorry for me and help me out. Today has been a very bad day and I can't concentrate very much on this problem because my cat died. Can you help me?


I recently got a computer from school. It came with Windows 8.1 installed. I then installed another copy of Windows 8.1 (so it would use the built-in Windows Pro license) and upgraded it to Windows 10. I then installed Ubuntu alongside both Windows 8 and 10. Note that I made a separate 255MB ext2 partition for /boot. Now, when I boot the computer, I first see a GRUB prompt (I already un-hid the grub prompt 'cuz I like it that way) with Windows 8 and Ubuntu options. However, there is no Windows 10 option. If I select Ubuntu, the computer boots into Ubuntu. However, if I select the Windows 8 option, I then get sent to the Windows bootloader, where it then gives me options to boot either Windows 8 or Windows 10. (However, by this point, the computer has already loaded the kernel and all. Apparently Microsoft misunderstood the concept of a bootloader and decided that that meant "boot practically the entire system before actually showing the bootloader". Typical Microsoft.) How can I disable the Windows bootloader and add a Windows 10 option to GRUB? EDIT: Someone has answered telling me to disable the Windows bootloader. However, I still do not know how to add Windows to the GRUB OS list. Can anyone help with this? EDIT 2: After removing Windows 10 from the Windows bootloader with EasyBCD, it seemed that, after a few reboots, it would continually unhide itself and Windows 10 would reappear. However, I then later deleted Windows 10 from the list of OSes in msconfig, and it seems to have stayed deleted. However, I STILL have not managed to get Windows 10 to appear in GRUB. It's as if GRUB simply doesn't detect it. Also, I'll put this in the question so that people see it - I have tried using boot-repair, however, it has NOT helped any.


I passed 200 reputation but I haven't gotten the Mortarboard badge

After I earned the 200 reputation points in a day, I should get the "Mortarboard" badge, but I didn't.                Does anybody knows, why?


Using the definition of Riemann integrability, prove that $f $is Riemann integrable on $[0,1]$

The following problem came up on a test, and I didn't get it correctly. Please help me understand the problem.  Problem: Define $f:[0,1] \to \mathbb{R}$ by $$     f(x)=  \begin{cases}     1,& \text{if } x=\frac{1}{n}\\     0              & \text{otherwise} \end{cases} $$ for some integer n.  Using the definition of Riemann integrability, prove that f is Riemann integrable on $[0,1]$ and evaluate the Riemann integral $\int_{0}^{1} f(x)dx$.  My Solution:  Let $\epsilon>0$ and $P$ be the partition of $[0,1]$ such that $P=\{0,\frac{1}{n}- \frac{\epsilon}{3},\frac{1}{n}+ \frac{\epsilon}{3},1\}$.Then note that   $U(f,P)=M_0\Delta x_0 +M_1\Delta x_1+M_2\Delta x_2=0+(\frac{1}{n}+ \frac{\epsilon}{3})-(\frac{1}{n}+ \frac{\epsilon}{3})+0=\frac{2\epsilon}{3}$ and   $L(f,P)=0$.   Thus, for every $\epsilon>0$ $$U(f,P)-L(f,P)=\frac{2\epsilon}{3}<\epsilon$$.  This is the prove that I gave and the mistake that I made was that I fixed n. Some important things that I noticed about this problem were that if you graph the function $f(x)$ most of the points fall to the left or close to zero and a fewer fall to the right. Hence, this makes me believe that I need a partition such that I capture most of the points near zero so that I am only left with a finite number of points close to 1. However, I can't seem to find this partition.Any help would be appreciated. In particular, I would like to know how you come up with the partition since I always struggle to come up with one. Thank you!


What's the difference between  and ,  and  in html?


When a disk read or disk write occurs, where does the data go?

I understand that there is such a thing as a disk controller which contains a buffer, but was wondering if the CPU reads directly from this buffer, or whether the data must first go to a specific location in memory, and then allow itself to be read by the CPU?  Does anyone also know what the buffer is called? And how does DMA fit into all this?


For example I want to print long dash  I read that it's possible to do with numpad and code of Unicode of character, so I tried doing Alt+Shift+u + code, but without success.


Functions satisfying $f:\mathbb{N}\rightarrow\ \mathbb{N}$ and $f(f(n))+f(n+1)=n+2$

Find all functions $f$ such that $f:\mathbb{N}\rightarrow\  \mathbb{N}$ and $f(f(n))+f(n+1)=n+2$   Let us plug in $n=1$  $f(f(1))+f(2)=3$  Since the function is from $\mathbb{N}$ to $\mathbb{N}$, $f(2)$ can only take the values $1,2$. Now we divide the problem into cases.  Case-1: $f(f(1))=2,f(2)=1$  We can assume that $f(1)=c$ for the time being. Then plugging in $n=3$ and using $f(2)=1$ gives $$f(3)=4-c$$ and again since the range of the function is positive integers,then $4-c$ has to be positive and hence $c$ belongs to  {$1,2,3$}. Now, $$f(1)=c$$$$\implies f(f(1))=f(c)$$$$\implies 2=f(c)$$ by the assumption that $f(f(1))=2$ . Now,since $c$ can only take the values $1,2,3$,we start treating cases. If $c=1$,$$f(c)=2$$$$\implies f(1)=2$$ but we know from the deinition of $c$ that $f(1)=c=1$,a contradiction.If $c=2$,then $2=f(c)=f(2)$ but $f(2)=1$ by assumption. Finally,if $c=3$ $$2=f(c)=f(3)$$ but $$f(3)=4-c=4-3=1$$ which is once again a contradiction. Therefore there are no such functions in this case.  Case-2: $f(f(1))=1,f(2)=2$  Again assuming $f(1)=c$ and using $f(n)\le n$ along with plugging $n=c-1$ will give us that $f(1)=1$ and then it is easy to prove that such a function exists by recursion. I can only give a "sort of recursive" way to define the function. Here it goes $$f:\mathbb{N}\rightarrow \mathbb{N}$$$$f(1)=1$$$$f(n)=n+1-f(f(n-1))$$  But this case is harder to deal with.Some help will be appreciated.


Why does QGIS save EPSG:4326 as long, lat?

Why does QGIS save EPSG:4326 with coordinates in the longitude, latitude format? Isn't the correct standardized format latitude, longitude?


Why do humans seem to be the only mammals that like spicy food?

Peppers evolved chemicals like capsaicin to discourage animals from eating them, and that chemical itself can cause internal damage if consumed in large quantities, though this is usually only a concern for the hottest of peppers (which people do eat).   Still, why is it that humans seem to be the only animal that often "like" spicy food?


Execute a certain command before closing window in tkinter

I am using tkinter with python.   Is it possible to execute a certain command (eg. print ("hello")) before closing the window, when close button is pressed?  I am using the close button of the desktop environment (along with maximize and minimize) and not any special close button.  Note that I am asking how to execute a certain command before closing, and not how to close the window (which can already be done with the window buttons). So this is not a duplicate of


I had a bug in my java app, which created a folder structure, which never ends..  So i have  afolder structure like  C:/folder/folder/folder/folder/folder/.../...   Now I am not able to delete this folder anymore. Any ideas?


Alternating sum with ever increasing range of equal signs

Consider this special form of an alternating sum  $$s=1-(\frac{1}{2})+(\frac{1}{3}+\frac{1}{4})-(\frac{1}{5}+\frac{1}{6}+\frac{1}{7})+(\frac{1}{8}+\frac{1}{9}+\frac{1}{10}+\frac{1}{11})-(\frac{1}{12}+...+\frac{1}{16})+...$$  Notice that the ranges of equal signs increase linearly.  I wonder if the sum is convergent or not, and if it is convergent what is the result.  Edit by Rushba Mehta:  The explicit form of the series is $$1 - \sum\limits_{n=2}^\infty (-1)^{\lfloor\frac{\sqrt{8n-15}-1}2\rfloor}\cdot\frac1n$$  My Edit  I find that the sum can be written as  $$s=1+\sum_{n=0}^\infty (-1)^{n+1}(H_{n(n+3)/2+2}-H_{(n^2+n+2)/2})$$  Where $H_{k}=1+1/2+1/3+...+1/k$ is the harmonic number.  Convergence follows from the asymptoptic expansion of $H_{k}$ which leads to a series similar to that of log(2).


I have been searching this answer for quite a while. I asked my physics teacher and he said it is current that causes death. A friend of mine, who is a EE student, and his answer was voltage. When i searched the internet i read that if the voltage is high then the current is high, so you die. But what if the resistance is so big that even if the voltage is huge the current is small?  So which one?


How to include a file in cpp as both a string and code?

So I would like to have a file that I can conditionally include as either code or a string.  Like this:   #define something #include "myfile.inc"   #undef something const char myfileasastring =  #include "myfile.inc"    myfile.inc would be simple code like this:  something // anything extra here is fine as long as it goes away in the code include case int myfunc() { return 23; }    Is this possible? I tried having #define something R("mystring and start myfile with it but that does not seem to work.   My specific use case for this is a GLSL shader that, when running under GL I need as a string to pass to the GL driver but when running it in software emulation I want to compile it as CPP code.   I would love to have the same file for both cases. I know many workarounds on the project/make/build level, and even just cut and paste is not terrible, but it would be neat to have a portable compiler level way of doing this.   Not a dupe as detected. I know how to include as one xor the other, but not as either or with the same file. Also I know how to do it using external tools, I am really just wondering if is wondering in just plain, portable c++11. It might not be possible. (try to remove dupe tag again.. please comment if you still think it is a dupe)


Log all commands run by admins on production servers

It is company policy for admins to login to the servers via a personal username, and then run sudo -i to become root.  Upon running sudo -i, sudo will create an environmental variable called SUDO_USER, which contains the original user's username.  Is there a way to log ALL commands within syslog with something akin to the following syntax:  ${TIME/DATE STAMP}: [${REAL_USER}|${SUDO_USER}]: ${CMD}   An example entry would be:  Sat Jan 19 22:28:46 CST 2013: [root|ksoviero]: yum install random-pkg   Obviously it doesn't have to be exactly the above syntax, it just has to include a minimum of the real user (eg. root), the sudo user (eg. ksoviero), and the full command that was run (eg. yum install random-pkg).  I've already tried snoopy, but it did not include the SUDO_USER variable.


How to remove the space between the numbers and titles on the \tableofcontents?

I'm using this preamble:  \documentclass[rascunho]{fei} \usepackage[utf8]{inputenc} \usepackage{gensymb} \usepackage{cancel} \usepackage{siunitx} \sisetup{   output-decimal-marker={,},   inter-unit-product=\ensuremath{{}\cdot{}}, }  \addbibresource{ref.bib}   but when i add the command  \tableofcontents   my summary becomes like this:[  but my goal is to have it look like this:  [  how can i delete this space in between the numbers and the titles?


Micro SD card not saving changes (but is not in read-only mode)

I have a Micro SD card here which I used with a Raspberry Pi, and I wanted to re-ISO it with a newly downloaded ISO from raspberry.org.  This is on Windows 7 Pro  In the Computer Management / Disk Management I see the card formatted as it was initially: 56 MB FAT, 3 GB ext4, 11.68 unallocated. It's a 16GB card, class 10 has HC I and an U with a 1 in it.  When I start Paragon's Linux File Systems for Windows I can browse the ext4-Partition and open it in Windows Explorer.  In Windows Explorer I also have access the 56 MB FAT partition.  I can create new files on that SD card, no error is thrown. Both on the FAT partition as well as the ext4 partition, thanks to "Linux File Systems for Windows".  When I take the card out of the reader and re-insert it, the new files are gone.  I have flashed 2018-06-27-raspbian-stretch-lite.img via Rufus as well as via Win32DiskImager. When I use a USB 3 reader, it writes the image at 60 Mb/s, with a normal USB 2 reader at 16 or so (can't remember, but below 20, it is a a reasonable value for USB 2, maybe even just 7).  On each of this flashings I receive a "Write successful" or "OK" message, and I was also able to see the USB reader's LED flash during the entire time.  Yet whenever I take the card out and reinsert it, it has all the original data on it, same partitions, same everything.  I also have deactivated Paragon's driver during flashing, to make sure it is not interfering.  I cannot format the FAT partition "Windows was unable to complete the format" and in the Disk Management Snap-In I cannot delete the ext4 volume (no message is shown)  This kind of stuff has never happened to me, so I'm at a loss. Any idea about what could be going on here?  diskpart shows the following result  DISKPART> attributes disk Current Read-only State : No Read-only  : No Boot Disk  : No Pagefile Disk  : No Hibernation File Disk  : No Crashdump Disk  : No Clustered Disk  : No   Using diskpart to clean the card also does not work  Microsoft DiskPart version 6.1.7601 Copyright (C) 1999-2008 Microsoft Corporation.  DISKPART> list disks  Microsoft DiskPart version 6.1.7601  DISK        - Display a list of disks. For example, LIST DISK. PARTITION   - Display a list of partitions on the selected disk.               For example, LIST PARTITION. VOLUME      - Display a list of volumes. For example, LIST VOLUME. VDISK       - Displays a list of virtual disks.  DISKPART> list disk    Disk ###  Status         Size     Free     Dyn  Gpt   --------  -------------  -------  -------  ---  ---   Disk 0    Online          119 GB      0 B   ...   Disk 10   Online           14 GB    11 GB  DISKPART> select disk 10  Disk 10 is now the selected disk.  DISKPART> list partition    Partition ###  Type              Size     Offset   -------------  ----------------  -------  -------   Partition 1    Primary             56 MB  4096 KB   Partition 0    Primary           3065 MB    60 MB  DISKPART> clean  DiskPart succeeded in cleaning the disk.  DISKPART> exit  Leaving DiskPart...   I can even see the LED flashing once when I press enter on the clean command.    Modifying contents of other cards (ie from another Raspberry Pi) does save the changes on that card, so it's not the system per se.  Maybe it's     Consumer SD cards can enter hardware read-only mode to save your data.   as mentioned in   But I really wonder why I don't get any errors when writing to it.  It's this card:   That card is rated at 20 MB/s and I just re-checked the write speed with Win32 Disk Imager, which effectively states 60 MB/s (a capital B). So probably the card is just damaged somehow.


Feature Request: Some privileges are activated at 1 reputation

As we all know, we earn privileges by earning reputation. But this is what I want to change; I want it to be so you can vote up, chat, comment and asking on Meta when you have any amount of reputation even 1. This is for all SE sites.  I am including voting up, chatting, and comment in this is because people would like to know how many people like their Q&A. They don't want be like nobody likes this Q Sometimes I 'm like that too. You don't have to make it so they earn reputation if the voter's reputation is below 15. Chatting is something everyone likes so people should be able to chat with less than the required amount. Sometimes people want to comment to understand the question more. I haven't been able to comment yet and I am struggling to answer question I should be able to answer. The last one I am really questioning myself on. People should be able to ask on Meta because a lot of people want to ask some question on how the site works. Of course they could come to Meta Stack Exchange but sometimes they might want to know something that is only on that one site.  The reason I want this feature-request is because on many of the sites I've joined you will see many places I only have 1 reputation.   Unlike  this is asking about reputation privileges activated at level one; not asking how I got 100 extra reputation on all communities.


what's the difference between the ls and `ls` in bash

Hello guys i like to know what's the difference in the bash i used ls without ` ` in bash so my program did not work and when i add ` ` it  works, what's the object of it   for i in `ls` do     if [ -d $i ]     then         echo $i         let j=$j+1     fi     if [ -f $i ]     then         echo $i         let k=$k+1     fi     if [ -x $i ]     then         echo $i         let l=$l+1     fi done echo "Il y a $j répertoires, $k fichiers et $l exécutables dans $rep"


What is the definition of raising a number to the zeroth power ($x^0$)? I know that many people say that "anything raised to the zeroth power is one" but this is clearly not true since $0^0$ is $undefined$. How then do mathematicians define $x^0$ such that for all real numbers not equal to $0$, $x^0=1$?


Is it at all possible to create a table that contains a list that spans across multiple rows. That is the numbering must continue from row 1 to row 2 etc. My use case is that I have a table in a report that contain a single list of items. I wish to refer to these items in other parts of the report and I am constantly updating the table/list with new items.  The image below shows part of the table that I would like to create. Notice that the numbered items 21, 22 etc are in different cells of the table. When I insert an item between 21 and 22 I would like all the numbering to be updated.


I am trying to print out a gameBoard that has a "-" for each spot of the array: however every time I run this code I get this printed to the console:     [[C@2a139a55.   Any suggestions?  public class Game {      public static void main(String[] args){          char realBoard[][] = new char[7][7];          for (int i=0;i<7;i++){             for(int j=0;j<7;j++){                 realBoard[i][j]='-';             }         }         System.out.print((realBoard));     } }


Automorphism group of finite $k$-algebra as an affine variety

Let $k$ be an algebraically closed field. Let $A$ be a finite dimensional $k$-algebra, not necessarily commutative. Let $G = \text{Aut}(A)$ be the group of $k$-algebra automorphisms of $A$. I want to show that $G$ can be an affine variety in a suitable space $k^n$.


What is a good word for “best example”? I would like to describe a film as the greatest example of its features.


How to set up Ubuntu for multiple users at the same time?

I'm still kinda new to linux and my understanding was I could let multiple people (at the most me + two more) use my pc at the same time. If this is indeed the case, how do I?


Firefox: Is there a way to prohibit or disable addons to open pages upon update?

I understand an addon can do virtually anything the browser API allows, but wouldn't this be treated by some browser setting? I've been skimming through about:config but didn't see anything like that.


How to find the orthogonal complement of a subspace?

I am trying to understand how to find the orthogonal complement of a subspace $M$ of a vector space $V$.   From my understanding, $M^\perp$ is also a subspace of $V$ where all its vectors are perpendicular (orthogonal) to the columns of $M$, which would mean that the dot product of those vectors with each column of $M$ is $0$.  However, how do I find the $M^\perp$ subspace, when $M = \{ \vec{x} \in \mathbb{R}:  2x_2 + 3x_1 = 0\}$? In general, if there's a general approach, how does one attempt to find $M^\perp$ of an arbitrary $M$?  From my understanding, in this case, $M$ is the set of vectors in a plane that satisfy that equation, where $x_1$ and $x_2$ should respectively be the first and second components of the vector $\vec{x}$.


The title kind of explains itself.  Docky will just randomly crash.  It will ask If I would like to restart or keep closed, If I try and restart, it wont.  Its becoming frustrating as I prefer Docky over Launcher.  Anyone have a fix for this?  BTW I'm a Ubuntu noob.... Thanks in advance for your help.


Show 10kers some simple analytics in the tools

Currently, only Diamond mods have access to real analytics - with pretty graphs and stuff. I'm currently helping in a Beta site, and I'm very interested in how the site is doing. Because of this, I have a big system set up that collects stats from the API on a regular interval. This works ok, but... it's not optimal.    If I can make this with the API, why can't we show it to 10kers?  Some analytics .   Why can't we show 10kers at least a normalized graph of visits? We don't need crazy-detailed graphs, a rolling average is fine. If needed, we could even make this a 20k (or greater?) privilege.  What's standing in the way of doing this? Why don't we want high privileged users having analytics?


Is it possible to connect two monitors on a laptop, one through HDMI and the other through DisplayPort?

For example the Alienware m17x offers 3 connections, HDMI, DisplayPort, and VGA. Is it possible to connect two independent external monitors, one through the DisplayPort and one through the HDMI port?


I have been taught that $\frac{1}{3}$ is 0.333.... However, I believe that this is not true, as 1/3 cannot actually be represented in base ten; even if you had infinite threes, as 0.333... is supposed to represent, it would not be exactly equal to 1/3, as 10 is not divisible by 3.  0.333... = 3/10 + 3/100 + 3/1000...   This occured to me while I  discussion on one of Zeno's Paradoxes. We were talking about one potential solution to the race between Achilles and the Tortoise, one of Zeno's Paradoxes. The solution stated that it would take Achilles $11\frac{1}{3}$ seconds to pass the tortoise, as 0.111... = 1/9. However, this isn't that case, as, no matter how many ones you add, 0.111... will never equal precisely $\frac{1}{9}$.  Could you tell me if this is valid, and if not, why not? Thanks!  I'm not arguing that $0.333...$ isn't the closest that we can get in base 10; rather, I am arguing that, in base 10, we cannot accurately represent $\frac{1}{3}$


I bought it at, I bought it on, I bought it from

Someone was asking:   Do we order things "off" a website or "on" a website?   I suggest it's from as it's a specific place (if virtual.)  What is correct here. Cannot for the life of me find an answer.


For the $f:\mathbb{R} \rightarrow \mathbb{R}$ for every $x,y$ real numbers is true, that $|f(x)-f(y)|\le(x-y)^2$  -I think that a good way would be to show, that $f'(x)$ is a constant.


public class Bucket  {      int rows,cols,blocked,open,full;      public void initialize()     {         rows=0;         cols=0;         blocked=0;         System.out.println("You were here");     }     public void open()     {         blocked=1;     } }   I am getting a null pointer exception when I am running the percolation class, I don't have any clue, how to get rid of it, any help will be very thankful.  public class Percolation {      //public Percolation(int N)     public static void main(String args[])throws Exception     {         try         {             int N=5;             Bucket[][] barray=new Bucket[N][N];             for(int i=0;i<N;i++)             {                 for(int j=0;j<N;j++)                 {                     barray[i][j].initialize();                     //barray[i][j].cols=0;                       //barray[i][j].blocked=0;                            }             }         }         catch(Exception e)         {             System.out.println(e);         }     }   }


I was watching some videos on YouTube showing how to get the Duke O' Death in GTA 5, however what I have seen is sort of unclear.  Some people say you must be a returning player on GTA 5 to get it (what does this mean too BTW?), some people don't say that. Some people say you have to be Trevor, some people don't. Some say the time of day matters, some don't. And apparently you can buy it from Warstock website (I can't).   Can someone please tell me how to get it?! GTA 5 came with my PS4 (I didn't play it on PS3) if that helps.


I just realized that throughout my life I have interchanged "I recommend that you do X" and "I would recommend that you do X".  Is there a difference in their meanings in modern-day usage, or are they functionally the same?


By 18 years of age, I want a brand new car that's $43,668

I'm from Arizona and I will be 18 in 4 months. I make about $1,200 a month from my job. I have $600 in my bank account and I don't plan to  spend any of it until I'm  18.     I'm looking to get a brand new Jeep Wrangler Rubicon that costs about  $43,000. The down payment is 10% (about $5,000) with an APR of  4.28%. The duration is 60 months with a monthly payment of  $800.  I don't have any credit. My friend suggested that I ask my parents to put my name on one of their credit cards so that I can build some credit. I'm not sure how that works. Can someone suggest a good way of going about this so I can get this car on or around my birthday?  My mom does finance work  for a big company and she told me that I should get a cheaper car. I really want this one and I'm willing to work for it. I'm getting a second job to get more money rolling in. My mom said that the only way that this would work is if I have a down payment of $15-20k. She also said that not everyone qualifies  for a car like this one. What can get me to qualify ASAP when I turn 18?


Math required for learning Lagrangian mechanics

How much knowledge of maths is required for learning ? Also from where can I learn this math?


Should I include a paper published in a non English language in my CV?

I have written a paper in my own language. Is it right to write it in my CV as a published paper?


Image not getting displayed from the "if" clause

I want a particular image to be displayed for a corresponding text  So I tried like below in my increase()      TextView hedng = (TextView) findViewById(R.id.singleitemheading);     if(hedng.getText() == "HEADING OF THE TOPIC"){         ImageView lvlm = (ImageView) findViewById(R.id.levelimg);         lvlm.setImageResource(R.drawable.ic_launcher);         }   But the image is not being displayed


Comments left by the author of a spam/offensive post should be deleted from the post too

In the spirit of:    The same should be done for comments by the offending author for that post as well.  If the post was considered spam or offensive, what possible redeeming quality could the comments of that post by that same user have?  If such a comment was useful enough, then the post could have been edited into shape and possibly saved.  But if the community went through with it and got the post deleted, then it's unlikely the comments would be considered constructive or have any use.  Maybe take into account that the user account was deleted too?    (SO 10k, comments have been purged now)  Yeah it's not visible to most of the public... but it's just a minefield for 10k users.


Splatoon is coming out soon, I'll have it, but immediately after picking it up I need to catch a plane to my parents' house. They also have a Wii U.  Can I use my NNID on her Wii U, have my online progress saved, and not affect anything about my account being the primary user of my Wii U at home?  I know other systems allow this, but you can never tell with Nintendo.


Which manga chapters correspond to the 2nd season (or "Season 3" on Netflix) of the anime, "Revival of the Commandments"?

The 2nd season (labeled as "Season 3" on Netflix) of the anime, Nanatsu no Taizai: Imashime no Fukkatsu (or The Seven Deadly Sins: Revival of The Commandments), has ended.  Which manga chapters correspond to each of the anime episodes?


How to find out to which polygon each points belongs to in ArcMap

I have got a shapefile consisting of a number of polygons, and another shapefile with a number of points.  I want to add a column in the points shapefile. For each point, I want the column to contain the name of the polygon that surrounds it.  In simple terms, I just want to find out to which polygon each points belongs to. Any tips?  Here is the screenshot:


I am trying to find a windows installer for GeoServer. Could not find it :(  Does anyone know where to find it or how to set up GeoServer on Windows using Platform independent binaries or is there another way to set it up?  I tried going to this page but could not locate windows installer.   I have used GeoServer earlier but at that time I was able to find a windows installer. Not sure if GeoServer has stopped providing windows installer.


What does the notation $\mathbb{Z}_{(2)}$ mean?

While I was studying on paper I saw the notation $R=\mathbb{Z_{(2)}}×\mathbb{Z}$, so what does the ring $\mathbb{Z}_{(2)}$ mean?


NullPointerException when declaring semaphores in Java?

I get aNullPointerException when I try to run this code:  private static Semaphore[] trackSemas;  for(int i=0;i<9;i++){             trackSemas[i] = new Semaphore(1,true);         }   Why doesn't this bit of code get a NullPointerException?


login with "su john" command does not source john's .bash_profile

The .bash_profile for user john is not taking effect when I (as root) use the su john command to login as john. I have to use source ~/.bash_profile command every time I login as john using the su john command. How can I automate this? Thanks


With whom you Spoke, or With whom you spoke with?

Example:  Mark, with whom you spoke at the party, will be joining us.  or is it  Mark, with whom you spoke with at the party, will be....


Windows 10 is not booting after installing ubuntu alongside

I am new to this and was curious about running Ubuntu on my laptop running windows 10..   I couldn't not find the Grub menu after installing ubuntu so I went back into windows and found a so called hack...  After doing following the steps I used ubuntu successfully from the Grub2 menu , now I wanna go back to windows but whenever I enter the Grub menu and select the option :  windows boot manager (on dev/sda1)   It opens the Grub menu again and again!!  What can I do to fix this guy's?


I am unable to download the latest version of Ubuntu  I  am getting below error:  The required dependency 'dpkg (>= 1.17.5ubuntu5.6)' is not installed.  i have tried everything about updating and downloading the dpkg package but its still getting the same here.  Can someone please help?


Are there any risks to rooting a device?

I see lots of tutorials telling me how to root my phone (Motorola Droid), but none of them mention any potential "side effects."  Aside from a few relatively minor issues that seem to require rooting to fix, I'm basically happy with the phone and therefore a little leery of messing with a device that cost me a lot of money and is only a few months old.  Assuming that I'm just talking about rooting, and none of the typical post-root actions (like installing a custom ROM), am I taking any risks by choosing to root?   Does it have the potential to brick the device? Will it void my warranty? Will I stop getting updates? Will the cops show up at my front door the next day? (Yes, I'm being facetious.) Anything else I should be aware of?   (See also: )


Given $x \in \mathbb{R}$ and $N \in \mathbb{N}, N>1,$ find integers $h,k$ with $0 < k \leq N $ that satisfy $\lvert{kx - h\rvert} < 1/N.$

This is a problem from Apostol's $\textit{Mathematical Analysis}$. He provides a hint: Consider the $N+1$ numbers $tx-[tx]$ for $t=0,1,\ldots,N$ and show that some pair differs by at most $1/N$, where $[x]$ is defined as the greatest integer $\leq x$.   I have defined $a_t:= tx-[tx]$. I know $a_t \in [0,1)$ for every $t=0,1,2,\ldots,N$. How can I show that there exists $i,j \in \lbrace{0,1,\ldots,N\rbrace}, i \neq j$ such that $N\lvert{a_i-a_j\rvert}$ < 1? I've been stuck on this problem for a quite a while. A hint would be much appreciated.


I need to write a document with Latex and I installed TexMaker. Does anyone suggest any easier tool? And a good documentation since I am finding loads but I need to learn it as quickly as possible.


So in my application, a user can select a Widget, and select tags that describe that widget (Fast, Slow, Expensive,i.e).  As of now, the plan was to use a dual-list with a bag of "unchosen" descriptors, and a bag of "chosen" descriptors.  Essentially, my UI currently looks like the .    My issue now is that the user has to be able to select a group of widgets (n > 1) and then apply a descriptor to all of them ("Describle all these widgets as slow").  Clearly, this breaks the UI as the dual list now has to somehow handle Add/Delete operations for (n > 1) widgets.  My next progression was going to be a 3 part list where they would have a first list with   "All"  "Widget 1"  "Widget 2"   But that felt wrong.  Does anyone know of a UI pattern that can allow the user to perform Add/Delete changes on 1 or more Widget items or am I thinking about this incorrectly.  Any help is greatly appreciated.


I have a paper which lies on a flat surface. The paper is fixed on one side and the opposite side can slide in the direction of the opposing side. As side end slides toward the other, a "bump" forms. I want to know what the solution is to the shape of this bump. There must be some standard solution for this case.  EDIT: Luboš Motl did provide a really nice answer for the case when the paper is assumed to lie flat against the surface at the ends (also with the assumption that the bump is small). I also found this  on a similar topic.


SQL Server default collation vs database with different collation - potential problems?

I'm struggling with the design of new database that has to use a different collation (Y Collation) than the SQL Server Instance default collation (X Collation). I'm looking for potential problems.  Temp Tables by default will be created with X Collation so any joins on text data types will fail unless I create temp table with Y collations on columns.  What about SQL Server string functions: REPLACE, SUBSTRING, etc.? Will they always be returned in X collation? What about when I use REPLACE(...) COLLATE Y? Do you see any potential data loss or maybe any different problems?


Ignoring file 'google.list.save.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

When I run sudo apt-get update it returns:    What should I do?


I have positiones the Right hand side of my rigify Armature, and not I don't want to go through positioning my left hand side. I know there is a way to do that but I do not remember how.    Never mind people my PC crushed and all the data is now gone, I actually can't even get in, because it says that I don't have an operating system


How can you print a variable name in python?

Say I have a variable named choice it is equal to 2. How would I access the name of the variable? Something equivalent to  In [53]: namestr(choice) Out[53]: 'choice'   for use in making a dictionary. There's a good way to do this and I'm just missing it.  EDIT:  The reason to do this is thus. I am running some data analysis stuff where I call the program with multiple parameters that I would like to tweak, or not tweak, at runtime. I read in the parameters I used in the last run from a .config file formated as  filename no_sig_resonance.dat  mass_peak 700  choice 1,2,3   When prompted for values, the previously used is displayed and an empty string input will use the previously used value.  My question comes about because when it comes to writing the dictionary that these values have been scanned into. If a parameter is needed I run get_param which accesses the file and finds the parameter.   I think I will avoid the problem all together by reading the .config file once and producing a dictionary from that. I avoided that originally for... reasons I no longer remember. Perfect situation to update my code!


Where can I ask about programming naming and semantics?

While programming I often have naming questions, such as "how do I name [thing]  in a descriptive but succinct way? Is there already an accepted terms for this/an alternative to [name]?" (Thing could be a programming concept, a function, a class, a variable)  Is Stack Overflow the right place to ask these naming/semantics questions?  I would like to be able to get meaningful answers, not just "Name it [name] and call it a day."


Why my answer for this conditional probability problem is wrong?

A family has two children. What is the probability that both the children are boys given that at least on of them is a boy?  Solution given in my book is    My doubts and my solution  If a family has a child and you are required to find that what is the probability of it to be a boy then your answer will be 1/2.  Now in the present problem it is given that out of two children one is a boy then what is the probability that both are boys.  One child is boy the second child can be a boy or a girl, chance of boy is 1/2.  $P(boy|boy)=\frac{1}{2}$  What I mean is that there are two possible outcomes after we have a boy, it can be a boy or a girl out of this boy is a favorable outcome and so we have 1/2.  Request  Please don't mark this problem as duplicate of  or of  because my logics are different.


I can't set dimensions, looked really easy according to questions answered more than one year ago but I swear I am doing my best and have come up stumped. batFINGER gave me some pointers and I tried them but honestly I cannot see where I am going wrong. On my menu there is nothing about setting dimensions (see drop down and also workspace on the right). Just scaling.


The animation in my timeline is not displayed when I hit the Animation button

I previously animated a short animation. I wanted to redo the animation. So I redid the animation and it can be seen when you scrub through the frames in the time frame but when you hit the animation button it replays the old animation. Can can I force blender to use the new keyframes?


I'm texturing a table with multiple textures. I've essentially placed one texture on the top of the table and another for the legs. The entire model is one piece and the model's materials are set to the two I am using. When I press render it only displays the texture that is top of the materials list and doesn't place it where I had it originally. How can I fix this?


Possible Duplicate:             I am looking for software/script/whatever that can completely destroy data on hard drive. By destroy I mean beyond recovery(even with special software). Is there any way to do this? Thanks.


I can't find a way to close a view panel, in particular the horizontal at the bottom, is pretty useless to me at this moment.


Can you play training modes offline in Overwatch?

I would like to practice my skills in Overwatch. Do you have to be online in order to play in training mode?


Is it better to label input fields, watermark them, or both?

When building forms, you need to effectively communicate with the user what information should be placed inside of the text boxes. I've seen a combination of watermarks in text boxes and labels for them.   If watermarks are used, what if the user forgets about exactly they need to enter? For instance they leave the page for a while because they got distracted or for some other reason. They have to remove their info before they can know exactly what they need to enter.  Google for instance uses watermarks for their log in form   But then on their sign up page they use labels and watermarks     So what is the preferred method? Should labels be used, should watermarks be used, A combination of both, or does it entirely depend on the circumstances?


How does surprise work when both sides of an encounter are attempting to surprise the other?

I an a total noob in D&D and just started LMoP (the Starter Set adventure).  We are now in a room before Klarg's cave (the Twin Pools, I think). One goblin escaped to tell Klarg that there's an attack coming. The book says Klarg, the Wolf, and the Goblins hide to prepare to ambush the PCs.   Now, my PCs want to suprise Klarg, the wolf, and the goblins since they deduced that there are monsters in this cave.  How does surprising work if two groups are trying to ambush/surprise one another?


Why am I getting undefined is not a function when using jquery?

HTML  more code here...  <script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="https://example.com/sites/all/modules/ac_modules/ac_exercise/ac_exercise.js?nkuo2r"></script>   more code here...  <div class="form-item form-type-textfield form-item-time-start">   <label for="edit-time-start">Time Start </label>  <input type="text" id="edit-time-start" name="time_start" value="11:28:12" size="4" maxlength="8" class="form-text" /> </div>   more code here...  Javascript - ac_exercise.js  $(document).ready(function(){    $("#edit-time-start").on("change paste keyup", function() {      alert($(this).val());    }); });   In Chrome's console I get the following error: Uncaught TypeError: undefined is not a function - ac_exercise.js?nkuo2r:1 which is this line of code:  $(document).ready(function(){


Windows 10 Redstone 4 Media Feature Pack missing?

Recently, I downloaded Windows 10 Redstone 4 and noticed that my version was missing the Media Feature Pack. So I tried to download it from  and faced a new problem -- that version did not match with my OS version. So I searched for the latest version but I didn't find it, either on the Microsoft website nor on any website.  So what should I do and how can I get the Media Feature Pack that matches with my OS?


What are the benefits/detriments to graduate students joining unions?

The graduate students at my university (a relatively large state school in the US) are considering joining a union. To help decide whether to sign a union card in support of joining the union, I'm interested in more information about how unions have helped graduate students at other universities. What are some improvements to graduate life gained by graduate students at other universities upon joining a union?  I'm also interested in information about how unions have hurt graduate students at other universities. What are some detriments to graduate life caused by graduate students joining a union?  I'm primarily interested in student-body-wide benefits/detriments, instead of student-specific or faculty/administrator-specific claims (e.g. "my advisor treated me better with the union behind me" or "my students have stopped working since they joined a union" is not what I'm looking for).


Why are the binary files (exe / dll) different between two builds of the exact same version of a solution?

Why does rebuilding the exact same version of a C# solution produces different binary files (exe / dll)? Is there a way to avoid this?  I'm using Visual Studio 2010 and .NET Framework 4.5.  EDIT:  I actually found a timestamp in the COFF Header of the binary files. Any idea on how to remove it (is this is even possible)?  Thanks


On the spectrum of a quantum mechanical system

Can the spectrum of a quantum mechanical operator contain both real and complex numbers?


Can I have 2 accounts from different regions and access the online store on PS5 all digital?

At the moment, I live ing India. When I get my PS5, I will link it with a PSN account that has its region set as India with an Indian credit card connected. In two years, I will move to France. Once I'm in France, as I cannot change the region of a PSN account after the fact, I create another PSN account with it's region set as France with a French credit card. I found that you can in fact have 2 psn accounts linked to the same console. However, my worry is that the games and the saved data of all the games that I played on my Indian PSN account with in India, will not be able to be played on my French PSN account. So, after I move to France, will this mean that my only choice is to keep the Indian PSN account so as to not lose 2 years of saved game data and games bought, and use my French PSN account from then on in order to access the French Online store and buy games. This would mean I'd switch between my Indian and French PSN accounts on my ps to play whatever games I've bought in each respective account. Ideally, I'd want to be able to have one PSN account and change its region later on, add my French credit card, delete my Indian credit card, change the address and continue playing the games I had bought when I was in India and buy new games now on the French online store. However, I saw that it is not possible to change the region of a PSN account after the account creation stage. Knowing my situation and my goal, what is the best way for me to move forward. Just get a regular PS5 or is there something I can do about this situation on a PS5 All-Digital? If I'm unable to get a regular PS5 and the all-digital is my only option, what then?


Is there a way I can use the force click on my MacBook trackpad as a right click (secondary click)?


Is it possible to use a bluetooth headset mic while having High quality sound

I have a Plantronics BackBeat Sense SE bluetooth headset. When Connecting it to Windows 10, it installs two profiles in Playback devices list:    PLT_BBTSENSE Hands-Free. PLT_BBTSENSE Stereo.   The Second one (Stereo) is set to be the "Default Device" and the "Default Communication Device" on the system.   At this point the sound works great and normally. The problem happens when I want to use the mic. When I start any program that uses the mic (recorder, chat, VoIP Calls, gaming, etc.) The sound suddenly stops working And I can only use the mic until I stop the recorder or the call.   The thing that kind of fixes the problem is setting the (Hands-Free) as the default device. I can hear the sound when I do that and it works with the mic but it becomes Very bad quality.  What I became to understand is that bluetooth had different profiles for sound and mic: A2DP and HSP. The first handle the voice(High Quality) but the latter handles the mic and reduces the sound quality.  Is this really the case? Is there anyway to make them work simultaneously? Is there any solution to this problem at all?


I make a content type that called "commission". And also I have created a Taxonomy called "commission" too. In the taxonomy we have some terms like "Fun" or "sports" and etc. When the user want to create commission node, they should choose one of the taxonomy terms. Now my question is this: I want a module to make a subscribe link for people that they can subscribe on the content with the just "sport" taxonomy term or "fun" taxonomy term or something else. It means I need a subscribe Newsletter module based on the Taxonomy terms. What shall I do?


How archaic is the use of a question mark mid-sentence?

I was wondering how common it is these days to use a question mark mid-sentence to indicate that a sentence contains more than one question, for example:     How can I get there? and why should I go?   This can be handy from time-to-time, but I'm aware that its use has declined quite a lot.  Is it still widely considered acceptable usage, at least amongst fluent English speakers?


How to remove password hint from an input

I am trying to get the password hint from the password change field, I already tried to disable the auto complete with the code  autocomplete="new-password" // or autocomplete="off"   but this does not work, does anyone have an idea how to solve this problem?  Edit:  My problem is when I try to change the password, my password change screen, auto completion puts the old password as a new password, all standard means have been discarded, apparently google does not care what you want.


Problems locating an adjustbox under a section

I just want a section title and an adjustbox with a table below. The fact is that they exchange their placement, i.e. the table appears above.  I tried some command like an hypothetical halign? instead of center written in \begin{adjustbox}, but I couldn't get any solution.  Maybe it exists some equivalence to [H] used in tables.  Any suggestion?  \documentclass[12pt]{article} \renewcommand{\baselinestretch}{1.5} \usepackage[utf8]{inputenc} \usepackage[catalan]{babel}  \usepackage{multirow} \usepackage[table,xcdraw]{xcolor} \usepackage{adjustbox}  \begin{document}  \section{Taules}  \begin{adjustbox}{center, captionbelow={Cerca d'avaries I.}, float=table}  \begin{tabular}{|l|l|l|} \hline \rowcolor[HTML]{FFFC9E}  \multicolumn{1}{|c|}{\cellcolor[HTML]{FFFC9E}\textbf{Incidents}}                                                    & \multicolumn{1}{c|}{\cellcolor[HTML]{FFFC9E}\textbf{Causes possibles}}                                                                      & \multicolumn{1}{c|}{\cellcolor[HTML]{FFFC9E}\textbf{Verificacions}}                                                                \\ \hline                                                                                & La xarxa no està sota tensió.                                                                                & \begin{tabular}[c]{@{}l@{}}Verificar la tensió en els\\ comandaments.\end{tabular}                                                 \\ \cline{2-3}  \multirow{-2}{*}{El motor no arranca en el buit.}                                                                   & El circuit induït està tallat.                                                                                & \begin{tabular}[c]{@{}l@{}}Comprovar el circuit induït i\\ el reòstat d'arrencada.\end{tabular}                                    \\ \hline \begin{tabular}[c]{@{}l@{}}El motor s'engega en el buit\\ i s'embala.\end{tabular}                                  & El circuit inductor està tallat.                                                                                & \begin{tabular}[c]{@{}l@{}}Comprovar el circuit inductor\\ i el reòstat de camp.\end{tabular}                                      \\ \hline \begin{tabular}[c]{@{}l@{}}El motor s'engega, però es\\ cala.\end{tabular}                                          & \begin{tabular}[c]{@{}l@{}}Error de muntatge: el born comú,\\ induït-inductor, està unit al reòstat\\ en comptes de la xarxa.\end{tabular}  & \begin{tabular}[c]{@{}l@{}}Un fil de la xarxa ha d'anar\\ directament al born comú.\end{tabular}                                   \\ \hline \begin{tabular}[c]{@{}l@{}}El motor s'engega amb poca\\ càrrega i s'embala.\end{tabular}                            & \begin{tabular}[c]{@{}l@{}}Error de muntatge: el born induït-\\ inductor està unital reòstat i no a\\ la xarxa.\end{tabular}                & \begin{tabular}[c]{@{}l@{}}Un fil de la xarxa ha d'anar\\ directament al born comú.\end{tabular}                                   \\ \hline \begin{tabular}[c]{@{}l@{}}El motor s'engega massa\\ lentament.\end{tabular}                                        & Falta d'excitació.                                                                                & \begin{tabular}[c]{@{}l@{}}S'ha d'engegar sempre amb el\\ reòstat de camp al zero.\end{tabular}                                    \\ \hline \end{tabular}  \end{adjustbox}  \end{document}


JavaFx Login Page not shutting down when called close from a method of another class?

I am opening a Login JavaFX page from UserController.java and it has its control in LoginController.java.After processing it in LoginController.java and I am executing a close method to close the stage declared in UserController(which contains the stage for Login) but it throws NullPointerException  public class UserMenuController {     @FXML     private MenuItem Login;     Stage loginStage;      public void LoginPage(ActionEvent actionEvent) throws IOException {         loginStage=new Stage();         Parent loginFXML=FXMLLoader.load(getClass().getResource("/login.fxml"));         loginStage.setTitle("Login");         Scene loginScene=new Scene(loginFXML);         loginStage.setScene(loginScene);         loginStage.show();      }     public void shutLoginStage(){         loginStage.close();     } }  public class LoginController implements Initializable {     @FXML     private WebView view;     UserMenuController u=new UserMenuController();      public void initialize(URL location, ResourceBundle resources) {         view.getEngine().load("https://kite.trade/connect/login?v=3&api_key=kpnnt4xthv187j8p");         view.getEngine().getLoadWorker().stateProperty().addListener((observable, oldValue, newValue) -> {[enter image description here][1]             //Gets the URL  Request Token             if (newValue.equals(Worker.State.FAILED)) {                 //System.out.println(view.getEngine().getLocation());                 System.out.println(view.getEngine().getLocation());                 u.shutLoginStage();              }          });


How to make binding between the ">" and "</"?

I want to add binding right to content of a control.   <Hyperlink NavigateUri="{Binding Link}" RequestNavigate="Hyperlink_RequestNavigate">                     ???? {Binding Title} ???   </Hyperlink>   But how can I do that? I tried this:   <Hyperlink NavigateUri="{Binding Link}" RequestNavigate="Hyperlink_RequestNavigate" Content="{Binding Title}" />   but it gave me an error because there was no property Content


Determine variables that fit this criterion...

There is a unique triplet of positive integers $(a, b, c)$ such that $a ≤ b ≤ c$.  $$ \frac{25}{84} = \frac{1}{a} + \frac{1}{ab} + \frac{1}{abc} $$  Just having trouble with this Canadian Math Olympiad question. My thought process going into this, is:  Could we solve for $\frac{1}{a}$ in terms of the other variables? Then substitute that value in for each occurrence of $a$, to solve for $a$?  That's all I can really think of right now. It's a question I'm not exactly used to... It's sort of the first of these kinds that I've faced.  Thanks.


What preposition is correct 'sleep on the bed' or 'sleep in the bed'

Are both expressions correct? If yes, do they have different meanings? It seems to me that I came across both of them in books, but I'm not sure.


In the video on YouTube, , it claims that a ticking watch has more mass then a non ticking watch due to the intrinsic KE, PE and thermal energy of the watch's internal movements that manifests itself as part of the watch's mass.  Is this correct ?  To me there is something wrong with this argument, but I cannot put my finger on it.


Where's my phone mounted to browse it from shell?

I have connected a smartphone and would like to copy some file onto it using midnight commander. I've found out that the mount point is mtp://[usb:002,004]/Card/ however when I try to run cd mtp://[usb:002,004]/Card/ I get No such file or directory. How should I point to it in terminal?


KL divergence vs Absolute Difference between two distributions?

Why should I use KL divergence over just giving the abs difference from two PDFs?


Hide most comments on "old" Stack Overflow posts

Proposal  For Stack Overflow, I suggest the following modification:   For the first X days of a post's existence, comments are displayed as they are now.  X should be set based on the number of days an open question is likely to be active on the site.   After X days, all comments associated with the post are hidden; you need to click a link at the bottom of each post to reveal comments.  There are two exceptions:   All comments on closed questions are displayed, unless the question was closed as a duplicate. All comments on posts with a negative score are displayed.      Comments supposed to be like sticky notes which tend to lose their stickiness over time and eventually fall into desk clutter.  Months later, you gather them up and puzzle about what they were supposed to mean before dumping them in the trash.  But comments have turned out to be more like red pen notes your teacher puts on your first draft or graffiti.  (Sure there are good comments too.  But I can see no way to tell the good from the bad.  And no: comment voting does not help.)  If you really want to preserve some information, be sure to put it into the body of a post.  People who care to do so can still open the comments and read all the funny jokes and whatnot, but the rest of us are free to ignore them.  (Note that people with the power to delete comments should probably still see them by default.  Sorry.)  The genesis of the idea may be found , but the reasoning for preserving comments on "problem" posts is that they allow people who run across the posts later (usually via a search) to have a history of what went wrong.  Comments on closed questions and truly bad posts have the potential for teaching how the system is supposed to work.


How to disable jQuery validation for a specific Submit button?

I have two buttons, one for Next and one for SAVE  when clicking Next I would like to let jQuery do its validation, but when SAVE is CLICKED jQuery will not do its validation. Are there event handlers for this?


Unable to get saved SharedPreferences value in a class inside statice method

In my project I want to share my referral code with app link.I already save referral code in SharedPreferences but I am unable to set that message in a separate class.  public static SharedPreferences sharedPreferences;  public static void shareMyApp(Context context) {      String link = "https://play.google.com/store/apps/details?id="+context.getPackageName()+"Signup with my referral code.My Code is "+sharedPreferences.getString("member_id",null);      Intent sharingIntent = new Intent(Intent.ACTION_SEND);     sharingIntent.setType("text/*");     sharingIntent.putExtra(Intent.EXTRA_TEXT, link);     context.startActivity(Intent.createChooser(sharingIntent, "Share Via")); }   This method is present inside a java class.When this method called an error appear.     java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String android.content.SharedPreferences.getString(java.lang.String, java.lang.String)' on a null object reference   How Can I print that code with app link?


java.lang.NullPointerException: Attempt to invoke virtual method 'float TallarRatingObject.getScore()' on a null object reference

I want to build a model based on a json, but I encountered a null object error.  image of Json and models made in android studio


I have just set up an EC2 instance to play around with and am testing file permissions; however, I notice that the execution bit is not being passed down to the lower level (read and write are, just not execution).  [ec2-user@server www]$ touch web/hi [ec2-user@server www]$ ls -l web/ total 4 -rw-rw-r-- 1 ec2-user apache  0 May 27 19:02 hi -rwxrwxr-x 1 ec2-user apache 43 May 27 05:15 index.php [ec2-user@server www]$ getfacl --all-effective web/ # file: web/ # owner: ec2-user # group: apache # flags: -s- user::rwx group::rwx other::r-x default:user::rwx default:group::rwx default:other::r-x   What am I missing to get the execution bit to pass down?


Can't remove old OneDrive account from Mac and sign in with new account

I used to work for a company and used a company email to sign into OneDrive on my MacBook. I have since changed companies and the email I originally signed into OneDrive with no longer exists. I want to sign into OneDrive with my new email, but I can't seem to remove the old email. I consistently get prompted to just sign in with the old account that doesn't exist, and can't figure out how to remove the old account. When I try to click on "help and settings", the only option I am presented with is 'quit OneDrive'.  I've tried removing OneDrive from my computer using an app cleaner which supposedly removed all associated files, but when I re-downloaded OneDrive, I was still getting prompted to sign in with that old defunct email.


In Latvian culture lv-LV there are special characters like 'ā', 'ī', 'ģ' etc. Is there any built-in way, where following code returns true ?  var nameLv = "Jevģeņijs";  var nameEng = "Jevgenijs";  nameLv.Equals(nameEng, StringComparison.InvariantCultureIgnoreCase);


Why doesn't Workspace Switcher Icon appear in Launcher?

I am new to Ubuntu, and the Workspace concept intrigues me.  Using Help, I find that there is an Icon for the Workspace Switcher, and it is not where the help document says it should be. Why not?


Which one is correct "at an" or "in an"?

Which one is correct?  • I am an engineer, and I work "at an" office.  OR  • I am an engineer, and I work "in an" office.  If both are correct, what is the difference between them?  Thanks in advance!


Let's assume we have some PCs moving along infinitely flat plains. In the air (some distance away) is a large creature with a rider that can cast spells. In optimal conditions (so there's normal daylight and no obstructions), how far from the PCs can the rider be and still see them?   Note that I've certainly seen the Light Sources and Illumination table, but that's not helpful. We're talking about natural light sources under optimal conditions; is there an official Pathfinder rule for how far PCs and NPCs can see?


Proving that a doubly stochastic matrix is a convex combination of permutation matrices

This is a homework problem in my graph theory class and I wanted tips on how to solve it. Any tips would be appreciated..   Show that any doubly stochastic matrix is a convex combination of permutation matrices, i.e. any double stochastic A can be written as A=t1P1 +t2 +⋯tlPl, where each Pi is a permutation matrix, and the numbers ti  satisfy t1, . . . , tl ≥ 0 and ∑li=1 ti = 1.


I would like to see my sky texture and not be forced to go into render mode, because render mode is very slow to travel. Is there any way to have a sky and see it through solid mode?


Segmentation fault on large array declaration

I want to declare an unsigned long long array with 2mil. elements. When I first define the length of the array const and then define the array I get a segmentation fault error. However when I define the length just as unsigned long long the declaration works.   int main(int argc, const char *argv[]) {     const unsigned long long lim = 2000000; //If I omit const, it works.     unsigned long long nums2lim[lim];      exit(EXIT_SUCCESS); }   Does anybody know why the segmentation fault is thrown?


How to make a redstone clock that I can turn on/off with a lever?

I want to create a Redstone clock that can be enabled and disabled with a lever permanently placed down.


Presenting Areas of Land from shapefile to 1 decimal position and convert from m-squared to hactares

I've got a shapefile containing multiple polygons, attached to an attribute table. I'm looking at labeling all these polygons using the attribute 'AREA' column. However, these areas have not been rounded off and are in meters squared whereas I need them to be in Hectares. How would I convert these into hectares then present as a label.  Also, how can I create a white background for these labels?  I'm using ArcMap 10.3.1


Can someone explain a stock's "bid" vs. "ask" price relative to "current" price?

In my online brokerage account, I want to buy a particular stock and I see the following:  Bid:  13.20 x200           Ask:  13.27 x1,000   the current stock price is 13.22.   Can someone explain what the bid and ask prices mean relative to the current price?  If I buy 1000 shares, why would I pay more?


This is the code that I have:   Map<Integer,String> map = new HashMap<>(); map.put(23,"Nitin"); map.put(45,"Kapil"); map.put(20, "Sam"); map.put(18,"Adam"); for(Map.Entry m:map.entrySet()){     System.out.println(m.getValue()+":"+m.getValue()); }   But I cannot possible order the data, I need to sort this hash map by value (Name).  Input: Map<Age,Name>  23, Nitin 45, Kapil 20, Sam 18, Adam   Output:   18, Adam 45, Kapil 23, Nitin 20, Sam


I'm trying to implement Realm database in my project, I have a class with methods to add items in the database, I use that class to store those methods and call them in my fragment, but when I do that I get an error:  java.lang.NullPointerException: Attempt to invoke interface method 'void io.realm.RealmChangeListener.onChange()' on a null object reference   What am I doing wrong here?  public class Repositorio extends GlobalActivity {       private RealmChangeListener realmListener;     public Realm realm;     private Context context;        public Repositorio() {     }      public Repositorio(Context context) {         this.context = context;         this.realm = Realm.getDefaultInstance();         this.realmListener = new RealmChangeListener() {             @Override             public void onChange() {                 Log.i("realmtest", "some values in the database have been changed");             }         };          this.realm.addChangeListener(realmListener);     }       public void addCliente(String nome, String local, String estado, String telefone, String email, String tipo) {         realm.beginTransaction();          Pessoa mPessoa = realm.createObject(Pessoa.class);         mPessoa.setId(UUID.randomUUID().toString());         mPessoa.setNome(nome);         mPessoa.setCidade(local);         mPessoa.setEstado(estado);         mPessoa.setTelefone(telefone);         mPessoa.setEmail(email);         mPessoa.setTipo(tipo);          realm.commitTransaction();           Toast.makeText(context, "Cliente adicionado com sucesso", Toast.LENGTH_LONG).show();     }      @Override     public void onPause() {         super.onPause();          realm.removeChangeListener(realmListener);      }      @Override     public void onResume() {         super.onResume();          realm.addChangeListener(realmListener);      }       @Override     protected void onDestroy() {         super.onDestroy();         if (realm != null) {             realm.close();             realm = null;         }     }   }   Fragment:   @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {          final View v = inflater.inflate(R.layout.cadastra_produtos, container, false);          mRepositorio = new Repositorio(getActivity());          novocliente = (TextView) v.findViewById(R.id.novocliente);            novocliente.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                  mRepositorio.addCliente("ZÉ", "LALAAL", "SC", "3333-3333", "teste@teste.com", "Pessoa Física");             }         });          return v;     }   Global:  public class GlobalActivity extends AppCompatActivity {      public Ferramentas mFerramentas;     public Realm realm;       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);           mFerramentas = new Ferramentas();         realm = Realm.getDefaultInstance();        }   }


In present-day English, a double negative as an intensifier is regarded as non-standard. For example I don't think that "I can't get no satisfaction" is considered as standard English.  However, here's from Hamlet Act 1, Scene 2.  O, most wicked speed, to post With such dexterity to incestuous sheets! It is not, nor it cannot come to good; But break my heart,--for I must hold my tongue!  Notice that "nor it cannot come to good" is a double negative. And Hamlet is the Prince of Denmark who is supposed to be well-educated. Here's from the Abbot's:  Many irregularities may be explained by the desire of emphasis which suggests repetition, even where repetition, as in the case of a negative, neutralizes the original phrase: ... This idiom is a very natural one, and quite common in E.E. (E. A. Abbott, A Shakespearean Grammar, Item 406, p.295)   So here's my question.  Since when a double negative as an intensifier was considered as non-standard and why?


How to re-enable Nvidia Driver after Software Update?

I have Ubuntu 14.05 installed with an Nvidia Driver.  After recent automatic software updates, the Nvidia driver was disabled and when I rebooted, the standard driver was enabled.  How do I re-enable the Nvidia driver?  NOTE: I tried to re-install the NVIDIA driver, but had problems.  It requires the kernel source code and that now seems to be missing.  I can't install the kernel source now because the machine is now off the internet.


Proof that if $\gcd(a,p^2)=p$ and $\gcd(b,p^3)=p^2$ then $(ab,p^4)=p^3$

So $p =ax+p^2y$ and $p^2 =bz+p^3w$  $ax= p-p^2y$ and $bz= p^2-p^3w$  $axbz= p^3-p^4w-p^4y+p^5wy$  $abxz= p^3-p^4(w+y-pwy)$  $abxz+p^4(w+y-pwy) = p^3$  How can I say that $\gcd(ab,p^4) = p^3$ ?


Rate of Evolution of population of long lived individuals

Is it necessary that rate of evolution of longer lived trees will be lesser than that of annuals ? I understand that new individuals will come up faster in annuals  and it may adapt to varying conditions faster but does it necessarily imply that long lived trees will evolve slower ?


Prove that $\forall n > 1, n \nmid 2^n-1$.

$$\forall n > 1, n \nmid 2^n-1$$.   I have proved that this would not be divisible by some even $n$ but I'm unable to do it for odd $n$.


Please help me find the sum of this series:  $$1 + \frac{2}{3}\cdot\frac{1}{2} + \frac{2}{3}\cdot\frac{5}{6}\cdot\frac{1}{2^2} + \frac{2}{3}\cdot\frac{5}{6}\cdot\frac{8}{9}\cdot\frac{1}{2^3} + \cdots$$  All I could figure out was to find the $n^{\text{th}}$ term as:  $$a_n = \frac{2 \cdot (2+3) \cdots(2+3(n-1))}{3 \cdot 6 \cdot 9 \cdots 3(n-1)} \cdot\frac{1}{2^{n-1}}$$  What To do ahead of it. I don't know. Please help.


comma separated assignment to an integer variable n c

I'm unable to understand the working of this piece of code.  #include<stdio.h> void main(){   int a,b;   a=3,1;   b=(5,4);   printf("%d",a+b); }     The output is 7. What is that assignment?


Is there a ZIP code I can enter when paying-at-the-pump in the USA with a foreign credit card?

In the USA, many  fuel dispensers that accept credit cards require a  that corresponds to the billing address of the credit card.  In Canada, for instance, we have , so it's not obvious what you're supposed to type in since the gas dispensers have only numeric keypads.  Entering '00000' or '90210' seems to always result in failed authorization.  Is there a zip code that works for credit cards with foreign billing addresses?


Why do the copied arrays/objects change when I change the original?

I'm making an HTTP request to my backend and I receive a JSON from the server, so with the response I set my dataSource like so:    await this.apisService.getList(_token).then((data) => {   this.arrList = data;   this.arrListHelper = data; ...   And if I'm changing something in the arrList, the helper is changing as well, so I made a test function to check different methods I found online and only the JSON parse thing solved my problem. I get why is this is happening I just don't get why these solutions doesn't work:  const _aaa = this.arrList.slice(); const _bbb = Object.create(_aaa); const _ccc = Array.from(_bbb); const _ddd = { ..._ccc }; const _eee = Object.assign({}, _ddd); const _fff = JSON.parse(JSON.stringify(_eee));  this.arrList [0]['Name'] = 'ASD'; console.log(_aaa[0]); // ASD console.log(_bbb[0]); // ASD console.log(_ccc[0]); // ASD console.log(_ddd[0]); // ASD console.log(_eee[0]); // ASD console.log(_fff[0]); // original


How can I repartitioning Ubuntu using "unallocated" spaces at random parts of my hard drive?

I have this unallocated space before my root partition and GParted doesn't let me add it to my Ubuntu partitions. I am running Ubuntu from a USB drive. While it lets me add it my Windows partitions. What can I do to increase my partition size (selected in the picture)?


does my port of entry have to be the place in the annotated section of my b1/b2 visa?

I was recently issued a B1/B2 visa with an annotation that i am going there to sit for an exam on 5th feb in Atlanta.  my visa has an issue date of october. I am planning on going to the US in early January. Does my port of entry have to be Atlanta or may i go to some other place like chicago and later go to atlanta for my exam .


How can I install Ubuntu Desktop on Ubuntu app on Windows 10?

I have installed Ubuntu 20.04 Microsoft Store on Windows 10 version 2004 and I want to experience the GUI of Ubuntu instead of using shell.  How can I install GUI for Ubuntu app?


Should every page in a site have a totally unique H1?

I agree that every page in a site should have a unique TITLE, and that every page should have one and only one H1 element, but should the text of each H1 be completely unique too?  Instinctively one would think so, but there are potentially many cases where (IMHO) mind this doesn't make sense and attempting to do so will impair the user experience & presentation of the page - for example, where pages are part of a closely related cluster, e.g. a multi-step process/tool/wizard.  Surely the process name should go in the H1 (e.g. "Pregnancy Planner"), and the current step you're on should be marked up as a H2 (e.g. "Step 1 - Trying for a baby"), rather than shoehorning both into a single H1 together (e.g. "Pregnancy Planner - Step 1 - Trying for a baby")?  Not only does this make the H1 rather long and potentially impact the presentation of the page, I would argue that in combining both into one you also lose semantic goodness, as the page is surely semantically richer by keeping parent (process) and child (step) as separate, nested headings?  Furthermore, the current proposal I have read is that on the first page the H1 should be the name of the process and the first step an H2, but on subsequent pages the same text should not be a H1 at all (just text styled exactly the same as an H1) and the current step should become the H1 instead. For me this is introducing unnecessary complexity to the page authoring/production process, and inconsistency in the semantic structure of the pages within the stepped process.  So it all comes back to the basic assertion that each H1 must be completely unique, which I question. Can you convince me that this should be so and that the cost/complexity of implementing this (especially in situations such as that above) is worth it?  Your thoughts please...


Python - Appending individual elements to matrix individually

May the matrix be:  >>> A=[[]]*3 >>> A [[],[],[]]   I want to append the value 1 to the first list of the matrix so that:  >>>A[0].append(1) >>>A [[1],[],[]]   But when I try it this way, the result is:  >>>A[0].append(1) >>>A [[1],[1],[1]]   How do I make it only append in the first list?  I'm on Python 3.6.6


Uncaught ReferenceError: GetObject is not defined in chrome

I am trying this  if it is working. I try to debug it in JSFiddle and JSBin using Chrome v55 and IE v7. I know that this is impossible Cuz I read some links before I make this thread. Is there any alternative way for this kind of problem on how to get the mac address of pc?.    <script type="text/javascript">     var macAddress = "";     var ipAddress = "";     var computerName = "";     var wmi = GetObject("winmgmts:{impersonationLevel=impersonate}");     e = new Enumerator(wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True"));     for(; !e.atEnd(); e.moveNext()) {         var s = e.item();          macAddress = s.MACAddress;         ipAddress = s.IPAddress(0);         computerName = s.DNSHostName;     }  </script> <input type="text" id="txtMACAdress" /> <input type="text" id="txtIPAdress" /> <input type="text" id="txtComputerName" />  <script type="text/javascript">     document.getElementById("txtMACAdress").value = unescape(macAddress);     document.getElementById("txtIPAdress").value = unescape(ipAddress);     document.getElementById("txtComputerName").value = unescape(computerName); </script>


How to make sure only one instance of a bash script runs?

A solution that does not require additional tools would be prefered.


Passing an enum value as command parameter from XAML

I want to pass an enum value as command parameter in WPF, using something like this:  <Button      x:Name="uxSearchButton"      Command="{Binding Path=SearchMembersCommand}"      CommandParameter="SearchPageType.First"     Content="Search"> </Button>   SearchPageType is an enum and this is to know from which button search command is invoked.  Is this possible in WPF, or how can you pass an enum value as command parameter?


Update on Ubuntu - coloured lines around everything

Everyday I check for updates on Ubuntu 16.04 LTS. I updated to 4.4.0-65-generic today and now on everything I'm getting thick rainbow coloured lines around every dialog box in every program. My setup is pretty standard. Skylake i5-6500, Nvidia 950gtx. Does anyone know how to fix it?


Find remainder of $F_n$ when divided by $5$


When exactly does tmpwatch clear out files I place in /tmp?

CentOS 6.x   I'm confused on when exactly files I place in /tmp/ are deleted.  /etc/cron.daily/tmpwatch has the following:  #! /bin/sh flags=-umc /usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \         -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix \         -X '/tmp/hsperfdata_*' 10d /tmp /usr/sbin/tmpwatch "$flags" 30d /var/tmp for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do     if [ -d "$d" ]; then         /usr/sbin/tmpwatch "$flags" -f 30d "$d"     fi done   The section in line 5 that reads -X '/tmp/hsperfdata_*' 10d /tmp leads me to believe that files I place in /tmp/ will remain for 10 days (assuming they aren't locked during deletion of course or the directory is mounted on a tmpfs file system).   Is that correct?


Have you ever seen in your car a mosquito? it's not capable of going 60 mph. How come it can still keep up with the car as if it weren't trying

For instance, a fly is staying at the same spot, then your car suddenly moves forward at a rate of 60 mph. The mosquito IS staying at the same spot but for some reason it moves along with the car as if nothing happened.


upgrade from 14.04 to 16.04 on digitalocean

got:  W:Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-i386/Packages404 Not Found  ,   E:Some index files failed to download. They have been ignored, or  old ones used instead.