I frequently come across the task to create a String representation of a collection of objects.  example:  String[] collection = {"foo", "bar", "lorem", "dolar"};   The representation I want to create: "foo, bar, lorem, dolar".  Everytime I come across this task I wonder which is the cleanest most convinient way to achieve the desired result..  I know there are a lot of ways to get the desired representation but for example I always wondered, if there is any possibility to create the string by just using the for/each loop?  like so:  StringBuilder builder = new StringBuilder();  for (String tag : list) {   builder.append(tag + ", ");  String representation = builder.toString(); // but now the String look like this: "foo, bar, lorem, dolar, " which nobody wants   Or is it best to just use the iterator if there is one, directly?  supposing list is a collection (that's how they kind of do it in the JDK):  Iterator<String> it = list.iterator(); while (it.hasNext()) {   sb.append(it.next());   if (!it.hasNext()) {     break;   }   sb.append(", "); }   One could of course index over the array with a traditional for-loop or do many other things.  Question  What is the easiest / best readable / safest way to convert a list of strings into the representation separating each element with a comma, and handle the edge case in the beginning or the end (meaning that there is no comma before the first element or after the last element) ?

While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:  public String appendWithDelimiter( String original, String addition, String delimiter ) {     if ( original.equals( "" ) ) {         return addition;     } else {         return original + delimiter + addition;     } }  String parameterString = ""; if ( condition ) parameterString = appendWithDelimiter( parameterString, "elementName", "," ); if ( anotherCondition ) parameterString = appendWithDelimiter( parameterString, "anotherElementName", "," );   I realize this isn't particularly efficient, since there are strings being created all over the place, but I was going for clarity more than optimization.  In Ruby, I can do something like this instead, which feels much more elegant:  parameterArray = []; parameterArray << "elementName" if condition; parameterArray << "anotherElementName" if anotherCondition; parameterString = parameterArray.join(",");   But since Java lacks a join command, I couldn't figure out anything equivalent.  So, what's the best way to do this in Java?


I have a land card, for example  which reads "{T}: Add {R} or {W}." Do I take the mana from my library or my hand?

What is the relationship between lands and mana in Magic and what do each of them do?  A good answer should especially include how a new player should think about them.    Note:  This is an attempt to create a canonical question about the relationship between lands and mana in Magic.  Beginners are often confused about this given the same symbols are used to mean different things across basic lands, non-basic lands, and mana costs.  This can lead to confusion about , about , or even about .


In Java, we sometimes do this:  int [] foo = new int [5]  How do you do this in C++? I've put this in and it gave me an error.

I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.  I could swear I once knew a simple way to do this. I could use memset() in my case, but isn't there a way to do this that is built right into the C syntax?


Let $P$ be a $n\times n$ matrix, if there is $k\in \mathbb Z^+$ such that $P^k=O$, prove that $P^n=O$.   I have thought about characteristic polynomial, but it doesn't give me much information. So I think, base on the problem conclusion if there is $k$ such that $P^k=O$, then we see $\det(P)=0$. $P$ must have rank $< n$, and I have to show that every time I multiply $P$ to $P^m$, the rank of $P^{m+1}$ must less than $P^m$, how can I show this?

$A$ is a $n\times n$ matrix such that $ A^m = 0 $ for some positive integer $m$.   Show that $A^n = 0$.   My attempt: For $n > m$, it's obvious since matrix multiplication is associative.  For $n < m$, $A^n\times A^{m-n} = 0$; not sure what to do next. Also I know that $\det A = 0$.


I am working on proving that if $C$ is a conjugacy class in $S_n$ then $C^g =C$ for all $g \in S_n$. I went over similar questions which only prove that a normal subgroup is contained in union of conjugacy classes, but not claiming a conjugacy class is normal subgroup.

This is Exercise 2.6.5 of F. M. Goodman's "Algebra: Abstract and Concrete". I want to check my proof.     Exercise 2.6.5: Show that a subgroup (of a group) is normal if and only if it is the union of conjugacy classes.   My Attempt:  Let $N$ be a subgroup. Then  $$\begin{align} N\text{ is normal }&\Leftrightarrow \forall g\in G, N=gNg^{-1} \\ &\Leftrightarrow \forall n\in N \forall g\in G\exists m_{n, g}\in N, n=gm_{n, g}g^{-1} \tag{1}\\ &\Leftrightarrow N=\bigcup_{n\in N}\underbrace{\bigcup_{g\in G}\left\{gm_{n, g}g^{-1}\right\}}_{\text{conjugacy class of }n}\tag{2} \\ &\Leftrightarrow N=\bigcup_{n\in N}[n], \end{align}$$ where $[n]$ is the conjugacy class of $n$.$\square$     Is this proof valid?   Thoughts:  I hope to make $(1)$ to $(2)$ (and back) more explicit.  Please help :)


I have ~250 files with the name:  no_responseEvent_2002.02.07.03.15.56.970/        no_responseEvent_2002.02.10.01.47.07.450/        no_responseEvent_2002.02.13.14.18.46.00/   I want to remove 'no_response' from each file name. How do I do that? I know a for loop could work, but I am confused about how to implement it.

I have a directory full of images:  image0001.png image0002.png image0003.png ...   And I would like a one-liner to rename them to (say).  0001.png 0002.png 0003.png ...   How do I do this?


My friend and I got into an argument about English grammar, so I was hoping maybe you could help us out. Okay so we want to know if the following part of the sentence is correct, "People who are satisfied and feel self-fulfilled like I" rather than "People who are satisfied and feel self-fulfilled like me". I have already provided many sources to my friend showing that the first way is a formal and a grammatically correct way, however he wants an answer with this specific part of the sentence.   Please help us out  Thank you

In high school we learned to say "than I" and "as I" because you could potentially add an "am" to the end of the sentence.  Examples:  "She is smarter than I."  (Think: "...than I am.") "He is as tall as I."  (Think "...as I am.")  So analogously, shouldn't it be "like I" as well:  "He is sincere, just like I."  (Think: "... like I am.")  But universally, it seems that we use "like me".  Where does this reasoning break down?  Is there history here?


I need lock screen and autolocking, but want to never see awful gnome3 lock screen with arrows and clocks. I need just to see gdm login window with password prompt in all cases. How can I completely disable slider with clocks on it?

I need to remove the annoying new "locking" screen that shows a giant clock: I can't remove it with just moving the mouse (as with any other desktop environment), the animation is slow, and it isn't asking me for a password!  I managed to disable it, just to discover that now I can't lock my screen on purpose, so I can't go away from the computer.  Just to clarify, I want to:   After some time the screen could go black, but if I move the mouse or press any key then I can use it directly (like a normal screensaver). If I press super-L then it is locked, and I must type the password to unlock (like a normal lock screen).   I found several "solutions", but none seems to work:


I don't feel like it actually helped me. I now sense long after high school that taking notes and reading them probably did not help. Now I understand why it could work. In theory, somebody who thinks for themself could use their own method of trying to understand the parts of a lecture they are interested in understanding, using a complex method writing down the results of what they figured out about their method of thinking and slowly improving their own method of thinking and writing. However, when I was in high school, I didn't understand why I was told to takes notes so I used linear thinking and just copied down what ever the teacher was writing on the board and then read my notes and I'm not sure it really helped.

I hear a lot about good note-taking strategies vs bad note-taking strategies, and I have seen a lot of research papers on different styles of note-taking. What I haven't seen though is any study that has asked if we should even be taking notes in the first place.  Specifically I would like to know the long-term effects of taking notes vs not taking notes. It is clear to me that if someone has taken notes their entire academic career, then immediately stops, their performance will probably plummet, but how do students who have never taken notes compare to students who have always taken notes?  I would guess certain learning styles would benefit from note-taking while other learning styles are hindered by note-taking, but I would like to see some actual data on this if anyone knows anything about it. A cursory Google search didn't return anything, so I hope there is someone on here that may be able to shed some light on this.  Edit: A lot of people have taken this question to solely be asking for research on this topic. While I would most like to see actual data, I did not intend this to solely be a literature search, and people can post their anecdotal evidence, as long as it is pointed at the long-term difference in note-taking vs not taking notes.


I am using slightly customized theorem styles and have defined the theorem environment to follow the section numbering and lemmas, propositions, and conjectures environments to follow the theorem numbering as shown in the minimal code example and in the picture below. My problem is that then \cref does not quote the correct environment name, but only 'Theorem' instead. My guess is that it has to do with the way I have set up the numbering for the additional theorem environments, but I don't know how to fix the issue.  Minimal code example:  \documentclass[10pt,a4paper]{report}  \usepackage{xcolor}  \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm}   \newtheoremstyle{italic}{3pt}{3pt}{\itshape}{}{\bfseries}{:}{3pt}{} \newtheoremstyle{normal}{3pt}{3pt}{}{}{\bfseries}{:}{3pt}{}  \theoremstyle{italic} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition}  \newtheorem{lemma}[theorem]{Lemma}  \theoremstyle{normal} \newtheorem{conjecture}[theorem]{Conjecture} \newtheorem*{remark}{Remark}  \usepackage[ bookmarksopen=false, bookmarksnumbered, colorlinks=true, urlcolor=teal, linkcolor=violet, citecolor=green, frenchlinks=false ]{hyperref} \usepackage[capitalize,nameinlink]{cleveref} % always after hyperref     \usepackage{hypcap} \usepackage{bookmark}  \begin{document} \chapter{Chapter1} \section{Section1} \begin{theorem}\label{abc} $a + b = c$ \end{theorem}  \begin{lemma}\label{pqr} $p+q+r=0$ \end{lemma}  \chapter{Chapter2} \section{Section2}   \cref{pqr} is not even wrong.        \end{document}   This produces:       But it should be: "Lemma 1.1.2 is not even wrong". How do I get the correct environment name using \cref?   Feel free to add more appropriate tags.

I am trying to use the  package.  I have the following counters defined (hopefully this is the right way to do it!)  \newtheorem{thm}{Theorem}[section] \newtheorem{lemma}[thm]{Lemma} \newtheorem{cor}[thm]{Corollary}   This works as I would like (i.e. Theorem 1.1, Corollary 1.2, Lemma 1.3, etc.)  My problem is \cref always returns Theorem 1.2, Theorem 1.3. I   Perhaps this is not right? (In my preamble)  \crefname{thm}{theorem}{theorem's} \crefname{lemma}{lemma}{lemma's}


What is the Time and Space complexity of this code (Find Uniques and duplicates)? arr = [1,1,1,2,4,2,5] a = [] d = [] for i in arr:     if i not in a:         a.append(i)     elif i in a:         d.append(i) print(a) print(d)

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


I want to prove that  $(n-1)^n>n^{n-1}$, for $n>4$, $n$ is an integer.  So I divided by $n^n$ and got:  $(1-\frac{1}{n})^{n}>\frac{1}{n}$  I know that $(1-\frac{1}{n+1})^{n+1}$>$(1-\frac{1}{n})^{n+1}=(1-\frac{1}{n})^n(\frac{n-1}{n})>\frac{1}{n}(\frac{n-1}{n})$.  How can I continue?  Thanks.

I am currently helping a friend of mine with his preperations for his next exam. A big topic of the exam will be induction, thus I told him he should practice this a lot. As at the beginning he had no idea how induction worked, I showed him some typical examples.  Now he showed me an exercise he was having trouble with, which states that one should prove $$n^{n+1} > (n+1)^n$$  for all $n \geq 3$. I have to admit that I too have trouble showing this inequality, as in all of my attempts, my lower bound is too low. Also, I have not yet figured out, how one gets the $(n+2)^{n+1}$, primarely the number $2$ is a problem. I think this might be solved using the binomial theorem, however, I don't think they have already seen the binomial theorem in school.  Is there an easy method to show this inequality by induction not using the binomial theorem? If no: How can one show it using the binomial theorem?  Thanks for answers in advance.


os- ubuntu 14.04 LTS  Unfortunately i changed permission of my /etc folder I ran following command        sudo chmod -R 777 /etc   and after this my system crashed.  When I tried to reboot it, it keeps showing a warning -                    system booting without full network configuration    and not booting at all.  How can I fix this?Because all my data and project are in there and I don't want to reinstall OS. Please help.

I am getting sudo errors, how do I fix this error?  sudo: /etc/sudoers is mode 0777, should be 0440 sudo: no valid sudoers sources found, quitting


I'm struggling with the interpretation of the gradient. The gradient of a function is orthogonal to the tangent on a particular point, which makes perfect sense from its definition (its scalar product with the derivative = 0)  But I have also read many time that the gradient can be seen as the vector with the strongest slope. I have drawn a sketch, to try to understand this, with an univariate function (of variable x). MM'=dx.    Here, you can see that it has nothing to do with the slope of the function, since it's not following it, it's orthogonal. What did I misunderstood in this concept?

I'm currently learning about gradients, and I thought khanacademy could help me acquiring some intuition. The actual computation is clear to me, however I'm having trouble understand the intuition.    is the video I'm talking about, and the part I have a part with is 6:11. He says the gradient vector shows the direction you have to travel in the x,y-plane in order to get a maximum slope in the z-direction.  This sounds like gibberish to me. How do you have to 'travel' it? Why do you get a maximum slope? I just have no clue.


What are the similarities between a field and a projective module that can support my question?

Prove that if an integral domain $R$ is an injective $R$-module then $R$ is a field.  "Proof"  Choose a non-zero element $x$ of $R$ and consider the map $f: R \rightarrow R$ given by $f(t)=tx$.  This yields an exact sequence $0 \rightarrow R \rightarrow R \rightarrow R/\langle x \rangle \rightarrow 0$ where the first map is $f$.  By assumption $R$ is injective and thus $R \cong R \oplus R/\langle x \rangle$.   Now the claim is that $1 \in \langle x \rangle$. Otherwise $(1,0 + \langle x \rangle)$, $(0,1+ \langle x \rangle)$ are zero divisors of $R \oplus R/\langle x \rangle$ which is impossible since $R$ is an integral domain.  Thus $1 \in \langle x \rangle$ so $x$ is invertible and we're done. Is this OK?


I have equations as follows $$f(f(x))=x^2+x$$ Then solve for $f(x)$. Can anyone give some hints about this question?

How to get $f(x)$, if we know that $f(f(x))=x^2+x$?  Is there an elementary function $f(x)$ that satisfies the equation?


In the STL library some containers have iterators and it is commonly held that they are a superior way of iterating through these containers rather than simple for loops e.g.  for ( int i=0; i < vecVector.size(); i++ ) {  ..  }   Can anyone tell me why and in what cases I should use iterators and in what cases the code snippet above please?

Take the following two lines of code:  for (int i = 0; i < some_vector.size(); i++) {     //do stuff }   And this:  for (some_iterator = some_vector.begin(); some_iterator != some_vector.end();     some_iterator++) {     //do stuff }   I'm told that the second way is preferred. Why exactly is this?


What's up with that? Breezy's iPhone?  This is the beginning of all my terminal prompts.

My computer name in System Preferences > Sharing is set to "archos", but is showing as "iphone" on Terminal. It just started doing this after I loaded Xcode for doing iPhone development: Last login: Mon Nov  7 14:46:55 on ttys001 iphone:~ travis$   Any ideas what could be causing this?


Recently I've seen rechargeable lithium-ion AA's for sale, but I sure don't want ICR in my pocket or anywhere else near me, and they are 1.5VDC as needed for standard AA, which means something interesting is going on.  Anyone know chemistries for any of these, or the best ways to find out? Please note that I'm asking what sort of lithium-ion: IMR, ICR, INR...?

I recently learned that rechargeable lithium-ion AA batteries, 1.5VDC 3200mAh, have become available.  For instance:   Can a charger supporting >3V Li-Ion and 1.2V NiMH batteries, be used for these? And if not, what would be the necessary technical changes?


I have an array of strings that contains first and last name, age, email, gender, city, and state. I should use ArrayList and hash maps to count the number of people who live in each state and print them in ascending order. Here is what I have so far:  I used an ArrayList to create and put objects in it. In my hash map, I need to have a key and array lists for each state that would contain users who live there  import java.util.ArrayList; import java.util.HashMap; import java.util.List;  public class MainPart1 {  public static void main(String[] args) {      List<User> listOfUsers = new ArrayList<>();     HashMap<String, ArrayList<User>> hmap = new HashMap<>();      for (String str : Data.users) {         String[] userData = str.split(",");         User newUser = new User(userData[0], userData[1], Integer.parseInt(userData[2]), userData[3], userData[4], userData[5], userData[6]);         listOfUsers.add(newUser);     }      for (String str : Data.otherUsers) {         String[] userData = str.split(",");         User newUser = new User(userData[0], userData[1], Integer.parseInt(userData[2]), userData[3], userData[4], userData[5], userData[6]);         listOfUsers.add(newUser);     }      ArrayList<User> list;     for (int i = 0; i < listOfUsers.size(); i++) {         String key = listOfUsers.get(i).getState();         if (hmap.containsKey(key)) {             list = hmap.get(listOfUsers.get(i).getState());         }          else {             list = new ArrayList<>();         }          list.add(listOfUsers.get(i));         hmap.put(key, list);       }      System.out.println("State:       Count:");      for (String key : hmap.keySet()) {         System.out.print(key + "\t\t\t ");         System.out.println(hmap.get(key).size());     }  }   }  public class User {  private String firstName; private String lastName; private int age; private String email; private String gender; private String city; private String state;  public User(String firstName, String lastName, int age, String email, String gender, String city, String state) {     this.firstName = firstName;     this.lastName = lastName;     this.age = age;     this.email = email;     this.gender = gender;     this.city = city;     this.state = state; }  public String getFirstname() {     return firstName; }  public void setFirstname(String firstName) {     this.firstName = firstName; }  public String getLastName() {     return lastName; }  public void setLastName(String lastName) {     this.lastName = lastName; }  public int getAge() {     return age; }  public void setAge(int age) {     this.age = age; }  public String getEmail() {     return email; }  public void setEmail(String email) {     this.email = email; }  public String getGender() {     return gender; }  public void setGender(String gender) {     this.gender = gender; }  public String getCity() {     return city; }  public void setCity(String city) {     this.city = city; }  public String getState() {     return state; }  public void setState(String state) {     this.state = state; }  @Override public String toString() {     return firstName + "," + lastName + "," + age + "," + email + "," + gender + "," + city + "," + state; }   }  I was able to put the objects into the hash map using the array list but I cannot make it work in the ascending order

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I have a standard LaTeX table and want to color a certain side of a cell, like I can do in Excel. Is there a way to do this?  Example of what I mean:    Thanks!

How can I change the color of the lines (the frame) in a tabular environment? In the following MWE:  \begin{tabular}{c|c|c} a&b&c \\ \hline d&e&f \\ \hline g&h&i \end{tabular}   I would like the horizontal and vertical lines of the table to have, say a blue color.


states: any differentiable symmetry of the action of a physical system has a corresponding conservation law. Is this statement invertible? I mean, if a conservation law exists, this implies there is a differentiable symmetry in the action?

states that any differentiable symmetry of the action of a physical system has a corresponding conservation law.  Is the converse true: Any conservation law of a physical system has a differentiable symmetry of its action?


I was kind of dismayed last week when the news outlets reported the dropping of "the so-called 'Mother of All Bombs'." They were quick to point out the official name was "Massive Ordinance Air Blast," but that almost seems like an acronym some pencil-pusher came up with after it was already unofficially called the Mother of All Bombs. It's just a terrible nickname for such a frightening weapon. (It put me in mind of "Big Bertha" -- what is it with big bombs being female?)  Anyway, I read an article somewhere saying that the phrase "Mother of all __" became wildly popular after Saddam Hussein used the phrase "mother of all battles" in a speech he gave in the 90's (referring to his war vs. the United States), and that he probably got the phrase from its usage in the Quran. So I tried to google "quran mother of all" but did not come up with any results. Does anyone know if this phrase is actually used in the Quran, and if there were any other significant usages in the 90's?  I can think of similar usages with "daddy" and especially "grandaddy" -- but not "grandmommy" or "grandmother."

The  popular idiomatic expression  (something) means:         an extreme example of something. Donny's car crash was the mother of all crashes. Hundreds will travel to Stonehenge, the mother of all places to celebrate the longest day of the year.      From: Cambridge Dictionary of American Idioms   It appears that it was originated during a famous speech by the president of Iraq in 1991:  :         Calque from Arabic; popularized in 1991 after its use by Saddam Hussein, then president of Iraq, in reference to the Gulf War as ام المعارك (umm al-ma‘ārik, “mother of battles”).      From: Wiktionary   shows earlier usages  but was the phrase commonly used before 1991, and if not, what alternative idiomatic expression, if any,  was used to convey the same concept?


I'm trying to log all exceptions in a xml file, so what I did is create a UnhandledException method that will be calling every time an exception is generated, a little example:  public MainWindow() {     AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledExceptionTrapper);      InitializeComponent();     throw new Exception("this is an example"); }  public static void UnhandledExceptionTrapper(object sender, UnhandledExceptionEventArgs e) {      Console.WriteLine(e.ExceptionObject.ToString()); //Here there is breakpoint     Environment.Exit(1); }   Now the problem is that the method UnhandledExceptionTrapper is called only when an exception happen inside the main thread, infact I execute all the main methods inside different Tasks, an example:   Task.Factory.StartNew(() =>  {      //heavy operations      foo();  })  .ContinueWith((prevTask) =>  {      //final operations  });   now when an exception happen in foo() for example:  public void Foo() {     throw new Exception("another example"); }   the method UnhandledExceptionTrapper it's not called.  On the official documentation:     Occurs when an exception is not caught.   I don't understand if this working on all application (also task), or just main thread.  Thanks for any explaination.

I wanted to set some handler for all the unexpected exceptions that I might not have caught inside my code. In Program.Main() I used the following code:  AppDomain.CurrentDomain.UnhandledException     += new UnhandledExceptionEventHandler(ErrorHandler.HandleException);   But it didn't work as I expected. When I started the application in debugging mode and threw an exception it did call the handler, but afterwards the exception helper in Visual Studio popped up as if the exception occurred without any handling. I tried Application.Exit() inside the handler but it didn't work as well.  What I would like to achieve is that the exception is handled with my handler and then the application closes nicely. Is there any other way to do it or am I using the code above in the wrong way?


This question is essentially the same as , but I have fewer "known" results. (Specifically, the linked Q/A proves that $A^{\perp\perp}=\overline{A}$ for a linear subspace $A$, assuming that $A^{\perp\perp}=A$ for closed $A$ is already known. As far as I'm concerned that's just another way to phrase the problem.)     Prove: If $V$ is an inner product space over $\Bbb C$ and $A$ is a linear subspace of $V$, then the topological closure $\overline{A}$ is equal to the double orthocomplement $A^{\perp\perp}$. Equivalently, if $A$ is a closed subspace, then $A^{\perp\perp}=A$.   To recap the definitions: $A^\perp=\{x\in V:\forall y\in A,\langle x,y\rangle=0\}$, while $\overline{A}$ is the topological closure induced by the norm $||x||=\sqrt{\langle x,x\rangle}$.  The converse to this, $A^\perp$ is closed, is a simple application of continuity of the inner product operation; from this we can deduce $\overline{A^\perp}=A^\perp$ and one half of the goal: $\overline{A}\subseteq A^{\perp\perp}$. I have also managed to prove $\overline{A}^\perp=A^\perp$ by another continuity argument.  If we additionally assume that $V$ is complete (i.e. a Hilbert space) and use the projection theorem (if $A$ is closed then $V=A+A^\perp$), we can write $V=\overline{A}+A^\perp$, so that given $x\in A^{\perp\perp}$ we can decompose $x=u+v$ for $u\in \overline{A},v\in A^\perp$; then $0=\langle x,v\rangle=\langle u,v\rangle+\langle v,v\rangle=|v|^2$, so $v=0$ and $x\in\overline{A}$ as desired.

I am looking for an example such that in a pre-Hilbert space $H$ we have for a subspace $U$ that  (i) $\bar{U} \oplus U^\perp \neq H$  (ii) $ \bar{U} \neq U^{\perp \perp}$  Since finite and closed subspaces will probably not do it, I am not good at inventing nice examples. Does anybody here have a few at hand?


I'm a 1-2 man band at work, and so far I've been using VSS for two reasons 1) the company was using that when I started a few months ago, and 2) it is friendly with Visual Studio.  Needless to say, I would very much like to upgrade to a not-so-archaic source control system.  However, I don't want to give up the friendliness with Visual Studio, and I'd like to be able to migrate the existing codebase over to a better source control system.  I can't imagine I'm the only person in this situation.  Does anyone have a success story they wouldn't mind sharing?

I've been programming for 10+ years now for the same employer and only source code control we've ever used is VSS. (Sorry - That's what they had when I started). There's only ever been a few of us; two right now and we usually work alone, so VSS has worked ok for us. So, I have two questions: 1) Should we switch to something else like subversion, git, TFS, etc what exactly and why (please)? 2) Am I beyond all hope and destined to eternal damnation because VSS has corrupted me (as Jeff says) ?  Wow - thanks for all the great responses!   It sounds like I should clearify a few things. We are a MS shop (Gold parntner) and we mostly do VB, ASP.NET, SQL Server, sharepoint & Biztalk work. I have CS degree so I've done x86 assembly C, C++ on DEC Unix and Slackware Linux in a "time out of mind" ...         My concern with VSS is that now I'm working over a VPN a lot more and VSS's performance sux and I'm afraid that our 10+ y/o version 5 VSS database is going to get hoosed... There's the LAN service that's supposed to speed things up, but Ive never used it and I'm not sure it helps with corruption - has anyone used the VSS LAN service? (new with VSS 2005)


In  Jeff exclaimed:      Brock, this is GENIUS! I am hereby using my super-upvote on this   feature-request:      Close votes (and probably reopen votes) only expire after all of these   conditions are met:      4 days have passed since the last close vote.      The question has more than 100 views.   This has left us with a little bit of a mess:     The review path now has a new a tab that can help you cut through these questions and help us clean up some of the mess.     I find that having such a huge backlog, makes it very hard to properly deal with closures.   What steps or system changes can we make to get the huge close backlog on Stack Overflow, under control?  Keep in mind, now we keep track of the user ids who "reviewed" the various questions.

Today, the size of the close-votes queue is 55k questions and growing. Is that a problem?   Which action could be taken to clean it up? It seems to be growing faster than Stack Overflow members are capable to handle it.


I'm having a problem running a query and just wondering can someone point out my problem. I think I know what's causing it but not sure how to resolve it.  I have a JSON and am trying to put it into a MySQL database. The database fields are arrange in the same order as the fields in the JSON.  I am getting the error Column not found: 1054 Unknown column '-' in 'field list' when I delimit the JSON fields with ``` (accent grave, I think?). When I replace the delimiter with a standard ' I get the following error Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near because of of my entries has an ' in it.  Not sure how to fix it because the first option seems to be my preferred solution as one entry from 99 has an ' in the field value.  Code so far...  I attempted to solve the problem by using the str_replace function as an interim but I'm sure there's a better way.  <?php  $data = file_get_contents('JSON DATA');  $array = json_decode($data, true); $rows = array();     print_r ($array['results']);  foreach($array['results'] as $result){     foreach ($result as $key => $value)         $rows[$i][] = "'" . $value . "'";         $i++; }  $hostname = '';                 // write the rest of your query $database = ''; $username = ''; $password = '';  try{     $dbh = new PDO("mysql:host=localhost;dbname=dbname", $username, $password);     $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);      $stmt = $dbh->exec("TRUNCATE TABLE `import_io`");      $index = 0;      foreach ($rows as $row) {         $row = implode(",",$row); //making a string from an array with each item separated by comma         $row = str_replace ("O'Meara","O\'Meara",$row);         //print_r ($array['results'][$index]);         echo ('
');         $query = "INSERT INTO import_io (`total`, `thru`, `strokes`, `name`, `name/_text`, `name/_source`) VALUES ($row)";         print_r ($query);         echo('
');         $count = $dbh->prepare($query);         $count->execute();         $index++;     }      $change_par = "UPDATE `dbname`.`import_io` SET `total` = REPLACE(`total`, 'E', '0') WHERE `total` LIKE 'E'";     $count = $dbh->prepare($change_par);     $count->execute();      $change_dash = "UPDATE `dbname`.`import_io` SET `total` = REPLACE(`total`, '-', '0') WHERE `total` LIKE '-'";     $count = $dbh->prepare($change_dash);     $count->execute();      $dbh = null;// close the database connection }catch(PDOException $e){     echo $e->getMessage(); }  ?>

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


I've got a Samsung Q1 attached to my computer, and I was hoping to use the FileInfo / DirectoryInfo objects to access the file on the device, however what I right click on a file in windows explorer I get a location of COMPUTER/Q1/DATACASTS/mine.mp3, and when I feed this into the DirectoryInfo object I get "Invalid network drive"  Something tells me I'm going about this the wrong way ... Is there a differant object I shoud use, or is my location string incorrect in format  Thanks in advance

How can I discover any USB storage devices and/or CD/DVD writers available at a given time (using C# .Net2.0).  I would like to present users with a choice of devices onto which a file can be stored for physically removal - i.e. not the hard drive.


I'm new to circuit analysis and I'm stuck on this question. My question is: What could I do, or what steps should I take to solve this kind of circuit?    What the question asks is basically the current going through resistor $R_2$, using nodal current analysis just gives me a bunch of equations and I can't use voltage analysis, finally I tried to do the equivalent resistance using the Wye-Delta transformation of the circuit and find that overall node is subject to a voltage of $45 \;\text{V}$ but what do I do with that?

What's the equivalent resistance in this circuit (between points A and B)?


I am switching an existing file on Overleaf from BibTeX to BibLaTeX.  I have .bib files in the folder with the file (imported from JabRef) which worked just fine with BibTeX.  For some reason, BibLaTeX is not loading them; in other words, it does not recognize any of the bibtex keys cited in the text.  My format is: \addbibresource{filename1.bib,filename2.bib}  Anyone know why this isn't working?  I have found people talking about stuff like biber, which I don't really understand.  And I can't see how to do that kind of thing in Overleaf.  I tried adding [backend=biber] to the package line but that didn't change anything. Thank you! P.S. I am switching because I would like to have abbreviated reference lists as described here:  UPDATE: Following @DavidCarlisle's point, I now have the format: \addbibresource{filename1.bib} \addbibresource{filename2.bib}  Surprisingly, the bibtex keys in the text are still not recognized. The error message reads, "Package biblatex Warning: Please (re)run Biber on the file: output and rerun LaTeX afterwards." I thought I would provide this update, but moewe has kindly helped me solve my end goal (mentioned as P.S. above) in a different way:

I would like to use multiple .bib files for my article, such as file1.bib, file2.bib. However, I would like my references not to be separated (such as "Primary sources", "Secondary sources", etc.). These bibliographies just need to be merged into one. One way to do this is to copy-paste these .bib files into one .bib file, and this would solve the problem. However, I would like to keep it split into several .bib files, by topic (file1.bib contains articles on topic1, file2.bib contains articles on topic2, and so on). I tried to do \bibliographystyle{alpha}  \bibliography{file1} \bibliography{file2}  but this just gives me the same bibliography twice!


I have the following script which I use for calculating the score  public class Score : MonoBehaviour {      Score sc;      void Start()     {         GameObject obj = GameObject.Find("ScoreSystem");         sc = obj.GetComponent<Score>();      }      void OnTriggerEnter2D(Collider2D coll)     {         if (coll.tag == "Ball")         {             sc.score++;         }     } }   and this is the class where I increase the value  public class Score : MonoBehaviour {      public int score;      void Start()     {         score = 0;     }  }   But the problem I have is that the value always stays 0 when I switch to a different scene. I even used this code to store the value and display in the next scene but it didn't work  void Update() {     PlayerPrefs.SetInt("score", score);     PlayerPrefs.Save(); }   and this code for taking the value   score = PlayerPrefs.GetInt("score");   How can I store the latest value inside an Int and display it in the next scene and when I leave that scene it reverts back to 0?

I am developing my first 2D game in Unity and I have come across what seems an important question.  How do I handle data between scenes?  There seems to be different answers to this:   Someone mention using , while other people told me this should be used to store other things like screen brightness and so on. Someone told me that the best way was to make sure to write everything into a savegame everytime that I changed scenes, and to make sure that when the new scene loads, get the info from the savegame again. This seemed to me wasteful in performance. Was I wrong? The other solution, which is the one I have implemented so far is to have a global game object that isn't destroyed between scenes, handling all the data between scenes. So when the game starts, I load a Start Scene where this object is loaded. After this ends, it loads the first real game scene, usually a main menu.   This is my implementation:  using UnityEngine; using UnityEngine.UI; using System.Collections;  public class GameController : MonoBehaviour {      // Make global     public static GameController Instance {         get;         set;     }      void Awake () {         DontDestroyOnLoad (transform.gameObject);         Instance = this;     }      void Start() {         //Load first game scene (probably main menu)         Application.LoadLevel(2);     }      // Data persisted between scenes     public int exp = 0;     public int armor = 0;     public int weapon = 0;     //... }   This object can be handled on my other classes like this:  private GameController gameController = GameController.Instance;   While this has worked so far, it presents me with one big problem: If I want to load directly a scene, let's say for instance the final level of the game, I can't load it directly, since that scene does not contain this global game object.  Am I handling this problem the wrong way? Are there better practices for this kind of challenge? I would love to hear your opinions, thoughts and suggestions on this issue.  Thanks


I was wondering how I can install the adobe flashplayer from this site:   I have no experience with the formats that are available there.  There is no .deb version of it there and I need the flashplayer for Opera.  Thanks

I have problem with Adobe Flash Player. While using Opera, few of pages show me that I don't have flash installed. When I run this command in terminal:    sudo apt-get install flashplugin-installer,    I get information that it's already installed. So I try to use this page  to install flash. When I want to install version for Ubuntu, I get internal error in /usr/bin/apturl-gtk with message:    apturl-gtk crashed with AttributeError in doEnableChannel(): module 'apt_pkg' has no attribute 'Config'    I also tried to install it manually in Opera Web Browser using this tutorial  but this method also failed. Any help?


The class sticked is adding when you scroll on top. If you scroll far many small miniatures are appearing to right. So there are two questions:    Why not all element react on hover by adding class test? How to add class test on next sticked class?     $(window).scroll(function() {    $('.text-layer').each(function(i) {      $window = $(window);     var increase = i * 50     var newHeight = $(".text-layer").outerHeight();     var newWidth = $(".text-layer").outerWidth();     var distance = $(this).parent().offset().top + newHeight      if ($window.scrollTop() >= distance) {       $(this).addClass('sticked').css("transform", "translate(100%," + increase + "px) scale(.8)");       $(this).parent().css({"height": newHeight, "width": newWidth });       checkit()     }      if ($window.scrollTop() <= distance) {       $(this).removeClass('sticked').css("transform", "translate(0px, 0px)");     }   });  });  function checkit() {   $('.text-layer.sticked').hover(function() {       $(this).toggleClass('test')  }) }

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.


This question has two parts, one feature request, and one discussion related item. Feature Request Can we have a statistic available that tells us how often we show up in searches compared to other candidates?  Specifically, I know that I show up in about 10% of the searches done by Employers; but I want to compare that percentage against other candidates. The reasoning is if I have a lower percentage, then I know that I'm 'doing it wrong', and I have hard numbers to prove that. It would also help to know how often employers are searching certain items (say the 'trending' programming language; which language is on the rise, etc). I realize TIOBE  on language popularity; but it isn't really 'local' enough to be useful. Discussion What other statistics would you like to see for Careers? What metrics would be helpful to you in measuring the effectiveness of your CV?

Just thinking down the road to when Careers is accepting employer signups, I think it'd be a really great promotion and informational view to be able to see what types of tags and searches companies are doing.  For example, I think it'd be valuable during the signup process for prospective job-seekers to see:   65% of employers are searching for C# 22% of employers are searching for Java and Spring etc.   I think having some level of visibility into what employers are actually searching for (at an aggregate level) might help the job-seekers know what exactly it is that employers are currently looking for, and how they can better market themselves to those interests - although I suppose the argument could be made that the type of developer that SO Careers is targeting shouldn't need to do that sort of thing.  I just think it'd be great for paid users to be able to see some level of details as to how employers are using the system, so they can tell if they are getting any value for their registration cost.


I have an internal hard drive formatted as NTFS as a shared storage space between Linux and Microsoft with a duel boot setup, but Linux says is a read only file system and refuses to let me use it.  Being root makes no difference. I can read the contents, but nothing else.

At some point, the filesystem on my digital audio player has become read-only. I cannot copy files into it or remove files on it.  Are there some possible reasons for the player's file system to change permissions in this way?  I tried using chmod:  $ sudo chmod a+rw SGTL\ MSCN/  chmod: changing permissions of `SGTL MSCN/': Read-only file system   SGTL MSCN is the mount point of the digital audio player.  What else can I try to make it writeable?


Suppose a car is negotiating a bend on a smooth road and it starts to slip away. What is the force acting on the car causing it to slip away? I know that the centrifugal force is fictitious. Since the road is smooth, we can neglect the centripetal force created by the friction. So what causes the slipping of the car if the centrifugal force is fictitious?

I know what centrifugal force is, but how does it work? Why are things forced to the outside?


Could you please give me hint or sample code for restricting access to website to only specific IP addresses using no more or less than JS / jQuery?  I found a lot of examples for other methods like htaccess or so, but not for JS

I need to somehow retrieve the client's IP address using JavaScript; no server side code, not even SSI.  However, I'm not against using a free 3rd party script/service.


is there any proof for the sum of cubes except induction supposition? there are some proofs using induction in below page

I want to know different proofs for the following formulas,  $$ \sum_{i=1}^n{i^2} = \frac{(n)(n+1)(2n+1)}{6} $$  $$ \sum_{i=1}^n{i^3} = \frac{n^2(n+1)^2}{2^2} $$  Please do not mark this as duplicate, since what I specifically want is to be exposed to a variety of proofs using different techniques (I did not find such a compilation anywhere on the net)  I am only familiar with two proofs, one which uses expansion of $(x+1)^2 - x^2$ and $(x+1)^3 - x^3$ and the other which uses induction. I have provided link for the induction proof in a self-answer.  I am particularly interested in proof without words and proofs which use a unrelated mathematical concept (higher level math upto class 12 level is acceptable).   Also,   (1) Don't think I am being rude or anything, it is out of genuine interest that I am asking this question.  (2) Someone marked this as a duplicate of   My question is different in three ways:  (i) I want to focus only on these two summation and not the general case,  (ii) Hence, it follows that the proofs which I am looking for a simpler than the ones provided in that link and are simpler (using images, pictures or high school algebra). What I want is to study new proofs. I believe it is a good practice when learning math to so this.  (iii) Since the proofs in the link are given for the general case, they are complicated and I am finding it hard to understand them. If someone is able to use the same method to the two cases in my question, then it would probably become much simpler and easier to digest.  Appendix  Feel free to make use of these topics in your answers,   Calculus  Basic Binomial Expansion  Coordinate Geometry  Algebra (upto what 18 year olds learn)  Taylor Series Expansions  Geometry (18 year old level)  basically.............math which 18 year old's learn on Earth.   If you want to err, then err on the higher math side:)     Answers Compilation List         By Newton series   By Sterling Numbers   By Induction   From the book Generatingfunctionology by Herbert Wilf   By generalizing the following pattern   $$\begin{align} &\ \,4\cdot5\cdot6\cdot7\\=&(1\cdot2\cdot3\cdot4+2\cdot3\cdot4\cdot5+3\cdot4\cdot5\cdot6+4\cdot5\cdot6\cdot7)\\-&(0\cdot1\cdot2\cdot3+1\cdot2\cdot3\cdot4+2\cdot3\cdot4\cdot5+3\cdot4\cdot5\cdot6)\\ =&(1\cdot2\cdot3\cdot4+2\cdot3\cdot4\cdot4+3\cdot4\cdot5\cdot4+4\cdot5\cdot6\cdot4)\\ \end{align}$$   By Lagrangian Interpolation   By Formal Differentiation   By the Euler-Maclaurin Summation Formula   By Assuming that the expression is a polynomial of degree $2$.   A Proof Without Words for the cube case   By integrating and assuming a error term.   SimplyBeatifulArt's Personal Approach


My baby girl has completed 5 months yesterday. She doesn't have good head control. And I am worried. When I lift her in my arms, she does not control her head and leans backward from waist. Plz to reply for this:-)

I have a 4-month old daughter.  Each time she is awake she gets some "tummy-time" where we put her on her stomach on a play-mat, to build up her neck muscles.  She doesn't like it that much and usually ends up crying after a few minutes of this.  Also, when we hold her so she is facing us, against our chest, she often jerks her head back like she doesn't enjoy being held that way.  While we have noticed her neck support getting stronger, there's still a small amount of wobble there and we have to support it.  At what age should we expect her to be able to support her head without any support?  Is there any other exercises other than tummy-time we can do to improve her strength?  Update  My daughter will be 5 months in about a week's time and we have noticed a big improvement in her head control/strength over the past few weeks.  I would say she has about 90% head control now.  Thanks for all of your great answers!


I have a directory of songs all of which are from the same singer. I want to rename all the files in the directory as:  SingerName(1) SingerName(2) SingerName(3) ...   Just like we could do in Windows by selecting files and pressing F2 or clicking on rename in the right-click menu for the selected files.  But this does not seem to work in Ubuntu 12.04! How can I rename a group of files?

I need to rename a bunch of files in order to fix their sort order, therefore I need to be able to do a sort of "find and replace" so I can replace chunks of the filenames at a time.  What tools should I use? I prefer GUI but a command line tool recommendation would also be fine.


I wanted to know more about the different methods for comparing the similarities of two probability distributions P and Q.  I wanted a list of the different methods that exist for comparing probability distributions.  For example, the two that I am aware that exist are:   KL-Divergence EMD (earths mover's distance)   I was wondering if people knew about more different measures and if they could provide maybe a good reference for learning about it. Also, on top of providing the distance measure that you are suggesting, if you could provide a brief intuition on it before I research it more, it could be very helpful!

Let $(S,d)$ be a metric space and let $\mathcal P(S)$ denote the space of Borel probability measures on $S$ endowed with the  $\pi:\mathcal P(S)\times \mathcal P(S)\to \mathbb R_+$ given by $$   \pi(P,Q):=\inf\{\varepsilon\geq 0:P(F)\leq Q(F^\varepsilon)+\varepsilon \text{ for all closed } F\subset S\} $$ where the $\varepsilon$-inflation of a set is given by  $  F^{\varepsilon} = \{x\in S:d(x,F)<\varepsilon\}.$  Another useful metric on $\mathcal P(S)$ is induced by the total variation norm, i.e.  $$   \rho(P,Q):=\sup\limits_{A\in \mathfrak B(S)}|P(A) - Q(A)| $$ where $\mathfrak B(S)$ is the Borel $\sigma$-algebra on $(S,d)$. I wonder if there are any interesting relations between these two metrics, $\pi$ and $\rho$. In particular, I know that convergence in $\rho$ implies the weak convergence and hence if $S$ is separable than it implies the convergence in $\pi$.   I wonder, however, if under some additional assumptions it is possible to derive some non-trivial bounds on $\rho$ if I know upper bounds on $\pi$. Or at least, if it is possible to upper-bound $|P(F) - Q(F)|$ for closed $F$ using $\pi$.


We know that different parallel universes- if they truly exist - are governed by different sets of laws. But, Could there be a parallel universe that is moving back in time(?) - in different direction the flow of time in our universe?

I was trying to think but cannot figure it out. For instance, if the interaction is small, for instance limited to a windows, the observers in each universe will see that the other goes in reverse. But what if they can start a more meaningful interaction? (for instance, if one observer crosses the window and moves to the other universe, will anything change? why and how fast? (at least at the beginning his thinking will move in the same time arrow than in his universe, but the physical processes around him will still violate the second law?


I know I must have toggled something but for the life of me I can't figure it out. In this one Blender file any time I make a curve and go into Edit mode I cannot adjust the handles of the curve. The handles are there but whatever point I click on(be it vertex or handle) and try to move it, the whole curve moves. However if I open up a different or new project the curve handles work just fine and I can change the shape of the curve with ease. I can't seem to find the solution anywhere. If someone could help be I would truly appreciate it.

My problem is that I sometimes lose the ability to independently translate or otherwise transform any parts of a single mesh. If I try, for example, to just translate several faces, edges, or vertices, then the entire mesh will stretch and displace itself in order to follow the translation. Or, alternatively, if I try to translate just one face then the whole mesh will move as if I'm translating in Object Mode.  I'm not really sure I know how to describe this problem properly. I don't even know how to reliably reproduce it. It seems to happen to any given mesh at random, and it doesn't stop happening to that mesh unless I delete and remake it.  I assume that I must be doing something wrong to cause this to happen. Does anyone have any ideas? Thanks.


I know that the angular velocity vector $\vec{\omega}$ points towards the axis of the circular motion and there is a formula  $$\vec{v}=\vec{\omega} \times \vec{r}$$  I want to know the origin of this formula which governs the direction of $\vec{\omega}$.  And why only this direction, why not the opposite direction?  Is it purely convention or is there some logic behind this?

In classical mechanics with 3 space dimensions the orbital angular momentum is defined as  $$\mathbf{L} = \mathbf{r} \times \mathbf{p}.$$  In relativistic mechanics we have the 4-vectors $x^{\mu}$ and $p^{\mu}$, but the cross product in only defined for 3 dimensions. So how to define orbital angular momentum e.g. in special relativity in terms of 4-vectors? Or more generally in $d$ dimensions?


A wizard is fighting with his bladesong active and decides to cast polymorph upon himself.  Will bladesong still be active in the new form (let’s take a giant ape for example)?

More specifically I'm trying to understand if a Barbarian who has been polymorphed, either willingly or not would be able to . However this also applies to things such as , or , anything a player might want to continue to use while no longer themselves.  Many questions specify you're able to rage while Wild Shaped, as  specifies      You retain the benefit of any features from your class, race, or other source and can use them if the new form is physically capable of doing so.   However,  specifies the following,     The target's game statistics, including mental ability scores, are replaced by the statistics of the chosen beast. It retains it's alignment and personality.   And     The creature is limited in the actions it can perform by the nature of its new form.   Unlike Wild Shape, nowhere does polymorph specify that you retain benefits from your class or race. Does this imply that class abilities do not carry over to polymorphed individuals?


This is Exercise 3.36 of Roman's "Fundamentals of Group Theory: an Advanced Approach". According to , it is new to MSE. The Details: Neither semidirect products nor presentations are covered in the book so far.  Definition: The commutator subgroup or derived subgroup $G'$ of a group $G$ is the subgroup of $G$ generated by all commutators $$[a,b]:=aba^{-1}b^{-1}$$ (for $a,b\in G$). A group $G$ is perfect if $G=G'$.  The Question:  If $G$ is a finite group of odd order, then the product of all its elements, in any order, is an element of the commutator subgroup $G'$.  Thoughts: If $G$ is abelian, then $$\prod_{g\in G}g=e\in G'$$ trivially. If $G$ is perfect, there is nothing to prove. By Lagrange's Theorem, $G$ has no involutions, so there are no elements $x\in G$ such that $x=x^{-1}$. Putting the identity to one side, then, elements come in pairs: $y$ and $y^{-1}$. Let's separate $G$ into any $\frac{n-1}{2}$ elements $g$ in a set $P$; and their inverses $g^{-1}$, a set $N$. Note that $P\cap N=\varnothing$. Now one product of all elements of $G$ is of the form $$e\left(\prod_{g\in P}gg^{-1}\right)=e\in G',$$ for any order of the elements of $P$. So much for the theoretical approach . . .  Consider when $G=\Bbb Z_7\rtimes \Bbb Z_3$, given by the presentation $$\langle a,b\mid  a^7, b^3, bab^{-1}=a^4\rangle,$$ which I believe to be the smallest, nonabelian group of odd order, according to . Here $G'\cong \Bbb Z_7$, again, according to . The elements of $G$ are of the form $a^ib^j$ for $i\in \{0,\dots, 6\}$ and $j\in\{0,1,2\}$. Again, taking the identity aside, there is, essentially, up to $20!$ different products of all elements of $G$; there might be subtleties that lower that upper bound, but still: it's a lot: that's what I'm getting at. Consider $[a^{\alpha_1}b^{\beta_1}, a^{\alpha_2}b^{\beta_2}].$ This is looks like it would be messy to compute in abstraction. There ought to be a slick way of doing this. Please help :)

Yesterday, through working on a question , Don antonio brought out a nice question within the comments:     The product of all the elements in an odd order group $G$ is always contained in the group's derived subgroup $G'$.   Honestly, I tried to link some facts for proving that but, they didn't work. Thanks for any hint for that.


According to genome.gov, .  I understand that the main reason parents and children have different genomes is because of random mixing of 2 genomes, but that there are also very small differences caused by random mutations.  If all of a person's cells have identical genomes, then does that mean that random mutations only occur in gametes?  I also understand that if sunlight hits my arm, it can cause random mutations.  So do all cells in a person's body really have the same DNA?

If different but in tact molecules of DNA were extracted from my body, for example hair sample, blood sample, and mouth swab, how much variation would there be between DNA molecules?


How to prove that for L not $0$, if the limit as $x$ goes to infinity of $f(x)$ is $L$, then the limit as $x$ goes to infinity of $\frac{1}{f(x)}=\frac{1}{L}$  I am unsure how to present this proof, and furthermore I am unsure of its validity:

Let $g$ be continuous on the interval $[a, b]$, and a $< c < b$ with $g_{(c)}<0$  Prove, using the epsilon and delta characterisation of a limit, that $\lim\limits_{x \to {c}}\frac{1}{g{(x)}} = \frac{1}{g{(c)}}$ Hence deduce that $\frac{1}{g}$ is continuous at $c$  I know that there exists $g {(x}$) smaller than $\frac{g {(c)}}{2} < 0$ and I can use this information somehow but other than that I am not sure how to approach this question. Is there any special laws I need to follow?


Linked to this question:  I understand that I can form an output file by using: python3 script.py > output.txt  However, I also want to see the output being generated by the python file while it is being saved to output. Is there a simple way to do this on the command line?

My aim is to log all output from a script into a directory that the script is going to create.  For example, I have:  ~/.abc.sh:  #! /bin/bash rails new myapp   When I run...  cd ~/code . ~/.abc.sh   ...that will create a new Rails app in directory ~/code/myapp.  When Rails is creating an app, it outputs a whole lot of text that I want to capture and store in a log file in the same directory the rails command newly created. I also want to display that text in the terminal as well.  How do I go about doing this?


I'm using dual boot: Ubuntu 17.10 along with Windows 7. Recently I'm facing an issue when I want to boot Ubuntu. It shows: "UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY". I run fsck /dev/sda6 But it does not work. Can anyone tell me how can I fix that issue?  Thanks

I dual boot Ubuntu and Windows 7. I was browsing on FireFox in Ubuntu and all of a sudden I get some error message, so I rebooted.  Now when I try to boot into Ubuntu I get this message:  fsck from util-linux 2.26.2 /dev/sda6 contains a file system with errors, check forced. /dev/sda6: Inodes that were part of a corrupted orphan linked list found.  /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.         (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda6 requires a manual fsck  Busybox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs) _   How can I fix this?


$0<p<1$   $\sum_{k=1}^{\infty} k (1 - p)^{k-1}$  How'd I go by calculating this?

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?$$


Does Ubuntu update software packages like KeePassXC in LTS versions or does LTS mean I keep the version that was current when the LTS was released?  I installed KeePassXC on Ubuntu 18.04 LTS. I don't recall now what version of KeePassXC it was when I first installed it, but as of today it's 2.3.1. The most up-to-date version is now 2.4.1. I understand I can get updates by Snap and PPA, but I'm curious if a normal Ubuntu software update will eventually update KeePassXC or whether it remains static throughout the LTS period.  Edited to add: I understand now from the responses that the software packages were frozen to the time of release and that normally they will remain static and not be updated with the normal "Check for software updates." Does this static approach hold true for "apt-get"-type approaches, or can I get updates that way, eventually? I note from the source code link that KeePassXC 2.3.1 is still the source, but don't understand if I can "force" an update outside of Snap or PPA.  Further edited as possible duplicate: The basic question was essentially a duplicate, but my first edit took it further - "as the repositories change, can I then "apt-get" an updated version. It appears the answer is "no, not safely."

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


Let $f: \Bbb R^2 \to \Bbb R^2$ be a continuous function such that $|f(x) - x| < 2017 \space$ $\forall$ $x\in \Bbb R^2$. prove that $f$ is surjective.     please help me prove this statement. thank you very much.

Let $f:\mathbb{R}^2\to\mathbb{R}^2$ be a continuous map such that $\forall \ x : |x-f(x)|<5777$.   Show that $f$ is surjective.


e.g. query is   SELECT `username`, `uid`,`email` from profile  and `id`='0';   and   SELECT username, uid,email from profile  and id='0';   both will yeild same result. so why we should use or not use ` in mysql query.

After reading a couple of answers and comments on some SQL questions here, and also hearing that a friend of mine works at a place which has a policy which bans them, I'm wondering if there's anything wrong with using backticks around field names in MySQL.  That is:  SELECT `id`, `name`, `anotherfield` ... -- vs -- SELECT id, name, anotherfield ...


When Azkaban is broken open, the Lestranges will be honored beyond their dreams. The Dementors will join us ... they are our natural allies ... we will recall the banished giants ... I shall have all my devoted servants returned to me, and an army of creatures whom all fear ....   (Harry Potter and the Goblet of Fire, Chapter 33, The Death Eaters)  There is a perfectly good out of universe reason why Dementors should be allies with the death eaters — no dark lord deserving his title is without an army of nightmarish creatures at his command, and Dementors are set up as being more nightmarish than most.  But, in universe, is there any particular reason why the Dementors and Death Eaters should align so closely?

It's quite popularly stated that Snape was the only Death Eater capable of creating a Patronus (due to his love for Lily). Also, a Patronus is the only weapon against Dementors.  How do Death Eaters (except Snape of course) fight against Dementors? Do they just die after encountering Dementors as there's no other option?  Or, do Dementors just not attack Death Eaters because there's nothing to feed on?


I am creating lecture notes, and I want to use a few characters in the left-hand margin to denote:   Q a question for the students PROB a problem I work out DEMO a demonstration.   While \marginpar gives my desired effect in the right-hand margin, \reversemarginpar does not place the text in the left-hand margin but but simply left-justifies it.  How can I get text protruding into the left-hand margin?  \documentclass{article} \usepackage{marginnote} \setlength{\parindent}{0cm} % No indentations -- just to be sure \begin{document} Using marginpar.  \marginpar{Q:}How many $in^2$ in a $yd^2$?  Good, we see Q: on the right hand side. Now lets see if we can get it on the Left Hand Side (LHS) by using reversemarginnote.  \reversemarginpar{Q:}How many $in^2$ in a $yd^2$?  While it is on the LHS, it doesn't penetrate the margin.  Hopefully marginnote will come through.  \marginnote{Q:}How many $in^2$ in a $yd^2$? \end{document}

I'm trying to make a left-sided margin note. As per the , I tried using \reversemarginpar but that didn't solve anything—it didn't make a margin note at all. I also tried \marginpar[left text/right text]{%my text} to no avail. I tried using two other packages, marginnote and mparhack, but again, those didn't solve my problem. Maybe there are some things I've missed (perhaps I have to further define something in the preamble?), but I would appreciate an example of how to use a margin note successfully. Here's some code I tried: \documentclass{article}  \usepackage{amssymb} \usepackage{wasysym} \usepackage[top=2cm, bottom=1.3cm, left=2.5cm, right=2.5cm]{geometry} \usepackage{tensor} \usepackage{enumitem} \usepackage{outlines} \usepackage{ulem}  \title{Chapter 13 - Chromosomal Rearrangements and Changes in Chromosome Number} \author{A. Uthor} \date{}  \pagestyle{empty}  \begin{document}   \maketitle    \section*{\Large Types:}   \begin{outline}[enumerate]   \1 Duplications   \1 Deletions   \1 Inversions   \1 Translocations   \end{outline}    \textbf{semisterility} $\rightarrow$ diminished fertility of translocation heterozygotes by at least 50\%   \reversemarginpar{Why does Mendel's 2$\mathrm{^{nd}}$ require viability of offspring?} \end{document}


I want to ask about infinitesimals and non-standard analysis. In physics we always use $\mathrm dx,~\mathrm dv,~\mathrm dt$ etc. as infinitesimal quantities. When we deduce equations in physics, when we set up integrals and in many other instances we use infinitesimals. For example in the first law of thermodynamics we have: $đQ=\mathrm dU+đW$.  Now when we ask teachers about what is $đQ$ here, they say it is an infinitesimal amount of thermal energy. So my question is, is it necessary to treat the whole non-standard analysis as an axiom for physics or do we have standard calculus explanation for physicist's use of $\mathrm dy/\mathrm dx$ as a quotient in all cases?

In my Calculus class, my math teacher said that differentials such as $dx$ are not numbers, and should not be treated as such.  In my physics class, it seems like we treat differentials exactly like numbers, and my physics teacher even said that they are in essence very small numbers.   Can someone give me an explanation which satisfies both classes, or do I just have to accept that the differentials are treated differently in different courses?  P.S. I took Calculus 2 so please try to keep the answers around that level.  P.S.S. Feel free to edit the tags if you think it is appropriate.


the java subSequence is clearly true but only returns the false value. why? trying to see if a sequence is equal to a subsequence of a bigger string  package testifthen;   public class TestIfThen {      public static void main(String[] args) { String result = "01900287491234567489"; String result1 = "90028749";   if (result.subSequence(2, 10) == result1) {         System.out.println("excel");     }else {         System.out.println("not found");  }   }}

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


I´m making bigwork-096.tex  The source of that file is  \begin{document}   This source is very big.\\   The name of this file is **????????** \end{document}   What I must type instead ??????  to obtain the PDF with this result  This source is very big.\ The name of this file is bigwork-096.tex

I am writing a package that saves information to an external file. I would like to name that file according to the source one; something like  foo.tex -> foo.bar But I cannot find any variable that contains 'foo'. I am pretty sure that there must be one because the table of contents is saved to foo.toc.  Any pointers?


I have a MacBook Pro (Retina, 13-inch, Late 2013) with the following specs:   2.4 GHz Intel Core i5 Processor;  8 GB 1600 MHz DDR3 Memory; and  Intel Iris 1536 MB Graphics.   I wanted to upgrade the Processor and Memory but having read some passages online, it seems as though I will be unable to do so.   Can anyone confirm this? Am I unable to upgrade my device?   If I can upgrade anything, what can I upgrade and how can I go about doing this?  Thank you in advance.

I'm thinking about upgrading the CPU in my MacBook Pro from its current  dual core processor to a  quad core processor.  Is there any reason why this wouldn't be a good idea? The socket, operating temperature, instruction set, wattage, and memory specifications match perfectly.  It's a summer 2012 production model, 13" unibody, FCPGA988 socket, 4GB DDR3 1600 MHz RAM (upgrading to 8GB shortly), with 10.8.3.


This question has been bothering me for a while: In calculating the standard deviation, why do we square the difference from the mean, as opposed to cubing the differences (and then taking the cube root at the end)? Is this just a random choice, since eventually you have to choose some exponent, and "2" was sufficient? Or is there a deeper mathematical reason?  Thanks in advance!

Let's take the numbers 0-10.  Their mean is 5, and the individual deviations from 5 are -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 And so the average (magnitude of) deviation from the mean is $30/11 \approx 2.72$.  However, this is not the standard deviation.  The standard deviation is $\sqrt{10} \approx 3.16$.  The first mean-deviation is a simpler and by far more intuitive definition of the "standard-deviation", so I'm sure it's the first definition statisticians worked with.  However, for some reason they decided to adopt the second definition instead.  What is the reasoning behind that decision?


I am writing a test class for the simple Apex class with SOQL query but I am getting following error while Run test.      System.QueryException: List has no rows for assignment to SObject   My Apex class is as below      public class OlympicReward_ProgressBar {      @AuraEnabled     public static Olympic_Rewards__c getOlympicReward_ProgressBar(){          Olympic_Rewards__c olr = [SELECT Id, Name, Reward_Bar__c,Agency_stat_code__c,Contest_period_production__c,Current_Reward_Level__c,Agency__c                                   from Olympic_Rewards__c                                   WHERE Agency__c IN                                   (SELECT AccountId From User Where Id = :UserInfo.getUserId()) LIMIT 1];         return olr;     } }   Test Class   @isTest private class TestOlympicReward_ProgressBar {     static testmethod void GetOlympicReward_ProgressBar(){          // Setup Integration User to run test         User integrationUser = TestDataUtils.findIntegrationUser();          System.runAs(integrationUser){              List<Account> agencyList = TestDataUtils.createAgencyDataForAgencyPlans(1);             system.debug('@@@ AgencyList Size: ' + agencyList.size());// Debug statement returns Size as 1               if(!agencyList.isEmpty()) {                 insert agencyList;             }              Account agency = agencyList.get(0);              System.debug('@@@ Agency Name' + agency.name); // Not Displaying in Debug log.             agency.Region__c = 'Illinois Regional Office';             agency.Marketing_Territory__c = 'IL Territory 1';             update agency;              System.debug('@@@ Agency Name' + agency.name); // Not Displaying in Debug log.              Olympic_Rewards__c olr = new Olympic_Rewards__c();             olr.Name = 'Test Olympic Reward';             olr.Agency__c = agency.Id;             Test.startTest();             insert olr;              Olympic_Rewards__c getOlpr = OlympicReward_ProgressBar.getOlympicReward_ProgressBar();             Test.stopTest();         }     }  }

To query a single record we have below two approach :  Approach 1. Assign record to a single Account variable as shown below:  Account accountToGet = [SELECT Name From Account where name = 'UniqueAccount' LIMIT 1];   With above line, it throws below error if no record founds : System.QueryException: List has no rows for assignment to SObject  Approach 2. Assign single record to a List variable as mention below :   List<Account> lstAccount = [SELECT Name From Account where name = 'Unknown Account'];    Even if SOQL returns no records, above line doesn't throws an error. We can use below line to avoid NULL errors.  if(!lstAccount.IsEmpty())     System.debug('No Error');   To handle NULL exception in Approach 1, we need to handle NULL exception in try....catch. It looks like an approach where we will error to occur and then handle it in try....catch.  With Approach 2, we can avoid exception to occur and without using try..catch.. also the code will work.  Based on above approaches, I think approach 2 is fine to prevent errors. Can anyone give me suggestion that why should not we use approach 2?


I want to add an eventListener to a div that I create dynamically. However, it does not apply to the div when I inspect it in Chrome. This is what I do:  var div = document.createElement('div'); div.addEventListener('click', function(evt) {   console.log('test'); });  var root = document.getElementById('root'); root.appendChild(inner);   Can I not add an eventListener to an element before it is added to the DOM?

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 have postfix and dovecot running on debian 7, I can send mail fine, but it keeps going to my spam folder when sent to google accounts. Another user who doesn't use gmail said it was delivered to his inbox. When I send a test message to myself I get the following headers:  Delivered-To: chaoskreator@gmail.com Received: by 10.170.37.203 with SMTP id 194csp288892ykf;         Fri, 29 Aug 2014 21:45:25 -0700 (PDT) X-Received: by 10.236.70.105 with SMTP id o69mr20864964yhd.25.1409373925239;         Fri, 29 Aug 2014 21:45:25 -0700 (PDT) Return-Path: <webmaster@beansworthy.fluidvector.com> Received: from fluidvector.com ([2605:f700:100:400::875a:4b61])         by mx.google.com with ESMTPS id s36si567167yhp.30.2014.08.29.21.45.24         for <chaoskreator@gmail.com>         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);         Fri, 29 Aug 2014 21:45:24 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning webmaster@beansworthy.fluidvector.com does not designate 2605:f700:100:400::875a:4b61 as permitted sender) client-ip=2605:f700:100:400::875a:4b61; Authentication-Results: mx.google.com;        spf=softfail (google.com: domain of transitioning webmaster@beansworthy.fluidvector.com does not designate 2605:f700:100:400::875a:4b61 as permitted sender) smtp.mail=webmaster@beansworthy.fluidvector.com Received: from localhost (localhost.localdomain [127.0.0.1])     by fluidvector.com (Postfix) with ESMTP id 725E7123A0C9F     for <chaoskreator@gmail.com>; Sat, 30 Aug 2014 00:45:23 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at fluidvector.com Received: from fluidvector.com ([127.0.0.1])     by localhost (fluidvector.com [127.0.0.1]) (amavisd-new, port 10024)     with ESMTP id oI9bUVMx6Thv for <chaoskreator@gmail.com>;     Sat, 30 Aug 2014 00:45:19 -0400 (EDT) Received: by fluidvector.com (Postfix, from userid 33)     id 17DA0123A0CA1; Sat, 30 Aug 2014 00:45:19 -0400 (EDT) To: =?UTF-8?B?dGVzdA==?= <chaoskreator@gmail.com> Subject: =?UTF-8?B?V2VsY29tZSB0byAiQmVhbnNXb3J0aHki?= X-PHP-Originating-Script: 1000:messenger.php From: <webmaster@fluidvector.com> Reply-To: noreply@fluidvector.com   I notice the lines   Received-SPF: softfail (google.com: domain of transitioning webmaster@beansworthy.fluidvector.com does not designate 2605:f700:100:400::875a:4b61 as permitted sender) client-ip=2605:f700:100:400::875a:4b61;     Authentication-Results: mx.google.com;            spf=softfail (google.com: domain of transitioning webmaster@beansworthy.fluidvector.com does not designate 2605:f700:100:400::875a:4b61 as permitted sender) smtp.mail=webmaster@beansworthy.fluidvector.com   which I assume means there's an issue with my SPF TXT DNS record: v=spf1 a:fluidvector.com ~all, even though pySPF says it's good.  I've looked up on mxtoolbox.com and found that for some reason, my IP (which I obtained from my VPS provider) is apparently blacklisted on Barracuda and spamcannibal. I've contacted my VPS provider, but they didn't seem to be able to do anything for me. So, at this point I assume I'm limited to just contacting the black lists and pleading to have my IPs removed? What are my options here? Can I get gmail to let mail from my servers be delivered to inbox instead of the spam folder without the headache of trying to get unlisted?

This is a  about setting up .     I have an office with many computers that share a single external ip (I'm unsure if the address is static or dynamic). Each computer connects to our mail server via IMAP using outlook. Email is sent and received by those computers, and some users send and receive email on their mobile phones as well.  I am using  to generate an SPF record and I'm unsure about some of the fields in the wizard, specifically:   Enter any other domains who may send or relay mail for this domain Enter any IP addresses in CIDR format for netblocks that originate or relay mail for this domain Enter any other hosts which can send or relay mail for this domain How stringent should SPF-aware MTA's treat this?   the first few questions i'm fairly certain about... hope i have given enough info.


I know some anime counterparts of manga are extremely different while others are so similar they nearly go panel-by-panel. I've watched the Magi anime (labyrinth and kingdom of magic) and would like to read the manga to see what comes next. My question: How close is the manga to the anime? Is it different enough that I should read the manga from the beginning or could I start off where the anime left off? And if I could start off where the anime left off, about what chapter would that be? :D Thanks so much in advance~!

I watched Magi: The Labyrinth of Magic and want to pick up the manga starting from anime end. If manga and anime are too different, I might read skipped chapters. How different are then anime and manga versions? Do I need to read it to cover the whole story?


Sometimes it appears that the covariance is not sufficient to express how much two random variables are related.   Bellow, I have draw random samples from a multivariate normal distribution with two random variables X and Y.   First case : Cov(X,Y) $\simeq$ 0   Second case : Cor(X,Y) $\simeq$ 1   Third case: Cor(X,Y) $\simeq$ 0, ok but then is there a better metric than correlation in this case ?    Remark : Here the python code to draw the examples :  import numpy as np import matplotlib.pyplot as plt  s1 = np.random.normal(0, 5, 500) s2 = np.random.normal(0, 1, 500)  f, axarr = plt.subplots(2, 2)  axarr[0, 0].scatter(s1, s2) axarr[0, 0].set_title('X,Y ')  axarr[0, 1].scatter(s1, s1+s1) axarr[0, 1].set_title('X, X+X')  axarr[1, 0].scatter(s1, s1*s1) axarr[1, 0].set_title('X,X*X')  axarr[1, 1].scatter(s1, s1+s2) axarr[1, 1].set_title('X,X+Y')  plt.show()

For plot 1, I can test the association between x and y by doing a simple correlation.   For plot 2, where the relationship is nonlinear yet there is a clear relation between x and y, how can I test the association and label its nature?


I need that that application will start on my laptop screen when I launch, for example, "xterm". So if i start xterm in SSH my laptop must show me xterm on the screen, but it says, "DISPLAY is not set". What must i do with that?

Sometimes I need to start XMBC media player or other GUI software a one of my PC (small Xubuntu PC used as a media center).  Usually I do this starting a X11vnc server on the remote PC via SSH and than connecting with an Xvnc client to the Xfce desktop.  Is there a way to start a GUI software on a remote Linux PC via SSH?  Thanks!


My father told me he read this story when he was young (I think). He was born in 1935 and is passed away now. He didn't remember the title or author but it impressed him.

I listened to this on audiobook and it was great.  The premise was a human ends up travelling to an alien planet. The aliens have a perimeter to their 'base' that is under constant attack from the planet's animals. It is revealed towards the end that there is some sort of signal being transmitted that is making all the animals and plant life attack a certain point on the planet (where the aliens are).   Other major plot points I remember: The human traveller falls in love with an alien. The aliens have a sort of virtual training environment that simulates life outside the perimeter, where plants attack you etc. There is a secondary alien group that the human ends up with, and although they are rivals to other group, they have a trade set up.   Any help much appreciated! Thanks.


I flag questions that are duplicates, no real questions, not useful, etc. I got 90 helpful flags.  I can't see my name below the question I flag to be closed. Why?

Lately I was wondering why my name is not appearing in the closed notification for questions I flagged.  E.g: I flagged a question as "not constructive" and it get approved than the question is closed see the following screenshots:    In an other way, why my name isn't part of the list ? do I need some privileges to be listed ? or I'm just getting it wrong and flagging is completely different than closing?


Is there a way to change only the title of a build in beamer block? Because the babel package doesn't do it. \documentclass{beamer} \usepackage[dutch]{babel} \begin{document} \begin{frame}{Translate example into voorbeeld} \begin{example} test     \end{example} \end{frame} \end{document}   thanks

I want to make a presentation where at the beginning of each section the table of contents is displayed. I am doing the presentation in dutch, so I want the title of those frames to be 'Overzicht'. I'm using the following code:  \documentclass{beamer} \usepackage[utf8]{inputenc}  \AtBeginSection[] {   \begin{frame}     \frametitle{Overzicht}     \tableofcontents[currentsection]   \end{frame} }  \usetheme[kul]{kuleuven2} \setbeamertemplate{footline}[body]  \title{De leegheid van de soritesparadox} \author{Lukas Rollier } \date{26 Maart 2020}  \begin{document}  \maketitle  \section{Soritesparadox}  \section{Taaldarwinisme}  \end{document}   But the title on those frames remains 'outline'.


I would like to use this method to convert a 2D Array to string into a properties file. Then, import it from the properties by converting the properties string back to a 2D Array. But I have difficulties with converting the String back to a 2D array.  EDIT: I want to reverse the 2D array string output back to 2D array. But the  you gave me doesn't help me with the 2D array one. As the Arrays.replace() can't replace the 2D array's internal one.  Here's my code:  public static void getSettings(){ try { File file = new File("config.properties"); Properties p = new Properties(); FileInputStream fileInput = new FileInputStream(file); //Import moduleNames = p.getProperty("moduleNames").split(""); moduleData = ??? //I don't know how to convert String to String[][] } catch (Exception e){ e.printStackTrace(); } }   Here's the another function to set property:  public static void writeFile(String[][] mD, String[] mN){ try{ Properties p = new Properties; File file = new File("config.properties");  p.setProperty("moduleData", Arrays.deepToString("mD")); p.setProperty("moduleNames", Arrays.toString("mN")); //...further more code to flush the data out } catch (Exception e){ e.printStackTrace(); }  }   Can anyone tell me how to convert String (from deepToString) back to String[][]?  My project is in Open source. This:  is the set properties one.  And this:  is the load String to String[][] one.

Is there in the JDK or Jakarta Commons (or anywhere else) a method that can parse the output of Arrays.toString, at least for integer arrays?  int[] i = fromString(Arrays.toString(new int[] { 1, 2, 3} );


I want my theorems numbered, but not my definitions. The options I'm finding turn numbering on or off universally. My attempts at customizing different theorem environments are not having any effect.  This issue is addressed for the article document class, but I cannot find a solution in beamer. There is a solution posted to the issue of making a seperate sequence for different theorem environments, but not for turning the number off entirely in one environment but not another.  Consider this:  \documentclass[t,handout]{beamer} \mode<presentation> \usepackage[english]{babel} %\setbeamertemplate{theorems}[ams style]   \begin{document} \frame{     \begin{theorem}     \end{theorem}     \begin{definition}     \end{definition}     } \end{document}   Notice that there is no numbering on the Theorem or Definition. Uncommenting the 4th line places numbers on both (and also bolds the terms, which I could take or leave). How can I do one of the following:   Activate the fourth line, then modify its settings so that the definitions are not numbered, With the fourth line de-activated, define the environments separately so that theorems are numbered, but not definitions, Use a different package with which one of the above is possible?   What surprises me especially is that if I leave the template out, and do like I would in an article, which is this:  \newtheorem*{definition}{Definition} \newtheorem{theorem}{Theorem}   I get an error that these environments are already defined. But if I strip the file down anymore it doesn't even generate a document, so what is defining the environments and why can't I customize it?

I want to have different numbering for Theorems, Examples, Definition, and Lemma. I use the following code in preamble  \setbeamertemplate{theorem}[ams style] \setbeamertemplate{theorems}[numbered]   This code works fine but it has continuing numbering for Theorems and other Environments. I'd appreciate your help if you guide me how to get different numbering for Theorems, Examples, Definition, and Lemma in beamer.


Show that $X$ is $T_0$ iff $\forall x,y \in X$ $x\ne y$ it holds that $\overline{\{x\}}\ne \overline{\{y\}}$. I was having trouble making a decisive, clear argument in what seems to be an easy question. At first I attempted to show that if $X$ is $T_0$, then for $x,y\in X$ such that $x\ne y$, there exist $U_x, U_y \in T$ which respectively includes $x$ and not $y$ and vice-versa. Thus letting $F_x=X\setminus U_y, F_y=X\setminus U_x$, it follows that $\overline{\{x\}}\subset \overline{\{x\}}\cap F_x$ and that $\overline{\{y\}}\subset \overline{\{y\}}\cap F_y$, but can I directly derrive that $\overline{\{x\}}\ne \overline{\{y\}}$? The opposite direction is confusing to me: for distinct $x,y \in X$, letting $F_x= \overline{\{x\}},F_y= \overline{\{y\}}$, if I can assume $y\notin F_x$ and $x\notin F_y$ then it is direct, but what if $x\in F_y$? I can't find an elegant way to adress this case. What am I missing? I accept that this question could be well-known and is a possible duplicate but I would appreciate it if you could address my strategy in-question.

This is exercise $1.5$A from Engelking's book, page $47$.  Verify that $X$ is $T_{0}$ if and only if $\overline{\{x\}} \neq \overline{\{y\}}$ for every pair of distinct points $x,y$.  My try:  Suppose first that $X$ is $T_{0}$ and let $x,y$ be two distinct points of $X$. Then since $X$ is $T_{0}$ wlog we can find an open set $U$ such that $x \in U$ and $y \not \in U$. Let us show that $\overline{\{x\}} \neq \overline{\{y\}}$. Suppose otherwise, then $x \in \overline{\{x\}} \subseteq \overline{\{y\}}$. This in turn implies that $U \cap \{y\} \neq \emptyset$ so that $y \in U$, a contradiction.  For the other direction, let $x,y$ be distinct points of $X$. Then either $\overline{\{x\}}$ is not contained in $\overline{\{y\}}$ or $\overline{\{y\}}$ is not contained in $\overline{\{x\}}$. Assume the former, then $x \not \in \overline{\{y\}}$ so we can find an open set $U$ such that $U$ contains $x$ and $U$ does not intersects $\{y\}$. If the other case happens we can find an open set $V$ such that $V$ contains $y$ and $x \not \in V$. Therefore $X$ is $T_{0}$.   Is this OK?


bash>BRANCH_NAME="My/Test/Branch/Name" bash>if [ -n "${BRANCH_NAME}" ]; then echo ${BRANCH_NAME}; else echo "latest"; fi   Result  bash>"My/Test/Branch/Name"   What is the purpose of -n and where can I find some documentation on it? I am guessing that the flag is checking for a null or empty string.

Consider the following in bash:  root@debian-lap:/tmp I=$(echo) root@debian-lap:/tmp echo "$I"  root@debian-lap:/tmp [ -z "$I" ] && echo "TRUE" || echo "FALSE" TRUE   This means that variable $I is zero. The same I could achieve with negation test to see if variable is non zero, and ! makes test reverse so it checks is variable zero   root@debian-lap:/tmp ! [ -n "$I" ] && echo "TRUE" || echo "FALSE" TRUE root@debian-lap:/tmp   So, my question is, are there any special cases when to use -z and ! -n , or vice versa ! -z and -n as they are basically doing the same test?   Thanks


Can I join two commands defined as String and run as one. E.g.  var="ls -alt" var2="| grep usersfile" var3="| grep usersfolder"   Following example for joining commands does not work.   a. '{$var & $var2;}'  b. '{$var & $var3;}'  What I what is:   a. run "$var $var2" and get "ls -alt | grep usersfile"  or  b. run "$var $var3" and get "ls -alt | grep usersfolder"

$ ls -l /tmp/test/my\ dir/ total 0   I was wondering why the following ways to run the above command fail or succeed?  $ abc='ls -l "/tmp/test/my dir"'  $ $abc ls: cannot access '"/tmp/test/my': No such file or directory ls: cannot access 'dir"': No such file or directory  $ "$abc" bash: ls -l "/tmp/test/my dir": No such file or directory  $ bash -c $abc 'my dir'  $ bash -c "$abc" total 0  $ eval $abc total 0  $ eval "$abc" total 0


Can I use a string to type a Templated method in C#?  I would like to do something like this (Juste an example code)  string str = "MyProject.MyType"; dynamic obj = jsonObject.ToObject<str>();  I tried to use Type.GetType() to get the type from my string, but it doesn't work too.

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


On After Effect i have my png sequence (Blender Cube) and i'd want to mix on my video.  How can I do that?  I can see either only the video or only the cube.  The cube is png but i see the background black

I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible?


I was wondering which sentence would be better, the progressive one or the other.  The door you heard closing was not him going out, it was me coming in   The door you heard close was not him going out, it was me coming in

I know using the bare infinitive after verbs such as hear, see, watch, etc. conveys  a different meaning from using the present participle (verb+ing):        I watched him climbing over the fence ( Climbing wasn't finished at the moment of speaking)   I watched him climb over the fence ( Climbing was finished at the moment of speaking)       I noticed the majority of the Grammar books use past tense to explain the aforementioned difference. Personally, I think that is quite rational because the bare infinitive implies a completed or finished occurrence. This means that event belongs to the past. However, I have a problem conceiving similar sentences in the present tense. For example:   .   The questions is:     If the bare infinitive implies a completed action, then why should we use the present tense to talk about that event? (the event is in the past).      We can say that:      An uneasy feeling came over me as I watched him walk towards the revolving doors     Added info 1  If you think my "climbing" examples are irrelevant, you can check Cambridge Advanced Grammar In Use, page 60, Unit 30, Section D or just check this     Added info 2  My question is from the logical point of view. I think the act of "seeing" is instantly. Therefore, it is not rational to say "see" a "completed process" but, "saw" a "completed process".


I am not sure if this is intentional but I can't find another question highlighting this so figured I'd ask. In chat, when editing a message you've already posted, a "Cancel editing" button appears as follows:  In , at least (I've had a look in the DMZ but their red button appears fine over there) but it may also occur in other channels, the button stays in a state where it's either nearly transparent or perhaps supposed to be disabled? I have noticed that in my browser at home the button doesn't become visible at all but that is running a beta version of Chrome so I put it down to that. The button still works, clicking on it will cancel the editing process as intended, so this is purely an aesthetic issue. Is the button supposed to look like that?

While trying to edit a message in chat, I thought for some reason the 'cancel editing' button was disabled since it showed up transparent.  However, apparently it is just a bug in the animation where the button fades in/out while traversing to message history using the up and down keys.  I'm using Chrome Version 22.0.1229.94 m.


Trying to view a deleted question in Android app fails, the app shows "Loading the question failed", and doesn't say why.

At the left (site), it says 3 Answers (1 Accepted Answer + 2 self-deleted-answer). At the right (app), it says only 1 Answer; self-deleted answers are not visible.