I have a database of healthcentres. Upon registration, I capture the healthcentre's latitude and longitude.  Now, a user comes into the website, tries to search for nearby healthcentres, I collect his latitude and longitude as well.   I want to filter the database to show only nearby centres. It shouldn't show results beyond 50km.  How can I structure this query please?

I've got a working PHP script that gets Longitude and Latitude values and then inputs them into a MySQL query. I'd like to make it solely MySQL. Here's my current PHP Code:  if ($distance != "Any" && $customer_zip != "") { //get the great circle distance      //get the origin zip code info     $zip_sql = "SELECT * FROM zip_code WHERE zip_code = '$customer_zip'";     $result = mysql_query($zip_sql);     $row = mysql_fetch_array($result);     $origin_lat = $row['lat'];     $origin_lon = $row['lon'];      //get the range     $lat_range = $distance/69.172;     $lon_range = abs($distance/(cos($details[0]) * 69.172));     $min_lat = number_format($origin_lat - $lat_range, "4", ".", "");     $max_lat = number_format($origin_lat + $lat_range, "4", ".", "");     $min_lon = number_format($origin_lon - $lon_range, "4", ".", "");     $max_lon = number_format($origin_lon + $lon_range, "4", ".", "");     $sql .= "lat BETWEEN '$min_lat' AND '$max_lat' AND lon BETWEEN '$min_lon' AND '$max_lon' AND ";     }   Does anyone know how to make this entirely MySQL? I've browsed the Internet a bit but most of the literature on it is pretty confusing.


Is there a way of doing on-chip debugging of Arduino Uno (atmega328p) with gdb on the command line? I'm looking for something simplistic and excluding IDE solutions like Eclipse and Atmel Studio. I use VIM for programming and compile my code with a cmake build system provided by .   I had a look at my options but didn't get a clear answer to what tools I would need. Would gdb alone be enough or do I need something like ?  Thank you for the help!

So, I have hooked up a ATtiny88, and am programming it with the Dragon AVR using ISP. I have also set up the build toolchain, using avrdude, and the gnu avr tools. Everything is working great.  Now I would like to do in-circuit debugging using the advertised debugwire which is also connected to the ISP and which the dragon supports. But which tools do I use? I see there is a avr-gdb, but it seems that I needs some kind of simulator, however I would like to debug in-circuit on the real MCU. Is this possible?  Thanks in advance.


Many times I like to use polar coordinates but the reference frame is always at the origin.  This is a bother when I went to draw a specific angle and radius from a location other than the origin.  I end up having to do xshift and/or yshift or the scope environment.  Is it possible to have polar coordinates work from the location I start each time; that is, it interprets the starting point as its origin.  I don't just mean for one instance though.  If I say, \draw (1,1) -- (30:1cm); and then later use \draw (-2,5) -- (60:1cm); each location will be treated as the origin when the line is drawn.  \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node at (0,0) {O}; \draw(-3,2) -- (45:1cm); \end{tikzpicture} \end{document}   From the picture, we see that the line was drawn right and down.  However, 45 degrees from (-3,2) should be up and right since my reference frame wasn't the origin here.

I can't seem to figure out the difference between + and ++ relative coordinates in TikZ.   I understand ++. ++ specifies delta coordinates that are added to the last current point, the current point is then set to the new absolute current point (correct?):  \draw (0,0) -- ++(1,0) -- ++(0,1) means:  set Current Point to (0,0) add (1,0) to Current Point = (1,0) set Current Point to (1,0) add Current Point (1,0) to (0,1) = (1,1) set Current Point to (1,1)   I can't seem to figure out that + does, when I try it out it looks like the coordinates in the +(x,y) are absolute coordinates rather than delta coordinates, but the manual says otherwise


I'm trying to implement super() per  SO answer.  I have the following class:  class Collection():     """returns a collection curser from mongodb"""       def __init__(self, db, collection_name):         self.db = db         self.collection_name = collection_name          if not hasattr(self.__class__, 'client'):             self.__class__.client = MongoClient()          self.data_base = getattr(self.client, self.db)         self.collection = getattr(self.data_base, self.collection_name)   and the following subclass:  class User(Collection):     def __init__(self, db, collection_name):         super(User, self).__init__(db, collection_name)   Calling the Collection class works fine:  agents = Collection('hkpr_restore','agents')   Calling the subclass:  user = User('hkpr_restore','agents')   I get an error:  Traceback (most recent call last):   File "main.py", line 37, in <module>     user = User('hkpr_restore','agents')   File "filepath/user.py", line 35, in __init__     super(User, self).__init__(db, collection_name) TypeError: must be type, not classobj   What am I doing wrong?

In Python 2.5, the following code raises a TypeError:  >>> class X:       def a(self):         print "a"  >>> class Y(X):       def a(self):         super(Y,self).a()         print "b"  >>> c = Y() >>> c.a() Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "<stdin>", line 3, in a TypeError: super() argument 1 must be type, not classobj   If I replace the class X with class X(object), it will work. What's the explanation for this?


I have a AF-S Nikkor 50mm 1:1.8 G lens which I use for my Nikon D3100 and D3300 cameras. Today, I noticed that the focus ring can be twisted past the infinity and 0.45m focus stops. It can be turned indefinitely without ever hitting a hard stop. The focus scale indicator stops moving and the focus elements in the lens appear to stop moving, but the focus ring can still be turned without ever stopping. Is this typical, or is my lens defective? I've only had it for about a month.

Is there a good reason why I can turn the focusing ring on my lenses beyond infinity mark on focusing scale? Following recent questions about focusing in the dark ( and ), it sounds like a real usability issue.  When I'm focusing manually, I only care about the infinity mark on my focusing scale, but there is around 5-10mm of room (depending on the lens) beyond infinity mark. Why is it there?


Find: $\displaystyle \lim_{x\to -\infty} \dfrac{\ln (1+e^x)}{x}$ (no L'Hospital)   I'm getting a hard time solving this limit. The book shows 1 as the answer, Wolfram Alpha shows 0.   I could solve easily another problem when the denominator was $e^x$ but got stuck on this one.   No L'Hospital rule can be used.  Hints and full answers are appreciated. Sorry if this is a duplicate.

Show that $$\lim_{x \to \infty} \frac{\log(1 + e^x)}{x} = 1$$ How do I prove this? Or how do we get this result? Here $\log$ is the natural logarithm.


The code in Java:  private BiNode root = null;  //constructor BST(int[] r) {     BiNode s = new BiNode(r[0], null, null);     test(root, s); }  private  void test(BiNode head, BiNode s){     head = s;      if (head != null)         System.out.println("head is not null");     if (root == null)         System.out.println("root is null"); }   Output:  head is not null root is null   Why does root not equal head in the test method?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Let $f:\overline{B(0,1)}\subset \mathbb{C}\rightarrow \mathbb{C}$ be holomorphic in the closed unit disc $\overline{B(0,1)}$, i.e. there exists holomorphic function $g$ such that $g|_{\overline{B(0,1)}}=f$, if $f$ is not constant, and  there exists $z_0$ such that $$|f(z_0)|=\max_{z\in \overline{B(0,1)}} |f(z)| $$ then by maximal modulus principle $|z_0|=1$, my problem is if we can prove $f'(z_0)\neq 0$. Any help will be appreciated:)

The question is  Let $f $ be analytical and not constant in $\{z\in\mathbb C:|z|\leq 1\}$. If there is some $z_0\in \{|z|\leq 1\}$ such that $$|f(z_0)|=\max_{|z|\leq 1} |f(z)|\,,$$ then there must be $|z_0|=1 $ and $f’(z_0)\neq 0$.  The first part is just the maximum principle, but for the derivative, I have no idea how solve it. Looking forward to some hints or answers, thank you.


From his first appearance its patently obvious that Dr. Zoidberg has no knowledge of human (or robot) anatomy. But his willingness to diagnose humans with Decapodian diseases shows he has some knowledge of Decapodian anatomy.  But has he ever been shown as a competent doctor of Decapods, or is he an al around terrible doctor?

In "The Tip of the Zoidberg" we see a fairly well adjusted Zoidberg get his head crushed by the Yeti. Was the Yeti injury the cause of his incompetence?


I have heard some claim that Jar-Jar Binks was responsible for the creation of the Empire. If so, how, and was he the sole reason, or were there other elements?

I'm not asking about just an in-universe explanation.  I'm talking about from the point of view of a writer or of someone analyzing a film or written story.  I recently re-watched all six Star Wars movies and the only actual act Jar-Jar performed was when he filled in for Padme in the Senate and supported giving emergency powers to Palpatine.  This isn't an action that had to come only from Jar-Jar.  Any of a number of Senators could have been bribed or blackmailed into doing this.  He does not work effectively as a foil to other characters since he is too extreme and doesn't really contrast directly with anyone.  (And if he's a foil for the Jedi, then having Qui-Gon act as his foil by grabbing his tongue really breaks that possibility up.)  I know he's the most reviled character in Star Wars, so I don't want to get into hate speeches or anything.  I just want to know: Does the character of Jar-Jar Binks serve any actual purpose in Star Wars?


We have three points $P=(2,3)$, $Q=(4,-2)$ and $R=(\alpha,0)$. We need to find the value of $\alpha$ such that:    Part 1: $|PR+QR|$ is maximized.  Part 2: $|PR-QR|$ is minimized.  I was given the solution for both. I have understood the solution for case 1 but not for case 2.  Case 1's solution :    Case 2's Solution:   I have understood case 1 completely but in case 2 why was there a need to take the image of point Q? I fail to understand this.

We have three points $P=(2,3)$, $Q=(4,-2)$ and $R=(\alpha,0)$. We need to find the value of $\alpha$ such that:    Part 1: $|PR+QR|$ is maximized.  Part 2: $|PR-QR|$ is minimized.  I have  the solution for both. I have understood the solution for case 1 but not for case 2.  Case 1's solution :    Case 2's Solution:   I have understood case 1 completely but in case 2 why was there a need to take the image of point Q? I fail to understand this.


trying to use finnish language package. But this code only lets me use english. I get "Package babel Error: You haven't loaded the language english yet." error if i try to change  \usepackage[english]{babel}   to   \usepackage[finnish]{babel}   my code currently ( I use a template..)  \documentclass[paper=a4, finnish,fontsize=11pt]{scrartcl} % A4 paper and 11pt font size  \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs \usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to         return to the LaTeX default \usepackage[english]{babel} %\usepackage[finnish]{babel} % English language/hyphenation \usepackage{amsmath,amsfonts,amsthm} % Math packages   \usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template  \usepackage{sectsty} % Allows customizing section commands \allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the     default font and small caps  \usepackage{fancyhdr} % Custom headers and footers \pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers   and footers \fancyhead{} % No page header - if you want one, create it in the same way as the footers below \fancyfoot[L]{} % Empty left footer \fancyfoot[C]{} % Empty center footer \fancyfoot[R]{\thepage} % Page numbering for right footer \renewcommand{\headrulewidth}{0pt} % Remove header underlines \renewcommand{\footrulewidth}{0pt} % Remove footer underlines \setlength{\headheight}{13.6pt} % Customize the height of the header  \numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1,   2.2 instead of 1, 2, 3, 4) \numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4) \numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)  \setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text

I've been trying to change the language of my LaTeX document by replacing \usepackage[swedish]{babel} with \usepackage[english]{babel} but I only get this message:  ! Package babel Error: You haven't loaded the option swedish yet.   I've read in an other question at this forum that compiling enough would solve the problem, but that doesn't work for me. Does anyone know what I should do?


I am using Keras RNN Cell to perform parts of speech tagging. The architecture is as follows(I cannot put the code because of privacy reasons) :    An embedding layer of of 40 units of shape (batch_Size, max_sentence_length, 40) tf.keras.layers.SimpleRNNCell(state_size=number_of_tags_in_dataset+20, dropout=0.2,recurrent_dropout=0.0, activation='tanh')  tf.contrib.layers.fully_connected(units=state_size) tf.contrib.layers.dropout(keep_prob=0.6) tf.contrib.layers.fully_connected(units=number_of_tags) tf.keras.layers.BatchNormalization() tf.keras.activations.relu() Using tf.contrib.seq2seq.sequence_loss() with AdamOptimizer and gradient clipping of 0.5 batch_size=32, learn_rate=0.01   The result for ~14 epochs are as follows (due to resource constraint, thats the maximum number of epochs I can run for)  accuracy 0.0172309  accuracy 0.800888  accuracy 0.866243  accuracy 0.893743  accuracy 0.896006  accuracy 0.901575  accuracy 0.899487  accuracy 0.898529  accuracy 0.900531  accuracy 0.902532  accuracy 0.899051  accuracy 0.903055  accuracy 0.901053  accuracy 0.898703  accuracy 0.898703   I have noticed this trend where no matter what hyperparameter changes I make, the accuracy is getting stuck around 89-90%. Can you provide some suggestions to boost the accuracy? I am fairly new to Deep Learning so I have been struggling a lot to optimize my model. I have also tried building Bidirectional LSTMs for the same but they are too slow for the resource constraint and the maximum accuracy that I can achieve there is around 92%.

Imagine a standard machine-learning scenario:     You are confronted with a large multivariate dataset and you have a   pretty blurry understanding of it. What you need to do is to make   predictions about some variable based on what you have. As usual, you   clean the data, look at descriptive statistics, run some models,   cross-validate them etc., but after several attempts, going back and   forth and trying multiple models nothing seems to work and your   results are miserable. You can spend hours, days, or weeks on such a   problem...   The question is: when to stop? How do you know that your data actually is hopeless and all the fancy models wouldn't do you any more good than predicting the average outcome for all cases or some other trivial solution?  Of course, this is a forecastability issue, but as far as I know, it is hard to assess forecastability for multivariate data before trying something on it. Or am I wrong?   Disclaimer: this question was inspired by this one  that did not attract much attention. It would be nice to have detailed answer to such question for reference.


If you have 7 white socks and 9 black socks in a drawer, how many socks do  you have to pull out blindly in order to ensure that you have a matching pair ?

So in my discrete math class, we all know that if the drawer has 2 different colored socks, you need to pull out 3 socks to ensure a pair.   However, I am puzzled after there are more different colored socks and more pairs of socks.  For example, if there are 3 different colored socks in the drawer and I need to draw out 50 pairs, at least how many socks do I need to draw out to ensure that I have 50 pairs of sock?  How about if there are M different colored socks in the drawer and I need to draw out N pairs, at least how many socks do I need to draw out to ensure that I have N pairs of sock?  Are there any general formulas for these types of problem? Or are there any rules for this type of question?


I'm learning Python, in the code below: # Use list comprehension and enumerate to pair guests to new times guest_arrivals = [(names[i],time) for i,time in enumerate(new_times)]  # Map the welcome_guest function to each (guest,time) pair welcome_map = map(welcome_guest, guest_arrivals) guest_welcomes = [*welcome_map] #print(guest_welcomes)  print(*guest_welcomes, sep='\n')  In the third and the last line, it uses *, could someone tell me what is this star symbol used for here? Thanks.

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


I anticipate a lot of scepticism about my question, but I've written a short paper which identifies and corrects what I believe to be a flaw in the way an age old Newtonian problem is taught in physics. I'm not a student nor an academic, so can't use the services of an established University. So how do lay people like me get a technical paper taken seriously and reviewed by my peers ?.

I am interested in the situation where you have a very interesting result. For instance, you have solved a very important open problem. However, you are not known in the field and do not have any remarkable publications. Your supervisor thinks the work is good and you submit the work to a high profile journal, but you get rejected.  The thing is that the contribution is very strong. It breaks what most people believe or what they have already proven: e.g., you solve the P vs. NP problem or any other well known open problem.   The reviewers strongly reject your work with no justification and they do not state why the result is wrong. Examples of reviewer comments include:   "The proof must be wrong."  "You cannot achieve such a result."  "You do not understand well the notion of ..."   My question is what to do in this situation? Where to go? If your advisor accepts the work, but the reviewers from the top journal reject the work without even explaining the mistakes,  what should you do?


I'm using Lyx and I need to type this system of these two questions. The problem is that I know almost nothing of TeX so I use a script a friend of mine wrote for me:  \begin{cases} \frac{y}{x+y}-0.34=\frac{y}{x+y+3}\\ \frac{y}{x+y}-0.17=\frac{y}{x+y+1} \end{cases}   Problem: what I don't like about that script and its outcome is that the equations inside the curly bracket get smaller if you compare them with the first two equations in the screenshot.     What I want: I want to have the equations inside the curly bracket to be the same size as the first two ones in the screenshot. I guess for that I need a bigger curly bracket or some other magic which I do not possess. How can I do that?

I would like to write something like the definition of a gradient operator in cartesian coordinates.  \usepackage{amsmath} \begin{equation}     \nabla \Phi =     \begin{pmatrix}         \frac{\partial \Phi}{\partial x} \\         \frac{\partial \Phi}{\partial y} \\         \frac{\partial \Phi}{\partial z} \\     \end{pmatrix} \end{equation}   The fractions are rendered small, as when they are rendered inline, but I don't like it in that particular instance.  I knew this would happen since it is documented there:   Even if I increase the spacing by adding [0.5em] after the double-backslash, it still doesn't look very good.  I have a lot of space so I'd like the content of the matrix not to squeeze itself.  How can I make the content of a matrix using its normal size and not its inline size?


If $A$ is a $ \displaystyle  10 \times 10 $ matrix such that $A^{3} = 0$ but $A^{2}  \neq 0$ (so A is nilpotent) then I know that $A$ is not invertible, but why does at least one eigenvalue of $A$ have to be equal to zero? How would one show that all eigenvalues of $A$ are equal to zero?

I need to prove that:      if a linear operator $\phi : V \rightarrow V$ on a vector space is nilpotent, then its only eigenvalue is $0$.   I know how to prove that this for a nilpotent matrix, but I'm not sure in the case of an operator. How would I be able to relate $\phi$ to a matrix?  Note: A nilpotent operator $\phi$ has been defined as an operator that satisfies $\phi^{n} = 0$ for some $n \geq 1$.


Let $p(x)$ be a cubic (i.e. degree $3$) polynomial with   rational coefficients. Suppose $p(x)$ has a root of the   form $a + ib$, where $a, b$ are rational,      Prove that $a-ib$ is also a root of $p(x)$, and that $p(x)$ must also have a rational root.   My Attempts:  By assumption, we have: \begin{align} p(a + ib) &=c_3(a + ib)^3+c_2(a + ib)^2+c_1(a + ib)+c_0\\ &=a^3 c_3  + 3 i a^2 b c_3  + a^2 c_2  + 2 i a b c_2  + a c_1 + i b c_1  - 3 a b^2 c_3  - i b^3 c_3  - b^2 c_2  + c_0\\ &=0 \end{align} This implies: $$ c_0= - a^3 c_3  - 3 i a^2 b c_3  - a^2 c_2  - 2 i a b c_2  - a c_1 - i b c_1  + 3 a b^2 c_3  + i b^3 c_3  + b^2 c_2$$ Then for $p(a - ib)$ we have: \begin{align} p(a - ib) &=c_3(a - ib)^3+c_2(a - ib)^2+c_1(a - ib)+c_0\\ &= a^3 c_3  + a^2 c_2  + a c_1  + i b^3 c_3 - 3 i a^2 b c_3   - 3 a b^2 c_3  - b^2 c_2 - i b c_1 - 2 i a b c_2 \\ &- a^3 c_3  - a^2 c_2  - a c_1 + i b^3 c_3 - 3 i a^2 b c_3 + 3 a b^2 c_3  + b^2 c_2 - i b c_1   - 2 i a b c_2  \\ &=- 6 i a^2 b c_3+ 2i b^3 c_3- 2i b c_1- 4 i a b c_2 \\ \end{align}  I think this isn't a good approache, and I'm stucked now, that didn't give $p(a - ib)=0$ $\dots$ how do I prove this $?$  Any help or hint or suggestion would be appreciated.

If an polynomial has a complex root, is it necessary that the conjugate of that root is also a root of the polynomial? I am not sure about this. Please comment on this.


Let $A=${$m+n\sqrt 2:m,n\in \mathbb Z$},then-      $(1)A$ is dense in $\mathbb R$.      $(2)A$ has only countable many limit points in $\mathbb R$.      $(3)A$ has no limit points  in $\mathbb R$.      $(4)$only irrational numbers can be the limit points of $A$.   $A=${$..,...,-3-3\sqrt 2-2-2\sqrt 2,-1-\sqrt 2,0,1+\sqrt 2,2+2\sqrt 2,3+3\sqrt 2,4+4\sqrt 2,...,...$}  Argument for (1) taking $x=\frac{1}{2}(3+3\sqrt 2)\in\mathbb R-\mathbb A$ taking $\delta=\frac{1}{4}(3+3\sqrt 2)$,then $(x-\delta,x+\delta)\cap A =\phi$.Hence $A$ is not dense in $\mathbb R$  Argument for (2).Since $A$ is not dense in $\mathbb R,$i.e $\bar A\neq \mathbb R,$it means $\bar A $ is either $\mathbb Q$ or $\mathbb Q^c$ or $\emptyset$(please check this point!!!) .Now let us take $q\in \mathbb Q$ and taking $\delta =\frac{1}{4}(m+(n-1)\sqrt 2)$,then $(q-\delta,q+\delta)\cap A=\phi$.Hence $\bar A\neq \mathbb Q$.Hence,$A$ does not have countable many limit points in $\mathbb R$  Argument for (4) taking $x=\frac{1}{2}(3+3\sqrt 2)\in\mathbb Q^c$ taking $\delta=\frac{1}{4}(3+3\sqrt 2)$,then $(x-\delta,x+\delta)\cap A =\emptyset$.Hence,only irrational numbers cannot be the limit points of $A$     Hence the only possibiliy left is $\emptyset$.So, $A$ has no limit   points,making option  (3) true.   Please check my arguments,whether they are correct or not?  Also,please suggest if some improvements can be made  in above arguments  My question is not duplicate of any question.In the suggested duplicate,the proof is given,but i don't want the proof of this,i just want to clarify my concept via this problem regarding limit points,i just wanted to check my arguments,whether they are correct or not...

I am having trouble proving the statement:     Let $$S = \{m + n\sqrt 2 : m, n \in\mathbb Z\}$$ Prove that for every $\epsilon > 0$, the intersection of $S$ and $(0, \epsilon)$ is nonempty.


I have to travel to London later this month. But I just got my passport renewed and so the passport which contains my visa is now canceled. I have all the old passports and my existing fresh one too. So is it a problem if my existing visa is on a canceled passport? What do I need to do?

I am in Nigeria, my passport will expire in 4 months and I have a document to apply for a UK visiting Visa with that passport number.  Should I use it like that or go for another passport. If I choose to get another passport, how will I use it because of the passport number on the about to expired one in the document I want to use for Visa.


In my textbook they have explained the  using the example where you cannot measure the position of the electron using the photon because the wavelength of the photon needs to be small which then causes it to have high energy which would knock off the electron by collision. So my first question is isn't this the observer effect?  My second question is, if I were to measure the position (the point with highest probability) how does that cause an increase in the uncertainty in momentum? How does that work?

In many physics divulgation books I've read, this seems to be a commonly accepted point of view (I'm making this quote up, as I don't remember the exact words, but this should give you an idea):      is not a result of our lack of proper measurement tools. The fact that we can't precisely know both the position and momentum of an elementary particle is, indeed, a property of the particle itself. It is an intrinsic property of the Universe we live in.   Then this video came out:  (skip to , if you're already familiar with the uncertainty principle).  So, correct me if I'm wrong, what we may claim according to the video is:     the only way to measure an elementary particle is to make it interact with another elementary particle: it is therefore incorrect to say that an elementary particle doesn't have a well defined momentum/position before we make our measurement. We cannot access this data (momentum/position) without changing it, therefore it is correct to say that our ignorance about this data is not an intrinsic property of the Universe (but, rather, an important limit of how we can measure it).   Please tell me how can both of the highlighted paragraphs be true or how they should be corrected.


I'm new to Linux and programming. My problem is the following: I have a file listing 3 columns. I want to swap the first and the last column, print it to prompt AND to a new file in one line. So I swapped the columns and printed it to prompt OR to a file. $ awk -F, ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=,  liste.csv This is my base line to print it to prompt. But it seems impossible to print it to a new file in the same command line. Does anyone have the idea? Here are some examples that didn't work: $ awk -F, ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=,  liste.csv | >liste2.csv $ printf "$(sudo awk -F, ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=,  liste.csv > liste2.csv)"  $ cat $(sudo awk -F, ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=,  liste.csv > liste2.csv) I think you catch the drift of what I ask. Thanks!

In bash, calling foo would display any output from that command on the stdout.  Calling foo > output would redirect any output from that command to the file specified (in this case 'output').  Is there a way to redirect output to a file and have it display on stdout?


I'd like some hints for the problem:  Show that the following set is not algebraic: $$ \{ (\cos(t),\sin(t),t) \in \mathbb{A}^3 : t \in \mathbb{R} \} $$  Thanks.

I want to prove that the set $\{(\cos(t),\sin(t),t)\in A^3(\mathbb R); t\in \mathbb R \}$ is not an algebraic set.   I already proved that the set $\{(\sin(t),t)\in A^2(\mathbb R);t\in \mathbb R \}$ is not algebraic but the method that I used doesn't seems to be general.


super beginner here, so please bear with me. I am writing this program to print Fibonacci series. What I want is the result to display the series with prefix like F0 = 0, F1 = 1, F2 = 1, F3 = 2 and so on. Some others who faced this problem were not using parenthesis in the println statement, but I am using them, still getting a wrong display.  I wrote the following program:  public void run () { int firstNo = 0;  int secondNo = 1;  int n = 0;  println ("F"+(n)+ "= " + firstNo );// FIRST LINE  println ("F" +(n++)+ "= " + secondNo);// SECOND LINE  for (int i =0; i <7; i++) { firstNo += secondNo; println ("F"+(n++)+ "= " + firstNo ); secondNo +=firstNo; println ("F" + (n++) + "= " + secondNo); }}   The display I am getting is F0 = 0, F0 = 1, F1 = 1, F2 = 2 and so on  However if I cahnge the SECOND LINE from n++ to n=n+1 the display I get is F0 = 0, F1 = 1, F1 = 1, F2 = 2 etc  Q1 : Why am I not able to get the suffix of F in sequence? Am I doing something wrong in adding 1 to integer n within the println statement?  Q2 : Isn't n++ the same as n = n+1? Then why am I getting this difference in the display?

Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing?


I have this method that calculates some statistics: public void calculateAverage(int hour){      if (hour != 20) {         int data =0;          int times = 0;         for (CallQueue cq : queues) {             data += cq.getCallsByTime().get(hour);             times++;         }                averageData.add((double)data/times);         calculateAverage(hour + 1);     }      }  Now I am very proud that I have created a recursive method but I know that this could have been solved with a loop. My question is: is it better to solve these kind of problems recursive or with a loop?

I love recursion. I think it simplifies things a lot. Another may disagree; I think it also makes the code a lot easier to read. However, I've noticed that recursion is not used as much in languages such C# as they are in LISP (which by the way is my favorite language because of the recursion).   Does anybody know if there is any good reasons not use recursion in the languages such as C#? Is it more expensive than iteration?


I'm trying to find the sum of $$\sum_{n=0}^∞ \frac{(3n)}{4^n}(-1)^n$$ So far I've tried finding the nth partial sum and finding the sum through the geometric series equation k/(1-r) to no avail.

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


Is there an open source alternative to TeamViewer? The issue is having the remote placed device initiate a connection so that the help desk can manage the device.  I am looking to create a facility for remote management on devices we deploy which are BEHIND a firewall).  I understand that the SSH protocol supports X11 forwarding, but if I am going to deploy 10+ devices behind a firewall, how would I connect to the correct device to manage it?

I have an Ubuntu server running on EC2 (which I didn't install myself, just picked up an AMI). So far I'm using putty to work with it, but I am wondering how to work on it with GUI tools (I'm not familiar with Linux UI tools, but I want to learn). Silly me, I'm missing the convenience of Windows Explorer.  I currently have only Windows at home. How do I set up GUI tools to work with a remote server? Should I even do this, or should I stick to the command line? Do the answers change if I have a local linux machine to play with?


I was playing a good old one-off campaign tonight, and will be playing the same character through adventure league. I was playing a half-elf sorcerer, and my charisma modifier came into effect. I had rolled my stats, in the way it describes in the second chapter of the 5e handbook, and had gotten lucky with a 17. Half-elf adds two to that (19) and my proficiency bonus made it out to be +6. My DM told me promptly that there was no rolling involved with stats, and that it should be a +5.  This bugged me, so I stared at the page for 5-6 minutes, trying to find the lie. It says something along the lines of roll 4d6, and don't count the lowest number, and then rinse and repeat for 5 more numbers, and those are your stats.  Is this system still legal in adventure league?

With Hoard of the Dragon Queen releasing as the first part of the Tyranny of the Dragons storyline I was wondering what guidelines and rules exist for players looking to create and run characters for organized play.


I'm trying to extract product categories from a csv file. The categories are hierarchical, but in string form like this: Parent,Child,Grandchild.   Each row in the csv file is a product, and the categories are repeated for every product.  I'm working with PHP 7.2, MySQL 5.7 and Laravel 5.8.  I don't even know where to start. I'm usually good at hacking something together that works, and then continuing working on it until it's looking good. But this time I'm kind of stumped.     So, to summarize:  I would like to loop through strings like these:   Parent,Child Parent,Child,Grandchild Parent,Other Child,Other Grandchild Other Parent,Different Child,Different Grandchild   And get this organized into my MySQL database:  | id | parent_id | title                |  | 1  | null      | Parent               | | 2  | 1         | Child                | | 3  | 2         | Grandchild           | | 4  | 1         | Other Child          | | 5  | 4         | Other Grandchild     | | 6  | null      | Other Parent         | | 7  | 6         | Different Child      | | 8  | 7         | Different Grandchild |   Duplicates (by title) should just be merged, but not if they have a different parent.  Maybe there's some better way to organize it in the database to make this easier? I'm open to suggestions if you have any. Thanks in advance.

Assume you have a flat table that stores an ordered tree hierarchy:  Id   Name         ParentId   Order  1   'Node 1'            0      10  2   'Node 1.1'          1      10  3   'Node 2'            0      20  4   'Node 1.1.1'        2      10  5   'Node 2.1'          3      10  6   'Node 1.2'          1      20   Here's a diagram, where we have [id] Name.  Root node 0 is fictional.                          [0] ROOT                           /    \                [1] Node 1          [3] Node 2               /       \                   \     [2] Node 1.1     [6] Node 1.2      [5] Node 2.1           /            [4] Node 1.1.1   What minimalistic approach would you use to output that to HTML (or text, for that matter) as a correctly ordered, correctly indented tree?   Assume further you only have basic data structures (arrays and hashmaps), no fancy objects with parent/children references, no ORM, no framework, just your two hands. The table is represented as a result set, which can be accessed randomly.   Pseudo code or plain English is okay, this is purely a conceptional question.  Bonus question: Is there a fundamentally better way to store a tree structure like this in a RDBMS?    EDITS AND ADDITIONS  To answer one commenter's ('s) question: A root node is not necessary, because it is never going to be displayed anyway. ParentId = 0 is the convention to express "these are top level". The Order column defines how nodes with the same parent are going to be sorted.  The "result set" I spoke of can be pictured as an array of hashmaps (to stay in that terminology). For my example was meant to be already there. Some answers go the extra mile and construct it first, but thats okay.  The tree can be arbitrarily deep. Each node can have N children. I did not exactly have a "millions of entries" tree in mind, though.  Don't mistake my choice of node naming ('Node 1.1.1') for something to rely on. The nodes could equally well be called 'Frank' or 'Bob', no naming structure is implied, this was merely to make it readable.  I have posted my own solution so you guys can pull it to pieces.


How would I prove this statement? I know that it's a finite series. I don't know how to approach this at all.  $$\sum_{i=1}^N i^3 = \left(\sum_{i=1}^N i \right)^2$$

I recently proved that  $$\sum_{k=1}^n k^3 = \left(\sum_{k=1}^n k \right)^2$$  using mathematical induction.  I'm interested if there's an intuitive explanation, or even a combinatorial interpretation of this property. I would also like to see any other proofs.


I want to reference the following white paper:   @ONLINE{TegraX1,     author = {NVIDIA Corporation},     title = {NVIDIA Tegra X1 NVIDIA'S New Mobile Supechip},     month = Jan.,        year = {2015},     url = {http://www.nvidia.com/content/PDF/tegra_white_papers/tegra-K1-whitepaper.pdf} }   However this paper does not have any information about a certain author, it is more like the company behinds it. Thus, I do not know how to give the author properly, or if this is even the correct format. Furthermore, this iwll only show "Corperation" in the pdf where sourced, where it would be nicer to have a more valuable short like Nvidia Coop or sth like this.

I want to list a company name in the author field of a bibliographic entry:  @book{CUDA,   author    = {NVIDIA Corporation},   title     = {NVIDIA CUDA Compute Unified Device Architecture Programming Guide},   publisher = {NVIDIA Corporation},   year      = {2007} }   But the entry keeps showing up "N. Corporation".  Is there a way to get the full author name to show up?  I'm currently using the siam BibTEX style.


I need to demonstrate $(s \to p) \lor (t \to q) \vdash (s \to q) \lor (t \to p)$ I know that, if I can do something like the following, I can succesfully demonstrate the validity of this logical sentence. However, I have no idea how to get from $s \to p$ to $s \to q$.  $(s \to p) \lor (t \to q)$ (Promise) $s \to p \ \ \ \ \ \ \ \ \ $ (Assumption) ... $s \to q$ $(s \to q) \lor (t \to p)$  and then  $t \to q \ \ \ \ \ \ \ \ \ $ (Assumption) ... $t \to p$ $(s \to q) \lor (t \to p)$  Any hint is very well appreciated. Thanks.

$(s \to p) \lor (t \to q) \vdash (s \to q) \lor (t \to p)$ This has been giving me a terrible headache. I have no idea how to go about proving this. I'm not asking for a complete solution, I just need some pointers to prove this with natural deduction...


I wanted to recreate something like this:    And then I would use it for social medias and external sites :) This is what I could come up with:    As you can see, there are two problems here:   The picture doesn't fit the div. The text isn't in the middle.    I thought if I could align the text to the center, the picture would automatically fit as well, but I can't seem to be able to do it.   Here's the code I wrote:    .child {   height: 250px;   margin: 20px; }  .external-links {   display: table-cell;   background: #ccc;   vertical-align: middle;   text-align: center;   border-radius: 32px;   color: black;   text-decoration: none;   padding: 1px; }
             github                twitter                stackoverflow
     I thought the two lines of vertical-align: middle; & text-align: center; would center the text, but it doesn't.

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


I'm trying to create a pagination system in PHP. However, my products are loaded from exact so I can't use SQL. What i was thinking is that i would have to put all the items in an array, count that and then create the pagination system. The pagination system isn't the problem, but i can't seem to find a way to count my items properly using the above stated method.  Do note that exact only gives 60 results, so i had to create something that it retrieves all the results which i implemented in the code below.  My current code:          echo "
";     $offset = 0;     $run=true;     $search="";     $row_count = 0;              while($run== true){             $glas = getGLAccounts($search,$offset);             $count2 = 0;             $offset=$offset+30;              foreach($glas as $gla){               $row_count++;                 if ($row_count==1)           echo "
";           echo( "
".           "
".           "".$gla['Code']."
           ".$gla['Description']."
           &euro;".$gla['CostPriceStandard']."
           Toevoegen	"           );                 $count2=$count2+1;               if ($row_count==3) {           echo "
";           $row_count=0;               }             }             if($count2<30) {           $run=false;         }         }         if ($row_count>0) {       echo "
";     }     echo "
";   $glas gets all the items but when i count glas. It counts 60 items, but keeps putting 60 on my screen which is probably because i count in a while loop. In the foreach loop it puts a bunch of 1s.  Now my question is, what is the proper way to put my items in an array and count them? And where to put it?

I've got a script that dynamically calls and displays images from a directory, what would be the best way to paginate this?  I'd like to be able to control the number of images that are displayed per page through a variable within the script.  I'm thinking of using URL varriables (ie - ) but am unsure how to go about this.  Thanks for the help.


I am trying to run a one way ANOVA on some data. One factor, 4 levels. I only have mean, SD, and sample sizes to work with. Is there a way to do this in R?

This is probably a silly question, but how can I run ANOVA using only the mean, standard deviation, and the sample size?  i.e.  Group  mean    sd    n  1:    200      5    5    2:    100     22    5  3:    150     14    5   I am using Statsoft Statistica software.  I know how to run it using the spreadsheet with all the data, but I have never done this using only the information listed above.  Any information would be greatly appreciated.


Let R be a commutative ring with identity, and I,J its two ideals. One book says that $Spec (R/I \otimes R/J)=Spec(R/(I+J)) $. But I just cannot verify it. Is $R/I \otimes R/J=R/(I+J) $ right? I cannot get it. Or is there some other way to prove this result?

Let $R$ be a commutative ring with identity and $I$ and $J$ be ideals in $R$.     Show that $R/I\otimes_R R/J\cong R/(I+J)$ as $R$-modules.   This is what I tried.  Define a map $f:R/I\times R/J\to R/(I+J)$ as $f(\bar r, \bar s)=rs+(I+J)$. This is a well-defined bilinear map.  By the universal property of tensor products, we get an $R$-linear map $F:R/I\otimes_R R/J\to R/(I+J)$ which sends $\bar r\otimes \bar s$ to $rs+(I+J)$.  This map is surjective.  So all we need to show is that the kernel of $F$ is $0$.  But I am unable to do this.


This is old news ...but I am having trouble understanding why some of Alanis Morisette's examples from her song 'Ironic' are not ironic.  For example: "An old man turned ninety-eight.  He won the lottery and died the next day."  In this case, isn't there an incongruity between what he expected and what happened? He was hoping to win the lottery his whole life...but when he finally did, he ended up dying. Isn't there an outcome in this case that was opposite to what was expected?  Another example: "It's meeting the man of my dreams and then meeting his beautiful wife."  Isn't this ironic because she tries hard to find the right guy but then finds him and that he is married. Isn't his married status opposite to what was expected?  Thank you for answering these questions.

My daughter has been given the task - by me - of explaining irony. She identified and did a jolly good job of explaining 5 of the : dramatic, cosmic, socratic, situational, verbal, and irony of fate.  When it came to verbal irony she (we) stumbled. She is happy to accept that verbal irony is equivalent to sarcasm, but I would appreciate confirmation of this from the experts in this forum in order that I do not mislead her by accepting her appraisal of the matter.   Just to be clear, I am not asking whether irony is the same as sarcasm in the general case.   What exactly is "verbal irony"?   Update: my daughter's take-away from the answers so far (2012-04-16) is the following -- in her own words:      "Verbal irony is when someone says something but means the complete   opposite. Like one person might say, 'Oh, that looks wonderful', in a   kind of giggly voice. Its a bit like sarcasm except it's not negative"    I will accept the answer that get the most votes over the course of the next couple of days. Each point of view expressed has been helpful in its own way and I cannot pick an answer right at the moment, so will defer to the popular vote in the spirit of these sites.


The  is a convenient way of quickly getting an overview of the spread of some normally distributed data.  I am wondering if there is an equivalent rule in the multivariate case? and how would I go about proving/disproving this?

I am working on a paper, and have a problem regarding ellipsoid and Trivariate Normal Distribution. Suprisingly I can't find much in literature but I found your in one of your answers:     Because this construction has nothing to do with "confidence" per se,   the objective is to establish some convention for describing the shape   and relative size of the points. Using 1.96 sort of works (for three   variables): it contains about 72% of the probability of the trivariate   normal distribution. But as the number of variables increases this   method produces ellipses that are far too small. For instance, with 10   variables it will contain only 4.6% of the probability; using 4.28   instead of 1.96 in this case will contain 95% of the probability.   How did you get this number 72%? Or do you have some literature to recommend to me in which I can find this. I would appreciate it very much!


for a homework assignment I need to create two equivalent vectors, x1 and x2, using two different methods in Matlab. This should be pretty straight forward however I am getting an error I do not understand.  x1 = linspace(2,14,61); x2 = 2:.2:14;   These should create equivalent vectors correct? However, the 8th element of each is supposedly "different".  x1(8)     ans =      3.4000 x2(8)     ans =       3.4000  x1(8) == x2(8)     ans =          0   Can someone explain to me why this is? All indexes not a multiple of 8 do not exhibit this behavior. Only the 8th, 16th, etc.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I am a non-UK & non-EU citizen. I am travelling on the Eurostar from London to Paris. I have a UK visa & a Schengen visa issued from Switzerland, not France.  Would the UK immigration in London allow me to board the Eurostar to Paris if my Schengen visa first entry is France, not Switzerland?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I have this bit of code from a :  template <typename K, typename V> bool   exists_in(std::map<K,V> const& haystack, K const& needle)  {    return haystack.find(needle) != haystack.end(); }   Being a new user of templates, I still understand what is going on here.  Only, I can't seem to apply it.  I have defined  class     Varinfo;                            // meta information about vars std::map<std::string,VarInfo*>    g_varMap;   // a map between var names and meta-info   In my main c++ code I have this statement:  // various other uses of g_varMap that don't cause errors then  if ( exists_in( g_VarMap, "fred" ) )   that generates this error.  undefined reference to `bool exists_in<std::basic_string<char,  std::char_traits<char>, std::allocator<char> >,  VarInfo*>(std::map<std::basic_string<char, std::char_traits<char>,  std::allocator<char> >, VarInfo*, std::less<std::basic_string<char,  std::char_traits<char>, std::allocator<char> > >,  std::allocator<std::pair<std::basic_string<char, std::char_traits<char>,  std::allocator<char> > const, VarInfo*> > > const&, std::basic_string<char,  std::char_traits<char>, std::allocator<char> > const&)'   which I completely do not understand.  Can someone tell me why this is complaining?  What bitof template knowledge am I missing?  I have tried various casting operations on the variable returned by and sent to exists_in() including a std::string( "fred" ).  Nothing helped.  Some just generated even more meaningless errors.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Photons nay be emitted from hydrogen at, say 656.28 nm but, I guess in accordance with time-frequency uncertainty, the emission spectrum has a small finite width. This finite width can be wider for emission spectra with shorter decay times, if my understanding is correct.  Spectral emissions are usually given as very precise frequencies. Are these approximations?

Consider the atomic spectrum (absorption) of hydrogen.     The Bohr's model postulates that there are only certain fixed orbits allowed in the atom. An atom will only be excited to a higher orbit, if it is supplied with light that precisely matches the difference in energies between the two orbits.   But how precise does 'precisely' mean. Of course, if we need energy $E$ to excite the electron to a higher energy level, and I supply a photon with just $E/2$ I would expect nothing to happen (since the electron cannot occupy an orbit between the allowed ones). But what if I supplied a photon with energy $0.99E$, or $1.0001E$ or some such number. What will happen then?  I think that the electron should still undergo excitation precisely because the lines we observe in the line spectrum have some thickness. Which means that for a given transition, the atom absorbs frequencies in a certain range.   Is my reasoning correct? If not, why? How does Bohr's model explain this? How about modern theory?   If I'm right, what is the range of values that an atom can 'accept' for a given transition?


I know that if $F[x]$ is a PID then $F$ is a field. Now $F[x]$ being a field implies that $F[x]$ is a PID, so $F$ is a field.  Anyway, I tried to prove that $F$ is a field right away and the following argument came to mind:  Let $A[x]$ be a field, and let $p(x)= a + bx$, then there exists $q(x) = d x^n + ... + r$ where $b$ and $d$ are nonzero, such that $p(x)q(x) = 1.$ Carrying out the multiplication and equating the coefficient of $x^{n+1}$ to zero yields $bd = 0.$ Hence b and d are zero divisors and A is not even an integral domain.  What is wrong with this argument? And is $R[x]$ never a field?

I'm currently studying Polynomial Rings, but I can't figure out why they are Rings, not Fields. In the definition of a Field, a Set builds a Commutative Group with Addition and Multiplication. This implies an inverse multiple for every Element in the Set.   The book doesn't elaborate on this, however. I don't understand why a Polynomial Ring couldn't have an inverse multiplicative for every element (at least in the Whole numbers, and it's already given that it has a neutral element). Could somebody please explain why this can't be so?


Evaluate the following limit: $$\displaystyle\lim_{n\to\infty}(\sqrt{4n^2+n}-2n)$$ So far I've come up with this: $\displaystyle\lim_{n\to\infty}(\sqrt{4n^2+n}-2n)$ = $\displaystyle\lim_{n\to\infty}(\sqrt{4n^2(1+\frac{1}{4n}})-2n)$  = $\displaystyle\lim_{n\to\infty}(2n\sqrt{(1+\frac{1}{4n}})-2n)$ = $\displaystyle\lim_{n\to\infty}(2n(\sqrt{(1+\frac{1}{4n}})-1))$. I think it's pretty clear from here that this goes to infinity, but how can I justify that the 2n grows stronger to infinity than the part in the brackets goes to zero? I know standard rules about exponential functions growing harder than polynomials, but not about this.

$$\lim_{n\rightarrow \infty}\left[{\sqrt{4n^2+n}-2n}\right]=\frac{1}{4}$$ I am trying to use the definition of the limit but have no idea how to simplify the expression with radical!  ---edit---  so by the definition, $\forall n > N \rightarrow |a_n - a | < \epsilon, \text{where}\, \ a_n=\sqrt{4n^2+n}-2n\ \, \text{and}\,\  a = \frac{1}{4}$  so after multiply the conjugate and negate $\frac{1}{4}$, I get $\frac{2n-\sqrt{4n^2+n}}{4(\sqrt{4n^2+n}+2n)}$  Since there is still radical in the numerator, I think I have multiply the conjugate again...right?? And then find some formula that is greater!!??? confuse me this real analysis!!


I am having list on telephone numbers in my js file, and some of them have in parenthesizes translations that I don't need:  Azerbaijan (Azərbaycan)    I wont to find regex in sublime to do that, but I cannot find the right command. I have tried:  ((.))  ((*))  \(.*)\  \(.*\)   But I aways remove something different ... If someone know the solution, please help.

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I just installed Ubuntu on my new laptop and I do not see either the wifi or the bluetooth.  I looked for my wireless card (Realtek RTL8723DE) and I have not found anything.  How can I solve this problem?

How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?  lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723


I have a function which keeps capturing the data from live stream. I want to run this code for 30 minutes.

I'm looking for a library in Python which will provide at and cron like functionality.  I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron.  For those unfamiliar with cron: you can schedule tasks based upon an expression like:    0 2 * * 7 /usr/bin/run-backup # run the backups at 0200 on Every Sunday  0 9-17/2 * * 1-5 /usr/bin/purge-temps # run the purge temps command, every 2 hours between 9am and 5pm on Mondays to Fridays.   The cron time expression syntax is less important, but I would like to have something with this sort of flexibility.   If there isn't something that does this for me out-the-box, any suggestions for the building blocks to make something like this would be gratefully received.  Edit I'm not interested in launching processes, just "jobs" also written in Python - python functions. By necessity I think this would be a different thread, but not in a different process.  To this end, I'm looking for the expressivity of the cron time expression, but in Python.   Cron has been around for years, but I'm trying to be as portable as possible. I cannot rely on its presence.


I have this string:  $str = '
23.zzerze& erezrzeràr ezrezr àrez éé
 &mdash; 𐌶Ұ₭₱∅Δ (@Zykprod) 4 avril 2017

';   And what I want is to remove those kind of characters:  𐌶Ұ₭₱∅Δ    I try to convert my string with utf8_encode , filter_var but I don't think it is the solution.

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.


When I was using three windows in Chromium and two windows in Firefox my system suddenly hung while I was switching between them. In Windows I used to open task manager and close a specific window which was stuck. How to do this in Ubuntu?

How do I kill all processes running by my own non-root account?  I have some spinning smbd  processes that I caused from my windows machine and so I telnetted into the linux server and I want to kill those spinning processes.   I don't have authority to restart services or reboot the machine.


So I understand $\sum\limits_{i=1}^{n}i^2 = \frac{n(n+1)(2n+1)}{6}$ but I'm not sure how to come to that conclusion. Having trouble understanding

I am just starting into calculus and I have a question about the following statement I encountered while learning about definite integrals:  $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$  I really have no idea why this statement is true. Can someone please explain why this is true and if possible show how to arrive at one given the other?


I have opened a repo on github, started coding after that i found my self building a Generic Application model for the projects in my domain, now i want to extract the application model from my repo to another repo.  i can fork the repo and remove the files related ,particularly, to my project, but i will be miss-using the "fork" operation.  And also this command   git merge origin/upstream   will reproduce my project specific files.  it sounds like a reverse forking .. how to implement that ?

I have a  repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository.  How can I do this while keeping the history of the files within the subdirectory?  I guess I could make a clone and remove the unwanted parts of each clone, but I suppose this would give me the complete tree when checking out an older revision etc. This might be acceptable, but I would prefer to be able to pretend that the two repositories doesn't have a shared history.  Just to make it clear, I have the following structure:  XYZ/     .git/     XY1/     ABC/     XY2/   But I would like this instead:  XYZ/     .git/     XY1/     XY2/ ABC/     .git/     ABC/


I currently have a line that I want to but a label onto in Tilemill. It currently looks like this:    But what I would prefer is something like this:    where the line isn't rendered around (and especially underneath) the label. Is there any way to archive that in Tilemill?

Is it possible with TileMills and CartoCSS?


I have Logitech G502 mouse. Problem is, half of buttons are not detected at all.  While searching all answers or tutorials I found were assuming that xev detects all buttons and were concerned with binding detected buttons. In my case xev doesn't detect most of additional buttons.  Detected buttons are:   leftclick (event 1) mouse wheel press (event 2) rightclick (event 3) wheel scroll up (event 4) wheel scroll down (event (5) backwards thumb button (event 8) forwards thumb button (event 9)   Following are not detected:   3rd thumb button (1 button) 2 small buttons next to LMB (2 buttons) lateral mouse wheel press left/right (2 buttons)   Basically, only 2 out of 7 nonstandard buttons are detected.  How do I make system detect those buttons?

Can anyone tell me how to configure all the buttons on a  under Ubuntu 12.04?  Specifically, I like to make one of them just the Ctrl key (for control clicking webpages) and another one Ctrl+W to close tabs.  I also normally make the scroll wheel page down for each click (otherwise it hurts my arms to be scrolling so much).  I make pushing the wheel to the left = pageback and pushing to the right = page forward.  I've searched for other answers to this and found something related   But when I posted a followup post to solve the issue, no one responded --perhaps I made the mistake of posting to a question that had been "solved."  I'm not sure how I'm supposed to reopen a question that is pertinent to my question but doesn't quite solve mine.


All of the sources I read says that friction is independent of surface area, but when we throw a heavy object with large area from a certain height, it experiences more air drag, which is related to friction, but when we throw another object of equal mass and smaller surface area, it experiences less drag.  Also, a circular or spherical wheel like structure experiences less friction than a cubical block of equal mass and equal co-efficient of friction.  Can you explain me why it happens?

I know the friction is given by the following equation $$\mu F_N=F_f$$  which tells me friction is independent of surface area, but how do I characterize it as such if I want to add surface area into my equation what would the equation be?  We all know friction is a function of the normal reaction exerted on the body and the coefficient of friction. How is this coefficient derived, any equation? Or is it all experimental? Any quantum mechanical explanation for friction?


Does anyone know how pre-clearance facilities at airports like Abu Dhabi are affected during US government shut downs? Still worth booking to go through those facilities in the next few days?

My grandparents bought a flight on United Airlines that departs on Feb 10 2019, as the one and same ticket, from Toronto, to ORD with 1 55-minute layover, then Maui. Please ping me if I ought post their return flight on Feb 24's details.   advises:     There should be no customs and immigrations formalities at ORD, as YYZ is a , and CBP matters will be handled in Toronto.    I'm assuming that  persists during their vacation to Maui.   reported some TSA agents' refusal to work.  Will  refuse to work, or any other federal workers pertinent to travelling to and from the US?


F is a field $\Rightarrow$ $F\left[ x\right]$ is a principal ideal ring. How to proof? Second question F have to be field?(why)

I want to show that if $K$ is a field then $K[x]$ is principal  Here is what I did:  I took 2 polynomial p(x) and q(x). Since we're on a field we can do a euclidean division of polynomials:  $q(x) = p(x)a(x) + r(x)$ with $deg(r) < deg(p)$  Now if $r= 0$ we obviously have $p \in (q)$   But I don't know how to show that it is principal if $r \neq 0$  Also I would like to show that the assertion is false if we replace "$K$ is a field" by "$K$ is a principal domain and an integral domain". I can't figure out how to do that


If the gravitational force in  would be twice as large, then so would be the gravitational force between two massive objects and hence their acceleration toward each other. However, if according to  a force cannot be unequal to the counter force it feels or is able to evoke, and their acceleration toward each other is opposed by their inertia, then would the inertia of the objects become twice as large or would a change of the value of the  affect the pace of time? (Ignoring the fact that gravity in general relativity isn't a force) (Though my question is not entirely unrelated to , I think that it is more general so its answer may be more interesting.) Though the gravitational constant obviously is constant; it could as well have a different value. My question is how a universe (where the physical laws are the same) with a twice as large value of the gravitational constant would look like, if it would be different from our universe and, if so, how.

Every so often, one sees on this site* or in the news† or in journal articles‡ a statement of the form "we have measured a change in such-and-such fundamental constant" (or, perhaps more commonly, "we have constrained the rate of change of..."). These are often shrouded in controversy, with people often stating quite loudly that statements of the sort are meaningless and even unverifiable, but the end result is often quite confusing. Thus:   Is it possible to speak about changes  to a physical constant that contains dimensional information? If not, why not?     *          .$\ \ $† .$\ \ $‡ .


This query is returning multiple results.  In the bottom you can see there are two of each id number.  How do I distinct records where I still get 25 records of unique values?          SELECT *             FROM(                 SELECT                     DISTINCT cards.id, cards.name, cards.created_at, cards.updated_at                     FROM cards                         INNER JOIN card_process                             ON card_process.card_id = cards.id                             INNER JOIN processes                                 ON processes.id = card_process.process_id                                 INNER JOIN category_process                                     ON category_process.process_id = processes.id                                     INNER JOIN categories                                         ON categories.id = category_process.category_id                                         INNER JOIN series                                             ON series.id = categories.serie_id                                             INNER JOIN serie_user                                                 ON serie_user.serie_id = series.id                         AND `cards`.`type` NOT IN ('', 'libraries')                         AND NOT `cards`.`deleted`                         AND NOT `categories`.`deleted`                         AND NOT `series`.`deleted`                         AND `cards`.`type` IN ('forms')                         AND `series`.`id` IN (124,235,126,126,201,236,207,207,207,207,247,234,131,131,221,225,225,222)             UNION ALL                 SELECT                     DISTINCT cards.id, cards.name, cards.created_at, cards.updated_at                     FROM cards                         WHERE `cards`.`account_user_id`='9'                             AND NOT `cards`.`deleted`                             AND `cards`.`type` IN ('forms')             ) AS qry                 ORDER BY `updated_at` ASC                 LIMIT 0, 25

What is the difference between UNION and UNION ALL?


I always viewed philosophy to be dead after the arrival of modern science. The last great philosopher in metaphysics was Kant, I believe the others who followed him were made irrelevant by the positivist movement. I believe this probably isn't true however, and this ignorant opinion of mine comes from the fact I can't find a good source of information from contemporary philosophers doing research in philosophical hot spots so to speak. Could you recommend a good book, journal or website where I can keep track of all of the interesting questions in epistemology, metaphysics and whatnot?

It is rather difficult to decide what to read, what is obsolete, and so forth.   How does one stay up-to-date on modern philosophical thought? Are there journal apps which show new essays, articles, studies, etc.?


W: Failed to fetch http://ppa.launchpad.net/ferramroberto/java/ubuntu/dists/raring/main/binary-amd64/Packages  404  Not Found W: Failed to fetch http://ppa.launchpad.net/ferramroberto/java/ubuntu/dists/raring/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   I keep getting this when I download anything from the terminal.  How do I get around this?

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I wanted to compute the sum $$\sum_{k=1}^{n}\frac{1}{k}\binom{n}{k}.$$ And I thought it would be easiest to do this by making it a function, differentiating it and integrating it then.  So I did: $$f_n(a)=\sum_{k=1}^{n}\frac{1}{k}\binom{n}{k}a^k$$ $$f_n'(a)=\sum_{k=1}^{n}\binom{n}{k}a^{k-1}=\frac{(a+1)^n-1}{a}$$ And finally $$f_n(a)=\int\frac{(a+1)^n-1}{a}\mathrm{d}a+C(n)$$ where $C(n)$ is an unknown constant depending on $n$.  The first problem is the integral of course, so here it stops.  Can anyone help me calculating this integral or is there another way to calculate the sum?  EDIT: another approach:  I get, using Pascal's identity, $$S(n)=\sum_{k=1}^{n}\frac{1}{k}\binom{n}{k}=\frac{1}{n}+\sum_{k=1}^{n-1}\left(\frac{1}{k}\binom{n-1}{k-1}+\frac{1}{k}\binom{n-1}{k}\right)=\sum_{k=1}^{n}\frac{1}{n}\binom{n}{k}+\sum_{k=1}^{n-1}\frac{1}{k}\binom{n-1}{k}$$  So I have the recursion $S(n)=\frac{2^n-1}{n}+S(n-1)$, with $S(1)=\frac{2^1-1}{1}$.  Thus $$\sum_{k=1}^{n}\frac{1}{k}\binom{n}{k}=\sum_{k=1}^{n}\frac{2^k-1}{k}$$ if that might help.  Also, $f_n(a)=\displaystyle\sum_{k=1}^{n}\frac{(a+1)^k-1}{k}$ for the same reason.

I got this sum, in some work related to another :  $$S_m=\sum_{k=1}^m  \frac{1}{k}{m \choose k} $$  Are there any known results about this (bounds, asymptotics)?


I own a Samsung SCH-i545 Galaxy S4 and can not update to Jellybean 4.3. The wi-fi it says: Software update is temporarly unavailable.vTry again later. Kies does not let me update either. I really want the 4.3 update so I would appreciate some help..

I own a Samsung SCH-I545 Galaxy S4 and can not do update via Kies. It says:      Software update is temporarily unavailable. Try again later.   The phone is sent by my uncle from America and I am from Romania. The phone does not have root. I tried to update via Odin, but it fails too.  What can I do to Update my Galaxy S4 to Android 4.3? Thank you very much!


I will be travelling from Europe to Japan and considering what's the best way to get Japanese yen:   Bring EUR from home country and exchange in Japan - airport or other place? Use ATM in Japan - how much does it charge? Pay by credit card - availability to use such option? Additional fees?

Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise.   While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective?


Im a beginner. Could someone tell me what's the difference between long and int they both uses 4bytes of space and have the same range.

Correct me if I am wrong,  int is 4 bytes, with a range of values from -2,147,483,648 to 2,147,483,647 (2^31) long is 4 bytes, with a range of values from -2,147,483,648 to 2,147,483,647 (2^31)  What is the difference in C++?  Can they be used interchangeably?


First, Happny new year all here! I'm very new to UNIX\Linux and I've mistakenly created the following Symlink:  sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.confservice   What is the right way to delete it and what is the logic behind it?:  I understand I should do unlink ***something*** command inside the folder /etc/apache2/conf-enabled/ and after I navigated to it... Therefore I ask:   why is the deletion action done based on the second path and not in the first one ... ? Usually, is something else be written there besides the file name?   I'm afraid to make damage therefore I ask this...

I use Ubuntu 15.10 and I'm very new in Linux. After reading in Wikipedia , and after executing a symlink creation command in the Ubuntu Unix-bash terminal, I ought to better understand the structure of a symlink I worked with several times when creating (and "destroying") Ubuntu learning environments.  There is a short syntax I ran each time when installing a PHPmyadmin (PMA) service. Without running it, the service just didn't work. From the information I gathered, this following syntax creates a symlink that connects Apache to a certain PMA file that includes conf directions.  This is the syntax I ran each time:  cd /etc/apache2/conf-enabled/ sudo ln -s /etc/phpmyadmin/apache.conf phpmyadmin.conf service apache2 restart   I want to better understand what is actually being done here, for example:   Why is the cd navigation even needed? Couldn't we specify which files we want to work on from the root (computer) folder and that's it? Why is the -s after the ln?  I navigated to both directories in the ln command but I couldn't find phpmyadmin.conf in either of them - So, how can the system know where it is (assuming there is no system-wide search for it).


I note that there is a fair amount of light-bending questions, but I don’t really see the observer effect I am asking about. I apologize there is an answer already. I wonder if the Earth’s gravity – at least in principle - were to enter the calculation of the effect of starlight bending noted by Eddington 1919. Alternatively, one might wonder: If the observer of starlight bending around the Sun, such as the case for Eddington’s measurements 1919, is hypothetically placed in a field of gravity equal to that of the Sun, i.e. if the Earth’s gravity during Eddington’s experiment were equal to that of the Sun, what would the observer see, in terms of apparent stellar displacement? Would there be no effect at all, a classical Newtonian effect, i.e. the same as for an object with near light velocity in the same path, or something else again?

Using classical mechanics, the formula for gravitational attraction is   $$F = G\frac{m_1m_2}{r^2}.$$   This formula does not work for photons, and we need to use Einstein's theory of gravity to account for that, as the photon is massless. What if, instead of using the mass of the photon, we rather used the inertia of it?  The momentum of a photon is     $$p=\frac{h}{\lambda}.$$  Thus, using that, we can calculate its supposed 'mass' (inertia) as momentum is also equal to mass times velocity. So 'mass' of a photon is     $$m=\frac{p}{v}=\frac{h}{\lambda  c}.$$   If we use this mass as the mass of a photon, can we use Newton's equation for gravitational attraction?


As I know 15-35mm lens is a good prime all rounder, but from what I have seen in photo examples and youtube videos for portraits (full body person) it's better to have a 50mm lens.  It's also a very cheap lens and small to carry around. What do you think from your personal experience?  Also I really want to experiment with "Bokeh" effect especially now when a lot of nicely lid Christmas trees are appearing in the town :) I know it's possible to have "Bokeh" effect with 50mm when taking close up pictures, whats about my 15-35mm?  Thanks

I'm currently using an entry-level DSLR with 18-55mm lens and having great trouble trying to creating a blurred background effect in my photos. Now matter what aperture or shutter speed I choose, I'm not able to get it.  There's a general question about , but what specific things can I do to get this effect with an entry-level lens?


I am currently proofreading some documents which go by the title "Pre and Post Visit Materials". For the life of me, I can't decide whether "post visit" counts as a compound adjective in this instance and therefore needs a hyphen. If it is a compound adjective, then in the title would "Post-Visit" or "Post-visit" be correct? If it isn't a compound adjective, would anyone mind explaining to me why? Also, is it acceptable to leave "pre" as a stand-alone word without any additional punctuation? Thanks so much for your help!

How do I list multiple things that are compound words?  In my own language I'm used to writing these lists like this:  "I kicked foot-, basket-, and volleyball"  The sentence is supposed to mean that I kicked all types of balls (football, basketball and volleyball). However, it does not seem correct to me. Should I write them as whole words, with or without hyphen, or how?


A question might talk about Latin-based languages, and refer to them as Romantic languages.  From the context, and the capitalized "R", it is clear that they meant to say Romanic languages, as in languages related to Rome, or languages derived from Latin, and not languages with significant romantic literature.  If I suggest the edit from "Romantic" to "Romanic", the system says that the edit is minor (less than 5 characters). But the 1 character edit changes the meaning of the sentence (unless the reader understands it's a typo and reads it accordingly).  I can easily circumvent this by replacing "Romantic" with "Romanic (Latin-derived)" to have enough characters changed.  Is a moderator right to reject such an edit?  I understand why a moderator would reject a change that just ads a synonym between parentheses. That doesn't help with readability. But, the synonym is only added to circumvent the hard condition of more than 5 characters changed, and this is explained accurately in the edit comment.  I can easily understand and accept that moderators sometimes make mistakes. Everyone does, that's life. But I wonder if the moderator would not be mistaken to reject such an edit. And if not, what would be the reasoning.  The above scenario played out .

On Stack Overflow, there was a question with an incorrectly formatted list, which lacked a newline before it and thus came out like this: 1. Hello 2. Something else 3. Goodbye  I changed it to the right formatting by inserting a newline:   Hello Something else Goodbye   And I got the "Edits must be at least 6 characters" error message. Is there an OK way to trick this rule?


I've been searching SO for an answer, but have not found nothing that is exactly like this. jQuery/JS is not my main skill, so pls have oversight if this seems to be a n00b-question. With that said, this is what I would like to do. I have a main script from which i make an Ajax-call to populate a div with content. This is my code. function callComments(thisguid) {     $.ajax({         type: 'POST',         dataType: 'html',         url: 'ajax_user_comment_print.php',         data: {"guid" : thisguid},         success: function (data) {              $('#comments').html(data);         }     }); };                       callComments('<?=$guid?>');  $(".comment_form").submit(function(e) {     e.preventDefault();     var form = $(this);     var url = form.attr('action');     $.ajax({         type: "POST",         url: url,         data: form.serialize(),          success: function(data)         {           callComments('<?=$guid?>');         }     }); });  Then the page is loaded, the DIV #comments is populated with HTML. The main page includes a FORM (.comment_form) that when submitted fires the second event, makes some database insertions, and then redraw the previous DIV with updated content. This all works fine. The HTML that is inserted into the DIV includes another FORM (.comment_form) and what I want to do is that when that form is submitted, the code above would catch that event. But it does not. I'm pretty sure I've managed to do this before, and there is a slight memory that it might have been done with eval(), but all my trys have been in vain. Any solution that I should do? Many thanks.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I wonder if the following sentence is grammatical:     Would anybody like another cup of tea?   Should it be somebody or anybody?

When reading about  on the OALD, I saw the following note:     The difference between someone and anyone is the same as the difference between  and . Look at the notes there.   The note that I read for some is the following:     In negative sentences and questions any is usually used instead of some:           I don't want any more vegetables.     Is there any wine left?           However, some is used in questions that expect a positive reply:           Would you like some milk in your coffee?     Didn't you borrow some books of mine?      Does that apply to someone too? Should I use someone in a question when I am expecting a positive answer?      Does someone know the answer?


For example, you are long/buy a crude oil futures contract in March at the spot price of $100 which expires in June. Then the day before they expire, the spot price of the June contract is $70.  If you offset the position, you will have to sell the contract which makes you lose $30. If you rollover, you will sell the June contract and buy a July contract. Does it mean that you also lose $30 when you rollover? If right, then what differences between these two options since they have the same loss?

If you are long a futures contract that comes near to expire, you have two options:    Offset the position or rollover the contract You have to take delivery of the underlying commodity   For example, you are long/buy a crude oil futures contract in March at the spot price of $100 which expires in June. Then the day before they expire, the spot price of the June contract is $70.    If you offset the position, you will have to sell the contract which makes you lose $30.  If you rollover, you will sell the June contract and buy a July contract. Does it means that you also lose $30 when you rollover? If right, then what differences between these two options since they have the same loss?   I'm sorry if this question is stupid to you, I am new in trading so I am confused a lot. Thank you so much for your help in advance!


I am trying to grep a string from a file but grep returns nothing (even though the string is present in the file). It turned out that the file starts with a ÿþ mark. If I remove it manually then grep works. How do I make grep work without manually removing the BOM?

For debugging purposes, I need to recursively search a directory for all files which start with a UTF-8 byte order mark (BOM). My current solution is a simple shell script:  find -type f | while read file do     if [ "`head -c 3 -- "$file"`" == $'\xef\xbb\xbf' ]     then         echo "found BOM in: $file"     fi done  Or, if you prefer short, unreadable one-liners:  find -type f|while read file;do [ "`head -c3 -- "$file"`" == $'\xef\xbb\xbf' ] && echo "found BOM in: $file";done  It doesn't work with filenames that contain a line break, but such files are not to be expected anyway.  Is there any shorter or more elegant solution?  Are there any interesting text editors or macros for text editors?


To free up disk space, I'm asking if it's possible and safe to remove some apps from my Mac OS X Yosemite download that I never use. If "yes", how do I do this safely and, hopefully, quickly.

Is it possible to delete any of the default apps in OS X? I suppose it is possible, but will anything break if I do?  There's some, such as Stickies, iChat, Dictionary, etc. that I either have no use for, or have replaced with my own apps that provide similar functions.  Thanks guys!


I don't need half my disk space on Ubuntu and I would love to move it back to Windows without having to uninstall and install Ubuntu all over again. I'd appreciate any help on this.

I wanted to create more space for Ubuntu on my hard disk in favor of my Windows partition. I booted the livecd and resized the NTFS partition to 100 GB. Then I wanted to resize my Ubuntu (ext4) partition to fill up the created unallocated space.  A screenshot of my current disk. (With the livecd there's no 'key' icon after sda6)    My first thought was just right click on sda6 → move/resize → done. Unfortunately I cannot resize or move the partition. However I can resize the NTFS partition.  I guess it is because the extended sda4 partition is locked. I couldn't see an unlock possibility though…  So how do I resize the ext4 partition anyway, probably by unlocking the extended partition, but how?


Why can't I get a hard border when I used modify -> border? This is maddening and I've read about 5 posts so far that do not solve the problem?

When I choose Select > Modify > Border and select a 1px border - the border I get is anti-aliased, hence if I fill my selection a 3px border is affected.  Is there a way to select a 1px aliased border?


I am trying to geometrically understand how a degenerate conic of a parabola can form a two parallel lines since I read  that such a conic is a line or two parallel lines. Can anyone explain how an intersection of a plane and a double cone can form parallel lines?

If we think at conics as intersections of a plane with a double cone we can see the degenerate conics as intersections with a plane passing thorough the vertex of the cone.  For the real degenerate conics this gives an easy intuition of how a degenerate conic can be  a point, or  a line, or two intersecting lines. But how we can  see  (intuitively and in a simple way) the situation in which the degnerate conic is a couple of parallel lines, as for the equation $x^2+2xy+y^2=1$ ? Where is the intersection plane in this case?


1.Let $x$,$y$,$z$ be nonnegetive reals such that $x^2+y^2+z^2=1$. $(1-xy)(1-yz)(1-zx)\ge\frac{8} {27}$    let $a$,$b$,$c$ be positive reals with $a+b+c=1$ . Prove that $a^2+b^2+c^2 +3abc \ge \frac {4}{9}$.

If a,b,c are non-negative real numbers for which holds that $a+b+c=3$ then prove the following inequality:  $$\frac{9}4\ + \frac{3abc}4\ \ge ab+bc+ca$$


In preparation for an introductory talk on category theory, I recently spent some time thinking about natural transformations. The first example, or maybe the second, that everyone gives to motivate the concept of a natural transformation is the double dual: a vector space is naturally isomorphic to its double dual, and category theory makes this notion precise by saying that there is a natural isomorphism between the identity functor and the double dual functor $\text{Vec}_k\to\text{Vec}_k$. At this point, whoever is giving the example cautions that the dual functor $\text{Vec}_k^{\text{op}}\to\text{Vec}_k$ is not naturally isomorphic to the identity functor, and this is because making an isomorphism between a vector space and its dual requires choosing a basis.  But no one ever proves it! Implicitly, there is a "theorem" here to the following effect:     "Theorem": There is no natural isomorphism between the identity functor $\text{Vec}_k\to\text{Vec}_k$ and the dual functor $\text{Vec}_k^{\text{op}}\to\text{Vec}_k$.   The problem with this "theorem" is that, to my knowledge, it doesn't make sense to talk about a natural transformation between a covariant and a contravariant functor. The obvious commutative diagram to write down, something like $$ \newcommand{\ra}[1]{\!\!\!\!\!\!\!\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!\!\!\!} \newcommand{\la}[1]{\!\!\!\!\!\!\!\!\!\!\!\!\xleftarrow{\quad#1\quad}\!\!\!\!\!\!\!\!} \newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.} % \begin{array}{ll} V & \ra{f} & W \\ \da{\eta_V} & & \da{\eta_W} \\ V^* & \la{f^*} & W^* \\ \end{array}, $$  will almost certainly not commute -- take, for instance, $f=0$. This failure is caused by the contravariance of the dual functor, not its unnaturality.  My question, then, is this: make precise the claim that there does not exist a natural isomorphism between the identity functor and the dual functor, and prove it.

I've read in several places that one motivation for category theory was to be able to give precise meaning to statements like, "finite dimensional vector spaces are canonically isomorphic to their double duals; they are isomorphic to their duals as well, but not canonically."  I've finally sat down to work through this, and -  Okay, yes, it is easy to see that the "canonical isomorphism" from $V$ to $V^{**}$ is a functor that has a natural isomorphism (in the sense of category theory) to the identity functor.  Also, I see that there is no way that the functor $V\mapsto V^*$ could have a natural isomorphism to the identity functor, because it is contravariant whereas the identity functor is covariant. My question amounts to:     Is contravariance the whole problem?   To elaborate:   I was initially disappointed by the realization that the definition of natural isomorphism doesn't apply to a pair of functors one of which is covariant and the other contravariant, because I was hoping that the lack of a canonical isomorphism $V\rightarrow V^*$ would feel more like a theorem as opposed to an artifact of the inapplicability of a definition.  Then I tried to create a definition of a natural transformation from a covariant functor $F:\mathscr{A}\rightarrow\mathscr{B}$ to a contravariant functor $G:\mathscr{A}\rightarrow\mathscr{B}$. It seems to me that this definition should be that all objects $A\in\mathscr{A}$ get a morphism $m_A:F(A)\rightarrow G(A)$ such that for all morphisms $f:A\rightarrow A'$ of $\mathscr{A}$, the following diagram (in $\mathscr{B}$) commutes:  $$\require{AMScd}\begin{CD} F(A) @>m_A>> G(A)\\ @VF(f)VV @AAG(f)A\\ F(A') @>>m_{A'}> G(A') \end{CD}$$  This is much more stringent a demand on the $m_A$ than the typical definition of a natural transformation.  Indeed, it is asking that $m_A=G(f)\circ m_{A'}\circ F(f)$, regardless of how $f$ or $A'$ may vary. Taking $\mathscr{A}=\mathscr{B}=\text{f.d.Vec}_k$, $F$ the identity functor and $G$ the dualizing functor, it is clear that this definition can never be satisfied unless $m_V$ is the zero map for all $V\in\text{f.d.Vec}_k$ (because take $f$ to be the zero map). In particular, it cannot be satisfied if $m_V$ is required to be an isomorphism.     Is this the right way to understand (categorically) why there is no natural isomorphism $V\rightarrow V^*$?   As an aside, are there any interesting cases of some kind of analog (the above definition or another) of natural transformations from covariant to contravariant functors?  Note: I have read a number of math.SE answers regarding why $V^*$ is not naturally isomorphic to $V$. None that I have found are addressed to what I'm asking here, which is about how categories make the question and answer precise. ( was closest.) Hence my question here.


Jean Baptiste Joseph Fourier (1798–1830) was a French mathematician who is most widely recognized for his development of what we now call Fourier Series.  In ABE425, we do not solve differential equations, but we use Fourier Series to analyze signals by creating frequency spectra.  Let's assume we have an interval $[0,2\pi]$ on which our signal (input function) is defined.  According to Fourier we can now write our input function $f(t)$ as the sum of a constant and a sum of cosine and sine functions of varying frequency $n$ (also known as basis functions) as follows   $$ f(t) = c_0 + \sum_{n=1}^{\infty} a_n \cos(nt) + b_n\sin(nt) \tag{11.1} $$   According to a textbook that my professor wrote, it is defined as shown above.  But I wanted a more specific/deeper explanation of what exactly this "basis function" is. Can someone explain what basis function is with examples if possible and why it is applicable in Fourier series?

What are Fourier basis functions? And how do I prove that Fourier basis functions are orthonormal?


I'd basically like to create an allocated file lets say 1GB with content.  Then hopefully using some command line utility I'd like to overwrite-in-place a portion of the file, lets say the beginning 4 MB ONLY leaving the rest of the file contents in-tact.  I've checked cp, and dd but they don't seem to have anything like this.  Perhaps I am looking in the wrong place and/or not understanding the implications of some of the options.  Yes, I could generate a C program to do this but my preference for portability is to use a command line situation.  Any ideas?

I have an empty file (only zeroes are in it) of size 9,0KB and I need to write another file (with size 1,1KB) to it, but the first file must not lose its size or the rest of its contents. So if the whole file is 00000000000000... now, I need to write second file in it and leave the zeroes as they are. I have tried to use dd, but I haven't succeed - file resizes.  dd if=out/one.img of=out/go.img   Does anybody know how can I do it?


What is the best way to describe a relationship, or the two people in a relationship, who are heterosexual, non-married on purpose, but exclusive and committed, and over the age of 50, where “boyfriend” and “girlfriend” do not sound appropriate.

I've been together with my boyfriend for around 9 years now. There are times when I want to communicate that I am referring to someone who plays a major role in my life, like that of a husband, and "boyfriend" does not seem adequate.  To me, "boyfriend" seems to signify a newer relationship, one that is still in the experimental phase.   I've tried out a couple of other words, but they don't seem to carry the meaning I want.   "Partner" seems too detached, and makes me think of business partners.  "Companion" makes me think of a dog.  "Lover" seems too casual and is not really something I'd want to use in the workplace or when I'm trying to appear professional.  "Significant other" is what I would like to say, but I dislike using the term because there are so many syllables and it seems so wordy.   Is there a shorter term to use to describe a long term boyfriend/girlfriend that fills the role of a husband/wife?


I have three tables project, users and proj_user.  The PK of proj_user table is the FK of project and users table's pk e.g.(project_id,user_id)  My question is, is it possible for the project_id and user_id's data to be different, like?: project_id = '12345' and user_id = 'abc987'    Edit Thanks for the quick response. But just look at this scenario  TABLE project (     project_id PRIMARY KEY     ... )  TABLE users (     user_id PRIMARY KEY     ... )  TABLE proj_user ( proj_user_id project_id user_id PRIMARY KEY (proj_user_id), FOREIGN KEY (proj_user_id) REFERENCES projects (project_id), FOREIGN KEY (proj_user_id) REFERENCES projects (user_id) )   I want the project_id and user_id values to be different.  What do I need to change here?

I have three tables project, users and proj_user. The PK of proj_user table is the FK of project and users table's pk e.g.(project_id,user_id)  My question is, is it possible if the project_id and user_id's data is different  like project_id = '12345' and user_id = 'abc987'  Please reply  kind regards Vivek


Prove or find a counter example of : $3$ divide $2^{2n}-1$ for all $n\in\mathbb N$.  I compute $2^{2n}-1$ until $n=5$ and it looks to work, but how can I prove this ? I tried by contradiction, but impossible to conclude. Any idea ?

I did some mathematical induction problems on divisibility   $9^n$ $-$ $2^n$ is divisible by 7. $4^n$ $-$ $1$ is divisible by 3. $9^n$ $-$ $4^n$ is divisible by 5.   Can these be generalized as $a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer? But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?  I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.  Are they just a coincidence or is there a theory behind?  Is it about modular arithmetic?


I have installed AppArmor but when I start it it says  * AppArmor not available as kernel LSM.   how can I resolve this?

Starting apparmor on a Ubuntu Lucid Lynx gives the following:  user@host:~$ sudo /etc/init.d/apparmor start  * Starting AppArmor profiles  * AppArmor not available as kernel LSM.    ...fail!   Googling a bit, I found the following bug report - marked as fixed -:    Which seems to be my exact case. My kernel is 2.6.32-21-generic. Any idea on how to solve the issue?


I know this is a funny question but I am a new user and I want to know how to use the apt command to remove software in Kubuntu.

Seeing there are various ways to install on Ubuntu. What are the various ways to uninstall items?  Which ways always work? How can I be sure something was uninstalled?


Masking NullPointerException will give another delirium to developers as they are bombarded with logic that we are letting Object in memory pointing to null value. If we catch NullPointerException , we are again catching buggy code that takes null value. Ideally, we must stop object taking null input value in code, and being a valid code. I have seen null being passed as parameters in one of object created in code, and code successfully leads user go through activities. How is that possible.  Is it risky to implement such implementation which is against NullPointerException norms? As a fallback, we can't even use RuntimeException as it will mask NullPointerException from happening and we won't know buggy code was buggy at first place?

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 run Apache on my Ubuntu system in local network. there is more than 100 systems in the network so i want to set domain name on this system. How can i do this?  Thanks A lot.

You can reach this IP address  (if my computer is online). I want to assign a domain to it so I wonder how is that possible when I have no DNS? I do own my domain which is ".com". My IP is static.  Thanks


Here is my current concern.  Say that a set $E$ has the half-property when there exist sets $F$ and $G$ such that $E$ is the disjoint union of $F$ and $G$, $F$ and $G$ being isomorphic. Trivially, no finite set has the half property, whereas (trivially as well) any countable set or the set of real numbers has the half-property.  It seems to me that any infinite set has the half-property, but I feel that this could be related to some axiomatic system (involving the choice? I don't know). If $E$ is (up to isomorphism) a power set, then take $E'$ such that $E=\mathcal P(E')$, a in $E'$ and take $F$ as the subsets containing a and $G$ as the subsets without a; can this be helpful to solve the problem?  Thanks in advance for your thoughts!

I want to prove that if $A$ in an infinite set, then the cartesian product of $A$ with 2 (the set whose only elements are 0 and 1) is equipotent to $A$.  I'm allowed to use Zorn's Lemma, but I can't use anything about cardinal numbers or cardinal arithmetic (since we haven't sotten to that topic in the course).  I read a proof of the fact that if $a$ is an infinite cardinal number, then $a+a=a$, which is something similar to what I want to prove.   Any suggestions will be appreciated :)