Here's my code: It gives me an error that b is used before assignment.  from Tkinter import * mConsole=Tk() words=StringVar() b='_ I _ _ U _' def c():     if b=='_ I _ _ U _':         b='C I _ C U _'             words.set(b)  words.set(b) word=Label(textvariable=words, font='Jokerman 20').grid(row=1,column=3 ,columnspan=4)

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


Any time I try installing any app, the system says "E: Could not get lock /var/lib/dpkg/lock -frontend - open (Resource temporarily unavailable)"  And I tried correcting it on terminal but it said "cannot remove 'var/lib/dpkg/lock - frontend' : No such file or directory"  What should I do now?

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


So the bevel appears to only be applying to the x-axis, when I also need it on the y axis. Any solutions and thoughts would be much appreciated. I have tried with the modelling bevel and the modifier, it may be a settings issue or preferences I am not sure.

First off I'll let you know I'm a total noob at blender I've used 3ds Max up until this point, but the company I'm working for at the moment needs me to use blender so I'm trying to make the transition over.  Literally all I'm making at the moment is a simple book and cannot understand how the bevel tool isn't working similar to how the chamfer tool would in 3ds Max.  I want a nice curved edge for the spine of the book however when I press control + B and try to bevel it bevels the edge unevenly with the new bevel pushing forward.    Is there a way I can get it to bevel evenly like it does in Max?


I'm trying to create a module that will separate the decimal from a number as I need it for a project. However when I test it the integer comes out fine but the decimal always gets an error:  def seperate(decimal):     integer = int(decimal)     dec = decimal-integer     print(dec, integer)            if I say try to enter 2015.677 it give this: 0.6769999999999072 2015 what is wrong?

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


My teacher was giving a lesson on matrices today, and he mentioned that, given two square matrices (of the same dimensions) $A$ and $B$, in order to determine if $A=B^{-1}$, we have to make sure that both $AB=I$ and $BA=I$, as matrix multiplication is not commutative.  However, it seems that given $A$, there is only one solution for $B$ to the equation $AB=I$.  Can someone show an example of two matrices $A$ and $B$ such that $AB=I$ but $BA \ne I$? Or prove that this not possible?

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


Please find the attached screenshot    My current reputation is 895, and the reputation tab summary also confirms it. My question is why  '905' points is displayed next to my name for some time ???  Is this a bug ? (or) If my reputation was reduced from 905 to 895 why is it not recorded in reputation tab ?  my profile link   can someone explain the behavior ?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


I noted a fact on Stack Overflow badges.  ● Nice Answer  × 39355 ● Nice Question × 7601   (5.2:1 rate)  ● Good Answer  × 6433 ● Good Question × 1199   (5.3:1 rate)  ● Great Answer  × 712 ● Great Question × 105   (6.8:1 rate)  All in all, since the badges are awarded for the same amount of accumulated votes in each category, it appears that people tend to vote more for the answers than the questions...  Just a thought...

While at least some answers from every question seem to have been up-voted as a "helpful" answer:   about 49% of questions have score of 0 or 1. another 21% of questions have a score of 2.   Most questions seem to have an answer or two with score +5. Is it that we have a lot of fluff questions and not useful ones? Or perhaps it just seems more natural to vote for answers than questions? If we want the most useful info on Stack Overflow to filter to the top, how can this disparity be fixed?  I think this may cause real problems for people getting the badges which require +25 or +100 votes on questions.    I like a lot of the feedback I'm seeing. Two problems are highlighted:   The work flow doesn't promote voting for questions the way it promotes voting for answers. One solution: when a user answers a question, the system should invite them to vote for the question.  If someone cares enough to answer a question, then they care enough to vote for it as well. Users with less than 15 reputation cannot vote for questions or answers. Is this warranted?  Maybe these users could provisionally vote for questions and answers and those ratings would only take effect when the user reaches 15 reputation?   All I ask is this. As you browse Stack Overflow, when you see a good question: vote for it.  If everyone does, then this problem will disappear.


I am a windows user who has switched to ubuntu 20.04 recently, so far I am satisfied with ubuntu. The solo problem is pdf editing i am unabe to find a decent pdf editor with text editing,can u suggest me any app? Or any other way?

I typically have two needs:  Scenario A. Change a single PDF page.  In this case I have a PDF but not the original source file used to create the PDF. I don't want to try to recreate the document from scratch. I'd like to open the PDF and change a few things. A good example of this scenario: I was responsible for planning a big event at a campground site, I had a PDF of the site. I wanted to start with that document, highlight some parts, add some labels, remove some parts that weren't relevant.   or   Scenario B. Combine PDFs or extract page(s) from a PDF  This scenario usually arises because I want a single PDF deliverable that is made up of parts that are best created in different programs. In this case I have the source files for all the documents but they don't play well enough together to easily create a single PDF deliverable. For part of it, I may want to use Libre Office Writer. For another page I may want to use Gimp. Still another page I may use Libre Office Calc. I could use Writer as the master document and embed images or the Calc object into that, but for ultimate control, you can't beat separate PDF documents that are then combined.  What are the best tools / processes for editing PDFs in Ubuntu?


I am trying to build a simple calculator that operates on Double values and performs:  +  -  *  /   negation  ^2  for some reason, whichever operation i specify when running the program executes the addition function.  So when I try to do  5 7 *  I get 12.0 and not 35.  Any suggestions?  I would also really like some help implementing a way to quit this program when the word "exit" is entered.  I was thinking something like System.exit(0);  but Im not sure how to implement.  this is my code so far:  import java.util.Scanner;   public class Calc {  public static void main(String[] args)  {     double num1;     double num2;     String operation;       Scanner input = new Scanner(System.in);      System.out.println ("Enter 'exit' to quit the calculator or 'help' for more options");     System.out.println("Enter the first number:");     num1 = input.nextInt();       System.out.println ("Display:" +  num1);      System.out.println("Enter the second number:");     num2 = input.nextInt();      System.out.println ("Display:" + num2);      Scanner op = new Scanner(System.in);       System.out.println("Please enter operation:");     operation = op.next();      if (operation == "+");     {         System.out.println((num1 + num2));     }     if  (operation == "-"){     {         System.out.println((num1 - num2));     }      if (operation == "/"){     {         System.out.println((num1 / num2));     }     if (operation == "*"){     {         System.out.println((num1 * num2));      }      }      }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


In Java, is it legal to call remove on a collection when iterating through the collection using a foreach loop?  For instance:  List<String> names = .... for (String name : names) {    // Do something    names.remove(name). }   As an addendum, is it legal to remove items that have not been iterated over yet? For instance,   //Assume that the names list as duplicate entries List<String> names = .... for (String name : names) {     // Do something     while (names.remove(name)); }

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


Situation: Have a jetted bathtub that requires 2 15A gfci outlets each to its own breaker. Problem only have one wire running into tub area (would have to tear up.newly installed floor to run another. Is it possible to use that single wire and connect two wires and run to the outlets and connect two wires to the other end of the wire (wire is approx 8 ft) and run those to the breaker box and attach to two gcfi breakers?


Let's say I have a RV, $\Theta$ ~ $N(0, \sigma^2)$. Is this analytically possible to transform this to Cartesian using the transform below:  $ X = cos \Theta $,   I mean, is it possible to calculate the pdf of $X$ analytically? If it is, what is the right way to do it?  I know that if $\Theta$ ~ $U[0,1]$, the transform leads to a Gaussian RV. But, I could not find any information when $\Theta$ itself is Gaussian.  Thanks in advance.

I'm learning about functions of random variables and am trying to work out an example I made up. If $y = \sin(x)$ and $x$ has domain $[0, 4\pi]$, is the following the correct expression for the pdf of $y$: $$\begin{align*} f_Y(y) &= \frac{d}{dy}F_Y(y)\\ &= \frac{d}{dy}[F_X(2\pi) - F_X(\pi) + F_X(4\pi) - F_X(3\pi)]\\ &= \frac{d}{dx}F_X(2\pi)\left|\frac{dg^{-1}(y)}{dy}\right| - \frac{d}{dx}F_X(\pi)\left|\frac{dg^{-1}(y)}{dy}\right| + \frac{d}{dx}F_X(4\pi)\left|\frac{dg^{-1}(y)}{dy}\right| - \frac{d}{dx}F_X(3\pi)\left|\frac{dg^{-1}(y)}{dy}\right|\\ &=f_X(2\pi)\left|\frac{1}{\sqrt{1-0}}\right| - f_X(\pi)\left|\frac{1}{\sqrt{1-0}}\right| + f_X(4\pi)\left|\frac{1}{\sqrt{1-0}}\right| - f_X(3\pi)\left|\frac{1}{\sqrt{1-0}}\right|\\ &= f_X(2\pi) - f_X(\pi) + f_X(4\pi) - f_X(3\pi)\\ \end{align*}$$


Java. I have found this code in my book about Spring Framework. What does it mean?:  static {    instance = new Instance(); }

My question is about one particular usage of static keyword. It is possible to use static keyword to cover a code block within a class which does not belong to any function. For example following code compiles:  public class Test {     private static final int a;         static {         a = 5;         doSomething(a);     }     private static int doSomething(int x) {         return (x+5);     } }   If you remove the static keyword it complains because the variable a is final. However it is possible to remove both final and static keywords and make it compile.   It is confusing for me in both ways. How am I supposed to have a code section that does not belong to any method? How is it possible to invoke it? In general, what is the purpose of this usage? Or better, where can I find documentation about this?


I am first time use timeit function, I am trying to find the time of builtin function sum()  >>> s=[1,2,3] >>> t=timeit.Timer("sum(s)") >>> t.timeit(5)   But it gives error     File "", line 6, in inner      NameError: name 's' is not defined   But it works  >>> s [1, 2, 3] >>> sum(s) 6

I'm trying to find out how much time it takes to execute a Python statement, so I looked online and found that the standard library provides a module called  that purports to do exactly that:  import timeit  def foo():     # ... contains code I want to time ...  def dotime():     t = timeit.Timer("foo()")     time = t.timeit(1)     print "took %fs\n" % (time,)  dotime()   However, this produces an error:  Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "<stdin>", line 3, in dotime   File "/usr/local/lib/python2.6/timeit.py", line 193, in timeit     timing = self.inner(it, self.timer)   File "<timeit-src>", line 6, in inner NameError: global name 'foo' is not defined   I'm still new to Python and I don't fully understand all the scoping issues it has, but I don't know why this snippet doesn't work. Any thoughts?


I don't have much experience with Linux OS. I managed to use ctypes in Python to access a function in Digital Persona SDK DLL file using this code: import ctypes dpfjDll = ctypes.CDLL("dpfj.dll") .....  Testing of calling the function worked perfectly on my windows machine, but when I deployed the app to our linux server, I got the following error: OSError: dpfj.dll: cannot open shared object file: No such file or directory  Any idea what is going on? Update: I tried for testing to set the absolute path temporarily for the file, and now I am getting this error message: OSError: /home/......./main/helper/dpfj.dll: invalid ELF header

We need to interface to 3rd party app, but company behind the app doesn't disclose message protocol and provides only Windows DLL to interface to. Our application is Linux-based so I cannot directly communicate with DLL. I couldn't find any existing solution so I'm considering writing socket-based bridge between Linux and Windows, however I'm sure it is not such a unique problem and somebody should have done it before. Are you aware of any solution that allows to call Windows DDL functions from C app on Linux? It can use Wine or separate Windows PC - doesn't matter. Many thanks in advance.


I know the transpose is to swap the columns and rows of a matrix. And $A^T$$A$ is a symmetric matrix which elements are the inner product of each column of $A$. But I didn't understand the intuition of transpose. Suppose $A_{m \times n}$, and A transform a vector from $\Bbb R^n$ to $\Bbb R^m$. But $A^T$ transform a vector from $\Bbb R^m$ to $\Bbb R^n$. What's the relationship between them? Could anyone please explain the relationship between $A^T$,$A$,the inner product and symmetric matrix. I think there would be a intuition explaination.

I can follow the definition of the transpose algebraically, i.e. as a reflection of a matrix across its diagonal, or in terms of dual spaces, but I lack any sort of geometric understanding of the transpose, or even symmetric matrices.  For example, if I have a linear transformation, say on the plane, my intuition is to visualize it as some linear distortion of the plane via scaling and rotation. I do not know how this distortion compares to the distortion that results from applying the transpose, or what one can say if the linear transformation is symmetric. Geometrically, why might we expect orthogonal matrices to be combinations of rotations and reflections?


I create a list of lists and want to append items to the individual lists, but when I try to append to one of the lists (a[0].append(2)), the item gets added to all lists.   a = [] b = [1]  a.append(b) a.append(b)  a[0].append(2) a[1].append(3) print(a)   Gives: [[1, 2, 3], [1, 2, 3]]  Whereas I would expect: [[1, 2], [1, 3]]  Changing the way I construct the initial list of lists, making b a float instead of a list and putting the brackets inside .append(), gives me the desired output:  a = [] b = 1  a.append([b]) a.append([b])  a[0].append(2) a[1].append(3) print(a)   Gives: [[1, 2], [1, 3]]  But why? It is not intuitive that the result should be different. I know this has to do with there being , but I don't see where that is happening.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I bought a Rhino Tank from Warstock Cache & Carry, as Franklin. I expected the tank to be delivered to the Grove Street Garage, but it's not there. Where should I be looking to find it? If it's not delivered to the purchasing character's garage, then where? Is the location different for each character?

When I buy special vehicles (military vehicles) I get the message that they have been delivered, but they are not in my garage or my hanger. I bought the military humvee (don't know the name) but when I press right on the D-pad nothing pops when I'm in the garage. I bought the tank, but it did not show up in my hanger. But when I bought the attack helicopter it showed up on my helipad. Anyone understand this madness?


I attempted to update through the terminal, but it responded with errors I haven't encountered with before.  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   EDIT: I used      sudo apt-get update

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


When I am generally flagging a post, I want to include more information for the people who are reviewing my flag. However, the only way I can add my two cents to it is to flag it for moderator intervention which is obviously not the proper usage of that flag. Can we have a little entry field that pops up after you select a radio button when flagging so that you can include more information about your specific flag?

, where a user had taken the time to look at the link on a post and realized that the post wasn't just off-topic, it was actually half-decently-disguised spam. So he flagged it as spam, and an overworked mod declined it, giving the questioner the benefit of the doubt. And we probably want mods to be giving the questioner the benefit of the doubt.  We also want to get rid of spam ASAP, and make the lives of mods easier. I'd like to suggest a feature the mod in question mused might be useful: An optional textbox where you can add a note saying why you think it's spam, so the mod can see it easily. In this case, the helpful user who went the extra mile could have written "Site linked doesn't relate at all to the question, instead solicits BitCoins" or similar.  One can leave a comment on the question, but:   People sometimes leave...unhelpful...comments on spam questions, and we don't want mods to have to take the time to read through them hoping for something useful It allows the user flagging the spam to do so and say why without calling attention to themselves publicly     Update: We may well want this for all flags, but in particular I had reason to want it for an NAA flag, so I've posted .


A closed path is made up of 11 line segment. Can one line, not containing a vertex of the path, intersect each of its segments? Can someone please explain the answer to this parity question to me with steps?  I found a similar question on stackexchange but could not understand the answers. Can someone help me?

This  problem is taken from the book Mathematical Circles by Dmitri Fomin, et al., translated by Mark Saul and published by the American Mathematical Society. Can anyone describe what the question actually means?


While answering  I encountered the following probability distribution: $$T_n\sim p(t~|~\lambda,n)=n\lambda e^{-\lambda t}(1-e^{-\lambda t})^{n-1}$$ This is a PDF for the random variable $T_n$ , which has to do with waiting times at a bank, or restaurant, or whatever. See the linked question for further details. Anyway, it was of some importance to compute the first and second non-central moments of this random variable. This is detailed in my answer to the linked question. But, then I started wondering about the $m$th non-central moment of this distribution. $$\mathrm{E}({T_n}^m)=n\lambda \int_0^\infty t^m\cdot e^{-\lambda t}(1-e^{-\lambda t})^{n-1}\mathrm{d}t$$ Using a binomial expansion, $$\mathrm{E}({T_n}^m)=n\lambda \int_0^\infty t^m\cdot e^{-\lambda t}\sum_{k=0}^{n-1}{}_{(n-1)}\mathrm{C}_k(-e^{-\lambda t})^{n-1-k}\mathrm{d}t$$ Simplifying and switching the integral and summation signs (fingers crossed!) $$\mathrm{E}({T_n}^m)=n\lambda\sum_{k=0}^{n-1}(-1)^{n-1-k}{}_{(n-1)}\mathrm{C}_k\int_0^\infty t^me^{-(n-k)\lambda t}\mathrm{d}t$$ Now using $\tau=\lambda(n-k)t$: $$\mathrm{E}({T_n}^m)=n\lambda\sum_{k=0}^{n-1}(-1)^{n-1-k}{}_{(n-1)}\mathrm{C}_k\int_0^\infty \left(\frac{\tau}{\lambda(n-k)}\right)^m e^{-\tau}\frac{1}{\lambda(n-k)}\mathrm{d}\tau$$ $$\mathrm{E}({T_n}^m)=\frac{n}{\lambda^m}\sum_{k=0}^{n-1}\frac{(-1)^{n-1-k}{}_{(n-1)}\mathrm{C}_k}{(n-k)^{m+1}}\int_0^\infty \tau^m e^{-\tau}\mathrm{d}\tau$$ Great! This is a familiar integral and we can use the properties of the Gamma function. $$\mathrm{E}({T_n}^m)=\frac{n\cdot m!}{\lambda^m}\sum_{k=0}^{n-1}\frac{(-1)^{n-1-k}{}_{(n-1)}\mathrm{C}_k}{(n-k)^{m+1}}$$ But what can we say about the sum $$S(n,m)=\sum_{k=0}^{n-1}\frac{(-1)^{n-1-k}{}_{(n-1)}\mathrm{C}_k}{(n-k)^{m+1}}$$ For $m=0$, Wolfram finds $$S(n,0)=\frac{\Gamma(n)}{\Gamma(n+1)}=\frac{1}{n}$$ Which is consistent, because since $$\mathrm{E}({T_n}^m)=\frac{n\cdot m!}{\lambda^m}S(n,m)$$ Then $$\mathrm{E}({T_n}^0)=\frac{n\cdot 0!}{\lambda^0}\frac{1}{n}=1.$$ For $m=1$ it finds the striking $$S(n,1)=\frac{H_n}{n}$$ With $H_n$ being the $n$th harmonic number. For $m=2$ it finds the even more mysterious, $$S(n,2)=\frac{6{H_n}^2-6\digamma'(n+1)+\pi^2}{12n}$$ With $\digamma'$ being the first derivative of the . For higher $m$ it only continues to get more complicated. For $m=3$, the even crazier $$S(n,3)=\frac{2{H_n}^3+(\pi^2-6\digamma'(n+1))H_n+2(\digamma''(n+1)+2\zeta(3))}{12n}$$ With $\zeta$ being the Riemann zeta function. And for $m=4$ and onwards, Wolfram fails to find any representations. Can anyone make any sense of this sum for higher $m$? Or perhaps even provide some justification for the lower order identities $$\sum_{k=0}^{n-1}\frac{(-1)^{n-1-k}{}_{(n-1)}\mathrm{C}_k}{n-k}=\frac{1}{n}$$ And $$\sum_{k=0}^{n-1}\frac{(-1)^{n-1-k}{}_{(n-1)}\mathrm{C}_k}{(n-k)^2}=\frac{H_n}{n}$$

For positive integers $s$ and $n$ (let's limit the generality), define $$H_s(n)=\sum_{k=1}^{n}\frac{1}{k^s},\qquad G_s(n)=\sum_{k=1}^{n}\binom{n}{k}\frac{(-1)^{k-1}}{k^s}.$$ The former is ; the latter is what I'm wondering about. I met it in a number of contexts. Say, if $X_1,\ldots,X_n$ are independent random variables distributed exponentially with parameter $1$, then $s!G_s(n)$ is the $s$-th moment of $\max\{X_1,\ldots,X_n\}$. I was looking for an expression of $G_s(n)$ in terms of $H_s(n)$. Here are examples: \begin{align}    G_1(n) &= H_1(n), \\ G_2(n) &= (H_2(n)+H_1^2(n))/2, \\ G_3(n) &= (2H_3(n)+3H_2(n)H_1(n)+H_1^3(n))/6, \\ G_4(n) &= (6H_4(n)+8H_3(n)H_1(n)+3H_2^2(n)+6H_2(n)H_1^2(n)+H_1^4(n))/24 \end{align} (the first one is seen in the linked article and in some  on this site). The general formula appears to be  $$G_s(n)=\sum_{\substack{a_1,\ldots,a_s\geqslant 0\\ 1\cdot a_1+\ldots+s\cdot a_s=s}}\prod_{k=1}^{s}\frac{H_k^{a_k}(n)}{k^{a_k}\cdot a_k!}.$$  How would one prove it best? Can it be seen from $$\sum_{s=0}^{\infty}G_s(n)t^s=\prod_{k=1}^{n}\Big(1-\frac{t}{k}\Big)^{-1}\tag{$*$}\label{helpeq}$$ which is easy to prove (here $G_0(n)=1$)?


How would I run a command block that only runs if someone logs on? By the way, it should somehow activate another command block that has the command in it as it needs a whole command block to work

Is there any way to run a command automatically when a player joins the server? I need to do this without the use of a Bukkit plugin. I think it's possible with MCP but I want to know how!


So I have a query I need to run like UPDATE entity WHERE id IN (:ids). I know when doing a SELECT I can do something like   val sql = "SELECT * FROM entity WHERE id IN (:ids)"; jdbcTemplate.queryForList(sql, Collections.singletonMap("ids", ids));  Is there any way to accomplish this for an `UPDATE` query where I don't have to just turn my list of ids into a comma seperated string and call it like  val params = ids.joinToString(",") jdbcTemplate.update(sql, mapOf(Pair("ids", params)))   EDIT: Turns out the second way I listed doesn't even work because it is expecting a Double and gets a string

What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? placeholder represents one value, rather than a list of values.  Consider the following SQL statement:  SELECT my_column FROM my_table where search_column IN (?)   Using preparedStatement.setString( 1, "'A', 'B', 'C'" ); is essentially a non-working attempt at a workaround of the reasons for using ? in the first place.    What workarounds are available?


When a program opens a file, and another program moves the file so that it has a different pathname/filename, can the first program still  work on the file, for example, modify the file's content or attributes and save changes to the file?  I guess yes.   When a file is moved, it has a different pathname/filename, but it still has the same inode and data blocks.  When a program opens a file, the pathname/filename of the file is used to look up its inode and data blocks, and the program holds directly or indirectly the pointers to the  data structures of the inode and data blocks of the file. I am not sure if the pathname/filename is still useful after the lookup.   If the answer is yes, what  behaviours are expected from programs, suppose you are to create such programs?   shall they silently work on the moved file, shall they notify the user of the moving and ask if they want to continue to work on the moved file?   I often keep   files open in some programs (emacs, some pdf software) as long as possible, long enough that I may likely use other programs (mv) to move/rename them at some point in the mean time. Emacs warns me about the fies having been moved, and I don't know if Emacs can continue to work on the moved file, so I usually have to close the buffer and reopen the moved file in a new buffer, which is inconvenient IMO.  Thanks.

I just renamed a log file to "foo.log.old", and assumed that the application will start writing a new logfile at "foo.log". I was surprised to discover that it tracked the logfile to its new name, and kept appending lines to "foo.log.old".  In Windows, I'm not familiar with this kind of behavior - I don't know if it's even possible to implement it. How exactly is this behavior implemented in linux? Where can I learn more about it?


I discovered it by accident .  I guess I'm not the only one who fixed non-breakable unicode space U+00A0 to something like Alt+Space. So it's pretty easy to circumvent your prevention without even really trying. After all, non-breakable space simply makes sense there.  I think the solution is to:   Only test at the end of the title (only white characters and small misleading ones after [on hold] should allow the test to return positive and block posting) - this will allow discussions on meta to have it spelled properly (see linked question). Forbid all and every white characters and 0-width characters between [on and hold] - this would be a real fix.

I just had a random thought; what if you append "[closed]" to the end of a question title. Is it filtered out, or in some way disallowed?  If you are seeing this, it isn't. It could potentially be used for some trickery, right? Or maybe not. I don't know, that's why you're here: discuss!  EDIT: Just a recap: Juan Manuel edited and removed "[closed]" from the end of the title and then answered (see below) - but it is technically possible.  Edit 2: Looks like it's still possible, if you play silly tricks with Unicode. (There's a  character in the new title.)


void OpenClean( int i, int j) {          bnt[i, j] = new Button();         if (!bnt[i,j].Enabled) return;          bnt[i, j].Enabled = false;         bnt[i,j].BackColor = Color.Aquamarine;         bnt[i, j].Text = data[i, j].ToString();         if (data[i, j] == 0) {              if (i > 0 && j > 0 && data[i - 1, j - 1] == 0) OpenClean(i - 1, j - 1);             if (i > 0 && data[i - 1, j] == 0) OpenClean(i - 1, j);             if (i > 0 && j < 8 && data[i - 1, j + 1] == 0) OpenClean(i - 1, j + 1);             if (j > 0 && data[i, j - 1] == 0) OpenClean(i, j - 1);             if (j < 8 && data[i, j + 1] == 0) OpenClean(i, j + 1);             if (i < 8 && j > 0 && data[i + 1, j - 1] == 0) OpenClean(i + 1, j - 1);             if (i < 8 && data[i + 1, j] == 0) OpenClean(i + 1, j);             if (i < 8 && j < 8 && data[i + 1, j + 1] == 0) OpenClean(i + 1, j + 1);         }  It tells me Process is terminated due to StackOverflowException. Because of my limited experience,I didn't find an effective way. This question has been bothering me for a long time. Please help or try to give me some ideas how to solve it. Thanks in advance!

I would like to either prevent or handle a StackOverflowException that I am getting from a call to the XslCompiledTransform.Transform method within an Xsl Editor I am writing. The problem seems to be that the user can write an Xsl script that is infinitely recursive, and it just blows up on the call to the Transform method.  (That is, the problem is not just the typical programmatic error, which is usually the cause of such an exception.)  Is there a way to detect and/or limit how many recursions are allowed?  Or any other ideas to keep this code from just blowing up on me?


Does there exist an infinite non-abelian group, such that all its nontrivial proper subgroups are isomorphic to $C_\infty$?  It is rater obvious, that if such group exists then it is generated by any non-commuting pair of its elements. However I failed to prove anything else about it.  This question was inspired by Ol’shanski theorem, that states, that for all primes $p > 10^{75}$, there exist continuum-many infinite non-abelian groups, such that all their nontrivial proper subgroups are isomorphic to $C_p$ (Such groups are called Tarski Monster $p$-groups).

Suppose $G$ is an infinite group such that any proper non-trivial subgroup of $G$ is infinite cyclic. Is $G$ itself then infinite cyclic?  If we would only require the proper subgroups to be cyclic, then the Tarski monster groups would yield some counter-examples. Are there analogous examples of Tarski monsters where proper subgroups are infinite cyclic?


I am an Indian citizen with a US green card. I am going on a study abroad trip to London and I know I need a visa for that. However, I do plan to take a trip to Germany to visit my relatives via train (EuroStar and the ICE). I know the trains have stopovers in either Paris or Brussels but I am unsure of what the visa requirements will be for these countries, especially for France and Belgium since I would just be switching trains. I assume I would need a German visa as well.   What kind of permission do I need for traveling through these countries?

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


I am trying to make similar shoes and I don't know how to make those extruding objects on the shoe strap/ on its sides (I've thought of particles, but my output is faaaaar from what I want, I don't know how to set the orientation axis so the placement is not off like in my blend file..)  my blend file is here:

The carrots aren't properly placed to the ground. These carrots were created via particle system. I want to rotate my particle system X location axis 90 degrees. Is it possible?


I did a project using mirror modifier, but I have 2 problems.  -There is a visible seam all around.   There is a huge gap at some places   When I turn off subdivision modifier, there are no gap anymore   I tried to increase merge limit but, even 0.0001 don't do the right thing. I succeed to merge some vertices by snapping and I checked merge and clipping. But the problems persist. Anybody could help?

I tried to subsurf this model that I mirrored but when I use subsurf it splits the model into two objects.  Before Subsurf:   After Subsurf:   Any help would be appreciated.


I am working on this project and I'll have 200+ and even more by the end of the project.  I need to have all these themes show up in Admin > Appearance ?  All themes will be installed on the same wordpress site Is there any way to arrange the themes in Categories (ex. Financial, Arts etc).

I want to organize themes like:   wp-content/themes/themeshop/theme1 wp-content/themes/themeshop/theme2 wp-content/themes/themeshop/theme3   Now from my understanding, this organization works perfectly at the folder level. I dropped themes in subdirectories and everything seems to work fine. Now is it possible to duplicate this categorization in the Administration backend on the themes page?


The method I'm hoping to execute doesn't acknowledge whenever a "y" is inputed into the scanner. It doesn't execute the first part of the if statement, it immediately skips to the else. I'm not sure why it isn't working, is it because I have several scanners running at once? The goal is to use the for loop to store several answers into an array and then manipulate the array with another method. any help to why would be great!       private static float[] assignMarkArray = {0,0,0};       public static void setAssignMark(int index, float value) {         assignMarkArray[index] = value;     }      public static void setLabMark (int index, float value) {         labMarkArray[index] = value;      }      public static void enterAssignGrades() {     System.out.println("Do you have any assignment Marks? (y/n)");     Scanner sc = new Scanner(System.in);     String input = sc.nextLine();     if (input == "y"){         for(int q = 0; q < 3; q++) {             System.out.println("Do you have a mark for A" + (q+1) + "(y/n)");             Scanner sc2 = new Scanner(System.in);             String input2 = sc2.nextLine();             if (input2 == "y") {                 System.out.println("Enter your A" + (q+1) + " mark (Out of 100%): " );                 Scanner sc3 = new Scanner(System.in);                 float gradeInput2 = sc3.nextFloat();                 setAssignMark(q, gradeInput2);              }else if (q==3) {                 sc.close();                 sc2.close();             }             else{                 setAssignMark(q, 0);             }         }     }     else{ System.out.println("There are no assignment grades to mark");           sc.close();     } }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I am trying to create a gaussian blur for a buffer polygon around a border.    I have Spatial Analyst and ArcGIS for Desktop Advanced, but am not sure if it is possible.  Can anyone suggest a way to do it in ArcGIS for Desktop?

The attached screenshot of a National Geographic map shows some beautiful directional shading of boundaries.  I'm trying to reproduce this sort of shading for a burn perimeter map, as I want to highlight features within the burn perimeter and not overshadow them with a transparent polygon or crosshatch.  Is there a way to accomplish this sort of boundary shading using ArcGIS 10?  Link to  titled: "1946 Political Subdivisions Of India By National Geographic.jpg"


I just got a bug report for multicol because of a strange white space at the top of the first column and I traced it to the use of the pdfsync package that added material in various places that did somehow conflict with the column balancing routines of multicol.  Now this is rather an issue with this particular package that adds material in a way it perhaps shouldn't (well it warns that this could happen and that it should never be used on final documents). But it makes me wonder if there are any useful applications for this package at all these days, given that you can get this functionality (at least with TL binaries) by specifying -synctex=1 and use editors like TeXWorks  without any side-effects.  If the answer is yes it is needed, which are those applications? If no, shouldn't the package get a bold warning (say, via \typeout) that it would be better to remove it and rely on a different approach?  Even if the answer is yes, I think a \typeoutwarning would be in order that it shouldn't be used on final documents (as the author states).

The pdfsync homepage states that:     At the end of this summer (2007), pdfsync is slowly migrating to pdftex itself. We are working at giving pdftex all the pdfsync ability and more...   The pdfsync README file discourages people from using pdfsync:     pdfsync uses extremely sensible code. You should not use pdfsync on final documents because it can change the layout rather significantly.   From your knowledge and experience, what is the actual status of pdfsync?   Is it safe to use pdfsync? Is there an alternative for pdfsync that is built into pdftex? Is there a different tool for pdflatex that offers DVI-like functionality (forward and backward search)?


I am having some fundamental issues with manipulating Lorentz transformation matrices using index notation. However I'm struggling to pin down what the actual issue is.  Hopefully my misunderstanding can be demonstrated by an example. It can be shown that$$(\Lambda^{-1})^{\mu}_{\,\,\,\nu}=\Lambda_{\nu}^{\,\,\,\mu}$$ If I then write $$(\Lambda^{-1})^{\mu}_{\,\,\,\nu}=(\Lambda^{T})^{\mu}_{\,\,\,\nu}$$ I have seemingly proved that $$\Lambda\Lambda^{T}=I$$ which is not true, given the definition of the Lorentz group. I have seen the equation $$(\Lambda^{T})^{\mu}_{\,\,\,\nu}=\Lambda_{\nu}^{\,\,\,\mu}$$ used in various places, so I can't really see what I've done wrong here.  If somebody could point out where I'm going wrong, and explain why, that would be so helpful! Thanks.  Edit: Possible duplicate doesn't seem to explain why I cant: a) Transpose and swap indices of a LT (eq. 4, used in going from eq. 1 to eq. 2) and/or b) Equate matrices, given equal elements (eq. 3) which are needed to solve my example.

I have some open-ended questions on the use of staggered indices in writing Lorentz transformations and their inverses and transposes.  What are the respective meanings of $\Lambda^\mu{}_\nu$ as compared to $\Lambda_\mu{}^\nu$? How does one use this staggered index notation to denote transpose or inverse?  If I want to take any of these objects and explicitly write them out as matrices, then is there a rule for knowing which index labels row and which labels column for a matrix element? Is the rule: "(left index, right index) = (row, column)" or is it "(upper index, lower index) = (row, column)" or is there a different rule for $\Lambda^\mu{}_\nu$ as compared to $\Lambda_\mu{}^\nu$?  Are there different conventions for any of this used by different authors?  As a concrete example of my confusion, let me try to show two definitions of a Lorentz transformation are equivalent.  Definition-1 (typical QFT book): $\Lambda^\mu{}_\alpha \Lambda^\nu{}_\beta \eta^{\alpha\beta} = \eta^{\mu\nu}$  Definition-2 ($\Lambda$ matrix must preserve pseudo inner product given by $\eta$ matrix): $(\Lambda x)^T \eta (\Lambda y) = x^T \eta y$, for all $x,y \in \mathbb{R}^4$. This implies, in terms of matrix components (and now I'll switch to linear algebra notation, away from physics-tensor notation): $\sum_{j,k}(\Lambda^T)_{ij} \eta_{jk} \Lambda_{kl} = \eta_{il}$. This last equation is my "Definition-2" of a Lorentz transformation, $\Lambda$, and I can't get it to look like "Definition-1", i.e., I can't manipulate-away the slight difference in the ordering of the indices.


I would like to learn how to use Ubuntu command line, so I decided to google a little bit. In my search I only find tons of books, but any video course that explains how to use the terminal.  Is there any video course that explain how to use the terminal?

I've been using ubuntu for like 3 years as my main os. I've used terminal many many times but never have I deeply understand it. I run commands, I'm familiar with the basic ones, but i want to dig deeper. Is there any video introduction(i like to lay back and watch tutorials instead of reading books) to novice-intermediate to advanced command line?   Thank you.


At the end of the season, the team, regardless of whether they win the championship, are splitting up.   I thought this was perfectly fine, although perhaps saying "the team members" would have been nicer (in my opinion). However, apparently, it should be rewritten as      At the end of the season, the team, regardless of whether they win the championship, is splitting up.   But this bothers me a) because I thought "team" could be both singular and plural depending on the situation, and b) with the clause "regardless of whether they win the championship" where "they", a plural, is used, wouldn't it be odd to use "... is splitting up" just to match "team" which is apparently singular? (That's why I chose to keep "team" plural in my first attempt at editing.)

I am a bit confused with this sentence.   The team was/were now in the field and about to take their/its place.  Since we are referring to taking positions on the field and as all the players take different positions, I thought we have to use the team as a plural here as the emphasis is on individual units. But my book says otherwise.  Is The team were now in the field and about to take their place, correct? Please clarify.


How to beat the Kayran, with Xbox controller on PC? I cut off four arms and the Kayran is down to 1/4 health. I get swept on one tentacle, I am clicking as fast as possible (blue X), yet even when the yellow bar appears to be full I still get thrown off the tentacle.

In the first chapter you are supposed to slay the Kayran, this enormous beast:    I'm having a hard time with it. I drank the Mongoose potion for poison resistance and I have the Kayran trap, but it just hits me too often with its tentacles. Especially when the Kayran swings a tentacle sideways, not from above, I have a very hard time evading it.  Is there any trick besides not getting hit by the tentacles?  With a lot of luck I'm getting as far as the point where it's throwing stones. Any idea what I'm supposed to do then?


I have 700+ title tag duplicates showing in WMT.     Every first link in that picture is as duplicate link of second one. I don't know from where the first link got indexed by Google when that link doesn't exist in the site. It's showing the title of every page as link.   Original link: http://www.sitename.com/job/407/Swedish-plus-Any-other-Nordic-Language-Customer-Service-Representative-Dublin-Ireland.  Duplicate link: http://www.sitename.com/job/407/Swedish-plus-Any-other-Nordic-Language-Customer-Service-Representative-Dublin-Ireland-Ireland.  How can this happen? I have checked entire site I didn't find where the second version is linked.  I have no images linked to with duplicated version of URL.

For my website Google Webmaster Tool is showing more than 700 duplicate title tags. All are images url. I am in a trouble, because I have uploaded all images to wp-content/uploads. But in WMT the link of images are indexed as url of the post added with alt text of the image as attribute. I don't know from where they are coming from, as I have uploaded them on wp-content/uploads. What should I do to get rid of. Anyone who helps me will be appreciated. This website is on WordPress.


I have a PHP project that exposes its API under /api/public/(xyz). The http root directory has .htaccess file that rewrites those requests to be processed by index.php.   For reason not relevant here, we want to expoze (xyz) methods under /services(xyz).  My very naive approach was to create services subdirectory and .htaccess file with the following content:  RewriteEngine On RewriteRule ^(.*)$ /api/public/$1 [PT]   My idea was, that request to /services/(xyz) will be rewrited to /api/public/(xyz) and handled internall as if the second URL was invoked. However, it doesn't seem to work. Apache logs 404 for the request.  What did I get wrong here?  Please note, it's not the problem with the rule syntax itself, I'm able to get static resource. The problem is, that after rewriting, I get the URL that would be rewrited by other rules, that are in the other file. How the rules are flowing through multiple files is something that is not covered by the canonical question...

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.


In the film Now You See Me the Four Horsemen rob the bank Crédit Républicain de Paris.  Thaddeus Bradley gives an explanation which includes:      the money being switched with a flash paper copy which was burned after being put in the vault.   Was it explained how this got this to happen after the money was in the vault and there was no one there to burn it?

In Now You See Me, when Morgan Freeman explains to the detective on how the Four Horseman robbed the bank, he mentions that they replaced the real money (while in the secured transport truck) with flash paper.  This does not explain how the paper in the bank got ignited, and no ignition/stimulator left in the scene as evidence.  Who/What/When ignited the flash paper in the bank on time?   There had to be some timer/delay mechanism on the platform, or something similar - but in the frames we see - there is nothing.


I have a CPT called "products" so in the menu on the left there is "products" and "add new", I want to have "product categories" within the menu too so that the user can add as many product categories as they like, and then when they "add new product" they can assign it to a product category.  Here is how I have registered my CPT:      register_post_type( 'products', // CPT Options     array(         'labels' => array(             'name' => __( 'Products' ),             'singular_name' => __( 'product' )         ),         'public' => true,         'has_archive' => true,         'taxonomies' => array( 'Product-categories' ),         'hierarchical' => true,         'rewrite' => array('slug' => 'products'),     ) );   How do I get a "product categories" taxonomy menu within "products" on the left please?  Thanks

I am trying to create a product based content managed website in Wordpress (by clients request). I have created a custom post type where all the products reside, aptly named 'Products'. The products must be shown in different categories as illustrated by the attached image. Being new to Wordpress I am struggling with how to put this together and would like some advice.  Is it best to create a bunch of categories with corresponding pages. When the link is clicked I then somehow filter all the posts in that category? Just a little advice on how the best way to achieve this if possible. Many thanks in advance.


Me, being new to Skyrim, accidentally punched someone and received a bounty of 40. Then, I said "I would rather die than go to jail" to a guard, not knowing this would make everyone hate me and attack me. How can I fix this without resetting my game or anything like that?

I accidentally killed a noble, now every guard wants to kill me. Is there any way I can get rid of the bounty?


It is proven only when there is a potential difference current flows in that branch between two nodes, then how we say that the current flows in a short circuit where the voltage on that branch is 0?

I've learn some electronic knowledge at school and so confused by some questions.  Q1. IS it possible a flow of electricity without an electric field?  Q2. I've learn that moving of particle with electric charge in electric field makes potential difference. Then, let's suppose no resistance in wire. IF Q1 is true, wire with a flow of electricity makes an electric field, and in the electric field, an electron moves. Then potential difference must exist. But when measured, there is no potential difference. ( I learn there is ESR in battery, but I wonder whether moving of electron dosen't make any potential difference or not.)  Sorry for my bad English, but I hope someone could help me to find answer.


I deleted files from /boot to save space, but now when I boot I see:     GRUB loading, please wait ... ERROR 15   /boot still has files corresponding to the 2.6.32-27 version of Linux. But I deleted all others that did not have that string in /boot  How can I fix this?

I mistakenly deleted  the /boot folder from my filesystem, rebooted, and all I get now is this:  error: file '/boot/grub/i368-pc/linux.mod' not found.  grub rescue>


I have rendered a 2 min animation that I'm pretty happy with (my first go with Blender) using models I created. The render was great, noticed a few mistakes so I was going to do some more editing.   I now notice one of the objects has become very noisy, screenshot below. I can't get the texture back. Everything looks fine within Material & Texture in the Properties section of the object. I've even tried to relink the material and UV maps from the object beside it in the screenshot as they are essentially the same object.   Have I just accidentally added noise to the object somehow? To new to Blender to figure it out.  Thanks in advance.

I was following  on creating a watch and noticed that when I rendered the watch, some pieces were messed up.  I'm new to 3D modeling and I've just learned Blender, I can't explain it well, so here's a picture:    Other examples:     I don't know if it's a problem with my World texture, the object, or the object's texture/material, so I can't even guess how to fix it. What causes this? Is it possible to fix it?


I want to know how to Open Settings, WiFi or Bluetooth page programmatically in iOS 6.0.  I know there is a way to open setting page via custom URL but it is deprecated above iOS 5.1.  If there is any way to open the page directly,please let me know, Or provide some example code.  Any Help will be appreciated...

In an iPhone app I'm working on, the user needs to enter some configuration via the settings application before my app will be able to connect to a server and run. Right now when the user first launches my app, I display an alert explaining that the user should go to settings, enter the config details and then relaunch, but this isn't ideal.  Unfortunately there's no way for me to provide sensible defaults for this app, the server host names, user accounts etc. will vary for each user. I think the best I can hope for is to show an alert explaining that some configuration needs to be entered via settings, and provide a "Take me there..." button that will open settings and then open the section in settings for my app. If that's not possible, opening settings is better than nothing.  I vaguely remember that the iPhone jailbreaking people had figured out a way to launch settings or other apps via a funny URL or phone number in the Addressbook, but I'm not finding any info about it in Google.  :(


I want some rectangles that are adjacent to each other in a line. Almost got it, but the rectangles have borders which touch, and I want the borders to overlap. Is there a way to do this?  \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows} %%%< \usepackage{verbatim} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{5pt}% %%%> \title{boxes1} \tikzset{   >=latex,   font=\sffamily } \begin{document} \begin{tikzpicture}  \coordinate (pen) at (0,0); \foreach \x [count = \xi] in {0.1,0.2,0.1,0.1} {   \node[rectangle, thin, draw, anchor=west, minimum width=\x*3 cm](rnode)at (pen) {\xi} ;   \coordinate (pen) at (rnode.east); } \end{tikzpicture} \end{document}

I would like to place nodes with given distances relative to each other. For consistence with other drawings these distances have to be very accurate. Node border anchors are placed at the outer borders of the nodes (see pgfmanual 3.0.0, page 702). Therefore, effectively pgflinewidth (or fractions/multiples of it depending on the nodes shape) is added to the given distance (red nodes in the MWE).  A way to counteract this would be to subtract (fractions/multiples) of pgflinewidth (blue nodes in the MWE). Another alternative could be to place the nodes w.r.t. their centers. In this case, one would need to know the nodes' widths beforehand which might not be easy for arbitrary node shapes.  My question: Is there an easy way to have node border anchors centered on the borders?  \documentclass{standalone}  \usepackage{tikz}  \begin{document}          \begin{tikzpicture}[ultra thick, MyNode/.style={draw, minimum height=1cm}]                  \draw[step=1cm,gray,ultra thin] (-1cm,-3cm) grid (5cm,2cm);                  % default case                 \begin{scope}[red]                     \path (0,0) node[MyNode, anchor=south west, minimum width=1cm] (n1) {};                     \path (n1.east) ++(1cm,0) node[MyNode, anchor=west, minimum width=2cm] {};                 \end{scope}                  % supstract line width                 \begin{scope}[blue, shift={(0,-2)}]                     \path (0,0) ++(-0.5\pgflinewidth,-0.5\pgflinewidth) node[MyNode, anchor=south west, minimum width=1cm] (n1) {};                     \path (n1.east) ++(1cm,0) ++(-\pgflinewidth,0) node[MyNode, anchor=west, minimum width=2cm] {};                 \end{scope}      \end{tikzpicture}  \end{document}


For any adiabatic process $P$,$V$ and $T$ change while $dQ=0$. By first law of thermodynamics,  $$dQ=dU+dW$$  That is, it becomes  $$dU+dW=0$$  At this stage, we set   $$dU=C_v dT$$  Any further calculations are on this basis. If, in an adiabatic process, volume is not constant, then why do we write the above equation?

When we try to establish a relation between the pressure and temperature in adiabatic process we come across a equation..  $dU = dq - PdV$  $dq=0$ (Adiabatic process) and,  $dU=C_v.dT$ (Heat capacity at constant volume)  Therefore, $C_v.dT = -PdV$$\tag1$  In this equation we are using heat capacity defined at constant volume but their still is some work done by the system (i.e, $PdV$ is not $0$ or $dV$ not equals to $0$).  The first part of the equation $(1)$ is implying that the volume is constant but the second part is implying that the volume is not constant (if it was there would be no work done).  Then why there is this contradiction ?


I just got a new laptop and have installed Ubuntu 14.04 on the same. Though its detecting my home wifi its not getting connected to it. Its asking for the password and when I provide the password it just comes back to the same window asking for password again. I have checked the password multiple times and its correct. Also at that time i was able to connect to my home wifi from my mobile and another laptop.  But when I switch on my mobile hot spot I was able to connect to it and and its working. Do I have to do something specific to get my laptop connected to my home wifi.    output of the command: lspci -knn | grep Net -A3  05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:81c1]     Kernel driver in use: rtl8723be

I have installed Ubuntu 15.04 on my laptop with RTL8723BE Wi-fi card. But it is always disconnecting from network. I have tried echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf but that didn't helped. What can I do to prevent the wifi from disconnecting? If I upgrade to kernel 4.X, will it help?  ~$ lspci -knn | grep Net -A2  09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]     Kernel driver in use: rtl8723be   ~$ rfkill list 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   ~$ ifconfig && iwconfig && route -n && ping -c 1 google.com eth0      Link encap:Ethernet  HWaddr 38:63:bb:cd:4a:7e             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:3 errors:0 dropped:0 overruns:0 frame:0           TX packets:53 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:752 (752.0 B)  TX bytes:8445 (8.4 KB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:3870 errors:0 dropped:0 overruns:0 frame:0           TX packets:3870 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:314613 (314.6 KB)  TX bytes:314613 (314.6 KB)  wlan0     Link encap:Ethernet  HWaddr c0:38:96:6d:c4:83             inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::c238:96ff:fe6d:c483/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15240 errors:0 dropped:0 overruns:0 frame:0           TX packets:14627 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:14410285 (14.4 MB)  TX bytes:2192744 (2.1 MB)  eth0      no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:"DIR-615"             Mode:Managed  Frequency:2.437 GHz  Access Point: 00:90:4C:08:00:0D              Bit Rate=150 Mb/s   Tx-Power=20 dBm              Retry short limit:7   RTS thr=2347 B   Fragment thr:off           Power Management:off           Link Quality=70/70  Signal level=-22 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:186   Missed beacon:0  lo        no wireless extensions.  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.1.1     0.0.0.0         UG    400    0        0 wlan0 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0 PING google.com.Dlink (172.26.136.19) 56(84) bytes of data. 64 bytes from 19.136.26.172.in-addr.arpa (172.26.136.19): icmp_seq=1 ttl=249 time=102 ms  --- google.com.Dlink ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 102.547/102.547/102.547/0.000 ms


The opposite of list flattening.  Given a list and a length n return a list of sub lists of length n.  def sublist(lst, n):     sub=[] ; result=[]     for i in lst:         sub+=[i]         if len(sub)==n: result+=[sub] ; sub=[]     if sub: result+=[sub]     return result   An example:  If the list is:  [1,2,3,4,5,6,7,8]   And n is:  3   Return:  [[1, 2, 3], [4, 5, 6], [7, 8]]   Is there a more eloquent / concise way?  An aside, what is preferred when appending lists to lists (in the context above):  list1+=[list2]   Or:  list1.append(list2)   Given that (according to Summerfeild's 'Programming in Python 3') they are the same?  Thanks.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


We know from Hubble law that the galaxy is receding from each other. Also, the general theory of relativity predicts the metric expansion of space ( voids are increasing). Then why Andromeda is approaching the Milky Way, I think it should be going away? Where I am getting wrong?

Hubble's law says that the universe is expanding. How come the Milky Way and the Andromeda galaxies are on a collision course? How will they end up colliding with each other?


How would you take the limit of   $$\frac{\log(n!)}{\log(n^n)}$$  as $n\rightarrow\infty$.   I believe you have to remove the log raising it to their base. Is this correct ?  Thanks.

I can't seem to find a good way to solve this.  I tried using L'Hopitals, but the derivative of $\log(n!)$ is really ugly. I know that the answer is 1, but I do not know why the answer is one.  Any simple way to go about this?


Is the set of partial order relations over $ \mathbb{N}$ countable? I think it's uncountable but don't know how to prove this. I would be very helpful if someone could also give some kind of a strategy for proving uncountability, in particular how to find injective or surjective functions that help proving this.

I need to compute the cardinality of the set of all total orders on $\Bbb{N}$.  Now, by definition there is an inclusion of this set into $\mathcal{P}(\Bbb{N}\times\Bbb{N})$, and so has cardinality $\le 2^{\aleph_0}$.  Now, finding an injection from $\mathcal{P}(\Bbb{N})$ to the set in question is much harder. I have the solution below, which I don't really understand and don't intuitively see. It feels like the usual $\le$ with some priority to elements of the set injected, but not quite.  Can anyone extrapolate some meaning from this, or provide a nicer solution?  (apologies for the laziness of not rewriting the solution)


If $f:(a,b)\to \mathbb{R}$ is differentiable in a point $x\in (a,b)$,   show that $\lim\limits_{h\to 0}\frac{f(x+h)-f(x-h)}{2h}$ exists and   that it is equal to $f'(x)$.   I figured that since the change in $x$ is described trough $2h$ that there is a $\delta$-neighbourhood around $x$ such that $|x-h|=|x+h|$. Sadly, I don't know how to make use of that argument in my proof. I know for a fact that the quotient describes to neighborhoods that, when $h\to 0$, squeeze the point.

If $f(x)$ is differentiable at x, I need to prove that $\lim_{h\to0}\frac{f(x+h)-f(x-h)}{2h}$ exist and is finite.  so if $f(x)$ is differentiable at a $x$, the difference quotient exist for this point, and also $f(x)$ must be continuous at x as well  so that mean that:  $\lim_{h\to0^+}\frac{f(x+h)-f(x)}{h} =  \lim_{h\to0^-}\frac{f(x+h)-f(x)}{h}$  and that: $\lim_{x\to x_0^+}=\lim_{x\to x_0^-}=f(x_0)$  I know I should probably use arithmetic limit laws to prove this but I can't see how what I figured out could help me. any help with that?  Thanks!


Consider the next decision problem: Given two finite groups represented by their multiplicity table, determine if they are isomorphic or not. Clearly, this problem belongs to NP since given a witness in the form of an isomorphism between the groups it can be verified in polynomial time (to the input size). But what more can be said about this problem in terms of complexity?

Unless I was mistaken somewhere in the proof, the following claim should hold: Claim. Let $G, \tilde G$ be groups. Then, $G\cong\tilde G$ if and only if there are a set $S$ and two bijections, $f\colon S\to G$ and $\tilde f\colon S\to \tilde G$, such that: $$\tilde f^{-1}(\tilde f(s)\tilde f(t))=f^{-1}(f(s)f(t)), \space\space\forall s,t \in S\tag 1$$ (Operation symbol is omitted in both groups.) As a first test of $(1)$, I'd like to show by brute force that, if $G=\mathbb{Z}_4$, $\tilde G=\mathbb{Z}_2\times \mathbb{Z}_2$ and $S=\{1,2,3,4\}$, then: $$\forall \alpha,\beta =1,\dots,24, \exists i,j \in S \mid f_\alpha^{-1}(f_\alpha(i)+f_\alpha(j)) \ne \tilde f_\beta^{-1}(\tilde f_\beta(i)+\tilde f_\beta(j)) \tag 2$$ where $\{f_\alpha, \alpha=1,\dots,24\}=\operatorname{Sym}(S,G)$ and $\{\tilde f_\alpha, \alpha=1,\dots,24\}=\operatorname{Sym}(S,\tilde G)$, $\operatorname{Sym}(X,Y)$ being the set of bijections from $X$ to $Y$.  Is there any available fast resource to computationally check $(2)$?


I have just installed xubuntu 13.04 on an old laptop, and once a day I get the notification that updates are available.   But When I open Software Updater, it shows that there are some updates, but the list is empty:   What do I need to do to see the names of the packages that have updates?  There are a few similar question already, but they do not solve my issue.    suggests reinstalling gtk3-engines-oxygen but that package is not installed, so it cannot be removed.  talks about apt-get upgrade. I have tried that, but it does not solve the issue.

Today I received an update notification for three updates but update manager doesn't say what updates are they.    Does anyone have a clue what this is about? How am I to check what is to be updated?


I am trying to install:  sudo apt-get install pass  from . But I get the error: sudo apt-get install pass Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package pass  How to fix this error? When I try: apt policy pass N: Unable to locate package pass

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


So, I just realized that my root partition which is 50 GB, only has 6 GB free space. p.s: I have separate root and home partition, my home partition is 180 GB and I have a 1TB HDD drive too which I use for my most of my big files. Should I do anything? like resizing or anything(just guessing), or it has enough space? edit: I've never saved personal files on my root partition second edit: So I did a scan on the partition and here's how is my root partition that big I have 26 GB on /var (21 GB on /var/lib, 20 GB of it on /var/lib/snapd and on snapd, 14 GB is on /var/lib/snapd/snapshots) and 5 GB on /var/log) and 14.1 GB on /usr (8 gb on /usr/lib and 4 gb on /usr/share) these were the big files

I have only one disk in my computer, a 80 GB SSD. It is formatted as a single ext4 partition (no swap), and all the usual folders are installed on it (I keep lots of data on external media, but /home and all the rest is on the SSD).   Today I booted it and I got a message that the drive is full. I opened Disk Usage Analyzer to look at what takes up space. It insists that 67.8 GB of the disk are used, and that / is taking up 36.4 GB. Which leads to the question, where are the missing 30 GB, if not on the file system?!    Just to have a comparison, I added up all the sizes of all readable folders listed in Nautilus as subfolders of / (including the hidden ones). I got 20.9 GB. Trash was unreadable, but I know it has 16.2 GB, so the sum is 36.1 GB, around the same as what Disk Usage Analyzer is reporting. There were some system folders which were unreadable, like proc, but I doubt that they add up to 30 GB - else it wouldn't be possible to install Ubuntu on small disks, and I've seen it run on 2.5 GB. I think they must be the 0.3 GB difference between my calculation and the Disk Usage Analyzer's report.   So I'd like to know, what is eating up these 30 GB and how do I get it to free them?     Edit with answers to CYREX's questions   Booted from Ubuntu 10.10 64-bit live CD (same as my system).  fsck result:   root@ubuntu:~# fsck /dev/sda1 fsck from util-linux-ng 2.17.2 e2fsck 1.41.12 (17-May-2010) /dev/sda1: clean, 265956/4890624 files, 18073343/19537408 blocks  Booted from the SSD. Emptied the trash, and the 16 GB from there are now free. The 30 GB are still missing.    I'm not experienced enough to know what counts as weird in a log. Here are my messages log and my syslog since last boot. Maybe you can find something in them:       Here it got really strange. I plugged in an external 500 GB HDD. Disk Usage Analyzer overreported the available space, then showed space missing (76 GB used, but only 24 in folders).      Booted again from the LiveCD, started the Disk Usage Analyzer from it and got the same results as from the installed Ubuntu, within 1-2 GB.   Edit with answer to CodeMonk:  That would have been a nice solution, but the partition is really 80 GB - I mean 74 GB + marketing "error", anyway the whole disk is formatted. It also shows that over 50 GB are used, so where are the 30 GB if not in files and folders?    GParted also reports the correct size of the external HDD.


I was trying to install "SoundWire Server". It requires some additional packages, according to this   I am on Ubuntu GNOME 16.04.  I have tried to install libportaudio2, but I get an error relating to python-cryptography:  $ sudo apt-get install libportaudio2 Reading package lists... Done Building dependency tree        Reading state information... Done libportaudio2 is already the newest version (19+svn20140130-1build1). 0 upgraded, 0 newly installed, 0 to remove and 171 not upgraded. 1 not fully installed or removed. Need to get 0 B/198 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y  dpkg: error processing package python-cryptography (--configure):   package is in a very bad inconsistent state; you should reinstall it before attempting configuration Errors were encountered while processing: python-cryptography E: Sub-process /usr/bin/dpkg returned an error code (1)   to fix I have tried using  sudo apt-get install --reinstall python-lockfile   but that produced more errors:    I don't know what to do next. I want to install SoundWire because my audio jack isn't working.

I can't update my system because it freezes while installing a third-party update (zramswap-enabler)! Sometimes I get the following message in Update manager:  Could not initialize the package information An unresolvable problem occurred while initializing the package information. Please report this bug against the 'update-manager' package and include the following error message: E:The package zramswap-enabler needs to be reinstalled, but I can't find an archive for it.  I tried to remove the zramswap-enabler, but it's impossible because I get the following message: dpkg: error processing zramswap-enabler (--remove):  Package is in a very bad inconsistent state - you should  reinstall it before attempting a removal. Errors were encountered while processing:  zramswap-enabler E: Sub-process /usr/bin/dpkg returned an error code (1)  Actually I would really reinstall that package, but it is unable to do it! If I remove this third-party PPA then the system is warning me about a very very serious problem. So why can I not install/reinstall/remove/update this package and why freezes the updater if I try to update?


I'm creating a game and I would like to load levels in the game using a tile map.  this is the TileMap class code:          for(int row = 0; row < mapHeight; row++){             for(int col = 0; col < mapWidth; col++){                  if(tile[col][row] == "1"){                     handler.addObject(new Block(col * tileSize, row * tileSize, ID.Block, ss, 1, handler));                 }                  if(tile[col][row] == "&"){                     handler.addObject(new Player(col*tileSize, row*tileSize, ID.Player, handler, game, ss, 2));                 }             }         }   With this code I just get a blank screen. How do I fix this? Is there a better way? Thanks!

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


This is the Code I am looking at   In this project, there is a file named quitenet.py  In this file, there it is.  def chunks(l, n):     for i in xrange(0, len(l), n):         yield l[i:i+n]   I have no idea how I can understand the meaning l[i:i+n] .

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


i map.java class i try to send the filename by this   context.write(new Text(stringWord), new Text(fileName))  recude.java   import java.io.IOException;   import org.apache.hadoop.io.*;  import org.apache.hadoop.mapreduce.*;   public class Reduce extends Reducer<Text, Text, Text, Text> {  @Override public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {     int sum = 0;     MapWritable occurenceInFile = new MapWritable();     for (Text val : values) {         if(occurenceInFile.containsKey(val)) {             occurenceInFile.put(val, new IntWritable(1));         } else {             IntWritable occurence = (IntWritable) occurenceInFile.get(val);             occurenceInFile.put(val, new IntWritable(occurence.get() + 1));         }         sum += 1;     }     String result = key.toString() + " (";     boolean flag = false;     for (Writable filenameWritable : occurenceInFile.keySet()) {         if (flag) {             result += ", ";         }         String filename = ((Text) filenameWritable).toString();         result += filename + "=" + ((IntWritable) occurenceInFile.get(filenameWritable)).toString();         flag = true;     }     result += ")\nTotal occurence of \"" + key + "\": " + Integer.toString(sum);      context.write(key, new Text(result)); } }   error code this error code is show in stderr  Error: java.lang.NullPointerException at Reduce.reduce(Reduce.java:18) at Reduce.reduce(Reduce.java:6) at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:180) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:656) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:394) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:172) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:166)   i begin to write a wordcount program, but i still do not know how to fix this error.

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?


We know $$i^2=-1 $$then why does this happen? $$ i^2 = \sqrt{-1}\times\sqrt{-1} $$ $$ =\sqrt{-1\times-1} $$ $$ =\sqrt{1} $$ $$ = 1 $$  EDIT: I see this has been dealt with before but at least with  I'm not making the fundamental mistake of assuming an incorrect definition of $i^2$.


When I create text in illustrator and export it to SVG with the option Convert to Outlines, I get the following:    This is fine, except in the generated svg file there is inline CSS with the following:  <style>.cls-1{fill:#231f20;}</style>  If I change that to .cls-1{fill: none; stroke: #231f20;}, I then get the following:    This proves that the generated SVG is actually an outline around the letters, instead of the path through the letters. How can I get illustrator to generate the latter option?  Edit: Since no answers so far, here's more detail on what I'm trying to do. If I convert text to outlines, I get the following:    What I'm not clear is on the next step. Suppose I want to create "inner" paths that are lines and curves halfway between the inner and outer lines. Here's an example for the letter A:    In this case, 3 line paths are needed for the letter A.  Is there a way to generate these inner paths using a command or set of commands in illustrator?

I'm curious to know if anyone knows of any effective techniques for finding the center line of a curved object.  In the screenshot below you'll see a crude version of what I mean.     Is there any way to get that line to perfectly trace the center, or is it easiest to just eyeball it?  Photoshop or Illustrator techniques are acceptable.


I have to calculate amount of light from IR emmiter. The only equipement, that I can use is Sekonic Light Meter like this one:   The problem is that i need to have the light level in lux or lm, and the metter gives me the values in EV. Could anybody tell me how could I recalculate those results: 11,6EV 11,4EV 11,1EV 10,4EV 9,3EV

Instead of looking up , how can I calculate Lux from EV?


Probably a basic one, do you know how to apply once single material but on different objects?  1 material but multiple objects.  Thank you, Waqas

Is it possible to add a texture or material to more than one object at a time?


Is it possible to install office 2007 0r 2010  on Ubuntu 14.04, I need to use it with Ubuntu as completely installed, don't want it as live or on-line or on-line app etc.

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


I formatted this two partitions of my microSD card and now I want to merge them.. How to do that?

I have two partitions, one of them has a file system and the other is unallocated.  How to merge two partitions?


Possible Duplicate: Why should we ask the password twice during registration? When designing a new and simplified signup page I got into an argument with a colleague about the necessity of the "repeat password" field. We designed the signup process in such a way that the ...

It would be easier to ask for a user's password only once during registration.  The problem: The user could make a mistake while typing the password once because of hiding letters.  The solution: The user could have a toggle button for showing or hiding the password.    Working example with . This approach could be used on the registration or login page.   Are there any benefits to asking a user's password twice during registration vs just not masking the password? Why would you ask twice?  P.S. :        Users make more errors when they can't see what they're typing while filling in a form. They therefore feel less confident. This double degradation of the user experience means that people are more likely to give up and never log in to your site at all, leading to lost business. (Or, in the case of intranets, increased support calls.)   The more uncertain users feel about typing passwords, the more likely they are to (a) employ overly simple passwords and/or (b) copy-paste passwords from a file on their computer. Both behaviors lead to a true loss of security.      Update: I created a . So you may use it if you want to.    Update 2: .  Update 3: Internet Explorer 10 added a toggle password visibility icon. It looks like this:    Update 4: Article about .  Update 5: Example with .


I have installed ubuntu 14.04 and windows 7 with dual boot.Now the problem is my ubuntu was crash so i delete the ubuntu partition in windows diskmanagement but the default boot priority is ubuntu now i can not open my windows operating system. Is there any way to change the boot priority? if so how to do that?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


My current problem is the following: Win 7 worked fine with 2 monitors. Win 8 will not. (I just installed Win 8 this weekend.)  I searched these places, and I found the path to obfuscation.   Google, Yahoo, Bing, YouTube Code Project Stack Overflow Super User MSDN   I seriously doubt that I'm the first guy who is facing this obstruction.  Is this the place to ask questions about where to ask questions?  Does StackExchange have a place for such questions?  In the meantime, where do I find out how to get Win 8 to recognize my second monitor?

If I have a specific question I want to ask about, but I don't know which Stack Exchange site would be on topic for asking that question, where can I ask where to ask that question?  Is there any generic place where we can ask for advice? Is it here?  This is not about a specific question but in general.  For example: "Where should I ask for advice about fishing?", or if I need to know where I should ask "What would be the best fishing rod to fish for salmon?" (regardless of how good/bad these examples are)


I would like to create a surrounding rectangle with maxiumum width/height ratio ("oblique bounding box") from a set of input features as shown in the image below:    E.g. the PostGIS functions ST_Envelope and ST_Box2D as well as FME Transformers BoundingBoxReplacer and BoundingBoxAccumulator generate axis parallel bounding boxes.  Any suggestions using approaches with PostGIS, QGIS or FME greatly welcome!

I would like to know an algorithm to calculate the minimum perimeter oriented bounding box of a point set or polygon. I know that if I use the rotating calipers, I am able to get the minimum area oriented bounding box. However, I would like the bounding box considering the perimeter, or the width.  An example of this is given in ArcGIS.


Let a,b,c,d be four positive real numbers. Show that  $$\sum_{cyc} ab \leq \frac{1}{4}\left(\sum_{cyc} a \right)^2$$ and  $$\sum_{cyc} abc \leq \frac{1}{16}\left(\sum_{cyc} a \right)^3$$ My textbook said these inequalities can be referred from the AM-GM inequality but didn't say how to derive it. I can find only looser bounds. That is, for each term in the left hand side of the first inequality, by AM-GM inequality, $$ab \leq \left(\frac{a+b}{2}\right)^2 \leq \frac{1}{4} \left(a+b+c+d\right)^2$$ $$\Longrightarrow \sum_{cyc} ab \leq \frac{4}{4} \left(\sum_{cyc} a \right)^2$$ Using the same techniques, we get another loose bound for $\sum_{cyc} abc$. How could I get the bounds in the original inequalities? Please suggest.  PS. It seems like if these inequalities are true, we may get a general relationship for n positive variables as $\sum_{cyc} a_1 ... a_k \leq \frac{1}{n^{k-1}}\left(\sum_{cyc} a_i \right)^k$.  PS2. Sorry for double posting. There was an old thread here:  One answer points to Maclaurin's inequality, but I still cannot figure out how to prove it using AM-GM.

$a,b,c,d>0$ with $a+b+c+d=4$ then $\sum\limits_{cyc}ab\le\frac14\left(\sum\limits_{cyc}a\right)^2$   How can I apply AM-GM here, is there a generalization, say we have $n$ variables summing up to $n$ then,  $\sum\limits_{cyc}a_1\cdot a_2\dots a_k\le\frac1{n^{k-1}}\left(\sum\limits_{cyc}a\right)^k$  because the following inequality should be also true  $\sum\limits_{cyc}abc\le\frac1{16}\left(\sum\limits_{cyc}a\right)^3$


Let $C \subset \mathbb{R}^{m}$ be a convex set. Prove that $\bar{C}$ is also convex   My attempt  Let $x,y \in \bar{C}$, this implies two things:  $x=\lim_{n\rightarrow ∞} x_{n}$ where $(x_{n})_{n \in \mathbb{N}}$ in $C$ and thus $x_{n} \in \bar{C}$  $y=\lim_{n\rightarrow ∞} x_{n}$ where $(y_{n})_{n \in \mathbb{N}}$ in $C$ and thus $y_{n} \in \bar{C}$  We have to prove that for all $t \in [0,1]$, $tx_{n}+(1-t)y_{n} \in C$, and this is $\lim_{n\rightarrow ∞} z_{n}=z$ where $z_{n}=tx_{n}+(1-t)y_{n}$ and $z=tx+(1-t)y$  Let's take $\lim_{n\rightarrow ∞} x_{n}=x$ and $\epsilon=\frac{\epsilon}{2t}$, then we have (by definition of limit), $\exists N_{1}\in \mathbb{N}$ such that $||x_{n}-x||<\frac{\epsilon}{2t}$ for every $n \geq N_{1}$  Then, let's take $\lim_{n\rightarrow ∞} y_{n}=y$ and $\epsilon=\frac{\epsilon}{2(1-t)}$, then we have (by definition of limit), $\exists N_{2}\in \mathbb{N}$ such that $||y_{n}-y||<\frac{\epsilon}{2(1-t)}$ for every $n \geq N_{2}$  Taking $N=max(N_{1},N_{2})$ we have:  $||tx_{n}+(1-t)y_{n}-(tx+(1-t)y)|| \leq ||t(x_{n}-x)+(1-t)(y_{n}-y)|| \leq t||x_{n}-x||+(1-t)||y_{n}-y|| < t\frac{\epsilon}{2t} + (1-t)\frac{\epsilon}{2(1-t)}=\epsilon $. And that is what we wanted.  P.S. I don't know if the epsilon thing is totally right because $t$ may be $0$ o $1$ and in that case epsilon doesn't exit.

Today I was going through my text book exercise and got hold of the following question.     Let $X$ be a normed linear space with norm $\lVert\cdot\rVert$ and $A$ is a non empty convex subset of $X$ then prove that $\operatorname{Closure}(A)$ is also a convex subset of $X$.   I gave it a try but could not succeed.


When I drive around in a car with friends or sit at a Pokestop with lures, Pokemon don't always appear for me. All my friends seem to get Pokemon popping up, they end up having to tell me so I can restart the app and get them to show as well.   Also when we drive around, my character sometimes runes off from the path were going, while theirs run perfectly straight. so I pretty much cannot play the game other than sitting at Pokestops and restarting the app every 3 minutes.  Why is this? It is extremely annoying and is only happening to me. Any idea why? I have a iPhone 5s.

I see pictures online of everyone having all these Pokémon to catch being everywhere around them, but it seems like I can only ever see one or two. I live in a rural area, but even walking miles through the farmland, it's rare to find any Pokémon.  Why is this? How can I find more Pokémon?


My first thought was to take the CDF of X, which we know is $1-e^{-x}$ for values of $x > 0$ and $0$ for values of $x$ less than$ 0$, and then solve the $\log(x)$ for those values, however I am not sure that this is correct. Any thoughts?   I also attempted to graph $\log(1-e^{-x})$ and of course this gave me a straight line. Not sure where to go from here. Any help would be appreciated. Thanks!

I have an answer but I'm not sure if I'm doing it right: $f(x)$ is the pdf $f(x)=2e^{-2x}$, then, if the random variable $Y=\ln(X)$, then we simply substitute:  $P(Y \leq y)$=  $P(2e^{-2X} \leq y)$  $P(-4X \leq y)$ since $y=ln(x)$  $P(X \leq - \dfrac {1} {4} y)$  This is the distribution function, right?  Thanks!


i have this code and it seems its vulnerable to sql injection. How can i secure this?   mysql_query $query = mysql_query("SELECT * FROM users WHERE username='$username'") or die (mysql_error());   $username = $_POST['username'];

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


in Windows I'm using Komodo & Notepad++ for coding HTML, CSS etc. In Ubuntu, what's the best editor I can use? Thanks :)

I've used Windows for many years, using Dreamweaver as my editor as it had a file tree which is based on a project (via Local, FTP or SFTP).  I need a web development IDE with the following functionality:   syntax highlighting for PHP, HTML, CSS, JavaScript  file tree - Local, FTP, SFTP, Project-Based (e.g. via the methods of Local/FTP/SFTP) in other words, like Dreamweaver can open multiple files (tabbed)   Additionally, I wouldn't mind features like debugging, class listings, etc, as long as I can hide them away.


I have searched the internet, read every dictionary and scanned website after website, and cannot find a word that describes a word for which there are presently, in your language, no words. Does such a word exist.    Is there a word or term that means a word that doesn't exist in a language?

What's the word for "no word for"?  I've really been trying to find it, but I just can't seem to.


I have a simple piece of code to validate a username and a password.       public boolean isValid(String u, String p) {     if (u=="admin" && p=="password1") {         return true;     } else if (u=="user" && p=="password2") {         return true;     } else {         return false;     }  }   I've tried debugging it, and when it runs, u has the value "admin" and p has the value "password1", but it just skips the first condition. I must have done something wrong, but I can't figure out what.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Given that futures price is equal to S*e^(rt), it is possible to create a synthetic investment into an index by:  entering into an index future for the amount of money which are planned to be invested into an index investing this money into a risk-free bond with the same duration as the future (or just keep it in a deposit in a bank)  When such future expires, a new future can be entered into. I see the following advantages of such strategy compared to buying an ETF:  No need to pay an ETF's issuer's commission. This might not be a big deal for investors from the US, because there are funds with a low commission, but in my country (Russia) index ETFs take 0.6-1% as a commission ETFs' price follows the index only approximately, which is not true for futures More liquidity. Suppose you want to cash out part of your investment. In this case, you can just take the money you have on your deposit instantly and cancel out part of future position by shorting instantly. In case of ETF/stocks, you would first sell them, then wait for the settlement, then wait for the funds to be transferred to your account Ability to take more risk if you'd like to. For instance, instead of buying the government's bonds, it is possible to invest into A+ bonds and earn higher interest Margining for a risk-free rate. If you'd like to make do some trading parallel to investing, you can use the money not for risk-free bonds, but for buying stocks, which is much cheaper than what brokers charge  The only disadvantage I see is that you will have to regularly re-enter future contracts, but it doesn't seem as a big disadvantage to me. Yet, future investing doesn't seem to be popular. Why? Are there any flows in my logic?

Let's say I'm going to buy in the market to hold.  What are the pros and cons of buying MES futures instead of SPY ETFs for exposure to S&P500?  From a high level I know that MES is $5 per point and that SPY is (roughly) $0.10 per point but we can equalize that by equating 50 shares of SPY against one MES contract.  Holding MES would miss out on dividends and there'd be transaction fees of rolling out of each expiring contract into the next.  Assuming one portfolio consists of 1 MES contract which is rolled over into the next expiry when applicable and another holds 50 SPY contracts, which will end up higher at the end of a few years?


i'm performing a binary classification task , and after cheking the target variable , i saw that i had 69% of 0's and 31% of 1's , so , my question is , do i have in this case a unbalanced target variable ?  and can somebody tell me , if there is a threshold , or when to consider a Target Variable unbalanced ?  Thanks to everyone

I'm facing a situation where the numbers of positive and negative examples in a dataset are imbalanced.  My question is, are there any rules of thumb that tell us when we should subsample the large category in order to force some kind of balancing in the dataset.  Examples:   If the number of positive examples is 1,000 and the number of negative examples is 10,000, should I go for training my classifier on the full dataset or I should subsample the negative examples? The same question for 1,000 positive example and 100,000 negative. The same question for 10,000 positive and 1,000 negative. etc...


Since the Players's handbook only mentions that when you mount, the mount's initiative overlaps with yours, I'm wondering if can you move your mount (for example) 30 feet, attack and then move the remaining 30 feet?

I seem to have misunderstood the mounted combat rules. Reading them again it seems that the mount and rider are treated as separate entities but share initiative (this assumes a controlled mount, not an independent one).  So the question is: Can a mounted character move using the mount's movement, then the mounted character attacks, then the mount uses a dash action to move away?   (Note: I previously assumed that the mounted character would have to use his action to use the dash or dodge feature if the mount.)


I used to have ubuntu 16.04 lts . Now I have 18.04 lts . In 16.04 when I disabled wifi  , that option was preserved after shutdown and boot . Now in 18.04 lts if I disable wifi the option is not preserved . Hence the problem is not due to my G505s lenovo laptop . I know that airplane mode disables more than just wifi and I prefer that mode for personal reasons . I have searched in the internet and have not find anything helpful .  I would like to know how to preserve airplane mode in 18.04 lts .

I have an HP Spectre x360 convertible laptop and I'm running Ubuntu 18.04. Every time I turn the screen sideways or in tablet mode and back, 'Airplane Mode' is activated. In fact, when I boot up and login, I have to manually turn off 'Airplane Mode' and turn wifi back on. I don't want to disable the gnome rfkill plugin like so: 'gsettings set org.gnome.settings-daemon.plugins.rfkill active false' because then I can no longer use bluetooth. Also, for some godforsaken reason, even when I DO disable the plugin, the gnome shell turns on 'Airplane Mode' anyway, which means that I have to go turn wifi back on EVERY time I log in. This is so annoying, I really liked where 18.04 was going but this is seriously breaking the whole gnome shell experience.