Put HDDs in standby after X minutes using hdparm doesn't work

I use Ubuntu 12.04 on a home server. There are 5 hard drives: one SSD with the OS and 4 HDDs (Samsung HD204UI) configured as a RAID5 using mdadm.  I don't need the RAID very often (say, about once per day in average); it contains multimedia data and some backups, so I decided to put the drives to standby most of the time.  I configured the drives to automatically spin-down after 20 minutes using hdparm, here /dev/sda as an example:  hdparm -S 240 /dev/sda   The output of the command confirmed this:  /dev/sdb:  setting standby to 240 (20 minutes)   But the problem is that the drive spins down after about 5 seconds (instead 20 minutes) after the last access, and  hdparm -C /dev/sdb   displays:  /dev/sdb:  drive state is:  standby   Why doesn't the drive wait the 20 minutes as configured? Does it have something to do with the RAID setup? (I don't think so...)  This very short timeout is problematic since it is a RAID5 and when I access a file, it is spread block-wise around the four drives. Since drive 1 isn't needed when drive 2 is read, it went asleep when it will be used the next time (after drive 3 has been read from). So the drives keep spinning up and down the whole time resulting in a throughput near zero.  For the people being concerned about the life of my drives: It will be no problem that the drives are spinned up and down once a day in average since I prefer saving energy and heat over health of the drives (I use RAID5 and the content isn't very important).


Why is it bad practice to install SQL Server to the root of a drive

When I install SQL Server into the root of my drive, for example D:\, I get an error when I run a database deployer from a third party piece of software.  But when I move my SQL Server instance to D:\SQL\ (move it to a folder within the drive) then installation works perfectly.  My question doesn't regard the database deployer but more into the reason why SQL would have an issue with being installed into the root of a drive. Is this bad practice? Why shouldn't I install SQL Server to the root of my drive?


Declare footnotes outside the paragraph text

Fellow typesetters,  I have such a stupid problem: I want to declare footnotes outside the paragraph text (as in the MWE below). I believe this makes the TeX file much easier to read. The problem is that even though the .tex is compiled without errors, footnote reference symbols all come out zeroes. The \footrefs don't seem to "catch" the footnote declarations. The footnotes must be declared in the .aux file since the PDF is produced without errors.  I have already tried changing order with the footnote declarations above the paragraph.   Declaring the footnotes with \footnote instead of \footnotemark solves the nubering but the symbols show up as characters in paragraphs of their own.  I don't want to use the optional argument approach but stick with automatic numbering to avoid issues with page breaks.  \documentclass{report}  \usepackage[multiple]{footmisc} \usepackage{footnote}  \begin{document}  Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae\footref{note:lockout}. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam a libero gravida, dignissim neque id, commodo libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae\footref{note:dbversioner}\footref{note:lockin}, ipsum dolor sit amet, consectetur adipiscing elit.   \footnotetext{Det finns.\label{note:lockout}}  \footnotetext{Vid uppgradering av   databasen.\label{note:dbversioner}}  \footnotetext{Ett annat exempel.\label{note:lockin}}  \end{document}   I compile the original document with XeLaTeX. The MWE have the same problems wether I use XeLaTeX or pdfLaTeX.  I know there's an obvious answer but now I feel stuck. Anyone up for some easy points?  Cheers


Why are second order PDEs so ubiquitous in physics?

Why are second order partial differential equations able to model such a wide variety of physical phenomena? Why do we never need to go to third or fourth order ?It seems just about everything can be described with such equations, as if physical reality is just second order in nature. Is there a reason for this?


How do I clean up my utensils after cutting extremely hot chillis?

As a corollary to a previous question:    Are there any precautions or cleaning methods that I have to take when cutting said naga chillis? I've had chilli linger on surfaces before but they were never this hot.


Can't open desktop folders by double-clicking on Ubuntu 17.10

When I try to open folders (and the trash can) by double-clicking on them on the desktop nothing happens. However, when I right-click on the folder, select "Open with another application", and then select Nautilus it opens normally. I think that it has something to do with the default file manager maybe? (I can open other files that aren't folders normally)


Could we please have a separate search tag for (duplicate) questions?

Questions that are marked as duplicates are now distinct from those closed for quality reasons.  However, they are both still found using closed:1 in searches.  As a moderator I want to look at lists of each type of question separately.  If there is not already a way I am requesting a duplicate:1 search tag for the purpose of separating these results.


Gerund with and without "of" preposition

Could you please explain the difference between using of a gerund with and without "of" preposition?  For example what is the difference between following sentences:        I've worked on improving of the article.   I've worked on improving the article.


New to bpy and I'd like to write some code that sets the shading of an object to smooth by just clicking a button. I did some research and I have written the following lines for now: import bpy  def draw(self, context):     layout = self.layout     row = layout.row()     row.operator(" bpy.ops.object.shade_flat()")     row = layout.row()     row.operator(" mesh.object.shade_smooth()")  I assume that I would have to add some other lines in order to register the class and all that right? Anyway, the problem is that the code does not work. Is this the way it is supposed to work at all? Q: What's the correct way to call this function when pressing a custom button?


The abbreviation of the colloquial expression ohkay seems not to be o.k., but one of:  OK Ok ok  Maybe it is in itself an abbreviation of words that are only used in abbreviated form. Which is the correct one?


What scenarios causes a hard drive UUID to change? Are there any manufacturer assigned unique ids for hard drives that is less likely to change?


When I increase the point light radius, it ends up creating artifacts on the textures for seemingly no reason.  Even though I I have High Quality Shadows (High bit-depth and cube map resolution).  I want to create a smooth texture just like the corner of the photo, but for some reason it ends up creating these squares with what looks like many "vertices".


Can I stop BitLocker asking for a key on boot, without entering the recovery key?

We have a Windows 10 laptop belonging to a client which has started asking for a recovery key on boot:     You need to enter your recovery key because Secure Boot policy has unexpectedly changed   I don't fully understand the relationship between Windows and the TPM, but I guess in some sense one has stopped trusting the other.  We're exploring the possibility of recovering the key from the client's Microsoft account, but assuming that doesn't work, I guess our last potential hope of recovering the data would be to get the laptop back into the usual state where it's happily unlocking itself on boot.  My main question is: is it possible to put the laptop back in a state that it unlocks itself, or is the laptop never going to be happy again until it gets the key?


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


Google Sheets format a date into a completely different date

I am trying to format a list of dates in google sheets. One of the dates are 20161001, I highlight the cell and go up to Format-> Number -> More Formats -> More Date and Time Formats and choose DD MMM YY format. The the cell changes to 10 Dec 98. As you can see once formatted the date is incorrect.   The original date is pull from an Excel spreadsheet out of a system.


Attainment of Cramer Rao lower bound for $f_\theta(x) =\theta x^{\theta−1}$

I have a distribution:  $$f_\theta(x) =\theta x^{\theta−1},0< x <1, \theta > 0 \qquad (1)$$  and I need to show that there is a function $\tau(\theta)$ for which there is an unbiased estimator whose variance attains the Cramer-Rao lower bound.   I know that the lowerbound is attained if and only if:  $$a(\theta)[W(X) - \tau(\theta)] = \frac{d}{d\theta}ln\left(f_\theta(X|\theta)\right) \qquad (2)$$  where $W(X)$ is an unbiased estimator of $\tau(\theta)$.   Starting with the MLE as an estimator of $\theta$:  $$\hat \theta = \frac{-n}{\sum_{i=1}^n log(X_i)}$$  To show that it's an unbiased estimator:  \begin{align} E\left[\frac{-n}{\sum_{i=1}^n log(X_i)}\right] &= \frac{-n}{\sum_{i=1}^n E[log(X_i)]} \\ &=  \frac{-n}{\frac{-n}{\theta}}\\ &= \theta \end{align}  To show that the estimator attains the Cramer-Rao lower bound:  \begin{align} a(\theta)\left[\frac{-n}{\sum_{i=1}^n log(X_i)} - \theta \right] = \frac{n}{\theta} + \sum_{i=1}^nlog(X_i) \end{align}  Solving for $a(\theta)$:  $$a(\theta) = \frac{-\sum_{i=1}^n log(X_i)}{\theta}$$  This indicates the variance of $W(X)$ attains the following Cramer-Rao lowerbound: \begin{align} Var(W(X)) &=\frac{\left(\frac{d}{d\theta}E\left[W(X)\right]\right)^2}{E\left[\left(\frac{d}{d\theta}ln\left(f(X|\theta)\right)\right)^2\right]} \\ &=\frac{1}{E\left[\left(\frac{d}{d\theta}ln\left(f(X|\theta)\right)\right)^2\right]} \\ &=\frac{1}{E\left[\left(\frac{n}{\theta} + \sum_{i=1}^nlog(X_i)\right)^2\right]} \end{align}  Correct me if I am wrong, but isn't this variance different from that described ?


South Africa passport traveling from France to New Zealand

Living in France. Traveling to New Zealand via UK. I have valid Schengen Visa and New Zealand Visa do i need a Visa to transit through the airport in Heathrow?


Why it's valid to get element by indexing an object, but can't check if this element is in the object?

I'm writing in Node.js, ES6. I have an object adaptors passed from a request. I would like to check if the String IOS is in adaptors. And I tried the following commands, which makes me super confused: const adaptorList = Object.values(adaptors); console.log("adaptorList: "+ adaptorList); // adaptorList: IOS,ANDROID console.log("typeof adaptorList: " + typeof(adaptorList));//typeof adaptorList: object console.log(adaptorList[0] == "IOS"); // true  console.log("IOS" in adaptorList); // false  I'm so confused why adaptorList[0] == "IOS" gives true while "IOS" in adaptorList gives false.


I really don't understand why we lost the war. We thought we will won the war because we used less attacks.


I have a few side ops on my list that are still bright despite being checked off as completed. Most seem to get darker as you finish them.      The only one that comes to mind at the moment though is one of the prisoner extractions (prisoner extraction 3 maybe?). It still shows up on the map as well (even if not highlighted in the list) and I can still go to that location while in free roam, trigger it, and complete it again.    My guess was that this was a repeatable side op. It just seemed weird that only prisoner extraction 3 is so far, and not 1 or 2. Can anyone confirm/deny this?  Edit: Looks like a similar (if not duplicate, yet differently phrased question was already asked . Good, additional information on the accepted answer over there as well.


Please give me some examples, this is an exam question of a 1st year math module.


Proving that cardinality of the reals = cardinality of $[0,1]$

Homework problem, intro to topology. Here's what I've done so far. Am I on the right track? And, how would you advise me to proceed from here?  I have already established that $\left |[0,1] \right | = \left |[0,1) \right|$. Now I wish to show that $\left |[0,1) \right| = \left |\mathbb{R} \right |$. I will try to do this by constructing a bijection $f: [0,1) \rightarrow \mathbb{R}$.  Given $x \in [0,1)$, consider the following countably infinite subset of $\mathbb{R}$: $x^c = \{x+1, x-1, x+2,x-2,x+3,x-3,\ldots   \}$.  Then we have that $$ \bigcup_{x \in [0,1)} x^c = \mathbb{R}, $$ and if $x_1, x_2 \in [0,1)$ with $x_1 \neq x_2$, then $x_1^c \cap x_2^c = \varnothing$.


iPad Air WiFi + Cellular, but no cellular settings?

I have an iPad Air 16gb I bought off a popular classifieds website. It was advertised as WiFi only, and in the settings there is only WiFi. But when I look up the serial number on Apple's site, it says it's WiFi + Cellular. I've corroborated this on several other Apple serial lookup sites. Am I missing something? Is there something I have to activate to get the cellular settings to appear?


Export windows Environment variables to a file.

Can we write a batch file to export all or some environment variables to a file in windos 7?


Question still appears in my top network posts even after having it disassociated from my account

A while back I asked to have a question disassociated from my account (). It was, but today I noticed that it still appears on  under "Top Network Posts".


How to get objects and mesh object vertices from camera view with Python in Blender 2.8

What I want to do   I want to change the power of only the light object visible in the camera view. I want to remove vertices to mesh objects in visible in the camera view. Not remove mesh objects, only remove view vertices.   Question   How to get light objects visible in the camera view with Python. How to get vertices in mesh objects  visible in the camera view with Python.   Image  I want to get Only left light object.     I want to get Only inside camera view vertices    I can write Python but I'm not familiar with Blender. So I'm more glad if I can get it with a script.


WordPress Left Hand Side Admin Menu Always Collapsed

Can anyone please help me with my problem regarding my WordPress left hand side admin menu. I want it collapsed at all times, how do I do that?  Well, I'm creating a WP Multisite so I want that menu bar to be always collapsed at all times.  Any help would be appreciated. Looking for code or if plugin exists, should be fine, too. Thanks.


Need to reinstall OSX Mavericks on older MBP (originally with Leopard)

The HDD on my trusty Mac has given up the ghost, and an attempt at repair this weekend resulted in failure to boot. It originally had 10.5, which I updated through to Mavericks. I still have a Snow Leopard install disk so I can at least get it running after HDD replacement, but Sierra will not run on it due to age and is the current offering in the App Store. Is there some way that I can obtain and upgrade to Mavericks to ensure my backup works? Thanks in advance.


Solving an infinite order differential equation

I got an interesting differential equation: $(1+D+D^2+D^3+\cdot\cdot\cdot)y = f(y)$ where $D$ is the differentiation operator $\frac{d}{dx}$ and $y$ is a function of real variable $x$. In an attempt to solve this, I took the infinite sum as $\frac{1}{1-D}$. Then taking it to RHS I could solve the differential equation : $y=f(y) - \frac{df}{dy}\frac{dy}{dx}$ Is this a correct method of solving this problem? please suggest a proper method to solve this. EDIT : My rationale behind using the formula was: let $f$ be a trial function such that $$(1+D+D^2+\cdot\cdot)f=g$$ $$f+D( (1+D+D^2+\cdot\cdot)f) = g$$ $$f+D(g) = g$$ $$f=(1-D)g$$ $$\frac{1}{1-D}f = g$$ UPDATE An $n^{th}$ order ODE should have $n$ arbitrary constants. Here after simplification it has only 1. I think that is useful.


How many roots have modulus less than $1$?

If roots of the equation   $$x^7 - 4x^3 + x + 1=0$$        are plotted on the Argand plane, how many of them have distance from the origin less than $1$?     I found, by plotting the rough curve of $y= x^7 - 4x^3 + x + 1$ that it has three real roots, out of which two of them have modulus greater than $1$ and one has modulus less than $1$. But I don't know how to do the same for non - real roots. The answer given in my book is that $3$ roots have modulus less than $1$.


union test { int x; char arr[4]; int y; };  #include<stdio.h> int main()     {     union test t;     t.x = 0;     t.arr[1] = 'G';     printf("%s", t.arr);     return 0;     }  Predict the output of the above program. Assume that the size of an integer is 4 bytes and size of a character is 1 byte. Why shouldn't the answer be Garbage character followed by 'G', followed by more garbage characters?


I have this annoying problem in Gmail. Spammers are by-passing the Gmail spam filters and are so clever that I am not able to create a manual filter of my own to block them. They are sending me junk mails from e-mail IDs of the form:  Jewelskart@greatestjewels.in via watchstore.cleanmail.in  Shoppingkart@shoppers.in via watchstore.cleanmail.in   In general,  something@somethingelse.in via watchstore.cleanmail.in   Now, I cant set a filter for each and every mail as they are from different IDs. The common part is the via address which is watchstore.cleanmail.in. But when I try creating a filter with watchstore.cleanmail.in in From field, Gmail doesn't list these emails. In short, the filter is not able to detect via addresses.  Report Spam/Unsubscribe options aren't working.  How can I get rid of these annoying spammers?


Hibernate: can't save item into sqlite database. Always get "Database is locked" exception

I am trying to use hibernate5 with sqlite3, but always getting exception   org.hibernate.TransactionException: Unable to commit against JDBC Connection     at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.commit(AbstractLogicalConnectionImplementor.java:86)     at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231)     at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:65)     at market.dal.hibernate.HibernatePurchaseHistoryRepository.saveAll(HibernatePurchaseHistoryRepository.java:20)     at jobs.LoadLastPurchasesJob.execute(LoadLastPurchasesJob.java:52)     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) Caused by: java.sql.SQLException: database is locked     at org.sqlite.core.DB.throwex(DB.java:859)     at org.sqlite.core.DB.exec(DB.java:142)     at org.sqlite.jdbc3.JDBC3Connection.commit(JDBC3Connection.java:165)   OS: Ubuntu 14.04  SQLite dialect downloaded from:   My hibernate.cfg.xml:  <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"         "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">  <hibernate-configuration>     <session-factory>         <property name="show_sql">false</property>         <property name="format_sql">true</property>         <property name="dialect">org.hibernate.SQLiteDialect</property>         <property name="connection.driver_class">org.sqlite.JDBC</property>         <property name="connection.url">jdbc:sqlite:mydb.db</property>         <property name="connection.username">admin</property>         <property name="connection.password">admin</property>         <property name="hibernate.hbm2ddl.auto">update</property>         <property name="hibernate.current_session_context_class">org.hibernate.context.internal.ThreadLocalSessionContext</property>           <mapping resource="market/dal/hibernate/mapping/TestItem.hbm.xml"/>     </session-factory> </hibernate-configuration>   My code (very simple):    public static void main(String[] args) throws Exception {         SessionFactory sessionFactory = configureHibernateSessionFactory();         Session session = sessionFactory.openSession();         Transaction transaction = session.beginTransaction();         try {             try {                 session.saveOrUpdate(new TestItem(1,"test"));                 session.flush();                 transaction.commit();             } catch (Exception e) {                 transaction.rollback();                 e.printStackTrace();             }         } finally {             if (session != null) {                 session.close();             }         }  }   private static SessionFactory configureHibernateSessionFactory() throws HibernateException {         // A SessionFactory is set up once for an application         sessionFactory = new Configuration()                 .configure() // configures settings from hibernate.cfg.xml                 .buildSessionFactory();         return sessionFactory;   }   I was really confused, because my code is very simple, but it doesn't work. What i need to do to avoid "database is locked" exception?  EDIT: I disagree that this question is duplicate of . I not found no one working solution for me in that question answers. Also i have only one working process for my db file (fuser dbfile). It looks like a bug or peculiarity of Hibernate.


How to recursively enumerate the files in a directory and return relative path instead of absolute path in ASP.net using VB.net?

A want to recursive enumerate the files in a directory. If I use   Directory.EnumerateFiles(Server.MapPath("~/"), "*.aspx", SearchOption.AllDirectories).Select(Function(a) Path.GetFullPath(a))   It returns a string list of Absolute Paths starting with the drive letter. I want to get a list of Relative Paths only (Relative to Application Folder).


Doubt in Dihedral group $D_4$ regarding reflections

This question is from Gallian Page 69 Q 9. Suppose a subgroup od D_4 contains H and D. I want to show that these two generated whole of $D_4$. Now rotation will generate other rotations which is fairly clear. But i am confused about how reflections can generate other reflections? Because a reflection say V will, if applied again and again can generate only V and identity which is $R_0$ but how do other reflections can be generated by this  Thanks a lot


Can we say that there exist an integer $n$ such $A+nB$ invertible?

If $A$ and $B$ are $3\times 3$ matrices and $A$ is invertible, then can we say that there exists an integer $n$ such that $A+nB$ invertible?  I was trying to show this by choosing $n$ such that eignevalues of $A+nB$ are non-zero. In the case where $B = I$ we can find the eigenvalues of $A+nB$ that would be $\lambda + nB$ (though I am not certain about its proof). This choosing of $n$ such that $\lambda$ is not equal to $-n$ times an eigenvalue of $B$ will serve the purpose. But I am not sure about general $B$. What if I take arbitrary matrices $A$ and $B$.


In a ring $A$, $x^2 = 0$ implies $x=0$ for any $x$ in $A$. Show that if $a \in A$ satisfies $a^3=a$ then $2a$ is in the center of $A$.

Let $A$ be a ring such that for any $x \in A, x^2=0$ implies $x=0$.  Show that if $a \in A$ satisfies $a^3=a$ then $2a$ is in the center of $A$.  I have no idea how to use the $x^2=0$ implies $x=0$ thing. My progress is as follows: note that if $a^3=a$ then $6a = 0$.  Denote by $B$ the set of $a$'s in $A$ for which $a^3=a$. I suspect that $B$ actually induces a subring. First of all, $B$ is closed under taking inverses: if $a^3=a$ then $(-a)^3 = - (a^3) = -a$ so $-a \in A$. Also $B$ is closed under addition: if $a \in B$ then $(2a)^3 = 8a^3 = 8a = 2a; (3a)^3 = 27a^3 = 3a$ and $4a = - 2a, 5a = -a$.   Let's say this actually induces a subring. Then the subring is of characteristic at most $6$, so it is of characteristic $1,2,3$ or $6$. If it is of characteristic $1$ or $2$ it is trivial that $2B$ is in the center of $A$. Otherwise I dont know how to proceed.  Edit: indeed I don't think this forms a subring. I proved it: here is a quick outline: Since the ring is reduced, any idempotent element is central. If $a=a^3$ then $a^2=a^4$ so $a^2$ is idempotent and thus central. We can show that if $a^3=a$ then $(a+1)^2$ is idempotent and thus central. Then since the center of the ring is a subring, we have that $(a+1)^2-a^2-1$ is in the center so $2a$ is in the center.   The problem now asks to show that any two elements of $B$ commute; That is, if $a^3=a$ and $b^3=b$ then $ab=ba$. Haven't cracked this one yet so ideas are welcome.


Give a sequence such that root test works while ratio test fails

Question: Give a sequence $(a_n)_{n=1}^\infty$ with $a_n>0$ such that root test works while ratio test does not work, that is,    $$\lim_{n\rightarrow\infty}(a_n)^{\frac{1}{n}} \text{ exists}$$   while    $$\lim_{n\rightarrow\infty}\frac{a_{n+1}}{a_n} \text{ does not exist}.$$   My attempt:   Define a sequence $(a_n)_{n=1}^\infty$ such that      $$ a_n =  \begin{cases}        2^{n-1} & \text{if }n \text{ is odd,} \\    2^{n+1} & \text{if }n \text{ is even}.    \end{cases}  $$         Odd subsequence $(a_{n_j})_{j=1}^\infty$ implies that $\lim_{j\rightarrow\infty}(a_{n_j})^{\frac{1}{n_j}} = \lim_{j\rightarrow\infty} 2^{1-\frac{1}{n_j}} = 2 $ while even subsequence $(a_{n_k})_{k=1}^\infty$ implies that $\lim_{k\rightarrow\infty}(a_{n_k})^{\frac{1}{n_k}} = \lim_{k\rightarrow\infty} 2^{1+\frac{1}{n_k}} = 2.$     It follows that $\lim_{n\rightarrow\infty}(a_n)^{\frac{1}{n}} = 2,$ that is, root test works.      However, for odd subsequence $(a_{n_j})_{j=1}^\infty,$     $$\lim_{j\rightarrow\infty}\frac{a_{n_j+1}}{a_{n_j}} = \lim_{n\rightarrow\infty} \frac{2^{n_j+1}}{2^{n_j-1}} = \lim_{n\rightarrow\infty} 4 = 4.$$     For even subsequence $(a_{n_k})_{k=1}^\infty,$     $$\lim_{k\rightarrow\infty}\frac{a_{n_k+1}}{a_{n_k}} = \lim_{k\rightarrow\infty} \frac{2^{n_k-1}}{2^{n_k+1}} = \lim_{k\rightarrow\infty} \frac{1}{4} = \frac{1}{4}.$$     Therefore, $\lim_{n\rightarrow\infty}\frac{a_{n+1}}{a_n}$ does not exist, that is, ratio test does not work.  Does my example work?


What were the immediate death tolls of Order 66?

As accurately as sources can provide, what were the Jedi death tolls in the immediate aftermath of Order 66:   On Coruscant, and how many by Anakin's hand? Outside Coruscant, across the galaxy, to the opening shots of Order 66? In the immediate days after, when the "Grand Army of the Empire" was still actively hunting down those who managed to escape?   In the context of this question, the immediate term ends when the inhibitor chips release their control of the clones i.e. when the actually-loyal-to-the-Republic-and-the-Jedi clone troopers regained free will.  Edit: I'm looking for a breakdown, not a grand total.


How can I make grep print the lines below and above each matching line?

I have to parse a very large file and I want to use the command grep (or any other tool).  I want to search each log line for the word FAILED, then print the line above and below each matching line, as well as the matching line.  For example:  id : 15 Satus : SUCCESS Message : no problem     id : 15 Satus : FAILED Message : connection error     And I need to print:  id : 15 Satus : FAILED Message : connection error


While editing I saved a file as file.p;l instead of file.pl. Now when I try to rename it this happens:  $ mv file.p;l /home/mc/file.pl mv: missing destination file operand after 'file.p' Try 'mv --help' for more information.   How can I rename filename in CLI?


Could not add ppa:neon/kf5 (ubuntu 14.04)

I'm trying to install the latest vesion of KDE.   ~ $> sudo apt-add-repository ppa:neon/kf5 Cannot add PPA: 'ppa:neon/kf5'. Please check that the PPA name or format is correct.   It seems that ppa:neon/kf5 does not exist?  Is there any other way to install the kde 5?  I'm using Ubuntu 14.04 3.13.0-40-genericx86_64 x86_64


Is "I am sat" bad English? I believe it is incorrect and instead either the present continuous     I am sitting   or the predicate adjective     I am seated   should be used.  I hear this quite often, however, and ultimately usage overrules formality.  Does anybody know where this originated or how to describe it grammatically?


Can I install Python 3.x and 2.x on the same Windows computer?

I'm running Windows and the shell/OS automatically runs Python based on the registry settings when you run a program on the command line. Will this break if I install a 2.x and 3.x version of Python on the same machine?  I want to play with Python 3 while still being able to run 2.x scripts on the same machine.


How to set up keyboard layout switching and indication in Xubuntu?

I use 3 different languages (English, Czech and Russian) every day. I'd prefer to switch (preferably globally, I don't like per-window) between them with Left+Alt+Shift.  I'd also like to see the active language indication.  Unfortunately I couldn't find any obvious way to set this up in XUbuntu 11.10 - there is even no keyboard indicator applet available in the panel configuration. Any recommendations?


$R^n \cong R^m$ if and only if $n=m$ without assuming the result for vector spaces

Given two free modules $R^n$ and $R^m$ over a commutative ring $R$, it's true that $R^n \cong R^m$ if and only if $n=m$. However every proof I've seen of this fact assumes that we've first proven it when $R$ is a field. Although this is probably true (most of us see linear algebra before commutative algebra), this sort of proof is a bit unsatisfactory to me.   Is there a (nice) proof of $R^n \cong R^m$ if and only if $n=m$ that doesn't assume we know it's true when $R$ is a field?  $\bf{Edit}$ Though the linked question implies a proof that does not use the result for $R$ a field, such an implication doesn't mean that the questions are duplicates of one another.


Why when I run I get the error: $ sudo echo "127.0.0.1 db-local.internal" >> /etc/hosts bash: /etc/hosts: Permission denied  But when I do sudo su I can edit this file without any problem. UPD Because question is closed I add answer here: sudo bash -c "echo 'some string' >> test.txt"  Link:


How does the scope of a variable work in JavaScript?

I came across this piece of code while revising. I need to explain why it returns j=6 and not 7?    var j = 6; function test() {   var j;   j = 7;   return; } test(); window.alert(j);


How to defined constructor outside of template class

I get linker error if I define constructor\destructor of template class outside the class. Is it not allowed? I use Visual studio 2010.  error 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall Tree::~Tree(void)" (??1?$Tree@H@@QAE@XZ) referenced in function _main  1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall Tree::Tree(void)" (??0?$Tree@H@@QAE@XZ) referenced in function _main  In .h file  template <class T> class Tree{ public:     Tree(void);     ~Tree(void);     T x; };   in .cpp file  #include "Tree.h"  template <class T> Tree<T>::Tree(void){ }  template <class T> Tree<T>::~Tree(void){ }   in main.cpp file  #include "Tree.h" int main(){     Tree<int> t;     return 0; }


How to only field names(not field values) of a particular document using node.js

I'm a beginner in both MongoDB and node.js. Actually, I'm trying to get the names of a particular document but I wonder how to do that. Let me elaborate in detail : if "a" is a collection which contains document named "student" and "student" contains fields like   {     "_id: "student",     "name": "alex",     "roll": "3",     "age":"13" }    then how to get the field names in this ["name","roll","age"] format By trying this:  db.collection("user").find({ "_id": "student" }).toArray(function(err, result) {     console.log(result) })   is giving all the fields with their values.


Is it possible to make Certificates in Latex?

I've been learning how to write documents in Latex and recently I was wondering whether the TEX editor can be used to make elegant looking Certificates. If it is possible that please suggest templates or references from where I can gather the tools to make a certificate in LATEX.


I want to count the time, how long all my task will work. But my variable timeElapsed is always 1. Why? Here is my code: public class Main {     public static void main(String[] args) {         long start = System.currentTimeMillis();         for(String arg : args){             new Thread(() -> {               /* ... */         }).start();         }         long finish = System.currentTimeMillis();         long timeElapsed = finish - start; //always is 1         System.out.println("Elapsed time: " + timeElapsed);       } }


Probability of false positive key matching two plaintext/ciphertext pairs

Given a keyspace of $ 2^{80} $ and plaintext space of $2^{64}$. And two plaintext and ciphertext pairs $(x_1, y_1)$ , $(x_2, y_2)$. Now we have $2^{80}/2^{64} = 2^{16}$ keys that encrypt $x_1$ to $y_1$ and another $2^{16}$ keys that encrypt $x_2$ to $y_2$, with only one key that is supposed to be the target key (correct key). What is the probability that once brute-force identifies a first key ($k_1$) this same key happen by mistake to also encrypt $x_2$ to $y_2$, that is this this key happen to be a False-positive (that is, this key will likely not encrypt $x_3$ correctly). What is the equation used and how is it derived?


How to exit flash video in browser by keyboard

If I'm watching a video in Adobe Flasher Player, say on Youtube, the player steals all focus after I clicked on it. That is, all the regular keyboard shortcuts of my browser - like Ctrlt to open new tab - are blocked.  To get the browser back into focus I could of course click somewhere outside of Adobe Flasher Player - but how can I bring Adobe Flasher Player out of focus by means of keyboard only?


do you know if Python supports some keyword or expression like in C++ to return values based on if condition, all in the same line (The C++ if expressed with the question mark ?)  // C++ value = ( a > 10 ? b : c )


Schengen visa requirements for a UK transit visa

I will be travelling from South Africa to the Netherlands with a layover in the UK.  My flight from South Africa arrives at Heathrow and departs for Amsterdam from Gatwick.  I will need a Visitor in Transit Visa, but my question is, do I need to already have my Schengen visa when applying for the UK transit visa? Or can I apply simultaneously?


I noticed the following:  $$[L_{+},L^2]=0,\qquad [L_{+},L_3]\neq 0,\qquad  [L^2,L_3]=0.$$  This would suggest, that $L^2,L_+$ have a common system of eigenfunctions, and so do $L^2,L_3$, but $L_+,L_3$ don't. How is that possible?


Solve $\dfrac{xdx-ydy}{xdy-ydx}=\sqrt{\dfrac{1+x^2-y^2}{x^2-y^2}}$   I tried doing this- $\sqrt{x^2-y^2}d(x^2-y^2)=x^2\sqrt{1+x^2-y^2}d(\frac{x}{y})$ but it does not get better from here. I even tried putting $\sqrt{x^2-y^2}$ as $u$ but that does not simplify either.


How to remove all preinstalled apps instead of the ones needed by the system?

Is this possible? Im trying to remove all software that comes preinstalled instead of the Settings app, Terminal and GNOME. If it is possible, how can I do this? (Ubuntu 20.04)


DSpace - OAI HARVESTER - java.lang.NullPointerException

I'm experiencing difficulties with OAI harvesting.  keeps failing with the following error:  org.springframework.web.util.NestedServletException : Request processing failed; nested exception is java.lang.NullPointerException   I ran all OAI related commands properly, which suggests that the problem comes from my DSpace. I haven't been able to identify the source of the errors because my log files aren't showing me anything unusual.  How can I go about tracking down the source of this issue?


How can I determine the bottleneck in my gaming rig?

I have a Dell Dimension E510. Its most important gaming specs are:   Intel Pentium 4 3.0GHz CPU 1 GB of RAM (with a max of 4 GB) ATI Radeon X300 with 128 MB   Typically I enjoy playing Counter Strike Source online, but find that it is often difficult to play due to delays. Other games I like to play are Guild Wars, and find that it is ok for the most part. I have the greatest difficult with Battlefield 2.  I have looked on amazon and have found that for about $60 I can upgrade to a 1GB video card, and for another $60 I can max out my RAM to 4 GB. However, I do not want to upgrade without first understand where my slow down is.  How can I determine where the resources are needed? I typically attempt to open up the Windows Task Manager to view the CPU and Memory utilization. I have not found a way to monitor video card metrics. The CPU hovers around 60% and the memory can get under 50 MB under certain circumstances.  Additionally, I have further concerns that my wireless connection to the desktop is less than optimal. How could I understand if: (1) a sub-optimal internet connection makes the game slow, or (2) a sluggish system is due to something other than network resources?  While upgrading both the video card and memory is not a tremendous amount of memory ($120), I would hate to upgrade and not see a difference in game play.


I had 4 workspaces set up before I upgraded to 18.xxxx now they are gone and I can't seem to get them back. In the work I do I need those separate workspaces to keep my thinking process inline.


Tag scores not updating on website, updated in App

My tag scores according to my profile have not been updated on the site for the last few days.  I thought that it was due to something similar to this question:    However, when checking out my profile in the Android App, the scores are being updated.


LEFT JOIN vs. LEFT OUTER JOIN in SQL Server

What is the difference between LEFT JOIN and LEFT OUTER JOIN?


Equivalent Definitions of the Operator Norm

How do you prove that these four definitions of the operator norm are equivalent? $$\begin{align*} \lVert A\rVert_{\mathrm{op}} &= \inf\{ c\;\colon\; \lVert Av\rVert\leq c\lVert v\rVert \text{ for all }v\in V\}\\ &=\sup\{ \lVert Av\rVert\;\colon\; v\in V\text{ with }\lVert v\rVert\leq 1\}\\ &=\sup\{\lVert Av\rVert\;\colon\; v\in V\text{ with }\lVert v\rVert = 1 \}\\ &=\sup\left\{ \frac{\lVert Av\rVert}{\lVert v\rVert}\;\colon\; v\in V\text{ with }v\neq 0\right\}. \end{align*}$$


Bought in, bought on, bought from, bought at?

I bought this bike in|on|from|at an online store.  I bought this bike in|on|from|at November 13.  I bought this bike in|on|from|at a sale.  What is the appropriate situation where the words in, on, from, and at should be used?    I think something similar has been asked before, but I can't seem to find it in this SE site.


linear regression: interpretation of main effect when models includes interaction

Consider this model:  summary(lm(mpg ~ hp*wt, mtcars))  Call: lm(formula = mpg ~ hp * wt, data = mtcars)  Residuals:     Min      1Q  Median      3Q     Max  -3.0632 -1.6491 -0.7362  1.4211  4.5513   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept) 49.80842    3.60516  13.816 5.01e-14 *** hp          -0.12010    0.02470  -4.863 4.04e-05 *** wt          -8.21662    1.26971  -6.471 5.20e-07 *** hp:wt        0.02785    0.00742   3.753 0.000811 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 2.153 on 28 degrees of freedom Multiple R-squared:  0.8848,    Adjusted R-squared:  0.8724  F-statistic: 71.66 on 3 and 28 DF,  p-value: 2.981e-13   The slope of hp is -0.12010 when wt is zero. As a value of zero for wt is unlikely, this for me raises the following questions:   Is there any worth in trying to interpret a main effect coefficient when it is included in an interaction term?  Should the main effect coefficient only be interpreted within the context of the interaction? Or in other words, in the model above, is hp:wt term the only term that should be interpreted?


String inside a Array(String[]) and a String is not the same even if it is

I have a String[], and a String parameter. I have tested it with other String[] and String, it returned true. However, this one is saying false.  // toFind is a parameter of a function(defined as a String), and fileName is String[]  System.out.println("toFind length is " + toFind.length() + ", fileName length is " + fileName[i].length()); System.out.println(toFind + ", " + fileName[i]); System.out.println(toFind == fileName[i] + "\n");   toFind length is 19, fileName length is 19 lab.filestrdesc.txt, lab.filestrdesc.txt false   I know it is not supposed to say false, but it does.. how can I fix it?


How can I setup Internal Hard disk RAID5 configuration? I have SunFire 440 machine with 4 internal hard disk. I have never worked on Sun systems except for now and I am exploring google for the above solution. If anyone could help me out.


How to prevent of sending empty fields in Angular HttpClient.post method?

when I want to send information as post Method to my Rest API, Angular sends empty fields and subsequently, my database saves the empty value.   But I want to prevent it and I don't want to send empty fields from my Angular to my Backends.   For example, in below example, Angular sends an "" in entityTypeName field and unfortunately, the Postgres DB will save empty instead of null.  {     createdAt: "2019-01-11T13:59:52.311678"    entityTypeName: ""    id: "1bd46fce-fc6f-410f-acaf-74d5964cf92b"    updatedAt: "2019-01-11T13:59:52.311678"    updatedBy: "admin@admin.com"    version: 0  }   I'm looking for a general solution that prevent sending empity values in Angular side in all situations.


Do native speakers still use "ought to"?

Do native speakers still use "ought to" in daily conversation?  I haven't seen "ought to" used on any social or news ... websites.  I only read about it in English grammar books.    :        :        UPDATE:   Is "ought to" still used by native speaker of American English? Is "ought to" still used by native speaker of British English?


I want to sort only rows in my file e.g  5 2 2 1   and I want to have an output like this  2 5 1 2   Could someone help me ?


Prove that $ a_1 + a_2 + a_3 + \cdots + a_n \geq n$ if $a_1 a_2 \cdots a_n = 1$

Prove that for any real numbers $a_1, a_2,\ldots, a_n > 0$ $(n \in \mathbb{N}, n \geq 2)$ satisfying $a_1 a_2 \cdots a_n = 1$ we have $ a_1 + a_2 + a_3 + \cdots + a_n \geq n$.


I can’t get rid of the black lines on a Bezier Curve

I’m new to Blender and exploring bezier curve objects.  These thin black lines appear around the curves, what are these?


Is something similar to Robin's theorem known for possible exceptions to Lagarias' inequality?

Robin's theorem says that if $$\sigma(n)<e^\gamma n\log\log n$$ holds for all $n>5040$, where $\sigma(n)$ is the sum of divisors of $n$, then the Riemann hypothesis is true, but if there are any counterexamples, then they are colossally abundant numbers, and there are infinitely many counterexamples.  Lagarias' theorem says $$\sigma(n)\leq H_n+e^{H_n}\log(H_n)$$ holding for all natural numbers $n$ is equivalent to the Riemann hypothesis, where $H_n$ is the $n$th harmonic number, the sum of the reciprocals of the first $n$ positive integers. It looks like Lagarias' inequality is sharper than Robin's, so any counterexamples to Robin's inequality must also be counterexamples to Lagarias'. Is known to be impossible for integers that aren't colossally abundant numbers or of some similar more general type to be exceptions to Lagarias' inequality?


Which preposition to use? On Or In. Sentence:  I'm working really hard on/in my English.


Do Squirrels have 4 legs OR 2 arms and 2 legs?

Do squirrels have four legs, or two arms and two legs?  I first asked this question many years ago, and it has since unearthed a whole array of conundrums and questions that I have struggled to get a conclusive answer to.  See a squirrel (often described as a quadruped, 4 feet, which implies 4 legs) can stand on its back two legs and hold a nut in the paws of its front two legs - but those front legs are jointed in a very similar way to arms, look like arms and are being used as arms.  When a squirrel runs, it uses all four limbs - but then so does a gorilla, and that definitely has arms.  So in trying to answer this seemingly simple question I ended up lost in a world of definitions and further questions - questions like "what is an arm anyway?"  "what is the difference between a paw and a hand or foot?" - and after trying to find out the answers to those questions I ended up in a much stranger world.  Octopuses have arms, but no hands - bats have hands, but no arms (I will spare you one of the resulting conversations which wanted to know how long a nose has to be until it's a trunk, especially concerning anteaters).  I could be wrong but it seems to me that if your front paws are called hands, then you have two arms and two legs.  Koalas, for instance, are often described as having hands despite also being described as quadrupeds.  Perhaps the differences are merely linguistic choices rather than anything relating to the biological nature of these limbs.  I just don't know anymore, and at this stage, I am starting to wonder if I have given this question way too much thought, time and energy.  Can anyone help me out?    Very sorry if this question isn't appropriate here - if there is a better group for this question on Stack Exchange please let me know.


Optimizing meshes for Unity. How much complex cylinders or bevels can I use?

I just got into learning Blender 3d modeling in order to try to develop a videogame. Since I want a solid foundation in my project, I’ve been searching info on how to keep my meshes optimized for Unity. But I found a lot of disperse and diffuse information and I would like to know if I got the thing right. Keep in mind that I pretend to do semi open world scenarios (two streets, a square, a station interior…), just for PC or consoles (by the time I would end my hypothetic game, next gen consoles for sure). So: 1.- I should not use subdivision modifier since when I’ll import the model in Unity, the modifier will be applied and a lot more of quads (now triangles) will be on the mesh, generating performance problems. 2.- Instead I should use bevels or curves. Latter I should apply Blender’s Shade Smooth to get rid of that low poly look in the corners and this function is also supported by Unity. 3.- I can use auto smooth or the Edge Split modifier to keep plain faces and using the shade smooth function at the same time. 4.- I should have as less as possible vertices in my mesh, and I can apply Merge by Distance and Limited Dissolve to fusion faces that have unnecessary vertices or cuts. But my biggest question, that I couldn’t get an answer, is how much vertices should I use, for example, when creating a bevel or a cylinder. I got a scenery asset pack in Unity Store in order to check how its meshes were made, and there were applied like 12 vertical edges by cylinder, for example. Taking that into account, I made a model with several bevels, but I just set 3 or 4 bevel cuts for each them. It’s looking ok when smoothing, but I would like more modeling definition. Should I keep going like this or I can go with more definition when it comes to do cylinders or bevels?


Can You Obtain New Physics from the use of Fractional Derivatives?

I was curious if anyone could give me an example of the use of  in physics and explain what they offer that "conventional" mathematics does not (in terms of new physics and not just another method to work the problem)?   If you look at the conservation of mass example on the wikipedia page they cite the paper  they derive a general equation for conservation of mass in equation 13. It seems like the fractional derivative is then used as a method to approach their problem, but I dont think it includes new physics (correct me if I'm wrong on this). Is there anything gained by stating that fractional conservation of mass holds in this case (apart from gaining another way to approach the problem)?    Any thoughts on this example or others would be appreciated!


Has any FIFA World Cup winner ever had all their knockout stage matches won in extra time/penalties?

Croatia is going into the World Cup finals having won their 3 knockout matches so far in extra time/penalties. If they bring their match against France to extra time and win, they'll have done it in every single knockout stage match.  Has any team ever won a World Cup by winning all of their knockout matches on extra time/penalties?


Induction based on combinations and binomial theorem: ${}^nC_0+{}^{n+1}C_1+{}^{n+2}C_2+\dots+{}^{n+p}C_p={}^{n+p+1}C_p$

I was looking at some questions in a Cambridge text and I reached this question however I am at it for 1 hr and can't seem to get the proof right. Any help ?


What is the best (idiomatic) way to check the type of a Python variable?

I need to know if a variable in Python is a string or a dict.  Is there anything wrong with the following code?  if type(x) == type(str()):     do_something_with_a_string(x) elif type(x) == type(dict()):     do_somethting_with_a_dict(x) else:     raise ValueError   Update: I accepted avisser's answer (though I will change my mind if someone explains why isinstance is preferred over type(x) is).  But thanks to nakedfanatic for reminding me that it's often cleaner to use a dict (as a case statement) than an if/elif/else series.  Let me elaborate on my use case.  If a variable is a string, I need to put it in a list.  If it's a dict, I need a list of the unique values.  Here's what I came up with:  def value_list(x):     cases = {str: lambda t: [t],              dict: lambda t: list(set(t.values()))}     try:         return cases[type(x)](x)     except KeyError:         return None   If isinstance is preferred, how would you write this value_list() function?


Prove that $\frac{\mathbb{C}[x,y]}{\langle x^2-y^2-1\rangle}$ is an integral domain such that all the nonzero prime ideals are maximal.

Let $R=\frac{\mathbb{C}[x,y]}{\langle x^2-y^2-1 \rangle}$. Prove that (1) $R$ is an integral domain. (2) Any nonzero prime ideal of $R$ is maximal.  My idea: (1) The first part is easy. Since $x^2-y^2-1\in \mathbb{C}[y][x]$ is Eisenstein with respect to the prime $y+i$, it is irreducible. Hence the ideal generated by it is a prime ideal. (2) I am struggling with this part. I have one approach (not sure if correct). Approach : Let $I=\langle x^2-y^2-1 \rangle$. Then $R=\mathbb{C}[x,y]/I$.  Any ideal of $R$ is of the form $J/I$ where $J\subseteq \mathbb{C}[x,y]$ is an ideal containing $I$. If we can show that any prime ideal $J$ containing $I$ is maximal, then we are done. How to prove this? Is there any other way to prove the second part? Edit: I am trying to avoid Hilbert Nullstellensatz and the notion of dimension of a ring, as these concepts are not there in the syllabus of the exam from which I found this question.


I am a college student considering applying to PhD programs both in the US and internationally. Currently I research in a lab affiliated with a top US university and run by my older brother, an instructor at that university. I really enjoy my research here and hope to continue with it; however, I worry about getting letters of recommendation for grad school. I will ask professors in project based classes at my university, but if I continue with this lab as I hope to, only my brother will be qualified to write one about my research abilities. Although the group has other affiliated instructors, my brother oversees the division I research in and my work. Will an admissions committee simply chalk a letter from him up to nepotism or, provided I demonstrate meaningful research, understand the circumstances?


I am trying to make a brick wall from this reference image: by Grey Geezer   I drew the mortar lines in sculpt mode, but the lines looked too jagged:  I changed the shading to smooth, but then the bricks looked blurry and there were dark spots in the mortar lines:   I can't even get the model to look right, nevermind the texture. How would I make this look proper?


If $T\colon \mathbb R^n \to \mathbb R^n $ linear and $T^2 = kT$

It is given that $T$ is a linear transformation from $\mathbb R^n$ to $\mathbb R^n$ such that $T^2 = k T $  for some $k\in \mathbb R$.   Then, one or more of the options are true    $\|T(x)\| = |k| \|x\|$ for all $x\in \mathbb R^n$.  If $\|T(x)\| = \|x\|$ , for some non- zero vector $x\in \mathbb R^n$ then $ k =\pm 1 $.  $\|T(x)\|  >  \|x\|$ for some non- zero vector $x\in \mathbb R^n$, then T is singular.  $ T = k I $ where I is an identity transformation.    Please suggest how to proceed.


Sum values in 5th column that correspond to same field in 2nd column

Considering below file:   0,2,,,10 0,2,,,15 0,1,,,984 0,2,,,9 1,14,,,5   Using awk, I need to calculate the total value in $5 per each $2.  The desired output would look like below:   2,34 1,984 14,5


Python, along with its related packages   numpy scipy   is / are  used to make the statistical analysis.   What should it be, is or are ? I was pretty confident it would be is. But someone more knowledgeable to me made the correction and changed it to are. Thus came the doubt.  It should be similar to the usage of with, I guess.  Hope, this isn't a duplicate. I searched and did not find.


Are there any books on real analysis that explain what goes on in their proofs for a self studying student?

Are there any books in real analysis that explains what goes on in their proofs? I want to self study real analysis. I read through proofs in each of these real analysis books and I'm not understanding anything. (I'm using like 5 books at this point and they still aren't helping.) These books give me the same definitions and meanings but the proofs aren't exactly ticking. I would love if there was a textbook that can show like step by step proofs and why each line of logic works (if there is one). I know I'm supposed to struggle with real analysis but there's no real guide for me. Any pointers and books that meet these requirements? I'm looking for a good book with an intuitive explanation of analysis.  By the way just before we start a debate: It's not a repeated question because i went to this link and looked through all these books also and that wasn't very helpful.  Source for those interested:  Just for those curious, the five books I'm using are:   Walter Rudin's book (This is like really difficult for me to understand). Patrick M Fitzpatrick (Advanced Calculus: A course in Mathematical Analysis) Kenneth Ross' book (Elementary Analysis) Stephen Abbott's book (Understanding Analysis) R. Battle's book (Introduction to Real Analysis)


Raise criteria for famous question gold badge

I see so many users with a single gold badge "Famous Question" on stackoverflow. Why is the criteria to get the badge only 10k views? Stackoverflow is a very popular site. Its ranked very high in countries like India. For a site like stackoverflow, which attracts so many visitors a day,  this badge doesn't seem rare to get for a noteworthy question.  Why not raise the criteria to 20,000 views or even more?


Subdividing a beveled mesh creates new vertices in wrong places

A new vertice forms when the object is being subdivided.  I beveled my mesh and added a subdivision surface modifier, and now a new face/vertices are created where the black areas are:    It appears that when the mesh has the modifier active, the subdivided mesh goes to a singular point in the center:   I applied Rotation and Scale to the mesh already after it was edited. Nothing changed.  How do I get rid of the odd mesh warp when my mesh is subdivided? I want to get the center curve near the bottom to be as smooth as possible, without signs of low poly mesh. Like a perfect part-circle.  Here is the blend file:


correlation coefficient between nominal categorical variables and discrete variables in R

How is it possible to calculate correlation coefficient(Effect size) between nominal categorical variables and discrete variables in R?   for each variables I have at least 10 values


Is it possible to include "Eq." in equation numbering?

Personally, I wanted to have "Eq." in front of the equation numbering. Also, I wanted to have the section numbering in front of the equation, so that the equations are numbered as (Eq. 3.1) instead of (1).  Anyone knows whether this is possible?


How to integrate $\int_0^{\pi/2}\frac{\sin^nx}{\sin^nx+\cos^nx}dx$?

Possible Duplicate:          How can we integrate $$\int_0^\frac{\pi}2\frac{\sin^nx}{\sin^nx+\cos^nx}\,\mathrm dx , \,\,\,\,\,\,\,\,\, n\in N \quad?$$ Thanks for any hint.


The issue is that I'm trying to select  elements with $("a") and its affect only few of the  tags in the document, my code  $(document).ready(function() {     $.ajax({         type: 'GET',         url: 'http://localhost/queryProjects',         success: function(data) {             var el = $('

');             el.html(data);             var ProjectsObject = $("b:contains('projectName')", el).parent().next();             var ProjectsArray = $.makeArray(ProjectsObject);             var DescriptionsObject = $("b:contains('description')", el).parent().next();             var DescriptionsArray = $.makeArray(DescriptionsObject);             for (var i = 0; i < ProjectsArray.length; i++) {                 $("tbody:last-child").append('
' + (i + 1) + '	' + ProjectsArray[i].textContent + '	' + '' + DescriptionsArray[i].textContent + '	Run
');             }         }     });     $("a#link").click(function() {         $("table").hide();     }); });   I have tried with an ID and without, like $("a") and $("a#link").  the AJAX is irrelevant but just so you see how I inject my info to the document.  Thanks!


Find the root of the  equation  $$x^4 -10x^3 + 26x^2 -10x +1 = 0$$   My attempt:  If $a,b,c$ and $d$ are a roots then $a+b+c+d = 10,$  $(a+b)(c+d)  + ab +cd = 26$  $(a+b)cd  +ab(c+d) = 10$  $abcd =1$  Now  i'm not able  procceed further.


consider the following sentence:  Once all data are collected, it is exported as ...  I am not sure whether it is correct to use the word 'it' in this context?


I posted a question a few days ago which I assigned a bounty to. One of the answerers didn't seem to have basically any idea what he was talking about and the other misread the question, so neither of them was any help. But I have to award the bounty, even though I feel that neither of the answers posted by other people (I solved the problem myself) are useful.  Is there any way that I can choose to not award the bounty?


I have an external hdd partitioned into two. One of the partitions has Linux (Ubuntu) installed on it (bootable). The thing is I have forgotten the password of it's user (single user).  How can I reset the password of user by plugging the external hdd to another Linux machine and then editing some file, using some command through terminal, changing the bash(remember doing something similar long time ago), or something else?  And I do not want to get into Grub etc. Booting through that drive is not an option (although it is but I am not willing to get into it and don't want to restart the running("another") Linux machine).


Should SO rep be considered in SU and SF?

I have a 5k rep on SO.  I don't visit Server Fault or Super User often, so I have much less rep on those sites.    Whenever I see a question on SU or SF which does not belong or needs correction, I immediately move my mouse pointer to the question options.  But I won't see them as I don't have enough rep.  Do you feel that SO reputation should be considered in these circumstances?


When should I use GET or POST method? What's the difference between them?

What's the difference when using GET or POST method? Which one is more secure? What are (dis)advantages of each of them?  ()


Encrypting the source code of a python project

I am working on an application where clients can build the application to their locale system but they should not be able to access the source code of the project, what is the best approach to do that?


"Double subscript" error in "align" environment

I saw some questions about "double subscript" but I have a weird situation. I have the following parts in my code:    and...    I have used almost the same subscripts in both of them, but the latter one gives a "double subscript" error while the first one works fine. What am I missing there? What is the reason for that error?  Here is my error bar:


What is the most general expression for the coordinate representation of momentum operator?

I have a question about deriving the coordinate representation of momentum operator from the commutation relation, $[x,p]= i$.  One derivation (ref W. Greiner's Quantum Mechanics: An Introduction, 4th edi, p442) is as following: $$ \langle x|[x,p]|y \rangle = \langle x|xp-px|y \rangle = (x-y) \langle x|p|y \rangle. $$ On the other hand,  $ \langle x|[x,p]|y \rangle = i \langle x|y \rangle = i \delta (x-y)$. Thus $$ (x-y) \langle x|p|y \rangle = i \delta(x-y). \tag{1} $$  We use $(x-y) \delta(x-y) = 0$. Take the derivative with respect to $x$; we have $\delta(x-y) + (x-y) \delta'(x-y) = 0$. Thus $$ (x-y) \delta'(x-y) = - \delta(x-y). \tag{2} $$  Comparing Eqs. (1) and (2), we identify $$ \langle x|p|y \rangle = -i \delta'(x-y). \tag{3} $$  In addition, we can add $\alpha \delta(x-y)$ on the right-hand side of Eq. (3), i.e. $$ \langle x|p|y \rangle = -i \delta'(x-y)  + \alpha \delta(x-y), $$ and $[x,p] = i$ is still satisfied. We can also add $$ \frac{\beta}{\sqrt{|x-y|}}\delta(x-y)$$ on the RHS of Eq. (3).  Here $\alpha$ and $\beta$ are two real numbers.  My question is, what is the most general expression of $\langle x|p|y \rangle$? Can we always absorb the additional term into a phase factor like Dirac's quantum mechanics book did?  Thank you very much in advance.


Why do the humans become sleepy after meals?

I don't know about all the mankind, but I know enough people, who becomes sleepy after their meals. Also, I'm not sure, what kind of food do they consume, but I personally get sleepy almost from any food: sweet, fat, spicy, salty, liquid, tasty, not tasty, etc.  Is this phenomenon well known? And, if yes, how does it occur?


Let G be simple, |G| is not 2, and ϕ a homomorphism from G to H. If H contains a normal subgroup A of index 2, then ϕ(G) ≤ A .

Let $G$ be simple group, $|G|$ is not 2, and $ ϕ $ a homomorphism from $G$ to $H$. If $H$ contains a normal subgroup A of index 2, then $ ϕ(G) ≤ A $ .  I have been trying the following: $A$ is normal and maximal in $H$ since its index is 2(basic fact + correspondence theorem). $G$ is simple so it is isomorphic to its image so its image is a simple subgroup of $H$. Now I have to show somehow that its image must be a subgroup of $A$ and I can't find any reason it has to. I would very appreciate if someone could help me with this.


Regex - How to select everything when the word is not contained

Say that I have this text      I need to think of something to write here.    I am an alumni of the college.    The blue cat is blue the red cat is red.    I want to be able to select everything if the word "student" (ignoring case) does NOT exist in the text. Therefore, I need something to go beyond the first line. I originally had something like   /(?:[^student]).*/    but it isn't working correctly. I am not sure what "flavor" of Regex I am using but it is with PHP and in the backend of a Drupal site.   Thank you!


Why is the Salesforce developer documentation NOT indexed on Google anymore?

For years now I'm working frequently with some Salesforce developer documentations, e.g.:       The best and easiest way in my workflow to find stuff (in general) was to use some reasonable keywords on Google, like "apex map" oder "apex list" or "visualforce repeat" and so on. This worked very well!  I was used to get high quality deep links (at least within TOP 3) as results for searches like:   searching with Google for apex map class ==> TOP 1 was  searching with Google for visualfore apex repeat ==> TOP 1 was    Why I did this?  I did intentionally NOT use the buildin-search (inside the documentation provided by Salesforce), because the results were usually way worse than Google, it takes more keystrokes and clicks to use it and the way the resultset is displayed is simply very inconvenient (tiny listview, severe need of scrolling, painful handling) and before you can search you have to open the documentation itself (way slower than goolge showing results)  Issue:  Now a short time ago (can't say exactly when it started) searching on Google is not bringing the expected hits as stated above within the TOP 10 results. It looks to me, as if the documentation not longer indexed correctly or not index at all by the Google bot.  This situation is bad for learners and beginners. They should find the official documentation using the search engine the will most likely use.  Questions:   Any tips and tricks on tweaking my search terms in order to get back the expected results? I've tried already a lot of combinations (e.g. "salesforce visualforce apex:repeat" which really should bring  close to top 1) but the official documentation is pretty resistant against being found via Google.  Are there others with the same experience? Does someone know to whom at Salesforce and over which channels we could reach out and address this issue? (I have no premier support, and my questions to anything close to development will be shut down when I open a case)   What I checked so far  The URLs of the deep-content have not been changed (as it happened some time ago ). I could check this, because I've lots of deep-link-bookmarks collected - all of them working correctly with no redirect noticed. If the URLs had changed, it could be just a question of time the google bot needs to re-index the documentation again, but since the links are the same I'm expecting no improvement just by further waiting.  Workaround  As @JamesSullivan stated in his comment the search engine  is doing better than Google. I can confirm that searching for apex map class salesforce brings up the right match on TOP 1. But it feels slightly less powerful as Google felt before and I need to feed one or two keywords more to get such precise matches as I was used to.  Extra note  Google for apex map class salesforce (like duckduckgo above) brings at TOP 1 a poor match to the root  (not to the deep content) and it shows up in Japanese or Chinese for me by default. I think this might have been the link I'm after, but got crippled somehow... (but not sure)  Conclusion  I think only Salesforce can help.  It seems to me, that maybe the google bot is just no longer crawling the documentation - maybe because of a bad robots.txt or something similar, which might be easy for Salesforce to change back as it was a short while ago...


Can I attend a PhD program with the intent to transfer my PhD credits to an MS and after 2 years, apply to a better university for a PhD?

I have been admitted to a PhD program at a  US university in the department of physics. The  department ranking is 100 (according to the US News ranking). In the PhD program, most of the students in physics study the fundamental principle in order to be prepared for doctoral studies. It takes around three semesters.  The  department I have been admitted to, also has an MS course.   My intention is to  transfer my PhD credits to the MS in order to gather more research experiences (2 years study) and later apply to a better university. Is it possible to manage this with my graduate supervisor? How  positive is my case? And how do you think my supervisor would respond to this?


Electromagnetic waves phase shifting needed?

Very simple question:   It could be observed that in electromagnetic waves we can see points when Electric and Magnetic fields waves are both in ZERO position.   Is it right?   Because of Conservation of energy I want to say that:  When one of the wave reaches its maximum other should be in minumum. Like in swings with potential and kinetic energy...   But here we can see that energy is forming from Nowhere...explain me please...    Thanks


Is there a good SE site that is only about refactoring?  I know there are sites like this, but SO has the largest audience of programmers so a section where you can just post a code snippet and people can give advice on refactoring it.


I'm trying to spawn an SSH from my bash profile script that runs in the background for connection sharing (via its control socket). The problem I'm running into is a reliable way to ensure the SSH doesn't stay running once the TTY is closed (or more directly; once the parent bash shell has exited).    I know the shell can run commands (to terminate SSH) when it exits gracefully, but I'm trying to handle all possible scenarios where the shell doesn't get a chance to shut things down.  Is there a clever way I can do this?  The best idea I've had is   ssh -o PermitLocalCommand=yes -o LocalCommand='cat >/dev/null; kill $PPID' $HOST &   But this won't work because I need the command to only background once it has successfully started. Alternatively, I can't use -fN instead of the shell's & because the SSH -f only backgrounds after the LocalCommand has completed.  Also I'm trying to avoid running any command on the remote host. Otherwise I could probably do something like ssh -fN $HOST 'cat >/dev/null'


I have a critical problem here, i have a 8GB USB 2.0 flash drive wich i tried to format it, filling it with zero but the operation was too long and when the progress bar was in 1% I cancelled the operation now my laptop cannot recognize the device and the USB LED just light up without blinking. Please help me


Does Gray's Sports Almanac 1950-2000 actually exist?

So, the main plot device in Back to the Future II (aside from the DeLorean) is Gray's Sports Almanac 1950-2000.  As we're now in 2015, the statistics must be available, so my question is does the book (or at least a book very similar to that i.e. not necessarily that thin or by Gray's!) exist?


Can't boot into Windows after dualbooting Ubuntu

GRUB still shows Windows but it doesn't start.  I have tried using boot-repair but it gives me an error too. So I've created a .  What could be the problem, and how can I fix it?


What is throttling multithreaded performance?

I installed Ubuntu 12.04.5 (64 bit) on a Dell T5500 with two Xeon 5650 6-core processors specifically to run the free DCP-o-matic software (). The same machine used all 24 virtual cores before under Windows 7 Professional 64 bit, but I was just not happy with that OS.  Under Ubuntu the performance was less than 1/10 of what I had experienced under Windows. I next upgraded to 14.04.2 but to no avail. Monitoring the resources makes it clear that the processors are throttled down after reaching their peak performance. The pattern looks like saw teeth.  Here is a screenshot   What can I do to achieve maximum performance? Any help is very much appreciated!


UFW: Weird incomming request from router and other home pc

This morning I finished setting up raspberry pi os. I also set up my ufw. Now when I check my logs I see this weird incomming blocked request. These ip addresses are from my router, my own laptop and sometimes another home pc. here is an example: Jul  9 11:36:07 raspberrypi kernel: [ 9433.861599] [UFW BLOCK] IN=eth0 OUT= SRC=x.x.x.x DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2  Does anybody know why I keep getting these requests around every 3 minutes, and is it something to worry about?


How to mount filter to lens without thread?

Disclaimer: I have never used a Filter or Lens Hood, so this might be weird question.  I plan to do some landscape photography using my Lumix G F1,7/20 mm MFT Lens. Unfortunately I just realized that this lens does not have any thread to screw something on:    Is there still a way to mount filters, maybe using some accessory?


Ubuntu 16.04 LTS Network Manager cannot add VPN - greyed out

I'm trying to add a  to my network, but the option is greyed out.  Screenshot of the greyed-out indicator   I installed network-manager-openvpn but still no luck. Editing my connection does not show any VPN settings or tabs.  I'd appreciate it if anyone could point me in the right direction!  EDIT: In case anyone else has this issue, the wording "Add A VPN Connection" is super misleading as it's telling you that you need to add a VPN connection, not that you are supposed to click to add one from there.  So select Edit Connections, Add, and then select your VPN from there.


How do I use VLC Command Line In Windows Batch Line Without Showing GUI?

I want to use the following to convert some M4A files to MP3. It works fine, but it displays the VLC GUI for each file and shows 'quit' as a second file to be converted. Is there a 'silent' mode, where it does the conversion with not graphics interface? Or is there something wrong with my syntax?  @echo off for /f "delims=|" %%f in ('dir /b *.m4a') do (   CALL "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "%%f" --sout=#transcode{acodec=mp3,ab=128,vcodec=dummy}:std{access="file",mux=raw,dst="converted/%%"} vlc://quit )   UPDATE: I edited per Answer #1  @echo off for /f "delims=|" %%f in ('dir /b *.m4a') do (   CALL "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "%%f" --intf dummy --sout=#transcode{acodec=mp3,ab=128,vcodec=dummy}:std{access="file",mux=raw,dst=converted/"%%f"} vlc://quit   move "%%f" trash/"%%f" )   What it does is open a DOS command window as each file is processed. What I want is a totally silent mode (if possible). I have another batch file which does something similar (rips CD files to MP3) and it seems to work like that:  FOR /R D:\ %%G IN (*.cda) DO (     "C:\Program Files (x86)\VideoLAN\VLC\vlc" -I http cdda:///D:/ --cdda-track=!y! :sout=#transcode{vcodec=none,acodec=%e%,ab=320,channels=2,samplerate=44100}:std{access="file",mux=raw,dst="%t%!PADDED!.%e%"} vlc://quit )   What am I missing?


Menu items (all menus) being deleted randomly on their own

This is really driving me up the wall now.  Randomly, all my menu items for all menus are just being deleted on their own. Not the menus themselves but all items within them.  This is a custom theme we built upon the Bones boilerplate. We've built plenty of sites on Bones though and we're not experiencing the problem with any others.  I know the usual advice will be:-   Deactivate all plugins and see if the problem persists. Revert to the default Wordpress theme and see if the problem persists.   But this isn't particularly practical as it means breaking our website for weeks on end waiting to see whether the problem occurs again.  Each time this happens, we have to manually rebuild all our menus and it is becoming a real pain now plus potentially catastrophic if Google crawl our website when these menu items have all been deleted.  This only started happening since the 3.8 update but occurs within four days of reinstating all the menu items again.  There is nothing of note in the error logs. This last happened in the past 48 hours and all we have in the error log from this period is the following (actual domain replaced with domain.com):-  [Sun May 25 02:32:23 2014] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!? [Tue May 27 04:10:55 2014] [error] [client 188.143.234.90] script not found or unable to stat: /var/www/vhosts/domain.com/cgi-bin/php [Tue May 27 04:10:55 2014] [error] [client 188.143.234.90] script not found or unable to stat: /var/www/vhosts/domain.com/cgi-bin/php5 [Tue May 27 04:10:55 2014] [error] [client 188.143.234.90] script not found or unable to stat: /var/www/vhosts/domain.com/cgi-bin/php-cgi [Tue May 27 04:10:55 2014] [error] [client 188.143.234.90] script not found or unable to stat: /var/www/vhosts/domain.com/cgi-bin/php.cgi [Tue May 27 04:10:55 2014] [error] [client 188.143.234.90] script not found or unable to stat: /var/www/vhosts/domain.com/cgi-bin/php4 [Tue May 27 04:10:55 2014] [error] [client 188.143.234.90] script not found or unable to stat: /var/www/cgi-bin/cgi_wrapper/php   If all anyone can suggest is the above bullet points, then all I can really think of is to replicate the website in a dev environment and noindex the site for web crawlers (I've asked in various communities already) - there does seem to be a few other people that have experienced the same problem with little idea of resolution although for some it seemed to be related to plugins (although I don't have those plugins installed on our website).  Frustrating! Can anyone shed some better light on how to get to the bottom (debug) of this one?  I've just found  on here as well...  The database has been repaired as well to no avail.


Obvious but unprovable: If $f'$ is the zero function on $\mathbb Q$, then $f$ is constant

Let $f:\mathbb Q\to\mathbb R$ be a uniformly continuous function and assume that $f'(x)=0$ for all $x\in\mathbb Q$. That $f$ is constant is obvious...and, as far as I can tell, unprovable. Please tell me that I'm wrong!


Does "Dying" mean being "Bloodied" at the same time, technically?

In D&D 4th Edition, one can only get to a state of Dying after getting Bloodied first. If - for example - I have a Feat which gives me the ability A to do something as a Minor/Move/Standard action while I'm Bloodied, while at the same time I'm currently in a Dying state and I have another Feat that allows me to be conscious: Can I perform A? Practical examples:   Unnatural Vitality: Whenever you drop to 0 hit points or fewer, you are dying but you can choose to remain conscious until your first death saving throw. If you remain conscious, you can take only one standard action before you attempt your first death saving throw.    Wounded Resurgence (21st level): If you are bloodied, you can spend a healing surge as a minor action to restore your current hit points to your bloodied value. Also, you don't take a death penalty when you are returned to life by the Rise Dead ritual.


$\phi : A^n \to A^n $ be a surjective $A$-linear map then $\phi$ is injective as well.

Let $A$ be a commutative ring with $1,$ and $\phi : A^n \to A^n $ be a surjective $A$-linear map for some natural number $n.$ Then show that  $\phi$ is injective as well.   Tensoring with $A/m$ for some maximal ideal $m$ in $A$ will give that tensor map is onto and being $A/m$ linear is injective. But from this map I cannot recover $\phi$ and claim that $\phi$ is also injective. Any help will be appreciated. Thanks.


Can one travel from Jeju island to Seoul without a passport?

A friend of mine misplaced his passport while staying in Jeju island. Normally I would advise him to just travel to Seoul, get an emergency passport from his embassy and fly back home without issues, but I know that Jeju island has a special immigration regime.   Are there any immigration checks on the way from Jeju island to Seoul? If not, can one travel that route without a passport?


Can the vertical line please be removed (again)?

The same issue as  has arisen again.     The bug was initially fixed, but it seems to have regressed. I'm posting again because SE generally prefers we file new bug reports if a fixed bug comes up again, rather than removing the  tag on the older one. Again, I really don't like it there. It's eye-catching and extremely distracting for me.


Is information entropy the same as thermodynamic entropy?

Context  In one of his most popular books , Terry Pratchett makes an entropy joke:     Knowledge equals Power, which equals Energy, which equals Mass   Pratchett is a fantasy comedian and every third phrase in his book is a joke, therefore there is no good reason to believe it.  Pratchett uses that madness to make up that a huge library has a tremendous gravitational push.  The question  I work with computers and mostly with encryption.  My work colleagues believe Terry Pratchett's statement because of entropy.  On the other hand, I believe, it is incorrect since entropy of information is a different entropy than the one used in thermodynamics.  Am I correct?  And if so, why do use the same name (entropy) to mean two different things?  Also, what would be a good way to explain that these two "entropies" are different things to non-scientists (i.e. people without a chemistry or physics background)?


Nullpointer exception and Stack overflow on recursive AVL tree balance method

I have been trying for a long time to fix these problems with my tree program. I'm trying to build a refference based AVL tree that will keep itself balanced, The following methods are what are giving me the stack overflow and Nullpointer exception. I clearly need to work on my debugging skills but any advice that you could give me is really appreciated.  public AVLNode balance(AVLNode r){ System.out.println("start of balance"); if (r.getBalance()==r.MORE_LEFT){ /* dont need to check if r.hasLeft after this   statement because if it passes has more left then it must have   at least a left node */   //if the left node has more attachments either left or right ways     if(r.getLeft().getBalance()!=r.EVEN){       System.out.println("r,MORE_LEFT && nextLeft is uneven");       //calculateBalance(r);       r.setLeft(balance(r.getLeft()));     }else{       System.out.println("doing the shift for "+(String)r.getElement());       AVLNode shift=new AVLNode(r.getKey(), r.getElement(), null, r.getRight(), r.getBalance());       r=balance(r.getLeft());       insert(r, shift);     } //else if the Right side has more of the unbalance }else if (r.getBalance()==r.MORE_RIGHT){   if(r.getRight().getBalance()!=r.EVEN){     System.out.println("r.MORE_RIGHT && nextRight is uneven");     r.setRight(balance(r.getRight()));   }   else{     System.out.println("doing the shift for "+(String)r.getElement());     AVLNode shift=new AVLNode(r.getKey(), r.getElement(), r.getLeft(), null, r.getBalance());     r=balance(r.getRight());     insert(r,shift);   } } if (r.hasLeft()) {   System.out.println("botom left if run");   r.setLeft(balance(r.getLeft())); } if (r.hasRight()) {   System.out.println("bottom right if run");   r.setRight(balance(r.getRight())); } return r;   }   public void calculateBalance(AVLNode r){     if (r!=null) {       if (!r.hasRight() && !r.hasLeft())         r.setBalance(r.EVEN);       else {         int rDeep=0;         int lDeep=0;         if (r.hasRight()) {           rDeep=depth(r.getRight());           calculateBalance(r.getRight());         }         if (r.hasLeft()) {           lDeep=depth(r.getLeft());           calculateBalance(r.getLeft());         }         if (lDeep>=2+rDeep){           System.out.println("Node "+(String)r.getElement()+" has balance MORE_LEFT");           r.setBalance(r.MORE_LEFT);         }         else if (rDeep>=2+lDeep){           System.out.println("Node "+(String)r.getElement()+" has balance MORE_RIGHT");           r.setBalance(r.MORE_RIGHT);         }         else{           System.out.println("Node "+(String)r.getElement()+" has balance EVEN");           r.setBalance(r.EVEN);         }       }     }else System.out.println("null passed to calculateBalance You got splainin!!!");   } public int depth(AVLNode r){ if(r==null) return 0; int max=Math.max(1+depth(r.getLeft()), 1+depth(r.getRight())); System.out.println(""+max); return max;  //the number that is greater //two options, go left or right count both and chose the greater one   } Here is the stack trace to show where I'm getting the error:  Level 1: VR  Level 2: US WQ  Level 3: GX  Level 4: QE  balanced 1 times. start of balance r,MORE_LEFT && nextLeft is uneven start of balance doing the shift for US start of balance bottom right if run start of balance bottom right if run start of balance bottom right if run start of balance Exception in thread "main" java.lang.NullPointerException     at AVLDictionary.balance(AVLDictionary.java:64)     at AVLDictionary.balance(AVLDictionary.java:93)     at AVLDictionary.balance(AVLDictionary.java:93)     at AVLDictionary.balance(AVLDictionary.java:67)     at AVLDictionary.insert(AVLDictionary.java:42)     at DictionaryAdvancedTest.main(DictionaryAdvancedTest.java:36)


Is there a standard TeX or LaTeX code for a symbol that bears the same relation to  \prec\prec that \ll bears to << ?  (And how do I get TeX code to get rendered in a question posted here?  I'm accustomed to writing things like $\sum_{n=0}^\infty \frac{x^n}{n!}$ on math.stackexchange.com and having it look the way you'd expect it to.)


Contour integral of log over fractional power

I want to compute the integral $I=\int_0^\infty \frac{\ln x}{x^a(1+x)} dx, 0<a<1$ using contour integral.   I tried to tackle the problem by considering the function $f(z)=\frac{\log z}{z^a(1+z)}$, where the argument of $\log z$ is in the range $(0, 2\pi)$, and integrating over the counterclockwise "pacman contour". It's standard to show that the integrals over the large arc and small arc converge to zero as we take limit, so it remains to calculate the two integrals over positive real axis. Here's my work:  The integral along the path slightly above the real axis is exactly $I$. The integral along the path slightly below the real axis (with reversed limits of integration) is   $\int_0^\infty \frac{\log z}{z^a(1+z)} dz = \int_0^\infty \frac{\log x + 2\pi i}{e^{a (\log x + 2\pi i)}(1+x)}dx=e^{-2\pi ia}I + e^{-2\pi i a}2\pi i \int_0^\infty \frac{1}{x^a (1+x)}dx$  Then the value of the contour integral is $(1-e^{-2\pi ia})I-e^{-2\pi i a}2\pi i \int_0^\infty \frac{1}{x^a (1+x)}dx=2\pi i \mathrm{res}(f, -1)$. But this doesn't give me the correct answer. Can anyone show me where I went wrong in the calculation?


Representing population variables in a map

Could some one advise me in some ways (or popular ways) of representing population variables in a map? For population variables I refer to: distribution of age among the population, people with elementary school, etc..


Folder shortcuts from windows stops working

I dual boot xubuntu alongside windows separated by two partitions. Every time I make a shortcut to a folder from the windows partition, it stops working/disappears from the side pane after restart. Is there any fix to this?


Say I have to add a file path like "\F\A B\C". Please note the blank between A and B are intended. I tried this as below. However, the blank is missing. How to fix it, please? Usually \ plus a blank means a blank. Right?   \documentclass[]{article}  \usepackage{hyperref}  \begin{document}  \url{\\\\F\\A\ B\\C}  \end{document}


What Exactly is the Difference Between $F[\alpha$] and $F(\alpha$)?

I'm not really understanding the difference between $F[\alpha$] and $F(\alpha$), where $\alpha$ is an element of $E$, a field extension of $F$. From what I read, $F[\alpha$] = $F(\alpha$) when $\alpha$ is an algebraic over $F$. But why is that? And if $\alpha$ is transcendental, then it seems to be a completely different case.   Really, any clarification on what the difference between $F[\alpha$] and $F(\alpha$) is would be tremendously helpful. Thank you!


$||T-I|| < 1$ implies that $T$ is invertible.

Let $B$ be a banach space and $T : B \to B$ be a bounded linear transformation.   If for identity transformation $I : B \to B$ , $||T-I||$<1 , then $T$ is invertible.  || || is norm of transformation.


Can infinitely many primes lie over a prime?

Let $R \subset S$ be an integral extension of domains and $\mathfrak p \subset R$ a prime ideal. Can it be the case that there are infinitely many distinct primes ${\cal P} \subset S$ such that ${\cal P} \cap R=\mathfrak p$?    Certainly this is impossible if $S$ is a Dedekind domain, because the primes lying over $\mathfrak p$ are the primes of $S$ occurring in the factorization of $\mathfrak p$ over $S$.  I don't have much of an intuition for integral ring extensions that aren't number fields, so past this I'm not particularly sure.


How can Google Analytics report a high bounce rate and average time on page in minutes? What is the difference?

Some pages in my website(s) have low/high bounce rate but the Avg. Time on Page is more than 4 minutes can anyone explain to me why the bounce rate is still high?


Big theta and its actual meaning when analysing code?

i heard somewhere that for example to tell that a function has a big theta of n it has to have complexity of n in both its best and worst cases, so linear search would not be big theta of n because it has best case O(1), but i doubt this information, so if you have any code which you want to analyse, when to say that this code has a big theta of some function ?


what is the probability of picking an even number out of all natural numbers?

I've been thinking about this and it seems to confuse me more and more. Sure, at first site it looks to be half, but is it really half?   One can argue that for each even number there corresponds an odd number, but this argument can be challenged by saying that for each even number there can correspond two odd numbers which will mean the probability is a third...  Am I thinking wrong somewhere??


Show that $\mu_{F}$ is a measure on $(\mathbb{R},\mathcal{S})$.

Let $X=\mathbb{R}$ and let $\mathcal{S}=\{A\subseteq \mathbb{R}:$ either $A$ is countable or $\mathbb{R}\setminus A$ is countable }. Let $f:\mathbb{R}\rightarrow [0,\infty)$ be any function, and define $\mu_{F}:\mathcal{S}\rightarrow[0,\infty)$ by $\mu_{f}(A)=$sup $\{\Sigma_{x\in F}f(x):F\subseteq A$ is finite$\}$ Show that $\mu_{f}$ is a measure on $(\mathbb{R},\mathcal{S})$. Now I know that a measure on $(X,\mathcal{S})$ is a function $\mu:\mathcal{S}\rightarrow[0,\infty]$ such that $\mu(\bigcup_{k=1}^{\infty}E_{k})=\Sigma_{k=1}^{\infty}\mu(E_{k})$, but I am unsure of how to incorporate the disjoint sets into the definition for $\mu_{f}(A)$. I know that if $E_{1}\cup E_{2}\cup...=A$ where each $E_{i}$ is disjoint then we have \begin{equation*} \begin{split} \mu_{f}(E_{1}\cup E_{2}\cup...)=\mu_{f}(A)&=\text{sup}\{\Sigma_{x\in F}f(x):F\subseteq A \space  \text{is finite}\}\\ &=\text{sup}\{f(x_{1})+...f(x_{n}):\{x_{1},...,x_{n}\}\in F\} \end{split} \end{equation*} and somehow the last line should equal $\mu_{f}(E_{1})+\mu_{f}(E_{2})+...$ . Any help would be appreciated. Thank you


Faced unknown characters while trying to change the language of formatted datetime

I faced the unknown characters when trying to change the language of formatted datetime. So, that unclear characters are 10 �������� 2018 the code behind it is   <h6> <?php setlocale(LC_TIME, 'Russian');         echo $personal->created_at->formatLocalized('%d %B %Y'); ?></h6>   I really need your help guys


I have a strange behaviour I cannot explain: the scrollbar for my page is not around the tag "main" as expected when I put the line <!DOCTYPE html> at the beginning of my code. If I remove this first line, I have the expected behavior. Why is that? What is my mistake here?    <!DOCTYPE html>          <meta charset="UTF-8">     <meta name="viewport" content="initial-scale=1.0">     <title>Off Track</title>                             bla bla
    bla bla
    bla bla
    bla bla
    bla bla
       bla bla
    bla bla
    bla bla
    bla bla
    bla bla
       bla bla
    bla bla
    bla bla
    bla bla
    bla bla
       bla bla
    bla bla
    bla bla
    bla bla
    bla bla
       bla bla
    bla bla
    bla bla
    bla bla
    bla bla
       bla bla
    bla bla
    bla bla
    bla bla
    bla bla
       bla bla
    bla bla
    bla bla
    bla bla
    bla bla
       bla bla
    bla bla
    bla bla
    bla bla
    bla bla
       bla bla
    bla bla
    bla bla
    bla bla
    bla bla
                         NB : I also have the expected behavior if I replace height:calc(100% - 70px) by height:calc(100vh - 70px), but I want to avoid using vh.


$\{1/2\}\times (1/2,1]$ is not open in the ordered square

Consider the square $[0,1]^2$ with the dictionary order (the restriction of the dictionary order on $\mathbb R^2$ to the subset $[0,1]^2$. I'm trying to understand why the set $A=\{1/2\}\times (1/2,1]$ is not open in the order topology on $[0,1]^2$.   Munkres give this picture that should clarify things:    The order topology on the square is given by the basis that consists of all elements of the form $[a_0,b)$ where $a_0=(-1,1)$, $(a,b_0]$ where $b_0=[1,1]$, and $(a,b)$ (w.r.t. the dictionary order). The definition of $A$ being open is this: for every every $t\in A$ there is a basis element $U$ s.t. $t\in U\subset A$. Its negation is: there is $t\in A$ such that for all basis elements $U$ it is not true that $t\in U\subset A$. But I couldn't find such $t$ and unravel "it is not true that $t\in U\subset A$".


How can I open the grub menu from the grub CLI?

I'm running a fresh Ubuntu 16.04.2 on a brand new machine (2 weeks old), but 2 nights ago (May 2-3) a kernel update completely broke my system. I have reasons to believe I could fix it if I could tell grub to pick an older kernel at startup.  Problem, this is a single-boot install so grub's menu is disabled by default, and I can't get it to show up by pressing Shift, repeatedly or not (or hitting the space bar or whatever.) So far I can only get grub's command-line interface to show up by pressing Esc. That's all I have at the moment as I can't even open a session, less so a terminal, so I can't edit grub's config file or anything else.  I've tried to do  grub> configfile /boot/grub/grub.cfg   but it just tries to launch my system as usual without me being able to interfere to pick another kernel.  I've heard it's possible to launch grub's menu interface from the CLI, but it isn't explained how one is supposed to do that in the . At the moment, it seems to be my only option. Ideas?  EDIT: Since I can't edit config files or use Shift to bring up the grub menu, this is NOT a duplicate of


how to manipulate mp3 songs and remove the vocal and leave only the background music?

I want to karaoke but my mp3 files hold vocal music.  I want to make music instrument because I want to karaoke  How can I manipulate mp3 songs and remove the vocal and leave only the background music?  I'm using Ubuntu 16.04


I tried Ubuntu and Kubuntu but both are freezing on my desktop PC. I can still move my mouse pointer but nothing reacts. I can't even switch to tty. (in comparison to the other freezing issues i found where the mouse pointer disappears but tty still works fine). It often occurs when i re-size or try to close a window (i will be still there but frozen) but not exclusively. Using a Intel Quad Core, 4GB Ram and an AMD Radeon Graphicscard. It's no duplicate to the other recent freezing bugs i found on ask Ubuntu (at least if i didn’t missed one) since the behaviour of the freeze is different, i can sill move my mouse, but can't switch to tty.    update i got to tty but wenn i type my login namethere for a while nothing happens then i get this message repeading every 10 secounds or so:     ata3.00: exeption Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen      ata3.00: failed command: READ DMA EXT      ata3.00: cmd 'some hex numbers' tag 'some number between 0 and 28 in this case' dma 4096 in res 'some hex numbers' Emask 0x4 (timeout)      ata3.00: status: { DRDY }   and about every minute this message:     end request: I/O error, dev sda, sector 'some huge number'   Buffer I/O error on sda1, logical block 'some big number'   pointing to harddrive problem, doesn't it?


Difference between Ethernet splitter and switch

I have one Ethernet port that is wired directly to the router on another level.  However, I want to run a desktop and a server both off this one Ethernet port.  Can anyone tell me the difference between an Ethernet splitter and a switch?    Also, will either the splitter or switch slow down the connection as opposed to just one connection?


CSS Vertical Alignment Property Not Working

I would like to center the text in bartext and button within the bar class. Is this possible with vertical-alignment property? Below I have a link to the codepen version of my problem.    Snippet:    .bar {     display: inline-block;     width: 100%;     height: 50px;     background-color: black;     color: white;     font-style: italic;     font-size: 18px;     text-align: center; } .bartext{     display: inline-block;     vertical-align: ; } .button1 {     display: inline-block;     vertical-align: ; }

This is how you contact us

Contact


Homogeneity and Differentiability at $0$ implies linearity?

Suppose $f: \mathbb{R}^n \to \mathbb{R}^m$ is homogeneous and differentiable at $0$, then does it follow that $f$ is a linear transformation?  I know that I need to show that for any $x,y \in \mathbb{R}^n$ and $\lambda \in \mathbb{R}$, then  $$ f( \lambda x + y ) = \lambda f(x) + f(y) $$.   I know by homogeneity that $f( \lambda x ) = \lambda f(x) $. But how can I show that $f$ preserves the operation $+$ ?


I try to execute a preg_match with PHP but I can not escape the slash properly. The preg_match should return subsrting between Prozessor and first slash  $str="Prozessor: AMD A-Serie A8-4500M / 19 GHz ( 28 GHz ) /";  preg_match('/Prozessor: (.*) \//', $str, $matches)  Prozessor: AMD A-Serie A8-4500M / 19 GHz ( 28 GHz ) /   I would like to get the name of the Processor which should give me back  AMD A-Serie A8-4500M    What I'm doing wrong


How much bytes of memory are allocated after the following java statement is executed using a 32 bit JVM (assume that a memory reference contains only the first address of location being referenced)?  int a = new int[20];


I'm writing my final work of the career, but I can't find how to write this symbol.    It's like a weird "a" before (θ, ϕ).  Thank you so much!


16.04 - 32 bit Ubuntu online upgrade to 18.04 Failure

I had gotten the message on my software updater that there was an update from 16.04 to 18.04 and it appeared valid.  I had been putting it off as I usually wait before moving to the latest LTS release.  Long story short I finally chose to update and now I'm stuck.  It appears to be booting up but then goes to a blank screen and nothing seems to work.  I try to get to a console by pressing Cntr + Alt + f1 and I get no prompt to login.  went through all of the console sessions not one of them work.  When I press the power button it appears to be shutting down I see the the Ubuntu splash screen and the laptop powers off.  When I boot up I see the same splash screen and then it just goes to a blank screen??  Anyone have any thoughts??  Dam why would they allow an upgrade to process if the processor type is a miss-match?  Any help or direction on how to recover back to 16.04 would be helpful.  Thanks in advance...