We are selling our house, and I have not noticed any problems myself with our water pressure, but the home inspector's report said--- Water pressure rising and dropping as pump is running and shutting down. This is improper. Water pressure should maintain even pressure after the pressure tank. Recommend plumber to evaluate.   I always thought it was normal for some change...that a pressure switch is set between two readings to come on and off and the pressure in the house would fluctuate between these two pressures.  What am I misunderstanding?

When I run the shower, mostly hot water, the pressure will run normal for a minute, then raise for a minute, then repeat. My home is supplied by a well. What is causing this?


Can any tripod be used for any camera?If no,can anyone suggest me a tripod for Canon SX 150 IS.()

Is there a standard tripod mount?  Is it reasonable to assume that a given tripod will attach successfully to a given camera, or will I have to research my options?


My question is not rigidly related to physics. The principle of least actions says that for any dynamical system there exists a function parameterized by $q$'s and $\dot{q}$'s such that the line integral of the function from state $A$ to state $B$ with respect to the parameter $s$ is stationary. Is there any rigorous mathematical proof of the principle?  Can I apply the principle of least action to study the evolution of a dynamical system in phase Space?

I'll be generous and say it might be reasonable to assume that nature would tend to minimize, or maybe even maximize, the integral over time of $T-V$.  Okay, fine.  You write down the action functional, require that it be a minimum (or maximum), and arrive at the Euler-Lagrange equations.  Great.  But now you want these Euler-Lagrange equations to not just be derivable from the Principle of Least Action, but you want it to be equivalent to the Principle of Least Action.  After thinking about it for awhile, you realize that this implies that the Principle of Least Action isn't really the Principle of Least Action at all:  it's the "Principle of Stationary Action".  Maybe this is just me, but as generous as I may be, I will not grant you that it is "natural" to assume that nature tends to choose the path that is stationary point of the action functional.  Not to mention, it isn't even obvious that there is such a path, or if there is one, that it is unique.  But the problems don't stop there.  Even if you grant the "Principle of Stationary Action" as fundamentally and universally true, you realize that not all the equations of motions that you would like to have are derivable from this if you restrict yourself to a Lagrangian of the form $T-V$.  As far as I can tell, from here it's a matter of playing around until you get a Lagrangian that produces the equations of motion you want.  From my (perhaps naive point of view), there is nothing at all particularly natural (although I will admit, it is quite useful) about the formulation of classical mechanics this way.  Of course, this wouldn't be such a big deal if these classical ideas stayed with the classical physics, but these ideas are absolutely fundamental to how we think about things as modern as quantum field theory.  Could someone please convince me that there is something natural about the choice of the Lagrangian formulation of classical mechanics (I don't mean in comparison with the Hamiltonian formulation; I mean period), and in fact, that it is so natural that we would not even dare abandon these ideas?


Thanks to an answer to my question asked here, I used the following codes to generate for each theorem-alike environment exactly one square symbol as the ending sign:  \documentclass[12pt]{amsart} \usepackage{manfnt} \makeatletter \renewcommand\@endtheorem{\vvv@endmarker\endtrivlist\@endpefalse} \newcommand\vvv@endmarker{% {\unskip\nobreak\hfil\penalty50 \hskip2em\vadjust{}\nobreak\hfil\openbox \parfillskip=0pt \finalhyphendemerits=0 \par \penalty 10000 \parskip=0pt\noindent}\ignorespaces} \makeatother  \newtheorem{thm}{Theorem}  \begin{document} \title[]{Title} \author[]{Author}  \maketitle  \section{Proofs} ... The above argument proves the following theorem: \begin{thm} There are infinitely many integers $x, y, z > 0$ such that \[ x^{2} + y^{2} = z^{2}.\] \end{thm}   \end{document}   However, how do I make the square symbol, the ending sign, lie within the displayed equation? I tried \qedhere but nothing happened.

I have a question about making an ending symbol.  It is a LaTex-default that every proof environment has an ending symbol. I want to make every theorem-alike environment such as the example environment have also an ending symbol. But how to manually set this up? Specifically, I want to make all these environments ended by a square symbol.  \newtheorem{thm}{Theorem} \newtheorem{lem}[thm]{Lemma} \newtheorem{cor}[thm]{Corollary} \newtheorem{pro}[thm]{Proposition} \newtheorem{assump}{Assumption} \newtheorem{axiom}{Axiom} \newtheorem*{conj}{Conjecture} \theoremstyle{definition} \newtheorem{defi}[thm]{Definition} \newtheorem{exam}{Example} \newtheorem{exer}{Exercise} \newtheorem*{rem}{Remark} \newtheorem*{notation}{Notation} \newtheorem*{note}{Note}   I am looking for, with gratitude, a comprehensive setup.


Trying to extract the date out of this string:  Publisher: Broadway Books; Anniversary, Reprint edition (October 8, 2002)   I want to get this: October 8, 2002  This is the regex I was using. Goal is to make it work for any date in the format above. It works when I test it on  but returns "None" in my code.  pattern = re.compile("(Jan(uary)?|Feb(ruary)?|Mar(ch)?|Apr(il)?|May|Jun(e)?|Jul(y)?|Aug(ust)?|Sep(tember)?|Oct(ober)?|Nov(ember)?|Dec(ember)?)\s+\d{1,2},\s+\d{4}") date = pattern.match(tag.get_text())

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I'm attempting to set up SQL Server replication for the first time for two servers on two different domains. Server A is the primary server which is running MS SQL Server 2014 whereas Server B is running MS SQL Server Express. I have two questions regarding this.   Is it possible to have replication between a SQL Server 2014 server and a SQL Server express server? Is the data secure in transit. Does it transmit the data over HTTPS? Is there an option to set this or is this by default?   Also, the database tables I'll be replicating are identical.

We have a small branch app that stores some data in a SQL Express Database.  We want to have an almost real time copy of this table in our headquarters, were we have SQL Enterprise 2014. I say almost, because it doesn't matter if there is a 5 minute delay or something like that.   The main thing is that it's able to synchronise after a network disconnection between branch and headquarter.  Any solution that does not requiere licensing costs for the branch office?


Prove that the union of two subspaces of $V$ is a subspace of $V$ if and only if one of the subspaces of $v$ is contained in the other.  May someone please validate this proof:  Let $V_1,V_2$ be two subspaces of $V$. Suppose $V_1 \cup V_2$ is a subspace of $V$. Then if $x_1 \in V_1$ and $x_2 \in V_2$ then we must have $x_1 \in V_1 \cup V_2$ and $x_2 \in V_1 \cup V_2$ so that we must have $x_1+x_2 \in V_1 \cup V_2$. But this by definition means $x_1+x_2 \in V_1$ or $x_1+x_2 \in V_2$. Either way, by existence of additive inverses and closure properties for subspaces we have:  $$(x_1+x_2)+(-x_1) \in  V_1$$  Or  $$(x_1+x_2)+(-x_2) \in V_2$$  By associative/commutative properties we have:  $x_2 \in V_1,  \text{or} ,x_2  \in V_1$  Edit:  Thus we have shown if $x_1 \in V_1$ and $x_2 \in V_2$ then $x_1 \in V_2$ or $x_2 \in V_1$. If $x_1 \in V_2$ for all $x_1 \in V_1$ then we have $V_1 \subseteq V_2$. If $x_2 \in V_1$ for all $x_2 \in V_2$ then $V_2 \subseteq V_1$. In either case we see one subspace is a subset of the other.

I'm having a difficult time understanding this statement. Can someone please explain with a concrete example?


I am looking at  and coming from little EE knowledge, it left me confused. First of all, it defines bandwidth as the following     Bandwidth is defined as the measure of a circuit or transmission channel to pass a signal without significant attenuation over a range of frequencies. Bandwidth is measured between the lower and upper frequency points where the signal amplitude falls to -3 dB below the pass-band frequency. The -3 dB points are referred to as the half-power points.   Can someone explain that more simply? Also why is -3 dB considered half-power points. This definition kinda sounds like those coaxial cable splitters you can get for your home that have a frequency range printed on them. Is that what this definition is applying to?    Then I have a question about this part:     If you input a 1 V, 100 MHz sine wave into high-speed digitizer with a bandwidth of 100 MHz, the signal will be attenuated by the digitizer’s analog input path and the sampled waveform will have amplitude of approximately 0.7 V. The value of ~0.7 V can be calculated by using the following equation:   -3 dB = 20 LOG (Vppout / Vppin)   Why would inputting 1 volt peak to peak 100mhz sine wave into a digitizer output 0.7 volts peak to peak. I have heard Nyquist–Shannon sampling theorem said, but don't really understand it from a working standpoint (I assume it is applying here). If a signal is coming up at 100mhz and you are taking 100mhz samples, wouldn't that be enough to duplicate the 1 volt peak to peak signal? Also, how is the -3 dB applying to that formula? I don't see how it is involved.

My oscilloscope has 100 MHz -3dB bandwidth. -3dB is 0.707 units (sqrt(2) / 2). What does this mean, why 70.7% attenuation? Is there any particular reason for this attenuation level?


I am just setting up a server that occupies firewalld as the main firewall, but I have a problem ... doing systemctl status firewalld  it appears that the service is running, but with certain problems Feb 06 03:17:53 VPS1256 systemd[1]: Starting firewalld - dynamic firewall daemon... Feb 06 03:17:54 VPS1256 systemd[1]: Started firewalld - dynamic firewall daemon. Feb 06 03:17:54 VPS1256 firewalld[1667]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now. Feb 06 03:17:54 VPS1256 firewalld[1667]: WARNING: ipset not usable, disabling ipset usage in firewall. Feb 06 03:17:54 VPS1256 firewalld[1667]: WARNING: Failed to load nf_conntrack module: modprobe: ERROR: could not find module by name='nf_conntrack'                                          modprobe: ERROR: could not insert 'nf_conntrack': Function not implemented                                          modprobe: ERROR: Error running install command for nf_conntrack                                          modprobe: ERROR: could not insert 'nf_conntrack': Operation not permitted Feb 06 03:17:54 VPS1256 firewalld[1667]: ERROR: Failed to read file "/proc/sys/net/netfilter/nf_conntrack_helper": [Errno 2] No such file or directory: '/proc/sys/net/netfilter/nf_conntrack_helper' Feb 06 03:17:54 VPS1256 firewalld[1667]: WARNING: Failed to get and parse nf_conntrack_helper setting Feb 06 03:17:55 VPS1256 firewalld[1667]: WARNING: ebtables not usable, disabling ethernet bridge firewall.  What are these errors due to? Any way to fix them?

I'm running a VPS of a german provider and want to switch from Ubuntu to CentOS. There I tried to install firewalld (was not preinstalled), but it always fails with the error  ERROR: Failed to load nf_conntrack module: modprobe: ERROR: could not find module by name='nf_conntrack' modprobe: ERROR: could not insert 'nf_conntrack': Function not implemented modprobe: ERROR: Error running install command for nf_conntrack modprobe: ERROR: could not insert 'nf_conntrack': Operation not permitted   Obviously the nf_conntrack kernel module was not found. Since this is a VPS, I cannot tinker with the kernel modules. On the support site of my provider I found a list of available kernel modules, for example:  ip_conntrack_netbios_ns ipt_conntrack    ip_conntrack    ip_conntrack_ftp    ip_conntrack_irc   Since nf_conntrack is not listed here, does that mean, that I cannot use firewalld? Is it possible to run it without this module?  I guess I could use iptables, if I wanted to (it seems to run correctly). But as I have more experience with firewalld, I would like to stick with it.    CentOS Linux release 7.7.1908 (Core)  uname -a: Linux xxxxxx.xxxxxxxx.xxx 3.10.0-042stab140.1 #1 SMP Thu Aug 15 13:32:22 MSK 2019 x86_64 x86_64 x86_64 GNU/Linux


Are there any methods or bash tools that can observe some events (such as creating a folder) and then do another actions?

There is a directory A whose contents are changed frequently by other people.  I have made a personal directory B where I keep all the files that have ever been in A.  Currently, I just occasionally run rsync to get the files to be backed up from A to B. However, I fear the possibility that some files will get added in A, and then removed from A before I get the chance to copy them over to B.  What is the best way to prevent this from occurring? Ideally, I'd like to have my current backup script run every time the contents of A get changed.


I'm fairly sure it is false, but I'm not quite sure about which test I should use to prove it.  $$\sum_{n=2}^\infty \ln\left(\frac{n-1}{n}\right) = -1 $$ I think using the integral test should work, but it may get kind of messy, so I'm looking for som advice. All I have to do is prove that it diverges, right?  Thanks in advance.

Why does the series $\sum_{n=1}^∞ \ln ({n \over n+1})$ diverges? I'm looking for an answer using the comparison test, I'm just not sure what I can compare it to.   And can I have some tips on what to look at when handling with series that have logarithms in the expression?   Thanks in advance!


I've used chrome for years, and comodo firewall and HIPS protection for some months, but suddenly google chrome started crashing as soon as it was loaded. I tried to reset my user profile and reinstall the program, but nothing changed, and loading it in Comodo sandbox didn't lead to any results. I noticed that in temporary mode, chrome crashed only after some seconds. Today I installed Comodo Dragon (which should be a modified version of google chrome), and it worked perfectly. So I tried to run google chrome in comodo sandbox, and it actually started, but I saw the message "aw, snap" for every page I tried to load. I clicked on "More info" and saw that comodo firewall is known to enter in conflict with chrome. So I temporarly disabled it, but chrome kept crashing. Now chrome doesn't start anymore even in comodo sandbox. What can I do?

Last night, I was using Chrome just nicely, but this morning, I can't even start Google Chrome as it immediately crashes. I have already tried a clean uninstall and reinstall of Google Chrome but still the same error pops up (it does not happen while I'm opening Google Chrome. I woke up and only then realized I can't open my Chrome and it keeps popping up saying that Google Chrome has stopped working.)  OS : Win 7 64-bit  Here is the detail of the crashes  Problem signature:  Problem Event Name:    APPCRASH   Application Name:    chrome.exe    Application Version:    35.0.1916.114 Application Timestamp:    53726019    Fault Module Name:    chrome.dll   Fault Module Version:    35.0.1916.114   Fault Module Timestamp:    53725d18    Exception Code:    c0000005    Exception Offset:    00728bc8      OS Version:    6.1.7600.2.0.0.768.3    Locale ID:    17417    Additional Information 1:    0a9e    Additional Information 2:    0a9e372d3b4ad19135b953a78882e789    Additional Information 3:    0a9e    Additional Information 4:    0a9e372d3b4ad19135b953a78882e789     Any help that will solve this problems is greatly appreciated.


Find how many solutions of the equation $z^6+6z+10=0$ are in each quadrant.  This polynomial has six solutions by TFTA. I just don't know how to show what they are and where they lie. Any solutions or help is greatly appreciated.

Given $P(z)=z^6+6z+10$, find how many roots are in each quadrant    I have already seen that $P(z)$ has six different roots, and that none of them are real or of the form $ki$, $k\in \Bbb R$. Since the coefficients of $P(z)$ are real, then it's roots are 3 conjugate pairs, and therefore the possibilities are limited to two.  Defining $f(z)=z^6$, $g(z)=z^6+6z+10$ and applying Rouche in $|z|<2$, $|f(z)-g(z)|<|f(z)|$ I get that all roots are contained in the disc, but how do I go about splitting them into the four quadrants? From what I know about this polynomial, finding zeros in one quadrant is enough to determine the rest, but I'm stuck trying to apply rouche to a quarter circle (basically I'm having trouble finding a suitable f and g)


I made a 3D model for Unity. I tried to export it to Unity using the fbx format and some other formats, but every time I tried to export it the material would not show up. Instead the 3D model shows up as one color, black. Thank you, fellow humans.

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


The code below is throwing nullpointerexception while reversing the linked list. Node reverseList(Node head) {    Node object = null;    while(head.next != null) {         Node n = head;         n.next = object;         object = n;         head = head.next;      }     head.next = object;     return head;          }  But the code below is working fine. Node reverseList(Node head) {    Node object = null;    while(head.next != null) {         Node n = head;         head = head.next;         n.next = object;         object = n;               }     head.next = object;     return head;          }  Can anyone help me out here.

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


I have a raster (ras) and a text file (T, DA, etc). When I join both then field names are like following:  ras.vat:T ras.vat:DA   I have to access these fields using SearchCursor for further processing.  Is there a way to avoid these long combined names and simply obtain "T" and "DA" after joining?

I'm wondering if there is any method to preserve the original field names in ArcGIS when I join csv. tables to a Shapefile.  I ask, because sometimes I  join tables with 10, 20 or even more columns and when exporting the joined data ArcGIS always renames them according to the name of the original table and the order of the column (e.g. table_xy_1,table_xy_2, etc.).  Since there is no easy way to rename the fields in the attribute table permanently (i.e. you have to create a new column and copy the old on into this new column AND delete the old column) this creates a bunch of work (despite from the fact that you have to orientate yourself in this mess of field names).


Hope everyone is well. I need to clean and oil my chain as its getting a little clunky when I’m changing gears. I have no idea what I should be cleaning it with and then what I should oil with. Any help would be great. It’s a road bike that is used every day no matter the weather.

I've just tried cleaning my chain and cogs with some really hot water and washing-up liquid. I also used a toothbrush, j-cloth and a non-scratch scourer. After over an hour of some serious elbow grease I could shift some of the outer dirt and muck, but still can't get the base layer of grease off. What can I use to completely strip the grease and muck off the chain?


these are the results I get using R on my database , can someone help me interpret the results  Call: lm(formula = brevet2016 ~ diversification2013 + specialisation2013 +      depensesenRD2013 + KH2013, data = base)  Residuals:     Min      1Q  Median      3Q     Max  -230.29  -51.53   -8.63   27.68  891.67   Coefficients:                       Estimate Std. Error t value Pr(>|t|)     (Intercept)         -1.839e+02  6.304e+01  -2.917  0.00448 **  diversification2013  7.174e+01  3.925e+01   1.828  0.07094 .   specialisation2013   3.511e+00  3.341e+00   1.051  0.29612     depensesenRD2013     3.979e-04  2.626e-05  15.153  < 2e-16 *** KH2013               4.000e+02  1.188e+02   3.367  0.00112 **  --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 119.1 on 89 degrees of freedom Multiple R-squared:  0.7782,    Adjusted R-squared:  0.7682  F-statistic: 78.05 on 4 and 89 DF,  p-value: < 2.2e-16   More specifically, what does intercept,estimate, 1Q,3Q indicate? – user6465283 42 mins ago

The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. There might (will) be mistakes, as I'll just write what I assume. Mainly I'd like to know what the t-value in the coefficients mean, and why they print the residual standard error.   Call: lm(formula = iris$Sepal.Width ~ iris$Petal.Width)  Residuals:      Min       1Q   Median       3Q      Max  -1.09907 -0.23626 -0.01064  0.23345  1.17532    This is a 5-point-summary of the residuals (their mean is always 0, right?). The numbers can be used (I'm guessing here) to quickly see if there are any big outliers. Also you can already see it here if the residuals are far from normally distributed (they should be normally distributed).  Coefficients:                  Estimate Std. Error t value Pr(>|t|)     (Intercept)       3.30843    0.06210  53.278  < 2e-16 *** iris$Petal.Width -0.20936    0.04374  -4.786 4.07e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    Estimates $\hat{\beta_i}$, computed by least squares regression. Also, the standard error is $\sigma_{\beta_i}$. I'd like to know how this is calculated.  I have no idea where the t-value and the corresponding p-value come from. I know $\hat{\beta}$ should be normal distributed, but how is the t-value calculated?  Residual standard error: 0.407 on 148 degrees of freedom   $\sqrt{ \frac{1}{n-p} \epsilon^T\epsilon }$, I guess. But why do we calculate that, and what does it tell us?  Multiple R-squared: 0.134,  Adjusted R-squared: 0.1282    $ R^2 = \frac{s_\hat{y}^2}{s_y^2} $, which is $ \frac{\sum_{i=1}^n (\hat{y_i}-\bar{y})^2}{\sum_{i=1}^n (y_i-\bar{y})^2} $. The ratio is close to 1 if the points lie on a straight line, and 0 if they are random.  What is the adjusted R-squared?  F-statistic: 22.91 on 1 and 148 DF,  p-value: 4.073e-06    F and p for the whole model, not only for single $\beta_i$s as previous. The F value is $ \frac{s^2_{\hat{y}}}{\sum\epsilon_i} $. The bigger it grows, the more unlikely it is that the $\beta$'s do not have any effect at all.


I tried building my game according to the google play rules, but I get the following error message: "This release is not compliant with the Google Play 64-bit requirement  The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code: 1.  Include 64-bit and 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives only the native code that it needs. This avoids increasing the overall size of your app."  According to the documentation () for Unity I should get a working version when I do:   Set Scripting Backend to IL2CPP Select the **Target Architecture > ARM64 checkbox Build as normal   I've built the game both as APK and as AAB, but neither are accepted. I am using Unity 2018.3.14f1.  I have downloaded this NDK:  and put the content to: C:\Users\MyName\AppData\Local\Android

I select arm64 (64 bit) and x86 and amrv7 and select build app bundle in player setting so but when I want publish so I have an error like : Error This release is not compliant with the Google Play 64-bit requirement The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code: 2. Include 64-bit and 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives only the native code it needs. This avoids increasing the overall size of your app.  I tried following the steps listed in , but the problem remains. PLease answer me, why no people answer in this web site?


While studying for an Algebra Qualifying Exam I stumbled with an exercise that says   "Describe the ring $\mathbb{Z}[x]/(2x)$".  I've done similar cases, like $\mathbb{Z}[x]/(x)\cong\mathbb{Z}$, $\mathbb{Z}[x]/(2,x)\cong\mathbb{Z}_2$ but in this case I don't have the intuition of what must be the ring.  I think maybe there is no closed form for the ring.  Can someone provide me any hints or ideas? Thanks!

Consider the quotient ring $R:=\mathbb{Z}[x]/(2x)$. Could somebody help me to identify $R$ with some well-known ring?    Thank You.


import re  content = "This is a [story] to be told" tag = r'[story]'  print(re.compile(rf'{tag}').search(content))   this returns: <re.Match object; span=(3, 4), match='s'>  I am using the 'r' prefix in the variable and the 'rf' prefix in the regex. Where am I going wrong? It keeps interpreting my variable as a coded string.  In my actual scenario I have a list of tags: [r'[TAG1]', r'[TAG2]', r'[TAG3]'] which I want to iterate over. I have solved the problem by escaping with '\' in every tag's string assignment but this makes the tags unusable when referencing them later, as 1 of the '\'s is not in the beginning or end of string (since strings are immutable).   I could try using slices but that seems incredibly inefficient. Is there a regex solution?

I want to use input from a user as a regex pattern for a search over some text.  It works, but how I can handle cases where user puts characters that have meaning in regex? For example, the user wants to search for Word (s): regex engine will take the (s) as a group.  I want it to treat it like a string "(s)" .  I can run replace on user input and replace the ( with \( and the ) with \) but the problem is I will need to do replace for every possible regex symbol. Do you know some better way ?


I'm working on 16.04 and trying to setup the Arduino IDE for use with a Genuino 101. I have the IDE installed, v 1.8.2, in my home folder. It compiles sketches and picks up the board serial number as well as other details correctly. According to the Arduino site, one needs to execute  sudo ~/.arduino15/packages/Intel/tools/arduino101load/1.6.4+1.18/scripts/create_dfu_udev_rule   inside a shell to gain upload permissions.  When I execute this through the terminal I get the error message   sudo: /home/16737547/.arduino15/packages/Intel/tools/arduino101load/1.6.4+1.18/scripts/create_dfu_udev_rule: command not found   Is this command looking for v 1.6.4 of the IDE? I have tried to modify the command to   sudo ~/.arduino15/packages/Intel/tools/arduino101load/1.8.2+1.18/scripts/create_dfu_udev_rule   but it did not resolve the error message.

I am a new user, who has just been told to run / execute a command. The answer has some text with a grey background like this text here or  sometimes this text here.   However, I don't know what "run" or "command" means in relation to Ubuntu.  How do I do this?    This is intended for use as a Q&A you can link to when you tell someone to run a command.


Is there are ANY way to access IFRAME content across different domains ?  I am a trying to load external pages into an iframe and scrape their info. But get security errors in Chrome.

I would like to manipulate the HTML inside an iframe using jQuery.  I thought I'd be able to do this by setting the context of the jQuery function to be the document of the iframe, something like:  $(function(){ //document ready     $('some selector', frames['nameOfMyIframe'].document).doStuff() });   However this doesn't seem to work. A bit of inspection shows me that the variables in frames['nameOfMyIframe'] are undefined unless I wait a while for the iframe to load. However, when the iframe loads the variables are not accessible (I get permission denied-type errors).  Does anyone know of a work-around to this?


Seems intuitive. Like the fact that $\sqrt 3 \not \in \mathbf{Q}(\sqrt 2)$. But how to approach actually proving it? The proof of this fact doesn't seem to generalize well.

I need to find a way of proving that the square roots of a finite set    of different primes are linearly independent over the field of    rationals.    I've tried to solve the problem using elementary algebra  and also using the theory of field extensions, without success. To  prove linear independence of two primes is easy but then my problems  arise. I would be very thankful for an answer to this question.


I use Ubuntu 16.04 LTS, and I'm wondering where I can find the hashes for the user account passwords.


For example in $S_3$, there are 4, namely: e , (01)(2), (02)(1), and (12)(0).  In $S_4$ , i think there are 1 + 6 + 6 = 13.   The identity e: gives 1, Permutation in the form of (ab)(c)(d) : 6, In the form of (ab)(cd) : 6  But i had a feeling it must be 14 or something even... (Because 4! - 13 = 11 which is cannot be partitioned in pairs) What am i  missing ?  Also, Is there a way to dertermine how many such element in $S_n$ ?  Tnk u in advance

How would I find the number of permutations of $[n]$ in which all cycles have length $1$ or $2$?  I know how to do this if I have, say, $8$ numbers from ${{1,2,3,...,8}}$ and I want them to be broken into Count$(4, 3, 1)$. But not when I don't know how many cycles of $2$ and $1$ I want.  Note: I'm looking for a way to derive a formula or something. I need to use it to prove by induction, I'm assuming, $r(n + 1) = r(n) + n · r(n − 1)$.


When reviewing a question in the Reopen Votes queue, there are two main options: Leave Closed and Nominate for Reopening.  If I click Nominate for Reopening, a message box appears asking me if I am sure I want to vote to reopen:    If I click cancel, a second message box appears with the same question.   If I click cancel on the second message box is dismissed the message box, but nothing else happens.  If I click okay, a second message box appears with the same question.   If I click okay on the second message box is dismissed the message box, and a vote to reopen is cast. If I click cancel on the second message box is dismissed the message box, and a vote to reopen is cast.    I haven't yet exhausted all possible ways of interacting with these message boxes, but there is definitely at least one bug here.    A similar, and possibly related issue exists with the Leave Closed option. If I click Leave Closed, a message box appears asking me if I am sure I want to vote to reopen:    If I click cancel, the message box is dismissed, and my vote to leave closed is cast.  If I instead click okay the message box is dismissed, and my vote to leave closed is cast, but I occasionally see the error, "An error occurred when reviewing this item. Please try again."    Using Google Chrome Version 27.0.1453.116 m

This is rather difficult to describe with fancy pictures with red circles but it's easily reproducible.  Whenever I click Leave Closed in the re-open queue on MSO the "nominate this question for re-opening" pop-up appears. I normally press escape out of shock and a leave closed vote is recorded.  This is the latest review it's happened to me on:   You can also test it on , I clicked reopen this time and a leave closed vote was recorded but I also got a red popup stating that an error had occurred.  This is also occurring when the Edit & Reopen button is clicked, the edit box opens for a second before being overridden by the popup.


Inside a prep book the following sentence is WRONG on the grounds that "that" modifies the closest noun "home".     John F. Kennedy, one of the most social U.S. presidents, held many parties in his family home that featured elaborate meals of local fish and lobster, famous guest and late nights.    However, in the same book, the following sentence is CORRECT with the reasoning that "that" is not restrictive and clearly modifies parties.     John held parties for his kids that featured clowns, numerous exotic animals, and lots of food.   What am I missing here?

I'm not sure about the sentence structure below:  All kinds of problems arise that smaller animals or plants do not have to cope with.  It looks like that works as a relative pronoun for all kinds of problems, but I couldn't find such usage in my dictionary or online. This sentence could be divided into  There are all kinds of problems. Smaller animals or plants do not have to cope with all kinds of problems.  But, I can't figure out where 'arise' fits. If you have any thoughts, please share them.


There are two sentences like this.   The hunter shot at the bird. The hunter shot the bird.   Maybe I think that 'shot at' in number 1 sentence means that the hunter shot the bird but missed it. whereas hunter in number 2 sentence succeeded. What's the difference between 'shot' and 'shot at'in meaning? Please, tell me the difference.

I have a question about the difference between the verb "shoot" and "shoot at":          Police shot the suspect.     Police shot at the suspect.        Are they just the same?


I am a fresher to ubuntu.please help me to install adobe reader in 18.04.

I know the thread  However, there is no Linux anymore in the installation site .  Unsuccessful attempts   I do DriraWassim's proposal which does not add anything to apt-get and does not show the installed .deb package in the path/search  sudo apt-get install libxml2:i386  sudo apt-get update sudo apt-get upgrade  apt-cache search adobereader-enu   I download the newest .deb package  and run it.  I cannot find the application anywhere in the system. It is not in the path and not in Ubuntu's search. How can you start it?   System: Ubuntu 16.04, 64 bit Hardware: Macbook Air 2013-mid Linux kernel: 4.6


I have several sidebars (more then 1 on a page) and I would like to set different image sizes to widgets, depending in which sidebar they are located.  I tried  if( ! dynamic_sidebar('my-sidebar') ) :   and  if ( is_active_sidebar( 'left-sidebar' ) ) :   but this only seems to check if the sidebar's exist (and they do).  How do I get: "if widget is located in sidebar A, give me this size, elseif widget is located in sidebar B, give me that size"?

I have several custom widgets that are installed as part of my theme. I'd like to execute conditional code inside each widget's admin panel (not the public side, I'm just interested in the admin panel inside function form($intance)), depending on which sidebar the widget is inserted into.  How can I obtain a reference to the current sidebar id which holds the widget, from within the widget's function form($instance) handler?


I've read many websites, blogs, pdfs on this top but struggle to put the picture together in simple math terms, that explains how some of the terms relate to each other / are computed.  Let's assume that we use Singular Value Decomposition (SVD) to solve the PCA problem with input matrix $X$, assuming $X$ has zero mean and unit variance, the SVD of $X$:  $X = USV^{T}$  Now, $S$ is the vector of eigenvalues, sorted in decreasing order.   Can someone please explain, in math terms, how are the following terms defined?   e.g. Explained variance ratios = $\frac{S}{sum(S)}$ PCA Loadings == eigenvector of $X^{T}X$ == $V$? Score matrix $T$, $T == U * Diag(S) == XV$? Actual PCA components = eigenvectors of $X$?  Eigenvectors, can you get them from the SVD results?

Principal component analysis (PCA) is usually explained via an eigen-decomposition of the covariance matrix. However, it can also be performed via singular value decomposition (SVD) of the data matrix $\mathbf X$. How does it work? What is the connection between these two approaches? What is the relationship between SVD and PCA?  Or in other words, how to use SVD of the data matrix to perform dimensionality reduction?


From English grammar point of view, which of below sentence is correct? And why?  He did this better than I did.  He did this better than me.

He is taller than me/I?  Also, what is the difference between the two:  1 - I love you better than him. 2 - I love you better than he.


How to evaluate $\int_{0}^{\infty}\dfrac{1}{x^a+1}dx$, where $a>1$. I don't know where to start since $x^a+1$ could have infinitely many roots, then it is impossible(?) to evaluate its residues. And even we did find a way to do so, how are we gonna choose the contour at the first place? Any hint would be appreciated.

I am trying to evaluate the following:  $\displaystyle \int_{0}^{\infty} \frac{1}{1+x^a}dx$, where $a>1$ and $a \in \mathbb{R}$  Any help will be much appreciated.


I am trying to input multiple files from different directories in my main latex document and I want to use while loop to do that so that all .tex files can be read from a directory. Please give your suggestions.

Assume I have many TeX files. For the sake of simplicity, also asssume they are in a single folder or directory.  I want to input all files from within my main LaTeX document. Actually I can create a list of those files using C# in advance.  To enrich my view about LaTeX or TeX, could you tell me whether or not this job can be done only by using pure TeX or LaTeX?


I've upgraded two laptops to Ubuntu 20.04 LTS.  On one of them pressing Super (aka the Windows Logo key) opens the Activities overview.  On the other one it doesn't, and I have to use Super+S, or Alt+F1.   The main difference between the laptops is that one uses Ubuntu on Wayland (where Super works fine), and the other one uses Ubuntu on Xorg (where Super doesn't work).  How do I make Super work on both laptops?

I just updated to Ubuntu 20.04 LTS and my super key has lost its main functionality. Previously in Ubuntu 18.04LTS, I was able to click the super key and the applications drawer would show. Now it doesn't do that. I can still open it by clicking super+a but it's annoying that it doesn't do that.  I restarted my machine and still nothing.


I am having issues in both Firefox and Chrome browser on Windows 10. When you browse to www.google.com it just render something like this (I took that img from Google Image not an actual screenshot)   But that's not the point, the point is, where can I ask this? is not code related, just installed software malfunctioning due some bad configuration, virus, etc

I can't seem to find info on installing a Swedish language package on my machine. The language is not listed  and the hits on Google I got led nowhere (or, rather, to the said page).  Where can I ask such a question (within the realm of Stack Exchange)?


The game is supposed to allow the user to click and place circles within the panel. If they overlap or are out of bounds, it's not supposed to draw a circle. The code I have so far allows the user to place circles, but when I attempt to overlap them it freezes. Can anyone please tell me what I'm doing wrong and point me in the right direction?  Here is the section of code so far that handles this:  protected void handleMouseClick(MouseEvent e) {     clickX = e.getX();     clickY = e.getY();      disk = new Disk(clickX, clickY, radii[diskCount], DiskColor.values()[diskCount % 15]);     disks[diskCount] = disk;     for(int i = 0; i < disks.length; i++) {         if(disks[i].overlaps(disk) == true) {             diskCount++;             repaint();         }         diskCount+=0;         repaint();     } }

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


If at the end of an NHL seasons if 2 teams tie in points, who gets the higher seed? What break ties? And if that thing is tied too, what further breaks the tie? And what would a perfect tie be?

What is tie-breaking procedure in NHL (regular season)?  How are standings for the teams in the NHL table decided. What is used as a secondary criterion, if the teams have the same number of points?    For example, with one match remaining for Detroit and Washington the positions of wild card teams in Eastern Conference are     |            | GP | pts | diff  1 | Columbus   | 82 | 93  | +15  2 | Detroit    | 81 | 91  | -11  3 | Washington | 81 | 89  | -4   (GP = number of games played, pts = number of points, diff = )  I have seen in many sources that at this point the teams qualified for the Stanley Cup playoffs are already decided and that Washington Capitals cannot qualify. But it is still possible that both Washington Capitals and Detroit Red Wings both finish at 91 points. (Capitals would have to win their last game, and Detroit would have to loose in regulation time.) Moreover, Washington would have better goal difference. So I wonder why they cannot qualify.


In an onCreate() method I have the following code:  protected void onCreate(Bundle savedInstanceState){     super.onCreate(savedInstanceState);     setContentView(R.layout.mapview);      setupGui();     mHandler = new Handler();      mv = new MapView();     (new Thread(){         public void run() {             while (true) {                 try {                     Thread.sleep(1000);                     mHandler.post(new Runnable() {                          @Override                         public void run() {                            mv.createPlane(true);                         }                     });                 } catch (Exception e) {                 }             }         }     }).start(); }   Where mv is the name of the class I am in, which contains a createPlane(boolean) method for placing some new elements onto the UI. This method:  public void createPlane(boolean left) {     linL = (LinearLayout) findViewById(R.id.ll); }   And this does not work. (NullPointerException at findViewById())


I recently restored a Time Machine backup. After that the display name in Terminal.app is changed. MyName@M2004J19C-Redmi9 ~ %. Why M2004J19C-Redmi9?? Terminal works properly but why MacBookPro-etc. is disappeared? How can I change that? If I go to Shell>Change Title Under "Path" I have: file://M2004J19C-Redmi9/Users/MyName

My computer name in System Preferences > Sharing is set to "archos", but is showing as "iphone" on Terminal. It just started doing this after I loaded Xcode for doing iPhone development: Last login: Mon Nov  7 14:46:55 on ttys001 iphone:~ travis$   Any ideas what could be causing this?


I have a settings page under a custom post type menu.  The url for the page is like this - /wp-admin/edit.php?post_type=movies&page=movies_settings  How do I load the stylesheet just on that page?  Thanks in advance.

I have two simple functions that load stuff using  and , something like these:  function admin_custom_css() { wp_enqueue_style( 'stylesheet_name', 'stylesheet.css') };   function admin_custom_js  { wp_enqueue_script( 'javascript_file', 'script.js') };   ... and a few admin pages, created with  and   function my_menu() {    add_menu_page('Page 1', 'bar', 'something', 'else', 'foo');    add_submenu_page( 'theme_menu', 'Subpage 1', 'Subpage', 'something', 'else', 'foo');  } add_action('admin_menu', 'my_menu');    How do I load my two functions only on these pages?  Right now I'm using:  add_action('admin_init', 'admin_custom_css' );  add_action('admin_init', 'admin_custom_js' );     But it loads my files on every admin page, which is not nice at all.  Can I do this via one simple line in functions.php or have to enqueue them within my pages separately (I prefer the first option strongly, since I'd have to edit a lot of admin-page-creating-functions).  Thanks!


I have installed Ubuntu 16.04 now in my computer  but the problem is the Ubuntu software can't download any apps.  So the solution is to install the any program with terminal but I don't now how ?

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


I have a question about mood  Note that the following sentences are same :  If I did not have money, I could not buy it  =I could not buy it without money   =If it were not for money, I could not buy it  =Since I have money, I can buy it.  I want to know forming of the expression : If it were not for (A)  I guess that this is shortened from some long clauses. Consider the following :   I have only one cat and it is from Korea =I have a cat, which is from Korea.  Usually we use second sentence. But it can be viewed as shortened form of first sentence. That is, about (A) I want to know the forming. Translation is nonsense. Especially we cannot translate "it" If we write the sentence into complete sentence in detail, what is it ?  Thank you in anticipation.

Today I have encountered a phrase:     If not for you, I would be poor.   I would think it is like "if there were not you", is it like that?  On the other hand, how would I say the following as the meaning would be different:     If not for you, whom do I cook the cake for?


This question has nothing to do with Improving my Overall Position on Search or my SEO . I Very simply want to understand why ONE keyword in particular is Worse off on search under the Following Circumstance, Im not in search off a 100 ways to improve your search Posistion. I want to know why: The Keyword E.G White Sock Is doing Worse Then White Sock (Region)E.G North America  So Keywords are 1.White sock 2.White sock Region Why does 2 do better then 1?

There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most.  Since there are , the question really is:  What steps are necessary to figure out what caused such a drop?  There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such.


Is there any way to downgrade iOS 12.4.8 to iOS 11.3.1 on iPhone 6 (Without SHSH blobs). The firmware is not signed by the apple anymore. I'm stuck at iOS 12.4.8 on iPhone 6 and cannot use Wi-fi Calling, was able to use the feature back in 11.3.1.So need to go back. Please help.

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


I've made an error changing my default user permissions using usermod -G groupName userName (without -a). My bad.  So I went though a nasty process to recover sudo and adm permissions but I'm unsure which other permissions my default user should have. If you could confirm and explain their privilege it'll be very appreciated.  Thank you

Installed  by using install script and something crashed. Now I'm only member of my own group and lp.  Which are the default groups for users in for example Ubuntu 12.10? ?  Out of curiosity, is there some place where this information is logged? For example, some log file showing which groups my user was on previous boot? Is this information, (which groups are default), documented somewhere?


I just installed KB4480970 on my Windows 7 computer LAB-PC. Now none of the other machines on my network can access the folders and printer I have shared from this computer.  Everything was working fine before the update. Turning off the Windows firewall didn't help. I can ping LAB-PC from other computers.  If I try to access my share "Test" on LAB-PC from another computer by typing \\LAB-PC\test into Explorer's address bar, I get the error:     Windows cannot access \\LAB-PC\test   I tried mapping a drive to LAB-PC by running net use Z: \\LAB-PC\test and got the error:     System error 6 has occurred.      The handle is invalid.     I'm running Windows 7 Pro 64-bit. My computer is not in a domain. How can I fix this?

KB4480970 got installed on my system last night and now I'm no longer able to access files via SMB shares. Apparently this is a .  I restored my system to a previous restore point and the issue appears to be resolved, but in general what should I do in these situations? Will my system try to reinstall KB4480970 tonight? Do I just need to disable automatic updates? If so then should I disable them until perpetuity? If not then how do I know when I can turn them back on?


If a book is kept on a table , will the book also apply a normal force on the table ? Then which of the two normal forces( one by book and other by table) would be considered as action force and reaction force ?  Thank you in advance.

I know that normal force is not a reaction force to the gravitational force: first because the gravitational force is from Earth on the object    (action force), thus the reaction force is simply from the object on Earth according to Newton's third law; also because in certain situations like when the object is on an inclined plane, the normal force doesn't even equal the force of gravity on the object but only the perpendicular component of gravitational force. My question is: In some textbooks (as shown below, Physics for the IB Diploma (Cambridge University Press) by K.A. Tsokos), normal force is named "normal reaction force"; why is that and where's the action force if the normal force is a reaction force? I'm pretty sure I will receive many wonderful answers, but could you also refer me to a specific reference by page number to read more?  Normal reaction contact forces If a body touches another body, there is a force of reaction or contact force between the two bodies. This force is perpendicular to the surface of the body exerting the force. Like tension, the origin of this force is also electromagnetic. In Figure 2.29 we show the reaction force on several bodies.  Figure 2.29 Examples of reaction forces, $R$.


Define  $f(x) = \left\{  \begin{array}{ll}   1  & \mbox{if } x \in \mathbb{Q} \\   0 & \mbox{if } \notin \mathbb{Q}  \end{array} \right.$  How to evaluate $\int_0^1 f(x)\,dx$ ?   I have no idea how to solve it, but all I think is that: since between any two rational numbers there exist an irrational number and vice versa, so the number of rational and irrational numbers are same in the interval of $[0,1]$ (or $[0,1)$ to be precise), and since the integral is equivalent to area under the function, so $\int_0^1 f(x)\,dx$ must be equal to $\frac{1}{2}$. Is that correct?  Thank you.

"Dirichlet function" is meant to be the characteristic function of rational numbers on $[a,b]\subset\mathbb{R}$.   On one hand, a function on $[a,b]$ is Riemann integrable if and only if it is bounded and continuous almost everywhere, which the Dirichlet function satisfies.  On the other hand, the upper integral of Dirichlet function is $b-a$, while the lower integral is $0$. They don't match, so that the function is not Riemann integrable.  I feel confused about which explanation I should choose...


Good evening I booked a trip and realized my US passport is expired. I have a passport from another country (UK) and wanted to know could i use that to get back into the US now that the US is letting people with expired passports in till the end of the year .

I am a US Citizen, and I need to travel to Spain in a few days but my passport is recently expired. I have dual citizenship to Ireland and hold a valid Irish passport that states my birthplace is the US on it. Would I be able to travel on this Irish passport while also brining my expired one with me as proof. I read that as of last month you can travel back into the United States on a expired passport until December. Will this work for me?


I want to use Danish chars on my database (MySqli)  Normally this is not an issue, and i have been running my code with no problem at all. When i recently changed to Unoeuro there was nothing that worked - Same code, same DB, nothing has changed but the hosting service.   Here is how i connect to the database      <? $conn=mysqli_connect("MyHost","MyUser","MyPass","MyDB"); // Check connection if (mysqli_connect_errno())   {   echo "Failed to connect to MySQL: " . mysqli_connect_error();   }   mysqli_set_charset($conn,"utf8");  ?>   The connection to the databse works perfect, but when i send a Danish charto the DB, it changes to another unknown char.   Here is an example of my page that sends data to the mysqli:      <html> <head>   <meta charset="UTF-8"> </head> <body> <? include "config.php"; //The Database connection  /* Here are a lot of variables, not important in this question */  mysqli_query($con,"INSERT INTO WaterWithdrawalLog (XUserID, Location, antalLiter,chipId,note) VALUES('$xuid','$location','$MinusAntalLiter','$usrid','".$_GET["note"]."')"); ?>   The Database is set to UTF8_danish_ci  How to i get the Danish chars to show propperly in my database ??

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Does an accelerometer sensor measure the distance accurately when it is used inside a car? and what is the misjudge percentage when it is compared with its odometer?

I'm trying to track body parts relative to a person's torso. I see quite a few questions about using MEMS accelerometers and gyros for dead reckoning, and they confirm my suspicions that various factors greatly limit their usefulness for these sorts of applications, but I'm seeking clarification of these limits:   What exactly are these limits?  Other answers have addressed why these limits exist. Naturally the specifications the parts in the system in question and what is considered "acceptable error" for the system will both change the exact limits, but is there a single order of magnitude in time, or distance that I can expect dead reckoning to work? I'm well aware that over long distances (a few yards or so) the error becomes too large for most practical purposes, but what about within a few feet?  What can I do to improve these limits?  I'm currently looking at using an accelerometer and a gyro. What other sensors can I add to the system to improve the error rate? I know over longer distances a GPS can be used, but I doubt any consumer electronics grade GPS has fine enough resolution to help in my case.  Additionally, a general consensus seems to the only way to improve these limits past the point of improved sensors is to provide a reference not subject to error. Some systems solve this using cameras and markers.  What kind of reference points can a portable/wearable device provide?   I've seen the usage of radio waves to measure long distances accurately, but I can't tell if such a system could be accurate on such small scale (in terms of distance measured) using "off-the-shelf" components.


"I would if I wasn't American."      "I would if I weren't American."   Which one is correct?

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


I changed my class from the Activity to AppCompatActivity.  And changed item.getActionView()  to  MenuItemCompat.getActionView(item)  Now I get NPE in the following code.  public boolean onCreateOptionsMenu(Menu menu) {     getMenuInflater().inflate(R.menu.messages, menu);      MenuItem item = menu.findItem(R.id.menuTxtSize);     Spinner spinner = (Spinner) MenuItemCompat.getActionView(item);     SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);     int index = sp.getInt(getString(R.string.pr_text_size),             Integer.parseInt(getString(R.string.pr_default_text_size)));     spinner.setSelection(index);   E/ACRA: ACRA caught a NullPointerException for com.alex.documentation java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Spinner.setSelection(int)' on a null object reference at com.alex.message.activities.MessagesActivity   How to fix the error?

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


I am trying to install robo3t in ubuntu 14.04 new in linux   Those commands work   wget https://download.robomongo.org/0.9.0/linux/robomongo-0.9.0-linux-x86_64-0786489.tar.gz tar -xvzf robomongo-0.9.0-linux-x86_64-0786489.tar.gz sudo mkdir /usr/local/bin/robomongo   But when I write this command   sudo mv  robomongo-0.9.0-linux-x86_64-0786489/* /usr/local/bin/robomongo   I get    error :- /usr/local/bin/robomongo/lib’: Directory not empty

I am using MongoDB and I want to install Robomongo on Ubuntu.   Are there any instructions on how I can I install Robomongo on my machine?


From: Philip Johnson-Laird , Stuart Professor of Psychology Emeritus at Princeton.    (Author isn't  a logician.)    . p. 45.       For premises that have several models, a single model consistent with   them—an example—establishes a conclusion about what is possible; but   all the models must be examples to establish a conclusion about what is   necessary. The opposite is the case for refutations: a single counterexample   refutes a conclusion about what is necessary, whereas all models must be   counterexamples to refute a conclusion about what is possible. And so we   should draw a conclusion about what’s possible faster than a conclusion about   what’s necessary, but we should draw a conclusion about what’s not necessary   faster than a conclusion about what’s not possible. This prediction is crucial for   a theory that takes possibilities as fundamental, and several experiments have   p. 45     corroborated it. One caveat, learned the hard way, is that it’s no use asking   adults whether something is possible if it's [Author's bungle. This ought be "its".] necessity is obvious. They baulk   at saying, “yes”, in these circumstances; and so inferences have to be hard   enough that when an event is possible its necessity isn’t obvious too. Here is   a typical trial from an experiment. The premises are about a game of one-on-one basketball in which two players take part:           [1.] If Allan is in [the game] then Betsy is in.     [2.] If Carla is in then David is out.            The participants were more accurate and faster to infer that Betsy could be in   the game than to infer that she must be in the game. If you list the possible   games compatible with the premises, you’ll discover that there are three games   and that Betsy is in all of them: Allan versus Betsy, Betsy versus Carla, Betsy   versus David.     A way to create a problem to which the answer is, “no”, to both a question   about what’s possible and a question about what’s necessary is to change   “in” to “out” in the premises, and vice versa. The premises above are thereby   transformed into:           [3.] If Allan is out then Betsy is out.     [4.] If Carla is out then David is in.         The participants were now more accurate and faster to infer that Betsy need not   be in the game than to infer that Betsy cannot be in the game. The only possible   games are: Allan versus Carla, Allan versus David, and Carla versus David.    How can you efficiently deduce the emboldened sentence, without applying 3 and 4 to each person separately successively (1st: Alan v. B, C, D. 2nd: B v. C, D. 3rd: C v. D)?    I applied 3 and 4 successively, but didn't deduce the author's conclusions.   3 says nothing about what happens if A is in. Thus why's  A v. B impossible? The contrapositive of 3 is: A is in $\Longleftarrow$ B is in. Again,  why's  A v. B impossible? How does 4 $\implies$ C v. D? Perhaps this is a typo? This book has many typos.

From: Philip Johnson-Laird , Stuart Professor of Psychology Emeritus at Princeton.    (Author isn't  a logician.)    . p. 44.       For premises that have several models, a single model consistent with   them—an example—establishes a conclusion about what is possible; but   all the models must be examples to establish a conclusion about what is   necessary. The opposite is the case for refutations: a single counterexample   refutes a conclusion about what is necessary, whereas all models must be   counterexamples to refute a conclusion about what is possible. And so we   should draw a conclusion about what’s possible faster than a conclusion about   what’s necessary, but we should draw a conclusion about what’s not necessary   faster than a conclusion about what’s not possible. This prediction is crucial for   a theory that takes possibilities as fundamental, and several experiments have   p. 45     corroborated it. One caveat, learned the hard way, is that it’s no use asking   adults whether something is possible if it's [Author's bungle. This ought be "its".] necessity is obvious. They baulk   at saying, “yes”, in these circumstances; and so inferences have to be hard   enough that when an event is possible its necessity isn’t obvious too. Here is   a typical trial from an experiment. The premises are about a game of one-on-one basketball in which two players take part:           [1.] If Allan is in [the game] then Betsy is in.     [2.] If Carla is in then David is out.            The participants were more accurate and faster to infer that Betsy could be in   the game than to infer that she must be in the game. If you list the possible   games compatible with the premises, you’ll discover that there are three games   and that Betsy is in all of them: Allan versus Betsy, Betsy versus Carla, Betsy   versus David.      I refer to the players by only their initials.    Why are A vs. C and A vs. D impossible?  How can you efficiently deduce the emboldened sentence, without applying 1 and 2 to each person separately in order (1st: Alan v. B, C, D. 2nd: B v. C, D. 3rd: C v. D)?


Found this question in The Probabilistic Method and tried for hours to prove it, but I'm not getting anywhere. Can anyone walk me through it? I see that if we can show $P[1 \le X - Y \le 2] \le P[|X -Y| \le 1]$ the claim will follow. This is intuitively appealing but I don't see how to proceed.

I found this question while browsing through "The Probabilistic Method", by Noga Elon.  Let X and Y be 2 independent and identically distributed real valued random variables. Prove that: $$P(|X-Y| \leq 2) \leq 3P(|X-Y| \leq 1)$$  So I tried the following:  $$P\{|X-Y| \leq 2\} = P\{|X-Y| \leq 1\} + P\{X-Y \in (1,2]\cup[-2,-1)\}$$ $$= P\{|X-Y| \leq 1\} + P\{X-Y \in (1,2]\} + P\{X-Y \in [-2,-1)\}$$ $$= P\{|X-Y| \leq 1\} + 2P\{X-Y \in (1,2]\}$$ where the last step follows because $X-Y$ has a symmetric distribution. NB: A random variable Z has symmetric distribution if  $$P(Z \leq z) = P(Z \geq -z) \quad \forall z \in \mathbb{R}$$  Thus the problem boils down to showing $$P\{X-Y \in (1,2]\} \leq P(|X-Y| \leq 1)$$ and I would be done. Unfortunately, I don't know how to proceed from here. I appreciate any help, hints, useful comments etc. I receive.


I need to export products generated by  module. What can I do to accomplish this?

I have a Drupal 7 site and installed the  module. In which I have added Commerce Product with Category like:   Software Products Hardware Products Electronics Others      I would like to Export those Commerce Products from My Development   Server to Production Server.   So, for that we have any modules available in Drupal.org so, I can export the Commerce Products and Import to my server.  I found the  module, but it only applies to exporting the nodes. It does not apply to Commerce Products.  Anyone has an idea how I can Import/Export the Commerce Module Products? I think it is general problem who are using the  of Product (but not sure).


I understand, from reading other Meta questions on this topic, that the StackOverflow administrators have good reasons for keeping the site to a fixed-width layout. However, one disadvantage of this layout that regularly frustrates me is the poor readability it imposes on code snippets. Horizontal scroll bars are a terrible thing, especially when trying to read code, when I often need to see both ends of the text at once (as opposed to letting my view flow from the end of one line to the beginning of the next). And unless the author of a StackOverflow post has been very careful to cut their code down to 80 characters per line, code blocks nearly always have horizontal scroll bars because the fixed width of the post column is so narrow.  The horizontal scroll bars are even more frustrating when I consider that I have a nice big 1920x1080 monitor that can easily display 256-character lines in my IDE, and yet I'm forced to view the code in a tiny window with scroll bars, surrounded by empty space.  Sure, I know that 80 characters is a standard width for formatting code, and StackOverflow is trying to discourage posting huge chunks of code, but some code snippets simply can't conform to that width even when reasonably-sized. In particular, code in Java, C#, and Objective-C tends to force the scroll bars to appear simply because standard type names, identifiers, and function signatures are very verbose.   Since most people these days have a wider monitor than the 1024-pixel width the StackOverflow layout was designed for, can the site somehow enable code snippets to use more of this width when the user desires it? Possibilities include:   Code blocks can "pop out" into a separate, resizeable browser window Code blocks can temporarily (either with a toggle button or on-hover) expand dynamically to fill the width of the screen, pushing sidebar content out of the way if necessary The user can reduce the font size of text in code blocks relative to other text on the site (this would allow more characters to fit in the same fixed-width column, and the user could then zoom-in the page to maintain the same effective text size). The site has both the standard fixed width layout and a "wide" fixed width layout, where the "wide" layout is designed for at least 1440-pixel screen widths (yes, this is a much more heavy-weight solution).   EDIT:  I do not think this is a duplicate of  because that question is a request for one particular solution to this problem. I'm making a more general request for any solution to the problem, even if it isn't specifically "viewing code snippets in a new window."

When a code snippet is long enough to prompt scrolling (especially horizontal scrolling), it would be helpful to offer a link to view the code snippet in a new window.  I'm thinking that the link should be positioned below the snippet, since most people will decide to use it after scanning the part of the snippet that is visible without scrolling.


Hi everyone I hope somone can help I have some set $S$ with $3$ elements $P(S)$ is the power set.I need to prove that $(P(S),\Delta)$ is not isomorphic to  $(\mathbb{Z_8},+)$. I tried building a function to show that associativity doesn't work with no success . any idea ? Thank you very much

This question is inspired by .  Please read my answer there to get better context. Settings. Let $S$ be a (not necessarily finite) set, and $P$ the power set of $S$ (i.e., $P$ is the set of all subsets of $S$).  A binary operator $*:P\times P\to P$ is said to be elementary if it can be given in terms of the standard set operations: the union operator $\cup$, the intersection operator $\cap$, the set difference operator $\setminus$, the symmetric difference operator $\triangle$, and the complement operator $(\_)^\complement$. Some Examples.  This operator $\star$ is considered an elementary binary operator: $$A \star B:= \big((M\setminus A)\cup (B\cap N)\big)^{\complement}\triangle \Big(A\cup B^\complement\Big)\text{ for all }A,B\subseteq S\,,$$ where $M$ and $N$ are fixed subsets of $S$.  On the other hand, if $|S|=2$, then this operator $\bullet$ is not an elementary binary operator: $$A\bullet B:=\left\{ \begin{array}{ll} S&\text{if }A\subseteq B\,,\\ \emptyset&\text{otherwise}\,, \end{array}\right.$$ where $A,B\subseteq S$ (a proof can be done by imitating ).  Question.  For which groups $G$ of order $2^{|S|}$ does there exist an elementary binary operator $*:P\times P\to P$ such that $(P,*)$ is a group isomorphic to $G$?  If the case where $S$ is an infinite set is too troublesome, then an answer in the case where $S$ is a finite set is very welcome.  Let $n:=|S|$.  Write $Z_k$ for the cyclic group of order $k$. Trivial Answer.  When $G\cong Z_2^n$, then the binary operator $\triangle$ does the work.  My conjecture is that there are no other groups. Known Result.  When $|S|=2$ and $G\cong Z_4$, then there does not exist such an elementary binary operator.


I don't know what's happening but, during the day media keys accidentally start/stop working for manage iTunes.  For me helps only rebootthe whole system. I've googled for solution but any of it not work for me.  (there are no any of extensions like Spotify, Deezer etc on mine). Any ideas? Thanks in advance.

I am being driven crazy by the fact that my media keys aren't working for iTunes. Such a pain! How can I fix this? I've tried the whole Chrome Extensions thing, that being I deleted all my extensions. Still, nothing has fixed this. Thanks to all who reply!


I am getting the following error at the time of booting my laptop, I am unable to understand what is the problem in the system.

dev/sda1: clean, 552599/6111232 files, 7119295/24414464 blocks   After I turn on my laptop this message appears. The system never boots, the message just stays there.


From the extension of my previous   For $a,b,c\in \mathbb{Q}$  \begin{align}  a + b \sqrt[3]{2}  + c\sqrt[3]{4} =0 \quad \Leftrightarrow \quad a=b=c=0  \end{align} again also one direction is easy, but how about other direction?

Given that $\displaystyle{a+b\sqrt[3]{2} +c\sqrt[3]{4} =0}$, where $a,b,c$ are integers. Show $a=b=c=0$  Do I use modular arithmetic?


I have a directory which contains thousands of .txt files and sub folders with even more files. I need to run a C++ parsing program that goes into the main folder and run on every text file that is in the folder and its subfolders  So how should i proceed?  EDIT: So the question that has been linked gets the directory traversal part right but the main issue is that how can i "pass each text file" to my program in the directory

How do you iterate through every file/directory recursively in standard C++?


Find all polynomials $P(x)=a_nx^n+a_{n-1}x^{n-1}+...+a_1x+a_0$ such as:  1) $(a_0,a_1,a_2,...,a_n)$ is a permutation of $(0,1,2,...,n)$  2) $P(x)$ has $n$ rational roots.

Find all polynomials $F(x)={a_n}{x^n}+\cdots+{a_1}x+a_0$ satisfying   $a_n \neq0$; $(a_0, a_1, a_2, \ldots ,a_n)$ is a permutation of $(0, 1, 2 ... n)$; all zeros of $F(x)$ are rational.


It is said that the constant interaction between the molecules of a gas (in the form of collisions) acts as a randomising influence and prevents the gas molecules from settling. But given the force of gravity, won't the gas molecules settle at some point of time?

If the earth's gravity exerts a net downward gravitational force on all air molecules, how come the molecules don't eventually lose their momentum and all settle down? How is the atmosphere is still miles thick after billions of years?


I've read a lot of posts explaining the ending to Death Note, but they gloss over how Mello realizes the notebook Mikami used was fake. I don't think the anime mentioned it specifically either?

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


I am new to Ubuntu and everything, so I dont know much of anything about the terminal.  I am trying to install and start Tor. I downloaded the 64bit version from . Then I downloaded Vidalia from Ubuntu's software center.  I entered these lines of code:  cd ~/Downloads tar -xvf tor-browser-linux64-4.0.1_en-US.tar.xz cd tor-browser-linux64-4.0.1_en-US   I was told to then enter:  chmod +x start_tor_browser.sh   But this is where I run into trouble. When I enter the line above, the output says:  chmod: cannot access ‘start_tor_browser.sh’: No such file or directory   Everything up to this point was working fine.   If I try to start Tor via Vidalia, it says Vidalia was unable to start Tor. Check your settings to ensure the correct name and location of your Tor executable is specified. But I have checked and rechecked and the Tor files, and they are exactly where Vidalia has them listed in settings.  If I try to click start-tor-browser (found in the folder named tor-browser_en-US) an error from archive manager pops up saying could not open "start-tor-browser" error opening file: no such file or directory.  I have tried to reinstall Tor, but it did not help.

In Ubuntu 13.04 I used to use the ppa:upubuntu-com/tor64  PPA to install the 64-bit Tor Browser Bundle. However, in Ubuntu 13.10 it doesn't work anymore. How do I install the Tor Browser Bundle in Ubuntu?


This subject intrigues me. My application is in the field of sports prediction. In sports prediction the experts compete who is the best - or we make it look as if they compete. So we try to find from the individual forecasts a composite forecast statistically more accurate than the best of the company of the forecasters. If we try to do that then of course we need to know the individuals past pereformances and then we need a formula to "add" them. I frequently do this:  Q = P1^W1 * P2^W2 ...  and then normalize the Q values to 1 and then try to work out the W1, W2 etc values for best results. By best results I mean the sum of |Log(Q)| of the winners should be maximum.  Now it happens sometimes that the result is W1 = 1, W2 = 0. This means the forecaster labelled "2" is useless. How can this happen ? In two ways: One way is that "2" always copies "1" (since we don't know what these fellows are actually doing when they prepare their newspaper wrteups !). The other way is that while the "1" is doing some serious studying, the "2" is content to give us random predictions - such as the license number of the first car crossing the road ! But real life is somewhere in between. There is always some overlap (or "copying") and as for the useless ones, well we are likely to know them in advance.  Now what is the ideal case ? When are the forecasters predictions totally independent ? Never really. You are likely to fancy Brazil to win the next world cup football series for more or less the same reasons as I do. But there is this thought experiment that makes them totally independent: I am a sportcaster with a known score p (0 <= p <= 1). You are another one with known score q (0 <= q <= 1). What happens with the two of us ? The following thing happens: Every night when we go to sleep a fairy comes to our dreams. She knows what is going to happen in the event we are trying to predict (because she is a fairy) but she plays the following game: In my dream she takes out of her pocket a scientific calculator and presses the Rnd button. If the number comes out to be <= p she tells me the truth. If the number that comes out is > p she tells a lie. But I am her spokesman -can't do otherwise- and what she says I say to you in the morning. Then she goes on and appears in your dream and she is doing precisely the same thing, only the random number has to be <= q now.  Now can this concept -with the fairies- be used to derive a better formula than mine (the P1^W1 * P2^W2 ...) ? That's the question. I have seen some writeups but I 'm not convinced.  Can you solve this example for me (with the ideal case formula - the fairies concept): We have a four way event, such as a horse race. Predictor A says the probabilities are 0.6, 0.4, 0, 0. Predictor B says they are 0.3, 0.3, 0.2, 0.2. What is the ideal average ?   There is the following similar thread     but I 'm not satisfied with the answers given

Lets say I have three independent sources and each of them make predictions for the weather tomorrow. The first one says that the probability of rain tomorrow is 0, then the second one says that the probability is 1, and finally the last one says that the probability is 50%. I would like to know the total probability given that information.  If apply the multiplication theorem for independent events I get 0, which doesn't seem correct. Why is not possible to multiply all three if all sources are independent? Is there some Bayesian way to update the prior as I get new information?  Note: This is not homework, is something that I was thinking about.


I would like to rotate/change screen saver on my background on Ubuntu 20.04. Is there a way to have it change/rotate every five minutes? Thanks

I have found a guide for that but doesn't sure if it will work or it is safe to use. The guide:  I am asking if is these introductions safe and will work? If not, is there any other solutions for that? I am using Ubuntu 20.04 LTS Thank you.


Question :  Show that a group G is solvable if and only if there exist sub-groups $G^{(0)}$, $G^{(1)}$, ..., $G^{(m)}$, with m $\ge$ 1, such that :  $G^{(m)}$ = {$e_G$} and the $G^{(i)}$ are defined inductively by $G^{(0)}$ = G, and $G^{(i)}$ = [$G^{(i-1)}$, $G^{(i-1)}$], where   [G, G] = < [x, y] | x, y ∈ G, [x, y] = xy$x^{-1}$$y^{-1}$ >  I'm able to show the forward implication, but not the backward one (i.e. the $G^{(i)}$ exist ==> G solvable). I have tried by induction on the i, but this doesn't seem to go anywhere. More specifically, I believe that once $G^{(i-1)}$/$G^{(i)}$ is abelian for all i, the normality $G^{(i)}$ $\lhd$ $G^{(i-1)}$ should be straightforward.   Is this the right approach? How can I show that $G^{(i-1)}$/$G^{(i)}$ is abelian?

I am trying to understand the proof of the following proposition:     A finite group $G$ is soluble $\iff G^{(k)}=\{e\}$ for some $k$, where $G^{(0)}=G$, $G^{(i+1)}=[G^i G^i]$ is the derived series.   Proof: Since $G$ is finite there is some $i$ such that $G^{(i)}=G^{(i+1)}$, and clearly $G^{(i)}=G^{(k)}\ \forall k\ge i$. So $\{e\}$ appears in the derived series $\iff G^{(i)}=\{e\}$.  Suppose that $G^{(i)}\ne\{e\}$ and let $G^{(i)}=H_0>H_1>...>H_k=\{e\}$ be a composition series for $G^{(i)}$. Since $\color{red}{G^{(i+1)}\nleq H_1}$ and since $G^{(i+1)}$ is the derived subgroup of $G^{(i)}$, it follows that $H_0/H_1$ is non-abelian. So $G^{(i)}$ is not soluble and hence $G$ is not soluble (since any subgroup of a finite soluble group must be soluble).  Now suppose that $G^{(i)}=\{e\}$. We know that if $X$ is a finite group and $N\lhd X$, then $X$ has a composition series which includes $N$.  $\color{red}{\text{Using this fact repeatedly we get a composition}}$ $\color{red}{\text{series for } G \text{ which includes } G^{(j)} \text{ for all } j\le i}$. It is clear that the composition factors are abelian since $G^{(j)}/G^{(j+1)}$ is abelian for all $j$. So $G$ is soluble. $\quad\quad\square$  I highlighted the parts which I didn't understand. Would somebody be so kind and explain the details. :/


I'm looking for the name of a book (series?) I read in the 80's. It was a fantasy-magic world split into different elemental worlds.  The main character spoke about being raised in some sort of labyrinth and had tattoos, which may have been to cast power spells.  I know it's not much, but I remembered parts of the book while I was deployed in 1990.

I'm trying to identify fantasy book series I encountered some time ago. Here are things I remember:   it was a fantasy setting but with some s-f elements; with many worlds and possibility to travel between them; resembling  setting a little, the two main races were non-human and probably hostile to each other,  a labyrinth (?), which somehow played an important role in the plot, a protagonist was some kind of emissary and was sent on a mission to another worlds  time period: 80s - 90s    Does anyone know what it is the name of the series?


Is there a general formula for determining multiplicity of $2$ in $n!\;?$  I was working on a Sequence containing subsequences of 0,1. 0 is meant for even quotient, 1 for odd quotient.  Start with k=3, k should be odd at start, if odd find (k-1) /2, otherwise k/2. This subsequence goes on until we reach 1.  Assign 0,1 accordingly as quotient is even, odd respectively. k(n+1) =k(n) +2, k(n) is odd, n>=1.Do this for all k>=3.1 is added before each subsequence as subsequence is generated by odd integer>=3.This sequence goes on like this: 11, 101, 111, 1001, 1101, 1011, 1111, 10001, 11001, 10101, 11101, 10011, 11011, 10111, 11111,..  The subsequences with increasing k are replica of the subsequence with steps to reach 1 minus one step or no of bits minus one with one extra bit of 1,0 depending on k.  Example-for k=5 the subsequence is 101 as quotient in first step is 2, and in second step is 1.  I want to find what is sequence at nth step?  Also can this sequence help in determining what is multiplicity of 2 in n! ?

Here is an argument in my book.  Theorem If $n$ is a positive integer and $p$ is a prime, then the exponent of the highest power of p that divides $n!$ is $\sum_{k=1}^\infty [\frac{n}{p^k}]$ Proof> Among the first $n$ positive integers, those divisible by $p$ are $p,2p,...,[n/p]p$. Thus, (Q1) there are exactly $[n/p]$ multiples of $p$ occurring in the product that defines $n!$, namely, $p,2p,...,[n/p]p$. The exponent of $p$ in the prime factorization of $n!$ is obtained by adding to the number of integers in $\{p,2p,...,[n/p]p\}$, the number of integers among $1,2,\cdots,n$ divisible by $p^2$, and so on. Reasoning as in the first paragraph, the integers between 1 and n that are divisible by $p^2$ are $p^2,\cdots,[n/{p^2}]p^2$. After a finite number of repetitions of this process, we are led to conclude that the total number of times $p$ divides $n!$ is $\sum_{k=1}^\infty [\frac{n}{p^k}]$  I completely don't get this argument from $(Q1)$. Why there are exactly $[n/p]$ multiples of $p$ in the prime factorization of $n!$?? Moreover, I don't get what the author is doing after $(Q1)$. Could someone please explain this argument in detail? Or please suggest me a link to see a proof for this theorem. I have googled it, but I couldn't find a proof for it. EDIT: I hate explaining things verbally. Please give me a formal argument..


It is understood that fread() is a library function and buffered I/o operation. read() is a system call which is unbuffered I/o. As buffered I/o is faster fread can be advantageous. But fread finally calls read() for the operation. Then how fread() is advantageous than read() ? Why fread() is needed whereas read can do the job ?

I'm reading source code of the linux tool . They use the read() function there. Is there a difference to the standard C fread() function? (I'm not counting the arguments as a difference.)


I want to draw a set like :    but don't know how to do it. I mean, how to put an object inside the set.

What I am up to is to write some exercises dealing with logical formulas for my students, like:     And the students should draw these formulas on . At the end of the lesson, I really would like to print the correct answer for them. I found a great resource on a forum thread at , which helped me a lot to make up some Venn diagrams with tikz, but have some problems with visualizing complements, like ~A.  A simple, modified version of the TeX file found on the forum linked above, can be seen below, which produces the following expression:    \documentclass{letter}   \usepackage{tikz}   \def\firstcircle{(90:1.75cm) circle (2.5cm)}   \def\secondcircle{(210:1.75cm) circle (2.5cm)}   \def\thirdcircle{(330:1.75cm) circle (2.5cm)}   \begin{document}     \begin{tikzpicture}       \begin{scope}     \clip \secondcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \begin{scope}     \clip \firstcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \draw \firstcircle node[text=black,above] {$A$};       \draw \secondcircle node [text=black,below left] {$B$};       \draw \thirdcircle node [text=black,below right] {$C$};     \end{tikzpicture}   \end{document}   Which looks like:    Could anyone please help me out plotting/defining some expressions dealing with complements? A nice example could be:    That should look like: (image from )    I do not insist on the red color :)  I would like to use the simplest possible solution, as I would like to mass generate the exercises with the help of . So any suggestion dealing with gnuplot, R or any other opensource packages is welcome. Thank you!    UPDATE (25/01/2011): added details based on answers.  Thank you @Leo Liu, you helped me a lot! I modified a bit the code you suggested to be able to color the area outside of the two circles also (in the H universe), but have no idea how to set a background to that polygon also. The code:  \begin{tikzpicture}[fill=gray] % left hand \scope \clip (-2,-2) rectangle (2,2)       (1,0) circle (1); \fill (0,0) circle (1); \endscope % right hand \scope \clip (-2,-2) rectangle (2,2)       (0,0) circle (1); \fill (1,0) circle (1); \endscope % outline \draw (0,0) circle (1) (0,1)  node [text=black,above] {$A$}       (1,0) circle (1) (1,1)  node [text=black,above] {$B$}       (-2,-2) rectangle (3,2) node [text=black,above] {$H$}; \end{tikzpicture}   And the image generated:    I will also look for even odd rule in the near future which does not make sense for me at the moment but looks really simple and promising!


I am getting a null pointer exception when I call my method to create a new String copy of the passed argument. This method is called from my main.   Why am I getting this error and how do I fix it so it's not pointing to null?  It says the error is happening on this line :front.data = original.charAt(i);  and if I change the size to -1 it gives the error on this line back.next = newNode;  Main (relevant part of method):  public class TestLString {   /** Main method */    public static void main(String[] args) {        String str1 = "Hello, my name is Alphose!";       LString lstr1 = new LString(str1);   EDIT: This seemed to work!     public LString(String original){   size = 0;   for(int i = 0; i< original.length(); i++){      if(original.length() == 0){                              ///changed         front = new Node();         front.data = original.charAt(i);         front.next = back;         size++;      } else{            Node newNode = new Node();            newNode.data = original.charAt(i);            Node back = new Node();            back.next = newNode;            newNode.next = null;            back = newNode;        }   }   }    my initialized data field(sorry about that). Let me know if I can add anything else.  public class LString{      private Node front = null;  //first val in list    private Node back;   //last val in list    private int size = 0;    private int i;    private int offset;     public LString(){       //construct empty list       Node LString = new Node();       front = null;     }

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


I have the following XAML snippet and I want to include a generic parameter and I can't work out what I need to do?  I guess I'm going to have to created a markup extension to do this but I'm unsure how to get this to work with the x:Type attribute.  DataType="{x:Type vm:FooViewModel<Bar>}"

In XAML I can declare a DataTemplate so that the template is used whenever a specific type is displayed. For example, this DataTemplate will use a TextBlock to display the name of a customer:  <DataTemplate DataType="{x:Type my:Customer}">     <TextBlock Text="{Binding Name}" /> </DataTemplate>   I'm wondering if it's possible to define a DataTemplate that will be used any time an IList<Customer> is displayed. So if a ContentControl's Content is, say, an ObservableCollection<Customer> it would use that template.  Is it possible to declare a generic type like IList in XAML using the {x:Type} Markup Extension?


So, I've got this phrase: ''Far from fleeing monotony, animals crave it, and what they most dread is to see it end.''  Can someone explain me why it is written ''to see it end'' rather than ''to see it ending''?   From the same category I've got ''to see him leave'' rather than ''to see him leaving''. Why is this use of infinitive ?

Some verbs are followed by ing, e.g. I enjoy swimming. We can't say I enjoy to swim. Likewise, some verbs are followed by to, e.g. I decided to make a plan.   Which particular verbs are followed by ing and to? Can you please provide a list for that?  Moreover, which verbs can be followed by both without having the meaning changed?


I know Lorentz force don't do any work. but I want to know whether any type of magnetic field do a work or not.

I learned that the force from a magnetic field does no work. However I was wondering how magnets can be used to pick up pieces of metal like small paperclips and stuff. I also was wondering how magnets can stick to pieces of metal like a refrigerator?


I'm using ogr2ogr to load ESRI .gdb into PostGIS DB. I'd also like to export to .gdb the other way round.  But the included OpenFileGDB driver only has read access.  Now there are hints to use ESRI's  but I cannot get it work. What do I have to copy and where or what are the steps to get it work?  EDIT: It's MS 10 and GDAL 2.1.3. Installed it via OSGeo4W64.

There has been a tons of questions on that but none of them solved my problem.  I have a machine with:   Windows 7 x64 Python 3.4.3 x64 gdal installed: gdalinfo --version --> GDAL 1.11.4, released 2016/01/25; gdal was installed from a wheel GDAL-1.11.4-cp34-none-win_amd64.whl from    The GDAL is installed into C:\Python34\Lib\site-packages\osgeo. There I have a bunch of .exe files for gdal and ogr and .pyd files.    fiona installed: was installed from a wheel Fiona-1.6.3-cp34-none-win_amd64.whl, from the same website.   I am able to run this code and it executes successfully:  import gdal import ogr from gdalconst import *  shp = r"C:\Data\GIS\PTS.shp" driver = ogr.GetDriverByName('ESRI Shapefile')  dataset = driver.Open(shp)     layer = dataset.GetLayer() layer.GetFeatureCount()     schema = layer.schema fields = [field.GetName() for field in schema]     feature = layer.GetNextFeature()   I am also able to get OGR formats: ogrinfo --formats prints a bunch of them in the Windows cmd (with no FileGDB there though).  I am able to run this code and it executes successfully:  import fiona with fiona.drivers():   with fiona.open(path=r'C:\Data\GIS\TemplateData.gdb', driver='OpenFileGDB') as source:     print(source.meta)   However, this code won't run:  with fiona.drivers():     with fiona.open(path=r'C:\Data\GIS\TemplateData.gdb', driver='FileGDB') as source:         print(source.meta)   Because I don't have Esri File GDB compiled libraries which are required.  I have downloaded and unpacked FileGDB_API_VS2012_1_3.zip from the . As I understood, there is no need to compile anything as the .dll is already there.   What is the correct procedure to register the dll of the Esri File GDB API to be able to use them in fiona in my environment?    UPDATE: (based on Luke's answer)  I have downloaded the File Geodatabase API 1.4 version for Windows (Visual Studio 2010) from the . I copied the FileGDB_API_VS2010_1_4\bin64\FileGDBAPI.dll to the C:\Python34\Lib\site-packages\osgeo. Now I have two files in here, ogr_FileGDB.dll and FileGDBAPI.dll.  I have created a Windows variable GDAL_DRIVER_PATH : C:\Python34\Lib\site-packages\osgeo\gdalplugins. In the PATH variable, I don't have anything Python specific except the C:\Python34\Lib\site-packages\osgeo.  Now when running the ogrinfo --formats I get -> "FileGDB" (read/write) and am able to use the Python code for working with the FileGDB driver.


What is the menu on the upper right corner called in Windows?

It seems to me that there should be a generic name for the close, restore, and minimize buttons on the title bar in window managers.  It's been getting hard to search for answers associated with them.  I am also a developer, and I'll be working with low-level window manager stuff on Linux, so this would be a good thing to know.  Is there some kind of generic term for this?  Title Bar Buttons is the best term that I've come up with, but this is in no way official.  If it's different for each window manager, then that would also be good to know.  I couldn't find much searching around...  Note:  It would be nice to know the terms used by all platforms: Windows, Mac OS, GNOME, KDE, XFCE, etc.


I would like to ask a question about affine matrix transformations, specifically an explanation about why these two ways to interpret them are equivalent.  Suppose I have (in 2D for simplicity) an usual translation matrix T and a rotation matrix R as follows: $$ T=\begin{bmatrix}1 & 0 & tx\\0 & 1 & ty\\ 0 & 0 & 1\end{bmatrix} R=\begin{bmatrix}\cos \theta & -\sin\theta & 0\\\sin\theta & \cos\theta & 0\\ 0 & 0 & 1\end{bmatrix} $$  Suppose for example: $$ tx=0,ty=2,θ=45∘ $$  Now if I transform a quad applying translation and rotation to every vertex in this order: R * T * Vertex (Column vector), I obtain this:      Reading the transforms left-to-right both translation and rotation transforms are done around the origin, considering T first and R after. However this is equivalent to considering the same equation reading it right-to-left R first and T after, transforming the quad relative to itself and not the origin:      The result is the same. What is a mathematical explanation about why these two ways of reading the same affine transform composition are equivalent?

I would like to ask a question about affine matrix transformations, specifically a mathematical explanation about why these two ways to interpret them are equivalent.  Suppose I have a translation matrix T (for simplicity 2D) and a rotation matrix R as follows:  $$  T= \begin{bmatrix}         1 & 0 & tx \\         0 & 1 & ty \\         0 & 0 & 1 \\         \end{bmatrix}  R= \begin{bmatrix}         \cos \theta & -\sin \theta & 0 \\         \sin \theta & \cos \theta & 0 \\         0 & 0 & 1 \\         \end{bmatrix} $$  Suppose: $$ tx = 0 , ty = 2, \theta = 45^{ \circ } $$  Now if I transform a quad applying translation and rotation to every vertex in this order: R * T * Vertex (Column vector), I obtain this:      Since both translation and rotation transforms are done around the origin, considering T first and R after. However this is equivalent to considering R first and T after modifying the quad relative to itself and not the origin:       The result is the same. Why is this equivalent?


A few hours ago, I went in my ACER laptop boot options, for no particular reason. I did not change anything, but noticed that Windows 10 was first in the boot order list while Ubuntu was not there at all. I escaped, and thought Grub would show up... but it did not and Windows booted.   Since then, I've been unable to boot on Ubuntu. Windows automatically boots and Grub does not show up anymore.   In the boot menu, there is only Windows. I'm on UEFI and secure boot is enabled - it wont let me disabled it in the options.  Prior to that, everything used to work just fine. I'm confused!   EDIT : Problem fixed, see my answer.

Soooooo, I seem to have myself in a very particular situation. Let me start from the beginning, I set up dual boot with Windows 10, and Lubuntu. Everything went according to plan. I then decided that I wanted to remove dual-boot. I looked on several articles some saying to use bootrec.exe, to repair and remove it but then I realized "It doesn't use the windows boot manager... it uses grub." So with this knowledge I searched for guides on how to remove grub. I found a guide () I could not access my system drive, so I dual-booted into Lubuntu and used root to access the EFI folder and deleted the "ubuntu" folder and rebooted to a happy little message saying: Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key_ . I realize that all my data is still there. I realize that in deleting the "ubuntu" folder that I deleted critical files part of the loading of grub. I now need to somehow replace these files, and get back to Windows 10.  Sidenote: I don't have bootrec.exe as a command. I checked this before I deleted the grub files.  Thanks for the help, -r


Here's my ps1 variable:  export PS1='\e[33;1m\u@\h\]: \e[31m\W\e[0m\e[0;32m$(parse_git_branch)\e[0m$\] '   Where parse_git_branch is a function that shows what branch I'm currently on in git, such as (master).  I've also set this in my .bashrc  stty columns 500   The behavior is really weird - in VS code if I make my integrated terminal really small, the line wrapping works correctly. If it's above a certain size, it starts overwriting itself on the same line.  Any idea what I'm doing wrong?  edit  Ben was correct below - I had to make sure the escape characters matched up and wrapped the entire thing in brackets. This seems to work:  export PS1='\[\e[33;1m\u@\h\]: \e[31m\W\e \e[0;32m$(parse_git_branch)\] \]\e[0m$\]\] \]'

Here's my PS1 variable:  PS1='\u:\W$(__git_ps1 "\e[32m\][%s]\e[0m\]")$ '   Works great for picking up my Git branch, but it has the unfortunate side-effect of wrapping the lines when the colours are active, so that they overlap when you use long commands.  Can anyone with magic PS1 skills help me out to fix this?


i have this series:  $$\sum_{n=0}^m{a^n}$$  and I need a mathematical demonstration  anyone know the name of the series?

I am a high school math teacher who likes to understand the development and rationale behind formulas, albeit I am not a math expert by any means.  Could I get some help in trying to explain how the formaula for the sum of a finite geometric series actually can be derived?  I need a a rather simple explanation initially, so that I can grasp the essential nature of the formula.  Thanks for allowing me some space here.