$P(x)$ is a polynomial with leading coefficient $1$ and degree 2009 such that $P(0)=2008,~P(1)=2007,~P(2)=2006,\cdots,P(2008)=0$. Find $P(x)$.   Using remainder theorem, If $P(x)$ is divided by $x-0$, the remainder is $P(0)=2008$. $$P(x)=xQ(x)+2008$$  How should I proceed?

Let $P(x)$ be a polynolmial with degree $2009$ and leading coefficient unity such that $P(0)=2008,P(1)=2007,P(2)=2006,\ldots,P(2008)=0$,then the value of $P(2009)=n!-a$ where $n!$ is $n$ factorial,$n,a$ are natural numbers.Find $n+a.$    If i let $P(x)=a_{2009}x^{2009}+a_{2008}x^{2008}+a_{2007}x^{2007}+\cdots+a_1 x+a_0$ with $a_{2009}=1$,then it is very difficult to find $P(2009)$ with the given data.What should i do?


I'm applying linear regression on. problem and getting very small R squared, e.g. 0.087 and adjusted R squared 0.057. This is very small for R squared. What does this mean for my regression? Does it mean the variables do not have enough predictive power?

I've got a very small coefficient (-0.04) and R-squared (0.028) but a significant P value (<0.0001). My question is:   Is my result still meaningful? How to interpret it?   The result is from a linear regression model in a big database in R.  The independent variable (B) has more than 200 values, whereas the dependent variable (A) has 13 values.   The potential correlation is below:   So, I ran a linear regression model between A and B and the result is:  >mod1<-lm(A~B)          Call:         lm(formula = A ~ B)           Residuals:              Min      1Q  Median      3Q     Max           -63.174 -11.816  -1.651  10.184 118.001            Coefficients:                        Estimate Std. Error t value Pr(>|t|)              (Intercept) 132.274547   0.303723 435.511  < 2e-16 ***          B            -0.036675   0.009052  -4.052 5.13e-05 ***          ---         Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1          Residual standard error: 18.52 on 8093 degrees of freedom            (123 observations deleted due to missingness)         Multiple R-squared:  0.002024,  Adjusted R-squared:  0.001901          F-statistic: 16.42 on 1 and 8093 DF,  p-value: 5.134e-05   As you can see, the coefficient of B is only -0.03 and adjusted R squared is only 0.1% but with a p value <0.0001. Is my result reasonable and countable? Surely, my database is larger (8000 records) and even a very small effect size will show a significant P value. But how would I interpret this?


In a code:  a = 6 for i in range(a):     print("case #",i)   While printing the output, as shown below:  case # 0 case # 1 case # 2 case # 3 case # 4 case # 5   There is an extra space between '#' and the variable 'i'. How to remove this space? In fact, if we normally write:  a = 'sam' print("hello",a)   then also, the output is:  hello sam   there is an extra space between "hello" and "sam". How to remove this?

In python, if I say  print 'h'   I get the letter h and a newline.  If I say   print 'h',   I get the letter h and no newline.  If I say  print 'h', print 'm',   I get the letter h, a space, and the letter m.  How can I prevent Python from printing the space?  The print statements are different iterations of the same loop so I can't just use the + operator.


When I log into my machines after an apt-get upgrades, I often get this message:    System load:  0.06              Processes:           86   Usage of /:   28.3% of 7.75GB   Users logged in:     0   Memory usage: 6%                IP address for eth0: 172.31.41.38   Swap usage:   0%    Graph this data and manage this system at:     https://landscape.canonical.com/    Get cloud support with Ubuntu Advantage Cloud Guest:     http://www.ubuntu.com/business/services/cloud   *** System restart required ***   Obviously, restarting a production server is not something I'm keen to do very often.  Why is *** System restart required ***? What risks do I take if I don't restart it?

These two nice SE posts  comment on restarting one's ubuntu machine but they leave me with a few questions:   How do you actually do the restart (I'm a beginner and using 12.04.1 LTS)? Should I always restart the system when prompted to? Does restarting the system affect access to it via SSH or there any other caveats one needs to think about before doing this?


I have this simple html:  <input type="text"         placeholder="onlynumbers"         name="onlynumbers"         pattern="\d{1,5}"          maxlength="5">   I need to restrict the number of characters to 5. It works. But I still can type other characters than numbers. I have tried various pattern, for example:  pattern = "[0-9]"   But it is still possible to type other characters than digits.  If I change the type attribute to number, then only digits are accepted in the input field but the maxlength attribute doesn't work. I can enter as many digits as I want. I heard this was a bug in Chrome. Is that the problem?  Is there a cross-browser way to fulfil these requirements:  An input field (text or number, no matters) that only accept digits and doesn't let the user enter more than 5 digits.

Is there a quick way to set an HTML text input (<input type=text />) to only allow numeric keystrokes (plus '.')?


After years of annoyance I finally setup Insert/Overwrite mode in Bash Terminal by creating this file:    $ cat ~/.inputrc  # ~/.inputrc - complements /etc/inputrc - global inputrc for libreadline # April 15, 2019 # See readline(3readline) and `info rluserman' for more information.  $include /etc/inputrc  Control-o: overwrite-mode   See:   I could always recall previous command with the ⭡ (Up Arrow) key and reposition the cursor for editing. I was always annoyed having to erase characters and insert new ones rather than replacing.  Now I can type Ctrl+O to turn off Insert Mode and type over existing characters. Then type Ctrl+O again to restore Insert Mode.  But how can I assign the Insert key instead of Ctrl+O to toggle overwrite-mode on and off?

I'm running similar commands on (e.g.) a set of files. As an example, let's say I'm doing something like this (this isn't what I'm doing, it's just an example):  > cat path/to/dir/file01.txt   [file contents] > another-command path/to/dir/file01.txt   [more output] > cat path2/to/dir/file02.txt   [file contents, from which I can tell I should do something different] > different-command path2/to/dir/file02.txt   [yet more output] > cat path3/to/dir/file03.txt   [file contents] > another-command path3/to/dir/file03.txt   [output]   etc.  It would be convenient if, after using the ↑ key to return to a previous command, I could overwrite non-duplicated text ― like the file name, or a common part of the path — rather than having to delete it and retype it.  Is there a way to do this?


i'm using \usepackage[authoryear]{natbib} for my bibliography, but as i am brazilian, i'd like to change the and when using \citet{} to e.  For example, instead of Brunnermeier and Sannikov (2014), i would want to display  Brunnermeier e Sannikov (2014). Does someone know a way to change that?  The babel package does not translate natbib.

How can I change the citation conjunction from english "and" to catalan "i"?  Otherwise  Author = {Kirk, D. and MacPhail, A.},   would get cited as (Kirk and MacPhail, 2002) when it should be (Kirk i MacPhail, 2002).  When there are more than 2 authors I get et al. which is fine.  I've seen  and  which do not work with apalike style.  Also, I'd rather not use biblatex if possible.


Please do not try to close this question.  doesn't have the answer I want. I found this integral in a book (I forgot the name). $$\int_{0}^a \dfrac{\cos(\pi n x/a)}{x^2+a^2}\ \! \mathrm dx $$ Where $a>0$ and $n\in \mathbb{Z^+}$. I tried differentiating under the integral sign w.r.t. $n$ and preparing a differential equation, but here is the problem. Let's prepare differential equation from the raw form. $$I(n)=\int_0^a \dfrac{\cos(\pi n x /a)}{x^2+a^2}\ \! \mathrm dx $$ Differentiating both sides twice w.r.t. $n$, $$\begin{align}  \dfrac{\mathrm d^2}{\mathrm d n^2}I(n)&=-\dfrac{\pi^2}{a^2}\int_0^a \dfrac{x^2\cos(\pi n x/a)}{x^2+a^2}\ \! \mathrm dx  \\ &= -\dfrac{\pi^2}{a^2}\int_0^a \cos(\pi n x /a) \ \! \mathrm dx +\pi^2 \int_0^a \dfrac{\cos(\pi n x /a)}{x^2+a^2}\ \! \mathrm dx \\ &= -\dfrac{\pi}{an}\sin(\pi n )+\pi^2I(n)\end{align}$$ As we know, $\sin(n\pi)=0 \ , n\in \mathbb{Z}$, so we end up with $$\dfrac{\mathrm d^2}{\mathrm d n^2}I(n)=\pi^2I(n)$$ Now, let's start with the substitution $x=at$. $$I(n)=\dfrac{1}{a}\int_0^1 \dfrac{\cos(\pi n t)}{t^2+1}\ \! \mathrm dt$$ Again differentiating twice w.r.t. $n$, $$\begin{align} \dfrac{\mathrm d^2}{\mathrm d n^2}I(n) &=-\dfrac{\pi^2}{a}\int_0^1 \dfrac{t^2\cos(\pi n t)}{t^2+1}\ \! \mathrm dt \\ &=-\dfrac{\pi^2}{a}\int_0^1 \cos(\pi n t)\ \! \mathrm dt+\dfrac{\pi^2}{a}\int_0^1 \dfrac{\cos(\pi n t)}{t^2+1}\ \! \mathrm dt \\ &= -\dfrac{\pi}{an}\sin(\pi n)+\pi^2I(n) \\ \dfrac{\mathrm d^2}{\mathrm d n^2}I(n)&=\pi^2I(n)\end{align}$$ In both the cases, the results are the same. But they don't work for different values of $a$ and $n$. How can I do this integral using the method I displayed? As the comments have suggested we have to reconsider the domain of $n$, and solve the integral for $n \in \mathbb{R}$. In that case, the differential equation will be $$\dfrac{\mathrm d^2}{\mathrm dn^2}I(n)=\pi^2I(n)-\dfrac{\pi}{an}\sin(\pi n)$$ We have to solve this differential equation.

How can I evaluate $$\int_{-a}^a \frac{\cos(\pi n x/a)}{x^2+a^2}\,\mathrm dx$$?  My attempt : $$\begin{align}\mathcal{I}& =\displaystyle\int_{-a}^a \dfrac{\cos(\pi n x/a)}{x^2+a^2}\mathrm dx \\ & = 2\displaystyle\int_0^a \dfrac{\cos(\pi n x/a)}{x^2+a^2}\, \text{ ,even integrand}\\ &=2\displaystyle\int_0^{\pi n} \dfrac{\cos u}{\frac{a^2u^2}{n^2\pi^2}+1}\left(\dfrac{a\mathrm du}{n\pi}\right)\, \text{ ,via substituting $u=\dfrac{\pi nx}{a}$}\\ &=\dfrac{2\pi n}{a}\displaystyle\int_0^{\pi n} \dfrac{\cos u}{u^2+n^2\pi^2}\, \mathrm du\\ & =\dfrac{2\pi n}{a}\displaystyle\int_0^{n\pi} \dfrac{\cos u}{(u-i\pi n)(u+i\pi n)}\,\mathrm du\\ & =\dfrac{i}{a}\underbrace{\displaystyle\int_0^{n\pi} \dfrac{\cos u}{u+i\pi n}\mathrm du}_{\mathcal{I_1}}-\dfrac{i}{a}\overbrace{\displaystyle\int_0^{n\pi}\dfrac{\cos u}{u-in\pi}\mathrm du}^{\mathcal{I_2}}\, \text{ ,via partial fraction decomposition}\end{align}$$ $$\begin{align}\mathcal{I_1}&=\displaystyle\int_0^{n\pi}\dfrac{\cos u}{u+i\pi n}\mathrm du \\&=\displaystyle\int_0^{(i+1)n\pi}\dfrac{\cos(v-i\pi n)}{v}\mathrm dv\, \text{ ,via substituting $v=u+i\pi n$}\\ & = \displaystyle\sum_{k=0}^\infty \dfrac{(-1)^k}{(2k)!}\displaystyle\int_0^{(i+1)n\pi} \dfrac{(v-i\pi n)^{2k}}{v}\mathrm dv\, \text{ ,via Maclaurin series}\end{align}$$ from where I can't figure out further. Any help is appreciated.


Which is the grammatically correct statement :  "We are travelling in a car"  Or  "We are travelling by a car"

Which one is correct?         I go to school by foot.   I go to school on foot.       Are there instances when the expression by foot is preferred?    My last question is the following:   Why is the singular noun, foot, used?     If a person goes to school by bus/train/car they are using only one means of transport, they are travelling in one car not two. But people use both feet for walking, so why would the following expressions be ungrammatical?         I go to school by feet     I go to school on feet      I read the answers on this question  but they did not convince me.


I have a player who is planning a monk aarakocra, and he asked me this: Unarmored Movement just says "speed". Does that mean all speed for each movement type, or just ground speed?

The Storm Sorcerous Origin (from Unearthed Arcana) includes the following feature:     Wind Soul   At 18th level, you gain a flying speed of 60 feet...   The Mobile feat (PHB, pg 168) includes the following:     Your speed increases by 10 feet.   If a character had both these traits, would they have a flying speed of 60ft or 70ft?  Similarly, if the sorcerer casts Haste on themselves, would their fly speed increase from 60ft to 120ft? And if Mobile does affect the fly speed, would the Haste spell then increase it to 140ft?


Is there a way that I can add single points to QGIS (v3.4) by inputting coordinates directly into QGIS, rather than creating a CSV and adding them that way?  I know there used to be a plugin that could do this in previous versions, but it doesn't seem available in 3.4.

I would like to add several coordinates at specific British National Grid Easting and Northing values. I know this can be done by bringing in a .csv, but I want to know is there a way to manually enter the numbers in QGIS 3.4, and then the point moves to that location ? I've read that in QGIS 2.x there was a plugin called Numerical Vertex Editor that doesn't seem to exist for 3.x ?


i have this piece of html code where i have two date pickers (input type="date") and a textfield with id="numdays". I want to calculate the number of days between the two selected dates and display the number in my textfield. I also want to restrict selection of a date earlier than today. i think this can be done throught javascript or jquery. Your help would be much appreciated. Thanks.

Pickup Date:<input type="date" class="textbox" id="pick_date" name="pickup_date"

Dropoff Date:<input type="date" class="textbox" id="drop_date" name="dropoff_date"/>

Number of days:<input type="text" class="textbox" id="numdays" name="numdays"/>

How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:  <input id="first" value="1/1/2000"/> <input id="second" value="1/1/2001"/>  <script>   alert(datediff("day", first, second)); // what goes here? </script>


When we divide $n^5+5$ by $n+5$, we get a remainder $-620$, i.e., $n^5+5=K(n+5)-620$ , now how to proceed further?

What is the maximum value of $n$ if $n + 5$ divides $n^5 + 5$, $n$ being a natural number? I tried to solve by binomial theorem but it failed.


After changing region/country, News can't be opened. App Store shows installed, with "Open" button next to the App. Tapping on it does nothing.  Asking Siri to open it, Siri says "can't right now". I'm using an iPhone SE and the storage is not full. The widget shows. Tapping on articles (in widget) opens Safari.  Anyone else had this, and solved it?

Storage shows that System takes about 12 Gb of storage.  Anyone else have System taking up 12 GB after installing, and know how to fix it?  Edit: storage taken up by system keeps rising. Reaching 13 GB.       iPhone SE.   Restart didn't help.


My question is how to evalute this limit: $$ \lim_{n \to +\infty} \sqrt{1 + \sqrt{2 + \sqrt{3 + \sqrt{...+\sqrt{n}}}}} $$

$ \lim_{n\to\infty} {\sqrt{1+{\sqrt{2+{\sqrt{\cdots +\sqrt{n}\ }\ }\ }\ }\ \ }\ } = ? $ Either closed answer or an upper bound would help.


I have a problem where json is encoded as base64 and I have to read that base64 and decode it and use the values of json. My Json Structure: {   "name" : "myname",   "id" : "1234568",   "class" : "science" }  My Base64: ewogICJuYW1lIiA6ICJteW5hbWUiLAogICJpZCIgOiAiMTIzNDU2OCIsCiAgImNsYXNzIiA6ICJzY2llbmNlIgp9  How can I decode this and get the values of the class?

I have an image that is Base64 encoded. What is the best way to decode that in Java? Hopefully using only the libraries included with Sun Java 6.


On all sites (as far as I've tested), the search text in the site selection dropdown clips off the top and bottom:    Setup: FF 58.0.2, Windows 10. Doesn't occur in Edge, haven't tested in Chrome.

The current community top bar menu contains an edit named "Find a SE community". The text in this edit is partially obscured on the top and on the bottom:        I'm using FF 58.0.2.


Knowing that the monic polynomial and finitely-generated module definitions of integral elements over a commutative ring are equivalent, how can one prove that these elements form a ring?  Thanks.

remained somehow incompletely solved. The OP also asked for an explicit form of the minimal polynomial of the sum (respectively, product) of two algebraic elements (in a field extension). Although such form is, in general, impossible to find, he proposed the polynomial  $\Pi_j\Pi_i (x-\alpha_i-\beta_j)$ (respectively, $\Pi_j\Pi_i (x-\alpha_i\beta_j)$) as possible candidates.   The question is the following:      Have these two polynomials the coefficients in the base field?   I find it also useful for this .


Recently I've encountered a problem with articles' usage in one specific case. (Articles aren't the strongest part of my English proficiency)  Which one should I use?     Prepare the project specification      Prepare a project specification   (Consider examples to be a task name)  I'm not sure which article to use because of the fact that the project I'm talking about is known (for me and for those who may read the task) but the specification is not written yet (and at the moment of creating task even unknown what should be in it).  Probably I have to use the last one? Or If the project is defined does it make the specification to be defined too (i.e. the specification of the project) or not (i.e. there may be occasions when a project have a few different specifications)?  Sorry for any grammar mistake I've made. It would be my pleasure to get your guidance or remarks to improve my English. Many thanks!)

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


I let Cicero live and left the Dawnstar Sanctuary, I then came back and he was gone! So where is he now? Because I want to make him my follower/companion.

It's said that if  is spared in  quest, he remains in the Dawnstar sanctuary and can be later hired as a follower. Well I did just that and I can't find him anywhere. Where exactly is he? Does he disappear and only reappear after some other moment in the game?


I am looking for a name of one specific UI element. I have unsuccessful tried to identify it before but this attempt failed.   What I am looking for is an n-to-n selector where items move between two states. Lets say you have two buckets (states), one on the left, one on the right. There are multiple items in the left bucket and you can move them to the right bucket and back.  What is the name of this element? How is it different from normal list where you can select multiple items?

Two list-boxes, side by side, one with available items, the other with selected items, with arrows in between to move items back and forth.


Today I installed elementary OS over lubuntu on my laptop While asking fo the partion to choose I chose remove all data of all os by accident and after Installation I had only one partition of 156gb(that is the size of hdd). Out of that 146.7 gb was free.  All my data on that disk is lost. Is there any way of recovering that data . I only want to recover the photos that resided on my disk (may be around 3-4 gb) as I don't have any backup. Please anyone help me in recoveing my data . Thanks in advance.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


These are my disks.   I'm using Lutris, which is a platform for Linux gaming. I saved a game in the DATA disk. Every time I launch the game, I get the message: Wine Prefix doesn't exist. My current temporary solution is to open the Nautilus File Manager and browse the DATA disk. Could anyone support me with this case?  Also, the Computer disk is SSD, and the DATA disk is HDD.

How do you make HDDs and partitions mount at startup on Ubuntu?  I always keep my media and data files on separate partitions - one 2tb HDD and a 400 odd gig partition.  I have been trying to swap the default folder location for the home directory to my other drives.  It works when I change the /home/user_name/.config/user-dirs.dirs file to the directories I want, but only until I reboot the system. I am only assuming that the drives not mounting is the problem with it, but it would be helpful either way.  If any one knows another reason for why the directories change back to default each time that would be good also.


I installed a package from Sentellic, called fspc but seems I can't install it due some dependencies, how to correctly install it?

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


I have a simply script. For example:  var rowCount = $('tr').length; document.write(rowCount);   I want to load this after entire webpage has loaded. How can I do?

In jQuery when you do this:  $(function() {    alert("DOM is loaded, but images not necessarily all loaded"); });   It waits for the DOM to load and executes your code. If all the images are not loaded then it still executes the code. This is obviously what we want if we're initializing any DOM stuff such as showing or hiding elements or attaching events.  Let's say though that I want some animation and I don't want it running until all the images are loaded. Is there an official way in jQuery to do this?  The best way I have is to use <body onload="finished()">, but I don't really want to do that unless I have to.  Note: There is a  in Internet Explorer which actually does wait for all images to load before executing code inside $function() { }. So if you're using that platform you'll get the behavior I'm looking for instead of the correct behavior described above.


I've got a notebook with a rather small SSD and a large secondary HDD. Now I want to install Windows 10 so the Userprofiles (c:\Users) are stored on the secondary HDD, since there is more space.  I will install Windows afresh, so I won't need to take care of existing files.  One way would be to move every single user data Folder (documents, Images, Videos, ...) to the HDD, but I'd rather move the full thing instead, if possible.  Any ideas?

When I format the computer and reinstall Windows, my first step is move the My Documents folder to another partition. In Windows XP it wasn't enough because the desktop folder and another user folders was in the primary partition.  Now in Windows Vista and 7 we can use junctions/symlinks to "move" the folder to another partition and Windows and another programs will think that the data is in the primary partition.  What the fastest and secure steps to move the Users folder to another partition and to create the hardlinks correctly?


I have currently upgraded my OS from Windows XP 32 bit to windows 7 64 bit ultimate and my installed RAM shows as 4 GB ( 3.05 GB Usable ). Can you please advise why the Usable RAM memory showing less in system properties?  My motherboard, processor and ram specifications as follows.. AMD 3.4 GHz FM2 A4-5300 Processor MSI FM2-A55M-E33 Motherboard Corsair DDR3 4 GB - DDR3 RAM, 1600 MHZ

My girlfriend bought a laptop last week. It's a core 2 duo with 4 GB  We installed vista 64bit, and one of the first things we did was right click on "My computer" to see gthe properties. Immediately we noticed something strange about her RAM, the line said: Installed memory (RAM): 4,00 GB (3,68 GB usable)  I told her not to worry, thinking it must be something about the laptop hardware (considering her vista installation came from the same DVD as mine, and I never noticed anything like that on my 4 GB desktop). One hour ago, it got worse. We looked at Properties again, and it now says: Installed memory (RAM): 4,00 GB (2,98 GB usable)  What does that mean? Are those 1,02 GB missing or being used by the system?  EDIT: There is a possibility that the sytem information is wrong. I just noticed that it reports an intel T6500 processor, when it's actually a T6400.  How can I find out how much RAM is really available to the system?  EDIT2: Checking the resource monitors, it says 1003 MB are reserved for the hardware. Is that good or bad? Thanks


I am a hvac tech, but my question is I have 2awg stranded and my plug is 6awg, will it matter much if I cut some strands to fit my plug? the plug is 60amp 250vac for a piece of kitchen equipment if the matters.


Can you suggest a LaTeX editor that can be used to typeset math documents? I've never used but I want to adopt one. Please, something simple to use

What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc.  This question is undergoing a systematic refurbishment, see  on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question.  List of editors Links to answers.


Looking at the qeustion(), it answered that not all distance functions will have a corresponding Riemannian metric. My question is then, what are the conditions for some metric function to have a corresponding metric? An example in the linked question's answer is using a consequence of Gauss's lemma, but this does not seem to be sufficient in and of itself.

Let $M$ be a smooth, finite-dimensional manifold. Suppose $M$ is also a metric space, with a given distance function $d: M \times M \rightarrow \mathbb{R}_{+}$, which is compatible with the original (manifold) topology on $M$.  Question: is there a Riemannian metric $g$ on $M$ such that the distance $$d_g(p, q) = \inf_{\gamma \in \Omega(p, q)} L_g(\gamma)$$ coincides with $d$?  I believe that this setting is very standard, but for the sake of completeness: $L_g$ denotes the Riemannian length of the curve $\gamma$, and $\Omega(p, q)$ the set of all piecewise smooth curves $\gamma : [a, b] \rightarrow M$ s.t. $\gamma(a) = p$ and $\gamma(b) = q$. Thanks in advance.


I want to install Ubuntu alongside Windows 8.1, but I can't do the partitioning because Ubuntu does not recognize Windows 8.1. Everything was OK in Ubuntu, but when I shut down Ubuntu and booted to Windows, it looked like I had changed to "Zoom" because everything on the screen looked too big. I checked the appearance of the screen, and it was set at the default. What can I do to fix this?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Over time, windows just runs slower.  Fragmented files are often to blame, but time after time I feel like I see evidence that defragmenting the files doesn't help.  I've been running defrag on each of the PC's I've used over the years (20y+), usually once they start acting sluggish (lengthy boot times, unexplained pauses in responsiveness).  But never have I experienced any noticeable improvement due to a defrag operation; at times I've felt like it gets worse. My current PC (of 1.5years) has reach that limit somewhat sooner/more sever than usual, ridiculous pauses while the HDD chunks away; and I just noticed that defrag is scheduled to run weekly, and fragmentation is 0%. Question #1 Knowing that defrag reassembles file fragments and puts them in the next available contiguous free space.  Is it possible that scattering the files themselves causes an equally detrimental fragmentation? As the various processes and threads run on the OS, there is an inadvertent sequence of frequently read files; files with physical locations randomly scattered along the platter radius causing the physical accesses to be out of sequence Question #2 Does a utility exist that not only defrags files, but puts them in relatively similar order to the sequence in which they are typically accessed? Question #3 (if no utility exists) Is there any utility to spy/log the time of access of the files?  To determine how often each file is access, or even a common sequence of files being accessed?  To find out which files are being read/written in those times when the PC is frozen and the HDD is chunking away with file accesses.  Process Explorer and Process Hacker don't indicate any particular process as a smoking gun (high I/O rates).

Does it stil make much difference, now that we have much faster and larger HDDs? Generally I find if disk performance is getting too slow, it's probably because of too little free space, and the solution is to buy a new HDD.


Do free massless particles have a Schwarzschild radius?  I'm curious about the mass in the equation for the Schwarzschild radius.  I know that you can calculate a Schwarzschild radius for any massive object, but does, for instance, a single (free) photon have a corresponding Schwarzschild radius as a result of its momentum, or does something need to actually have mass?  If mass is required, what is the difference between mass and energy in this case?

I have read , that $\frac{1}{2}mv^2$ must not be applied on a photon ever.   If i want to calculate escape velocity $v_e$ i need to use $\frac{1}{2}mv^2$ because we say that kinetic energy (positive) must be same or larger than gravitational potential (which is negative) in order for an object to escape. It is done like this:  $$ \begin{split} W_k + W_p &= 0\\ \frac{1}{2}mv_e^2 + \left(-\frac{GMm}{r}\right) &= 0\\ v_e &= \sqrt{\frac{2GM}{r}} \end{split} $$  Than we say if there is a black hole inside certain radius we call Schwarzschield radius $r=R_{sch}$ not even light can escape because its escape velocity is smaller than needed to escape. At the border of the sphere with $R_{sch}$ light can barely escape, so it must hold that $c$ equals escape velocity $v_e$. So we write down the equation below and derive $R_{sch}$.  $$ \begin{split} c &= \sqrt{\frac{2GM}{R_{sch}}}\\ R_{sch} &= \frac{2GM}{c^2} \end{split} $$  This is a well known equation, but it is derived allso using $\frac{1}{2}mv^2$ for light (photons). This is in contradiction with 1st statement in this post. So is the last equation even valid???


I encountered the following statement in the context of the Hecke algebra on the space of cusp forms, left without proof:  Let there be a family of commutative self-adjoint operators on a finite dimensional vector space $V$. Then there exists a basis of $V$ consisting of functions which are eigenfunctions for all the operators.  I would appreciate a proof of this, as elementary as possible, or a reference. I only know basic functional analysis and no spectral theory so I don't know where to start.

I've come across a paper that mentions the fact that matrices commute if and only if they share a common basis of eigenvectors. Where can I find a proof of this statement?


In particular, I would like to focus on CS Theory conferences like STOC or FOCS.  I am interested in the presented topics and, of course, it would be useful to learn more about it for potential graduate research. But on the other hand, one can always read the presented papers when they are published. It seems that the most important part of conferences is networking, however, I do not see myself being efficient in networking at this point yet.

I'm an undergraduate (Bachelor's) student and I'm thinking about attending a conference which exactly matches the topic of a research project that I'm working on at the moment. I have never attended a real conference.  I wouldn't go to present anything, but just because I have a great personal interest in the topic and because I would like to know about the recent developments. Would it be weird if I attend this conference alone? It is a small conference but there is a special student's price, which makes me think that I might be welcome.


Anyone knowns an example of a R-module finite genereted with a submodule not finite generated?  I find the following example: Taking the set of function $f:[0,1]\rightarrow\mathbb{R}$ seen as module of it self. This is finite generated. If we take the subset of functions $f$ such that $f(x)=0$  for all $x\in[0,1]$ except a finite numbers of points then we will get a submodule wich is not finite generated. Why?  This is a different example of the others I saw.   Thanks a lot!!!

I'm looking for an example of a finitely generated module with submodules that are not finitely generated.  I've found  dealing with group (i.e. an example of a finitely generated group with subgroups that are not finitely generated). But I can't figure out whether that question do help to this one.  And I actually want to find a more "module-like" example rather than an example derived from a 'strange' group.  Can you please help? Thank you!


I have width, height of matrix and range in which item can be. For example, for width = 2, height = 2 and range = 2 I have the following matrices:  00 10 01 00 00 11 00 10 01 10 01 01 10 11 11 11 00 00 00 10 01 00 11 10 01 01 10 11 11 01 10 11   But I need to consider matrices as equal if one can be obtained from other by swapping any rows or columns. So these matrices are equal:  10 01 00 00   Considering this, set of matrices will be:  00 10 11 10 10 01 11 00 00 00 10 01 11 11   And answer is 7. Trying to solve it, I noticed that elements in row or in column remains the same, only their order changes, so I wrote script on python that make all combinations of matrices excluding "equal". Function detecting "equal" matrices works like this:  1 get arrays of sorted rows for both matrices   2 translate them to mapping array. For example [1, 0, 2] shows that row 0 in first matrix mapped to row 1 in second matrix.  3 make same steps for columns.  4 go through matrix comparing them like this:  if matrix1[i][j] != matrix2[rowsMapping[i]][columnsMapping[j]]:     return False   5 If there is no different elements, we have "equal" matrices.   It works, but not very fast and I suspect that I'm going in wrong way. Maybe there is some combinatorics formula to solve this task?

I have been thinking about this problem:  Suppose we have all $R$ by $C$ matrices, where the values are integers in $[1,n]$. Two matrices are equivalent under interchanging rows and columns. For example,   1 5     0 0       would be equal to itself and to  0 0 1 5   and would be equal to  0 0  5 1   and would be equal to   5 1 0 0   How many unique such matrices are there?  Any ideas how to go about it? Any help much appreciated!


I'm trying to create an unlocked package for all custom objects, custom fields, page layouts. Creating the package itself is going well, but when I tried to create a version, it failed with a very long list of errors!  I read them, and it seems that for some of the errors the problem is that when creating a version some features like (PersonAccount, ...etc) are not found   here is a link to the full list of errors:   these are some of the errors:   Account: The entity: Account does not have history tracking enabled,CaseMilestone: Invalid fullName, must end in a custom suffix ( for ex. __c ),AccountContactRelation: Invalid fullName, must end in a custom suffix ( for ex. __c ),MLModel: Invalid fullName, must end in a custom suffix ( for ex. __c ),ForecastingTypeToCategory: Invalid fullName, must end in a custom suffix ( for ex. __c ),Entitlement: Invalid fullName, must end in a custom suffix ( for ex. __c ),Case.SlaExitDate: Could not resolve standard field's name.,Case.SlaStartDate: Could not resolve standard field's name.,Case.SourceId: fullName must end with: __c or __kav or __x or __b or __xo or __e or __p or __mdt,DuplicateRecordSet: Invalid Type Exception,ForecastingOwnerAdjustment: Invalid fullName, must end in a custom suffix ( for ex. __c

I have added LiveChatTranscript object in my unlocked package but while versioning getting error  LiveChatTranscript: Invalid fullName, must end in a custom suffix ( for ex. __c )  Can anyone help me to resolve this error.


I'm trying to verify the presence of keywords in product titles from one of my affiliation deals. The issue I'm facing is that the keywords can be in a different orders and sometimes I have alternative keywords to test. Some examples: xiaomi Mi Laser projector 4K 19201080P Full HD Projector 5000 Lumens 2GB 16GB Projector Mijia 4K 19201080P Full HD Projector 5000 Lumens 2GB 16GB Xiaomi Mijia 4k projector Those are the same products and I'm trying to find a match that get them all. The following works if the order is respected: preg_match('/(xiaomi|mijia).*(projector)/', $input_line, $output_array);  but how I can make sure that I also capture the same keywords in a different order? I could repeat the operation a second time to have two alternatives in the same regex but it will quickly become unreadable. I would basically need something like (keyword1|keyword2|...)(keyword3|keyword4|...) in any order I'm not looking to extract the information, I'm just looking for match. Is there a clean way to do this with preg_match? Thanks!

Obviously, you can use the | (pipe?) to represent OR, but is there a way to represent AND as well?  Specifically, I'd like to match paragraphs of text that contain ALL of a certain phrase, but in no particular order.


I'm looking how to change the integral symbol.  For example:  \documentclass{article} \begin{document} \[\int_a^b f(x) \mathrm{d} dx\] \end{document}   I want to only change the font of \int to get a \rm\int like \mathrm{d} or can I  define a new \rmint using other package, for example arev?  \documentclass{article}  %define a new command for \rm font of int  \begin{document} \[\rmint_a^b \] \end{document}   to get the style of \int is      I have get \rmoint and \rmint by  \DeclareMathSymbol{\rmintop}{\mathop}{rmlargesymbols}{82} \DeclareMathSymbol{\rmointop}{\mathop}{rmlargesymbols}{72}   but I can not get all of integrals as follows:

Is there a general way to change the font of a particular symbol without switching packages?  For example, suppose I'm using Computer Modern for my entire document, but I want the "subset" operator to look as it does in mathabx.  How can I redefine it to appear in this way?


I need to add payment functionality on specific node type. After registration user can create a node. But node will be shown when user will pay. And after first time payment user got a role .. Means next time he will create node without payment.

When users create a node, they should be redirected to a payment page; if payment is successful, the user can see the node.  Is there any way to achieve this?


Can anyone guide me how to write test class for below apex class.  Actually my class works when I select multiple records from list view and on clicking custom button, I am using VF Page to show the sum of amount of selected records.  Can anyone guide me on how to write test class as I don't have any idea how to start test class for selecting multiple records from list view.  public with sharing class PaymentSummaryController {   public boolean InError {get;set;}  public decimal TotalAmount {get;set;} public decimal TotalAppliedAmount {get;set;} public integer TotalItems {get;set;}  public List<EXECED_Payment__c> selectedIds {get;set;}  public PaymentSummaryController(ApexPages.StandardSetController controller) {    selectedIds = (List<EXECED_Payment__c>) controller.getSelected();      InError=false;     controller.setPageSize(1000);      if (selectedIds==null || selectedIds.size()==0) {         ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Please select at least one record.');         ApexPages.addMessage(myMsg);         InError=true;     }      else{     String str = ApexPages.currentPage().getParameters().get('selectedIds');         TotalAmount=0;         TotalAppliedAmount=0;         TotalItems=0;         for (EXECED_Payment__c p : [select id,Amount__c,Total_Applied_Amount__c from EXECED_Payment__c where id in: selectedIds]){             if (p.Amount__c!=null)                 TotalAmount+=p.Amount__c;             if (p.Total_Applied_Amount__c!=null)                 TotalAppliedAmount+=p.Total_Applied_Amount__c;             TotalItems++;         }     }  }  }   TestClass:  @isTest(SeeAllData = True) private with sharing class PaymentSummaryControllerTest { static testmethod void PaymentSummaryControllerTest(){     EXECED_Payment__c pay = new EXECED_Payment__c(Payment_Owner__c='Account',Payment_Status__c='Credited',Amount__c=1000,Payment_Date__c=system.now(),Pay_Type__c='Check');     EXECED_Payment__c pay1 = new EXECED_Payment__c(Payment_Owner__c='Account',Payment_Status__c='Credited',Amount__c=1000,Payment_Date__c=system.now(),Pay_Type__c='Check');    List<EXECED_Payment__c> Exceeded = new List <EXECED_Payment__c>();     Exceeded.add(pay);     Exceeded.add(pay1);     insert Exceeded;    test.startTest();     List<sObject> accts = (List<EXECED_Payment__c>)[Select Id From EXECED_Payment__c];     System.debug(accts);        Test.setCurrentPage(Page.PaymentSummary);        ApexPages.StandardSetController controller = new ApexPages.StandardSetController(accts);        controller.setSelected(accts);        PaymentSummaryController ext = new PaymentSummaryController(controller);     test.stopTest();  }  }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


I understand both sides of the "Lists questions" debate. Personally I find them very informative and end up on those threads often through google. But I also understand the desire to keep all the se sites "pure" with respects to the area.  So why couldn't there be a lists.se site that caters to these kinds of questions? The tags could designate the type of list it is for. Then all those nasty horrible list questions that the mods hate, but many find so useful, could be migrated to a single site.

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I recently read the accepted answer to , and this part brings a good question:     A devil does not choose to be lawful evil, and it doesn't tend toward lawful evil, but rather it is lawful evil in its essence. If it somehow ceased to be lawful evil, it would cease to be a devil.   The effect of a Balance card from the Deck of Many things reads:     Balance: Your mind suffers a wrenching alteration, causing your Alignment to change. Lawful becomes chaotic, good becomes evil, and vice versa. If you are true neutral or unaligned, this card has no effect on you.   So if a devil draws the card and becomes chaotic good, and such a change means it ceases to be a devil, then what is it instead? How does it change?

According to PHB 122, in the section entitled Alignment in the Multiverse, for most creatures, "alignment is a moral choice." Myth says good-aligned gods created the races that are free to choose to be evil (they have free will), while evil-aligned gods created the races that are very inclined towards evil, since they were born to serve the evil god in the first place.  However, there are some types of creatures -- like devils -- which embody an alignment in its essence:     Alignment in the Multiverse, PHB 122      A devil does not choose to be lawful evil, and it doesn't tend toward lawful evil, but rather it is lawful evil in its essence. If it somehow ceased to be lawful evil, it would cease to be a devil.   My first thought was to not take this reading literally. The text could have meant that a neutral evil devil "isn't really a devil," but really, it's still a devil. It's a bit like imagining a guitarist who loses both hands. The loss of some part of a person's essence makes them not the same person anymore.  However, keeping my attention on it, I'm finding this text more and more difficult to interpret. If a devil "is lawful evil in its essence" then what does it mean when "it would cease to be a devil"? What happens to a devil when its alignment is forcibly changed?  There are , and a devil can be subject to some of them.


After using other 3D Apps I have become used to Y being up, and Z being depth (Depth pass, Z pass etc).  Is there a way to make Blender a Y-up world, and if not, does anyone know why they chose to be different ?

After learning bits and pieces of Maya, 3DS Max, IMAGINE and XSI I noticed that they all have Y-up worlds with Z being used for depth (naturally).  is there a way to make Blender a Y-up world?  and does anyone know why isnt it Y-up in the first place?


What is the reason for the emission of electromagnetic waves from the sun and why curve its in about the visible light is maximum?

This is an extract from the astrophysics chapter in my book:     Hydrogen atoms fuse to form helium.  At the same time, lots of of gamma photons and neutrinos are produced. The photons take thousands of years to "fight" their way to the surface of the Sun, but then escape into space as visible or near visible photons at the speed of light.   I am really confused about how the sun produces light. I understand that through nuclear fusion, energy is formed, but isn't this energy in the form of thermal and gamma photons? I do not understand how visible light is emitted which is the reason to why we see the sun. Could someone please elaborate the paragraph from my book.


Is $\mathcal{P}(A\cup B)=\mathcal{P}(A)\cup\mathcal{P}(B)$ true for all sets $A$ and $B$?  If so, prove it.  If not, give an example of sets $A$ and $B$ for which it is false and show why it is false for these sets.

I know that they are equivalent if we have $\cap$ instead of $\cup$.  If we start from left, we have:  $X \in P(A) \cup P(B)$  $X \subset A \lor X \subset B$  If we start from right, we have:  $X \in P(A \cup B)$  $X \subset (A \cup B)$  And now, how do we proceed proving that they are not equivalent?


I vaguely remember reading a science fiction story in which the character was introduced as a unambitious government official (a bureaucrat). I believe in the story it mentions that while his superiors had come and gone, he always remained due to his unoffensive nature. Throughout the story the character manipulates his way to meet his ends (which I believe had something to do with aliens and their rights).  I believe it was written by Asimov, but it might have been Arthur C. Clarke or Robert A. Heinlein.

I'm hoping to identify an SF story (read it at least 20 years ago, I think), where Earth has set up a base on a distant world, and when the locals see how advanced they are, they quietly give up on themselves, and stop having children.  The governor (or similar) from earth has conversations with the earth military commander, talking about how they really wish they could get earth to leave the natives to themselves, but it won't happen. The military commander thinks the system is broken, but the governor suggests the there are ways to "make the system work for you".  Some time later the governor privately suggests to the commander that maybe teaching the locals about ships and piloting might encourage them to take new interest in life, and the commander requests permission for this from the military.   At some meeting, the governor somehow gets the locals (the locals may be slightly telepathic?) to express interest in some very fragile art form he has one of, which prompts someone to request shipment of many of them as gifts for the natives.  Because they're so fragile, this gets a lot of huge transports ships to the planet, and since meanwhile the natives have learned how to fly, they steal them and emigrate en masse, vanishing into the void.  The military guy accuses the governor of setting this all up (to the reader this is clearly true), but there's no proof, and the story closes with the governor reminding the commander of what he had said about making the system work for you.  What is the name of this story?


Images uploaded to imgur are showing broken image icons with a link containing the image description (which is usually just the generic "enter image description here"). When I click on the link I get a "Bad gateway" error at imgur.com. Is there a problem at Imgur?  Maybe the problem is resolving itself? As I was writing this question I uploaded the image below, and it first showed as a broken image, but it recovered while I was writing. But if I go to other questions I still see broken images, e.g. .

I see a lot of 'white' avatars in the question lists, e.g.  and . Some user avatars aren't loaded, e.g.  and  – they just timeout for me. Sometimes (but not always) I do get a nice "Imgur is over capacity!" image, which I'm (rather surprisingly) able to upload to imgur - but you might not see it.


Say I want to find the multiplicative inverse of $17$ in $\mathbb{Z}_{26}$?  How to do it?  First thing to check is $\gcd(17,26)=1$ so yes they are relatively prime.  I don't really understand Euclid's algorithm to give a solution... Can anyone give an example of how to use his algorithm to find solution? Can be different numbers than what I listed above- just need to see example in action.  Many thanks.

I want to calculate   $ 8^{-1} \bmod 77 $   I can deduce  $ 8^{-1} \bmod 77$ to $  8^{59} \bmod 77 $ using Euler's Theorem.  But how to move further now. Should i calculate $ 8^{59} $  and then divide it by $ 77 $ or is there any other theorem i can use ?


Is the infinite intersection of finite sets a finite set? Could you give me some examples or counterexamples?

I know that there are questions asking like "intersection of a infinite collection of sets" and I can understand that the answer for that one is a null set, but I got a question here, in which all sets are finite and nonempty. Please take a look at the pic below.  It's a True/False question.  What I'm confused about is that the "infinity" sign in the interception. Since all sets are finite, does it mean that there are many sets in the chain are the same? (because the symbol used is for subsets not for proper subsets). Please give me some hints how I should think about this question.  Thank you


quint64 a = 11; double b = 0.1; double v = a / b; quint64 v1 = a / b; quint64 v2 = v; quint64 v3 = (double)((double)a / (double)b); qDebug() << QObject::tr("v = %1, v1 = %2, v2 = %3, v3 = %4").arg(v).arg(v1).arg(v2).arg(v3);   I tried the code in Qt creator as pasted, which use mingw compiler. The result is as following:     "v = 110, v1 = 109, v2 = 110, v3 = 109"   My question is, why v1 and v3 are both 109? How the compiler deal with such a sentence 'a / b'? And how can I get result v3 as 110 in one line?

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


I am trying to rename a word in the file name of multiple JPEG files from Hoddesden to Hoddesdan. How can I do it on the Ubuntu command line? Examples R59-GBR_Hoddesden_2015-08-21_15-48-00-190_UNKNOWN.jpg to  YR59-GBR_Hoddesdan_2015-08-21_15-48-00-190_UNKNOWN.jpg   YR59FRP-GBR_Hoddesden_2015-08-21_15-47-59-222_APPROACH to YR59FRP-GBR_Hoddesdan_2015-08-21_15-47-59-222_APPROACH

I have multiple files named like that : screenshot 13:25.png Windows struggle to open these files probably because of the ":".  How can I replace it?


I am writing a code where program read data from file and then it readlines and if a specific word exist in list it allows the user to modify its quantity. Well the issue is how can i get the iteration number (line number) in for loop while it is searching for word in line  My Code:  f= open('guru99.txt','r')  action = int(input('Enter number')) if action == 1:     for line in lines:         if 'banana' in line:             print(line)             print('You already purchased banana! You can change the quantity')             edit = line.split()             qty = int(input('Enter new quanity'))             print(bline)         else:             continue   for example if the word banana found on line number 3. How to edit this program to show the iteration number or index of the for loop

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


Is there a searchable database of Linux commands? I'm new to the sport, and alot of information here assumes alot of knowledge I (and I'm sure many others) do not possess. However, I learn quickly, if I have a way to reference available commands.

What can I type at my shell (which happens to be bash) that will list all the commands that are recognized?  Also, does this differ by shell? Or do all shells just have a "directory" of commands they recognize?  Secondly, different question, but how can I override any of those? In other words how can I write my own view command to replace the one existing on my Ubuntu system, which appears to just load vim.


I have 7 shapefiles, each representing a year, all containing lots of polygons (c. 500,000). My aim is to take any 2 of them and compare how they have changed in terms of size and shape of polygon. (i am willing to split into much smaller tiles of course)  Also, each polygon has an ID so I want to see over the years how the geometry has changed for a particular polygon.   I've tried quite a few tools, intersections, duplications etc etc but nothing seems to quite work (or simply produces errors)  any ideas?

Every month I have to QA/QC some streets data for an entire county (over 47,000 records). The first step is to compare the two files. Currently, I'm using a tool that was created in house via VBA approx 5 years ago. It works compares the two files and reports back the differences based on a few factors (added records, deleted records, address changes, city changes, segment length/vertices changes). I then export these to individual shapefiles. Additionally, the tool works in ArcGIS 9.3 but will no longer work in ArcGIS 10.1  The tool works great, but it takes approximately an hour to complete.  I've started to work on hopefully improving this tool to speed up the performance. I've looked into a variety of methods including the Compare Feature Tool and Select by Location.   Both of these tools work significantly faster, however, they don't seem to capture everything that I need. The big issue I have with the Compare Feature Tool is that I cannot choose which field to compare on. It defaults to ObjectID when I need to compare by Segment_ID. There isn't an option to select that.   Does anybody have a good solution or ideas on how to achieve a full compare like I've described?    For some reason, ArcGIS isn't recognizing the join that I'm attempting per RyanDalton's answer.   But  Taking the advice of a join I have figured out how to find the added records and deleted records differences in the two files by:   Joining the Previous Month shapefile to the Current Month shapefile via the Segment_ID field Performing a definition query where Segment_ID IS NULL Exporting that to a new shapefile (Added Features)   I then reverse the joins and find the Deleted Features  Still working on a way to find the other differences listed and then string them all together in a model.    I can find all records that have changed by performing a select by location records from one of the datasets that are identical to the other dataset. I then switch the selection and it gives me all the records that are not identical.  I'll put it all in a model and hopefully it works just as well.


Let $f:S^1\rightarrow S^3$ be an embedding. Then what is $H^1(S^3\setminus f(S^1))$?

I'm trying to solve the following exercice :  Prove that the first homology group $H_1(E(K); Z)$ of a knot  exterior is an infinite cyclic group which is generated by the class of the meridian.   With $ E(K) $ is the closure of the complement of a tubular neigborhood $ N(K) $ of $ K $ and the merdian is just the boundary of a meridien disk of $ K $ .  Here is the adequate formulation :  Let $K$ denote a knot in $S^3$. $ N(K) $ is the image of an embedding $ S^1 \times D^2 \longrightarrow S^3  $ whose inverse $ f : N(K) \longrightarrow S^1 \times D^2 $ is called a trivialization. A meridien disk of $K$ is $ f^{-1} (D^2 \times \lbrace y \rbrace ) $ for a point $ y \in K $ . $ E(K) = cl(S^3 \setminus N(K)) $ .  I proved that $  E(K) $ is a submanifold with boundary of $ S^3 $ and that $ E(K) \cup N(K) = S^3 $. Then I used the known fact that the Mayer-Vietoris sequence still relevant for a cover of a manifold consisting of two submanifold with boundary to conclude that indeed $ H_1(E(K); \mathbb{Z}) = \mathbb{Z} $.  The issue is that I was not able to get the information on the generator by applying this method.  So my question is how can I exhibit the generator ( knowing that normally there is two generators since the boundary of $ N(K) $ is a torus, a meridien and a longitude ).  Thanks in advance.


Is there any Python/setuptools approach I could take to write a tool to change directory? There's a somewhat complicated path behind the scenes computed from a single parameter.  e.g., here's the closest I could come (in bash, untested):  alias mycd='function _mycd() { cd `myscript $1` };_mycd'  where myscript is something I can make available using console_scripts in setuptools.  I'm wondering if there was any way I could accomplish this in a self-contained manner, where for example, I don't edit a user's .bash_profile or save something in their bin or whatever. e.g., can I define an alias using setuptools?

I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?


Last July I went on a holiday to Dubai and have bought my very first iPhone from there, the Gold iPhone 6 plus. Recently I decided to start using Facetime but for some reason I cannot find the app. I am using my iPhone in Malta, in the middle of the Mediterranean with a Vodafone carrier.   Can anyone please show or explain how can I have FaceTime on my phone?   I tried finding various videos on YouTube but could not find the right one.

I bought my iPhone 6 Plus in Dubai. I am using the phone in Sri Lanka and I cannot use the FaceTime. How can I use FaceTime while in Sri Lanka?


When setting up my username and password in the terminal of my Chromebook my password is simply not visible. I was able to type in my username but whatever I type in the password field is not visible.

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


How do I make my Eclipse editor look something like this? I'm kind of annoyed by the default layout:

Is Eclipse at all theme-able? I would like to install a dark color scheme for it, since I much prefer white text on dark background than the other way around.


$$a\cdot x_1+b\cdot x_2+c\cdot x_3+...+qx_n=\text{constant}$$ is called a linear equation because it represents the equation of a line in an $n$ dimensional space. So "linear" comes from the word "line". Basically there should not be any higher power of $x$ failing which the graph of the function will not be a straight line.  similarly  $$a(x)y+b(x)y'+c(x)y''+d(x)y'''+...+q(x)=0$$ is also called linear differential equation because all the derivatives have power=1 which is similar to the above definition of a linear equation.  A function f is called linear if: $$f(x+y)=f(x)+f(y)$$ and $$f(c\cdot x)=c\cdot f(x).$$ Here c is a constant. In this definition of linearity of function $f$ what does the word linear means? How does it relate to a straight line?  Finally what does the term linear means in case of linear vector spaces? Where is the reference to a straight line?  So, whether linear is just a word used in different contexts? Does it have different meaning in different situation? Or linearity refers to some relation to a straight line?

$a_1x_1+a_2x_2+a_3x_3+...+a_nx_n=$ is called a linear equation because it represents the equation of a line in an n dimensional space. So "linear" comes from the word "line".Basically there should not be any higher power of x failing which the graph of the function will not be a straight line.  simillarly  $a(x)y+b(x)y'+c(x)y"+d(x)y'''+...+q(x)=0$ is also called linear differential equation because all the derivatives have power equal to 1 which is similar to the above definition of a linear equation.  A function f is called linear if: $f(x+y)=f(x)+f(y)$ and $f(cx)=cf(x)$. Here c is a constant. In this definition of linearity of function "$f$" what does the word linear means? How does it relate to a straight line?  Finally what does the term linear means in case of linear vector spaces? Where is the reference to a straight line?  So, whether linear is just a word used in different contexts? Does it have different meaning in different situation? Or linearity refers to some relation to a straight line? At Least please explain how the linearity of function f and linear vector space relate to the equation of a line.


There are two types of people: scientists and everyone else.  A scientist is somebody who studies theory and evidence to further their understanding of the world. The key word is evidence. The scientist does not just blindly follow a theory because it is written in some book, they follow it because they have studied the evidence for it. As such, their beliefs are based on that evidence, and one cannot call this scientists belief in science for a religious position.   Then there's everyone else. These people do not know the theory (at least not from a formal, rigorous standpoint), they certainly have never studied the evidence, or been academically trained in the field. Their familiarity with the science comes down to watching youtube videos by Vsauce, at most. They'll often talk about "climate change" and "the big bang" and "the god particle" or whatever else buzzword's going around, but they don't actually understand the rigorous definition of those words nor the proper evidence. They might have heard that evidence exists, but if you ask them on the spot what sort of evidence it is, how it was found, how the experiment can be repeated and tested, and all these standard methods of scientific inquiry, they won't have a clue.  So essentially we have a group of people that have been given a shallow introduction to a certain topic, and have been told that certain things are true, and then they just take that on faith.   How is that any different from religion? Is science, as it is believed in by most normal people (and not actual scientists), just the same as religion, and thus similarly irrational?    For example, do you believe that the Big Bang is true? Okay, if your answer is yes, describe to me a procedure which I can follow in order to obtain evidence to support your claim. Don't google the internet, it has to be coming from you only. You can't do it, can you? Hence, you are akin to a religious believer. You belief is not rational.

I recently found myself unable to respond to the statement "But the big bang theory is just another creation myth!" during a science vs. religion argument. I found it very difficult to explain the difference between the big bang theory and creation myths without going through a crash course in Newtonian and then Relativistic mechanics.   This had me thinking of the following scenario: Consider a person who for various reasons never got a formal education beyond basic reading and writing. He/She doesn't know any science or math, and was never exposed to any scientific reasoning and experiments. She/He is however an open minded, level headed, and rational person (I've met more than one such person myself).   How would such a person differentiate science from religion? As far as he/she is concerned science has the exact same structure as religion:    A hard to understand scripture: Science treatises and journal papers.  An ordained clergy with a high entry barrier: Doctors, professors, scientists, etc... Seemingly arbitrary injunctions against certain behaviors: "Don't smoke", "Don't pollute",.... Various metaphysical (from his/her perspective) claims about the world around us: The big bang, other galaxies, blackholes, quarks,... Organizations which control and oversee doctrine: The FDA, The NIH, The NFS,...   From his/her perspective, all of these characteristics are no different than the way organized religion presents itself as being the source of truths about the world.   In particular if such a person were to heed the advice of the :         Do not go upon what has been acquired by repeated hearing (anussava),   nor upon tradition (paramparā),   nor upon rumor (itikirā),   nor upon what is in a scripture (piṭaka-sampadāna)   nor upon surmise (takka-hetu),   nor upon an axiom (naya-hetu),   nor upon specious reasoning (ākāra-parivitakka),   nor upon a bias towards a notion that has been pondered over (diṭṭhi-nijjhān-akkh-antiyā),   nor upon another's seeming ability (bhabba-rūpatāya),   nor upon the consideration, The monk is our teacher (samaṇo no garū) Kalamas, when you yourselves know: "These things are good; these   things are not blamable; these things are praised by the wise;   undertaken and observed, these things lead to benefit and happiness,"   enter on and abide in them.'      Following the Buddha's advice (ironically himself a religious figure), such a rational but uneducated person would have just as much reason to doubt the various results of scientists as to doubt the dogmas of organized religion.    How would it be possible for such a person to distinguish scientific facts from religious dogma?  How can we convince such a person of the validity of ideas like those of modern cosmology or evolutionary biology, without first having to teach them enough biology and physics to understand those concepts?


I am a student working on my final year study. It's my first time using ArcGIS.  I need to have the coordinates of the polygons that I choose to work on.  After converting the zones that I created into a raster, I want to extract the coordinates.

How do I find the coordinates of the centre / centroid of a raster?   I have tried Zonal Geometry but this does not give me the coordinates.  I need to find the centroids of two rasters and create points and measure the distance and bearings between them. i.e. distance and direction between two raster centroids.  I am using ArcGIS Desktop 10.2.


I am planning to use Lubuntu with Win8 Secure Boot PC. Will the 32-bit Live iso of Lubuntu boot (and work) with the Win8 Secure Boot PC ? Will the 32-bit Live iso of Lubuntu support Secure boot ?  Thanks.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I am trying to get sort the data based on the user input. But the orderby clause is not executed in LINQ. How do i do that ?? Here is my code...    [HttpGet]     public JsonResult SortData(String colName , String sortorder)     {         using( EmployeeDB db = new EmployeeDB( ) )         {             if( sortorder == "desc" )             {                 var JsonData = new                 {                     Data = (from emp in db.Employees                             orderby colName descending                             select new                             {                                 EId = emp.EId ,                                 EmployeeName = emp.EmployeeName                             }).ToList( )                 };                 return Json( JsonData , JsonRequestBehavior.AllowGet );             }             else             {                 var JsonData = new                 {                     Data = (from emp in db.Employees                             orderby colName                             select new                             {                                 EId = emp.EId ,                                 EmployeeName = emp.EmployeeName                             }).ToList( )                 };                 return Json( JsonData , JsonRequestBehavior.AllowGet );             }         }     }

I found an example in the  for Dynamic LINQ that allows you to use a sql-like string (e.g. OrderBy("Name, Age DESC")) for ordering. Unfortunately, the method included only works on IQueryable<T>. Is there any way to get this functionality on IEnumerable<T>?


From       Amped Up      share a link to a question on social media that gets 5 clicks   I share  on   with the share link under the question. Below is the twitter stats:    More then 12 hours has been passed since I crossed 5 link clicks, but still I did not get the hat.  So why I didn't got the hat yet?

The description says "share a link to a question on social media that gets 5 clicks".  I've tweeted a question that got over 5 clicks. I've posted a share link in chat that also got over 5 clicks. Both of these had my user ID number in it and were clicked by different people.  I watched in real life as the twitter link was clicked, by family and friends, on different computers each time. It's not a problem of the same IP.  (no wifi network overlap either)  Why haven't I gotten the hat? For the record, it's been almost an hour by now, so it's not hat lag causing the problem.  To clarify: the clicks were opening the share link in the browser, which redirected to the full url.


I have never used Ubuntu before.  I have only ever used Windows, and I am thinking of installing Ubuntu as it seems to have far less bloatware and I am sick of the constant updates from Windows.  However, I would require Microsoft Office installed on the Ubuntu system. Watching youtube videos, they seem to use a command prompt and the process to install it seems really confusing. can someone confirm the process  Other alternatives to Microsoft Office are not really suitble.

I want to know how to install Microsoft Office (specifically, Microsoft Office 2010) in Ubuntu?   I am a die hard fan of MS Office and I want to know if there is a way I can use it in Ubuntu.


Recently, I have setup a script that outputs to a single log file... After quite a while this file begins to become too large to manage. I was wondering what the easiest way is to setup log rotations for every few hundred lines located in the original log file?

I have a cronjob that runs some Python scripts and they generate massive log file. How do I prevent them from getting so big? It'd be perfect if the file was deleted once it hit a certain size. Because every few days, the file is 50MB now but gets much bigger and takes forever to download and analyze a bug on a slow internet connection. I really only want to see that last 1000 lines to see where the script went wrong.  I know I could code something to do this, but I was just wondering if Linux had something that I didn't know about. I imagine big log files are a common problem. Thank-you.


I watched a YouTube video where someone killed the Developer. First, he went up to him and melees him using the Scythe. Right before the "Hello" attack hits, he uses and Turtle Potion and Black Hole. He says the Turtle Potion will protect him from the Developer's Black Hole and since he's touching him, the Developer takes 2 Black Holes. I tried the exact same thing but I died. Is there another strategy?  I have:   Pink Gloves Scythe 1560 hp Knight's Body Armour (Non-enchanted) 40% more power   (There is a similar question but i have different stats)

How should I kill the developer? I have tried this method: jump onto his head, turtle, then cast Black Demon. He counters with Black Hole, which ends up killing me instantly no matter where i am


The transaction log file size is nearing 100% on one database. I run the below and both return 0 so no active transaction running.   The last query tells me that the database is in SIMPLE mode, but 'ACTIVE_TRANSACTION' is returned in log_reuse_wait_desc column.  However, I cannot see any running transaction! I have tried querying sys.dm_tran_database_transactions but do not see any transaction for this specific database.  How do I find this transaction?   SELECT @@TRANCOUNT;  SELECT XACT_STATE();  SELECT name, recovery_model_desc, log_reuse_wait_desc FROM sys.databases;

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


I am working on the Custom Trigger and getting the following error:     ERROR  Error: Update failed. First exception on row 0 with id   a01c000000A8GvrAAF; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY,   XXXXTrigger: execution of BeforeUpdate caused by: System.DmlException:   Update failed. First exception on row 0 with id a01c000000A8GvrAAF;   first error: SELF_REFERENCE_FROM_TRIGGER, Object (id =   a01c000000A8Gvr) is currently in trigger XXXXXTrigger, therefore it   cannot recursively update itself: [] Class.XXXClass.XXXX: line 41,   column 1 Trigger.XXXTrigger: line 3, column 1: []   I have the following code  trigger XXXTrigger on ServiceXXXX__c (before insert, before update, after insert, after update){     XXXX.XXXX(Trigger.New) }   Here is the helper class:  public class XXXX {     public static void XXX(List<SObject> newSobjs){          List<ServiceXXXX__c> newSI = (List<ServiceXXXX__c>) newSobjs;                List<ServiceXXXX__c> testlist = new List<ServiceXXXX__c>();          Set<Id> caseIdSet = new Set<Id>();         for(ServiceXXXX__c si : newSI){             caseIdSet.add(si.Case__c);         }           Map<Id,Case> caseMap = new Map<Id,Case>([SELECT Id,Category,SubCategory                                                FROM Case                                                WHERE Id IN :caseIdSet]);                for(ServiceXXXX__c si : newSI){             if(caseMap.get(si.Case__c).Category__c == 'YYYY'){                 if(caseMap.get(si.Case__c).SubCategory__c == 'ZZZZ'){                      if(si.XXX && si.XXX != null){                         ServiceXXXX__c newSInfo = new ServiceXXXX__c();                         newSInfo.Id = si.Id;                         if(si.CCC == null){                             newSInfo.CCC = 0;                         }                          if(newSInfo.CCCC > 0 && newSInfo.CCC <=2){                             newSInfo.CCC++;                         }                         testlist.add(newSInfo);                         System.debug('COUNTER :::==> '+newSInfo.CCC);                     }                 }                  }         }         update testlist;     } }

I have Opportunity-lookup field on Opportunity (self),  Scenario:   Opportunity A if select Opportunity B using lookup then Opportunity B's same lookup field automatically populate with Opportunity A.   I tried to achieve this using trigger - before insert/update but its failing as:  System.DmlException: Update failed. First exception on row 0 with id 006G000000DHaBlIAL; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = 006G000000DHaBl) is currently in trigger Oppy_before_INSUPD, therefore it cannot recursively update itself: []


Our users are split into 2 types, people buying our Sport products online and people enquiring about our Industrial products to buy offline. Roughly split 95% Sport and 5% Industry.  Up until now, we use a splash screen style homepage (which also has content for SEO) and then re-direct later once we know which type of user they are. This first page is often a barrier in getting users through to the e-commerce part of the site, they get stuck on the homepage, but there’s also frustration because they can’t get back to the homepage because of the re-direct. People often use the homepage as a quicker way to navigate to the shop.  During the re-design, based on our data, the initial approach was to take people straight to Sport that has traditional navigation with an option to switch to Industry.  This approach was rejected by the company, in favor to give Industry more prominence, and so the 50/50 splash screen is a requirement. I've tested the splash screen on people during the design process and the results were conclusive in favor of a solution without the splash screen.  A compromise, (whilst we're in the build and should be easier to implement than building the splash) was to use a modal overlay when a user lands on the website for the first time. Whilst I struggle with modal overlays, I wondered whether this is a better solution. SEO isn’t lost because the page is rich in content and the path to the shop is clearer.  Just wondering if anyone has come across something like this before? Any input would really help.

I am in the process of creating a website which has two distinct audiences - in my case consumers and retailers.  When I first started the process just a few weeks ago I had followed the then model used by PayPal who too have to deal with distinct audiences.    However, having Googled around a bit for what the accepted wisdom is when dealing with website landing pages for segmented markets it appears to me that the current belief is that one just directs the visitor away from the landing page to other, segment focused, pages ASAP.  I have to admit that I am having trouble buying that philosophy.  To my mind it makes sense to provide at least some basic information - key benefits - for each segment on the landing page and then let viewers who linger long enough the opportunity to easily drill down to their own segment-focused page.  My own reasoning is that most first time visitors are liable to want to bounce away quickly and making them find and click on the segment page link is more likely to make them bounce than if they find enough to hold them on the landing page for a bit longer.  I'd like to have other views on this.  What are the pros and cons of the    Drive traffic to segment-focused page ASAP vs Provide some basic information - at least key benefits - for each segment on the landing page itself


I have only 118 items in my bag, so it is not full, yet I'm being told it is full. When it said that the bag was full initially, I threw many items away. I'm now left with 118 items, but every time I try to catch a Pokémon, it says my bag is full.  I've tried logging out and back in and removing Pokémon Go from my Google account, but nothing is fixing this.

It seems that I can buy 50 more slots using 200 coins, but what if I keep on getting more and more common Pokemons such as Pidgey or Rattata, then the slots will be full again.  Right now, I am sorting by CP (Combat Power) and then "Transfer" the lowest CP Pokemons to the Professor (to give it away), but wonder what is a good or better way to handle this?  (For example, can I combine several Pidgey into one?)


Is there a way to refresh a lightning web component after a record has been edited? I have a LWC on a lead record layout, and I want the LWC to be refreshed when I edit fields in that lead record without having to click the refresh button of the browser?

I have a lightning web component that it's data needs to be updated whenever the record is saved.  Is it possible to trigger a function\component refresh when the record is save?


I have an 282 .laz  tiles for a large area. The aim was to extract the DSM and DTM data in .asc  format to hopefully get building heights from them. I used lastools to convert them the DSM .laz  data to .asc  files. This worked great, but now when I view this .asc data in QGIS, it looks like the height information isnt calibrated to the same datum (apologies for not using the right terminology) Is there a way to ensure that all the tiles have uniform height reference?

I'm trying to merge some LiDAR tiles together but when I do, the clarity of the image drops, so I think that means I am losing some data.   How do I merge the tiles and keep all of the data and the clarity of the LiDAR?  Before merge:    After merge:


Evaluate $\int_0^x \frac{dt}{1+\cos^2t}$ $\forall x \in \mathbb{R}$  I got this question in an analysis exam, and I did what everybody does (), I made $u=\tan t$ and I got $\frac{1}{\sqrt2}\tan^{-1}\left(\frac{\tan x}{\sqrt2}\right)$ but I know this is wrong because $\tan x$ is not continuous in every $[0,x]$,  it's solved until $\pi$, but my limit is $x$ so I'm not sure what should I do.  Also, we have the integral of a positive amount, so my answer should be an increasing function...   is explained why this happens (which I already know), and the answers there don't solve the integral between $0$ and $x$. One answer gives a possible result (that have to be adapted, since there it is indefinite), but no deduction of it. The answer given here is much more complete and perfectly address my specific question.

The following integral can be obtained using the :   $$\int \frac{dx}{1+\cos^2 x} = \frac{\tan^{-1}(\frac{\tan x}{\sqrt{2}})}{\sqrt{2}}$$  Now assume we are performing this integration between $0$ and $2\pi$. Hence the result of the integration is zero.  On the other hand when looking at the integrand, $\displaystyle \frac{1}{1+\cos^2 x}$, we see that it is a periodic function that is never negative. The fact that it is never negative guarantees that the result of the integration will never be zero (i.e., intuitively there is a positive area under the curve).  What is going on here?


How to create a new file merging selective columns from two separate files using awk? Without messing up the elements orders of BOTH files.  Exemple: File 3 may contain column 1,2,3 from File 1 and column 4 from File 2.   File 1 A   23  8   T A   63  9   9 B   45  3   J  File 2 A   0 A   6    B   5  File 3 A   23  8   0 A   63  9   6 B   45  3   5


I just got full editing privileges on SO, and started reviewing edits. When checking out my edit history in order to find out how others have decided in some particular cases, I noticed that one post which I  has been deleted a few minutes later. It took me quite some time to realize that the edited post, which looked like a valid question, has been posted as an answer (and thus is obviously NAA). Unfortunately, this information is only shown in the bottom left corner, with low contrast:  After reviewing X questions, this one just slipped through. I obviously learned my lesson, but it might still help preventing similar mistakes: Could you move the post type information to a more obvious location? One could for example adapt the layout from the First Posts Queue, where there is a big dark gray "Question" or "Answer" above the post title.

Could we please have a clearer visual indication of whether the suggested edit is an edit to a question or an answer?  Currently the only way I distinguish between the two is to look for the (very light gray) text asked or answered next to original poster's name.


I have a problem because when I try to insert data into my sql from minecraft plugin it does not insert but gives and error (Image) . I want to ID insert automaticly (I have Unique and Primary key set up in phpmyadmin) admin to be null or empty. reciever to be player (I can do it by myself) and priority to be set to 0 . MyCode: if(args[0].equals(args[0])) {                 StringBuilder message = new StringBuilder();                 for(int i = 0; i < args.length; i++) {                     message.append(args[i]).append(" ");                 }                                  try {                     MySQL.ps("INSERT INTO `sawioreports`(id, admin, reciever, priority) VALUES ('', 'NULL', 'Sawio2001', '0');").executeUpdate();                     p.sendMessage(ChatColor.translateAlternateColorCodes('&', "&cWyslano Report"));                 }catch(SQLException ev) {                     ev.printStackTrace();                 }     }             return true; }

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?


From onlinestatbook's chapter on "":        Why exactly do we subtract and add these 0.5/N values? How does that make our continuous formula more "discrete"?

I wish to better understand how the  to the binomial distribution for the normal approximation was derived.  What method was used to decide we should add 1/2 (why not another number?). Any explanation (or a link to suggested reading, other than , would be appreciated).


Compiling the following MWE with lualatex with makeindex, my index renders with no hyperlinks for page numbers:   %!TEX encoding = UTF-8 Unicode %!TEX program = lualatex \documentclass[11pt,a4paper,fleqn,pdftex]{report} \usepackage[utf8]{luainputenc}  \usepackage[latin,english]{babel} \usepackage[unicode=true,colorlinks=true]{hyperref} \usepackage{imakeidx} \makeindex  \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas at quam libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. \index{Donec} nulla diam, dignissim sed ligula et, mattis efficitur augue. Ut vel rutrum lacus. Nulla sed lorem vel lacus convallis pharetra. Phasellus fermentum arcu eget magna placerat, sit amet egestas enim viverra. Integer eu ex mollis nisi ultrices congue sed eget nunc. Duis sed ipsum eu ligula hendrerit placerat.      Etiam vitae massa in magna \index{hendrerit} pharetra. Vestibulum lectus purus, rutrum at sollicitudin eu, dignissim quis diam. Suspendisse potenti. Vestibulum commodo justo vitae pretium fermentum. Donec ornare pulvinar ligula non ultrices. Nullam at rutrum nunc, a volutpat metus. Aliquam id velit varius massa feugiat malesuada congue at dolor. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc quis magna nisi. \index{Vestibulum} efficitur justo turpis, eget ultricies sem iaculis in. Nulla sit amet urna lorem. Sed magna elit, fringilla in augue sit amet, pellentesque semper nunc. Mauris enim urna, dictum vel nisi vehicula, congue euismod ligula.       Morbi consectetur efficitur purus, vel vestibulum risus hendrerit nec. Curabitur mattis dolor eget lorem imperdiet, id maximus massa porttitor. Vivamus sit amet urna ut est fringilla porta ac sed leo. Nunc ac lectus ullamcorper, accumsan dolor dictum, tincidunt quam. Praesent condimentum ultricies magna, at placerat neque molestie sit amet. Vivamus a nisl et sapien imperdiet finibus eget vitae nulla. Curabitur semper sem non leo elementum, vitae lobortis massa cursus. Pellentesque sodales rutrum tempus.      In ut purus elementum, scelerisque mauris pellentesque, pretium nisl. Sed eget luctus nisl, eu accumsan nisl. Phasellus purus erat, blandit nec odio a, rutrum ultrices mauris. Proin interdum justo eget mollis volutpat. Donec tellus diam, scelerisque sit amet laoreet eget, tristique ac magna. Aliquam posuere commodo nulla, sit amet vehicula sapien efficitur eu. Maecenas vel elit facilisis, aliquet elit sit amet, euismod augue. Donec ac risus porttitor, vulputate ex ut, finibus ipsum. Pellentesque aliquam ac nisi sit amet luctus. Mauris cursus facilisis egestas. Cras \index{vulputate} nunc purus, id dictum mi tincidunt vel. Morbi finibus tortor mauris, a sagittis justo luctus ut. In lobortis felis vel lorem mollis cursus. Curabitur sit amet iaculis purus. Proin ac dolor non nibh ultricies facilisis.      Nulla consectetur eget sapien in pulvinar. Mauris sollicitudin ornare lorem, ut auctor magna imperdiet nec. Donec et nibh ipsum. Curabitur a tortor condimentum turpis pretium ornare. Vivamus quis feugiat nisl. Curabitur at rutrum lorem, sit amet consequat neque. Duis \index{convallis} a ipsum sit amet sodales. Sed eleifend feugiat aliquam. Morbi efficitur est odio, vel sagittis mi condimentum sed. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas vulputate dapibus leo vel ornare. In fermentum libero nulla, vitae faucibus quam scelerisque venenatis. \printindex \end{document}   Looking at the .idx file, the list items are showing as \item ABCDE, ## instead of \item ABCDE, \hyperpage{##}.   Are there some package clashes in my preamble?  If that could matter, texindy returns ERROR: Opening file "./FILE.ind" failed! for the same file.

I use imakeidx package to generate index in my document. I'd like to add hyperlinks into my Index, but it seems to me that hyperref and imakeidx do not work together. For example, this code doesn't create linkable index:  \documentclass[11pt]{book} \usepackage[pdftex]{color}  \usepackage{hyperref} \hypersetup{     colorlinks,     citecolor=green,     filecolor=green,     linkcolor=blue,     urlcolor=green } \usepackage[makeindex]{imakeidx} \makeindex \begin{document} Text\index{text} \printindex \end{document}   How to fix this problem? Thanks.


Note: we have $a>0,b>0,c>0$.  Solve $(1-a)^2+(1-b)^2+(1-c)^2 \ge \frac{c^2(1-a^2)(1-b^2)}{(ab+c)^2}+\frac{b^2(1-a^2)(1-c^2)}{(ac+b)^2}+\frac{a^2(1-c^2)(1-b^2)}{(bc+a)^2}$ where $a>0,b>0,c>0$. Elementary (high-school) methods are preferred.   I'm not an expert in inequalities. I only know GM-AM and it does not appear to be working. It is not clear to me how to take advantage of the symmetry here.

Let $x,y,z>0$. Show that $$\sum_{cyc}(1-x)^2\ge \sum_{cyc}\dfrac{z^2(1-x^2)(1-y^2)}{(xy+z)^2}.$$ Here's what I have done. The expression $$\sum_{cyc}(1-x)\left((1-x)-\dfrac{z^2(1+x)(1-y^2)}{(xy+z)^2}\right)\ge 0$$ or $$\sum_{cyc}(1-x)\cdot\dfrac{x^2y^2+y^2z^2+xy^2z^2+2xyz-2xz^2-2x^2yz-x^3y^2}{(xy+z)^2}\ge 0.$$ But this way does not help for the starting inequality.


Consider the following number:  $$x=0.23434343434\dots$$  My question is whether this number  is rational or irrational, and how can I make sure that a specific number is rational if it was written in decimal form.  Also, is $0.234$ rational or irrational?

claims that every repeating decimal represents a rational number.  According to the following definition, how can we prove that fact?  Definition:  A number is rational if it can be written as $\frac{p}{q}$, where $p$ and $q$ are integers and $q \neq 0$.


I try to use Ubuntu 13.04 to run a specific project that works only on Ubuntu 13.04. I failed to get git and g++, so I tried  and now I have problems with sudo apt-get update

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


tried grub update and boot-repair but none working. this is the link which boot repair gave me

So, I've successfully dual-booted my Windows 8 machine with Ubuntu 12.04 . However, I still don't have a convenient method of choosing what OS to load at boot time.  After installing Ubuntu, my computer still loads Windows 8 directly. I then added grubx64.efi to the white list of my boot loader. But after that, my machine loads Ubuntu directly without even a shadow of GRUB showing up!  I used boot-repair and I got this paste.ubuntu URL: . After running boot-repair (and re-white listing the grubx64.efi file), GRUB now shows up but without any Windows 8 option!  Lastly, I ran sudo fdisk -l and it gave me this:  WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.   Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x6396389f     Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  1465149167   732574583+  ee  GPT Partition 1 does not start on physical sector boundary.   I'm guessing my problem has something to do with the warning from fdisk above but I don't know what to do with it. How do I proceed now?  Edit  My etc/default/grub is as follows:  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"   Also, just for the record,  in installing my dual-boot. The tutorial (which uses, 11.10, I must note), doesn't mention anything about this problem. Is there anything there I shouldn't have done?


I do not know if the question has already been posted. I was trying to find a closed form for the sum $$ \sum_{n=0}^{\infty}\frac{n^x}{n!} $$ Is there a special function to think about (polylogarithm...)? Wolfram Alpha suggests that for some values of $x$ the answer is a multiple of $e$. Thank you

The Bell number $B(n)$ is defined as $\sum_{k=1}^n S(n,k)$ where $S(n,k)={n\brace k}$ is a Stirling number of the second kind. I would like to learn how to prove the following identity (Dobinski's formula): $$B(n)=\frac{1}{e}\sum_{j=0}^{\infty}\frac{j^n}{j!}.$$


The two sets are the following: $(0,1) $ and $ [0,1]$  I know that (the cardinality of) $|(0,1)|=| \mathbb R|$ so it has to be true, that $[0,1]=| \mathbb R |$  Can I maybe use Hilbert's paradox of the Grand Hotel, or should I found a function, which Domain is $(0,1)$?

How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &= m(-1)+b \\ 4 = f(2) &= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective.


I would like to number assumptions in my document as  Assumption 1. Something. Assumption 2. Something else. Assumption 2'. An alternative to Assumption 2. Assumption 3. Some other thing.  and be able to reference Assumption 2' with the prime (') displayed (i.e., "By Assumption 2', we have...". May I know how I do this? I am using the , which implements the amsmath, amssymb, and theorem packages, among others.

I am writing a paper where I have a stated a theorem, and then a short time later I state another theorem which is equivalent to the first. Is it possible to number them so that the second is a primed version of the first? In other words, if the first gets numbered as Theorem 7, I would like its equivalent version to be numbered as Theorem 7'. Ideas? Thanks.