As you know SQL Server unlike MySQL has no Group_Concat function, so for this purpose how to write a query for SQL Server.  I created an application by using Visual Studio. Application has a Windows Form. I am able to save, delete and update records in the database table. I need to display a person's email addresses, so I need to use a similar method like Group_concat.  Can you help me about with this?

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I have 1000s of remote machines. I want to run some specific commands on all of them, but in parallel. I use these commands which run sequentially:  for f in `cat host.lst` do        ./runScript.sh $f done   Let's suppose host.lst contains 100 hosts.  I want to run runScript.sh on 100 hosts in parallel. Also, logs should be maintained.  I can not install any utility on my machine such as PSSH.  I have done a lot of research and found these links but they did not help. I do not understand how they work:      Can any one explain the logic?

There is a list of IP addresses in a .txt file, ex.:  1.1.1.1 2.2.2.2 3.3.3.3   Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is in the known_hosts list (on my PC, Ubuntu 10.04 LTS/bash).  How can I run commands on these servers, and collect the output?  Ideally, I'd like to run the commands in parallel on all the servers.  I'll be using public key authentication on all the servers.  Here are some potential pitfalls:   The ssh prompts me to put the given servers ssh key to my known_hosts file. The given commands might return a nonzero exit code, indicating that the output is potentially invalid. I need to recognize that. A connection might fail to be established to a given server, for example because of a network error. There should be a timeout, in case the command runs for longer than expected or the server goes down while running the command.   The servers are AIX/ksh (but I think that doesn't really matter.


I'm starting to come around to an understanding of hypercomplex numbers, and I'm particularly fascinated by the fact that certain algebraic properties are broken as we move through each of the $2^n$ dimensions. I think I understand the first $n<4$ instances:   As we move from $\mathbb{R}$ to $\mathbb{C}$ we lose ordering From $\mathbb{C}$ to $\mathbb{H}$ we lose the commutative property From $\mathbb{H}$ to $\mathbb{O}$ we lose the associative property (in the form of $(xy)z \neq x(yz)$, but apparently it's still alternative and $(xx)y = x(xy)$. Is that right?) The move from $\mathbb{O}$ to $\mathbb{S}$ is where I start to get fuzzy. From what I've read, the alternative property is broken now, such that even $(xx)y \neq x(xy)$ but that also zero divisors come into play, thus making sedenion algebra non-division.   My first major question is: Does the loss of the alternative property cause the emergence of zero divisors (or vice versa) or are these unrelated breakages?  My bigger question is: What specific algebraic properties break as we move into 32 dimensions, then into 64, 128, 256? I've "read" the de Marrais/Smith paper where they coin the terms pathions, chingons, routons and voudons. At my low level, any initial "reading" of such a paper is mostly just intent skimming, but I'm fairly certain they don't address my question and are focused on the nature and patterns of zero divisors in these higher dimensions. If the breakages are too complicated to simply explicate in an answer here, I'm happy to do the work and read journal articles that might help me understand, but I'd appreciate a pointer to specific papers that, given enough study, will actually address the point of my specific interest--something I can't necessarily tell with an initial glance, and might need a proper mathematician to point me in the right direction.  Thank you!  UPDATE: If the consensus is that this is a repeat, then ok, but I don't see how the answers to the other question about why algebraic properties break answers my questions about what algebraic properties break. Actually, the response marked as an answer in that other question doesn't actually answer that question either. It provides a helpful description of how to construct a multiplication table for higher dimension Cayley-Dickson structures, but explicitly doesn't answer the question as to why the properties break.   The Baez article many people suggest in responses to all hyper-complex number questions like mine is truly excellent, but is mostly restricted to octonions, and, in the few mentions it makes of higher dimension Cayley-Dickson algebras, does not refer to what properties are broken.   Perhaps the question isn't answerable, but in any case it hasn't been answered in this forum.   UPDATE 2: I should add that the sub question in this post about whether the loss of the alternative property specifically leads to the presence of zero divisors in sedenion algebra is definitely unique to my question. However, perhaps I should pose that as a separate question? Sorry, I'm not sure about that aspect of forum etiquette here.

Motivating question:    I'm aware that one can construct a hierarchy of number systems via the Cayley–Dickson process:  $$\mathbb{R} \subset \mathbb{C} \subset \mathbb{H} \subset \mathbb{O} \subset \mathbb{S} \subset \ldots $$  "Reals" $\subset$ "Complex" $\subset$ "Quaternions" $\subset$ "Octonions" $\subset$ "Sedenions" $\subset$ $\ldots$  and that at each step you're given a multiplication table that tell how the elements interact. As you move up the ladder, certain "nice" properties are lost: ordering,  commutativity, associativity, multiplicative normedness, etc... Given the multiplication table, you can show that these properties don't hold.   Eric Naslund noted that "the first 4 are very special as they are the unique 4 normed division algebras over ℝ", no surprise then that these $2^n$-ions have found quite a bit of use. I'm interested in the sequence itself however, irrespective of how useful a $2^{256}$-ion might be (ducenti-quinquaginta-sex-ion?).   I feel like something deeper is going on here though that I don't understand. Why are these particular properties lost at each step? Is it possible to quantify the process such that, at the $2^n$-ion you can say something about the symmetry of the multiplication table*?  * I'm making an ansatz that there is a connection between the symmetry of the multiplication table and these "nice" properties.


I can search all other rooms (which I usually go to chat) in the Stack Exchange chat  except for "". Is it because it contains slashes and the search script fails to execute?

Generally chat.<site>.com redirects to chat.stackexchange.com/?tab=site&host=<site>.com and go for same thing but here you can check your self:       Both are Different!  If one visits  and select site: StackOverflow, then it outputs  and they miss rooms that are only listed by .  So, why does this happen? Is this a bug?  Note: I found this while  for general chat-room at StackOverflow; see chat-discussion


If $A$ is a complex $n \times n$ matrix of rank $1$, then $$\det(I+A) = 1 + \mbox{tr}(A)$$   How to approach this problem?  Rank-$1$ matrices have special . Also, thinking about the determinant of a matrix as the product of its eigenvalues and the trace of the matrix as the sum of its eigenvalues,   $$\prod_{k=1}^{n}(1+\lambda_{k}) = 1  +\sum_{k=1}^{n} \lambda_{k}$$  I could not proceed.

This question aims to create an ""  of numerous questions that ask about determinants of specific matrices (I may have missed a few):              The general question of this type is  Let $A$ be a square matrix of rank$~1$, let $I$ the identity matrix of the same size, and $\lambda$ a scalar. What is the determinant of $A+\lambda I$?  A clearly very closely related question is  What is the characteristic polynomial of a matrix $A$ of rank$~1$?


Let $f$ be entire, $|f(z)|\leq 3|z|^4+1$ prove $f$ is a polynomial with deggre $\leq 4$  Solution: $f^{(4)}(z_0)=\frac{4!}{2\pi i} \int_c\frac{f(z)}{(z-z_0)^5}dz$,  $\Rightarrow$  $|f^{(4)}(z_0)|\leq \frac{4!}{2\pi i} \int_c |\frac{f(z)}{(z-z_0)^5}|dz \leq \frac{4!}{2\pi i} \int_c \frac{|f(z)|}{|(z-z_0)^5|}dz \leq$ $$\leq \frac{4!}{2\pi i} \int_{0}^{2\pi}\frac{|f(z_0+re^{it})ire^{it}|}{|(re^{it})^5|}dt \leq \frac{4!}{2\pi i} \int_{0}^{2\pi}\frac{(3(|z_0|+r)^4+1)r}{r^5}dt \leq  \frac{4!}{2\pi i} 2\pi\frac{(3(|z_0|+r)^4+1)}{r^4}$$ that means $f^{(4)}(z)$ is bounded so from Liouville's theorem its constant and therefore $f$ is a polynomial with deggre $\leq 4$ Is my solution correct ?

Let $f$ be entire, $|f(z)|\leq 3|z|^4+1$ prove $f$ is a polynomial with deggre $\leq 4$  Similar questions have been asked here, but non answer satisfies me, so I tried a way I get, I just want someone to verify this. $f^{(4)}(z_0)=\frac{4!}{2\pi i} \int_c\frac{f(z)}{(z-z_0)^5}dz$, $|f^{(4)}(z_0)|\leq 4! \frac{3|z|^4+1}{|z|^5|(1-\frac{z_0}{|z|^5})|}|z|=4!\frac{3+\frac{1}{|z|^4}}{|(1-\frac{z_0}{|z|^5})|} $, where $|z|$ comes from the length of the line (instead of $r$) leting $|z|\rightarrow \infty$ we get $|f^{(4)}(z_0)|\leq 72$ since $z_0$ is random from Liouville's theorem $f^{(4)}(z)$ is constant, it follows $f$ is a polynomial with deggre $\leq 4$


i'd like to setup phpmyadmin in Ubuntu without asking for parameters in prompts, i don't know if there's a way to pass these parameters in the command: sudo apt-get install phpmyadmin and give the options like the server type "apache2" and mysql admin password.  Thanks a lot.

How can i disable totally the prompts that appear while installing a Debian package, i've used all the options that i've found but there are some packages that are still prompting.  I'm using this command:  apt-get -y --allow-unauthenticated --force-yes -o DPkg::Options::="--force-overwrite" -o DPkg::Options::="--force-confdef" install x11-common   Why the x11-common package is still prompting? how can i get rid of these prompts?  Thanks in advance  --Victor  Edit: just to clarify, the prompts are not "yes/no" prompts, are open questions in a coloured screen (typical two color screen) but i want to set the default option of these questions


Is it possible to provide updates for software in Ubuntu 11.10 software center. For example upcoming versions of vlc, inkscape and many others.

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


I am trying some assignment questions and I am unable to think on how can I solve this problem.  Question: Let K be subset of $\mathbb{R^{n} }$ such that every real valued continuous function on K is bounded. Then is K compact?  I think this statement is true as if it were false then it would be impossible to give a counterexample as it has to be verified for every real valued function ( continuous) . But I have no clue on how can I prove it. Please give hint.

Let $X$ be a metric space. Prove that if every continuous function $f: X \rightarrow \mathbb{R}$ is bounded, then $X$ is compact.  This has been asked before, but all the answers I have seen prove the contrapositive. Realistically, this may be the way to go, but is there way to exhibit an unbounded continuous function (under the assumption $X$ is not compact) without appealing to results beyond introductory real analysis (e.g., the solution I've seen involves the Tietze Extension theorem)?  Because we're working with metric spaces, it's clear that the assumption that $X$ is noncompact (towards proving contrapositive) will lead us to extract a sequence of points in the space with no convergent subsequences. But how can we infer the existence of an unbounded continuous on the space knowing only about some sequence of points in this space (without using anything too advanced)?


In Ubuntu 18.04 with Ubuntu-Wayland. I configured Ctrl+Shift for switching keyboard layout.  And now in chrome Ctrl+Shift+T doesn't restore closed tab but only opens empty tab as Ctrl+T. How to fix it.  P.S. In Mint with KDE same configuration but all work perfectly.

I have Ubuntu 16.04 with GNOME shell. I set ctrl+shift for the "Modifiers-only switch to next source" option.   This shortcut conflicts with apps hot-keys. I can't use ctrl+shift+i to open devtools in Chrome, it just switches the layout. In VS code IDE if I press shortcuts with ctrl+shift (for example ctrl+shift+f), shortcuts work but always switch a keyboard layout. When I used Windows this problem didn't exist.  Can I set the ctrl+shift shortcut in such a way that it causes a switch action only after the keys are released and only if this 2 keys were pressed (without additional keys)?


So I have this api endpoint:  @app.route("/subject", methods=["GET"]) def GET_subject():     subject = request.args["subject"]     page = int(request.args["page"])      pagesize = 10     subjectResults = db.subject.find()[pagesize*(page-1):pagesize*(page)]     if subjectResults is "[]":         return json.dumps({"page": page, "subject": subject, "subjectResults": bson.json_util.dumps(subjectResults)})     else:         return json.dumps({"error": "404"})   and when I run it, with no data in the database, it returns the error 404 message I put in. As you can tell, I'm using Flask and Flask-PyMongo for this.

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


I did an experiment today. I put an aluminum foil inside the microwave oven thinking that nothing would happen. But contrary to my expectations it started sparking badly. I looked for answers on the internet but none of them were very satisfactory and explainatory at the same time!

I heard that electrons accumulate at points on metals, and this clearly explains the arcing phenomenon, but how does a microwave make an electron imbalance on the fork?


I am trying to restrict all FTP users to the directory /jannik with the vsftp-daemon. I don't want them to go anywhere but the folder /jannik and it's sub-folders. Also, I don't want them to have write permission.  What you should know:   I have the following common settings   local_enable=yes write_enable=no  I use a user blacklist to only allow one specific account to access the ftp (userlist_deny=NO; userlist_enable=YES; userlist_file=/etc/vsftpd.user_list) In the user_list I've only one user (root)   Again, what I would like to accomplish:   Only allow that user to access /jannik and all it's sub directories   What I've tried to far:   Setting local-root=/jannik => This lets my ftp users all log on to the correct dir, but they can use /../ in the URL to get out of the directory, letting them full access to all my files on the VPS server I own. Additionally setting chroot_local_user=YES gives me an error: "500: OOPS: vsftpd: refusing to run with writeable root inside chroot()"   Do you have the idea, what could be wrong? I do not want to chroot their home directories, only to the given single directory.

I am running vsftpd as ftp server on my linux (rasbian), I log in to the machine as a root user.  I would like to be still locked to using only /var/www, how can I configure vsftpd conf to accomplish it?


XmlDocument xdoc = new XmlDocument(); string xml = @"<root xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" schemaVersion=""2.1.2.0.0.0"" xmlns=""namespace"">   <header os=""Windows"">     <origin>1</origin>       <version>1</version>     </header>     <x headerLength=""32"">     <y xsi:type=""Config"">       <z xsi:type=""AddressContainer"">         <w xsi:type=""PAddress"">           <elem>elem1</elem>             <address>validAddress1</address>             <connection>1</connection>           </w>           <w>             <elem>elem2</elem>             <address>validAddress2</address>             <connection>2</connection>           </w>           <w>             <elem>elem3</elem>             <address>validAddress3</address>           <connection>3</connection>           </w>           <w>             <elem>elem4</elem>             <address>asd</address>             <connection>0</connection>           </w>           <w>             <elem>elem5</elem>             <address>asd</address>             <connection>0</connection>           </w>           <w>             <elem>elem6</elem>             <address>asd</address>             <connection>0</connection>           </w>       </z>     </y>   </x>  </root>"; xdoc.LoadXml(xml); XmlNode root = xdoc.DocumentElement;  My question is how can I select only those "w" nodes, which has a valid "address" child node (not 'asd')? I can select all "w" nodes with XmlNodeList w = xdoc.GetElementsByTagName("w");  I found that XPath can be really helpful here, but I can't get that to work. I tried root.SelectNodes("//w[address != \"asd\"]");, but this isn't returning anything. I thought maybe the namespace is the problem here, so I tried root.SelectNodes("//namespace:w");, but that throws an exception:  System.Xml.XPath.XPathException: 'Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.'  If I remove the root node's arguments, and "xsi:" in front of the types, it works. How can I get it to work when there is a namespace? Can someone help me please how can I do this? Thanks!

I'm having this XML document with namespaces and I want to extract some nodes using XPath.  Here's the document:  <ArrayOfAnyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">   <anyType xsi:type="Document">     <Id>5</Id>     <Title>T1</Title>   </anyType>    <anyType xsi:type="Document">     <Id>15</Id>     <Title>T15</Title>   </anyType> </ArrayOfAnyType>   What's the XPath expression going to be if I want to extract all "anyType" elements with xsi:type="Document"?  I've tried this:   //anyType[@xsi:type="Document"]   and it doesn't work:


There are two questions asking about the random nature of a subsample ( and ). However, they do not provide a formal proof of the result. I am looking for a proof to support my selection mechanism.  The specific problem is:   Say I have a random sample of size $M$, drawn from a given population. One of the dimensions of that population is, for example, gender. Now, from the above sample, I selects only those individuals who are female, obtaining a subsample of size $N$ (naturally, $N<M$). The question is: is that subsample representative of the population of females?

Let's say you have a large random sample of soccer players in Europe but you are only interested in what happens in Spain. Could you reduce your sample to players in Spain and still call it a random sample (but of a different population)? If not, how would you call that subsample and which specific precautions should you take to be able to make inferences on the population of spanish soccer players?  My feeling is that using that subsample would be fine as long as it is large enough, but maybe I am missing something.


I just wanna create a class definition with a static field with a name. A file called exercises.py contains:  First error:   FAIL: test_00_packages (__main__.Ex00) Traceback (most recent call last): File "ex00.py", line 55, in test_00_packages self.assertTrue("Exercise00" in globals())  AssertionError: False is not true   Later:  class Exercise00:     def __init__(self, STUDENT_NAME):         self.STUDENT_NAME = 'Name Name'   But if I try to print Exercise00.STUDENT_NAME I just get NameError: name 'Exercise00' is not defined  But I guess I defined it?!  Here the complete error:  ERROR: test_01_static_field (__main__.Ex00) ---------------------------------------------------------------------- Traceback (most recent call last):   File "ex00.py", line 60, in test_01_static_field     print("[I] Name: " + Exercise00.STUDENT_NAME) NameError: name 'Exercise00' is not defined  ----------------------------------------------------------------------   My task is to create a class called Exercise00 with a static field STUDENT_NAME.   The line in ex00.py is:  def test_00_packages(self):     self.assertTrue("Exercise00" in globals())

Is it possible to have static class variables or methods in Python? What syntax is required to do this?


I am a new Latex user who's having problems when writing fractions in the \array environment. The text becomes compressed to where reading what I wrote becomes a challenge, and I have so far spent hours finding a solution to my problem with no luck. I want to the \array environment to look similar to the equations not in the \array environment.   \begin{proof}     We proceed by induction.     \begin{enumerate}         \item Let $n = 1$. Then \[ \frac{1}{1(1+1)} = \frac{1}{2} = \frac{1}{1+1} = \frac{1}{2} \]     Therefore, the base case holds.         \item Assume now by Induction that \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{n(n+1)}=\frac{n}{n+1} \] holds for some $n \in{\mathbb{N}}$. We now show that \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2} \] We write \[ \begin{array}{lll}             \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3} + \dotsb + \frac{1}{(n+1)(n+2)} & = & \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3} + \dotsb + \frac{1}{n(n+1)} + \frac{1}{(n+1)(n+2)}  \\               & = & \frac{n}{n+1} + \frac{1}{(n+1)(n+2)} \\              & = & \frac{(n+1)^{2}}{(n+1)(n+2)} \\              & = & \frac{n + 1}{n + 2}.         \end{array} \]         \end{enumerate} By Induction, \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2} \] for every $n \in{\mathbb{N}}$.

I'm very familiar with how symbols display differently in inline mode (with $ ... $) vs. how display math shows them (with \[ ... \] or $$ ... $$).  Two examples would be with limits  $\lim_{n\rightarrow \infty}f(x)$   vs.  \[ \lim_{n\rightarrow \infty}f(x) \]   and with sums  $\sum_{n=1}^{x} n^2$   vs.  \[ \sum_{n=1}^{x} n^2 \]   My Question is:     How do you display these things in inline mode (with all the nice inline formatting) as if they were in display mode ?   The inverse -- how to display things in display mode as if they were in inline mode -- is also of interest.


My mother in law has has vacuum sealed venison in the freezer for about 13 years. Would it still be ok to eat? It doesn't look like anything is wrong with it.

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


I am leaving for a trip to Italy with a layover in Germany. I know that I don't need a visa for Germany, but would I be able to transfer into Italy without a Visa? I would have gotten it earlier, but my travel document was just issued and my flight is 5 days of the date of issue. I did try to go the the Italian consulate and he refused to even look at my application considering the amount of time needed to process it. I was born in Vietnam, but being a refugee, doesn't that mean I am stateless? So lost. My flight was booked by a friend to help out with a photoshoot.   Does Italy issue visa on arrival or will I be flat-out rejected at boarding?

I just want to double check to make sure I won't run into any issues at the border of entry.  I'm a permanent resident of the USA with a green card and I have a travel document issued by the USA (I-571). Will I have any issues traveling around in the Schegen countries?  Do I need a visa? Do I have to pay any fees?


I am practicing using polymorphism in C++ .   Below is my superclass and subclass implementation.  class Animal{ public:      int num ;     string name ;  public:      Animal()     {      };      Animal( int i, string n)     {         num = i;         name = n ;     };      void bark()     {         cout<<"---"<<endl;     };  };  class Cat : public Animal     {      public:         Cat(){  }         Cat( int i, string n) :  Animal( i, n)         {             cout<<"construct "<<"Cat"<<"!!"<<  endl;         };          public:          void bark()         {             cout<<"MMM"<<endl;         }      };      class Dog : public Animal     {     public:          Dog() {}         Dog( int i, string n) :  Animal( i, n)         {             cout<<"construct "<<"Dog"<<"!!"<<  endl;         };          void bark()         {             cout<<"WWW"<<endl;         }      };  show(Animal a){       cout< <a.num << endl << a.name << endl;         a.bark();     };   Then , I think if I create a cat and a dog and call show(), the cat will print out MMM and the dog WWW .  But after I do this ,  int main() {      Cat c1(1,"Kitty") ;     Dog d1(2,"Doggy");      cout<<endl;     show(c1);     show(d1);  }   The result is ,  construct Cat!! construct Dog!!  1 Kitty --- 2 Doggy ---   Instead of doing the thing I override in the subclass , the two bark() function still do the thing that super class defined .  But I found that If I use the function directly this way in main() , c1.bark() , it works .  What wrong with this ?

Someone mentioned it in the IRC as the slicing problem.


Note: this question is not about  "How can I use @classmethod and @staticmethod?" or "What is the difference between @staticmethod and @classmethod?"   In the following classes,  both @classmethod and @staticmethod can access a class attribute. neither of them can access instance attributes.  MyClass1.py class MyClass1:     __module_attr: str = "initial text value"      def __init__(self):         self.__instance_attr: str = "instance text value"      @classmethod     def cls_modify(cls):         cls.__module_attr = "class text value"      @staticmethod     def stat_display():         print(MyClass1.__module_attr)   if __name__ == '__main__':     my_obj = MyClass1()     my_obj.stat_display()     my_obj.cls_modify()     my_obj.stat_display()  MyClass2.py class MyClass2:     module_attr: str = "initial text value"      def __init__(self):         self.__instance_attr: str = "instance text value"      @classmethod     def cls_modify(cls):         cls.module_attr = "class text value"      @staticmethod     def stat_display():         print(MyClass2.module_attr)   if __name__ == '__main__':     my_obj = MyClass2()     my_obj.stat_display()     my_obj.cls_modify()     my_obj.stat_display()     print(my_obj.module_attr)     print(MyClass2.module_attr)  So, I can't see any advantage of one type over another. When should I prefer @classmethod over a @staticmethod and vice versa?

What is the difference between a function decorated with  and one decorated with ?


I locked my phone from android device manager, now i'm not being able to remove the lock screen password, it says that, lock screen is disabled by administrator or encryption policy or credential storage I tried clearing the credentials, but it didn't work

I have an Samsung Galaxy S3 Neo.  Bus 002 Device 042: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]   The keyboard & language setting is português.  I today installed Android Device Manager and to test it's functionality I locked the phone with the password: "abcd" (4 letters were required).  After entering the password and confirming with the "OK" button of my keyboard, the phone showed me that the password is wrong. "Senha incorreta".  I reset the password after some tries to "123456" and the phone reloaded the lock screen. Again the password showed up to be wrong. I also tried the alphabetic password: "abcdefg" - same error.  I changed the language of my Google account from German to Portuguese and reset the password to "123456" again and I tried to really reboot my phone and unlock the SIM card again. But anyways I can not get through my lock of the Android Device Manager.  I tried to enter the password 35 times wrong with hope to get a chance to authenticate with my Google Account login.  I also tried to connect the phone with adb but it does not show up in this state with:  adb devices   So what can I do to get access to my phone again?


I am installing the drivers for the wifi on the macbook on which I recently installed Ubuntu through the Software & Updates menu under the Additional drivers tab. When I choose the driver and press apply changes the progress bar halts while it says applying changes.  I have tried unmounting and mounting the USB I am installing it from. As well as restarting my computer. Nothing works.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


Is it ever correct to write Banking Done Different?  I am surprised to find this printed at the top of my savings account statement

Not too long ago, Apple Computer used the phrase "Think Different" as an ad slogan. Is this a grammatical error (that is, it should be "Think Differently"), or are they trying to say something else (and what would it be)?


A group of people sent out to investigate an anomaly and one of them was a "vampire" (but actually more of an enhanced human). When they get there we learn that it's either a ship or an hunk of space rock. As they are searching it the come to find out the whole thing is really "alive".   If it helps I think that the title started with the letter C

About a decade ago, I encountered a novel or a novella that I cannot locate.   The setting was Earth, about one century into the future.  I remember vampires and a mesh of satellites around the Earth that were burning up in the atmosphere.  This motivated a mission to deep space to find the intelligence responsible for the satellites.  Most of the novel focused on the crew of the mission — I recall that they were not "standard" humans.  They had modifications to their minds and bodies, possibly for the mission.  At the time, I had gone on a binge, reading many short stories, novellas, and novels in quick succession.  I fear that I might be combining several stories into one, especially the vampires and the deep-space first-contact mission, and so I am fully prepared for an answer of the form, "No such story exists."  Any assistance would be greatly appreciated.


Let $X$ be a Hausdorff space and let $f:X \to X$  be a continuous map such that $f  \circ f=f$. Prove that $f(X)$ is closed in $X$.  I am showing its complement is open. I had chosen $x \in X \setminus f(X) $ thus $ x \neq f(x).$ then I tried to use Hausdorff Property, but I am unable to show that $ x$ is an interior point of $X \setminus f(X) $

Let $X$ be a Hausdorff topological space , let $f:X \to X$ be a continuous map such that $f\circ f=f$ , then is it true that $f(X)$ is closed in $X$ ?


Humans meet primitive aliens with six fingers, they turn out to be more intelligent than humans, there's a tropical kind of planet, and something to do with a young alien.  It's been 6 years since I've read this short story and I'd like to know what it was.

I'm looking for a story that was probably written somewhere from the 1940s to the 1960s. I think I read it in an anthology, possibly in the 1970s.  A group of human explorers landed on a planet with primitive aliens, living in hunter-gatherer villages. They hoped to make a profit from trading our goods for—well, I'm not clear on what they wanted from the aliens.  The native people learned the human language before the explorers could learn theirs. Then the natives suddenly started producing technological innovations far beyond what they originally used. I remember that wooden sailing ships suddenly replaced their canoes. All the natives had to do was hear a story once from the explorers before copying the technology in the story.  Finally, the explorers realized that the natives were much, much smarter than us and that Earth faced a serious problem.  I'm fairly certain that it wasn't a Heinlein story, but I remember that it had some qualities similar to his work.


In movie Pirates of Caribbean: Salazar's Revenge, lead actor is trying to remove all of the curses of the sea so he can remove the old curse of The Flying Dutchman and eventually release his father William Turner from a curse. and in the end he got success doing that but one thing I don't understand is how William Turner is alive without his heart  As per curse, The Flying Dutchman must have a captain and whoever kills the captain be the next captain by giving his or her heart to the ship.  So, how did William Turner survive natural death after curse has been released?

In Dead Men Tell No Tales, when the trident is finally divided, every curse in the sea disappears. So, Will Turner doesn't have to be in the Flying Dutchman forever. But he remains heartless?


On the number line, are there more rational numbers or irrational numbers? I was told that there are equally many rational and irrational numbers. Is this correct? How could we prove that?

Can someone point me to a proof that the set of irrational numbers is uncountable? I know how to show that the set $\mathbb{Q}$ of rational numbers is countable, but how would you show that the irrationals are uncountable?


In Perl, the operator s/ is used to replace parts of a string. Now s/ will alter its parameter (the string) in place. I would however like to replace parts of a string befor printing it, as in  print "bla: ", replace("a","b",$myvar),"\n";   Is there such replace function in Perl, or some other way to do it? s/ will not work directly in this case, and I'd like to avoid using a helper variable. Is there some way to do this in-line?

In Perl, what is a good way to perform a replacement on a string using a regular expression and store the value in a different variable, without changing the original?  I usually just copy the string to a new variable then bind it to the s/// regex that does the replacement on the new string, but I was wondering if there is a better way to do this?  $newstring = $oldstring; $newstring =~ s/foo/bar/g;


I have a URL in the following format.  And I need to "parse" the "/event/contract-risk-management/review/" part from it in templates, but I don't know how to get the part after question mark. I tried request.path but it returned only the first part of the URL (without a domain). What should I use?

I am currently defining regular expressions in order to capture parameters in a URL, as described in the tutorial. How do I access parameters from the URL as part the HttpRequest object? My HttpRequest.GET currently returns an empty QueryDict object. I'd like to learn how to do this without a library, so I can get to know Django better.


I'm aware of the mathematical definition of complete statistics, but I'm pretty confused about what does the completeness really mean. It would be better to have a practical example from you guys.  Regards, Li

From :     The statistic $s$ is said to be complete for the distribution of $X$ if for every measurable function $g$ (which must be independent of parameter $θ$) the following implication holds:    $$     \mathbb{E}_\theta[g(s(X))] = 0, \forallθ \text{ implies that }P_θ(g(s(X)) = 0) = 1, \forall θ. $$    The statistic $s$ is said to be boundedly complete if the implication holds for all bounded functions $g$.   I read and agree with  that a complete statistic means that "there can only be one unbiased estimator based on it".   But I don't understand what Wikipedia says at the beginning of the same article:     In essence, it (completeness is a property of a statistic) is a condition which ensures that the parameters of the probability distribution representing the model can all be estimated on the basis of the statistic: it ensures that the distributions corresponding to different values of the parameters are distinct.    In what sense (and why) does completeness "ensures that the distributions corresponding to different values of the parameters are distinct"? is "the distributions" the distributions of a complete statistic? In what sense (and why) does completeness "ensures that the parameters of the probability distribution representing the model can all be estimated on the basis of the statistic"?  [Optional: What does "bounded completeness" mean, compared to completeness?]


I want the exact geographical distance between two address and it differs inthe Travelling mode in v3. please find the below code and the API file I called was  script type='text/javascript' src='//maps.googleapis.com/maps/api/js?key=xxxxxxxxxxx'  function showLocation(a,b)     {        alert(a.value);     geocoder = new google.maps.Geocoder();     geocoder.geocode(document.forms[0].address.value, function (response) {          if (!response || response.Status.code != 200)         {             alert("Sorry, we were unable to geocode the first address");         }         else         {              location1 = {lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address};             geocoder.getLocations(a.value, function (response) {                 if (!response || response.Status.code != 200)                 {                     alert("Sorry, we were unable to geocode the second address");                 }                 else                 {                 location2= {lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address};                 var x=calculateDistance();                  b.value = x;                         }         });     } });}  function calculateDistance(){ try {     var glatlng1 = new GLatLng(location1.lat, location1.lon);     var glatlng2 = new GLatLng(location2.lat, location2.lon);     var miledistance = glatlng1.distanceFrom(glatlng2, 3959).toFixed(2);     return miledistance; } catch (error) {      alert(error); }}

How do I calculate the distance between two points specified by latitude and longitude?  For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to understand the relative accuracies of the approaches available.


I am using Ubuntu 14.04 LTS along side Windows 7. I am trying to log into Ubuntu, but can't pass boot screen, doesn't matter how long I wait.    The problem started when I installed a series of software and tried to restart the system. The software were requirements of a course and are listed under title Software available through apt-get and Software available through easy_install in the following link:

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I'm building a sitemap for a page available in different languages, however the URL construction was done with subdomains and not folders. I'd like to know if it's possible to indicate a different sitemap for the subdomain pages inside the main page, as follows:  </url> <loc>http://www.example.com/</loc> </url> <url> <loc>http://fr.example.com/index-sitemap.xml</loc> </url> <url> <loc>http://es.example.com/index-sitemap.xml</loc> </url> <url> <loc>http://it.example.com/index-sitemap.xml</loc> </url> <url> <loc>http://blog.example.com/index-sitemap.xml</loc> </url>

I have more than 5 subdomains on a project, say developer, www, staff and some more, what is the best practice in creating sitemaps?   All subdomains that share a same sitemap at base domain (example.com/sitemap.xml) ? or different sitemaps for different subdomains?(developer.example.com/sitemap.xml and www.example.com/sitemap.xml)   Since the subdomains are several parts of the main application, what are the pros and cons of each, and what should I consider while choosing the one over the other? (one sitemap per subdomain or one for the whole site)


I was working on a server I have access to for a school project, which I am not an admin of it, and everything was working fine until recently, when  suddenly began to happen after I logged in using the normal ssh command.  Now, every time that I log into the server, the above occurs and I cannot use any command or anything else; anything I type is written, but nothing happens, and the normal command line does not appear either (the ..... $ before you type something in normal ubuntu server).  Is this something I did or would anyone know why this happened and why I can't use any commands or do anything once I'm logged into the server anymore? I looked for this problem and I found nothing related to this (the problem is not with ssh, I am able to connect to the server, but once I'm in it, I can't do anything).  Since I am only a user of the server and not an admin, the solutions on  do not seem to work for me. I'm connecting from a windows machine.

I'm using a GNU/Linux system remotely, via SSH.  I mistakenly added something into my $HOME/.bash_profile scriot which causes an error. (To be specific: I added an exec foo command instead of . foo, applied to another bash script without execution permissions, which results in an error.)   Now I can't seem to SSH, SCP or SFTP into my machine: bash, my login shell, tries to run the exec foo command, gets the error and throws me out! I don't have any other account I can access remotely.  Is there something I can do to restore access to the system?  Additional details:   Most ports other than for SSH are unavailable since the machine is behind a firewall. It's a Devuan 3 ASCII (~= Debian 10 Beowulf) system.


I'm using jquery and use a php file to display dynamic contents to different URLs. The php file takes the current url (referal) and it queries for respective content in the database:  $url =  $_SERVER['HTTP_REFERER'];   Here is the jquery:

    I know bots can fake url referal, but i'm not sure if it can get the content of my php file.  Anyone has experience with this? How to effectively hide that piece of content from bots?  Thank you very much.

Following on from my question on the , even if it's illegal people will still try, so:  What technical mechanisms can be employed to prevent or at least disincentivise screen scraping?  Oh and just for grins and to make life difficult, it may well be nice to retain access for search engines. I may well be playing devil's advocate here but there is a serious underlying point.


$\mathbf {The \ Problem \ is}:$ Let, $\mathcal N(X)$ be the set of all nets in a topological space $X$, and $\mathcal P(X)$ be the power set of $X.$ Let, $L : \mathcal N(X) \to \mathcal P(X)$ be a function such that $L\{x_{\sigma}\}_{\sum} = L\{y_{\gamma}\}_{\Gamma}$ whenever one of $\{x_{\sigma}\}_{\sum}$ and $\{y_{\gamma}\}_{\Gamma}$ is a subnet of the other . Define,  $\tau =\{V \subset X | L\{x_{\sigma}\}_{\sum} \subset V^c \text{for every net}  \{x_{\sigma}\}_{\sum}    \text{in} V^c\}$ Show that $\tau$ is a topology on $X.$ $\mathbf {My \ Approach }:$ Actually, I am having problem in showing that $V_1 \cap V_2$ is in $\tau$ when both of them are in $\tau.$ I tried by contradiction, let $\{x_{\sigma}\}_{\sum}$ is in $(V_1 \cap V_2)^c$  and let there exists $p \in J=L\{x_{\sigma}\}_{\sum}$ such that $p \in V_1 \cap V_2$ , then $L\{p\} \subset J \cap V_1 \cap V_2$ as $\{p\}$ is a constant net. Then, I tried to show there must be a subnet $\{y_{\gamma}\}_{\Gamma}$ of $\{x_{\sigma}\}_{\sum}$ such that $K=L\{y_{\gamma}\}_{\Gamma}$ is disjoint from $V_1\cap V_2.$ But, I can't show this . A small help is very much required at this time, thanks in advance .

Let $X$ be a non-empty set. $N(X)$ denotes the collection of all nets on $X$ and $\mathcal{P}(X)$ denotes the collection of all subsets of $X$. Let $T:N(X)\to \mathcal{P}(X)$ be a map satisfying the condition $T\{x_\lambda\}_{\Lambda}=T\{y_\gamma\}_{\Gamma}$ if one of $\{x_\lambda\}_{\Lambda}$ and $\{y_\gamma\}_{\Gamma}$ is a subnet of the other. Define $\tau=\{A\subset X|\ T\{x_\lambda\}_{\Lambda}\subset A^c\text{ for every net }\{x_\lambda\}_{\Lambda}\subset A^c\}$  We have to prove that $\tau$ is a topology on $X$. I have tried the problem in the following manner-  $\emptyset\in \tau$ since given any net $\{x_\lambda\}_{\Lambda}\subset (\emptyset)^c=X$, we always have $T\{x_\lambda\}_{\Lambda}\subset (\emptyset)^c=X$ . Again, $X\in \tau$ since $X^c=\emptyset$ Let $\{A_i|\ i\in I\}\subset \tau$. Then let $\{x_\lambda\}_{\Lambda}\subset \left(\bigcup A_i\right)^c=\bigcap A_i^c\implies \{x_\lambda\}_{\Lambda}\subset A_i^c\ \forall i\implies T\{x_\lambda\}_{\Lambda}\subset A_i^c\ \forall i\implies T\{x_\lambda\}_{\Lambda}\subset \bigcap A_i^c=\left(\bigcup A_i\right)^c$. Hence, $\bigcup A_i\in \tau$. Let $A,B\in \tau$ and $\{x_\lambda\}_{\Lambda}\in (A\cap B)^c=A^c\cup B^c$. Now we have to prove $T\{x_\lambda\}_{\Lambda}\subset A^c\cup B^c$. Now I define $\Gamma=\{\lambda\in\Lambda|\ x_\lambda\in A^c\}, \Sigma=\{\lambda\in\Lambda|\ x_\lambda\in B^c\}$. Now if I can prove at least one of $\Lambda_1,\Lambda_2$ is directed set then I will construct a subnet of $\{x_\lambda\}_{\Lambda}$, and use the property of $T$ to achieve our goal. But I'm to prove that at least one of $\Gamma,\Sigma$ is directed set, although I have shown that both $\Gamma, \Sigma$ satisfies reflexivity and transitivity condition. But we have to show the third condition which is $$\text{If }\lambda_1,\lambda_2\in \Gamma\text{ (or }\Sigma\text{)}, \exists \lambda_3\in \Gamma\text{ (or }\Sigma\text{) such that } \lambda_3\ge\lambda_1,\lambda_2$$  Can anyone help me with this regard? Thanks for your help in advance.


Well I retopologized the object and now I am having trouble with the mirror of it. It keeps mirroring int he wrong area and is not matching up equally. Also my verticies at the end of my mesh that would connect the mirror are not alligned properly. Can someonehelp. I have pictures below.

When I add a mirror modifier it sometimes doesn't mirror correctly, giving me an overlapping mesh. How can I fix this?


Let's consider a group $G$ and a subgroup $H$. We note the quotient group $G/H$ My question is: why this notation and the notion of "quotient" ? Is the motivation only because from Lagrange theorem for finite groups, where we have $|G/H|=|G|/|H|$ or there are deeper reasons ? Maybe I am lacking some intuition to see further motivations. Note: I am by far not an expert of group theory, I only know the basics so I expect an answer following the same logic =)

Who decided to call quotient groups quotient groups, and why did they choose that name? A lot of identities such as $$\frac{G/A}{B/A}\cong \frac{G}{B}$$ suggest that whoever invented the notation understood these things a lot better than I do...  Edit: I'm also interested in the notation; I was assuming that the notation and terminology went together, but perhaps that is not the case.


I am trying to understand my exercise but I still couldn't understand my teacher so I wonder if anyone please can help me?  How many ways are there of arranging the letters in the word BANANA? The answer was 6! / (3!2!)  I get the 6! but I dont understand why it isn't 3!3!, why 2!? Thank you for your help

The English alphabet consists of 26 letters, 6 of which (A, E, I, O,   U, Y) are vowels and the remaining 20 are consonants. If each letter   has the same probability of being chosen, what is the probability of   forming a 7- character string such that 3 of its characters are   vowels, 3 of its characters are the letter B, and the remaining one is   a consonant different from B?   The # of ways in which we can make any word using 26 letters (With repetition) is 26^7.  Out of the 6 vowels, we need to choose 3 (6C3) and put them in 3 of the 7 places available (order is important) so we have 7!/4!.  There's only one way to choose B, and since it's the same letter the order is not important so we choose 3 places out of the 4 places left.  We have 19 consonants left, we choose one and have only 1 place left for it.  This is the logic I've followed to go through this problem, still I always get a probability of 2.575 *10^-3 which is wrong, the correct answer is 7.154 *10^-5.


For pedagogical purposes, I am looking for an elementary proof (i.e. without resorting to the maximum principle) that $f_a(z):=\frac{z-a}{1-\overline{a}z}$ maps the unit disk into itself when $|a|<1$. The usual argument (at least usual for me) is to look at $f_a(e^{it})$ and check that $|f_a(e^{it})|=1$. Then we are done by the maximum principle and the fact that $f_a(a)=0$. However, I cannot help but think that there should be an elementary way to do this, using only basic facts about complex numbers such as the triangle inequality. Unfortunately I am running into circles.

Consider the complex mapping defined by $$f_a(z)=\frac{z-a}{\bar az-1}$$ for some constant $a.$ I want to show that $f$ maps the unit circle to itself. I know that the unit circle is defined by $|z|=1,$ or equivalently $z=e^{i \theta}.$ This gives me $$f_a(z)=f_a(e^{i \theta})=\frac{e^{i \theta}-a}{\bar a e^{i \theta}-1}$$  I'm not sure how to proceed from here though.   Additional question: I also want to show that of $a$ lies inside the unit disk then $f$ maps the unit disk to itself. In order to answer this I have shown that $$|\bar a z-1|^2 - |z-a|^2 =(1-|a|^2)(1-|z|^2)<1$$  How am I able to use this to deduce the result?


Suppose $x_{1}>0$, and consider the sequence, $\{x_{n}\}$ defined as follows: $$x_{n+1}=\log(1+x_{n}) \quad n\geq 1 $$ Find the value of $\displaystyle \lim_{n \to \infty} nx_{n}$  I am having trouble solving it. One thing is clear, that since $x_{n}>0$ and $x_{n+1} < x_{n}$, we can have a sequence which converges an $f$ which satisfies $f=\log(1+f)$, so that $f=0$. Any way as to how we can proceed from here.

Suppose that $a_{n+1}=\log(1+a_n),~a_1>0$. Then find $\lim_{n \rightarrow \infty} n \cdot a_n$.   I can find $\lim_{n \rightarrow \infty}a_n=0$. But I have no idea how to find $\lim_{n \rightarrow \infty} n\cdot a_n$. (In this problem, $\log$ denotes the natural logarithm.) Could you give me key idea about solving this problem?


I can able to activate the drop down and able to select the value from it sometimes but sometimes i can't able to select the option for the drop down and i am facing an timeout error.  Code:  driver.findElement(By.xpath("//*[@id='tabstrip-2']/div[1]/span/span/span[2]/span")).click(); Thread.sleep(15000); driver.findElement(By.xpath("//*[@id='ddlschedule_listbox']/li[2]")).click();   Error: Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with Command duration or timeout: 35 milliseconds

This is a canonical question, intended to provide a comprehensive answer to many related questions.  I understand the basics of working with Selenium Webdriver; I can navigate to pages, click buttons, and type into text boxes. But now I want to do things with dropdown boxes (also known as "Select" boxes).  How can I perform common tasks like iterating over the options in the dropdown or selecting options from the dropdown?


I am trying to copy my public key on a VPS.  After I connect I run the following  xclip -sel clip < ~/.ssh/id_rsa.pub   Xclip gives me a can't open display error.   Right now I manually open the file and copy the key. There has to be a better, faster way to do this.

I am lazy at home and use password authentication for my home machines. I am ready to move to key based authentication. There are many options on the web on how to do this, including catting then sshing the key over, scping the key over directly, etc.  I am looking for the easiest and recommended way to copy a key over, hopefully there is a convenience wrapper somewhere in the Ubuntu ssh package?  I'm already aware on .


Let $f$ and $g$ linear operators in $V$ which are both diagonalizables. We say that $f$ and $g$ are simultaneously diagonalizables if there exists a basis $\alpha$ of $V$ in which both $\mathop {\left[f\right]} \nolimits_\alpha ^\alpha$  as $\left[ g \right]_\alpha ^\alpha $ are diagonal matrices. Prove that $f$ and $g$ are simultaneously diagonalizables if and only if $f$ and $g$ commute.

Two $n\times n$ matrices $A, B$ are said to be simultaneously diagonalizable if there is a nonsingular matrix $S$ such that both $S^{-1}AS$ and $S^{-1}BS$ are diagonal matrices.      a) Show that simultaneously diagonalizable matrices commute: $AB = BA$.      b) Prove that the converse is valid, provided that one of the matrices has no multiple eigenvalues. Is every pair of commuting matrices simultaneously diagonalizable?   My attempt:  a) Let $M=S^{-1}AS$ and $P=S^{-1}BS$, then it follows that $A= S^{-1}MS$ and $B=S^{-1}PS$. Thus $AB =S^{-1}MSS^{-1}PS = S^{-1}MPS = S^{-1}PMS$ (is it wrong that I switched MP to PM?) $=S^{-1}PSS^{-1}MS=BA$.   b) How can I do this?


I am searching a command that gives me the file create time in a folder.

Possible Duplicate:          Is there a command in Linux which displays when the file was created ? I see that ls -l gives the last modified time, but can I get the created time/date?


Imagine we have a function $f : \mathbb{R} \to \mathbb{R}$ which is differentiable over an interval $[a,b]$. Does differentiability over $[a,b]$ imply that the derivative $f'$ is continuous over $(a,b)$?  Intuitively, this seems right since differentiability implies that $f$ is "locally linear". And thus $f$ should have roughly the same slope at all points in a small region. But I haven't been able to prove this statement. A direct proof is a little technical, involving the absolute difference of limits of ratios.  More generally, does the same hold true for functions differentiable over a region in $\mathbb{R}^n$? Intuition again tells me yes, but there could be counter examples.  And finally, assuming the statements above are true, how might I prove them, or alternatively, where might I find a proof?

If a function $f$ defined on $[a,b]$ and differentiable everywhere, does it mean that its derivative $f'(x)$ is continuous everywhere on $[a,b]$?  My understanding is 'yes'. Because if there were 'a gap' in $f'(x)$, we could integrate back to $f(x)$ and show that where the gap is, there would be a sharp "angle" where $f(x)$ is not differentiable.


I know that there are three command to update and then upgrade the whole system, these are:        sudo apt-get update        # Fetches the list of available updates   sudo apt-get upgrade       # Strictly upgrades the current packages   sudo apt-get dist-upgrade  # Installs updates (new ones)      Is there a super-upgrade command that combines all these commands to one?

So, is it possible to update and upgrade without running:  sudo aptitude update && sudo aptitude upgrade   Meaning, is there one command that can do both?


Yesterday I installed Ubuntu 12.04 for the first time (I've always been a Windows user) as I was at the office and I had the Ethernet connected. At home I only use WI-FI. When I started Ubuntu it didn't connect or try to connect with any network. By google, I found the command rfkill and these are the results: 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no  1: brcmwl-0: Wireless LAN     Soft blocked: no     Hard blocked: no  2: dell-wifi: Wireless LAN     Soft blocked: yes     Hard blocked: yes  3: dell-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no  Well, the WI-FI is blocked by hardware, so I tried the command rfkill unblock 2 and it didn't work. As I didn't know even my Broadcom model, I found lspci and the result for the WI-FI is: 0e:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)  My laptop is a Dell Vostro 1520 with WinXP also installed. Thanks for the help! PS: It also may help that when I enter System Settings > Network (it may be different, my Ubuntu is in Spanish) "Airplane Mode" is connected. When I try to unlock it, it goes to its original place after I close that window and open it again and when I reboot.  Update added from comment to an answer The Broadcom "Additional Drivers" are turned on and enabled.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


There are two Generic list of Inspectors and InspectorRates.   RateType has three different values (0 = Not Select ,1 = Day Rate ,2 = Hourly Rates).  I want to show all inspectors with Day Type Rate first and then lowest rate. If user selects option "Hourly Rates" then list needs to be sorted by Hourly Rate and thenlowest rate. Not seleted rate will always be at the bottom.      I have tried LINQ but its not working.  listI.OrderBy(Function(i) i.DefaultRate.RateType = Rates.RateTypeEnum.Day_Rate).ThenBy(Function(i) i.DefaultRate.Rate)

Similar to , we want to sort by one element, then another.  we want to achieve the functional equivalent of   SELECT * from Table ORDER BY x, y     We have a class that contains a number of sorting functions, and we have no issues sorting by one element. For example:    public class MyClass {     public int x;     public int y; }    List<MyClass> MyList;  public void SortList() {     MyList.Sort( MySortingFunction ); }   And we have the following in the list:    Unsorted     Sorted(x)     Desired ---------    ---------    --------- ID   x  y    ID   x  y    ID   x  y [0]  0  1    [2]  0  2    [0]  0  1 [1]  1  1    [0]  0  1    [2]  0  2 [2]  0  2    [1]  1  1    [1]  1  1 [3]  1  2    [3]  1  2    [3]  1  2   Stable sort would be preferable, but not required. Solution that works for .Net 2.0 is welcome.


I have applied to 4 PhD applications in Computer Science and I have sent an introduction email to a professor in each of the schools I have applied to. In this email I first introduced myself and then mentioned one of their papers I'm interested in, and at the end asked them for any time they can give me to meet them in person and talk to them about my future plans.   But, I just heard from one professor and the rest have not replied my email after two weeks. How could I write an email to remind them about my old email I sent them?   I googled and did not find a concise answer. Any help is appreciated.

Say a prospective PhD has a high reply rate (90-95%) to first contact emails with potential superviors. He/She has a well thought out e-mail, but a particular professor (here: USA) that is in the top preferences does not reply after two to three e-mails that were sent within a time frame of three months. I also followed the instructions on the professor personal website in the section "prospective PhD students". The student has already contacted some of the advisor students and has received positive feedback about the professor.  Should the student just give up and move on? Should the student keep trying?  Aside from the obvious "I have too many incoming e-mails to answer" or "I am out in the field", what could create a no response behavior from the professor?  I have seen the simplistic answer "move on, bad advisor, doesn't have time, etc". But this seems a contradiction in this case. The PhD students like the professor and say he/she is personable and no e-mail response after a few well written emails.


Exercise 6: Matching Repeated Characters Task    Text      Match   wazzzzup    Success Match   wazzzup Success Skip    wazup   I came up with [waz{2,3}up].  What I meant was matching character w, a and z, with z in repetition 2-3 times, followed by u and p. But without [] was the answer

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


When I tried to connect my Ubuntu 13.10 to my VM Centos 6.5 using ssh appear the message "Connection refused" or "No route to host" even than I change the port, noting change.   I need to use SSH, VPN and Samba, but this IP in my VM Centos do not work.   How Can I resolve this problem?


I'm trying to get the value of 3072*0.114166238877481 and I'm getting different result from different methods.   I tried with Nodejs= 3072*0.114166238877481 returns 350.7186858316216 PHP gives up 350.7186858316216 after precision=17 in php.ini.  If i increase any more then it spits out a totally different value like    350.718685831621599. From my Windows 10 (or Ubuntu 16.04 and Centos 6) built in calculator (standard mode) I get the same result. Also tried some online java compilers which also gives the same result   However, with Windows 10 built in calculator(Scientific mode) I get 350.718685831621632 which is the expected result.  How do I get the expected value from Nodejs or with PHP

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


I have a calculated filed column in one document library which used to display and Image icon with a hyperlink attached to this. But it seems Microsoft has stopped supporting this feature.   Can Some suggest me some alternative or quick fix to resolve this production issue. Any help will be appreciated!

On June 13th 2017 all SharePoint calculated columns with HTML markup stopped working.   Basically the fields now render text (regardless of setting the data type to number). The gist of the notice from Microsoft () is:     In Microsoft SharePoint lists and libraries, calculated fields that   are running in the classic UI mode can be used to display results   based on Excel-like formulas. This is a long standing capability, and   is documented in Calculate data in lists or libraries.      Some users have added HTML markup or script elements to calculated   fields. This is an undocumented use of the feature, and we will begin   blocking execution of custom markup in calculated fields in SharePoint   Online from June 13, 2017 onwards. We are also providing this as a   configurable option for on-premises in SharePoint Server 2016 and   SharePoint Server 2013 via the June 2017 and subsequent Public   Updates.   As we don't have on premise SharePoint (online), we have to find an immediate work around, given that this impacts our processes and thus, business.   Is anyone aware of third party applications that will allow for HTML, script markup (that works with SP online)?


Here's a picture of my monitor setup:    I'm wondering if it's possible to fill the gap between display 5 and display 3, so that I don't have to pull the mouse down and move around it.  Edit: Without having to reposition any of the displays.

I have 2 monitors. The main one is horizontal, the secondary one is vertical.    When moving from the right to the left monitor, if the mouse hits the areas I've shown in red, it gets stuck. I would like to change this behavior.  Whenever the mouse hits any part of the tall monitor's left edge, it should be wrapped to the wide monitor's right edge. I don't particularly care where on the edge it gets wrapped: It's fine if it's just the closest point like I've shown in the image (dashed line is the wrap/teleport).  How can I do this?


I have designed a circuit where I want to give a pulse of very short duration using a switch. How can I implement it in spice.

I am trying to simulate ON, OFF switch in this simple circuit:  V1 0 1 1.5v Rfan1 3 4 1 S1 1 4 SW ON Rwire1 6 5 0.00001 VV1 0 2 dc 0  VRfan1 3 5 dc 0  VRwire1 2 6 dc 0  .dc V1 1.5 1.5 1 .print dc i(VV1) i(VRfan1) i(VRwire1)  .end   but I got this error:  ngspice stopped due to error, no simulation run!   the circuit I am trying to simulate is like this one:    if I replace the switch with a resistor, the circuit will work normally.  any idea? EDIT  I have fixed my switch as the following:  S1 1 4 98 99 mySwitch ON .model mySwitch SW vt=0 vh=1 ron=1n roff=10k


Is it possible to create a keyword in python that's equivalent to inheriting a class? So given class: class Hello:   pass  I could write keyword Custom:  pass  which would be equivalent to class Custom(Hello):   pass

Can you add new statements (like print, raise, with) to Python's syntax?  Say, to allow..  mystatement "Something"   Or,  new_if True:     print "example"   Not so much if you should, but rather if it's possible (short of modifying the python interpreters code)


I spent many many hours, consulting many blogs and even answers in tex.stackexchange, trying to install mtpro2 into Windows 8.1 with the MikTeX is 2.9.6677. Unfortunately I have been able to do that. I would be very thankful if someone can please explain step by step how to install it assuming I don't know anything about MikTeX.  Thanks

MiKTeX has changed its look by introducing the MikTeX Console:    In the past I have always updated and added fonts not included in the MikTeX distribution using the mask Settings, Update and Package Manager.  Now I don't understand the procedure for installing additional font packages  not included into the MiKTeX distribution (for instance, the mtpro2 and `classico packages) using the MiKTeX Console.   Please can you help me and explain, step by step, how do I install these fonts using the MiKTeX Console?


We can solve the linear congruence with Euler's phi function: $$105\hspace{3pt} X ≡ 15\hspace{3pt} mod \hspace{3pt}24 $$ Where $$a = 105, b=15,m=24$$ As $$\phi(m)=\phi(24)=8\rightarrow (105)^7 ≡ 9\hspace{3pt} mod \hspace{3pt}24 $$ $$\rightarrow X ≡ 15\hspace{3pt}\hspace{3pt}(9)\hspace{3pt} mod \hspace{3pt}\hspace{3pt}\hspace{3pt}24 ≡ 15\hspace{3pt} mod \hspace{3pt}24$$ The solution is: $$ X ≡ 7\pm 8 N $$ Where N is a natural number.$$$$ But when we try to solve this linear congruence with Euler's phi function: $$192\hspace{3pt} X ≡ 24\hspace{3pt} mod \hspace{3pt}27 $$ Where $$a = 192, b=24,m=27$$ We find that $$\phi(m)=\phi(27)=18\rightarrow (192)^{17} ≡ 0\hspace{3pt} mod \hspace{3pt}27 $$ That's mean we cannot solve this second linear congruence with Eules's phi function$$$$ I know that the solution for the second linear congruence is: $$ X ≡ 8\pm 9 N $$ I do not know why i can not solve this second linear congruence with Euler's phi function ? Can any one help me?

I know how to compute modular multiplicative inverses for co-prime variables $a$ and $b$, but is there an efficient method for computing variable $x$ where $x < b$ and $a$ and $b$ are not co-prime, given variables $a$, $b$ and $c$, as described by the equation below?   $ a x \equiv c \mod b $   For example, given  $ 154x \equiv 14 \mod 182 $, is there an efficient method for computing all the possibilities of $x$, without pure bruteforce?  Please note that I'm not necessarily asking for a direct solution, just a more optimized one.    I do not believe that the Extended Euclidean Algorithm will work here, because $a$ and $b$ are not co-prime.   Edit:  Follow up question, since the first one had a shortcut:  Could the be computed efficiently as well?  $12260x \equiv 24560 \mod 24755$.  $107$ needs to be one of the computed answers.


class Perl {    private int value;     public Perl()    {       this.value++;    }     public void display()    {       Console.WriteLine("B called: " + this.value);    } }  namespace ConsoleApplication1 {    class Program    {       static void Main(string[] args)       {          Perl perl1=new Perl()          perl1.display();           Perl perl2=new Perl()          perl2.display();       }    } }   So I have been reading tutorial on "this" here and there trying out example codes and see what happens when I take out "this" from variables. From my understanding, "this" is a reference to an object (instance of a class) such as perl1 and perl2 in the code.  When I took out "this" from "this.value++" and "this.value", "value" and "this.value" remained the same. Is "this" even needed in this case since perl1 and perl2 are instantiated and have their own variables? (perl1's value and perl2's value are separate right?) If that's the case, why is "this" even needed or used since all the variables belong to the separate objects?  I want to start using "this", but every time I try to learn about it, the more confused I get.  Would someone explain this to me?

I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:  In a constructor:  public Light(Vector v) {     this.dir = new Vector(v); }   Elsewhere  public void SomeMethod() {     Vector vec = new Vector();     double d = (vec * vec) - (this.radius * this.radius); }


How are you supposed to write nested if statements in lambda functions?  I'm trying to use a filter function using lambda:  final_list = filter(lambda x: False if isinstance x(float) or isinstance(x, int) if x<5, another_list)   What I'm trying to do is:   Check if the value is float or int If float or int, check if < 5 If < 5, return False so filter will move on to next element of list.   My error says that my nested if x < 5 is invalid syntax.

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


Which version of Ubuntu can i install on my imac G5 Power PC.  It has 1 GB RAM, Power PC 1,6 processor, and nVidia GeForce FX 5200.  14.04 Trusty Tahr will be ok?  Thanks

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


This problem occured when trying to update using the update manager. A problem occured so I cleared all the cache and tried to update once again this time in terminal, and it spat out:   dpkg: error: parsing file '/var/lib/dpkg/status' near line 6449 missing package name   After opening up 'status' with gedit and going to line 6449, I found that nothing was on that line but the following was before and after it.  This package contains the Mono System.Configuration library for CLI 4.0. Original-Maintainer: Debian Mono Group <pkg-mono-group@lists.al)oth.debian.org> Homepage: http://www.mono-project.com/                                                    <<<<---- LINE 6449 Package: bzip2 Status: install ok installed Priority: optional Section: utils Installed-Size: 160 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>   <<<<--- LINE 6449 is obviously not on the file, but I can't see whats wrong here? anybody have an idea? I have tried running:  sudo apt-get install --fix-missing sudo dpkg --clear-avail   But no good...  I've read the duplicated but my issue isn't listed there since I haven't deleted the directory.

When I try to install any software, I encounter this error, and therefore I cannot update.  Preconfiguring packages ... dpkg: error: parsing file '/var/lib/dpkg/status' near line 51245 package 'oracle-xe':  mixed non-coinstallable and coinstallable package instances present N: Ignoring file 'gcl' in directory '/etc/apt/sources.list.d/' as it has no filename extension N: Ignoring file 'gcl' in directory '/etc/apt/sources.list.d/' as it has no filename extension E: Sub-process /usr/bin/dpkg returned an error code (2)


I know its not correct to ask for work flow, but I am learning by doing and now I don't know how to move on.  I'm trying to make new raster which will represent the facing sides of hill around a factory. Then I'll use wind data (.csv) file to get which of these sides are more often under blowing wind. Wind data are for 10years, and the average is north-west flow.  I was looking for some index but I couldn't find one. So is there any chance to make it with the QGIS raster calculator?

I have a raster height model and would like to calculate the horizontal geographic direction (north, east, etc. - orientation) of each cell, then calculate then the mean value of all these cells in one region (polygon). This is to get information about to what direction a vineyard is exposed to. How do I do this?


I'm trying to practice finding the fundamental solution of Pell Equations, but have not found efficient ways of finding fundamental solutions. However, it seems that using  would provide an effective way of finding these solutions, according to the link. To better understand how to actually use continued fractions through examples (with numbers),      How would you find the fundamental solution of $x^2 - 95y^2 = 1$ and of $x^2 - 74y^2 = 1$ using continued fractions?

It is quite straightforward to find the fundamental solutions for a given Pell's equation when $d$ is small. But I am unable to solve this equation, as I'm unable to find the fundamental solutions:  Solve: $x^2-29y^2=1$ and $x^2-29y^2=-1$ with $y\not=0$.  Could you please guide me through the solution


Hi I want to display my web site and list it in the top searches in Google, Bing and Yahoo search engine? How should I proceed and what do I need to do(i can't spend money to promote my web site)

What are the best ways to improve a site's position in the Google search results?


Prove $$\sum^{\infty}_{n=1} \frac{a_{n}-a_{n-1}}{a_{n}}=\infty$$ Where $a_{n}$ is an increasing sequence of positive terms that goes to infinity.  I tried to approach it with $\log(a_{n})$ like a classical version of this problem but i could not show that the difference with respect to the logarithm is finite. Any help or hint will be appreciated

So I've been trying to figure out how to prove the following.     Let $(a_n)$ be a sequence of positive numbers such that $\sum\limits_{n=1}^\infty a_n =\infty$, and define $s_n=\sum\limits_{i=1}^n a_i$. Then $\sum\limits_{n=1}^\infty\frac{a_n}{s_n} =\infty$ as well.   I can prove it by comparing it to $\int_1^\infty \frac{1}{x} \, dx $ if the sequence $a_n$ is bounded by some $M$, but that's as far as I've been able to get.


My question is pretty straightforward and I would like to extend my knowledge about the matter of improving SQL queries perfomance-wise.  I am very often faced lately with bequithed scripts from my collegues who are a bit "messy" when writing scripts.  They write join clauses the old way by writing tables one after another delimited with commas.  I know that output wise those scripts are the same, but can there be a perfomance improvement by rewriting those scricts into the classic join clauses?  EDIT: So I have rewritten the poorly written code and I have together 3 examples, however only as pictures the formatting was really crazy, maybe I can later reformat it again - here is the album   So on the first picture is kind of a mixed approach between joins and cartezian products, it took 35 minutes to run the result.  The second picture is my rewritten code - it took a little over a minute to gain the same result.  The last one I have specifically rewritten the code to only cartezian products - it runs for an hour now and I dont know when it will stop.  So can anyone help me get some usefull information from the stats in the pictures? Which indicators are good to look at for performance? Because the approximated time of the last approach was the least, however it turns out it is the slowest one.  Thank you.

Is there a difference in performance (in oracle) between  Select * from Table1 T1  Inner Join Table2 T2 On T1.ID = T2.ID   And  Select * from Table1 T1, Table2 T2  Where T1.ID = T2.ID   ?


I am new to snap packages and all. I want to install 'pycharm community' snap package when I'm having a problem while using sudo install pycharm-community snap it says install: cannot stat 'pycharm-community': No such file or directory what should I do ?

When I want to install Pycharm-Community this message appears:


I am self studying Elementary number theory from David Burton Book. While trying exercises of Section 2.5 , I am unable to think about this problem      If a and b are relatively prime positive integers, prove that Diophantine equation ax-by =c has infinitely many solutions in the positive integers.    Can someone please help in how to solve this problem!!

I want to find a set of integer solutions of Diophantine equation: $ax + by = c$, and apparently $\gcd(a,b)|c$. Then by what formula can I use to find $x$ and $y$ ?   I tried to play around with it: $x = (c - by)/a$, hence $a|(c - by)$.     $a$, $c$ and $b$ are known. So to obtain integer solution for $a$, then $c - by = ak$, and I lost from here, because $y = (c - ak)/b$. I kept repeating this routine and could not find a way to get rid of it? Any hint?  Thanks, Chan


I have to prove that $\sum_{k=1}^{n} (-1)^{k+1}\binom{n}{k}=1.$ I tried to prove that by induction, with the base case trivial. By the binomial coefficient property we have that $\binom{n}{k}=\binom{n-1}{k}+\binom{n-1}{k}$. So if we add the summatory and separate the n term in the summatory we have that: $\sum_{k=1}^{n} (-1)^{k+1}\binom{n}{k}=(-1)^{n+1}\binom{n}{n}+\sum_{k=1}^{n}(-1)^{k+1}\binom{n-1}{k-1}+\sum_{k=1}^{n}(-1)^{k+1}\binom{n-1}{k-1}=(-1)^{n+1}+1+0\neq1$. (Where the last equality comes from induction hypotesis and by the property $\sum_{k=0}^{n}(-1)^{k}\binom{n}{k}=0$) Where am i wrong?

Show that $$\sum_{k=0}^n(-1)^k\binom nk=0$$ So for odd $n$ we have an even number of terms. So $\binom nk=\binom n{n-k}$ which have opposite signs. Thus the sum is 0.  For even $n$ we have that $$\sum_{k=0}^n(-1)^k\binom nk= \binom n0+\sum_{k=1}^{n-1}(-1)^k\binom nk+\binom nn$$ Now $$\sum_{k=1}^{n-1}(-1)^k\binom nk= \sum_{k=1}^{n-1}(-1)^k\left[\binom{n-1}k+\binom{n-1}{k-1}\right]$$ What would that sum be in the square brackets?


So say I've got a file with the following text in it.  And the source file I'm reading is like this:  #0  abc 2016-08-06 01:12:57 AM  9.1%    779.9M of 1G    156.3M of 1G #1  abc 2016-08-06 02:33:47 AM  12.1%   339.9M of 1G    126.3M of 1G   The following is the script I'm using  #!/bin/bash  opFile="opfile.txt" sourceFile="TestOutput"      if [[ ! -e "$opFile" ]]     then     {         touch $opFile         count=0         grep "#" "$sourceFile" | while read -r line ; do         {             cpu=$(grep "#$count" "$sourceFile" | cut -f 4 | cut -d% -f1)             mem=$(grep "#$count" "$sourceFile" | cut -f 5 | cut -dM -f1)             disk=$(grep "#$count" "$sourceFile" | cut -f 6 | cut -dM -f1)             echo -e "$cpu\n$mem\n$disk" >> "$opFile"             ((count++))         }            done      }     else     {         count=0         lineCounter=0         grep "#" "$sourceFile" | while read -r line ; do         {             cpu=$(grep "#$count" "$sourceFile" | cut -f 4 | cut -d% -f1)             mem=$(grep "#$count" "$sourceFile" | cut -f 5 | cut -dM -f1)             disk=$(grep "#$count" "$sourceFile" | cut -f 6 | cut -dM -f1)             ((lineCounter++))             sed ""$lineCounter"s/$/,"$cpu"/" "$opFile" | tee "$opFile"             ((lineCounter++))             sed ""$lineCounter"s/$/,"$mem"/" "$opFile" | tee "$opFile"              ((lineCounter++))             sed ""$lineCounter"s/$/,"$disk"/" "$opFile" | tee "$opFile"              ((count++))          }         done     }     fi   Now, the script needs to be run multiple times on that $sourceFile since the numbers in that file would keep changing. So the first time the script runs, the output is so  9.1 779.9 156.3 12.1 339.9 126.3   And the second time it runs (assuming the values are the same in the source file), the output should look like.  9.1,9.1 779.9,779.9 156.3,156.3 12.1,12.1 339.9,339.9 126.3,126.3   Now, the sed line I've used is correct, I'm pretty sure, but I'm having issues when it comes to putting that in the file. I could've used the >> output redirecter but that's printing everything on a new line. Tee is working slightly unexpectedly, sometimes it'd doing the right thing, other times, my opfile.txt is empty. Any idea on how to put my sed output in the file correctly? And no, preferably, I wouldn't want anything displayed on the stdout.  Thanks!

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


I want to find the limit of the sequence $((1+\frac{1}{n})(1+\frac{2}{n})\ldots (1+\frac {n}{n}))^{\frac{1}{n}}$. Applying GM$\leq AM$ we can show that limit of this sequence is less than or equal to $\frac{3}{2}$. Also we can show that this limit is greater than or equal to $1$. But this will not help. How to proceed? I am not getting any idea.

How do I evaluate the limit of the following sequence $$a_n  = \left(\left( 1 + \frac1n \right) \left( 1 + \frac2n \right)\cdots\left( 1 + \frac nn \right) \right)^{1/n}$$   I tried to take log and then using cauchy $1^{st}$ theorem of limits but I coudn't do it.  Could someone kindly help?


When updating packages like docker in Ubuntu using apt the systemd file for docker is reset to it’s default. I have a modification in the systemd file for docker which points the volume to another drive. When I update docker it resets the systemd file to default. Is there a way when a package is update via apt to keep the modified systemd file the same?

Many sysv init scripts used a corresponding file in /etc/default to allow the administrator to configure it. Upstart jobs can be modified using .override files. How do I override or configure systemd units, now that systemd is the default in Ubuntu?


Just out of curiosity, I was wondering how it is possible to write a LaTeX document which, when compiled, generates a document that contains exactly its own source code (i. e. a ).   Since LaTeX is Turing-complete, there's an argument from theoretical computer science which ensures the existence of such a document, but it seems rather hard to actually construct such a program.  I hope that someone is able to come up with a nice solution to this brainteaser.

Since TeX and LaTeX can print out any text, it should be possible to write a self-replicating document, i.e., a document that is typeset as a PDF/DVI of itself. Have you seen something like that?


For example, Jane Austen's carriage went up and down the hills like a roller coaster.

What is the word for the mistake of placing an event or object in the wrong age or decade, such as a film star in a movie about Roman times wearing a robe made of nylon?


Ubuntu 20.04 Buldgie using Arc Design desktop tweak. Tried super key right click, window not max on top & resize cursor. Always on top option does not show.

I have just updated to 18.04, and cannot right-click and get the little menu to select "Always on top" for Firefox/Chrome, but I can do so for the terminal, pdfs, etc. (along with other things like Minimize, Maximize, Move, etc.)  It appears to be a known issue (), but does not, as far as I can see, have a known fix... Thoughts appreciated. Thanks.


When I send message on iMessage, it’s sent from my e-mail, which I am logged in iCloud with i.e. my Apple ID, not my phone number. In Settings → Messages → Send and Receive(?), is not my number, just my Apple ID e-mail.    Screenshot from Send and Receive:    receive and send iMessages over  What I have tried:   Disabling iMessages & FaceTime on both devices(iPhone and iPad), then restart and then enabling it again. Logging out from AppleID in Settings → Messages → Send and Receive(?). Adding my phone number in Settings → AppleID → Name, Phone Numbers, e-mail.   Neither of these worked!

When iOS 5 first came out, I added my @me address to my iPhone and iPad. People could iMessage me at my email address, and I'd see it on both devices. This wasn't always perfect, and recently I decided to forgo this, and just use my phone number on my phone and email address on the iPad.  So, I switched the caller ID on my phone to the phone number again, deleted all my text message threads that were created when I was using the email address, and started a new thread. Somebody who didn't have my email address saved in their contact asked why my text messages were coming from an email address, and another reception confirmed that when he tapped 'Contact Info' at the top of the message thread, my email address was highlight in blue, NOT my phone number - indicated that this is where the message was coming from.  Does anybody know why this is happening? Is there another setting I need to change? I'd really prefer to not have them come from my email address, because then any replies will goto both my phone and my iPad - which I don't want.


If a user has a certain number of questions that were closed or put on hold, that user cannot ask more questions for a certain time (or even prevented from asking at all). For those with close privilege, is there a rule that say something like if you improperly close or put a question on hold, then you'd be suspended from doing so for some time? So that people won't be trigger-happy with the close button? This seems... unbalanced.

I just  marked as a duplicate by a user, who didn't seem to have read the content of the post, and left a "Read the documentation." comment,  without even giving any additional explanation.   The post then got enough votes to be re-opened after other users pointed out that the proposed dupe wasn't the same problem.  My problem was eventually solved, but I couldn't help but wonder if users should get some sort of notice or warning for incorrectly closing a post that is eventually reopened?


I have searched the internet trying to find a good answer for this question. What I mainly found is suggestions to move the variable in the global scope, or using the functions as parameters for the function I want to use the variable in, but without explanation on how that works  To explain my dilema, lets say we have this piece of code:  function foo(){  var x = 2; }  function bar(){  var z = 2; }  function compare(foo,bar){  if ( z === x ) {   console.log("text"); } }   This is the problem I'm facing. Is the code I've written above correct and if I call the compare() function it should console log "text" ?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I have a MacBook Air and just updated to macOS Sierra, which automatically installed the "Photos" app to replace my old "iPhotos" app. As I scrolled through the "Photos" app sidebar I checked to see that all of my photos were there in the "Photos" folder (at the top of the sidebar). Then I scrolled down to the "Recently deleted" folder and to my horror saw a huge number of my images shown under the advisory that these photos would be permanently deleted in 28 days! They are  photos that I didn't delete from iPhotos or Photos, and I don't want them deleted. I looked again at the "Photos" folder and saw that those same photos — the ones destined for deletion in 28 days — were also showing up in the "Photos" folders. I don't need two copies of them but I am wondering if they are safe if I see them in the "Photos" folder?  Now I did keep copies of my images both in my old iPhotos app and in another photo app (called My Pictures), and I did recently delete a large number of them from my "My Pictures" file to get more disk space, but I didn't delete the duplicates of those same photos from my iPhoto files. Is it possible that the photos I now see as listed for deletion (under Recently Deleted) are those duplicate photos I deleted from my My Pictures folder?

iPhoto had it's own trash, and when you've emptied it, files moved to the system trash. I cannot find this in the new Photos app. When I delete files, they don't appear in the system trash.


I was wondering how to get out of a question ban (might I ever get one again) The help page just provides this:     How can I get out of a question ban?      The ban will be lifted automatically by the system when it determines that your positive contributions outweigh those questions   which were poorly received.   Not very clear. I have had a question ban on Stack Overflow before but I just edited my questions, got like 2 vote ups and I got to ask again. I have read you can also get out of a question ban by providing good answers. The time I've spent with a question ban, I've also provided some answers which got voted up/accepted, but every time I checked I didn't lose the question ban but editing questions did work for me.   What ways can get you out of a question ban exactly?  I am currently not in a question ban. I am just wondering about all the things that would work.

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


If one uses \left( and \right) to set functions an extra space is created between the function name and the brackets. How does one correctly set functions?  \documentclass{article}  \begin{document}   Compare $f(x)$ and $f\left(x\right)$. \end{document}   Edit  Because of the duplicate tag that was not removed when I edited my question, I created a new question which has a useful answer here:

For mathematics, is it ever disadvantageous to use \left(  and \right)  in equations?  I can't see any way that doing this would hinder the typesetting, so why isn't () just converted into \left( \right) automatically? This would save a lot of typing.  Cheers!


I had some three or four askubuntu pages open in my firefox's tabs, and the pages suddenly started responding extremely slow. I checkd the system monitor, and it showed huge amounts of data being downloaded and it was continuous at the highest bandwidth my DSL connection can offer with some notches at intervals. I couldn't figure out the reason why it happened, couldn't draw any conclusions from the monitors process information. Then I closed the browser, and the download graph went down too.  I need help with some command tool/script (preferable) that would instantly display an ordered list of the processes consuming my bandwidth. (some packet tracing utility? bandwidth consumption monitor?) And please summarize how to get it done.  Update 1: I tried nethogs and made some test download with web broswer and other tools. nethogs did show what programs were consuming the bandwidth, (please note that previously in my problem I too guessed it was firefox, but the actual problem was what in firefox is devouring my bandwidth? It's not auto-update! I don't think I've configured anything for autoupdates in my system.) I want the suggested tools to show me what things are being downloaded and not just the client; for example the tool should say "it's chromium-browser downloading file1.something and file2.somethingelse".

I think I'm being the victim of a bug here. Sometimes while I'm working (I still don't know why), my network traffic goes up to 200 KB/s and stays that way, even tough I'm not doing anything internet-related.   This sometimes happens to me with the CPU usage. When it does, I just run a top command to find out which process is responsible and then kill it. Problem is: I have no way of knowing which process is responsible for my high network usage. Both the resource monitor and the top command only tell me my total network usage, neither of them tells me process specific network info.  I've found questions here about monitoring total bandwidth usage, but, as I mentioned, that's not what I need. Is there another command I can use to find out which process is getting out of hand?  The command iftop gives results that disagree entirely with the information reported by System Monitor. While the latter claims there's high network traffic, the former claims there's barely 1 KB/s.  I've already tried killing all the obvious ones (Firefox, update-manager, Pidgin, etc) with no luck. So far, restarting the machine is the only way I found of getting rid of the issue.


Which one is correct: "There is a few people" because of the A determiner which is singular, or "there are a few people" because of the noun PEOPLE which is plural? Thanks a lot.

Does "a few" take a singular or plural verb in present simple tense?        A few men lifts the table.   A few men lift the table.   A few frogs jumps out of the lake.   A few frogs jump out of the lake.      I have searched the same question in google, but I see both answers. Which one is correct? How come "a few" is plural? Even though it refers to many, "a" makes "few" a singular, so it should take a singular verb, right?  Should I always put "a" in front of "few"? For example, are the following correct?        Few men lift the table.   Few frogs jump out of the lake.


I was using dynamic programming to implement the Matrix_Chain Problem, i.e. figure out the minimum number of multiplications to be done in matrix multiplication via parenthesizing. My code was not working until I changed the way of initializing list m. Could someone explain why, even when m = [[0]*n]*n and m = [[0 for x in range(n)] for x in range(n)] make seemingly identical list, m = [[0]*n]*n will results in matrix entry not being correctly updated to the minimum cost?   I made list m = [[0]*5]*5 and printed   for a in m:   print(a)   I made list n = [[0 for x in range(5)] for x in range(5)] and also printed in the same way. The results are identical.   import sys def Matrix_Chain (p, n):    m = [[0]*n]*n #problematic step    for i in range (1,n):     m[i][i] =0    for L in range(2, n):      for i in range(1,n-L+1):             j = i + L -1         m[i][j] = sys.maxsize          for k in range (i, j):         q = m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j]         if q <  m[i][j]:           m[i][j] = q    return m[1][n-1]   For argument p = [1,2,3,4] and n = 4, I expect to see 18, the minimum number of multiplications. However, the m = [[0]*n]*n way will return 9223372036854775807, which is the sys.maxsize.  The m = [[0 for x in range(n)] for x in range(n)] way returns the correct answer 18.

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


I have a wonderful picture of our horse (in portrait) and would love to enlarge it and frame it for my husband. I was thinking of breaking the picture up into three different segments and then framing each one and putting it up on our wall.  What program could I use and how big could I make the picture go before I lose quality to pixelation?

Is there a a way with GIMP editor to crop a big picture into several small equal sized pictures? So when all those small pictures connected in order would make a big picture.