Have this weird wireless network, once the mac connected to the network, everything except safari shows offline (Skype, Spotify, Dropbox and other apps) an even when I ping google.com or ping 8.8.8.8 all results in timeout.  But for some weird reason safari can still browse internet for known domains, and soon as I try to resolve an unknown domain, it can't find that host.   Pretty sure this is an DNS issue, but none of the other devices in the network has this issue. I tried flushing DNS of the mac, and using google DNSs but no luck  Can't even reset the mac to factory settings without a internet connection at this point

This is by far the weirdest problem I've come across,  My mac can perfectly access internet through safari web browser, but when I tried to do   ping www.google.com   through the terminal, it's requests is being timed out.  None of the other apps are able to reach internet either. Dropbox, Skype, Spotify all showing offline, except the browser itself  I'm guessing something bad with the DNS, but spend 2 hours trying to fix this with no luck


I am trying to create JavaScript function dynamically and want to use input value as function name.    I tried:  function calculate(){ var dur = document.getElementById('duration').value; //example value: 1 var sum = document.getElementById('sum_insured2').value; //example value: 1000   `'show_d'+dur+'_sum'+sum();` }   I want like this:  `show_d1_sum1000();`   I am not getting the output what I want.

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


\documentclass{article} \usepackage{amsmath,booktabs}  \begin{document}  \[  \implies \mathbf{B}^c= \begin{bmatrix}  \begin{array}{@{}ccc|ccc|c@{}}   \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0} & \mathbf{0} & \mathbf{0} \\ \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0} & \mathbf{0}\\  \mathbf{0} & \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I} & \mathbf{0}\\  \mathbf{0} & \mathbf{0} & \mathbf{0} & \mathbf{-I} & \mathbf{0} & \mathbf{0} & \mathbf{I}\\  \end{array}  \end{bmatrix}   \]  \end{document}

I am trying to produce 3 matrices on the same line. And on top of the each matrix, there is a name. I tried using tabular for the names and then I use align for the matrices. However, this creates some kind of space between the names and the matrices, which I do not want. Is there a better way to do this ? I have seen other posts but they do not seem to solve my problem. Please note that I need to use bordermatrix because I need to label the rows and columns as well.   \begin{center} \begin{tabular}{ccc} Kay & Brian &  Edwin \\ \end{tabular} \end{center} \begin{align*} \bordermatrix{ & I & A \cr I &1 & 2 \cr A & 3 & 4 }  & \bordermatrix{ & I & A \cr I &5 & 6 \cr A & 7 & 8 }  & \bordermatrix{ & I & A \cr I &9 & 10 \cr A & 11 & 12 }  \end{align*}


In SO, while hover over the drop down menu,  It shows there are 168 Communities In SE main, when hover over the drop down menu,  It shows there are 170 communities In the content of SE main,  It shows there are 167 communities Actually there are 168 communities

I assume the difference in the number of Stack Exchange sites/communities is a mistake... correct?


In some terminals you can do something like this...  Type some command  nmap -sn 192.168.1.1/24   Then go on to do other things in the terminal for a while. Then later you can type  nmap   and then just press the ↑ key and it will index through all of the commands that started with what you typed, in this case nmap for example.    My example was pretty short but sometimes you type a very long command that you want to run again, and I know you can press ↑ until you find it again, but that goes through every command and could take a while if you typed it long ago.  Is there anyway to get this to work in Ubuntu's Terminal?

I have searched, but not found anything on this. I am looking for a functionality in bash, using a terminal.  Way back when, I had a user on a debian system, and a friend set me up with a convenient history search feature (I believe I used tcsh then), where I would type the beginning of a previous command, hit up-arrow, and it would do a search, based on the partial string.  E.g. if my history is:  ./script.pl ./script.pl arg1 cat output cat output | grep yada   And I type ., and press up-arrow, it would show me: ./script.pl arg1. Press it again and it would show ./script.pl, etc.  Very much like it would perform a grep on .bash_history. Is there a way to get this functionality?


Basically, I just want to know the advantages of Lagrangian and Hamiltonian mechanics over Newtonian mechanics, that made it much more preferable and widely used!

What is Lagrangian mechanics, and what's the difference compared to Newtonian mechanics? I'm a mathematician/computer scientist, not a physicist, so I'm kind of looking for something like the explanation of the Lagrangian formulation of mechanics you'd give to someone who just finished a semester of college physics.  Things I'm hoping to have explained to me:   What's the overall difference in layman's terms? From what I've read so far, it sounds like Newtonian mechanics takes a more local "cause-and-effect"/"apply a force, get a reaction" view, while Lagrangian mechanics takes a more global "minimize this quantity" view. Or, to put it more axiomatically, Newtonian mechanics starts with Newton's three laws of motion, while Lagrangian mechanics starts with the Principle of Least Action. How do the approaches differ mathematically/when you're trying to solve a problem? Kind of similar to above, I'm guessing that Newtonian solutions start with drawing a bunch of force vectors, while Lagrangian solutions start with defining some function (calculating the Lagrangian...?) you want to minimize, but I really have no idea. What are the pros/cons of each approach? What questions are more naturally solved in each? For example, I believe Fermat's Principle of Least Time is something that's very naturally explained in Lagrangian mechanics ("minimize the time it takes to get between these two points"), but more difficult to explain in Newtonian mechanics since it requires knowing your endpoint.


I'm working on a project with multiple sensors. These sensors need to be synchronised with eachother as precisely as possible without a physical connection. I need to make sure that if I tell them to start measuring that they start at the same point. If one starts 1 microsecond later than the other then all the measurements  will    be no use.  Im planning on using GPS to make synchronise the clock rates as being demonstrated here  So my GPS synchronises the relative time of the sensors, but can I also use it to synchronise the absolute time? so I can set a t(0) at the exact same time?

I need to synchronize two micro-controllers so that they can measure the speed of propagating waves. The time delay measurements need have microsecond accuracy (error less that 1/2 of a microsecond).  I have two micro-controllers () which use a 12MHz crystal.   They are both equipped with Bluetooth transceivers. The Bluetooth transceivers send and receive packets with a jitter of ~15 millisecond.   I hope to synchronize the micro-controllers using the Bluetooth transceivers, or some other creative method.   I have tried synchronizing them by touching them together, but I need them to stay synchronized for about 10 minutes, and their clocks drifted too fast. Maybe if it was possible to accurately predict the clock drift, this method would work.   How should I go about achieving this synchronization?


Given that a series {$x_t$} where $x_t=sin(t+U)$, $U$ has uniform distrubution on $(0,2\pi)$. Now $E(U)=\pi$, $var(U)=\frac{\pi^2}{3}$, I noticed that $sin(x)$ is a periodic function, $U$ is from $0$ to $2\pi$, so is there some useful information? Here I think it is hard to find the p.d.f of this $sin(\cdot)$ function or using Taylor's expansion. Can anyone help me with that? Thank you in advance!

Given that a series {$x_t$} where $x_t=\sin(t+U)$, $U$ has uniform distrubution on $(0,2\pi)$. Is {$x_t$} second-order stationary? I know here we need to show $E(x_t)$ is constant and $cov(x_{t+s},x_{t})$ only depends on $s$. Now $E(U)=\pi$, $\mathrm{Var}(U)=\frac{\pi^2}{3}$. My problem is how to find the expection value and covariance of $\sin$ function? Indeed $\mathrm{Cov}(x_{t+s},x_{t})$ = $E(x_{t+s}x_{t})-E(x_{t+s})E(x_{t})$, so the probelm is expected value.. Here I think it is hard to find the p.d.f of this $\sin$ function. Can anyone help me with that? Thank you in advance!


Code which I execute with pdflatex  \documentclass[12pt,demo]{report}  \usepackage{geometry}     \usepackage[finnish]{babel}  \begin{document} Toisen vaiheen jatkotukimuksena voi olla, miten temporaali-ilmi\"{o}t, kuten s\"{a}hk\"{o}verkon h\"{a}iri\"{o}t, n\"{a}kyv\"{a}t signaaleissa.  Oppilasty\"{o} on tapaustutkimus siit\"{a}, miten ... Oppilasty\"{o} on tapaustutkimus siit\"{a}, miten ... Oppilasty\"{o} on tapaustutkimus siit\"{a}, miten ... Oppilasty\"{o} on tapaustutkimus siit\"{a}, miten ... Oppilasty\"{o} on tapaustutkimus siit\"{a}, miten ... Oppilasty\"{o} on tapaustutkimus siit\"{a},  \end{document}   Fig. 1 Output is wrong with the geometry package where first line passes the margin,  Fig. 2 Output is correct without geometry package     OS: Debian 8.5 TexLive: 2016

In this MWE, Latex doesn't hyphen the word "développement" and prefer to create a HUGE hbox.   \documentclass[a4paper,12pt,dvipsnames]{report} \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage{lmodern} \usepackage[a4paper, showframe]{geometry}  % Title Page \title{} \author{}   \begin{document} \section{Section}  \subsection{Subsection} \begin{description}  \item [Marhalie Toucse : ]  ingénieure de la plate-forme SORTATZ. Elle réalise   le développement du projet des tex écrit pour lipsum lagae legarc sgsi text text text text text text text text text.  \end{description} \end{document}


I looked in the low quality review queue (there was a 1 on it).  Turned out to be a question.    That is certainly not a looks good.  I've already added a comment before it hit the queue (and have the only comment there at all).  Its not an edit I can save.  And .  The only possible answer is skip.  If this is the case, I don't believe I should have seen the review in the first place.  Given that:   I already commented on the question have no close votes   These two criteria should have the question not show up in the review queue because there is no action I could reasonably take.  You might say that 'Edit' is an action, but I believe that the fact that I've previously seen (and commented on) the question means that I don't have any idea of an edit to make to fix it.  (Aside: I am curious if it would have hit my low quality review queue if I had previously cast a close vote on it)  Yes, I know this is not the easiest thing to reproduce, but its there and can be reproduced in the right circumstances.

The  shows low quality questions and answers.  When out of close votes I'm not sure what to do with the questions. I can still handle the answers fine as there are no limits on the actions I can take.  But for questions one of the actions (close) requires close votes. Sure, I say ok or skip but without the ability to vote for close the process feels a little pointless as I don't have a tool to say "this is bad" anymore and I'm "wasting" time skipping bad things.  Also I'm not sure how the "not sure" votes are recorded and if that degrades the quality of some collected stats when I repeated skip questions that are clearly bad.  One suggestion might be to not show low quality questions to people that are out of close votes.    Some days later: Now that the initial batch of "low quality posts" are done this might not be that big of an issue any more. Even so it happened to me again that I was out of close votes and got a low quality question that I couldn't do anything about.  Another solution might be to allow the casting of a "should be closed" suggestion just to drive down the questions score a little (i.e. counteracting "looks ok" votes) instead of showing the, unusable, option to close.


I am a new Linux user. In Windows, I used to monitor and sometimes improve my performance by using a software called "Advanced Systemcare". Is there some kind of software like this for Ubuntu? or someway that I can monitor how the things are going?  Thank You!

In Windows 7 there is a tool that calculates some kind of index of your machine: . I am not sure how it is done, but it is nice to know, to be able to compare machines.  Does anybody know of anything similar for ubuntu?


Whenever I scroll using my mouse, my computer does not register the small, individual clicks of the scroll wheel. I have to scroll much faster to make anything happen.  I have tried this with two different mice, the Razer Death Adder and Logitech G403, same problem.  Computer specs: iMac, Late 2012, 10.12.1

Since I upgraded to Sierra, mouse wheel scrolling has become a lot worse. When I scroll the wheel fast, it behaves like it did before and scrolls a bunch of lines, but when I scroll the wheel one notch at a time, nothing happens.  I use a Steelseries Sensei gaming mouse but I also tested with a basic Dell mouse. (There's no model number on it.) As of macOS 10.12.1, this issue affects all programs.  Are there any workarounds? Please don't suggest USB Overdrive or any other nagware.  Edit:


I don't have enough rep to view deleted posts yet. So should I be able to see the first few lines of a post via the tooltip?: (ie. rolling over the titile of a post gives you a tooltip with the first few lines of the post, just like hovering over a question on the main question page)    Yes, it's spam, I know, but there are more legit reasons for flagging - should a low-rep user be able to see a bit of this content??

This is sort of a follow-up to a feature request that resulted in obscuring spam / offensive content from 10K-visible answers:   Suggest the same to be done for questions. As of now, spam questions (, ) preserve their titles and content. Suggest to revise the titles to something like     This question was marked as spam or offensive and is therefore not shown   And the text to something like:     This question was marked as spam or offensive and is therefore not shown - you can see the revision history for details".   Where "the revision history" links to the question revision history.    For those interested, here is a link to screen shots of how spam shines through my flagging summary page and is displayed to me when I click the link to one of deleted questions: .  For the sake of precision, flagger having less than 10K rep would see only upper screen shot - the one that lists question titles ("Call giRℒs blah blah <phone number>") - in their  page.


Complete newbie to QGIS and can't seem to find how to do this.  I have created a map with 84 different polygons.  Then I've imported approx. 8000 points.  What I want to do is now query my map and get it to tell me the polygon each Point is in and then be able to extract this into a text or CSV file.  Can anyone help?

I have two layers, one (A) has point features and the other (B) has polygons.  How do I produce a new table with some (the ID) or all the fields from the A table and some (the area code) or all from the B table where the B polygon contains the A point?  I am using QGIS.


I came across this funny proof-  $$4$$ $$=4+\frac 92-\frac 92$$ $$=\sqrt{(4-\frac 92)^2}+\frac 92$$ $$=\sqrt{16+\frac{81}{4}-36}+\frac 92$$ $$=\sqrt{25+\frac {81}{4}-45}+\frac 92$$ $$=\sqrt{(5-\frac 92)^2}+\frac 92$$ $$=5-\frac 92+\frac 92$$ $$=5$$  I suspect,that the error is in the second line where operation on negative is done before positive violating $BODMAS$ rule.But,$\sqrt{(4-\frac 92)^2}=4-\frac 92$ and the similar solving continues.So, where is the real error? Thanks for any help!!

$$\begin{align} 2+2 &= 4 - \frac92 +\frac92\\ &= \sqrt{\left(4-\frac92\right)^2} +\frac92\\ &= \sqrt{16 -2\times4\times\frac92 +\left(\frac92\right)^2} + \frac92\\ &= \sqrt{16 -36 + \left(\frac92\right)^2} +\frac92\\ &= \sqrt {-20 +\left(\frac92\right)^2} + \frac92\\ &= \sqrt{25-45 +\left(\frac92\right)^2} +\frac92\\ &= \sqrt {5^2 -2\times5\times\frac92 + \left(\frac92\right) ^2} + \frac92\\ &= \sqrt {\left(5-\frac92\right)^2} +\frac92\\ &= 5 + \frac92 - \frac92 \\ &= 5\end{align}$$  Where did I go wrong


I am using a 64-bit Java 7 installation on Windows 7 64-bit.  As per , I was having trouble enabling Java applets to run inside Firefox just to find out that the 32-bit Firefox does not like 64-bit java.  I would like to keep my 64-bit java as my default installation, as I need it for my development work and my IDE did not like 32-bit, and have a separate 32-bit installation just for Firefox.    How can I change which Java installation Firefox is using so that it does not automatically pick up the one from the path?

I am trying to enable Java (not JavaScript) in my Firefox v. 33 so that I can use applets within the browser.  Currently, I just get a dark gray box across the whole screen when I try to load an applet, without any error message or prompt to install plugin.  As per , I tried going into the Firefox plugin page to activate it, however, it wasn't there listed.  I do have Java 7 installed and it is in the path:  >java -version java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)   What do I need to do to get Firefox to see my Java installation and recognize it as a plugin so that I can enable it and view applets inside the browser?


I need someone proficient enough in stats to help me clear up some confusion. The p-value is a conditional profitability. Given a null hypothesis to be true (mean difference in two groups to be 0), the p-value is the probability that chance alone caused the next observation to be outside of the statistical model. When the p-value is small, that is greater evidence against the null. Is up till that point correct?

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


I recently did a search on my own name, and three email addresses I've used over the last 30 years.  I have done this before, and I typically get something like 100,000 hits, with a lot of them dating back to the days of usenet.  Recently when I ran this search, The initial screen said 14,000 hits, then on clicking page 2, I ended up with 97  The distribution of hits is odd too:  I have a few from various Stack Exchange posts, but I've written hundreds.  I have a few from Medium.com, Quora, and a single one from Slashdot from decades ago.  All of these are sites where I have written a lot.  But I am also indexed on sites where I may have made a single response to a blog.   Why are my search results so incomplete?   How can I get a complete list of every post I've written anywhere on the internet?

That's kind of a recursive Google Search that should be self-explanatory. It did take me some time to tweak the sentence and trying to find a number which would correspond precisely, the reason why I changed it to "hundreds" instead! :P  If you have used Google long enough you certainly have stumbled on situations similar to this, many times. Whenever it shows less than 10 pages it's quite easy to see it. The point is: the number of results on any page except the last one seems like a terrible estimate.  What's even weirder,  the estimate suddenly becomes much better and almost exactly the same on all pages than it is on the last page - the only page that's always correct.  So, anyone knows why?


Prime means the greatest divisor of that number is $1$ and itself. But where do I go from here?

Prove or disprove 'If $\gcd(a,b)=1$ then, $\gcd(a^2,b^2)=1$, with $a,b\not= 0$'  I need to prove this statement. I think it is true and also the converse is true.  I took some examples such as $\gcd(2,5)=1$, and $\gcd(4,25)=1$...  But how can I prove this? I know that $1=ax+by$ for some $4x,y\in \mathbb{Z}$.. But not sure   How to go from there..   Any clue?


Is it possible to draw graphs like the image below in LaTeX?

What packages do you use and recommend for creating graphics in your LaTeX documents?     As this is a community wiki post, please add your package to the accepted answer (or add a comment, and someone with >100 rep will add it to the CW answer), and include a brief description of what differentiates it from others and how it can be used (GUI drawing tool which generates code, type in raw text, or generates image for inclusion in document).   We'll eventually sort these answers under headings.


When I compile the following MWE with lualatex or xelatex I get strange vertical spaces between paragraphs on page 2 (see picture of output below).   \documentclass[a4paper,11pt,parskip=full,twoside]{scrbook} \usepackage{polyglossia} \setmainlanguage{english} \usepackage{blindtext}  \begin{document}  \chapter{Chapter} \section{Section} \blindtext \subsection{Subsection} \blindtext \subsection{Subsection} \blindtext  \blindtext  \blindtext \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection}  \end{document}   The problem does not occur when I remove the parskip option to the \documentclass. I would like to keep the parskip behaviour but I would like to get rid of these ugly spaces.

I'm writing my bachelor-thesis and have a couple of small sub-sub-sections explaining conversions, like in the following  \subsubsection*{Assignment}  This document only explains non-compound assignments. The other kind, i.e \texttt{a += b}, is supported by the language too, but is not yet implemented.   \begin{itemize} \item If the first is an \texttt{auto} variable, no conversion takes place when assigning       the right hand side to the variable designated by the left hand side.  \item Otherwise, an assignment conversion takes place converting the given value to the type       of the designated variable.  \item Assignment requires an lvalue as the left hand side, and yields an lvalue result.  \end{itemize}  \subsubsection*{Multiplication} % ...   But latex renders it quite ugly with much space in between the items. I think it does so to fit the whole page. How can I tell it not to do so? Is what I'm doing right at all?


A right-click on panel doesn't bring this up and not listed in View/Toolbars or View/Panels ... have a very specific page size so really need to change from default A4.

I am trying to change the page size in the QGIS 3.0 Composer but I am not able to see the Composition tab.  I have right clicked an empty space in the toolbar but did not see anything about composition.  I am using Windows 7.  I tried looking at the QGIS docs but they are still in testing.


How to prove zeros of a real analytic function (non-zero function) is always countable?

Let $f$ be holomorphic in a domain $U$, then $f$ has at most countably zeros.  How can I prove this statement? I have seen it in Sheng Gong  explicitly, but without any indications.


In Ubuntu 18.04, I do this:    Super-E to open Nautilus Click on Home Type a letter of a desired directory, e.g. d if I want to go to Documents.  I then try to mouse-click on Documents. But at this point, Nautilus is jammed for three minutes until eventually I get a popup notification that "Search for d is ready."   My user home has only 52 directories and 22 other files.  I think that the entire subtree of my user-home is being searched for that letter d. How do I avoid that? I do wish I could use that d keypress to go to the right part of the directory listing.

Until now I was using a "traditional" version of Nautilus: that that comes with Ubuntu 10.10. Now I'm using 3.6.3, included with Ubuntu 13.04 (most likely any recent version is equivalent for the scope of my question, anyway).  One major difference between the two is the search-as-you-type behavior: in classic versions of Nautilus, when you typed an input, the file with the closest alphabetical match would become the selected one, the eligible files/folders being restricted to the current directory.  The new behavior is to perform an optionally-global search instead.  Can one configure Nautilus to provide the previous functionality ?


Installing a single receptacle, non gfi, on a 20 amp breaker to be used only for a specific piece of equipment (compressor). Compressor specs say, “power consumption will average between 9-11 amps of power and spike near 16 amps”. Can I get away with 14 gage wire? This is for a home food Freeze dryer

Running 12-2 Romex cable from the electrical panel to a J-box located in attic. J-box will connect two GFCI outlets and extend a 14-2 cable to the ceiling light fixture box, where other 14-2 cable will be used for a switch.   Circuit breaker is 20A.  Is that OK? Is it code compliance?


A while back I've created a new tag [xsd-1.1] (). It now shows to have been created by the "Community" user; why is this?

On September 29th, I created the  tag for  Today, while checking the tag description, I saw that the  seems to be .  Why is that? Why has the Community user "stolen" the spot as author of the tag?


My various managers have decided that it's too expensive to keep paying for a subscription to the RedHat network for OS updates. Is it possible to switch to Fedora/CentOS or do I need to reinstall the OS to do this properly?  EDIT: Just found  duplicate. Oops.

I've found myself in charge of installing some software on an old server running RHEL 5. Unfortunately, since it's just a development server now, it no longer rates a license. I'd like to continue using yum for dependency resolution, etc. My first thought was to just point yum at some CentOS repos, but some googling turned up this instead: . Is this sort of approach my best bet? If so, how much of the migration process is different for my scenario compared to the one in those instructions?


I have previously upgraded from 16.10 to 17.04 but it didn't go well at all.  I used deja-dup to restore my settings and this resulted in a messed up connection manager, the inability to change the wallpaper anymore, and random app crashes.  What is the recommended way to upgrade Ubuntu? And if reinstalling from scratch, what is the point of the deja-dup backup if it can't be restored without creating issues? How else do you migrate your settings?

Is it better to install Ubuntu completely new or is the upgrade process just as good? In other words, will my computer run just as problem-free and efficiently when I upgrade as opposed to a fresh install?


I'm trying to figure out how to prove that $$\sum_{k=1}^n k^2 {n\choose k} = n(n+1)2^{n-2}$$ I suspect that it has to do with using $$2^{n-2} = \sum_{k=1}^{n-1} {n-2 \choose k-1}$$ But I'm really not sure. Any help would be appreciated, thanks!

I found crazy (for me at least) induction example, in fact it just would be nice to prove. (Even have problems with starting) Any hints are highly valued: $$0^2\binom{n}{0}+1^2\binom{n}{1}+2^2\binom{n}{2}+\cdots+n^2\binom{n}{n}=n(1+n)2^{n-2} $$


I am trying to create some extremely user friendly print composer templates that have an awful lot of autotext  data that updates for each composer without having to manually type it in.   I have done this by using text boxes and inserting expressions for the required text. Currently I have file path, filename, project title, user , date and time etc but have not yet worked out how to add grid details etc.   I have got a grid with a frame and zebra around the outside of the map but it would be nice to be able to add a line of text that says something along the line of "Map centred on xxxxxx, xxxxxx" using the os grid reference, or something along those lines.   I would also like to add the composer name as an expression so its automatically updated

I am using QGIS v3.12 and projection EPSG:27700 - British National Grid.  I am trying to add a label to my map layout which will give the grid reference of the centre of the map as a UK 8 digit grid reference ( e.g. "AB123456" ).  So far I have managed to get the x and y coordinates using the expression:   Grid reference at map centre: [%round(x (map_get (item_variables('Map1'), 'map_extent_center')),0)%] , [%round(y (map_get (item_variables('Map1'), 'map_extent_center')),0)%]   Is there any function available in QGIS that can translate these coordinates into the required format?   Sorry my coding skills are not that great!


I am facing on problem my submit function not working I don't know where is the problem. I am using laravel framework 5.2 h  $('#CheckImageCount').on('click', function() {   var arr = [];   $('.table-error').find('tr').each(function() {     if ($(this).find('td:eq(1)').find('select').val() != '') {       if ($(this).find('td:eq(2)').find('select').val() == '') {         arr.push('false');       } else {         arr.push('true');       }     } else {       arr.push('true');     }   });   if ($.inArray('false', arr) > -1) {     swal("Alert!", "Please Select Working Hours in right way!")     return false;   } else {     $.ajax({       type: 'POST',       url: 'CheckImageCount',       success: function(resp) {         if ($.trim(resp) == "empty") {           $('.error-1').fadeIn('fast').delay(1000).fadeOut('fast');           return false;         } else {           $("#registerBusiness").submit(); // here i want to submit the form         }       },       error: function() {}     });   } });     My form id is registerBusiness it not submit the form even my page not goto that function here is my form  and submit button  <form id="registerBusiness" role="form" method="POST" action="{{ url('/business-for-sale' )}}">{{ csrf_field() }}   And Submit buttton  <button id="CheckImageCount" type="button" class="btn btn-info">Save And Continue </button>

What is the difference between HTML <input type='button' /> and <input type='submit' />?


Find all sub-fields of $K:=\mathbb{Q}(\sqrt[4]{5},i)$ by giving generators.    I have shown that $K/\mathbb{Q}$ is a Galois extension and that its Galois group $G:=\text{Gal}(K/\mathbb{Q})$ is generated by $\tau$ and $\sigma$, where $\tau(i)=-i, \tau\left(\sqrt[4]{5}\right)=\sqrt[4]{5}$ and $\sigma(i)=i, \sigma\left(\sqrt[4]{5}\right)=-i\sqrt[4]{5}$. Hence, $G\cong D_4$, where $D_4$ denotes the dihedral-group of $8$ elements.  Thus, there are $9$ sub-fields of $K$ (as $D_4$ has $9$ sub-groups), two of which are obviously $K$ and $\mathbb{Q}$. Now I don't know how to find the others. For example, what is the sub-field $K_1$ respectively $K_2$ generated by the subgroups $H_1:={\langle \sigma\rangle}$ respectively $H_2:={\langle \sigma^2\rangle}$?  I know that $[K_1:\mathbb{Q}]=2$ and $[K_2:\mathbb{Q}]=4$, but don't know how to find elements that generate $K_1, K_2$.

I was looking at the Galois group of the splitting field of $x^4-7$ over $\mathbb{Q}$. I found it to be $\mathbb{Q}(\sqrt[4]{7},i)$, and the Galois group to be the dihedral group of order $8$. Now $D_8=\langle \sigma,\rho\mid \sigma^4=\rho^2=1, \sigma\rho=\rho\sigma^3\rangle$.  I know $D_8$ has $5$ subgroups of index $4$, there should be $5$ subfields of $\mathbb{Q}(\sqrt[4]{7},i)$ of degree $4$ over $\mathbb{Q}$ by the fundamental theorem of Galois theory.   I found $3$ of them to be $\mathbb{Q}(i\sqrt[4]{7})$, $\mathbb{Q}(\sqrt[4]{7})$, and $\mathbb{Q}(\sqrt{7},i)$.   I can't figure out what the other $2$ are, but I think they're the fixed fields of the subgroups $\{1,\rho\sigma\}$ and $\{1,\rho\sigma^3\}$, but I can't determine those. Does anyone have any idea what the other two subfields of degree $4$ over $\mathbb{Q}$ are? Many thanks.


I hope this question actually is in order since it does not seem to have a "correct" answer:  I am about to get into drawing game-theoretic trees and while I am familiar with LaTeX in general, I am not so much with TikZ and particularly not with the drawing of trees.  From what I found, tikz-qtree and forest seem to be the two most common packages to be used (please correct me if I am mistaken). Since I will have to use the syntax of one either way, my question is: which one of the two to go for. Is one considered easier to use, more widespread/stable, more flexible, etc. - or are they not actually to be compared?

I have drawn the following tree in TikZ. What I don't like about it is   that I have to manually adjust the sibling distance for each level; and the syntax is too cumbersome.   It has been suggested to me by @percusse and @AlanMunn that using tikz-qtree and/or forest may be a more efficient way to produce the same result. But I don't have experience in using either package.   It would be nice if someone can reproduce my example using either of these packages, so that I can have quick example to learn from instead of reading a 150-page manual trying to find an answer.    \documentclass{standalone} \usepackage{tikz} \usepackage{amsmath}  \begin{document}  \tikzset{   % Two node styles for game trees: solid and hollow   solid node/.style={circle,draw,inner sep=1.2,fill=black},   hollow node/.style={circle,draw,inner sep=1.2}, }  % macro for entering payoffs \newcommand\payoff[1]{   $\begin{pmatrix} #1 \end{pmatrix}$ }  \begin{tikzpicture}[font=\footnotesize]   \tikzset{     level 1/.style={level distance=15mm,sibling distance=65mm},     level 2/.style={level distance=15mm,sibling distance=30mm},     level 3/.style={level distance=15mm,sibling distance=15mm},     level 4/.style={level distance=15mm,sibling distance=10mm},   }    \node[hollow node,label=above:{Nature}]{}     child{node[solid node,label=left:{P1}]{}       child{node(l1)[solid node]{}         child{node[solid node,label=below:{\payoff{1\\-1}}]{}edge from parent node[left]{L}}         child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[right]{R}}         edge from parent node[left]{U}       }       child{node(l2)[solid node]{}         child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[left]{L}}         child{node[solid node,label=below:{\payoff{2\\-2}}]{}edge from parent node[right]{R}}         edge from parent node[right]{D}       }       edge from parent node[left,xshift=-10]{A}     }     child{node[solid node,label=right:{P1}]{}       child{node(r1)[solid node]{}         child{node[solid node,label=below:{\payoff{-2\\2}}]{}edge from parent node[left]{L}}         child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[right]{R}}         edge from parent node[left]{U}       }       child{node(r2)[solid node]{}         child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[left]{L}}         child{node[solid node,label=below:{\payoff{-1\\1}}]{}edge from parent node[right]{R}}         edge from parent node[right]{D}       }       edge from parent node[right,xshift=10]{B}     }   ;    \draw[dashed](l1)--(l2)--node[midway,above]{P2}(r1)--(r2); \end{tikzpicture}  \end{document}


Consider the following MWE:  \documentclass{article} \usepackage{mhchem}  \begin{document}  \ce{{}^3He} has a higher vapour pressure, and therefore a lower boiling point,  than \ce{{}^4He}: the result of this is that pumping away the most energetic  molecules from the bottom layer preferentially removes \ce{{}^3He}.  \end{document}   which yields the (correct) output. (I don't have enough rep to post three images separately!)  Attempting to package the awkward \ce command into a custom macro messes up the spacing with the following words, though not with punctuation:  \documentclass{article} \usepackage{mhchem}  \newcommand{\HeThree}{\ce{{}^3He}} \newcommand{\HeFour}{\ce{{}^4He}}  \begin{document}  \HeThree has a higher vapour pressure, and therefore a lower boiling point, than \HeFour: the result of this is that pumping away the most energetic molecules from the bottom layer preferentially removes \HeThree.  \end{document}   Placing a fixed space (~) in the macro naturally reverses this, so the punctuation spacing is now incorrect:  \newcommand{\HeThree}{\ce{{}^3He}~} \newcommand{\HeFour}{\ce{{}^4He}~}   The outputs of these three arrangements are as follows:    What is the best way to get a consistent, correct spacing with a macro, that doesn't rely on me manually having to place a ~ after each time the macro precedes a word?  (I have the latest versions of TeXLive and mhchem installed)

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


Please help, i have a samsung galaxy tab 3 and i want to assign my volume keys for clicking pics when the camera is switched on and thank you in advance

I am searching for either a camera app with hardware button support, or for some other solution that would make it possible to use hardware buttons for making photo (shutter) in a camera app.  My phone, Samsung Galaxy S III mini doesn't have separate camera button, only power button, home button, back and menu buttons, and volume rocker.  It is IMHO much easier to use hardware button than to try to hit software button on camera screen.  I think this should be possible, because built-in Phone Call app can be configured to accept call with Home button, and end / cancel the call with Power button.    This question can be considered to be continuation of  which is about using hardware button (e.g. Home) to start camera.


Can you please let me know how to resolve this problem:  XML file:  <ref ref-type="sectiona">sdsadsd <email>EffectiveHealthCare@ahrq.hhs.gov</email>sdasd  &commat; Sec asdd</ref> <ref ref-type="sec">test Sec</ref> <ref ref-type="sec">seesdasdasd <email>EffectiveHealthCare &commat; dasdasdasd</email>asdad Sec</ref> <ref ref-type="sec"> Sec</ref>   My code:  XmlDocument xmlDocFile = new XmlDocument(); xmlDocFile.Load("xmlfile");   Exception      Reference to undeclared entity 'commat'. Line 35, position 65

I am trying to set the innerxml of a xmldoc but get the exception: Reference to undeclared entity  XmlDocument xmldoc = new XmlDocument(); string text = "Hello, I am text &alpha; &nbsp; &ndash; &mdash;" xmldoc.InnerXml = "<p>" + text + "</p>";   This throws the exception:      Reference to undeclared entity 'alpha'. Line 2, position 2..    How would I go about solving this problem?


So I have an iPad Mini First Generation that is currently jailbroken using Pangu. It is currently on 7.1.2 and I want to upgrade it to 9.0.2, but not the latest, which is 9.3.5. I've heard about using BLOBs and unsigned IPSWs but I'm not sure what to do. Could someone shed some light on me?  Thanks!

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


My personal habit of browsing SE is:   View the first page, and flag some questions Irrelevant: Answer questions that I can Clear the review queue   Now notice the 1st and 3rd things. I flag OT questions before doing review works, and some of them appear like this:      I don't think hitting "Looks OK" will affect the result of the review, because I think my previous flag should kick the same post into CV queue (and 3K people will close it). Am I right?

I just discovered that it is possible to get a post in the Low Quality Posts review queue that you have already flagged for closing, making reviewing that item impossible. Obviously, I don't want to 'Looks Good' something that I know should be closed, but at the same time I cannot 'Recommend Close' something I have already flagged leaving the only option being to skip the post.  Can the queue be changed so that it does not show posts which you have already flagged?


I have to upgrade an Ubuntu 12.04 to the last stable Ubuntu 13.10 but I have some doubts about how do it:  1) The first doubt is related to the fact that reading online seems that is not a smart thing update directly from 12.04 to 13.10 but I read that is better do it by steps:  from 12.04 to 12.10, then from 12.10 to 13.04 and finally from 13.04 to 13.10  Is it true?  2) Trying to perform the previous operation (the update from 12.04 to 12.10) following this official tutorial:   I have followed the previous tutorial and I have activate the notification "For any new version" of the system but in the Update manager appear to me a strange thing, infact it say to me that is available the new 14.04 release  Reading online I see that 14.04 will be the new LTS and that this will be available in April of 2014, so what is this? is it a beta version or something like this?  I can't chose to upgrade to 12.10 or 13.10.   What can I do to upgrade my system to the last stable version?  Tnx  Andrea

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I am searching for an OOTB procedure to make Document library support store/upload of a specific type of file (based on extension - for example .doc, .xls).  Can anyone provide specific guidance on how to achieve this?

I have a SharePoint intranet site where I need to allow users to upload certain documents. These documents need to be only PDF files for example.  What is the simplest way to restrict the document library to only PDF (just checking the extension PDF is fine) ?


I have a lovely little boy that just passed the 1 year mark. I am blessed with such a child and am enjoying being a dad everyday. Now my second child is underway and while I am happy that they are very little years apart. I am also worried with the attention this new child will need.   Every child is different and I cannot predict how my second born child will be, it will (by experience) need alot of attention and dedication.   What is the best way to handle this situation, where my attention towards my firstborn child is not neglected and that he will accept his new sibling in the best manner possible. I don't want him to feel left out.  Is it bad parenting also that I am worried about this 4 months before this situation will even arise?

I have a 4 and a half month old, so this won't be applicable for a while, but I would like to raise my son with the idea that he won't be an only child forever. I want my children to have a good relationship from the start. How do you prepare a toddler to be an older sibling?


I am a fairly strong user of ArcGIS, having started with version 8 long ago. But I'm looking for an inexpensive alternative right now for a client, and I want to investigate QGIS as a possible solution.  Thing is, I have never touched it before. I see mention of Grass databases and OSGEO4W shells and Python. I don't know what any of that means. No clue.  So where can I find a beginner's guide to QGIS, that more or less walks a newbie through the various components, how they work, why they're needed, and gets me to the point that I can import a .gdb and make some sample maps and queries to show my client?

I wish to familiarize myself with the capabilities of QGIS up to and beyond QGIS version 3.0.   Can you recommend some good web resources and tutorials that would show me QGIS' capabilities?   I am interested in both using QGIS through its GUI and in developing applications using QGIS.


I tried to install dlib using:  pip install dlib   It appeared to be working, but then I got an error message. Here it is:  Collecting dlib   Using cached dlib-19.7.0.tar.gz Building wheels for collected packages: dlib   Running setup.py bdist_wheel for dlib ... done   Stored in directory: /home/andrew/.cache/pip/wheels/17/1f/5d/187f5a9fc1d63527e97fa08f5f43315e72a7b7c2ebc54e02e3 Successfully built dlib Installing collected packages: dlib Exception: Traceback (most recent call last):   File "/home/andrew/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main     status = self.run(options, args)   File "/home/andrew/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run     prefix=options.prefix_path,   File "/home/andrew/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install **kwargs   File "/home/andrew/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install     self.move_wheel_files(self.source_dir, root=root, prefix=prefix)   File "/home/andrew/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files     isolated=self.isolated,   File "/home/andrew/.local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files     clobber(source, lib_dir, True)   File "/home/andrew/.local/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber     ensure_dir(destdir)   File "/home/andrew/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir     os.makedirs(path)   File "/usr/lib/python2.7/os.py", line 157, in makedirs     mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/dlib'   I'm not sure why it says permission denied. Does anyone know how to resolve this error?

When I used  pip install ipython   or  pip install "ipython[notebook]"   I get the following error:  Downloading/unpacking ipython   Downloading ipython-2.3.1-py27-none-any.whl (2.8MB): 2.8MB downloaded Installing collected packages: ipython Cleaning up... Exception: Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main     status = self.run(options, args)   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run     requirement_set.install(install_options, global_options, root=options.root_path)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1435, in install     requirement.install(install_options, global_options, *args, **kwargs)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 671, in install     self.move_wheel_files(self.source_dir, root=root)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 901, in move_wheel_files     pycompile=self.pycompile,   File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files     clobber(source, lib_dir, True)   File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber     os.makedirs(destsubdir)   File "/usr/lib/python2.7/os.py", line 157, in makedirs     mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/IPython'  Storing debug log for failure in /home/username/.pip/pip.log   What does this error mean? How do I fix it?


Errors:  Attempt to invoke virtual method 'android.view.View android.widget.ImageView.findViewById(int)' on a null object reference   or  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageDrawable(android.graphics.drawable.Drawable)'   SecondLayout.xml:  <ImageView     android:id="@+id/cafe"     android:layout_width="100dp"     android:layout_height="90dp"     android:layout_alignParentEnd="true"     android:layout_alignParentRight="true"     android:layout_alignParentTop="true"     android:layout_gravity="right"     android:src="@drawable/cafe" />  <ImageView     android:id="@+id/baron"     android:layout_width="100dp"     android:layout_height="90dp"     android:layout_alignParentEnd="true"     android:layout_alignParentRight="true"     android:layout_alignParentTop="true"     android:layout_gravity="right"     android:src="@drawable/bar" />   The first class has OneLayout.xml  ExampleBottomSheetDialog.class has SecondLayout.xml  In the first class, when you click on the marker, ExampleBottomSheetDialog.class is activated:  public boolean onMarkerClick(final Marker marker) {      ExampleBottomSheetDialog bottomSheet = new ExampleBottomSheetDialog();     bottomSheet.show(getSupportFragmentManager(), "exampleBottomSheet");      // Image replacement     if (...) {         ImageView img= (ImageView) findViewById(R.id.cafe);         img.setImageResource(R.drawable.bar);     }   How to resolve issue with null object?

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?


Hi I'm new to multithreading and TPL - testing Task call and writing the status back to text box on Main UI and didn't get the expected result. I'm testing this feature because I need to implement the tool for my work. My program will loop to create 30 tasks and start and showing which task are processing in Text box. I pass "i" counter into DoWork fuction and display that "i" counter. My Code as below private void DoWork(object state)        {            object[] obj = state as object[];            int i = Convert.ToInt32(obj[0]);                         Invoke(new MethodInvoker(delegate()            {                 richTextBox1.Text += "Testing" + i.ToString() + "\n";             }));        }         private void btnTest_Click(object sender, EventArgs e)        {            for (int i = 0; i < 30; i++)            {                Task t1 = new Task(() => DoWork(new object[] {i}) );                            t1.Start();             }        }  I'm expecting 1 to 30 display in text box in random order but it display like this. I have attached the image as well as display in here.  the result seems odd and mostly displaying like below (almost all display 30). "i" is parameter passing to "DoWork" as object. Testing0 Testing3 Testing12 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Testing30 Your help to make me understand and figure out to fix this issue is greatly appreciated. Regards William

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


I'm Italian so I don't know English very well.  While listening to Bob Dylan songs I've heard some strange use of progressive tense (is that the correct term?), the title of this question is one example. Why "the times are a-changing" and not "the times are changing"? I heard other examples (always in Bob's songs), but now I cannot find any.  Is this some sort of ancient English? Slang? Metric trick?

I have always been intrigued by the word usage in the title of this . Wikipedia mentions that the song was influenced by Irish and Scottish ballads:     Dylan recalled writing the song as a deliberate attempt to create an anthem of change for the moment. In 1985, he told Cameron Crowe: "This was definitely a song with a purpose. It was influenced of course by the Irish and Scottish ballads ...'Come All Ye Bold Highway Men', 'Come All Ye Tender Hearted Maidens'. I wanted to write a big song, with short concise verses that piled up on each other in a hypnotic way. The civil rights movement and the folk music movement were pretty close for a while and allied together at that time.    Is there a dialect where the form a-<gerund> is common? e.g. a-cooking, a-cleaning, etc.  If so, in what context would you use the form a-<gerund>?


The 1 from “1 hour ago” should not render in the middle of his name.   App Version: 1.6.6.2 Device: iPhone 6s OS Version: Version 11.0 (Build 15A5341f) (Beta 5)

:    The Arabic characters are displayed within the time. The expected behaviour is that the entire user name is displayed, followed by the time.   App Version: 1.6.6.2 Device: iPhone 6 OS Version: Version 10.3.3 (Build 14G60)


If two resistors (5 Ohms & 10 Ohms) are connected in parallel, current will flow through both resistors. Then, assume a parallel circuit (5 Ohms & 0 Ohms), why does current flows to the path with 0 Ohms only and not through both of the paths?

Why doesn't current pass through a resistance if there is another path without resistance? How does it know there is resistance on that path? Some clarification:  I understand that some current will flow through the resistance. A depiction of this phenomenon through Ohm's laws does not answer the 'why' part of the question as it does not illuminate the process behind this phenomenon. There seems to be disagreement among the answers on whether the charge repulsions are enough to cause this effect. Cited research would be appreciated to resolve this issue. To refine what I mean by this question, I think I should give an example of why I am curious as to the causal background of this phenomenon. If charge repulsions do in fact repel 'current' in the example of the short circuit, then why does the same phenomenon not happen in other parallel circuits. (Again, I know that not all circuits behave ideally) I believe the question is expressed in the most straightforward way possible. This should, however, not affect the scope of the answers. I do not wish to see or think on the level of an electron as circuit behavior always includes a cumulative effect due to the nature of electrostatic interactions.


I want to compose a 1-byte (unsigned char) number, knowing its bits value.  For example, 7th and 6th are always 0 and 1 respectively, values of 5th to 3rd are stored in three other variables, and 2nd to 0th bits shall take a value stored in one variable, e.g. decimal 5.  At first I fought I can create an array of 8 elements, to store each bit, then convert it to a decimal number using custom bin2dec, but the problem is 1) I don't want to use additional "self-written" functions, 2) I'm not sure, how to put value 5 there (it looks like I need to dec2bin at first).  I can solve this problem using SystemC, but I'm interested how to do it using C/C++ methods (without additional downloaded libs).

How do you set, clear, and toggle a bit?


If I change to Linux Ubuntu will my old SoundBlaster soundcard and some of my software that I used with windows XP still work?

Can .exe and .msi files (Windows software) be installed in Ubuntu?


With years of reading the books and watching movies, especially with the success of the Peter Jackson movies, the fact the main magical items of The Lord of the Rings are the rings seems straightforward, but thinking about it, it is definitively an odd choice.  Most fantasy novels I’ve read tend to feature more prominent magical items (sword, shields, staffs, armours), most of which have a direct combat related side. Most magical items I can remember from The Lord of the Rings seem to have more subtle properties. This includes weapons and the rings themselves.  Did Tolkien ever discuss his reasons to specifically choose rings, whether it was something that just “happened” or whether it was a fully thought out idea?

I was recently reading The Republic, by Plato, and when we came to the section about the ring of Gyges, my teacher claimed that this was the inspirition for the One Ring. I doubt he had any real evidence for this, but the story, or at least some aspects of it, are remarkably similar, so I get where he got the idea. Here's Plato's story:     According to the tradition, Gyges was a shepherd in the service of the king of Lydia; there was a great storm, and an earthquake made an opening in the earth at the place where he was feeding his flock. Amazed at the sight, he descended into the opening, where, among other marvels, he beheld a hollow brazen horse, having doors, at which he stooping and looking in saw a dead body of stature, as appeared to him, more than human, and having nothing on but a gold ring; this he took from the finger of the dead and reascended. Now the shepherds met together, according to custom, that they might send their monthly report about the flocks to the king; into their assembly he came having the ring on his finger, and as he was sitting among them he chanced to turn the collet of the ring inside his hand, when instantly he became invisible to the rest of the company and they began to speak of him as if he were no longer present. He was astonished at this, and again touching the ring he turned the collet outwards and reappeared; he made several trials of the ring, and always with the same result-when he turned the collet inwards he became invisible, when outwards he reappeared. Whereupon he contrived to be chosen one of the messengers who were sent to the court; where as soon as he arrived he seduced the queen, and with her help conspired against the king and slew him, and took the kingdom.   The story is being told by a character who is trying to prove that people are naturally evil, and given the opportunity (a magic ring that allows one to do whatever they like without being caught) people will act evil. To put that another way: power makes people evil.  We see that both rings are invisibility rings, seem to have evil origins, and both cause evil.  I wouldn't be the least bit surprised if Tolkien had read The Republic, probably in the original Greek, knowing him.  However, I also know that, at least, this wasn't Tolkien's origional inspiration. The ring wasn't even faintly evil in the first version of the Hobbit, published in 1937. In 1951 he changed it so that it worked better with The Lord of the Rings, which he was working on at the time.   So the question is: Was Tolkien inspired by the Ring of Gyges, or did he come up with a similar artifact on his own?  Disclaimer: I know that I'm generalizing a bit about the nature of the One Ring, and this is a loose analysis, so don't cite me as some sort of Plato expert. Also, please do not insult my teacher.


Assuming $\mu$ is the median of random variable $\xi$, prove, that,  $$\mathbb{E}~|\xi - \mu| \leq \mathbb{E}~|\xi - \mathbb{E}\xi|  $$  The case when  $\mu =  \mathbb{E}\xi $ is trivial, but I have no idea what to do when they are not equal.

For a continuous random variable $X$, I want to show that $E|X-m|$ is minimum implies $m$ is the median of the distribution. Assume that the distribution function is $F$ and the density function is $f$.  In this case, we basically need to minimize  $$\int_x |x-m|f(x)\,dx=\int_{x>m}(x-m)f(x)\,dx+\int_{x<m}(m-x)f(x)\,dx.$$  I am finally being left with $2mF(m)-m+E(X)-2\int_{x<m}xf(x)\,dx$. What does it mean to minimise this expression? Is there some way out?  Well, my intuition says that since I have to prove that $F(m)=0.5$, I somehow will need to show that $E|X-m|$ is minimised if $2mF(m)-m=0$ (as then I will get $F(m)=0.5$


I was messing around with the color codes trying to understand how color code is used in bash script and I found that it works fine without including \[\] around it as in here:  This..   red="\033[38;5;203m" export PS1="$red\u$green\$(__git_ps1)$blue \W"   ..gives the same result as that:  red="\[\033[38;5;203m\]" export PS1="$red\u$green\$(__git_ps1)$blue \W"   So is the second form necessary?

I have an issue where if I type in very long commands in bash the terminal will not render what I'm typing correctly. I'd expect that if I had a command like the following:  username@someserver ~/somepath $ ssh -i /path/to/private/key myusername@something.someserver.com  The command should render on two lines. Instead it will often wrap around and start writing over the top of my prompt, somewhat like this:  myreallylongusername@something.somelongserver.comh -i /path/to/private/key  If I decide to go back and change some argument there's no telling where the cursor will show up, sometimes in the middle of the prompt, but usually on the line above where I'm typing.   Additional fun happens when when I Up to a previous command. I've tried this in both gnome-terminal and terminator and on i3 and Cinnamon. Someone suggested it was my prompt, so here that is:  \[\033[01;32m\]\u:\[\033[01;34m\] \W\033[01;34m \$\[\033[00m\]  Ctrll, reset, and clear all do what they say, but when I type the command back in or Up the same things happens.  I checked and checkwinsize is enabled in bash. This happens on 80x24 and other window sizes.  Is this just something I learn to live with? Is there some piece of magic which I should know? I've settled for just using a really short prompt, but that doesn't fix the issue.


I would like to know how I can change file limits in a document library.

Can we increase list view threshold in SharePoint Online which is 5000 by default?


I answered  a few hours ago.  I saw an upvote on my answer, but there was no change in reputation.  Is it a bug?  My reputation was 912 points and even after the upvote it is same.  I didn't get any downvote there  I earned 20 reputation in today morning. so it is not matter of limit capping.  If this is a bug, where do I find help correcting my reputation?

Some questions and answers are marked Community Wiki and are owned by a community wiki user:  (In fact, this very question is one of them)  Why have Community Wiki posts? How do Community Wiki posts work? How does a post become a Community Wiki post? How can the Community Wiki status be removed from a post? How can I find Community Wiki posts?


I have been playing Mincraft with my son for last 10 months. We are both using iPad Pro's. And until recently we have had no problem connecting to each other worlds. Then about two months ago, suddenly we are no long able to connect to each other. We can still see each other. We can still start the join process on each others worlds. But every single time, we get the "Unable to connect to world" error. I have tried everything. I have rebooted the device. Swiped all of the apps out of memory. Signed out and back in again. Tried a third device. I checked the local network switch in settings. We are both on the same wifi network. I check the account settings at xbox live. I even deleted the game and reinstalled it. This is on a local network without any firewall or unusual router settings. Help!  Being stuck at home so much, we are really missing our favorite bonding experience. iOS 14.3, Minecraft v1.16.201

So my brother and I have been playing Minecraft together on our iPads for years now, but in September I got a new iPad Pro 3rd Generation and I’ve been having issues with Minecraft ever since. Every time we have tried to join each other’s worlds we get the message “Unable to connect to world”. Recently after the update on December 16th, it worked for about a week without having any issues, but now it has gone back to not letting us connect to the worlds. Both of us are able to connect to other people’s worlds, but not each other’s, we’ve tried many things to fix this but so far nothing has worked. If you have any ideas for what we should do please let me know, thank you so much!


From the literature I read that     For a neural network, the cost function, J(W,b) is a non-convex function, gradient descent is susceptible to local optima; however, in practice gradient descent usually works fairly well.   But on the other hand, support vector machine which is another popular classifier involves optimizing convex functions.  How is that solving SVM is a convex optimization problem and for feed forward neural network it is non-convex optimization?  Edit:    This link provides some information regarding the intuition behind the optimization in neural networks. But it is not clear there. Also my question was in the reason behind the difference in the optimization approaches in ANNs and SVMs. Both involves a cost function involves a sum of squared errors and a regularization term. Why is one convex optimization problem (SVM) and the other optimizing non-convex functions.

I am looking at SVM, and reviewing Lagrange multiplier. Let's say with the constraint function $$g(x,y) = x^2 + y^2 -1 > 0, $$ I am maximizing $$f(x,y) = x + y -1 .$$ Intuitively, since the constraint function does not provide a finite constrained region, there is no solution, and $f(x,y)$ can infinitely increase.  However, if I just plainly proceed with Lagrange multiplier calculation,  $$L(x,\lambda) = (x + y -1) +\lambda(x^2 + y^2 -1)$$ I get the solution: $$y,x = -\sqrt{2}/2, \lambda = 1/\sqrt{2}$$ And this still satisfies KKT conditions although the solution is wrong.  $$g(x) => 0 , \lambda =>      0, \lambda g(x) = 0.$$  I expected that I would have some result that conflicted KKT conditions, but nothing was violated.   Does this mean that Lagrange multiplier under KKT conditions can produce a solution that cannot be solved, without giving any indication of intractability?  If functions are complicated, what's the systematic way to confirm that the optimization with inequality constraint functions is solvable using Lagrange multiplier?


I’m working in Singapore, my salary is 3000 SGD per month. But I usually use cash for living costs (shopping, meal expenses, travel, rental) and my home is quite far away from the ATM, so I withdrew a lot of cash on salary day so far, my account balance is around 100 SGD every month. If I wait until I receive the next month of my salary to apply for a UK visa, is it possible? Because my salary isn’t too low in Singapore and I just visit the UK for 6 days.

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


The full equation  $$ Xf = X_o + V_o t + \frac{at^2}{2} $$  is integrated from the velocity function (which was integrated from constant acceleration function), right?  The problem is, I can't seem to put my mind around why the acceleration part needs to be halved.  Doesn't $at$ already measure the change in velocity over time? Why not just add that to the velocity then use the new V to measure Xf?

I'm preparing for my exam, but I have difficulties in perceiving why there is a $\frac{1}{2}$ in the distance formula $d=\frac{1}{2}at^2$?


(a) Prove that a linear operator $T$ on a finite-dimensional vector space is invertible if and only if zero is not an eigenvalue of $T$. (b) Let $T$ be an invertible linear operator. Prove that a scalar $\lambda$ is an eigenvalue of $T$ if and only if $\lambda^{-1}$ is an eigenvalue of $T^{-1}$. MY ATTEMPT (a) Let us suppose that $\lambda = 0$ is an eigenvalue of $T$. Thus $\det([T]_{\mathcal{B}}) =\det([T]_{\mathcal{B}} - 0 I_{n}) = 0$, and $T$ is not invertible. Conversely, let us suppose that $T$ is not invertible. Then $0 = \det([T]_{\mathcal{B}}) = \det([T]_{\mathcal{B}} - 0I_{n})$, and $0$ is an eigenvalue of $T$. (b) Indeed, provided that $\lambda \neq 0$, one has \begin{align*} Tv = \lambda v \Rightarrow T^{-1}(Tv) = T^{-1}(\lambda v) \Rightarrow (T^{-1}T)v = \lambda(T^{-1}v) \Rightarrow T^{-1}v = \lambda^{-1}v \end{align*} Once again, I am mainly interested in the wording of my proof. Any comments or contributions are appreciated.

I can't find the missing link between singularity and zero eigenvalues as is stated in the following proposition:  A matrix $A$ is singular if and only if $0$ is an eigenvalue.  Could anyone shed some light?


I'm making a set of very long (1000 rows each) data tabulars. I'm using the longtabu environment, since it can split over pages.  My problem is that each of the tables is around 16 pages long, and I'll make three or more.  I'd like to reduce the tabular (I'm using \tiny for this, although maybe that isn't enough) and split it into three columns per page. By this I mean once the tabular reaches the bottom of the page, it continues on the next column of the same page. My problem is that the multicols environment divides the page in three, but longtabu only fills the leftmost column of each page, making it kind of useless.  I have also tried making minipages with a width of 0.3/textwidth, but minipages can't split over a page like tabu, and I would have to make every one manually.  This is my code so far, I've omitted the titlepage and most of the rows for briefness:  \documentclass[a4paper,reqno]{article} \usepackage[spanish]{babel} \usepackage{graphicx} \usepackage[utf8]{inputenc} \usepackage[margin=2cm]{geometry} \usepackage{float} \usepackage{tabu} \usepackage{longtable} \usepackage{multicol} \graphicspath{{path}} \begin{document}  \tiny  \begin{multicols}{2}  \begin{longtable}{|c|c|c|c|c|c||c|}  \hline  $A_{crit} / A $ & $P/P_{0}$ & $\rho / \rho_0$ & $T/T_{0}$ & $a/a_{0}$ & $M_{crit}$ & M \\ \hline  \endlasthead  0.000 &  1.000 &  1.000 &  1.000 &  1.000 &  0.000 &  0.000 \\ \hline  0.009 &  1.000 &  1.000 &  1.000 &  1.000 &  0.005 &  0.005 \\ \hline  0.017 &  1.000 &  1.000 &  1.000 &  1.000 &  0.011 &  0.010 \\ \hline  0.026 &  1.000 &  1.000 &  1.000 &  1.000 &  0.016 &  0.015 \\ \hline  0.035 &  1.000 &  1.000 &  1.000 &  1.000 &  0.022 &  0.020 \\ \hline  0.043 &  1.000 &  1.000 &  1.000 &  1.000 &  0.027 &  0.025 \\ \hline  0.052 &  0.999 &  1.000 &  1.000 &  1.000 &  0.033 &  0.030 \\ \hline  0.060 &  0.999 &  0.999 &  1.000 &  1.000 &  0.038 &  0.035 \\ \hline  0.069 &  0.999 &  0.999 &  1.000 &  1.000 &  0.044 &  0.040 \\ \hline  0.078 &  0.999 &  0.999 &  1.000 &  1.000 &  0.049 &  0.045 \\ \hline  0.086 &  0.998 &  0.999 &  0.999 &  1.000 &  0.055 &  0.050 \\ \hline  %etc...  \end{longtabu}  \end{multicols}  \end{document}<code>   Any similar solution for this document would also be greatly appreciated  UPDATE  I have found a way around that works for me at least. It is a bit ugly, since it requires the tables to be compiled first.  First, I have separated the tables on their own document, half the size of an A4 \usepackage[margin=0cm,paperwidth=105mm,paperheight=297mm]{geometry} and compiled them in a single column.  Then in the main document I import them with pdfpages like this \includepdf[pages=-,nup=2x1]{Toberas.pdf}. Notice the 2x1 that will insert two pages side by side, virtually making two columns.  I guess if you make the tables smaller in a third of an A4, and select 3x1, you will have three columns.  I have uploaded the whole thing to my dropbox if you want to check it out, or if you want tabular data for nozzles and shock waves :).

I would like to put some longer tabular data inside the multicols environment while maintaining its balancing abilities. I have tried supertabular with the trick to redefine \newpage as columnbreak. This isn't good though, because the columns aren't properly balanced. Finally I ended up using \halign:  \documentclass[11pt, a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage{supertabular} \usepackage{multicol}  \def\shortlipsum{\par Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.\par}  \newcounter{entryno} \setcounter{entryno}{1} \def\tabline{Test & \the\value{entryno} & Description\addtocounter{entryno}{1}\\} \def\tablines{\tabline\tabline\tabline\tabline\tabline} \def\mybreak{\hrule width \columnwidth height 0pt \columnbreak}  \begin{document} \begin{multicols}{2} \shortlipsum \medskip  % % This doesn't balance the columns. Whole table ends up in the left column (it fits) % \begingroup\let\newpage\mybreak % \noindent\begin{supertabular*}{\columnwidth}{@{\indent}l l l} % \tablines\tablines\tablines\tablines\tablines\tablines % \end{supertabular*} % \endgroup  \begingroup\let\\\cr \noindent\halign{\indent#\quad&#\quad&#\hfil\cr \tablines\tablines\tablines\tablines\tablines\tablines} \endgroup  \medskip \shortlipsum \end{multicols} \shortlipsum \end{document}     I was wondering if I'm the only one using \halign to achieve this result. On the other hand supertabular leaves me with an undesired almost empty right column. How would you approach this problem?


I am quite new to blender and am trying to save this small animation I made, I know you can view the rendered animation by pressing CTRL+F12 but how do I save this as a video? Furthermore, when I tried to do it last time and found 400+ images in a blender folder. I have used a gif program to convert these 400+ images into a gif and turned that gif into a video, but is there a directer and more effective way?

Yesterday I was working on a simple animation, an animated logo.   Here is an image of the progress:    I already have the animation working and everything is okay with the project, but I can't figure out how I can render the animation and turn it into an AVI format video.  How do I render an animation in Blender?


Is it still possible to upgrade Kubuntu /Ubuntu without wiping the root partition?   I mean something like this:  instead of do-release-upgrade.  This method will be handy in case of unstable internet.  (My current running systems are Kubuntu 17.10 and Ubuntu 16.04 LTS, and I want to upgrade to 18.04 as soon as it's released)

I'm using Ubuntu 10.04 now and want to Upgrade to Ubuntu 11.04. The problem is my net connection is very slow and I can not do a network upgrade from the "Updates Manager".  So, is there a way that I can download the Ubuntu upgrade as an bootable CD image and upgrade from it?


How do you solve this equation:   $$\frac{dy}{dx} + \frac{1}{xy} = y^3$$  using Bernoulli's equation.  I've tried everything but I think there may be an error with the actual equation.

How do you solve this equation:  $$\frac{\mathrm dy}{\mathrm dx} + \frac{1}{xy} = y^3$$  I've tried to multiply everything by $y$ but I can not get all $x$'s ($\mathrm dx$) on one side and $y$'s ($\mathrm dy$) on the other.


For example:  "Would you like to eat a pizza and/or a hamburger"

As a programmer, I have no problem with seeing or using "and/or" in technical documentation. For example,     I can upvote an answer that satisfies me and/or mark it as accepted.   That's perfectly good English to me. However, if I were writing a novel, or even just an essay, or — heaven forbid — a poem, "and/or" would seem extremely out of place.  My question is, what should I be using instead? (I solemnly swear I will not use that knowledge to actually write a poem.)


Bibliography won't print, very minimal working example. I'm new to this stuff, and I can't find an answer in the LaTeX wikibook or by searching. No error messages, just nothing. I'm using Mac TeXShop latest version and the LaTeX compiler. Help!  Essay.tex:  \documentclass{article}  \begin{document}  kjghfhjjh \cite{Gib}\nocite{*}  %\bibliographystyle{alpha} \bibliography{Essay.bib}  \end{document}   In Essay.bib:  @book{Shur,     Author = {J. Shurman},     Date-Added = {2018-05-02 10:28:52 +0000},     Date-Modified = {2018-05-02 10:29:25 +0000},     Publisher = {John Wiley and Sons},     Title = {Geometry of the quintic},     Year = {1997}}  @book{Lam,     Author = {K. Lamotke},     Date-Added = {2018-05-02 10:27:58 +0000},     Date-Modified = {2018-05-02 10:28:45 +0000},     Publisher = {Friedr. Vieweg und Sohn},     Rating = {5},     Series = {Advanced Lectures in Mathematics Series},     Title = {Regular Solids and Isolated Singularities},     Year = {1986}}  @mastersthesis{Hob,     Author = {J. van Hoboken},     Date-Added = {2018-05-02 10:26:50 +0000},     Date-Modified = {2018-05-02 10:27:49 +0000},     School = {University of Amsterdam},     Title = {Platonic solids, binary polyhedral groups, Kleinian singularities and Lie algebras of type A, D, E},     Year = {2009}}  @book{Gib,     Author = {C.G. Gibson},     Date-Added = {2018-05-02 10:25:36 +0000},     Date-Modified = {2018-05-02 10:26:27 +0000},     Publisher = {Pitman},     Title = {Singular Points of Smooth Mappings},     Year = {1979}}  @book{AGV,     Address = {Boston},     Author = {V.I. Arnold and S.M. Gusein-Zade and A. Varchenko},     Date-Added = {2018-05-02 10:23:24 +0000},     Date-Modified = {2018-05-02 10:24:57 +0000},     Publisher = {Birkh\"auser},     Rating = {5},     Title = {Singularities of Differentiable Maps},     Volume = {I},     Year = {1985}}

I wrote a text using :  \documentclass[a4paper,12pt]{report},  and \begin{thebibliography}{99}.   Now I have to change and use ''bibtex''. I am completely unfamiliar with bibtex, What is a simple way that I can change it? ( what userpakage should I add ,... )


My issue is that upon startup, my Blender interface runs extremely slow. It takes 1+ seconds to process any mouse input--it takes over a second to move the mouse cursor from one point to the other, or to click on a single button.  I have used Maya, C4D, and 3DS Max and have never had this problem before. I tried opening Unity 3D and Maya, and they both run super fast on my gaming rig.  My Specs are:  Windows 10 AMD Six-Core Processor, 3.5 GHz 16GB DDR3 RAM 64 bit Os, x64-based processor NVIDIA GeForce GTX 750 Ti  I have seen very many posts on Blender Stack Exchange related to my issue, most notably, the ones with josepharaoh99 and KentZ, but none of them seem to solve my problem.   I have tried Right-Clicking on the Blender shortcut to "Run with graphics processor > Integrated Graphics," but the "Run with graphics processor" option is not displayed in the menu that appears when I right-click on the shortcut. I then tried to add Blender to NVIDIA Control Panel, but there is no option to do that.   Someone, anyone, please help me--I don't want to be doomed to a skipping-interface snail-paced Blender forever.

Update  This has been confirmed resolved in a later version 376.33 and possibly the update prior.     Okay, I recently did a computer update. I used to run Blender 2.77 on a Dell desktop (5 GB RAM, 2.7 GHZ, Windows 8, build in graphics card). Since that computer wasn't fast enough for my preference, I saved up and got a new gaming laptop - the Asus ROG GL552 (Windows 10, 16 GB DDR4 RAM, Nvidia GeForce GTX 960M with 4 GB DDR5 RAM, 2.6-3.5 Ghz, and quad-core intel processor). That laptop has been known to have outdated drivers, so when I got it, I updated it to up to date Windows 10 drivers.  As soon as I started Blender, I immediately noticed its speed. Even doing simple things, like clicking buttons, or rotating the view with the middle mouse button, took too long to register in the program. I tried changing some User Preference System settings, but that didn't really help much. And the hardware seems to be fine - the render is lightning fast (renders the startup scene in under .1 second; it's just laggy when loading the uv screen), so I don't know why it's like this, or what to do. Also, I ran Blender 2.77 on this computer, and it was also slow (although it was fine on my previous computer).  It could be an issue with drivers perhaps (or maybe OpenGL?), but I ran Unreal Engine 4, and had none of the same issues - the speed was pretty decent on that; so I'm not sure why Blender would be so slow. Any help is appreciated - thanks guys!


I write a paper in Chinese and I use \cite{eaton2002technology} to reference a paper. I want to change the "and" in "Eaton and Kortum (2002)" into "和".   I also cite a Chinese paper and want to change the "and" in the references list to "、".  The desired result is: "Eaton 和 Kortum (2002)"  mini example:  \documentclass[12pt,a4paper]{article} \usepackage[UTF8]{ctex} \usepackage[round]{natbib}  \begin{document}  我的中文文章参考了 \cite{eaton2002technology}  我的中文文章参考了 \cite{fanziyin2010}  \medskip \bibliographystyle{plainnat} \bibliography{citation}  \end{document}   Bibliography file (citation.bib)  @article{eaton2002technology, Author = {Eaton, Jonathan and Kortum, Samuel}, Journal = {Econometrica}, Number = {5}, Pages = {1741--1779}, Publisher = {Wiley Online Library}, Title = {Technology, geography, and trade}, Volume = {70}, Year = {2002}}   @article{fanziyin2010, Author = {范子英 and 张军}, Date-Added = {2016-11-05 15:26:38 +0000}, Date-Modified = {2016-11-06 06:10:56 +0000}, Journal = {经济研究}, Number = {3}, Pages = {53--64}, Title = {财政分权, 转移支付与国内市场整合}, Volume = {45}, Year = {2010}}   IDE:Texpad 1.731  Engine: Xelatex, BibTex  Compiled output of the mini example:    Desired output:

I'm using natbib, german babel and natbib creates output of the form   Foo and Bar (1337)   I would like to get   Foo & Bar (1337) for citet and (Foo & Bar 1337) respectively for citep.


I recently installed Windows 8.1 on my laptop. I have the Windows folder on its own 64GB mSATA drive. For Windows 7 this was great because the Windows folder was small. With Windows 8.1 the drive is almost full, and the Windows folder takes up almost 20GB (the WinSXS folder takes up most of that space).  Is there a good reason that the Windows folder takes up so much space? Is there a way that I can cut down on some of the space that it takes up?

In typical PCs the Size of Windows Folder is 6 to 8 GB but in my Case its 25GB. How can I delete the unwanted files from the Windows Folder (which, in turn, will optimize my C Drive size).  My system is Windows 7 with 60 GB in C Drive with 59 GB occupied.


I faced the following problem: I took a raw-data with two variables: x - independent variable, ranges between 1-5. y - dependent variable, boolean variable 0, 1. Got the following density plot, and performed Linear Regression: percentages under each accumulation represent the % of dots in a specific accumulation out of all the dots in the same x value. Sum of percentage of a specific x value is 100%.  The R - squared is about 0. However, if I calculate the average of each x value (which is the % between each accumulation where y = 1 actually) I got the following:  R Squared about 1 !! It also affect Pearson correlation coefficient ofcourse. Can you help me to solve the discrepancy please ? By definition, linear regression describes the mean of each x value, so if the averages so fit linear line, why the R squared of the first plot is so low ?

I have a data set with two columns, the first of which is to be used as a response variable and the second of which is to be used as a predictor variable. The predictor variable, however, is populated by integer values, many of which are zero.  When I place data points for the predictor and response variables into groups corresponding groups, no group has a value of zero anymore.  Performing a linear regression on the data when it is in this form produces a significantly higher $R^2$ than in the ungrouped regression. My question is:  Is something seriously wrong with my methodology if the change in $R^2$ is massive between the grouped and ungrouped models?  Can this be explained by the large number of zeros?  To provide a slightly better idea of what I mean by grouping consider the following data:  A  B  0  .2 0  .3 0  .3 2  .6 4  .7 6  .8 7  .7 4  .4   A would be grouped as follows:  0-3 4-7   with the new B values being the group averages.


Referring to one of my last questions. I need for my WPF application to Auto-Calculate the Age of the movie based off of the release date, and the current date. This is one area that I personally have no experience with. I would assume it would have something to do with DateTime and CurrentDate. Any suggestions?  My WPF has a Movie class which contains:  namespace FinalExam {     public class Movie     {         public string movieName { get; set; }          public DateTime releaseDate { get; set; }          public DateTime movieAge { get; set; }          public string onDVD { get; set; }          public string onBluRay { get; set; }          public string genreType { get; set; }          public string directorName { get; set; }          public string producerName { get; set; }          public int movieLength { get; set; }          public string moveRating { get; set; }             } }   MovieUtility class which contains:  namespace FinalExam {     public static class MovieUtility     {         public static bool isItDate(string dateString)         {             DateTime date;             bool isDate;             isDate = DateTime.TryParse(dateString, out date);             return isDate;         }         public static DateTime ConvertStringToDate(string dateString)         {             DateTime date;             DateTime.TryParse(dateString, out date);             return date;         }     } }   And the MainWindow.xaml which is where the user will input the data and a datagrid will display it, and last, the MainWindow.xaml.cs which is where all of the strings are called and the data will be added the the List.  namespace FinalExam {     /// <summary>     /// Interaction logic for MainWindow.xaml     /// </summary>     public partial class MainWindow : Window     {         //GLOBAL VARIABLE AREA         List<Movie> movieList = new List<Movie>();          public MainWindow()         {             InitializeComponent();         }          private void but_Submit_Click(object sender, RoutedEventArgs e)         {             bool isGoodToAddNewMovie = true;             Movie newMovie = new Movie();             newMovie.movieName = txtBox_MovieName.Text;             newMovie.onDVD = txtBox_DVD.Text;             newMovie.onBluRay = txtBox_BluRay.Text;             newMovie.genreType = txtBox_Genre.Text;             newMovie.directorName = txtBox_Director.Text;             newMovie.producerName = txtBox_Producer.Text;             newMovie.moveRating = txtBox_Rating.Text;              if (MovieUtility.isItDate(txtBox_ReleaseDate.Text))             {                 newMovie.releaseDate = MovieUtility.ConvertStringToDate(txtBox_ReleaseDate.Text);                 txtBox_ReleaseDate.Background = new SolidColorBrush(Colors.LightGray);             }             else             {                 txtBox_ReleaseDate.Background = new SolidColorBrush(Colors.Red);                 isGoodToAddNewMovie = false;             }              int length;              if (int.TryParse(txtBox_Length.Text, out length))             {                 newMovie.movieLength = length;                 txtBox_Length.Background = new SolidColorBrush(Colors.LightGray);             }             else             {                 txtBox_Length.Background = new SolidColorBrush(Colors.Red);                 MessageBox.Show("Please enter movie length in minutes.");                 isGoodToAddNewMovie = false;             }              //ADD PERSON TO LIST             if (isGoodToAddNewMovie)             {                 movieList.Add(newMovie);                 dataGrid_Movies.ItemsSource = new List<Movie>(movieList);             }         }     } }   So how would I go about Auto-Calculating the Age of the movie based on release date and have it automatically put the age of the movie into the DataGrid on the Window.

Given a DateTime representing a person's birthday, how do I calculate their age in years?


Hi I would like to know if it's possible to do something like this kind of thing.  int myInt = 0; Type myType = myInt.GetType(); List<myType> lst = new List<myType>();   I know here the variable myType old the Type int but I would like to know if it there any way to do something similar to this in a context I wouldn't know the type of myInt  This made me ask myself why this isn't valid. I know it's stupid but why it's not valid?  List<typeof(int)> myList = new List<typeof(int)>();  So I'm looking to do something among the line up here. Is there any way to archieve something similar to any of those?

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I have  in play, which lets me gain life when an Angel enters the battlefield. If I play  on a creature, turning it into an Angel, does adding the subtype like that count as an Angel entering the battlefield, so that I gain life?

I was playing a game last night with a guy who was playing a new Simic Gatecrash deck, and he claimed that if he made a land into a creature, it counted as entering the battlefield, thus triggering evolve (or other "enters the battlefield" abilities).  I thought this was incorrect, being that the creature didn't actually enter the battlefield, it was just created.  Which of us was right?


Are there any LaTeX technologies that could allow to simulate a poorly-scanned document, such as fuzzy fonts? I imagine that rotating odd and even pages slightly should not be too difficult, but the fuzzy looking fonts baffle me.

This question led to a new package:      I'm giving my students an old exam and barely remembered to change the date at the top. A colleague and I joked about how long we could reuse the same exam, and it made me wonder if I could use LaTeX to create an exam that looked like it was written in 1963 on a typewriter.  Here's what I'd like to see:   Typewriter font even in math mode. (Several ways to accomplish this; is there a "best" way?) Slight inconsistencies in the printing of each letter. I attempt this below adapting code taken from . Each word has a random vertical shift, though I'd like to see it reduced to each letter having its own vertical shift. Other typewriter-like irregularities would be great. It would be great if math-mode delimeters \left(, \right}, etc., can be created in a piece-meal fashion as they did in days of old. Fraction bars, tops of square-root symbols -- any horizontal line, really -- is made up of a series of en-dashes that don't quite match up.   Here is what I've come up with so far:  \documentclass[10pt]{article}% This is a document class providing more font size options \usepackage{graphicx} \usepackage{ifthen} \usepackage[textwidth=7.5in,textheight=9.5in]{geometry} \pagestyle{empty}  % thanks to Bruno Le Floch: https://tex.stackexchange.com/q/9331/4012 % and in his comments to https://tex.stackexchange.com/a/29458/4012 \usepackage[first=-1,last=1]{lcg}% you can play around with these values \makeatletter \newcommand{\globalrand}{\rand\global\cr@nd\cr@nd} \makeatother  \newcommand{\randomvshift}[1]{\globalrand\raisebox{\value{rand}pt}{#1}}  %%% thanks to Martin Scharrer: https://tex.stackexchange.com/q/11598/4012 \makeatletter \def\typewriter#1{%     \@typewriter#1 \@empty } \def\@typewriter#1 #2{%    \randomvshift{#1}\space    \ifx #2\@empty\else     \expandafter\@typewriter    \fi    #2% } \makeatother \begin{document}\tt  \typewriter{Math 101 Fall 1963}  \begin{enumerate} \item   \typewriter{$\frac{\texttt{d}}{\texttt{dx}}\texttt{(x)}^2$}  \item \typewriter{State the Fundamental Theorem of Calculus.}  \end{enumerate}  \end{document}


I am having a bit of trouble understanding the free functor, T: Set $\rightarrow$ Grp, where T($A$) = Free group generated by $A$. The question I have  in mind is how do I map arrows. In Set, the arrows are just functions from $A$ to $B$, with no regards to any structure whatsoever. But in Grp, the arrows are group morphisms. I cant figure out how to map my arrows in Set to a morphism between groups.  Any hints or insight is deeply appreciated  Cheers

Example 1.2.4 in  says that an assignment of the free group $\mathcal F(S)$ on $S$ to every set $S$ is a functor. He gives an example of how to assign to a particular function of sets $f:S\to S'$ a homomrphism $F(f):F(S)\to F(S')$ but doesn't give a general proof. So I was wondering how to prove that it is indeed a functor?   (He doesn't give a rigorous definition of the free group on $S$ either, but let's assume that a formal definition is known (it's the set of equivalence classes of reduced words on the set $S\cup S^{-1}$, where $S^{-1}$ is the set consisting of all symbols $s^{-1}$ for all $s\in S$, with the operation of concatenation).)


I have Ubuntu 16.04 installed on my PC (on SSD-500GB). I did an update using sudo apt update and rebooted the system. But when I tried to log in again I got stuck in a login loop and got a black screen. I did everything possible to remove that error (even purged the nvidia drivers) but failed.   So without any backup of my data I tried reinstalling Ubuntu from USB. I didn't format or delete anything. Now I can log in, but I've lost all my data which was on the PC's SSD. Is there any way to recover the data? Any software I can use to do that? Any help will be much appreciated.

Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file.


I got this message: Sorry, we are no longer accepting questions from this account. See  to learn more.  Now I'm a little paranoid, so sorry if I am violating some other rule at this moment.  Is there any way to tell exactly why I was suspended from asking questions?  The link has a list of possible reasons, not 'the' reason(s).  Perhaps one reason is that I have been deleting my unanswered questions.  I felt I was being good by cleaning up after myself.  I ask a lot of questions that nobody knows the answer to.  Is it better that I just leave them?  I also had one or two messages moved to serverfault.com.  I'm very sorry for whatever else I did.  But I will say that I do not understand the logic against self-deletions.  I delete items that are unanswered, and I do not see how it is my fault that nobody knows the answer to some of my questions.  At any rate, if that is against the rules then I will stop doing it.  I'm just a little curious.  Thanks, Dave

A self-deleted post is often not a low-quality post and may simply be a mistake noticed by the user, unlike moderator- or community-deleted posts which may indicate serious problems that the user may not recognize or may have intentionally posted.  Should they carry less weight in the question ban algorithm?


I got to know this while learning PHP and I don't exactly know what is this used for, and this is while connecting to database

I'm writing a php app to access a MySQL database, and on a tutorial, it says something of the form  mysql_connect($host, $user, $pass) or die("could not connect");   How does PHP know that the function failed so that it runs the die part? I guess I'm asking how the "or" part of it works. I don't think I've seen it before.


I am new to ubuntu and recently installed ubuntu 20.04 on my system. At the time of installation, I was getting this error: PCIe bus error severity=corrected type=physical layer (receiver id) for encounter this problem I did: Add pci=noaer at the end of GRUB_CMDLINE_LINUX_DEFAULT in the grub file. Then my kern.log file was getting pretty big, as big that it was consuming the whole of my root folder. For this, I installed ubuntu using an internet connection. and this problem was also solved. Now on running sudo apt update  I am getting this error: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1165 (packagekitd) N: Be aware that removing the lock file is not a solution and may break your system. E: Unable to lock directory /var/lib/apt/lists/  I couldn't even remove this lock file; as my whole system will crash out, May you please help me to encounter this error, I will be very much thankful to the whole of the community.

when I try to apt-get update I'm getting the below error,  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/