While running shell scripts how we can redirect the output of shell scripts into two different files. i.e.STDOUT and STDERR files. If there is some error logs should go to STDERR file and if script successfully runs then logs should be generated under STDOUT file

I want to see the output of a command in the terminal as if there was no redirection.  Also, stderr needs to be redirected to err.log and stdout needs to be redirected to stdout.log.  It would be nice to also have the exact copy of what is shown in terminal, i.e. errors printed as and when it occurs, in a separate file: stdouterr.log.


I need to make a simple code, which get a string, and an array of String, and  replace the ? signs with each element of array.  Here is the test case in junit:  @Test     public void QueryFitterTest() {          ArrayList<String> args=new ArrayList<String>();           args.add("Bad code");         args.add("The code is buggy");          String res = QueryMaker.queryFitter("insert into  vulnerability (name,descirption) values(?,?)",args);         String correctQuery="insert into  vulnerability (name,descirption) values(Bad code,The code is buggy)";         assertEquals(correctQuery, res);      }   and here is the  code:  public static String queryFitter(String query, ArrayList<String> args){      String[] colapsedQuery = query.split("");     int parmNum=0;     for(int i=0;i<colapsedQuery.length;i++){         if(colapsedQuery[i]=="?"){             colapsedQuery[i]=args.get(parmNum);             parmNum++;         }      }      query=concatenator(colapsedQuery);     return query;  } public static String concatenator(String[] colapsedQuery){     String delimiter = "";     String result = String.join(delimiter, colapsedQuery);     System.out.println("query is: "+result);     return result; }   The code is working fine but  I don't like my approach, is there an easier way to do it?

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?


As the question says, I have two lists that look like this:   list1 = ["key1", "key2"] list2 = ["value1", "value2"]   I would like to create a dictionary like this:   dict1 = {"key1": "value1" , "key2" : "value2"}   Is there are an easy way to do so?

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


I want to fill my mesh. It is empty but I want it like the other mesh.  Pic:

trying to recreate this Elijah bottle. I have two sides, one of which is outlined in red. How do I fill that face with polygons so I can then grab the center (that red square dot) to pull it outward thereby creating the slight outward bowing of the bottle?


How can I check if the file exists in my FTP server? I am getting an catch exception because sometimes the file does not exists.   DateTime now = DateTime.Now;             string repotroday = "report_" + now.Year.ToString() + "_" + now.Month.ToString() + "_" + now.Day.ToString() + ".csv";              WebClient client = new WebClient();             string url = "ftp://vps.myserver.com/" + repotroday;             client.Credentials = new NetworkCredential("SURE", "iRent@123");             string contents = client.DownloadString(url);   However, when I do not have the report in the FTP, it returns: The remote server returned an error: (550) File unavailable (e.g., file not found, no access)  Is there a way to check if the file exists before trying to download it?  Thanks

I need to use FtpWebRequest to put a file in a FTP directory. Before the upload, I would first like to know if this file exists.   What method or property should I use to check if this file exists?


Let $R$ a commutative ring and $I$, $J$ ideals of $R$ such that $I + J = R$. Prove that $IJ = I \cap J $  Is clear that $IJ \subseteq I$ and $IJ \subseteq J$ then $IJ \subseteq I \cap J$  this  for any two ideals of a ring. But i not  know as proof the other contains, because it is necessary that $I + J = R$?

So I basically have to prove what is on the title.      Given $R$ a commutative rng (a ring that might not contain a $1$), with the property that $I+J=R$, (where $I$ and $J$ are ideals) we have to prove that $IJ=I\cap J$.   One inclusion is easy. If $x\in IJ$, then $x=\sum a_ib_i$ where $a_i\in I$ and $b_i\in J$. Thus for any fixed $i$, we have that since $a_i\in I$, we have that $a_ib_i\in I$, and the same argument shows that $a_ib_i\in J$, thus $\sum a_ib_i\in I$ and $\sum a_ib_i\in J$, this means that $x=\sum a_ib_i\in I\cap J$, and thus $IJ\subset I\cap J$.   I am having troubles proving the other inclusion. Any comments?  Thanks


I want to have a large checkbox with a width of 16px and a height of 16px. I don't want to have to use a JavaScript plugin. Can this be done with modern CSS?

Is it possible to set the size of a checkbox using CSS or HTML across browsers?   width and size work in IE6+, but not with Firefox, where the checkbox stays 16x16 even if I set a smaller size.


I am looking for a lightweight image editor for linux (not gimp). I need only one simple feature, namely to draw straight lines (with adjustable thickness) over an image. It should be possible to move, resize and rotate the lines after drawing them.

I want something similar to "preview" in macs.  For example: I want an image editor that ONLY does simple adjustments like increase/decrease contrast, saturation, exposure, color tinting.... rotate, flip vertically, flip horizontally, make black and white, change size or format, crop.  THATS IT.  I know gimp can do all those things but its a bit overkill.  I just want to right click an image, open it with this magical program i just described, do a few quick adjustments, and then save and exit.  Nothing really fancy.  Anyone know of anything like this?  Btw I am using ubuntu 12.04 :) It rocks and I am glad I switched from mac, i just need to replace this one piece of software.


Let's say that I have function foo that returns a single output. I do not make use of that output in the caller of the function foo.  What is the most elegant way to handle this?  r = foo() # r is not used anywhere later.   Or should I just not do any assignment when calling foo()? The only thing is that I probably get lint warning if I do this.  foo() ....

Say I have a Python function that returns multiple values in a tuple:  def func():     return 1, 2   Is there a nice way to ignore one of the results rather than just assigning to a temporary variable? Say if I was only interested in the first value, is there a better way than this:  x, temp = func()


(Actually I want it to be always-on-bottom, but "on-top" is a more common search term).  I know that I can use  wmctrl -r "Mozilla Firefox" -b toggle,below   to set the browser window to be always-below, but how can I set it automatically every time I open the browser?

Ubuntu 18.04 with Cinnamon desktop.   VLC option View / Always on top doesn't work. Right click on window title + Always on Top does work, but only for the current video   The first item is likely due to a bug in either VLC or GTK.   I'd like to configure VLC to always be on top when playing, without having to click on the frame title each time I open a video. Any answer to work around the bug in item 1, or to automate the workaround in item 2 is welcome.


Sometimes rejecting a suggested edit is not obvious and having reason will help both the people who need to cast the second vote and the people viewing the suggested edit history later, as well as the person suggesting the edit. Better help him/her learn than just rejecting without saying why.  So, having the ability to add some short optional comment while rejecting will be great idea in my opinion.

Can we have an option to enter reasons when we reject edits by other users who don't have privileges?  Reason:  I was checking  for a question about .NET obfuscators, and the user edited an answer to include a tool. Even though this looked very genuine I decided to check the user's profile and he had 0 questions, 0 votes and 5 answers. All 5 answers had the link to this tool. It looked like a spam to me.  After much thought I rejected the edit. I feel it will be better to have an option to enter  reason for rejecting an edit. The answer looked very genuine and I didn't want other users to approve it. Edits get approved/rejected within seconds and I had vey little time to take an action.


For my course in Fourier analysis I need an example of a continuous unbounded function that is absolutely integrable. I can't seem to think of one and so need some help with this.  I also need an continuous bounded function that isn't absolutely integrable and I was thinking $f(x)=\begin{cases} \frac{\sin(x)}{x}, \text{if } x\neq 0 \\ 1, \text{ if  } x=0\end{cases}$. Is this correct?

Many tricky exercises concern the quest for functions that satisfy particular conditions. For example, let us consider the spaces $C_p( \mathbb R), 1 \leq p < \infty$, of continuous functions on $\mathbb R$ such that $\int_{\mathbb R} \lvert f(x) \rvert^p \mbox{d}x < \infty$. I found the following exercises rather demanding:   Find a function $f\in C_1(\mathbb R)$ such that $f$ is unbounded; Find a function $f \in C_1(\mathbb R) \backslash C_2(\mathbb R)$.   so one can deduce that $C_p \not\subset C_q$ if $p < q$.  I'm quite sure that a function defined to be zero everywhere except for triangular peaks of height $k$ and base $1/k^3$ centered on positive integers $k$ is a solution for both the exercises. (it's a simple matter to give to this function an explicit form, but I think it would be rather unclear.)   Is it correct?  Can anyone give other examples? (for the one or the other exercise, not necessary a solution of both of them!)


I installed Ubuntu from Microsoft Store, but I can't locate files. I try to open folder jakub@DESKTOP-UD9H17S:~$ gnome-open gnome-open: command not found jakub@DESKTOP-UD9H17S:~$ xorg-open nowy_folder/ xorg-open: command not found  but it is impossible When I try pwd I see jakub@DESKTOP-UD9H17S:~$ pwd /home/jakub  What I should do? I can't find in my system (Win10) this home/jakub

It's pretty clear that Windows' 10 "host" filesystem is mounted at /mnt/c/ from "Linux" perspective of view. But is it possible to get an access to "Linux" filesystem from Windows? If so, where it is?


I got a request to put one web application written in PHP+MySql that runs normally on Linux machine (which is set up as web server) to Windows VPS.  I did some research and found out I could install WAMP and host the application via that practically the same way as I had it on my Linux machine, but since I don't have experience with this I'm asking you guys if this is a "valid option" or it's not suggested at all?

This is a  about  the use of a *AMPP's stack.    I recently had a talk with some experienced people and they suggested to me not to use a WAMP stack, and instead install apache, mysql and php separately.  I don't understand why they have suggested this, though, so can anyone tell me?  Is there a particular disadvantage of WAMP, or a particular advantage to installing all of them separately?  Since a WAMP stack itself is composed of apache, mysql and php, then what's the difference between using the WAMP stack and installing them all separately?


I'm just newbie in PHP. I started learning yesterday.  I have 1 problem to show my data from DB to my test PHP project.  I have data like :  | Class Room | Teacher | Pict | | A1         | ABU     | 1.jpg| | A1         | ABU     | 2.jpg|   before I ask, I did "select * from X group by teacher' and I get data like :  | Class Room | Teacher | Pict | | A1         | ABU     | 1.jpg|   I want this data show on my site like :  | Class Room | Teacher | Pict           | | A1         | ABU     | 1.jpg :: 2.jpg |   so, in this case I got stuck and I just need help to learn.

Using MySQL, I can do something like:  SELECT hobbies FROM peoples_hobbies WHERE person_id = 5;   My Output:  shopping fishing coding   but instead I just want 1 row, 1 col:  Expected Output:  shopping, fishing, coding   The reason is that I'm selecting multiple values from multiple tables, and after all the joins I've got a lot more rows than I'd like.  I've looked for a function on  and it doesn't look like the CONCAT or CONCAT_WS functions accept result sets.  So does anyone here know how to do this?


How to find all integer $x$ such that $x^{2}+5145x+2332\equiv 0\pmod{ 9797}$. I think $9797$ can factor, then $9797=97\cdot11$. So I can convert to $$x^{2}+5145x+2332\equiv 0\pmod{97}$$ $$x^{2}+5145x+2332\equiv 0\pmod{11}$$ How do to next? Thanks.

Solve $x^2+5x+6 \equiv 187 \mod 187$ Solution $$x^2+5x+6 \equiv 187 \mod 187$$ $$ (x+\frac{5}{2})^2 \equiv \frac{1}{4}$$ $$ 4(x+\frac{5}{2})^2 \equiv 1$$ $$ y:= x+\frac{5}{2} $$ $$ 4y^2 \equiv 1 \mod 11 \wedge 4y^2 \equiv 1 \mod 17  $$ $$ ( 2y \equiv 1 \mod 11 \vee 2y \equiv 10 \mod 11 ) \wedge ( 2y \equiv 1 \mod 17  \vee 2y \equiv 13 \mod 17)  $$ $$ ( y \equiv 6 \mod 11 \vee y \equiv 5 \mod 11 ) \wedge ( y \equiv 9 \mod 17  \vee y \equiv 15 \mod 17)  $$ Combining that from CRT I got: $$ y \in \left\{49, 60,83,94 \right\} $$ and for example: $$ x+\frac{5}{2}  \equiv 94 \mod 187$$ $$ 2x  \equiv 183 \mod 187$$ some calculus and get... $$x \equiv 185 $$ And the same thing for each other case. Question Is there any faster (or smarter) way to solve equations like that?


Is there a practical difference between using Ubuntu Desktop and Ubuntu Server?   I am making a VM of Ubuntu Server 14.04 LTS with LXDE desktop, and it's very fast with small size on disk, even after full upgrade. It is a great learning tool, as I am building it from the ground up.  Thank you.

What's the difference between the server version of Ubuntu and the desktop version?


I guess it has something to do with Riemann sums but this is new for me.  $\displaystyle\lim \limits_{n \to \infty}\sum \limits_{k=n}^{2n}\frac{k}{k^2+n^2}$  How do I start?

How to find the value of $\lim_{n\to\infty}S(n)$, where $S(n)$ is given by $$S(n)=\displaystyle\sum_{k=1}^{n} \dfrac{k}{n^2+k^2}$$   is unable to calculate it.  This is a question from a questions booklet, and the options for the answer are--  $\begin{align} &A) \dfrac{\pi}{2} \\ &B) \log 2 \\ &C) \dfrac{\pi}{4} \\ &D) \dfrac{1}{2} \log 2 \end{align}$


I'm building a Tic Tac Toe game as practice for an intro-to-Python course I'm taking on Udemy.  I have a series of functions built right now but I can't get two of them to work together.  When I run these two functions I get an error saying the first_player is undefined.  However, first_player is defined in the first function.  Does anyone know why Python won't recognize what first_player is in the second function? If these functions work correctly I'd expect it to as the first player if he/she wants to be X's or O's and then have Python assign X's or O's to player 1 and player 1. In the choose_first player() I've tried printing out the first_player variable and it prints correctly. The code I'm using is below: #Randomly chooses which player goes first. def choose_first_player():     import random     first_player = (str(random.randint(1,2)))      if first_player == '1':         print("\nPlayer " +first_player+ " goes first.")     if first_player == '2':         print("\nPlayer " +first_player+ " goes first.")  choose_first_player()  #Asks first_player if they want to be X's or O's. def player_input():      marker = ''      while marker != 'X' and marker != 'O':         marker = input("\nPlayer" +first_player+ " , do you want to be X's or O's?  Please enter X or O: ").upper()      player1 = marker      if player1 == 'X':         player2 = 'O'     else:         player2 = 'X'         player1 = 'O'      print("\nPlayer 1 is: " + player1)     print("Player 2 is: " + player2)     return(player1,player2)  player_input()

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


The ios-app (v. 0.1.54) showed on top of my feed a section called "2 unanswered". But the second question is already answered (with an accepted answer which has 3 upvotes as of this writing).    See here:

I do not know whether it's a bug or a feature.  In the feed under unanswered header there are questions with answers. I can even see how many answers each question got.    I've checked again and the very first question listed under unanswered tag has an upvoted and accepted answer.  So by  this question is clearly answered. App itself shows green bubble for this question, so apparently it can detect that this question has been answered.


This is my HTML

We Work With:

test

test

test

test

   I should show shops which work with us. My boss told me to change that they don't work "hard-code", they want me to use ajax! ass I understand somehow I need to add elements by js, in future I will show them from a database but now they want me to make something like a simple template. Guys help, please!

I'm refactoring some old JavaScript code and there's a lot of DOM manipulation going on.  var d = document; var odv = d.createElement("div"); odv.style.display = "none"; this.OuterDiv = odv;  var t = d.createElement("table"); t.cellSpacing = 0; t.className = "text"; odv.appendChild(t);   I would like to know if there is a better way to do this using jQuery. I've been experimenting with:  var odv = $.create("div"); $.append(odv); // And many more   But I'm not sure if this is any better.


I am delighted that the the whole of physics derives from a single simple principle. Since the time of Lagrange, the principle of least action has not only become the founding principle of classical mechanics (supplanting Newton’s laws), but it readily became the basis of electricity and magnetism (in the 19th century) and quantum physics (in the 20th century).  It is wonderful that everything in the universe follows laws which come from a single principle. All I ask is that such a principle is one which I can understand – or, at least, one for which I might develop some feeling. But it's hard to get a good physical intuition for action. In particular, why should it be the kinetic energy minus the potential energy, instead of plus?  What is the physical interpretation of action?

Possible Duplicate:          The Lagrangian formulation of Classical Mechanics seem to suggest strongly that "action" is more than a mathematical trick. I suspect strongly that it is closely related to some kind of "laziness principle" in nature - Fermat's principle of "least time", for example, seems a dangerously close concept - but I cannot figure out these two principles are just analogous, or if there's something deeper going on. Am I missing something obvious? Why is action  $$A = \int (T-V) \, dt$$  and what interpretation does the $T-V$ term in it have?


Main idea of class is implement Integer subarray. For example, I would like to put numbers between 10 and 20 in array. If number is in array, there will be true inits place in array. Number 10 has index 0 in array, etc.  I get problem with my second constructor:  public FixedRangeIntegerSet(int lowerBound, int upperBound, Iterable<Integer> elements) {     int sizeCopy = upperBound - lowerBound + 1;     for (Integer element : elements) {         if (element >= lowerBound && element <= upperBound)             add(element);     } }   Here is rest of my code:  public class FixedRangeIntegerSet implements Iterable<Integer> {      private boolean[] elementFlags;     private int size;     private int lowerBound;     private int upperBound;      public FixedRangeIntegerSet(int lowerBound, int upperBound) {         this.lowerBound = lowerBound;         this.upperBound = upperBound;         int size = upperBound - lowerBound + 1;         elementFlags = new boolean[size];         this.size = size;     }      public FixedRangeIntegerSet(int lowerBound, int upperBound, Iterable<Integer> elements) {         int sizeCopy = upperBound - lowerBound + 1;         for (Integer element : elements) {             if (element >= lowerBound && element <= upperBound)                 add(element);         }     }      public FixedRangeIntegerSet(int lowerBound, int upperBound, Integer... elements) {         for (int i = 0; i < elements.length; i++) {             add(elements[i]);         }     }      public boolean add(Integer element) {         if (elementFlags[element - lowerBound] == true) {             return false;         }         elementFlags[element - lowerBound] = true;         return true;     }      public boolean containsElement(Integer element) {         if (element < lowerBound || element > upperBound) {             return false;         }         if (elementFlags[element - lowerBound] == true) {             return true;         } else             return false;     }      public int getSize() {         int size = 0;         for (Boolean i : elementFlags) {             if (i == true) {                 size++;             }         }         return size;     }      public int getLowerBound() {         return lowerBound;     }      public int getUpperBound() {         return upperBound;     }      public boolean remove(Integer element) {         if (elementFlags[element - lowerBound] == false) {             return false;         } else {             elementFlags[element - lowerBound] = false;             return true;         }     }      @Override     public Iterator<Integer> iterator() {         return new RangeIter();     }      private class RangeIter implements Iterator<Integer> {          private int currentIndex;          public RangeIter() {             this.currentIndex = 0;         }          @Override         public boolean hasNext() {             for (int i = currentIndex; i < elementFlags.length; i++) {                 if (elementFlags[i] == true)                     return true;             }             return false;         }          @Override         public Integer next() {              if (!hasNext()) {                 throw new NoSuchElementException("No elements");             }             while (currentIndex < size - 1 && !elementFlags[currentIndex]) {                 currentIndex++;             }             return currentIndex++ + lowerBound;         }     } }   This is pseudocode for main (test) method:   FixedRangeIntegerSet s1 = new FixedRangeIntegerSet(10, 20);             s1.add(14);             s1.add(16);             s1.add(18);             System.out.println("Elements:");     foreach loop; FixedRangeIntegerSet s2 = new FixedRangeIntegerSet(10, 20, s1);         s2.remove(16); // here is where I get error   After all, my question is: Why I get null pointer exception, or where I am wrong in writing second constructor in my code? Thanks!

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?


Brain storm: Suppose we have a perfect lever, which has 0 quality, and perfect rigidity. It is long enough that can reach Proxima Centauri from the earth. Someone push one side of lever from Proxima Centauri, immediately, the person from the earth will get the force. That means the force speed is infinity. With this way, information can be transferred via the lever immediately. In real world, what the force speed will be for quality>0, and not perfect rigidity? Roughly, speed will be bigger for smaller quality lever, and speed will be bigger for high rigidity thing. My question, is there any research on this area?

Is it possible for information (like 1 and 0s) to be transmitted faster than light?   For instance, take a rigid pole of several AU in length. Now say you have a person on each end, and one of them starts pulling and pushing on his/her end.   The person on the opposite end should receive the pushes and pulls instantaneously as no particle is making the full journey.  Would this actually work?


Can someone explain to me how symbolic style permissions work in Linux? And help me set the permissions of r--r-x-wx in symbolic style on a file? Thanks

I've never really got how chmod worked up until today. I followed a tutorial that explained a big deal to me.   For example, I've read that you've got three different permission groups:   owner (u) group (g) everyone (o)   Based on these three groups, I now know that:   If the file is owned by the user, the user permissions determine the access. If the group of the file is the same as the user's group, the group permission determine the access. If the user is not the file owner, and is not in the group, then the other permission is used.   I've also learned that you've got the following permissions:   read (r) write (w) execute (x)   I created a directory to test my newly acquired knowledge:  mkdir test   Then I did some tests:  chmod u+rwx test/ # drwx------ chmod g+rx test/ # drwxr-x--- chmod u-x test/ # drw-r-x---   After fooling around for some time I think I finally got the hang of chmod and the way you set permission using this command.    But...  I still have a few questions:   What does the d at the start stand for? What's the name and use of the containing slot and what other values can it hold? How can I set and unset it? What is the value for this d? (As you only have 7=4+2+1 7=4+2+1 7=4+2+1) Why do people sometimes use 0777 instead of 777 to set their permissions?   But as I shouldn't be asking multiple questions, I'll try to ask it in one question.  In UNIX based system such as all Linux distributions, concerning the permissions, what does the first part (d) stand for and what's the use for this part of the permissions?


When I ask for the length in the test I get an error with the casting of the integer, I tried with other classes like Character instead of Integer but I get the same error, java does not let me write Object or Comparable as parametrized classes. That's a JUnit Test Case public class EDBinaryHeapTest {     @Test     public void constructorTest01() {         EDBinaryHeap<Integer> toCheck = new EDBinaryHeap<Integer>(0);                  assertEquals(0, toCheck.numElementos);         assertEquals(0, toCheck.elementos.length);      } }  That's the class I`m creating to check  public class EDBinaryHeap<T extends Comparable<T>> implements EDPriorityQueue<T>{     protected T[] elementos;     protected int numElementos;      @SuppressWarnings("unchecked")     public EDBinaryHeap(int numMaxElementos) {         elementos = (T[]) new Comparable[numMaxElementos];     } }

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


Also when i export my fbx and import is into unreal the hands are like semi see through and transparent.  Thanks In Advance!!!!

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


I believe machine drawing(technical drawing) is a language of its own and any engineer should master this art. As a learning engineer myself I have trouble understanding some of its conventions and I am having trouble communicating with my peers who also seem to be having the same difficulties.  I believe it would be a good idea to have a StackExchange site for technical drawing as I believe that this subject can be mastered if we are able to communicate with experienced people on this subject. What do you guys think of this idea? Will the site have a chance of success? How will one propose such a site?

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


I have at the rate in the password (@) that I use to authenticate and use internet in my college. But to set proxy settings from the terminal we have to separate password and proxy host with @. Ubuntu is mistaking my @ in the password to this @.  Unfortunately I cannot change the password as the site, through which I can change by password, is down. And to set the proxy I did this: sudo gedit /etc/bash.bashrc in terminal and in the end of this file added this line   export http_proxy=username:password@proxyhost:port/   with my details.

I want to update ubuntu 11.04 throught apt-get. So I added the following lines in apt.conf  export http_proxy=http://username:password@proxyserver.net:port/ export ftp_proxy=http://username:password@proxyserver.netport/  export http_proxy=http://deepak:Deepak@123@12.1.1.1:3128   My question is: how do I insert special characters to a username or password?  For instance: my password for proxy is Deepak@123 and it is getting an error.


I usually hear people incorrectly using are/is such as in the sentences "I don't know what is that" or "Do you know what are the examples?" What is the correct use of grammar called in these instances? Some sort of agreement?

I posted a question somewhere that said...     Can anyone tell me how I can solve this?   ...but someone edited it to...      Can anyone tell me how can I solve this?    ...and it was accepted.  That's wrong isn't it? Can someone explain how that's wrong?


I've been using a 50mm ƒ/1.8 on my Nikon D750 for some months now, and I'm looking to upgrade the lens for a new experience. Which lens should I get next? I'm wanting to do street photography, just walk-and-shoot style of photography.

With a long lens you don´t disturb people but you are left "out of the scene", while with a short focal lens you are "inside the scene" but you may disturb people. What is a better alternative for street photography?


Compute the sum   $$\sum_{k=1}^{10}{\dfrac{k}{2^k}}$$  This question is taken from SMO junior (I can't remember which year it is). I have no idea how to start. Can anyone give some hint?  By writing out the sum, one has   $$\frac{1}{2} + \frac{2}{4} + \frac{3}{8} + ... + \frac{10}{1024}$$  but I don't know how to proceed from here.

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


I have used Blender and Unity 3D in Windows 8. Recently I have started using Ubuntu 17.04. Can anyone tell me the procedure to install Unity 3D Game Engine.  Thank You

According to this  I should be able to install the .deb version of the Unity Editor for Ubuntu. I have the recommended system requirements. But when I try to install the .deb file using the sudo dpkg -i mydebfile.deb I get the following errors:  Selecting previously unselected package unity-editor. (Reading database ... 175283 files and directories currently installed.) Preparing to unpack unity-editor-5.3.4f1 20160503_amd64.deb ... Unpacking unity-editor (5.3.4f1) ... dpkg: dependency problems prevent configuration of unity-editor:  unity-editor depends on lib32gcc1 (>= 1:4.1.1); however:   Package lib32gcc1 is not installed.  unity-editor depends on lib32stdc++6 (>= 4.6); however:   Package lib32stdc++6 is not installed.  unity-editor depends on libc6-i386 (>= 2.15); however:   Package libc6-i386 is not installed.  unity-editor depends on libpq5; however:   Package libpq5 is not installed.  unity-editor depends on npm; however:   Package npm is not installed.  dpkg: error processing package unity-editor (--install):  dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.13.3-6ubuntu3) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.59ubuntu1) ... Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ... Errors were encountered while processing:  unity-editor   Has anybody successfully installed the Unity3d on Ubuntu 16.04 yet? Please help if you can.  EDIT: I've been asked if the question  has solved my problem. The answer is: No, it hasn't. The answers in that question might help one learn how to fix broken dependencies using sudo apt-get -f install but that didn't solve my problem. I had to install each of the missing packages one by one (see comments below). So, I think people coming here for the same problem won't be able to know that they have to install the packages by hand if the question is marked as a duplicate.


It is straightforward if G is abelian, but appears to be difficult to prove for non-abelian groups. Since, it has been asked in supplementary exercise of Herstein's group theory, I guess some elementary group theoretic proof exists. Can anyone please give me hint. I will be grateful.

My question is, can we prove that the number of solutions to $x^n=e$ in group $G$ is divisible by $n$, for $n | |G|$   Apparently the answer is it is indeed true, infact for the equation $x^n = a$ for any $a \in G $ also, however I have had many ideas each of which having a small flaw with them.  For example I attempted induction on order of $G$ as follows:  Assume true for all groups of order $ \leq k$. Consider $|G| = k+1$.  If $G$ is cyclic, we show fairly easily the result holds. (In fact if I recall correctly there are $n$ solutions for each divisor $n$).  If $G$ is not cyclic, we can look at the subgroups of $G$. It'd be nice to say the number of solutions in each group is divisible by $n$ by the induction hypothesis and get the desired answer by inclusion-exlusion for solutions in all the subgroups, however we could potentially have a subgroup of order  less than $n$ and still contain a solution.   So if we were able to show it works for all the subgroups of orders $ < n$ collectively we would be done. I have no idea whether this can work though.  I did see this question  however I couldn't find much help on it. From the hint given I managed to show $no. solutions = \sum_{ d|n} \lambda_{i} \phi(d)$ for some $\lambda_{i}$s, however they could be different so I can't just use the well know summing of euler-phi formula.  Any solution/ideas would be very much appreciated.


I'm trying to construct a quotient map $f$ from the $n$-sphere $S^n$ to the $n$-disk $D^n$, in which $f(x_1,x_2,\ldots,x_n,x_{n+1})=f(x_1,x_2,\ldots,x_n,-x_{n+1})$. The goal is to show that $S^n/\sim_f$ is homeomorphic to $D^n$.  (Is this the right way to go about it?)  I've been looking at the stereographic projection for inspiration, but haven't come up with anything. I only just started learning about topology. Any hints?

Let $\sim$ denote the equivalence relation on the $n$-sphere $S^n$ defined via   $$ (x_1,\dots,x_n,x_{n+1})\sim(x_1,\dots,x_n,−x_{n+1})\:\text{ for all }\: (x_1,\dots,x_{n+1})\in S^n. $$      Show that the quotient space $S^n/\sim$ is homeomorphic to the $n$-disc $D^n$.   I know that Ii have to show that there exists a bijective function $f: (S^n/\sim) \to D^n$ that is continuous and that the pre-image $f^{-1}$ is continuous as well, but I can't advance from here, any tips?


I'm a fan of James Martin and have no problem with the amount of butter that he uses.  However, I'm totally unsure what type of butter to use!  Salted or unsalted?

What different uses do we assign to salted butter versus unsalted butter?


I have this caption of figure: \caption{these are my figure. (a):aaaaa. (b): bbbbbb.} that appear in below of figure in text. All part of this caption appear in list of figure. I want only appear this : these are my figure. in list of figure. is there any way ?

When I use \listoftables and \listoffigures I get in the list long captions that appear next to the tables/figures.  I would like to use short captions for this list which summarize these captions. Is that common to do? If so, what is one way to do it?


The answer from a library (DBpediaLookupClient.variableBindings()) results in  List<Map<String, String>>   I am trying to check is if the list if empty or not.  What I have tried so far is   if (dbpedialookup.variableBindings() != null && !dbpedialookup.variableBindings().isEmpty()) {     System.out.println("Results Present); } else {     System.out.println("No Results"); }   But, on items where the resultant List is []. Its throwing,   Exception in thread "main" java.lang.NullPointerException   How do we check for null in such a situation?

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


My game is completely fine, but when I try to place a block down it won't work. I have tried everything but nothing works.

I'm playing on a Survival world with cheats on, "easy" difficulty, and at night in-game. I didn't have a sword or anything to make a sword with, and I was starving, so I switched to Creative to give myself a stack of food and a bed to set my spawn point. When I switched back to Survival, I couldn't destroy or place blocks. I'm on single player, and my Internet is fine, and I can destroy blocks still if I switch to creative. I've tried resetting the button one, and reloading the map, and it still doesn't work. I've even tried deleting everything I gave myself in Creative. This happened before on a different world and I ended up deleting it.  This only happens on this world. How do I fix it?  If I know I'm in the correct game mode, what else can cause this?  Are there different causes in multiplayer?


Python 2 had the builtin function , which was removed in Python 3.0.  discusses alternatives for Python 3.0, but some  have been made .  What is the best alternative to  for Python 3.2, and ?

It seems they canceled in Python 3 all the easy way to quickly load a script by removing execfile()   Is there an obvious alternative I'm missing?


after the lifting $\tilde f$ of $f$ is defined, the book goes on to prove its continuity. And in that part, the book says that replacing $U$ by a smaller neighborhood, $V_0$ can be contained in $N$. But why is it possible? How to construct a smaller neighborhood such that $V_0$ can be contained in $N$?

Let $p : E \to B$ be a covering map. And also assume that $B$ is path-connected and locally path-connected. Then, given y in $B$, there exists a neighborhood $U$ of $y_1$ in $B$ that is path-connected and evenly covered by $p$. Now the inverse image of $U$ by $p$ consists of slices $\{V_a\}$. Take a point $x$ in $E$ such that $p(x)=y$ and let $V'$ be the slice containing $x$.   Now the questions is, if $N$ is an arbitrary neighborhood of $x$ in $X$, then how to replace $U$ by a smaller neighborhood of $y$ such that the slice $V'$ containing $x$ can be included in the $N$? It seems very nontrivial to me...In the text I read, there is no detailed explanation about this. Could anyone give me some rigorous proof?


Let's say I have a set of 100 items. Each turn, I pick three items at random, note which ones I've picked, and put them back. What is the probability I've picked every item at least once after $n$ turns? The only statement I can make right now is that $n \geq \frac{100}{3}$ in order for the probability to be non-zero.

Say there is a contest to collect a full set of $M$ coupons.  Each box of product has $N$ distinct coupons of the $M$ possible coupons in it, selected uniformly without replacement from the $M$ possible coupons, the same $N$ in number for all boxes.  I'm interested in the probability that after opening $K$ boxes of product I have at least one complete set of the $M$ coupons.  My attempt has been to take the probability of a coupon not being in a box, use that to determine the probability of that coupon not being in any of the $K$ boxes, and then... I get flummoxed, and don't think this is the correct approach.  I searched the site for coupon collector problems, there are a couple that deal with similar situations (multiple in a box), but with the box having coupons selected with replacement, so duplication in a box is possible.  Right now I'm using a CAS to get probability of sums of hypergeometric samples having all bins covered to check my ideas, but that's utterly impractical for other than tiny cases.   Is this not as trivial as I think it is, or is there a direct way to calculate this?


When I have a file browser and an image viewer opened and I double click a photo, the image viewer doesn't jump to the foreground, its icon just shakes a bit and acquires a glow around it, and I have to manually click on it to actually see the photo. How could I make it automatic, so that a double click on a photo shows it immediately, even when the image viewer is already opened in the background?

How can I make programs open in the foreground? Nautilus will open in the background, Remmina (the remote desktop program) also opens in the background. I have to click on the icon in the Launcher for it to come to the foreground. I would think any program that is invoked by any means would come to front, as it opens. It seems if one program invokes another, it will be in the background. If I click on any icons in the Launcher though, it will actually open in the foreground.


I was solving some problems in residues, I got this problem. I tried the usual way, changing the integrating path from line segment to the unit circle by substuting $z=e^{it}$, Put in denominator i got $4$ degree polynomial, It is very difficult to proceed further. Is there any easy way to do it?

I am trying to solve this integral, I think that it could be solve using the complex.   $$ \int \limits _0 ^{2\pi} \dfrac{dx}{(\alpha +\beta\cos x)^2} $$


I noticed the iOS Stack Exchange app is still using the old iOS form factor (pre-iPhone X). Is the app being actively developed?    If not consider open sourcing it so the community can contribute.

The Stack Exchange app doesn’t look very good on Apple’s brand new flagship phone yet.    Also the app can’t identify the device model either. (Says Unknown (iPhone 10,3))   App Version: 1.6.6.2 Device: iPhone X (iPhone10,3) OS Version: Version 11.1 (Build 15B93)


I know that making a skill legendary can allow you to level up more/faster but is there any other reason, it seems like that just takes away valuable skills. Am I wrong?

I recently got my Blacksmithing skill to 100. Now in the skills menu I can press space to make it Legendary, which will put it back to a skill level of 15 and reset my perks.  I am wondering: What benefit is there from making a skill Legendary apart from being able to level up the skill more thus having infinite levels?


For reasons beyond my control I need to upgrade a 14.04 release to 16.04 release and no further. Is this possible?   Im sure that sudo apt-get dist-upgrade will just update to the latest.

What are the different ways I can use to upgrade Ubuntu from one release to another?


What is the physical interpretation of $\frac{\partial \rho}{\partial t} + \frac{\partial j}{\partial x}=0$? Here $\rho$ is the probability density and $j$ is the probability current of a particle of mass $m$ moving in one-dimension.

The  in fluid mechanics states that  $$ \frac{\partial\rho}{\partial t} + \nabla\cdot(ρ\mathbf u)=0 $$ Can you explain to me what is the physical meaning of each term of the equation and what are the direct outcomes?  Keep in mind that i do not have much knowledge about differential calculus. Thank you! EDIT: After receiving some answers(for those who want to find out the answer,check the comments),i have only one question left.If the density gets bigger and bigger as time passes,then the first term of the equation is positive.What happens with the second term?What changes in that control volume?I mean,the density in the CV gets bigger,so what happens to velocity(intuitively)?I think that the velocity must get bigger in order to the fluid to get out of the CV.But that means that the second term is also positive and the equation is not  right.So what is wrong with my thinking?


I have a code can printf all of the string element like  #include <stdio.h> int main() {     char * c[]={"I love you.","I don't."};     char **p = c;     for(int i=0;i<2;i++) //I judge the number is 2 by my eyes         printf("%s\n",*p++);     return 0; }   But I don't like that part that I just can know the number is 2 by my eyes.Is there any elegant method can know how many element the array c contain?A in-built function maybe name count is ecpected in this post.Such as count(c) can give me the 2.

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


I need to highlight full code lines in lstlisting and I'm using the solution provided in this .  However, long wrapped lines (i.e., when "breaklines" is used in lstlisting) are not highlighted properly. Only the first part of the line (before the break) gets highlighted.  For example    The source for the image above  \documentclass[dvipsnames,cmyk]{beamer} \usepackage{pgf, pgffor} \usepackage{listings} \usepackage{lstlinebgrd} % see http://www.ctan.org/pkg/lstaddons  \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \btIfInRange{number}{range list}{TRUE}{FALSE} % % Test in int number <number> is element of a (comma separated) list of ranges % (such as: {1,3-5,7,10-12,14}) and processes <TRUE> or <FALSE> respectively  \newcount\bt@rangea \newcount\bt@rangeb  \newcommand\btIfInRange[2]{%     \global\let\bt@inrange\@secondoftwo%     \edef\bt@rangelist{#2}%     \foreach \range in \bt@rangelist {%         \afterassignment\bt@getrangeb%         \bt@rangea=0\range\relax%         \pgfmathtruncatemacro\result{ ( #1 >= \bt@rangea) && (#1 <= \bt@rangeb) }%         \ifnum\result=1\relax%             \breakforeach%             \global\let\bt@inrange\@firstoftwo%         \fi%     }%     \bt@inrange% } \newcommand\bt@getrangeb{%     \@ifnextchar\relax%         {\bt@rangeb=\bt@rangea}%         {\@getrangeb}% } \def\@getrangeb-#1\relax{%     \ifx\relax#1\relax%         \bt@rangeb=100000%   \maxdimen is too large for pgfmath     \else%         \bt@rangeb=#1\relax%     \fi% }  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \btLstHL<overlay spec>{range list} % % TODO BUG: \btLstHL commands can not yet be accumulated if more than one overlay spec match. %  \newcommand<>{\btLstHL}[1]{%   \only#2{\btIfInRange{\value{lstnumber}}{#1}{\color{orange!30}\def\lst@linebgrdcmd{\color@block}}{\def\lst@linebgrdcmd####1####2####3{}}}% }% \makeatother  \begin{document} \begin{frame}[fragile] \frametitle{Test} \framesubtitle{Test} \begin{columns} \column{\dimexpr\paperwidth-20pt} \begin{lstlisting}[breaklines,linebackgroundcolor={\btLstHL<1>{1}},basicstyle={\fontsize{9}{10}\selectfont}] 111111111111 1111111111111 1111111111111 11111111111111 1111111111111 1111111111111 222222222222 2222222222222 2222222222222 22222222222222 2222222222222 2222222222222 \end{lstlisting} \end{columns} \end{frame} \end{document}   I'm trying to highlight the entire line of 1s.

In , I've found one solution to produce a zebra effect for listing. Unfortunately, this only works if the lines are not broken. Is there a way to fix this?  Here is a code with an example showing the problem:  \documentclass[10pt,a4paper]{article}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[frenchb]{babel}     \usepackage[x11names, svgnames]{xcolor}     \usepackage{graphicx}     \usepackage{listings}     \usepackage{amsfonts}     \usepackage{amssymb}      \makeatletter         % Patch line number key to call line background macro         \lst@Key{numbers}{none}{%             \def\lst@PlaceNumber{\lst@linebgrd}%             \lstKV@SwitchCases{#1}%             {none&\\%              left&\def\lst@PlaceNumber{\llap{\normalfont                         \lst@numberstyle{\thelstnumber}\kern\lst@numbersep}\lst@linebgrd}\\%              right&\def\lst@PlaceNumber{\rlap{\normalfont                         \kern\linewidth \kern\lst@numbersep                         \lst@numberstyle{\thelstnumber}}\lst@linebgrd}%             }{\PackageError{Listings}{Numbers #1 unknown}\@ehc}}          % New keys         \lst@Key{linebackgroundcolor}{}{%             \def\lst@linebgrdcolor{#1}%         }         \lst@Key{linebackgroundsep}{0pt}{%             \def\lst@linebgrdsep{#1}%         }         \lst@Key{linebackgroundwidth}{\linewidth}{%             \def\lst@linebgrdwidth{#1}%         }         \lst@Key{linebackgroundheight}{\ht\strutbox}{%             \def\lst@linebgrdheight{#1}%         }         \lst@Key{linebackgrounddepth}{\dp\strutbox}{%             \def\lst@linebgrddepth{#1}%         }         \lst@Key{linebackgroundcmd}{\color@block}{%             \def\lst@linebgrdcmd{#1}%         }           % Line Background macro         \newcommand{\lst@linebgrd}{%             \ifx\lst@linebgrdcolor\empty\else             \rlap{%                 \lst@basicstyle                 \color{-.}% By default use the opposite (`-`) of the current color (`.`) as background                 \lst@linebgrdcolor{%                 \kern-\dimexpr\lst@linebgrdsep\relax%                 \lst@linebgrdcmd{\lst@linebgrdwidth}{\lst@linebgrdheight}{\lst@linebgrddepth}%                 }%             }%             \fi         }     \makeatother      \lstset{ %    * Number for lines         numbers=left,                   % Where to put the line-numbers         numberstyle=\footnotesize,      % Size of the fonts used for the line-numbers         stepnumber=1,                   % Step between two numbers         numbersep=5pt,                  % How far the line-numbers are from the code % %    * Back returns for long lines         breaklines=true,                % Sets automatic line breaking         breakatwhitespace=false,        % Automatic breaks only happen at whitespace ?         breakindent=0pt,                % Space before the text of a break         postbreak=\mbox{                % Character used at the begining of a break             \rotatebox[y=0.9ex]{180}{\color{Red} $\Lsh$}%         },     }  \begin{document}  \begin{lstlisting}[language=Python,linebackgroundcolor={\ifodd\value{lstnumber}\color{gray}\fi}] for i in range(5): for i in range(5): for i in range(5): for i in range(5): for i in range(5): for i in range(5):     sum += i**3 print sum  print('Fin de la boucle...') \end{lstlisting}  \end{document}


I discovered, while trying to edit a post using a spoiler block, that spoilers appear to interfere with Markdown heading syntax (hash(es) followed by text: # header), causing them to simply not render as a heading:   # This should be a heading    ### This too  Blockquotes don't have this problem:  This should be a heading   This too  Using the HTML heading tags <hX> instead of Markdown syntax yields some odd spacing, lots of unnecessary space appears above the heading, though the text itself renders correctly:   This should be a heading    This too  I know spoiler blocks can be a bit... finicky, since they're a custom syntax for SE, and I found posts referencing that a reduced set of markdown was possibly supported inside them. I just still expected to be able to work around it by using the HTML equivalent, which also seems to be partially broken. Is this a bug? Or is it a by-design thing?  Some previous references (direct and indirect) to this phenomenon:  , MSE, Dec 20 '11 , Anime & Manga SE Meta, Dec 26 '14 , MSE, Jan 22 '15 , MSE, Jul 27 '15

While trying to assist with the formatting of a , I discovered there's not a lot of parity between how spoilers and quote blocks (which are superficially quite similar) handle nested Markdown formatting.  (Simple HTML works fine.)  For example, here's a variety of typical Markdown nested inside a quote block:     heading            paragraph  code block          nested         list                 even nested quotes!               with nested nested formatting!           Aside from the code and quote blocks not standing out due to matching background colors, everything works exactly as expected.  Sadly, the same is very much not true for spoilers:      ### heading   ---   paragraph       code block   - nested  1. list   > even nested quotes!  >  > - with nested nested formatting!   Eek!  Any chance of changing spoilers to act more like quotes?  Needing complex formatting in spoilers isn't a terribly common scenario, but when you do, the inconsistency is jarring and a bit frustrating.


I recently decided to buy the digital copy of Animal Crossing: New Leaf, and I was wondering if the towns and everything else would be separate from the cartridge that my brother plays on.  For those asking why we don't play on the same game, I wanna be mayor of my own town.

My Animal Crossing: New Leaf 3DS came with AC:NL pre-installed, and I was wondering, if I were to purchase a new Animal Crossing New Leaf cartridge, would I be able to insert it into my 3DS (which already has the game pre-installed)? Would it count as a whole new game or would it continue the saved data from my pre-installed game? Or would it completely mess everything up? I'm sorry if this sounds confusing, but I just want to know if I could use a cartridge and have a whole separate game as if I had two 3DS's.


I have the following requirements to fulfill in a WPF application:   When you open the program (by clicking its shortcut or double-clicking its executable), it opens its MainWindow normally; If you try to open it while another instance is running, instead of opening another window, it brings the already-running to the front, and closes.   Currently I have already a way of detecting an open instance, by using Mutex, but I don't know what I could do to call that instance's MainWindow to the front.  public partial class App : Application {     public static Mutex mutex;      [STAThread]     public static void Main(string[] args)     {         if (!IsFirstInstance())         {             CallOtherToFront();  // how to implement this??             return;         }          var app = new App();         app.InitializeComponent();         app.Run();     }      public static bool IsFirstInstance()     {         mutex = new Mutex(true, "SmartFictitiousApplication");         return mutex.WaitOne(TimeSpan.Zero, false);     } }

Using C# and WPF under .NET (rather than  or console), what is the correct way to create an application that can only be run as a single instance?  I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are.  The code needs to also inform the already-running instance that the user tried to start a second one, and maybe also pass any command-line arguments if any existed.


Can users be filtered by their "suspended" status? I'd like to see a list of all users who are currently suspended.

I don't know if schadenfreude would be an appropriate tag, but if it were, this question deserves it. Background I was strolling through [Meta] Stack Overflow today and had remembered that there was some discussion about who has been in the penalty box and how many times.  Well, I came up with an easy way to determine that (non-programmatically). I haven't sat down to make it into a Greasemonkey script, but I'm sure someone out there will. Who's been in the penalty box? To figure out who has been in the penalty box, type the following into Google:  site:stackoverflow.com/users/ This account is temporarily suspended.  This query has problems. It shows up every time Google spiders the page, so if it is spidered multiple times for the same infraction, it may appear to be multiple suspensions until you look at the time and date of the spidering of the page. Like so:  User XXXXX This period of suspension ends in 9 hours User XXXXX This period of suspention ends in 4 hours User XXXXX This period of suspension ends November 30  Question In the spirit of competition:   What ways could you programmatically determine which users are in the penalty box? How could you determine (accurately) how many times they've been there?   Rules  It must be a program (that includes scripts) It can be in any language It must accurately determine how often a user in in the penalty box (through methods such as grabbing the time/date stamp of the spidering, etc) It must not get someone banned from Stack Overflow (Nothing that scrapes every user on the site once a day) The information used to create the program must be publicly available Any solution should address this point forward. Extra points if you can accurately determine who's been in the penalty box in the past More rules will be added (or taken away) as needed. The answer with the 'best' method will be chosen (very subjective, I'm sure there are objective criteria for them, and much like Pornography, I'll know it when I see it)


So I have this latex code  \underbrace{   a^{\frac{1}{n}} \cdot a^{\frac{1}{n}} \cdot \ldots \cdot a^{\frac{1}{n}} }_{n\text{-times}}} =  a^{   \underbrace{     \frac{1}{n} + \frac{1}{n} + \ldots + \frac{1}{n}   }_{n\text{-times}} } = a^{1} = a   that renders in this formula:   but as you can see the second summation in the exponent is rendered too big.  How to typeset it correctly?

I'd like to use underbrace in a formula:  \begin{IEEEeqnarray}{r/C/l?s} P_{a} \left( a | \gamma, \epsilon, \hat{K} \right)  & = & \frac{1}{1 + \frac{\gamma}{\epsilon} \times \underbrace{  \frac{\alpha_{X} \left( p_{f} | \hat{K} \right)} {\alpha_{Y} \left( a | \hat{S} \right)} }_{\Gamma \left( a | \hat{K} \right)} }  & \IEEEnonumber \end{IEEEeqnarray}   Compared to the formula without underbrace, the the underbraced part is enlarged:  \begin{IEEEeqnarray}{r/C/l?s} P_{a} \left( a | \gamma, \epsilon, \hat{K} \right)  & = & \frac{1}{1 + \frac{\gamma}{\epsilon} \times % \underbrace{  \frac{\alpha_{X} \left( p_{f} | \hat{K} \right)} {\alpha_{Y} \left( a | \hat{S} \right)} % }_{\Gamma \left( a | \hat{K} \right)} }  & \IEEEnonumber \end{IEEEeqnarray}   How can I avoid the change of the font-size when underbracing parts of a formula?


I have tried to think as intersections of two lines but for $2x+3$ and $5x+7$ is failed to have integer intersections (but not sure it is enough counterexample). Is the above generalisation correct? Can you give a counter-example, or a hint for how to prove it?

We want to find the solution $x$ to the congruence system  $$\begin{align} x &\equiv r_1 \!\!\!\pmod{\!m_1}\\ x &\equiv r_2 \!\!\!\pmod{\!m_2}\end{align},\ \ {\rm where}\ \  \gcd(m_1, m_2) = 1$$  These can be rewritten as  $$\begin{align} x &= r_1 + m_1 j\\ x &= r_2 - m_2k\end{align}$$  for unknown integers $j, k$. So we set those two equations as equal and rearrange them to  $$m_1j + m_2k = r_2 - r_1$$  Now assume we perform $\text{egcd}(m_1, m_2)$, which gives us the solution to  $$m_1u + m_2v = \gcd(m_1, m_2)$$  Let the integer $\,h\,$ make $\,h \gcd(m_1, m_2) = r_2 - r_1$.  Then $\qquad hm_1u + hm_2v = h\gcd(m_1, m_2) =  r_2 - r_1 = m_1j + m_2k$  At this point I am lost because I don't think we can just assume  $hm_1u = m_1j$ and extract $j = hu$.   How do I get the values of $j$ or $k$ so I can get the value of $x$?


A simple sharpener, will it grind as well as it ground years ago?

We have a knife set that's approximately 15 years old, and as we were honing a knife tonight, a question arose. Do honing steels get worn down over the years? Should they be replaced? If so, how often?


Currently I have a script that can run only in a single folder.   #!/bin/bash for file in ls -1 *.jpg|sort -t . -n -k 3 do   echo "compute ./scripName $file"   ./scriptName $file done    Question: I have a several folders containing *.jpg images. I need a script that can over all images of all folders.

My current best bet is:  for i in $(find . -name *.jpg); do echo $i; done   Problem: does not handle spaces in filenames.   Note: I would also love a graphical way of doing this, such as the "tree" command.


so let $\vec{v}: \Omega \subset \mathbb R^n \to \mathbb R^n$ be a vector-field.  Now we know:  (I) $\vec{v}$ conservative $\quad\Rightarrow\quad \nabla\times\vec{v}=0$  If further, $\Omega$ is simply-connected i.e. path-connected and null-homotopic, we can also state:  (II) $\nabla\times\vec{v}=0 \quad \Rightarrow \quad \vec{v}$ is conservative.  Question: Why do we need null-homotopy for (II)?

A field that is conservative must have a curl of zero everywhere. However, I was wondering whether the opposite holds for functions continuous everywhere: if the curl is zero, is the field conservative? Can someone please give me an intuitive explanation and insight into this, and if it is true, why? Also, please try to not be too rigorous (only in grade 9).


I am trying to prove the following:  If $f(z)$ is an entire function on $\mathbb{C}$ and $\displaystyle\lim_{|z|\rightarrow \infty} |f(z)|=\infty$  then $f(z)$ is a polynomial.  Let $a\in \mathbb{C}\setminus \{0\}$. Since $f(z)$ is analytic at $a$, it can be expressed as the power series $$f(z)=\sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!} (z-a)^n.$$  I have not learned anything about poles in my complex analysis class, so I am expected to solve this without any theorems involving poles. I am trying to work with the function $g(z):=f(1/z)$. This function would have a singularity at zero, but I won't see how to use the function to prove the claim. Is there a way I can show that there exists some $N$ such that $\frac{f^{(n)}(a)}{n!}=0$ for all $n\geq N$?   Also, prior to this I showed that if $f(z)$ is entire and $|f(z)|\leq A+B|z|^n$ for all $z \in \mathbb{C}$ then $f(z)$ is a polynomial. Perhaps I can invoke this result? Any help is greatly appreciated, thank you.

Let $f$ be an entire function such that $ |f(z)| \to \infty$ as $|z| \to \infty$. Prove that $f$ is a polynomial.


I was thinking about removing the brackets and denominators but i am not sure how I would follow. How can I do this?

Find all triples of positive integers (a, b, c) such that  $$ \left( 1 + \frac{1}{a} \right)\left( 1 + \frac{1}{b} \right)\left( 1 + \frac{1}{c} \right) = 2 $$  I tried to expand, yielding $ a+b+c+ab+bc+ca+1 = abc $, but I couldn't go anywhere from here.   This problem clearly involves using the fact that $a, b, c$ are positive integers, since there are three variables and only one equation. It would be great if someone also addressed this condition and maybe tried to solve the problem for other requirements, like when $a, b, c$ are positive or negative integers.  Finally - can anyone post or link other such problems which involves a mix of algebra manipulation and number theory. I would really appreciate it.  (Here is the full paper: )


I want to have phone number in working combination of '0' followed by 10 digit mobile number (or) 0091 folllowed by 10 digit mobile number (or) +91 followed by 10 digit number.  1) 0 followed and +91 folowed numbers are working with following regex i also want 0091 followed number to be worked, my regex is:  "^([0]|(?:[0][0]|\\+)(91))([7-9]{1})([0-9]{9})$";   Could you suggest me working a regex.

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


Few times I have decided to change my vote. The problem is that when originally answer is 0 and I vote up and after some though I want to reverse my vote, it goes to -1 vote.   Why not 0?  I don't want to vote for negative, just reverse my vote...

What limits are there on how I can vote?  How often can I vote? How do my votes become locked/unlocked?


OpenSSL released , warning users of two recently discovered vulnerabilities:   Memory corruption in the ASN.1 encoder (CVE-2016-2108) Padding oracle in AES-NI CBC MAC check (CVE-2016-2107)   Their recommendation is as follows:     OpenSSL 1.0.2 users should upgrade to 1.0.2h   OpenSSL 1.0.1 users should upgrade to 1.0.1t   However, the latest version available for Trusty (14.04) is 1.0.1f-1ubuntu2.19. How come such an old version is still being provided and how do I mitigate this?

We have an AWS server running OpenVPN which was built using Ubuntu 13.10. After the announcement of the Heartbleed vulnerability, we updated the server. This morning, we upgraded the server to 14.04. The current output of "openssl version -a" is:  OpenSSL 1.0.1f 6 Jan 2014  built on: Mon Apr  7 21:22:23 UTC 2014  platform: debian-amd64  options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)   compiler: cc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM OPENSSLDIR: "/usr/lib/ssl"   I verified the fact that the server is still vulnerable using the following:  :~$ openssl s_client -connect openvpn.example.com:443 -tlsextdebug 2>&1| grep 'server extension "heartbeat" (id=15)' || echo safe TLS server extension "heartbeat" (id=15), len=1   Attempts to run "sudo apt-get install openssl" return that the current version is already installed. What are the best options to resolve this issue? Does it appear there was a problem during distribution upgrade; i.e. is the 14.04 OpenSSL package actually outside the danger range? Or is there a possible issue with the repository itself?


so i have 'save as''d the new project and layer with my new Custom CRS project string being '+proj=laea +lat_0=70 +lon_0=0 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'.   However when I calculate area using the field calculator the numbers still don't make sense. Some of them are even in the negative. I have included a screen shot of the layer I am trying to calculate area for. Please note the column titled 'Area_Km2' are the original areas and the column titled 'Area m2' are the new areas which I am trying to calculate.   FYI I am working with a merged layer and I only clipped area in one row namely that titled 'Va2', It should be the only one with changed values. I am assuming the area will be in meters from the definition string.

Using QGIS, if I load a polygon layer and make a new column, how do I fill that column with the:   area of each polygon and another column with length of the perimeter of each polygon?


When looking at  and scrolled down the codeblock I saw this:    Under the horizontal scroll bar there is a blank area still in the codeblock. I have never seen this before so I thought it might be a bug?  I just noticed that the question was edited and it is normal again now but I would still like to know if this is a common thing or not.  Edit: I can reproduce this in: -Google Chrome version  33.0.1750.117 m. -FireFox 26.0 -Internet Explorer 11.0.9600.16518  OS: Windows 7 Professional.

Here's a problem (at least it seems like a problem) I noticed in the first couple revisions of . Based on experiments shown below, when I include within a <pre> block lines that start with one or more spaces, they appear as a nested pre-area in the question, and if there are enough of these lines, I get two scrollbars, one for the nested <pre> (which seems to be created by the Markdown parser) and one for the outer <pre> (which is explicitly given in the question). I'd expect to get only one <pre> in the rendered question, the one that I explicitly include.  Example:   line of code  line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code   line of code line of code


Surprised creatures are no longer surprised after they took their first turn in combat. But it feels counter-intuitive to apply this to a situation like the one below.  A group successfully sneaks up on an orc. The rogue wants to assassinate the orc. DM calls for initiative. Orc goes first because of poor rolling on the group's side.  Orc does first turn, does nothing because of surprise. He ends his turn and is not surprised anymore. Rogue shoots, thus giving away the group's presence...   Is this RAW? I think it is, but it feels wrong, because nothing would make the orc think that there is something going on...  To clarify, I think I understand how surprise works. What I don't understand is  why the orc would be surprised of nothing so he can stop being surprised. "oh no, I suddenly know there's an arrow coming my way..."  To clarify further: This is about surprise in general and specifically about the Assassinate Feature of a 3rd level Assassin Rogue.

In D&D 5e "" is a condition that can affect a creature during the first round of combat, only until the end of their turn:  [... T]he GM compares the Dexterity (Stealth) checks of anyone Hiding with the passive Wisdom (Perception) score of each creature on the opposing side. Any character or monster that doesn’t notice a threat is surprised at the start of the encounter. If you’re surprised, you can’t move or take an action on your first turn of the combat, and you can’t take a reaction until that turn ends. A member of a group can be surprised even if the other members aren’t. - PHB 189  Does the action that causes the surprise count as part of the round, though? Say Renee, a rogue, achieves a stealth check of 22, easily beating an orc sentry's passive perception. She sneaks directly behind him and stabs him in the back. Surely the orc isn't surprised at all until the dagger hits him (or if Renee misses, she fumbles around behind him or something). What I think it really boils down to in the end is: when is initiative rolled? If (in our example) initiative is rolled before Renee's attack hits (or misses) how can we justify the orc recovering from his surprise before the action that triggered said surprise even occurs, should he roll better than Renee on his initiative? I'd like to go with initiative is rolled immediately following whatever event began the encounter (which could be an attack, but is likely to often be something else wherever surprise isn't intended), but I can't find any documentation to support this stance.  Why Does Anyone Care? There are many reasons you might want someone to be surprised while you're attacking - in this example if Renee is over L3 (and took the Assassin archetype) she'll get 'Assassinate' if the orc is surprised, and 'Death Strike' if she's over L17. That's a lot of potential extra damage!  that if the orc is surprised, Renee will be able to retreat and hide, without having to take the disengage action as her bonus action to avoid an attack of opportunity. Of course, there's no way for her to know whether the orc is surprised or not at that stage, so trying this would be a bit of a gamble...


This is the $y=2^k$ case of . Suppose that $k\geq1$ and $0<x<2^k$ and $2^{2k}-x^2\bigm|2^{2k}-1$. Is it necessarily the case that $x=1$? Equivalently: Suppose that there are two positive divisors of $2^{2k}-1$ which average to $2^k$. Is it necessarily the case that these two divisors are $2^k-1$ and $2^k+1$?

The problem is the following:     If $x$ and $y$ are integers such that $\dfrac{4x^2-1}{4x^2-y^2}=k$ is   also an integer, does it implies that $k=1$?   This equation is equivalent to $ky^2+(1-k)4x^2=1$ or to $(k-1)4x^2-ky^2=-1$. The first equation is a pell equation (if $k$ is a perfect square) and the second is a pell type equation (if $k-1$ is a perfect square). I've tried setting several values of $k$ to get some solutions but i got nothing. I'm starting to think that $k$ must be $1$.


Call them $m_1,m_2$. They are compressed to their center of masses, if you wish. If the initial distance at $t=0$ is $d$, is there a formula or an efficient way to calculate the distance between them at time $t$, provided, of course, that they haven't collided?  The problem is the circularity of the speed. It's not mere acceleration that pushes the masses together. If the masses approach each other with acceleration, the force will increase faster than it does, and then the masses are pushed into each other with more than just acceleration. This also means that it is not mere change in acceleration, because you could argue similarly. It must be something more "exponential" not polynomial.  But my knowledge of calculus doesn't help me here.

I thought this would be a simple question, but I'm having trouble figuring it out. Not a homework assignment btw. I am a physics student and am just genuinely interested in physics problems involving math, which would be all of them.  So lets say we drop an object from a height, $R+r$, it falls toward earth. This height, $R+r$, is far enough away that the $g$ it experiences is a fraction of $g$ at sea-level. Let's just say that air resistance is negligible, and it wouldn't be that complicated to just integrate from $0$ velocity to the terminal velocity piece wise and deal with the rest of it later.  So the key here is that acceleration is changing with time. I thought I could simplify this by saying it changes with distance, and it has nothing to do with time, but this didn't really help, my guess is that maybe time is important (doh).  I tried integrating acceleration with time, and ended up nowhere. I tried integrating $a=GM/R^2$ with respect to $R$ from $R+r$ to $R$ and ended up with a negative function.  I saw somewhere someone tried to expand with taylor series, they even have something similar on hyperphysics, but I can't figure out how to obtain the polynomials that precede the variables.    This is the hyperphysics site where they use polynomials to find the distance.   Maybe I can't solve this because I haven't taken a course in differential equations yet. What I want to know is how to calculate the distance at any time.


Is it correct to say "people having money" instead of "people who have money"? I.e. is it OK to use "having" as the opposite to "without"? In my opinion it is OK but a colleague of mine believes that it is wrong to use "have"+ing.

Once again, a problem encountered while marking German pupils' exams. We teach them the following rules:     A present participle can be used to shorten an active relative clause:         The boy who was driving the car didn't stop = The boy driving the red car didn't stop         A past participle can be used to shorten a passive relative clause:         Strawberries which are grown in California are delicious = Strawberries grown in California are delicious.      While marking, I encountered several problems. For example, why does this not work:     The girl who has black hair is in the corner   NOT   The girl having black hair is in the corner   or     That's the man who is happy to be here   NOT   That's the man being happy to be here   Does this all have to do with:   the verbs have and be? (But "The girl, being happy, phoned her friend") the continuous and simple forms? (But "We help people who live in ghettos = we help people living in ghettos") the tenses?    Or what? I'm totally stumped by this problem and do not know how to explain the pupils' mistakes to them. The problem seems to occur mostly with the use of the present participle. Who can help with some explanations or even better, specific rules!


I want to remove the current row of the table by clicking the button using jquery  i have tried this , please help me.

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


I'm traveling to the USA in a matter of weeks. I have a B1/2 Tourist Visa (multiple entries 10 Year validity) and am a UK Citizen. I applied for a visa through the UK/US Embassy procedure, as I had a previous arrest for a minor drunk and disorderly offence. The offence did not result in a conviction - The embassy approved my visa. Some say that I could have travelled on ESTA, but the question wording isn't 100% clear, and the official advice is to go via embassy channels.   I've read online that the visa doesn't guarantee entry. I know I've mentioned this before, but does this mean I'm still not guaranteed to get in? I'm really nervous because this holiday means the world to me, I've fully complied with everything.   My crime was not a crime of moral turpitude, and the US Embassy Medical exam proved that I am not an alcohol abuser.   Thanks,

I’m a UK Citizen, and have a B1/2 Tourist Visa.  I applied for the visa as per the embassy guidelines as I was once arrested for Drunk and Disorderly. No conviction was ever made.   I attended the embassy interview and underwent a US Medical exam to prove I’m not an alcohol abuser and am in good health. This all came back positive and my visa was approved.  I have my visa now. But from what I’ve read, a Visa doesn’t guarantee entry. What are the chances of me now being denied entry by an agent at the border?


I'm using the android Volley to connect to server.The stringRequest POST is used to do the same          StringRequest strReq = new StringRequest(Method.POST,                 AppConfig.URL_LOGIN, new Response.Listener<String>() {             @Override             public void onResponse(String response) {                 Log.d(TAG, "Login Response: " + response.toString());                 hideDialog();          }, new Response.ErrorListener() {              @Override             public void onErrorResponse(VolleyError error) {                 Log.e(TAG, "Login Error: " + error.getMessage());                 Toast.makeText(getApplicationContext(),                         error.getMessage(), Toast.LENGTH_LONG).show();                 hideDialog();             }         }) {              @Override             protected Map<String, String> getParams() {                 // Posting parameters to login url                 Map<String, String> params = new HashMap<String, String>();                 params.put("email", email);                 params.put("password", password);                 Log.e(TAG,email+password);                 return params;             }          };         // Adding request to request queue          AppController.getInstance().addToRequestQueue(strReq,tag_string_req);     }   But it shows the following logcat error when I click the button  FATAL EXCEPTION: main Process: com.baellife.test.baellife, PID: 5285                                                                              java.lang.NullPointerException: Attempt to invoke virtual method 'void com.baellife.test.baellife.AppController.addToRequestQueue(com.android.volley.Request, java.lang.String)' on a null object reference                                                                               at com.baellife.test.baellife.LoginActivity.checkLogin(LoginActivity.java:185)                                                                                at com.baellife.test.baellife.LoginActivity.access$200(LoginActivity.java:32)                                                                                at com.baellife.test.baellife.LoginActivity$1.onClick(LoginActivity.java:80)                                                                                at android.view.View.performClick(View.java:5204)                                                                                at android.view.View$PerformClick.run(View.java:21153)                                                                                at android.os.Handler.handleCallback(Handler.java:739)                                                                                at android.os.Handler.dispatchMessage(Handler.java:95)                                                                                at android.os.Looper.loop(Looper.java:148)                                                                                at android.app.ActivityThread.main(ActivityThread.java:5417)                                                                               at java.lang.reflect.Method.invoke(Native Method)                                                                               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)                                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)    It seems strReq in   AppController.getInstance().addToRequestQueue(strReq, tag_string_req);   is returning NULL.

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?


Is it possible to use arcpy to open up an editor (like Notepad) to show a simple text file? I'd like to do this in a tool that generates text which is supposed to be copied and pasted into another text file.  If there is a built-in method of showing text without all the other tool output, I'd prefer that.  Having the text already selected would be a bonus.

As a test I have:   Authored a test.mxd with one layer called Localities in a single data frame called Layers Authored a test.rlf using View | Reports > Create Report of ArcGIS 10.2.2 for Desktop Created a Python AddIn which creates the expected PDF file from the Report (*.rlf).   This is the code which all works to create the PDF report from the Localities features within the current extent:  import arcpy  import pythonaddins  class ReportForExtent(object):     def __init__(self):         self.enabled = True         self.checked = False      def onClick(self):         mxd = arcpy.mapping.MapDocument("CURRENT")         df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]         lyr = arcpy.mapping.ListLayers(mxd,"Localities",df)[0]         arcpy.mapping.ExportReport(lyr,r"C:\temp\test.rlf",r"C:\temp\test.pdf","EXTENT",extent=df.extent)         del mxd   Is there a way to have the Python AddIn not just create the PDF file but also open it in Adobe Acrobat Reader?


on page load i have following div
......
   at this stage if i do console.log($('#row_log').length); then i get response as 1 which is correct.  however, i have button to clone the same div, which works fine. So if the button was clicked thrice, i would now have :
.....
 original div
.....
 cloned div
.....
 cloned div
.....
 cloned div   yet console.log($('#row_log').length); would still show as 1 instead of 4

I have an HTML element with a large collection of unordered lists contained within it. I need to clone this element to place elsewhere on the page with different styles added (this is simple enough using jQuery).    $("#MainConfig").clone(false).appendTo($("#smallConfig"));   The problem, however, is that all the lists and their associated list items have IDs and clone duplicates them. Is there an easy way to replace all these duplicate IDs using jQuery before appending?


I Have a page with a form in it ( many inputs, selects, textareas and popups ). I made a custom popup  - The client does not want the default alert message - to show when the user changes something in the page and forgot to save it. The issue is to prevent the page from reloading or exiting until the user choose when of the if he like to stay on the page and save his work or not. Any recommendation or suggestion.   $('#node-application-front-radb-form').data('serialize', $('#node-application-front-radb-form').serialize()); $(window).bind('beforeunload', function(e) {   var urlApplication = window.location.href.indexOf("/application/");   if (urlApplication > 0) {     if ($('#node-application-front-radb-form').serialize() != $('#node-application-front-radb-form').data('serialize')) {       ConfirmDialog("Voulez-vous sauvegarder vos modifications.? Si oui, appuyer sur le bouton Enregistrer en bas de la page de l'application");       function ConfirmDialog(message) {         $('

').appendTo('body')           .html('

' + message + '?

')           .dialog({             modal: true,             title: 'Modification non enregistrer',             zIndex: 10000,             autoOpen: true,             width: 'auto',             height: 400,             resizable: false,             buttons: {               'Oui': function() {                 stop();                 $(this).dialog("close");               },               'Non': function() {                 $(this).dialog("close");               }             },             close: function() {               $(this).remove();             }           });       }     }   } });

I need to warn users about unsaved changes before they leave a page (a pretty common problem). window.onbeforeunload = handler  This works but it raises a default dialog with an irritating standard message that wraps my own text. I need to either completely replace the standard message, so my text is clear, or (even better) replace the entire dialog with a modal dialog using jQuery. So far I have failed and I haven't found anyone else who seems to have an answer. Is it even possible? Javascript in my page: <script type="text/javascript">        window.onbeforeunload = closeIt; </script>  The closeIt() function: function closeIt() {   if (changes == "true" || files == "true")   {       return "Here you can append a custom message to the default dialog.";   } }  Using jQuery and jqModal I have tried this kind of thing (using a custom confirm dialog): $(window).beforeunload(function () {     confirm('new message: ' + this.href + ' !', this.href);     return false; });  which also doesn't work - I cannot seem to bind to the beforeunload event.


If $R$ is a commutative ring, and $A \in M_{n \times m}(R)$, $B \in M_{m \times n}(R)$ with the property that $AB = I_n$ and $BA = I_m$, prove that $n = m$.  I’m aware of a proof involving traces in the case that $R$ is a field of characteristic zero, but cannot think of / know of a proof for this more general case.

If $R$ is a commutative ring with $1\ne 0$ and $R^m \cong R^n$ as direct sums of $R$-modules, then $m=n$.   There is a hint to this problem (I don't know how to use it): Reduce this to the case of a field.  I noticed that there was . But as a beginner of commutative algebra, I don't know if my question is closely related to that one. Thanks in advance!


I'm trying to install a driver using a shell file:  yoav@yoav-System:~/Documents/WIFI_DRIVER$ ls android_ref_codes_JB_4.2  btcoex    install.sh        WiFi_Direct_User_Interface android_ref_codes_KK_4.4  document  readme.txt        wireless_tools android_ref_codes_L_5.0   driver    ReleaseNotes.pdf  wpa_supplicant_hostapd   Then:  yoav@yoav-System:~/Documents/WIFI_DRIVER$ install.sh install.sh: command not found   Fair enough:  yoav@yoav-System:~/Documents/WIFI_DRIVER$ ./install.sh bash: ./install.sh: Permission denied   How about this:  yoav@yoav-System:~/Documents/WIFI_DRIVER$ sudo ./install.sh sudo: ./install.sh: command not found   What am I doing wrong?

Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application... → Terminal.  How do I open this file in the terminal?


Is it possible to remove the + sign in the cite of a reference, when using the alphanumeric? Why is the + diplayed?  @ARTICLE{Yang:2004:SecurityAdhoc, author={Hao Yang and Haiyun Luo and Fan Ye and Songwu Lu and Lixia Zhang}, journal={Wireless Communications, IEEE}, title={Security in mobile ad hoc networks: challenges and solutions}, year={2004}, volume={11}, number={1}, pages={38-47}, }   [YLY+04] H. Yang, H. Luo, F. Ye, S. Lu y L. Zhang, “Security in mobile ad hoc net- works: challenges and solutions”, Wireless Communications, IEEE, vol. 11, n. o 1, págs. 38-47, 2004.

I use biblatex with Biber and alphabetic style. In the case your citation has more than three authors this style will put a plus sign (+) in the label. I try to get this plus sign into superscript. Does anyone know how to accomplish this?  Just in case you might not exactly know what the alphabetic style looks like. For entries with two or three authors it will take the first letter of each authors' surname and put the last two digits of the year behind them. If there are more than three authors the label will carry the first letters of the surnames of the first three authors (EDIT BY LOCKSTEP: only if you set minalphanames=3, hereby overriding its default value of 1), put a + for the remaining one and put the last two digits of the year at the end. An example looks like this:        A. ASurname, B. BSurname, C. CSurname (2003): Title.      --> [ABC03]   A. ASurname, B. BSurname, C. CSurname, D. DSurname (2004): Title.      --> [ABC+04]


I need to justify whether $(f_{n})_{n}$ as a sequence of real-valued functions converges almost everywhere or not. Note that $f_{n}: \mathbb R \to \mathbb R$ where $f_{n}(x)=1_{[n,n+1]}(x)$. Now I have two views on this:  $1.$ $f_{n}$ converges pointwise to $0$ and thus $f_{n}(x) \xrightarrow{n \to \infty} 0$ for almost all $x$. This was my initial thought.  But then I started thinking about the fact that:  $2.$ for any $n \in \mathbb N$ we know that $\exists A_{n} \in \mathcal{B}(\mathbb R)$ so that $\lambda(A_{n})=1$ where $\lambda$ is the Lebesgue-Borel Measure on $\mathbb R$ and $\vert f(x)\vert \geq 1$ for all $x \in A_{n}$ and hence how can I say that it to zero almost everywhere, since there is always a part of the function of positive measure that is exactly a distance of $1$ away from the $0$ function.   Any ideas that could illuminate this for me?

Let $(f_{n})_{n} \subseteq L^{2}(\mathbb R, \lambda)$ where $f_{n}(x)=1_{[n,n+1]}(x)$. Investigate:   $1. \lambda-$a.e. convergence  $2. $ weak convergence  $3.$ strong convergence  My ideas:  $1.$ for any $ x \in \mathbb R$ $\exists N \in \mathbb N$ namely where $N \geq x$ so that $f_{n}(x)=0$ for all $n \geq N$, thus $(f_{n})_{n}$ converges pointwise and further will then converge $\lambda-$a.e. to $0$  $2.$ Let $\epsilon > 0$. Since $L^{2}$ is a Hilbert space, we can identify the dual of $L^{2}$ as $L^{2}$ itself. And rather than taking $\ell \in (L^{2})^{*}$, we will take $g \in L^{2}$. But now do I show convergence according to the $L^{2}-$norm? I assume $f=0$ is a good candidate. $\vert \vert f_{n}g-fg\vert \vert_{2}=\vert \vert (f_{n}-0)g\vert \vert_{2}=\vert \vert f_{n}g\vert \vert_{2}=\int_{[n,n+1]}g^{2}d\lambda$ but since $g \in L^{2}$ we can choose an $ N \in \mathbb N$ so that $\int_{\vert x \vert > N}g^2 d\lambda<\epsilon$. Now $\forall n \geq N$: $\vert \vert f_{n}g\vert \vert_{2}=\int_{[n,n+1]}g^{2}d\lambda \leq \int_{\vert x \vert > N}g^2 d\lambda<\epsilon\Rightarrow f_{n}g\xrightarrow{L^{2}}fg \Rightarrow f_{n} \xrightarrow{w} f$  $3.$ $\lambda-a.e.$ convergence does not imply strong convergence. How do we find an ideal candidate for strong convergence? I'd assume it'd be $0$ but I am not sure how to go about it. I'd say $f_{n} \leq f_{n+1}$ for all $n \in \mathbb N$ and $\lim_{n \to \infty} f_{n}(x)=0$ for any $x \in \mathbb R$.  Thus by monotone convergence theorem: $\lim\limits_{n \to \infty}\int_{\mathbb R}\vert f_{n}-0\vert^{2} d\lambda=\lim\limits_{n \to \infty}\int_{\mathbb R}\vert f_{n}\vert^{2} d\lambda=\int_{\mathbb R}\lim\limits_{n \to \infty}\vert f_{n}\vert^{2} d\lambda=0$  Any corrections?  My questions:  I am interested in the interplay between the above three notions of convergence:   I know that strong convergence (in this case $L^{2}$ convergence) implies weak convergence but has no relationship (in terms of implications) to $\lambda-$a.e.. But in general, is the pointwise limit of a sequence of functions a good choice for convergence of $(f_{n})_{n}$ in $L^{2}$ ? And more importantly, is the pointwise limit the only possible limit in $L^{2}$. In other words, can I have $f_{n}(x) \xrightarrow{n\to \infty} f(x)$ for all $x \in \mathbb R$ but there is a $g \neq f$ so that $f_{n} \xrightarrow{ L^{2}} g$. Does the converse also hold?


The question is not a duplicate. It's specific for the case of Windows Vista where there's no OS-provided method for reducing the size of the WinSxS folder (as opposed to Windows 7 and later, where there is such a method). The question asks about a specific manual method of reducing that folder size. This is not addressed on other SU questions.    My Windows\Winsxs folder is currently about 20 GB in size and is full of files which where last accessed years ago.  Some files are hard-linked from some other folder in the system, but most of them have no hard links (hard link count = 1). They just seem to be taking space.  Is it safe to delete the files that have no hard links? I have no intentions of uninstalling Windows updates, so I don't want to keep old versions of everything.

A Vista virtual machine I use only has a 10 GB virtual hard disk -- and I'm worried about it running out of space over time. I used  to check for the culprits..  And the primary culprit is that /winsxs or "Windows Side-By-Side" folder.  What is the Windows Side By Side folder? Well, that's .  All of the components in the operating system are found in the WinSxS folder – in fact we call this location the component store.  Each component has a unique name that includes the version, language, and processor architecture that it was built for.  The WinSxS folder is the only location that the component is found on the system, all other instances of the files that you see on the system are “projected” by hard linking from the component store.  Let me repeat that last point – there is only one instance (or full data copy) of each version of each file in the OS, and that instance is located in the WinSxS folder.   So looked at from that perspective, the WinSxS folder is really the entirety of the whole OS, referred to as a "flat" in down-level operating systems.  This also accounts for why you will no longer be prompted for media when running operations such as System File Checker (SFC), or when installing additional features and roles. That explains why the folder starts off big, but not why it gets larger over time – the answer to that question is servicing.   In previous versions of Windows the atomic unit of servicing was the file, in Windows Vista it’s the component.  When we update a particular binary we release a new version of the whole component, and that new version is stored alongside the original one in the component store.  The higher version of the component is projected onto the system, but the older version in the store isn’t touched.  The reason for that is the third part of why the component store gets so large.  Lots of other people :  A coworker recently received his every two year work laptop refresh and was in the middle of loading his new laptop with Vista. For some reason, his hard drive C: was partitioned to only 25GB and the rest of the space reserved for a much larger drive D:. Anyway, after loading many Windows Updates, he was left with hardly any drive space left on C:, and for some reason, the WinSxS directory had ballooned to over 8GB. While I knew what the WinSxS (Windows Side-by-Side) directory was for, I wasn't quite sure why that directory would explode in size so fast with normal operating system updates.  I don't really care about having all these duplicate files for safety, but I do care about the VM exploding due to an out of disk space error. So.. can /winsxs be safely pared down in any way? ..  Administrators should not, for any reason, take it upon themselves to clean out the /winsxs directory - doing so may prevent Windows Update and MSI from functioning properly afterwards.  Preventing accidental deletion from the directory is accomplished by putting a strong security descriptor on the directory that inherits to its children.  If this /winsxs folder gets any larger, I'm going to have to re-image this virtual machine.. which I really don't want to do!


Trying to figure this out for a while, need a random number that is either -1, 0 or 1. Any help would be great.

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