I need to write a function that converts hex to decimal and I've got an idea of how to do it but I'm stuck at the first bit. So far I am taking the user input and returning it in hex, but this only works if I enter 1 thing at a time. The code is:  def hex(x):     if x == "0":         return 0     elif x == "1":         return 1     elif x == "2":         return 2     elif x == "3":         return 3     elif x == "4":         return 4         elif x == "5":         return 5     elif x == "6":         return 6     elif x == "7":         return 7     elif x == "8":         return 8     elif x == "9":         return 9     elif x == "A":         return 10     elif x == "B":         return 11     elif x == "C":         return 12     elif x == "D":         return 13     elif x == "E":         return 14     elif x == "F":         return 15  print hex(raw_input().upper())   It works if I enter, for example, C then it returns 12, but if I enter 8C then it doesn't work. I can't figure out why this is.

How do I convert a hex string to an int in Python?   I may have it as "0xffff" or just "ffff".


I am unable to find a real matrix $A$ that satisfies $A^2=B$ for the matrix given below by any methods I know, since it is already diagonalized. Does there exist such a real $A$ at all, and more importantly, is there any way  to prove whether it does? $$B=\begin{bmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}$$

Given the following matrix, I was asked to tell whether the matrix is the square of some matrix or not.  $$ \begin{pmatrix} 1 & 0 & 0\\ 0 & -1 & 0\\ 0 & 0 & -1 \end{pmatrix} $$  Since this matrix is diagonal, a square root is  $$ \begin{pmatrix} 1 & 0 & 0\\ 0 & i & 0\\ 0 & 0 & i \end{pmatrix} $$ Am I right?


I ran into an exercise in D. Passman's book A Course in Ring Theory (page 130) asking me to prove the structure theorem of modules over PIDs in the graded case.      Find all finitely generated graded $K[x]$-modules up to abstract isomorphism. Remember, $K[x]$ is a principal ideal domain.   Could anyone point me in the right direction?  An attempt of proof:  Let $M$ be a finitely generated $K[x]$-module with the set of generators $\{b_i\}$ of minimum cardinality. Let $K[x]^n$ be the free graded $K[x]$-module of rank $n$ with the standard grading and basis $\{e_i\}$.   Now define a homomorphism of modules $\phi:K[x]^n \rightarrow M$ by setting $\phi(e_i)=b_i$. Since $\{b_i\}$ generates $M$ this is surjective and by the First Isomorphism Theorem for modules we have $K[x]^n/\ker{\phi} \cong M$. Since $K[x]^n$ is a free module over a PID of finite rank, and $\ker{\phi}$ is a submodule, than $\ker{\phi}$ is free of rank $m\leq n$, and moreover there is a basis $\{y_i\}$ of $K[x]^n$ such that $a_1y_1, a_2y_2, ..., a_my_m$ is a basis for $\ker{\phi}$, for $a_i \in K[x]$. One can find a proof of this in Dummit & Foote - Theorem 4 (p. 371), and a lot of other places. It is also evident that $(a_i)$, for $1 \leq i \leq m$, are ideals in $K[x]$, and since it is a graded PID they are of the form $(x^n)$.  Now we define a surjective homomorphism $\varphi$ $$\varphi: K[x]y_1 \oplus \cdots\oplus K[x]y_n\rightarrow \Sigma^{\deg(y_1)}K[x]/(x^{q_1}) \oplus \cdots\oplus \Sigma^{\deg(y_m)}K[x]/(x^{q_m}) \bigoplus_{i=1}^{n-m} \Sigma^{\deg(y_{m+i})}K[x]$$  by mapping $(\alpha_1y_1,...,\alpha_my_m) \rightarrow (\alpha_1\bmod(x^{q_1}),...,\alpha_m\bmod(x^{q_m}),\alpha_{m+1},...,\alpha_{n})$.  $\Sigma^n$ is an $n$-shift upward in grading.  Now the kernel of $\varphi$ is obviously $K[x]x^{q_1}y_1\oplus \cdots \oplus K[x]x^{q_m}y_m$ which is isomorphic to $\ker \phi$, and therefore the image of $\varphi$ is isomorphic to $M$: $$(\bigoplus\limits_{j=1}^{m} \Sigma^{\deg(y_j)}K[x]/(x^{q_j})) \oplus (\bigoplus\limits_{i=1}^{n-m}\Sigma^{\deg(y_{m+i})}K[x])\cong M.$$

I found this decomposition theorem used in a paper I'm reading, but it isn't referenced and I can't seem to find it in any of the books I have:  Every graded module $M$ over a graded PID decomposes uniquely into the form $$({\bigoplus\limits_{i=1}^n \Sigma^{\alpha_i}D}) \oplus ({\bigoplus\limits_{j=1}^m \Sigma^{\gamma_j}D/d_jD})$$ where $d_j \in D$ are homogenous elements so that $d_j\mid d_{j+1}, \alpha_i, \gamma_j \in\mathbb Z$, and $\Sigma^\alpha$ denotes an $\alpha$-shift upward in grading.  Now, it looks like a regular decomposition theorem for modules over PIDs but I am having trouble understanding this "$\alpha$-shift upward". Could you point me in a direction of a text were this is proved? An example would be great, but I suppose this is too much to ask.


The identity $$\sum_k \binom{2 k}{k} \binom{2n - 2k}{n - k} = 4^n$$ is found on page 187 of "Concrete Mathematics" by Knuth and Graham.  The book does not prove it combinatorially.   Is there a proof of this identity using double counting?  I have played with it for about an hour to no avail!

It's not difficult to show that  $$(1-z^2)^{-1/2}=\sum_{n=0}^\infty \binom{2n}{n}2^{-2n}z^{2n}$$  On the other hand, we have $(1-z^2)^{-1}=\sum z^{2n}$.  Squaring the first power series and comparing terms gives us  $$\sum_{k=0}^n \binom{2k}{k}\binom{2(n-k)}{n-k}2^{-2n}=1$$  that is,  $$\sum_{k=0}^n \binom{2k}{k}\binom{2(n-k)}{n-k}=2^{2n}$$  My question: is there a more direct, combinatorial proof of this identity?  I've been racking my brains trying to come up with one but I'm not having much success.


Express $\lim_{n\to∞} \left(\frac{1}{n+1} + \frac{1}{n+2} + ... +\frac{1}{n+n}\right)$ as a Riemann integral.   I was able to transform it to $\lim_{n\to ∞}\sum\limits_{r=1}^n \frac1{n+r}$.  I don't know how to go about it from here.

What is the sum of the 'second half' of the harmonic series?  $$\lim_{k\to\infty}\sum\limits_{n=k+1}^{2k}{\frac{1}{n}} =~ ?$$  More precisely, what is the limit of the above sequence of partial sums?


I charge up a parallel-plate capacitor, and put a bar magnet on either side, such that the magnetic field is perpendicular to the electric field.  S = E x B  Do photons start coming out of the capacitor?  If so, where does their energy come from?

I don't know how this "paradox" can be solved. I'm given the following system: A permanent magnet with a magnetic field given by ($\hat{a}$ are unit vectors in the x and y directions)  $$\vec{H}=H_0\hat{a}_y$$  and a parallel plane capacitor with an electric field  $$\vec{E}=E_0\hat{a}_x$$  Poynting's vector is given by:  $$\vec{S}=\vec{E}\times\vec{H}=H_0E_0\hat{a}_z \neq 0$$  The funny part comes when the professor told that in a system like that "clearly" there is not propagation (wich I know will imply some short of energy flux) in the $z$ direction, hence the "paradox". Is there or is there not propagation of energy?  Any hint will be appreciated, thank you for your time.


There have been several attacks against hash functions such as $h_{sha1}$ and $h_{md5}$.  Professor A suggests a new function $h_{666}$ with an output length of 666 bits.   Professor B suggests combining the two functions $h_B=h_{sha1}(h_{md5}(m))$.   Professor C suggests combining all four functions $h_C=h_{md5}(m) \oplus h_{sha1}(m) \oplus h_B(m) \oplus h_{666}(m)$, where short messages are padded with zeros where necessary.     Explain / prove why each and every one of these functions may be less safe than $h_{sha1}$.   I couldn't think of anything to say about $h_{666}$, since we know nothing about it, except that it has a constant output length, which I know many other hash function have. I thought it might have to do with the length not being a multiplication of 2, but couldn't reach a specific conclusion.  I think $h_B$ is bad because we know that $h_{md5}$ is known to have collisions, and such collisions will affect $h_B$ as well.  Couldn't exactly understand what's wrong with $h_C$, unless again it has to do with collisions of $h_{md5}$ and/or the safety of $h_{666}$.  Any help would be appreciated, thanks!

Assuming I'm a bank which seeks for secure hash functions to use in the process of  signing on digital contents.  I'd like to explain / prove why using each one of the following hash functions might be less secure than using SHA-1 (yes, I know SHA-1 no longer considered secure, but the question does consider it as one, or at least states "do not be less secure than sha-1").   $h_{666}(m) = $ some new hash function with 666 bit long output. $h_{ib}(m)=h_{sha-1}(h_{md5}(m))$ $h_{hm}(m)=h_{md5}(m) \oplus h_{sha-1}(m) \oplus h_{ib}(m) \oplus h_{666}(m)$, while the XORing operation here xors the matching bits between two outputs, padding with 0s the smaller ones.   I would say…   I can tell that using new hash function is a bad idea since no one has yet to research and attack it, aside from the fact that more bits is less efficient. Apart from this explanation, I don't see other reason to disqualify this answer. md5 is broken and collisions can be made quite easy, so two different inputs to this function can collide and have the same input to the sha-1 function, which will result in collision between the final outputs. I have no clue how to disqualify this one. The intuition says 'xoring with bad hash functions is not a good idea', but I can't really justify my answer. I also think the padding doesn't actually affect anything, becuase if SHA-1 result is secure then padding 0s to it won't make it collide with other inputs suddenly.   Am I correct, or did I miss something obvious somewhere?  Edit  This is different from  since here the idea is to combine unsecure hash with a secure one. This is not about just combining hashes.


I have some custom Jquery which grabs the id's from a select list, and populates a secondary select list with those that are selected.    I have this working well, however I need the secondary select list needs to display the text value of the selected option.  Currently I just get the actual id.    Can anybody assist please?  JQUERY  $('#myselect').change(function() {         var row = $(".chosen-select").val();         $('#secondSelect').html('');         jQuery.each(row, function(i, val) {             $('#secondSelect').append('<option value=' + val + '>' + val) + '</option>';         }); });   HTML  First select list  <select data-placeholder="Choose cars..." class="chosen-select" name="myselect[]" id="myselect" multiple>    <option value="1">Vauxhall</option>                                                                                <option value="2">Volvo</option> etc... </select>   Second select list  <select name="secondSelect" id="secondSelect">     <option value="">Select Model</option>     should be populated here.. </select>

All right, say I have this:  <select id='list'>     <option value='1'>Option A</option>     <option value='2'>Option B</option>     <option value='3'>Option C</option> </select>   What would the selector look like if I wanted to get "Option B" when I have the value '2'?  Please note that this is not asking how to get the selected text value, but just any one of them, whether selected or not, depending on the value attribute. I tried:  $("#list[value='2']").text();   But it is not working.


Whenever I open my files in ubuntu, hidden files appear.  How can I do that when opening my files, the hidden files are not displayed by default?  THX!

I am using Ubuntu 16.04 and whenever I open the file manager to see my folders, the hidden files are always displayed, I do not want to show them ... they appear alone, and it is always when I open the file manager.  How can i fix this?


I am looking at buying an Xbox 360 'fat' or "Jasper" Edition second hand from a shop nearby. I have been assured it does not have the red light issue; it's on PAL.   I have no knowledge of Xbox 360 as I will be buying it for the first time. What sort of things should I check for to test whether the Xbox360 is OK to buy and does not have any issues? i.e. Temperature, Performance test, any other potential issues?   The seller has said that it has no Red Light issue and the CD-ROM works fine.

I'm picking up a used Xbox 360. It isn't expensive and the seller has agreed to let me try it out first. To test it out, here's some things I'm trying to get answered:   Is it banned from Xbox Live? Is the DVD drive in good condition?   How do I check whether this particular Xbox has been banned?  Are there any other things that I should check?


I'm looking for a proof of this identity: $$ \sum_{k}{n\brack k}{k\brace m}=\binom{n}{m}\frac{(n-1)!}{(m-1)!} $$ I'm looking especially for a combinatorial proof (if such exists), but different method still will be fine.

How to combinatorially prove $$L\left(n,k\right)=\sum_{j=0}^{n}{ n\brack j}{j\brace k}$$ Where $L\left(n,k\right),{ n\brack j},{j\brace k}$ denote , ,  respectively.  One may use the following explicit formula to derive the relation: $${j\brace k}=\frac{1}{k!}\sum_{i=0}^{k}\binom{k}{i}\left(-1\right)^{i}\left(k-i\right)^{j}$$ However, I don't know how to prove such a relation using combinatorics.


I open a file with  emacs through terminal just typing   emacs file.txt   and when I close terminal, emacs closes too, and when I try to execute another thing terminal doesn't let me becuase keeps like this:    how can I solve this?

How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window, say, nm-applet:  nm-applet   When it's started, it occupies the foreground of the terminal window.  Is there any simple way to run the program in the background without needing to leave the terminal open or have it occupy the whole terminal?  On that note, I did find a way to run programs from the terminal and have it allow for other inputs, by appending an ampersand (&) to the command as such:  nm-applet &   But this isn't much use as any processes started in the terminal are killed once the terminal is closed.


Question: You are going to toll three dice. What is the probability that the highest of the three numbers will be exactly a $4$?   My attempt:   The first die obtains number $4$ with probability $\frac{1}{6}.$ Then the remaining two dice can take numbers $1,2,3,4$ only. So each of them has probability $\frac{4}{6}.$ In total, the required probability is  $$\frac{1}{6}\times \frac{4}{6} \times \frac{4}{6} \times 3 = \frac{2}{9}.$$ But apparently this is not the answer.  It is $\frac{37}{216}.$  May I know where is the flaw in my reasoning?

A fair die is thrown 3 times. Find the probability  that the largest outcome of the three throws is a 3.    I understand that the problem isn't as simple as $ \frac{3^3}{6^3}=1/8$, being the answer. That would mean getting any of the values from $1-3$ for all of the throws is favorable, which includes series of throws that do not even have $3$ as an outcome.  What's the solution to ensure that there is at least one throw with $3$ as the outcome, with the $2$ other throws being anywhere from $1-3$?


I have a camera here that is constrained to look at an empty object. It is also following along a path. I have follow unchecked on the path but when the camera reaches a turn it flips on its side regardless if i'm using follow or not. I locked the Y rotation of it which didn't help one bit. Does anyone have any ideas what to do about this?     When it takes a shit ^^^^^

I created the camera moving by the curve using parenting and follow path option. However, how to do so that the camera moves on this curve, simultaneously changing the rotation so that all the time it  observes the other object (moving along a second path beside)? I have tried to add "track to" option, but the camera was adjusted completely not in this direction what it is necessary.


I have a question about the basic counting problem.  Situation : There are 50 people and 10 chairs in the room. Among them, 5 chairs are already assigned the special 5 people of the 50 people. In this situation, how many ways can the 10 chairs be distributed? (each chair is not distinguishable)  My answer : I thought that 45 x 44 x 43 x 42 x 41, since 5 chairs are already assigned. So, except for 5 people who have their chairs, among 45 people, we can distribute the left 5 chairs to them.  Is this correct?  Any comments would be helpful to me. Thanks.

I'm stuck with the basic counting problem.  Problem is the following:     Corrupt professor Z has a class of 50 students. He needs to give exactly 10 A's. However five students already have a special deal (they are professor Z's nephews and neices) and will get A's for sure. How many ways can the 10 A's be distributed?   My thought : 45 Choose 5, because we can ignore 5 people(nephews and nieces) who will get A's grade for sure.   I'm not sure my thought is correct or not. I'm appreciated any comment or explanation for this.


At the beginning I had a perfectly working code; I was creating a 'location' and then I would save it in a database and retrieve it any time I wanted. 'Location' was an object that only contained Strings. Then I wanted to add some icons that could desctribe the location easier and my program crashed. I am getting an error: 2021-01-07 11:01:17.484 32731-32731/pl.issrfid.isshandheldrfidscanner E/AndroidRuntime: FATAL EXCEPTION: main Process: pl.issrfid.isshandheldrfidscanner, PID: 32731 java.lang.NullPointerException: Attempt to invoke virtual method 'long pl.issrfid.isshandheldrfidscanner.model.LocationModel.getID()' on a null object reference     at pl.issrfid.isshandheldrfidscanner.adapter.DBAdapter.deleteLocation(DBAdapter.java:414)     at pl.issrfid.isshandheldrfidscanner.activity.Api.Synchronization.DownloadLocation.onPostExecute(DownloadLocation.java:123)     at pl.issrfid.isshandheldrfidscanner.activity.Api.Synchronization.DownloadLocation.onPostExecute(DownloadLocation.java:33)     at android.os.AsyncTask.finish(AsyncTask.java:755)     at android.os.AsyncTask.access$900(AsyncTask.java:192)     at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)     at android.os.Handler.dispatchMessage(Handler.java:107)     at android.os.Looper.loop(Looper.java:237)     at android.app.ActivityThread.main(ActivityThread.java:7948)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)  But when I debugged my app I noticed that the object - product - is not null:  Code for DBAdapter.java:414:         for(ProductModel product : mainProductList){         if(product.getLocationModel().getID() == locationModel.getID()){             Log.e(TAG, "moving productId: " + product.getId() + "; productApiId: " +                     product.getApiID() + "; to defaultLocation");             product.setLocationModel(defaultLocation);             product.setLastEditDateTime();         }     }  Code for (DownloadLocation.java:123: DBAdapter.getInstance(context).deleteLocation(location);  Before I added icons to the 'location' the code worked, I have not however changed the 'product' part of my code and I have no idea what might have changed

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 quick question about a difficult trigonometric functions problem that I have been assigned. The problem is as follows: Evaluate $$\cos36° - \cos72°$$ without the aid of a calculator. In terms of my attempts at the problem, I have converted $\cos 36°$ into 2$\cos^{2}18°$ - 1, and I have converted $\cos72°$ into 1 - 2$\sin^{2}36°$. By the property that  $\sin x$ = $\cos(90° - x)$, the latter expression becomes 1 - 2$\cos^{2}54°$. Unfortunately, I've hit a roadblock and don't really know what to do from here. Would, perhaps, adding the two determined expressions yield anything of use? Thanks for all advice.   EDIT: Or, perhaps, would it be wiser to convert $\cos72°$ into 2$\cos^{2}36°$ - 1 and to convert $\cos36°$ into 1 - 2$\sin^{2}18°$?

How do we prove $\cos(\pi/5) - \cos(2\pi/5) = 0.5$ without using a calculator.  Related question: how do we prove that $\cos(\pi/5)\cos(2\pi/5) = 0.25$, also without using a calculator


Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


I am trying to understand slicing. How does this slice work?  >>> a=['c','b'] >>> a ['c', 'b'] >>> a[-3:-1:3] ['c']   I have already read all the posts and cannot find an answer. As I understand it slice is supposed to be [start:stop:step]. But if I start at -3 after one step I am at 0. How exactly does this work? Which indexes are printed? The ones in the range?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I don't know if this is the right place to ask this question. I hope that, if not, you can try to suggest others destinations. So my question is very simple but it takes me lot of time due to the fact that i'm a beginner user of latex. QUESTION: Are there any Curriculum Vitae templates to use in LaTeX?  Or any packages build up to write a CV?  Thanks for all suggestions.

If you have a TeX'ed resume, did you use a template or make your own? Are there any useful packages? What looks the most professional? How about special considerations for different areas of work (e.g. in academia)?


Want to update my android version myself. The phone manufacturer isn't providing any updates. Is there a way to update from Jellybean to kitkat manually?  I'm using Micromax A76 Canvas Fun. Currently on Jellybean 4.2.2

This Community Wiki question is designed to be the "canonical question" for questions asking how to upgrade one's device to a new Android version.   I want to get a newer version of the OS for my Android device. How can I do that?  See also:


I am using the MWE from where I need to cite a book chapter in an edited book.  Basically from  Author A (1998) Title Chapter   to   Author A (1998) Title Chapter    to     Below is my MWE:  \documentclass{article} \usepackage{xpatch} % \usepackage[style = authoryear-comp, maxnames = 99]{biblatex}  \usepackage[backend=biber,  % style=authoryear,   style=authoryear-comp, % citestyle=authoryear,  dashed=false, maxcitenames=2, maxbibnames=99, giveninits, uniquename=init]{biblatex}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \usepackage{csquotes}  \usepackage[unicode,colorlinks,citecolor=blue]{hyperref}  % \renewcommand*{\finalnamedelim}{\addspace\&\space} % \renewcommand*{\intitlepunct}{\space} \renewcommand{\labelnamepunct}{\space}  % \DeclareDelimFormat{finalnamedelim}{\addspace\bibstring{and}\space}  \DefineBibliographyExtras{english}{%    \let\finalandcomma\empty    \let\finalandsemicolon\empty  }    % \DeclareFieldFormat[article, incollection, unpublished]{pages}{#1} \DeclareFieldFormat[article, incollection, unpublished]{title}{#1} % \renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}}  \DeclareNameAlias{sortname}{family-given} \DeclareNameAlias{editorin}{given-family}  \newbibmacro*{byeditor:in}{%   \ifnameundef{editor}     {}     {\printnames[editorin]{editor}%      \setunit{\addcomma\space}%      \usebibmacro{editorstrg}%      \clearname{editor}}}  \xpatchbibdriver{inbook}   {\usebibmacro{in:}%    \usebibmacro{bybookauthor}%    \newunit\newblock    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {\usebibmacro{in:}%    \usebibmacro{bybookauthor}%    \newunit\newblock    \usebibmacro{byeditor:in}%    \newunit\newblock    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {}{}  \xpatchbibdriver{incollection}   {\usebibmacro{in:}%    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {\usebibmacro{in:}%    \usebibmacro{byeditor:in}%    \setunit{\labelnamepunct}\newblock    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{byeditor}}   {}{}  \xpatchbibdriver{inproceedings}   {\usebibmacro{in:}%    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{event+venue+date}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {\usebibmacro{in:}%    \usebibmacro{byeditor:in}%    \setunit{\labelnamepunct}\newblock    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{event+venue+date}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {}{}    \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @incollection{lennon1965,   author    = {John Lennon},   booktitle = {A book with articles},   editor    = {Paul McCartney and John Lennon and George Harrison and Richard Starkey},   title     = {This is my article in this book},   year      = {1965},   location  = {Liverpool},   pages     = {65--87},   publisher = {Cavern Club}, } @incollection{deborah123,   author      = "Deborah Lewis and Marie O'Boyle-Duggan and Susan Poultney",   title       = "Communication skills education and training in pre-registeration BSc Nursing",   editor      = "David W. Kissane and Barry D. Bultz and Phyllis N. Butow and Carma L. Bylund and Simon Noble and Susie Wilkinson",   booktitle   = "Oxford Textbook of Communication in Oncology and Palliative Care",   publisher   = "Oxford University Press",   address     = "Oxford",   year        = 2017,   pages       = "149-154",   Edition = "2nd edn" } \end{filecontents*} \addbibresource{\jobname.bib}  \begin{document} \nocite{*} book done \parencite{deborah123}.  \printbibliography \end{document}

I use the standard style in latex and want to override it, to remove the quotation marks from Conference Type. In my bbx file I use:  \RequireBibliographyStyle{standard}   I thought I could use the following to get Rid of all quotation marks. But that doesnt work.  \DeclareFieldFormat{title}{#1}


Can I put the title bar buttons in Unity on the right side somehow, or is that impossible?

Downloaded Ubuntu tweak and set window controls to the right side. Only some programs follow the rule. Pidgin as an example has window controls on the right. But Chrome, Thunderbird, Geany, still have controls on the left.  How can I move ALL window controls(close/min/max) to the right (or left)?


I have the following abstract class:  public abstract class PinkBoxMasksDataAbstract {     public string PinkBoxText { get; set; } }   and 2 subclasses:  public class PinkBoxMasksDataNoOverlay : PinkBoxMasksDataAbstract { }  public class PinkBoxMasksDataOverlay : PinkBoxMasksDataAbstract {     public int PinkBoxLeft { get; set; }     public int PinkBoxBoxTop { get; set; }     public int PinkBoxHeight { get; set; }     public int PinkBoxWidth { get; set; } }   then I have another class, which has PinkBoxMasksDataAbstract class as parameter:  public class ZonalMatchResult<T> where T : PinkBoxMasksDataAbstract {     public decimal Confidence { get; set; }     public int GreenBoxLeft { get; set; }     public int GreenBoxTop { get; set; }     public int GreenBoxHeight { get; set; }     public int GreenBoxWidth { get; set; }      public List<T> PinkBoxMasksData { get; set; } }  public class ZonalResult<T> where T : PinkBoxMasksDataAbstract {     public int ExitCode { get; set; }     public string ErrorMessage { get; set; }     public int NumberOfGreenBoxMatches { get; set; }     public int NumberOfPinkBoxExtractFrames { get; set; }     public int ProcessingTime { get; set; }     public bool HasOverlay { get; set; }      public List<ZonalMatchResult<T>> MatchResults { get; set; } }   now I want to create this class this way:              ZonalResult<PinkBoxMasksDataAbstract> zonalResult;             if (isOverlayRequired)                 zonalResult = new ZonalResult<PinkBoxMasksDataOverlay>();             else                 zonalResult  = new ZonalResult<PinkBoxMasksDataNoOverlay>();   but I get an error:     Cannot implicitly convert type   'Domain.ZonalResult<Domain.PinkBoxMasksDataOverlay>' to   'Domain.ZonalResult<Domain.PinkBoxMasksDataAbstract>'      Why it happens if PinkBoxMasksDataOverlay is subclass of PinkBoxMasksDataAbstract? How to fix?

It seems that a List object cannot be stored in a List variable in C#, and can't even be explicitly cast that way.  List<string> sl = new List<string>(); List<object> ol; ol = sl;   results in Cannot implicitly convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object>  And then...  List<string> sl = new List<string>(); List<object> ol; ol = (List<object>)sl;   results in Cannot convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object>  Of course, you can do it by pulling everything out of the string list and putting it back in one at a time, but it is a rather convoluted solution.


Here:  I posted a comment on two different answers.  It seems like my @ syntax to reference another user did not work correctly -- as I recall from previous SO behaviour.  What am I doing wrong?  (Smells like a face-palm!) Help says: To also notify a previous commenter, mention their user name: @peter or @PeterSmith will both work. I tried to search Meta about this issue, but didn't find anything.  If this question is a dupe, please kindly comment, then vote to close!

How do the comment replies (aka "pinging users") work?  Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about "pinging" another user?  Related:


Is there a possibility to assign existing nodes as translation of a node?  Cause i migrated a lot of content from a D6 instance. On D6 and D7, it was easy to assign the translation nodes but in D8 it seems not to have that possibility. I also didn't found any modules which helps.  Any advice?

In Drupal 7 (i18n) there is a possibility to select an existing node as a translation of another node.  In Drupal 8, is there also that possibility?


When a race grants a character casting 'as a third lvl sorcerer' (For example), and that caracter later takes a lvl in sorcerer- Can it now cast spells as a fourth level sorcerer? Or does it casting ability not change until it takes its fourth actual sorcerer level?

For example Lets use the Marrutact from Sandstorm, it can cast as a 5th level wizard. if it then takes a prestige class that requires the ability to cast 1st level Arcane spells and advances arcane casting such as Abjurant Champion. assuming it meets all other prerequisites does the Marrutacts spellcasting improve when it takes a level in Abjurant Champion or does it gain no benefit?


I need to convert this query from MsSql syntax to Oracle syntax: select top 1 (convert(varchar, UPDATED_DATE, 23)) as date from DA_CATEGORY order by date desc  How do I do this? I need the data from both DB types to be the same string / value.

Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select *  from sometable order by name limit 20,10  to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select *  from sometable where rownum <= 10 order by name  will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset.


A christian and a jew went into a bar....  or  A Christian and a Jew went into a bar...  The former is marked incorrect by microsoft word.

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


I am using Lubuntu 16.04 and notice that there is no Language support for Urdu - A language spoken by more than 300 million people in the world. As a result, Urdu fonts are not displayed correctly. Is there any walk around to handle this problem?

I am a new user of Ubuntu 16.04 LTS. To my surprise it does not have Urdu Language in language support widow. Kindly help.   The given answer to  is not helping me.


I could not find the section as you can open the file in a graphics mode, that is such a file 1.txt terminal displays the contents but I would love to see it with the gedit or another text editor?

When we want to open an application or file from the terminal, we type, say,  okular file.dvi   This opens the application, but also shows the status of the application. We cannot close the terminal, because it kills the process. Unfortunately, if you're trying to, for example, create a LaTeX file, you will need one tab for the text editor, one for the dvi file, and so on. And if you're trying to open all windows from the terminal, you can forget it. I'm trying use the terminal as much as possible, and while I have Yakuake, it is still a bother having so many tabs and seeing which of those have an application I've killed and so on.  So, is there a way to open an application/file from the terminal so that the status doesn't show and immediately gives the prompt so that we can use it to open more applications?


You guys know that when you play games, you can see whats happening around you right?how do you change the camera view so that your camera is on the head of the character and not behind the character?

I would like to make a camera like in most First Person Shooters - similar to GTA. This would mean that the view angle depends on the position of the mouse and the character walks forward, along the view vector.  How can this be achieved in BGE?


This  asked a similar question, but no-one appeared to know how to effect this without downloading new software. I'm primarily interested in a registry or binary hack for use with my legal copy.  My copy of Age of Empires II (Microsoft, 1999) is perfectly legal, bought about 15 years ago. Recently I installed and ran the game on my new laptop running Windows 8.1 and the game still works great!  Like most recent laptop models, there is no in-built CD ROM. You need to plug in an external USB DVD player to install software (from CD or DVD), but generally the CD ROM is not available because it is a hassle to attach to the laptop.  Whenever I try and run AoE2 without the CD, I get the error:  Please insert the correct CD-ROM, select OK and restart application

I can't seem to find anything online that would suggest I can play this game legally without a CD. Not to mention, the CD I own has a chunk of it missing (it still plays fine and installs fine), and having it on multiple computers is a hassle because of the CD always needed requirement.    Is there any way to do this? Whenever I try playing without a CD, I get this:


i have an xml file with a lots of data, but it also contains a list of ids which looks like this  <test test-id="014727"> <not-test not-test-id="11111"> <not-test not-test-id="22222"> <not-test not-test-id="3333"> <test test-id="019727"> <test test-id="013727">   So far I have searched for test-id which gives me a list of all numbers, but it doesn't filter out additional info.  Using a regex in sublime text, how can I get a list of all the numbers after test-id?  So from the example above I would have 3 lines of:   014727 019727 013727

I have a value like this:  "Foo Bar" "Another Value" something else   What regex will return the values enclosed in the quotation marks (e.g. Foo Bar and Another Value)?


I have two tables where I joined both to get the first view, after that I'd like to do GROUP_CONCAT in one column, but we don't have this function in SQL Server.  So I tried some examples here, but was unsuccessful with my SQL. Examples found always use a table to generate GROUP_CONCAT, but I didn't find any example with a SQL result.  TableA:  | CityID | MasterID | Account | +-----------------------------+ | 01 | 1234 | 1111 | | 01 | 1234 | 2222 | | 01 | 1234 | 3333 | | 02 | 1234 | 4444 |   TableB:  | Account | Item | Price | +------------------------+ |  1111   | A001 | 11,11 | |  2222   | A001 | 11,11 | |  3333   | A002 | 22,22 | |  4444   | A002 | 22,22 | |  5555   | A002 | 22,22 |   First SQL - Subselect:  SELECT *  FROM TableA, TableB WHERE TableA.AccountID = TableB.AccountID   Output:  | CityID | MasterID | Account | Account | Item | Price | +------------------------------------------------------+ | 01 | 1234 | 1111 | 1111 | A0001 | 11,11 | | 01 | 1234 | 2222 | 2222 | A0001 | 11,11 | | 01 | 1234 | 3333 | 3333 | A0002 | 22,22 | | 02 | 1234 | 4444 | 4444 | A0002 | 22,22 |   Second SQL - final view:  SELECT      MasterID, GROUP_CONCAT(Item) FROM      (SELECT *       FROM TableA, TableB      WHERE TableA.AccountID = TableB.AccountID) table01   Output:  | MasterID | Item | +-----------------+ | 1234 | A0001,A002 |

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


I'm working on a site that uses Flash. I can't seem to find a JavaScript cross-browser solution to prompt a user to enable Flash.  So far I have set up some simple JavaScript that returns a Boolean indicating whether Flash is enabled or disabled.  function isFlash() {     var hasFlash = false;     try {         hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash'));     } catch(exception) {         hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']);     }     return hasFlash; }   Based on the Boolean returned by the function, I need cross-browser solution to prompt the user to enable Flash.  Any help or advice would be appreciated.

Does anyone have an example of script that can work reliably well across IE/Firefox to detect if the browser is capable of displaying embedded flash content. I say reliably because I know its not possible 100% of the time.


pls i av a hp laptop pavillon ze 4800ea 1ghz and 1gb  ram ,mobi amd athlon xp2500+™ what kind of ubuntu can i download then how pls ansr fast.  i want to use it for; programming graphics design webdesign software enginnering online schooling.   it run window xp profesaional with a free partition space of 9.5 gb.

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


What are the difference between mass and weight? I keep getting confused in my physics class, and I am in 8th grade. Thank you in advance.

What is the difference between the weight of an object and the mass of an object?


I don't have this one. What is it suppose to be and where can I find it?

After beating the game, I still have several empty inventory spots.  I most likely missed several items in my addicted frenzy to finish the game.  What are all the items that can be found in the game? And where can they found?


I think I might anger someone recently, because in just a few seconds someone downvoted all my answers that I've ever posted on SO. Can I defend myself somehow from such behaviour?    I know it's childish to pursue reputation points, but I don't like to think that someone can actually downvote your posts just because he got mad on one of your recent comments or answers. Personal rumbling are the last thing I'd like to see on a knowledge-base website.

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I have used following code for email validation. It is running fine but i don't want to validate it when field will be empty.      var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;     var sEmail = $(this).val();      if (!filter.test(sEmail)) {         value = false;         $(this).css('border', '1px solid red');         $(this).attr('error','true');     }else{         $(this).css('border', '');         $(this).removeAttr('error');     }

Is there a regular expression to validate an email address in JavaScript?


I'm trying to set JButton ImageIcon with an image taken from a URL. This is the code I have:          try{             URL imageFile=new URL(picturePath);             carPic=ImageIO.read(imageFile);             picturePane.setIcon(new ImageIcon(carPic));//this line gives the exception         }catch(IOException e){             e.printStackTrace();         }   Where "picturePath" is the image URL.  The URLs I plan to use are just the normal ones obtained with "copy image address" and read as such: ""   Do I have to do something to the URLs to get them to work right, or is there some other problem with the code itself?

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?


In a Google search today, I came across a site completely ripping off the SharePoint SE  http://www.techques.com/question/19-23308/Creating-a-Site-collection-programmatically-throws-exception--nativehr-0x80070005--nativehr   It's a direct rip off of this question:    I filed a Google Spam report, and blocked their domain in my browser using the "Personal Blocklist (by Google)" Chrome extension  Is there somewhere I can report this to SE? Maybe their API key can be pulled?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I am writing an answer to a fairly general question ( to be specific), so I am giving a very general answer. Can I add at the end "if you want more help, please contact me for consulting" ? Is this kind of self-promotion allowed?  This is different from promoting a product, because a product is a very specific solution to the question. But promoting a service in this case is needed because the question was fairly broad and requires a whole consulting project to answer.

Twice now I've seen questions on Stack Overflow where one of my company's products might provide an answer to the question.  One was a slightly vague connection about object-relational mapping, but the other was a specific question about workshop/event management where we have a product which is almost an exact match for the questioner's needs.  Of course the questioner should take a pinch of salt with anything I say about it, but it might be useful to have the product brought to his attention as one possible solution.  What are the rules and guidelines about answering with something I worked on?


I am attempting to install a Ubuntu Server 18.04.1 guest on a Ubuntu Server 18.04.1 host using KVM. I have ubuntu-18.04.1-live-server-amd64.iso downloaded to the host.  When I run the following:  sudo virt-install -n marmoset-eugo-1 --description "Eng Undergrad Office Marmoset server" \  --os-type=Linux --os-variant=ubuntu18.04 --ram=4096 --vcpus=6 \  --disk path=/var/lib/libvirt/images/marmoset-eugo-1.img,bus=virtio,size=128,format=qcow2 \  --network bridge:br0 --graphics none \  --location /home/d24lau/Downloads/ubuntu-18.04.1-live-server-amd64.iso \  --extra-args console=ttyS0   I get the following error:  Starting install...  Retrieving file .treeinfo... | 0 B 00:00:00  Retrieving file content... | 0 B 00:00:00  Retrieving file info... | 77 B 00:00:00  ERROR Couldn't find hvm kernel for Ubuntu tree.  Domain installation does not appear to have been successful.  If it was, you can restart your domain by running:  virsh --connect qemu:///system start marmoset-eugo-1  otherwise, please restart your installation.   So then I try to use the CDROM option instead:  sudo virt-install -n marmoset-eugo-1 --description "Eng Undergrad Office Marmoset server" \  --os-type=Linux --os-variant=ubuntu18.04 --ram=4096 --vcpus=6 \  --disk path=/var/lib/libvirt/images/marmoset-eugo-1.img,bus=virtio,size=128,format=qcow2 \  --network bridge:br0 --graphics none \  --cdrom /home/d24lau/Downloads/ubuntu-18.04.1-live-server-amd64.iso   At this point, it appears that the installation has started, but I do not seem to be able to interact with the installation. I am getting the following output and the terminal waits indefinitely:  WARNING CDROM media does not print to the text console by default, so you likely will not see text install output. You might want to use --location. See the man page for examples of using --location with CDROM media    Starting install...  Allocating 'marmoset-eugo-1.img' | 128 GB 00:00:00  Connected to domain marmoset-eugo-1  Escape character is ^]   Has anyone had any experience doing this type of install before? I'm trying to do everything from the CLI and the only video tutorials I can find do this through the graphical KVM virtual manager.  Thanks,

This command:  virt-install   \    --name bla  \    --ram=1024  \    --disk path=/home/me/libvirt/images/bla.qcow2,bus=virtio,size=10  \    --location /home/me/Downloads/ubuntu-18.10-desktop-amd64.iso   Reports:  ERROR    Couldn't find hvm kernel for Ubuntu tree.   How can I fix this?  (Since there are many duplicate posts and answers with regard to this issue, I am answering it, too.)


Ok, here's the issue which is totally confusing to me:  df -h Dateisystem          Größe Benut  Verf Ben% Eingehängt auf /dev/sda2             3,8G  1,5G  2,2G  41% / /dev/sda1             122M   13M  103M  11% /boot tmpfs                1014M     0 1014M   0% /dev/shm /dev/sdb1            1016M  866M  150M  86% /srv   However:  du -hs /srv 55M     /srv   Just for information:  mount | grep srv /dev/sdb1 on /srv type xfs (rw)   The 86% gave me a warning email (which is intended) after which I deleted ~800MB of files under /srv. This was a few hours ago.  Using du, I get what I consider the correct amount of data on that partition. However, df doesn't seem to get that. Why? (This is somewhat annoying, because I still get regular warning emails based on that output.)  Not sure if that's important, but I'm on a server using CentOS release 5.11 (Final).

When I sum up the sizes of my files, I get one figure. If I run du, I get another figure. If I run du on all the files on my partition, it doesn't match what df claims is used. Why are there so many different figures for the total size of my files? Can't computers add?  Speaking of adding: when I add the “Used” and “Available” columns of df, I don't get the total figure. And that total figure is smaller than the size of my partition. And if I add up my partition sizes I don't get my disk size! What gives?


I have a laptop(hp pavillion n-series)which has got inbuilt ubuntu and now I installed windows 8 from the CD. I can no longer boot through ubuntu but can only open windows 8. I would like to access both the operating systems through my laptop. I have tried using EasyBCD2.1.2 but i cannot find ubuntu under it. plz help me out asap

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I am working right now through a book: Number Theory: A Lively Introduction with Proofs, Applications, and Stories And I cant connect 5 to $3^{3n+1}+2^{n+1}$

Prove that $5$ divides $3^{3n+1}+2^{n+1}$   I tried to prove the result by induction but I couldn't.  The result is true for $n=1$.  Suppose that the result is true for $n$ i.e $3^{3n+1}+2^{n+1}=5k$ for some $k\in \mathbb{N}$. We study the term   $$3^{3n+4}+2^{n+2}=3^{3n+1}3^3+2^{n+1}2$$  I tried to prove that that the difference is a multiple of $5$.  $$3^{3n+1}3^3+2^{n+1}2-3^{3n+1}+2^{n+1}=2(3^{3n+1}\cdot 13+2^n)$$  Therefore it's enough to prove that $3^{3n+1}\cdot 13+2^n$ is a multiple of $5$. But if I do again this method applied to this "new problem" is get something similar. I think that there exist a different method to do this using induction.


I'm living in Turkey and i planned a holiday with my wife.Our visa refused today.I went to London 2 years ago so i got visa before.I think its all about income and savings.What i must do before reapply?How can i show an evidence for my savings?Is that needed for savings?(I know that this is needed for income.)

I have applied recently for a general visitor visa to the UK to spend 10 days during Christmas with my British unmarried partner and it has been turned down.   The Entry Clearance Officer stated on his refusal notice the following:     I note that you have never previously travelled to the UK or any country with similar immigration requirements and you therefore do not have a history of travel and compliance to consider.      You have submitted an employment letter to confirm your occupation in KSA but I am required to also assess your personal, domestic and economic circumstances in determining whether you are genuine visitor travelling to the UK for the period and purpose you state.      You claim an income of SAR ........ per month which equal ........ GBP and from the evidence submitted this appears to be your sole source of income.   I note that this monthly income is reflected on your bank statements. However, the bank statement you have presented show a recent large deposit that are in excess of your stated income and inconsistent with the account history. You haven't provided evidence toward the origin of this recent deposit and in the absence of reasonable evidence I am not satisfied that these bank statements accurately reflect your personal circumstances.      In view of the above, I am not satisfied you have demonstrated that your circumstances are as you claim and therefore I am not satisfied that you're travelling to the UK for the period and purpose you stated. 41(i)and(ii).   Its true that I have deposited that sum of money right before I apply and it was a commission I received from work earlier this month.   So, could you please give me your advice on the above as I am planning to apply again soon. and how to avoid my application being refused again?


I am downloading a very large package and my internet connection isn't the fastest, so browsing the web at the same time is a pain. How can I limit the bandwidth apt-get uses?

Whenever I am downloading packages using Ubuntu Software Center (or any package manager for that matter), my Internet connection slows to an absolute crawl. In fact, most requests timeout.  Is there a way to limit the bandwidth that Software Center uses when downloading packages?


I Want to Make my Swap partition bigger, I didn't know exactly what swap was until I looked it up, So I set my swap partition as only 100 megabytes, I then learned that that is positively puny compared to what is supposed to be there for my computers specs! So I have only used about 13 out of 300 gigabytes on my main partition. So I want to shrink my my main partition and enlarge my swap partition. Here is what I have already tried, I am Using Gparted if there is a partitioning tool that you would rather me use, please suggest it, but if it will do the exact same as Gparted, I would rather just stick with it,   Open Gparted, and type in my administrator password Click on my main partition "/"  Try to shrink, But wont let me shrink or enlarge   I have also tried deleting my swap then trying to enlarge my Main just to see if it will resize, but it still wont enlarge. Please Help!!  For the people who labeled my question duplicate: The question you labeled mine as a duplicate of does not address my problem, I specifically want to know how to resize my main and add to swap, not learn how to partition all together

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


says that, in order to add Ubuntu on an existing Windows system, I must burn Ubuntu on a CD first. But CDs are becoming less common these days, so I wonder if there is a way to install Ubuntu without burning it on a CD (or a DVD, or a USB stick) - just download the ISO to my Windows machine and then somehow install it as dual boot.  In the past I have tried to use Wubi for that purpose, but this was not stable, and got stuck too many times. So now I want to create a dual-boot system.

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


While watching a World Cup game, I noticed how the extra time given at the end of the first half is usually shorter than the extra time given at the end of the second half. That led me to wonder what was the longest extra time awarded at a football game, and after some reasearch I found this Bristol City game in 2000-2001 in a , where apparently 23 minutes of extra time were added:     "When Brentford played away at Bristol City in 2000-01, there were about 23 minutes of stoppage time in the first-half alone after a broken leg, a dislocated shoulder (Bees striker Lloyd Owusu passed out from the pain and an ambulance had to be driven up to the pitch), and serious concussion caused the delay," noted Will. "In fact, two goals were scored in that first-half injury-time, with the second being clocked in the 67th minute, I believe. The fourth official had originally held up 13 minutes' stoppage time, but one of the injuries occurred in that period to bump it up to 23. I'd be surprised if there were many games that contained more added-on time!"   Is this the longest extra time ever given during a professional football game? And if it isn't, what is the longest extra time period ever given during a professional football game?

What is the longest additional time ever used in Europe's top five leagues? Please mention the details of the match.


Is a list published somewhere of which macro packages come standard with texlive? Specifically, I am considering installing the texlive package (not texlive-full) in Ubuntu. I'd like to know if certain tex packages that I need will come standard, or if they will need to be installed in addition. I realize that I could just see what I have and what I don't have after installing texlive, but    I worry that I will have somehow ended up with a package installed that I cannot rely on coming standard. For the future, if future releases of texlive have different packages that come standard, I'd like to know where to look for the list.     EDIT I don't think that suggested existing answer is answering my question. That is about having an existing texlive distribution and checking to see what was originally installed. I'm looking to know what to expect before the Ubuntu texlive package is installed. It's a subtle difference but important in my context. It might warrant a vote to close as it's more about Ubuntu than TeXLive, but I disagree that it has already been answered (at least not at ).    EDIT: I'm not interested in this for a personal installation of LaTeX. I need to know this for a separate piece of software that relies on LaTeX to produce pdfs. The installation process for this other software needs to understand what it should bring in when checking for a texlive distribution, without overdoing it or asking the person installing it to manually do anything with their texlive distribution.   I'd prefer to just have the list of these packages in a reference online somewhere and write the software to assume that no more than those standard packages are used in pdf production. I'd prefer this than to directly look at any one installation and see what it has/does not have.

OS: Ubuntu 11.10 TeX: Tex Live 2011   Using the information given at the aforementioned question, I was able to see the list of packages in my current TeX Live installation. I wanted to save the list in a file. I tried using the "Edit>>Select All" option from the terminal. But using that I am able to save only a small sub-section of it. Is there a simple addition that I can make to the "list" command with "tlmgr" to make it print the output to a file?


I am new Linux user I have been learning about Linux using it and i liked it but!! I have been getting some errors after installation the first one was that while booting Ubuntu I was asked to run fsck check manually and while I was trying to install steam i also got error of broken packages yeah i have tried many commands sudo apt-get update or sudo apt --fix-broken and many others the error was something like coping a file into another I am unable to fix it Please help?

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I am writing a document using agujournal2018.cls template. The template could be found .   I have a lengthy table inside my document which do not fit A4 page with double spacing. I want minimum possible spacing for the table without affecting the rest of the document, so it fits in a single page.   Thanks

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


I was using Arabic language in my PHP file (info.php) normal for long time But when I changed functions.php file from ANSI to UTF-8 encoding, then all my page info.php become strange characters. I downloaded the file info.php by FileZilla to see what encoding has, and the surprise is I found the whole file characters are also symbols and the encoding is UTF-8 Normal.  My database is utb8-general-ci.  Editor: UTF-8.  I'm using meta tag with UTF-8.  MySQL connect also UTF-8.  I have tried to change back functions.php to ANSI but the symbols didn't come back to Arabic.  What should I do please I have my site online. Thanks.

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.


I studied the concepts of decidability, semi-decidability and undecidability. I know the practical consequences of semi-decidability of first order logic. What i dont understand are the profound reasons for which the First Order Logic is semi-decidable. That is , why can i verify the validity of a theorem in a finite number of steps, but if the formula is not a theorem the procedure proceed to infinity ? I searched a lot in this website and i found great answers to my question ( like ), but they seem too superficial to me...

I know that First Order Logic is semi-decidable. However, if we work only with clauses is it correct to say that, due to the soundness and completeness of Resolution Principle, we achieved decidability ?


I have used SSH (via putty) to connect to a VPC and then added a folder to my path using:   export PATH=$PATH:/my/directory   This works whilst the session is open, however when I close putty then reestablish the SSH connection the changes to PATH are no longer there.  Any help understanding why this happens would be very much appreciated.

This is irritating me. I seen several suggestions (all using different files and syntax) and none of them worked.  How do I set an environment variable for a specific user? I am on debian squeeze. What is the exact syntax I should put in the file to make ABC = "123"?


Consider the following code: int rand = new Random().nextInt((30 - 20) + 1) + 20  It will return a random number between 30 and 20. However, I need its range to include negative numbers. How would I include negative numbers in the generation? I have tried using math that would be negative, but that resulted in an error. Simply subtracting or adding the negative numbers would not yield the desired value.  Sorry, I am only half awake. The correct code is int rand = new Random().nextInt((30 - 20) + 1) + 20;.

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


It seems that someone has been using my laptop running Ubuntu 14.04 through the guest session login. I will disable but I would like to know if is it there any possibility to check the date and time of all guest session logins. Is it possible to verify that?

Is it possible to see the login history, i mean to see if someone has used the computer in my absence and when he used it . if it is possible, where can i get the log ? if not, is there a program that logs all the logins and their time ?


Is there any other proof by which I can show that there is no largest prime? I saw an example where  it is proved with contradiction.(Idea is basically that of Euclid's proof)  Imagine that the largest prime prime is $13$.So, total number of primes we know are-$2,3,5,7,11,13$. Now,if I do $(2\times3\times5\times7\times11\times13)+1=30031$.So, we can see that $30031$ is not divisible by $2,3,5,7,11,13$ as they leave remainder $1$. Also,as it is formed by multiplying only primes it does not have any other composite factors.We also see that $30031=59\times 509$.Which are again two primes.Thus,$13$ is not the largest prime.  What are the other ways to prove that there is no largest prime? Thanks for any proof!!

This is just a curiosity. I have come across multiple proofs of the fact that there are infinitely many primes, some of them were quite trivial, but some others were really, really fancy. I'll show you what proofs I have and I'd like to know more because I think it's cool to see that something can be proved in so many different ways.  Proof 1 : Euclid's. If there are finitely many primes then $p_1 p_2 ... p_n + 1$ is coprime to all of these guys. This is the basic idea in most proofs : generate a number coprime to all previous primes.  Proof 2 : Consider the sequence $a_n = 2^{2^n} + 1$. We have that  $$ 2^{2^n}-1 = (2^{2^1} - 1) \prod_{m=1}^{n-1} (2^{2^m}+1), $$  so that for $m < n$, $(2^{2^m} + 1, 2^{2^n} + 1) \, | \, (2^{2^n}-1, 2^{2^n} +1) = 1$. Since we have an infinite sequence of numbers coprime in pairs, at least one prime number must divide each one of them and they are all distinct primes, thus giving an infinity of them.  Proof 3 : (Note : I particularly like this one.) Define a topology on $\mathbb Z$ in the following way : a set $\mathscr N$ of integers is said to be open if for every $n \in \mathscr N$ there is an arithmetic progression $\mathscr A$ such that $n \in \mathscr A \subseteq \mathscr N$. This can easily be proven to define a topology on $\mathbb Z$. Note that under this topology arithmetic progressions are open and closed. Supposing there are finitely many primes, notice that this means that the set $$ \mathscr U \,\,\,\, \overset{def}{=} \,\,\, \bigcup_{p} \,\, p \mathbb Z $$ should be open and closed, but by the fundamental theorem of arithmetic, its complement in $\mathbb Z$ is the set $\{ -1, 1 \}$, which is not open, thus giving a contradiction.   Proof 4 : Let $a,b$ be coprime integers and $c > 0$. There exists $x$ such that $(a+bx, c) = 1$. To see this, choose $x$ such that $a+bx \not\equiv 0 \, \mathrm{mod}$ $p_i$ for all primes $p_i$ dividing $c$. If $a \equiv 0 \, \mathrm{mod}$ $p_i$, since $a$ and $b$ are coprime, $b$ has an inverse mod $p_i$, call it $\overline{b}$. Choosing $x \equiv \overline{b} \, \mathrm{mod}$ $p_i$, you are done. If $a \not\equiv 0 \, \mathrm{mod}$ $p_i$, then choosing $x \equiv 0 \, \mathrm{mod}$ $p_i$ works fine. Find $x$ using the Chinese Remainder Theorem.   Now assuming there are finitely many primes, let $c$ be the product of all of them. Our construction generates an integer coprime to $c$, giving a contradiction to the fundamental theorem of arithmetic.  Proof 5 : Dirichlet's theorem on arithmetic progressions (just so that you not bring it up as an example...)  Do you have any other nice proofs?


i (Nepali National) have been getting connecting flight at Miami Airport to travel Cayman Islands. do i need to obtain transit visa or not?

In Europe usually you don't need to go through immigration to change planes (unless you are entering/exiting Schengen). Is it the case in the US as well? May I catch a connecting flight on one of the US airports if I don't have US visa?


I've been trying to build a function to interpret command-line inputs, then runs the appropriate function from within the script file with provided arguments. Included in this function is a escape command that closes the interaction layer. This escape command should only be activated if the user enters either 'exit' or 'end'. However, for some reason, it triggers no matter what is entered. I'm stumped. Do any of you have an idea?  verinfo () x = True while x is True:     print ('Please seperate arguments with a comma.')     inputstring = input('->')     #format input string to a standard configuration     #expected is command,arg1,arg2,arg3,arg4,arg5     procstring = inputstring.split (',')     while len(procstring) < 6:         procstring.append('')         print (procstring)     #escape clause     print (procstring[0])     if procstring[0] is 'end' or 'exit':         print ('Closing')         x = False         break     elif procstring[0] is 'help' or 'Help':         Help ()      else:         print ('command invalid. List of commands can be accessed with "help"')

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


How does one go about having a user input a sentence, and the program picking the words apart and putting each word into a vector. I've tried something like this, but it ends up stalling:  vector<string> sentence; string nextWord = "notyetdefined";  cout << "Type your sentence:" << endl; while (nextWord != "" && nextWord != "\n") {     cin >> nextWord;     sentence.push_back(nextWord); }   I've also tried detecting for a period at the end of the sentence which works, but is annoying that the user would have to put a period everytime, because they might often forget, resulting in an endless loop that I'm not sure how to deal with.  EDIT: Managed to find a fix by using this question:  that was suggested to me in the comments.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


I have the following piece of code:  private String toString(List<DrugStrength> aDrugStrengthList) {     StringBuilder str = new StringBuilder();         for (DrugStrength aDrugStrength : aDrugStrengthList) {             if (!aDrugStrength.isValidDrugDescription()) {                 aDrugStrengthList.remove(aDrugStrength);             }         }         str.append(aDrugStrengthList);         if (str.indexOf("]") != -1) {             str.insert(str.lastIndexOf("]"), "\n          " );         }     return str.toString(); }   When I try to run it, I get ConcurrentModificationException, can anyone explain why it happens, even if the code is running in same thread? And how could I avoid it?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


simply, I want to check if an Element is deleted from a list, and than do some actions after that. Here is a snippet of my code:  (...) private CollectionUtils removed;         public void subscription() {                 if (CollectionUtils.isEmpty(save)) {                 System.out.println("blabla");                 JsfUtils.addTranslatedMessageToTarget(FacesMessage.SEVERITY_INFO, null, "bla");             } else if (CollectionUtils.subtract(save, removed)){ //Check if element is deleted                 System.out.println(removed + " blablaca");             } else {                 System.out.println("blabla");             }          }   I edited and cut some code because its for a company I work for. At subtract he suggest to cast the Collection Type on "Collection", which doesnt make any sense for me. As Exception it points out an nullpointer exception.  Thanks

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


I would love to learn quantum physics and am extremely keen on it. Lets get to points.   I was extremely weak at math and physics while I was in school, but I guess it's just the way things were taught. I have read some theoretical (the literal word) on quantum physics and am really keen to do the math involved. I love reading books and that's how I've spent most of my life. It would be the greatest thing ever if you geniuses could recommend a step by step guide (books only) to becoming a quantum physicist.   I intend to learn everything involved and/or required. It would really help me and many other physics enthusiasts who currently see no other option than the conventional university education route. I am fully and completely prepared for this journey.

I'm really interested in quantum theory and would like to learn all that I can about it. I've followed a few tutorials and read a few books but none satisfied me completely. I'm looking for introductions for beginners which do not depend heavily on linear algebra or calculus, or which provide a soft introduction for the requisite mathematics as they go along.  What are good introductory guides to QM along these lines?


If I don't have the data, but only have the estimates of mean and variance of two independent Gamma distributions. What type of test I can use to test the null hypothesis μ1=μ2?

I have data from two populations of different sizes. Both have Gamma distributions with different shapes and scales (as estimated in R):  fitdistr(x/10000, "gamma") #186 members   shape 0.586219900 (0.050840587);  rate 0.012159695  (0.001564117); mean(x) 44.26789  fitdistr(y/10000, "gamma") #50 members  shape  0.491757644 (0.080661189);  rate 0.006671180 (0.001709453); mean(y) 68.15945   I want to answer the question: What is the probability that the two populations are significantly different.  By different, I am referring to the mean and not to the shape and rate of the distributions.  Does the average of y indicate that there is a significant change from the average of x?


I'm new to Pathfinder and have been familiarizing myself to the rules and mainly spellcasting for different classes. Most emphasize on spells a cleric can and cannot cast seems to be placed mainly on good vs evil alignment but as a Neutral Good cleric can I cast spells labelled as lawful or chaotic or does the same rule apply?

Is a true neutral character restricted by alignment from casting a spell that is, say lawful or chaotic, or can he/she cast a spell no matter if its affected by an alignment. (A lawful character can't cast a chaotic spell and a good character can't cast an evil spell, vice versa)


I have installed xampp (Ubuntu 16) and http://localhost shows everything is working fine. But there is no /var/www directory .

I downloaded the latest  and installed it.  But apparently, there is no /var/www folder.  Can anyone tell me the default location of the Apache's DocumentRoot directory within XAMPP installation?


There are some users who have a certain preset icon, and you can't access their profiles. For example the user that asked this question:   .  Why does this happen? Are they deleted?

Occasionally I will see a post with the author displayed like this:    The username is not clickable, but I don't know of any way to make a profile "private."  So is this just an anonymous user who only entered a name when asking the question (can you do that)?


If I have a polynomial with more than one variable, for example $\Bbb C[x,y]$ (with $\Bbb C$ the complex numbers), how can Ii see whether it is irreducible or not? For example, if I have $x^2-y^2-1$, what can I do to know whether it is irreducible or not? In this example I tried to used Eisenstein's theorem in $\Bbb C[x][z]$, but I don't know how to do it. Thanks!

How can I prove that $\mathbb{Q}[x,y]/\langle x^2+y^2-1 \rangle$ is an integral domain?  Also, I need to prove that its field of fractions is isomorphic to the field of rational functions $\mathbb{Q}(t)$?    (The question is taken from )


Evaluate $$\sum_{n,k}  \frac{1}{\binom{n}{k}}, $$ where the summation ranges over all positive integers $n,k$ with $1<k<n-1$.  Thouhgts: We are trying to evaluate $$\sum_{n=4}^{\infty} \sum_{k=2}^{n-2} \binom{n}{k}^{-1}$$ We may try to find a closed form of the inner summation which is of the form : $$ \frac{1}{ {n \choose 2} } +  \frac{1}{{n \choose 3} }+ \dotsb + \frac{1}{{n \choose n-2} }.   $$ Notice that we may write $\frac{1}{ {n \choose 2} } = \frac{2! }{n(n-1)}$ and if keep doing the same for the other terms we obtain the following: $$ \frac{ (n-2)! + (n-3)! (n-(n-2)) + (n-4)!(n-(n-2))(n-(n-3)) + \dotsb + 2! (n-3)! }{n!}, $$ which equals $$ \frac{ (n-2)! + 2!(n-3)! + 3! (n-4)! + \dotsb + (n-3)! 2! }{n!} $$ and so this equals: $$ \frac{1}{n(n-1)} + \frac{2}{n(n-1)(n-2)} + \dfrac{6}{n(n-1)(n-2)} + \dotsb + \dfrac{2}{n(n-1)(n-2) }. $$ But half of this terms are identical. Therefore, we are trying to sum up series of the form $$\sum_{n \geq k} \frac{1}{(n-1)(n-2)(n-3)\dotso(n-k)} ,$$ which can be done by a telescoping trick, but it seems very formidable. Am I approaching this problem the right way? Any hints/suggestions?

How to calculate the sum of sequence $$\frac{1}{\binom{n}{1}}+\frac{1}{\binom{n}{2}}+\frac{1}{\binom{n}{3}}+\cdots+\frac{1}{\binom{n}{n}}=？$$ How about its limit?


I have around 2M rows on my PostgreSQL table with GIST index on geo_point field but while I try to use ST_Distance or ST_DWithin it is not using the index instead it is doing Parallel Seq Indexed Field: CREATE INDEX rental_properties_geo_point_idx ON rental_properties USING gist(geo_point);  Initial Query: with ST_Distance EXPLAIN SELECT id FROM rental_properties WHERE ST_Distance(ST_Transform(rental_properties.geo_point, 26986), ST_Transform(ST_SetSRID(ST_MakePoint(-115.74181,46.394012), 4326), 26986)) / 1000 < 5 AND rental_properties.published = true  AND rental_properties.usd_price IS NOT NULL  AND rental_properties.usd_price != 0  ORDER BY distance ASC,  rental_properties.review_score DESC, rental_properties.number_of_review DESC LIMIT 12  Explain: ->  Parallel Seq Scan on rental_properties  (cost=0.00..23188911.68 rows=197196 width=1016)       Filter: (published AND (usd_price IS NOT NULL) AND (usd_price <> '0'::numeric) AND ((st_distance(st_transform(geo_point, 26986), '01010000206A6900004204EC0D715A47C1D41445CDFFE54041'::geometry) / '1000'::double precision) < '5'::double precision))  Then I converted it to ST_DWithin as per the suggestion   like below but still, it is not using the Spatial Index Converted Query: with ST_DWithin EXPLAIN SELECT id FROM rental_properties WHERE  ST_DWithin(ST_Transform(rental_properties.geo_point, 26986),             ST_Transform(ST_SetSRID(ST_MakePoint(-80.08713,26.237396), 4326), 26986), 5000::double precision) AND rental_properties.published = true  AND rental_properties.usd_price IS NOT NULL  AND rental_properties.usd_price != 0  ORDER BY ST_DWithin(ST_Transform(rental_properties.geo_point, 26986),             ST_Transform(ST_SetSRID(ST_MakePoint(-80.08713,26.237396), 4326), 26986), 5000::double precision) ASC,  rental_properties.review_score DESC, rental_properties.number_of_review DESC LIMIT 12  Explain: ->  Parallel Seq Scan on rental_properties  (cost=0.00..17763977.78 rows=59 width=1009)       Filter: (published AND (usd_price IS NOT NULL) AND (usd_price <> '0'::numeric) AND st_dwithin(st_transform(geo_point, 26986), '01010000206A690000899A6DDC3A0025C1AE1388EB44622AC1'::geometry, '5000'::double precision))  Another one suggested  to convert it from geometry to geography. So my basic question is how to do a radius search to utilize the index instead of Seq scan.

I have the following table :            Table "osm_france.france_2po_4pgr" Column     |           Type            | Modifiers  ---------------+---------------------------+----------- id            | integer                   | not null osm_id        | bigint                    |  osm_name      | character varying         |  osm_meta      | character varying         |  osm_source_id | bigint                    |  osm_target_id | bigint                    |  clazz         | integer                   |  flags         | integer                   |  source        | integer                   |  target        | integer                   |  km            | double precision          |  kmh           | integer                   |  cost          | double precision          |  reverse_cost  | double precision          |  x1            | double precision          |  y1            | double precision          |  x2            | double precision          |  y2            | double precision          |  geom_way      | geometry(LineString,4326) |  Indexes:    "pkey_france_2po_4pgr" PRIMARY KEY, btree (id)    "france_2po_4pgr_gix" gist (geom_way)    "idx_france_2po_4pgr_source" btree (source)    "idx_france_2po_4pgr_target" btree (target)   As you can see, a spatial index is available for the geom_way column. I have performed a VACUUM ANALYZE on the table for safety.  Now I run this very simple query :  select * from osm_france.france_2po_4pgr where ST_DWITHIN(St_TRANSFORM(geom_way,3035),ST_transform(ST_SetSRID(ST_MakePoint(2.3, 48.8),4326),3035),100);   So I'm looking for all the geometries within 100 meters from a given point (I transform the SRIDs from 4326 to 3035 to specify a range in meters).  The explain analyze yields :  Seq Scan on france_2po_4pgr  (cost=0.00..1630779.00 rows=69644 width=293) (actual time=35.044..9407.356 rows=3 loops=1) Filter: ((st_transform(geom_way, 3035) && '0103000020DB0B0000010000000500000046D8C5565EA84C41A950F47CDFFF454146D8C5565EA84C41A950F47C4300464146D8C556C2A84C41A950F47C4300464146D8C556C2A84C41A950F47CDFFF454146D8C5565EA84C41A950F47CDFFF4541'::geometry) AND ('0101000020DB0B000046D8C55690A84C41A950F47C11004641'::geometry && st_expand(st_transform(geom_way, 3035), 100::double precision)) AND _st_dwithin(st_transform(geom_way, 3035), '0101000020DB0B000046D8C55690A84C41A950F47C11004641'::geometry, 100::double precision)) Rows Removed by Filter: 5225288 Planning time: 0.517 ms Execution time: 9407.390 ms   Why is this query not using the available spatial index ?


Suppose $f$ is differentiable on $\Bbb R$ and $f'(x) \leq 4$ for all $x \in \Bbb R$. Prove that there is at most one $a \leq 2$ such that $f(a) = a^2$.  I'm trying to come up with a way to prove this using contradiction and MVT, but I'm not sure how. I assumed there were two such numbers on $\Bbb R$ and since differentiable implies continuous, then ...?

I am struggling to construct a simple proof of the following.  Suppose $f(x)$ is differentiable for any real value $x$ and that $f'(x) \le 4$ for all real values of x. Prove there is at most one real value $c>2$ such that $f(c) =c^2$.  I am completely lost on where to start on this proof and any help would be greatly appreciated!


I am trying to learn Android. I have some Java experience but have never seen a code block like this one:         addNumsButton.setOnClickListener(new View.OnClickListener()     {         @Override         public void onClick(View v)         {             EditText firstNumEditText = (EditText) findViewById(R.id.firstNumEditText);             EditText secNumEditText = (EditText) findViewById(R.id.secNumEditText);             TextView resultTextView = (TextView) findViewById(R.id.resultTextView);             resultTextView.setText((Integer.parseInt(firstNumEditText.getText().toString()) + Integer.parseInt(secNumEditText.getText().toString())) + "");         }     });  What is getting declared after the View.OnClickListener()? I checked that View.OnClickListener() returns type Interface. What does the code after that method is used for?

What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java?


Does time exist in space or does space exist in time?  Alternatively, perhaps both are independent existences?  Another possibility is that this question is beyond the capacities of the human mind.

I'm having a hard time understanding how changing space means changing time. In books I've read people are saying "space and time" or "" but never explain what the difference is between the two concepts or how they are related.  How are the concepts of space, time, and space-time related?


I try to install php5-fpm package but I have this information:   The following packages have unmet dependencies:   php5-fpm : Depends: php5-common (= 5.5.7+dfsg-1+sury.org~quantal+1) but 5.3.10-1ubuntu3 is to be installed  E: Unable to correct problems, you have held broken packages.   Here is full terminal output:  root@myserv /home/pw # sudo apt-get install php5-common Reading package lists... Done Building dependency tree        Reading state information... Done php5-common is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.   and:  root@myserv /home/pw # sudo apt-get install php5-fpm --fix-missing --fix-broken Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  php5-fpm : Depends: php5-common (= 5.5.7+dfsg-1+sury.org~quantal+1) but 5.3.10-1ubuntu3 is to be installed E: Unable to correct problems, you have held broken packages.   How to fix it?

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I can't figure out how to see which executable Windows 10 has associated with a file type.  Current problem: I have a Python 3 installation which I want to keep as my default Python. However, I recently had to install Python 2.7 for a project. This apparently set itself as the default program used to open Python files. I want to reset all of the file associations to Python 3. (If you are not familiar with Python: this is important because some code only works in one version.)  This is what I see in the "Set Associations" part of Control Panel:    Considering both versions are "Python" and have executables "python.exe" and "pythonw.exe", this is rather unhelpful. If I click "Change Program", I get this:    ... still unhelpful. Even better, if I click "More Apps" I get:    Same Python? Different Python? Who knows!  Clicking "Look for another app on this PC" starts in C:\Program Files\ (where neither version is located), so no hints there.  Now, I realize I can solve my current problem by clicking all the way through each file extension and setting to my Python 3 executable, but it's really bothersome that there's no indication of where the "apps" in this list are actually located. I can imagine screwing up associating a new file type in the future because I can't tell which program is which (or even security issues, considering all Windows tells you is an icon and a name..).  I'm not afraid of the registry, but the keys referenced in answers here  do not include file paths.  Is there any way to view the location of the executable currently associated with a particular file type?

Suppose I am running cmd and I open an application by typing for example start document.pdf  I want to get the exact path of the executable that opens .pdf files  Of course I could search the entire system for the executable but I suppose it would be faster this way because the path is already stored somewhere  I don't know if it makes a difference but I am using Windows 7


I live in the middle of nowhere with an M-cell. There is no pokemon near me 99% of the time. When i pop an incense, will it attract pokemon even though theres none to begin with?

When a Lure Module is used on a PokéStop, do existing pokémon in the area get drawn to the PokéStop? Or rather do new pokémon spawn within the PokéStop area of effect? Or both?  When I head to a PokéStop with a lure module, it seems Pokémon appear from nowhere, and the Pokémon listed Nearby don't get any closer. So I am guessing it only causes random spawns.  Has anyone found the lure module to actually draw existing Pokémon to your location, or only spawn new pokémon? And does an individual's incense act the same way?  For an individual's incense, this could be an important question. If I see a rare pokémon 3 'steps' away, I would want incense to actually help draw that pokémon closer to me as I search for it. Whereas if the incense only spawns new pokémon, I'd rather use incense at other times.


I'm a bit confused by the Windows Server 2016 per core licensing model. I've a server with two processors and 16 cores, which I want to use as a Hyper-V host with 5 guests.  Now I can buy  licenses for 16 cores. So it means I've licensed all cores. From each Windows Server Standard license I can get two virtualized machines. So I buy two additional licenses to cover the 5 guests?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


Setting breakpoint on shared library:  (gdb) b file.c:278  No symbol table is loaded.  Use the "file" command.  Make breakpoint pending on future shared library load? (y or [n]) y   Can I make gdb not to ask this question? (that, is, skip confirmation?)

I'm trying to automate a gdb session using the --command flag. I'm trying to set a breakpoint on a function in a shared library (the Unix equivalent of a DLL) . My cmds.gdb looks like this:  set args /home/shlomi/conf/bugs/kde/font-break.txt b IA__FcFontMatch r   However, I'm getting the following:   shlomi:~/progs/bugs-external/kde/font-breaking$ gdb --command=cmds.gdb... GNU gdb 6.8-2mdv2009.0 (Mandriva Linux release 2009.0) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later  This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Type "show copying" and "show warranty" for details. This GDB was configured as "i586-mandriva-linux-gnu"... (no debugging symbols found) Function "IA__FcFontMatch" not defined. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]    So it doesn't set the breakpoint after all. How can I make it default to answer "y" to set breakpoints on pending future shared library load?  I recall that I was able to do something, but cannot recall what.


It was an old problem. I knew how to delete files and exclude some, like this:  rm `find ~/temporary/Test\ 1 -mindepth 1 -maxdepth 1|grep -v 'A'`   but the problem is the folder 'Test 1' containing a space in name, the result of find was  /home/owner/temporary/Test 1/B   It makes rm error, how can I fix it?

I need to delete all files in a directory, but exclude some of them. For example, in a directory with the files a b c ... z, I need to delete all except for u and p. Is there an easy way to do this?


I have always problem with finding a suitable sentence to avoid a gender dependent pronoun. I know I can use "they" or "their", but if there were other options to totally omit them, I would prefer them.  For example I wrote:     The user can utilize this information to create appropriate rules to identify his items of interest.    Can I here say "the items of interest"?  Are they other options? In general?

I know that one can use "they" / "them" / "their" in place of "he" / "him" / "his" or "she" / "her" / "hers" when the subject's / direct object's gender is not known; for instance, just looking at the default user's about me section on Stack Exchange sites:     Apparently, this user prefers to keep an air of mystery about them   My question is what happens when someone wants to reference the subject using a pronoun instead.  Should the verb be conjugated accordingly to the pronoun? E.g.:     Apparently, they prefer to keep an air of mystery about them   Or should the conjugation be retained? E.g.:     Apparently, they prefers to keep an air of mystery about them   The former looks unclear because it wouldn't allow the reader / listener to understand if the writer / speaker is talking about a single person or about a group of people, however the latter sounds very weird, at least just to the non-native speaker which I am.


I was married before and had 3 children.  My wife and I got divorced and have since remarried other people. My new wife and I had a son together and my ex wife and her new husband  had a son. These two young boys will be only related by their older siblings. Is there a name for what they are? I've searched the web but cannot find a term

Here at the Genealogy and Family History Stack Exchange we see many questions about relationship mapping which is also known as:   relationship calculation kinship terminology etc   If you are just trying to understand how to calculate "cousins and removes" then  provides an excellent guide.  However, if you are seeking an English term for a more complicated relationship between two members of an extended family, rather than asking a question like:          site users are encouraged to first review the answers below.    Note: This Q&A arises from  and is set to  to help make it canonical.


I have a Specialized Carve Comp 2013, and the front brake is very squishy. The brake system is Avid Elixir 1 hydraulic disc brakes. I wanted to inquire if I need to buy a specific kit to firm up the brake lever, or if there is a simpler, less expensive solution. Please advise, thank you.

My bike has a set of Avid Elixir R hydraulic brakes. The front brake barely goes on when I pull the lever and the back brake feels pretty soft. I think I need to bleed them. How do I go about doing this?  I think the brakes got like this because I pressed the brake level when the bike was upside down or when the wheel was removed putting the bike into my car.