I need to build a logistic regression model.  there are around 50 categorical variables. So, is this approach to select variables wrong?: do a chi square test of dependent variable vs independent variables, and only use those variables which show a dependency (p value lesser than .05). similarly using t test to see if continuous variables are actually different when why dependent variable is either 0 or 1.  or kindly tell how can this approach go wrong (data has got around 2000 rows, so less observation wont be a problem for sure.)

I would like to implement an algorithm for automatic model selection.  I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though).   My problem is that I am unable to find a methodology, or an open source implementation (I am woking in java). The methodology I have in mind would be something like:   calculate the correlation matrix of all the factors pick the factors that have a low correlation to each other remove the factors that have a low t-stat add other factors (still based on the low correlation factor found in 2.). reiterate several times until some criterion (e.g AIC) is over a certain threshold or cannot or we can't find a larger value.   I realize there is an R implementation for this (stepAIC), but I find the code quite hard to understand. Also I have not been able to find articles describing the stepwise regression.


$$\cos(1)+\cos(2)+\ldots+\cos(n-1)= \cos(n)-\cos(n-1)/(2\cos(1)-2 ) -1/2$$  Here is my attempt:  Let $P(n)$ be this statement.   $P(1)$ is true since $0=\cos(1)-\cos(1-1)/(2\cos(1)-2)   -1/2$  Suppose $P(k)$ is true for some integer $k$. Then I have to prove $P(k+1)$ is also true. That is :  $$\cos(1)+\cos(2)+\ldots+\cos(k-1)+\cos(k)=\cos(k+1)-\cos(k)/(2\cos(1)-2) -1/2.$$  By inductive hypothesis, we have $\cos(k)-\cos(k-1)/(2\cos(1)-2 )  -1/2 +\cos(k)$. But how does it equal to the right hand side? Can someone help me with this question please, thank you!

Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$


The book I am looking for was set in the future, overpopulation and poverty were everywhere. A group of homeless/poor kids (maybe young adults) went to a special building where they were placed into simulators several times (i.e., they went back home between each session) where they explored another planet.  At the end of the book, they went there again but soon find out that this time it was the real planet, not just a simulation, and they start rebuilding society.

I'm trying to recall the title of a young adult-targeted book. It was probably published by Scholastic, or at least sold through their take-home pamphlets, which means it was probably published before I started high school in 1996. It's about a group of teenagers who receive invitations to play a game at an invitation-only arcade. When they go there, they are put in an immersive VR game in which they must learn to survive on an alien planet. I believe the game ends and they wake up back in the real world after they fall asleep on the alien one. They are invited back the the game a couple times, and then it turns out…      …they go to play the game again, but they are unable to exit it. Eventually they realize that they actually are on an alien planet now, and that the previous game-playing sessions were just training for the real thing. I believe the epilogue states that all of the players have coupled up and the females have become pregnant, and they are optimistic about populating the new planet.   I think it was told in the first-person perspective of a female player. I don't think there was a real protagonist or strong conflict; just the group of players learning how to survive in the game. One of the other players had a photographic memory and used it to map the planet's surface. I think the cover art featured of a girl wearing a VR headset over her eyes, with her hair being blown back and her mouth open in surprise.


My approach to proving this as follows : What would be your advice on me? Is my proof incorrect/correct, what else should be mentioned etc? I'm just new to analysis in mathematics.  So let $a_n$ be this sequence. We are in $\mathbb R$ so by the Least upper bound property $\inf(a_n)$ and $\sup(a_n)$ exist. Either $\sup(a_n)$ or $\inf(a_n)$ will be achieved as $n$ goes to infinity. Let's say $a_n\to L$ as $n$ goes to infinity. We know this should either be $\sup(a_n)$ or $\inf(a_n)$ as I mentioned above. If let's assume $a_n$ increases to this would be $\sup(a_n)$  Therefore $$\sup(a_n)=L$$  Let's say that there exists another limit $M$ For $M$ to be different than $L$ $M=\inf(a_n)$ should be the case.  But since we assumed $a_n$ is an increasing function, $|a_n-\inf(a_n)|<|a_{n+1}-\inf(a_n)|$ so as $n$ goes to infinity it is impossible for us the reach $\inf(a_n)$ therefore convergence happens only when limit point exists.  If more than two limit points exist, this would show us that $a_n$ is not monotonic, therefore can't converge.

Let $(x_i) _{i \in I}$ be a net in a compact Hausdorff space X, with the property that every convergent subnet has the same limit $x$. Does this imply that $(x_i) _{i \in I}$ converges?  If I try to proceed by contradiction, I do not how to rule out the possibility of having subnets that do not converge at all. (Of course, by compactness each such subnet should have at least a subnet convergent to $x$, but this does not help me.)  (If it helps, my compact space is in fact a weakly-compact subset in a locally-convex linear topological space space, obtained with Alaoglu's theorem.)


I would like to play a video in a dialog window, but it doesn't work. The video is instead of the "raw" directory. I don't know where I'm wrong. Can you help me Please? There is the code  ImageButton video_player = (ImageButton) findViewById(R.id.img_btt_on_ear_watch);         video_player.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                 final Dialog dialog = new Dialog(context);                 dialog.setContentView(R.layout.layout_video_player);                  String filePlace = "android.resource://" + getPackageName() + "/" + R.raw.grado_video_cuffie_making;                 VideoView videoV = (VideoView) findViewById(R.id.vv_video_player);                 Uri videoURI = Uri.parse((String) filePlace);                 videoV.setVideoURI(videoURI); //this is the 128 raw                 videoV.setMediaController(new MediaController(context));                 videoV.start();                  ImageButton dialogButton = (ImageButton) dialog.findViewById(R.id.img_btt_vv_close);                 // if button is clicked, close the custom dialog                 dialogButton.setOnClickListener(new View.OnClickListener() {                     @Override                     public void onClick(View v) {                         dialog.dismiss();                     }                 });                  dialog.show();              }         });   There is the Logcat  11-15 10:40:50.666 3893-3893/com.huawei.headphones.huaweimusic E/AndroidRuntime: FATAL EXCEPTION: main                                                                                Process: com.huawei.headphones.huaweimusic, PID: 3893                                                                                java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.VideoView.setVideoURI(android.net.Uri)' on a null object reference                                                                                at com.huawei.headphones.huaweimusic.Activity_Cuffia1$1.onClick(Activity_Cuffia1.java:128)                                                                                at android.view.View.performClick(View.java:5610)                                                                                at android.view.View$PerformClick.run(View.java:22265)                                                                                at android.os.Handler.handleCallback(Handler.java:751)                                                                                at android.os.Handler.dispatchMessage(Handler.java:95)                                                                                at android.os.Looper.loop(Looper.java:154)                                                                                at android.app.ActivityThread.main(ActivityThread.java:6077)                                                                                at java.lang.reflect.Method.invoke(Native Method)                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)

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


For both strong and common induction, $K + 1$ seems not rely on base case(s), just needs $K$ be true,   However, if base cases are not true, the induction below are meaningless.   so can I put base case anywhere, just before the conclusion(e.g. So, the statement holds true!)

When doing a proof by mathematical induction, I was wondering if there is any logical reason why the assumption (n=k) and induction (n=k+1) steps couldn't be done first, then do the basis case (n=1) afterwards, rather than the traditional way of doing this basis case first? I am teaching this to my students and I think it would make more sense to them to first show that P(k+1) is true if P(k) is true, and then show that P(1) is true, then P(2) must be true, P(3) is true, etc. and P(n) is true for all n. Anyway, I can't see any flaws in the logic? Please advise.


I recently searched for an answer to a programming question with Google. After the search did not turn up anything, I went to Stack Overflow chat and asked there, because it was more a question about which solution to a problem I had was best (that means I had a solution already, but wasn't sure if it was best).  After some discussion some alternate solutions came up that I liked better. I had the idea that it might be a good question / answer pair since that way it would be documented for future searching.  So, would it be OK to create a question / answer pair on SO just for reference? Or is it better to just forget about it? What is the SO policy? Does that belong more on Programmers?

Sometimes you spend a day or more solving a technical problem, and when you finally solve it, you may want to post it on your blog (if you have one) to share with the community.  However, most developers don't have a lot of time to update their blogs, and that is why personal blogs are not ranked very highly on Google/Bing.  So even if you describe a brilliant idea, chances are that, except a few of your friends, nobody will ever find it. This is a common reason why some developers start their blogs and soon give up; it is not interesting to write for the community if you have no feedback on your posts.  Unlike personal blogs, Stack Exchange sites are highly ranked in Google (I was amazed when I saw that a question asked on SO just an hour ago appeared 3rd in my Google search!), so if your question and answer are valuable for others, they will be rated highly and will be visible for other developers.  With this in mind, is it good practice to post a question and answer it yourself immediately when you want to share an idea with the community?


I have the physical copies of all rock band games for Xbox 360. I am just wondering if the license to export the rock band 1 songs is still available because I keep going to export the songs and it keeps saying “This item is no longer available.” So I don’t know whether if it is a license expire or a glitch with my game or system. Can someone help me with a possible solution?

As I'm planning to buy Rock Band 3, but I wanted to buy Rock Band 1 & 2 first.  But off course I don't feel like swapping disks all the time and I heard you can actually import games from Rock Band 1 into Rock Band 2, but how do I do this?  Note: I own both a PS3 and a Xbox360, so feel free to answer the question for every platform


When I enter my username and password I am looped back to the login screen again. I went to the shell screen and mv .Xauthority . Xauthority.bak is not working as it is saying /bin:/usr/bin is not included in the path environment variable.

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


Cut down the same list into given index  Let's say we have a list  mainList = [3,5,2,7,0,9]   If I remove 3 item then mainList should be  [7,0,9]   Is there a way to do that?

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


I was reading  and I think is really nice the format how they present the algorithms, how can I do this? what packages are needed and the styles.     Thanks in advance.

I would like to know how to format a pseudocode algorithm like the one shown in the picture below. I would like to see an example of Tex/Latex code that would mimic the style, formatting and design of the pseudocode illustrated on this picture. I know how to write simple pseudocode algorithms, but i don't know how to    Align the pseudocode with an \item "Some text.." How to write a pseudocode with Input and Output exactly below the procedure/function so that they are not numbered and aligned with procedure/function How to use the block braces in form of "vertical lines"     My attempt  \documentclass[a4paper]{article}  \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{graphicx} \usepackage[colorinlistoftodos]{todonotes} \usepackage{algorithm} \usepackage{algpseudocode}  \usepackage{geometry}  \geometry{  a4paper,  total={210mm,297mm},  left=20mm,  right=20mm,  top=20mm,  bottom=20mm,  }  \begin{document} \begin{enumerate}   \item Some text goes here . . .   \begin{algorithm}    \caption{Merge Sort}     \begin{algorithmic}[1]       \Function{Merge}{$A,p,q,r$}\Comment{Where A - array, p - left, q - middle, r - right}          \State ${n_1} = q - p + 1$         \State ${n_2} = r - q$         \State Let $L[1 \ldots {n_1} + 1]$ and $R[1 \ldots {n_2} + 1]$ be new arrays         \For{$i = 1$ to ${n_1}$}             \State $L[i] = A[p + i - 1]$         \EndFor         \For{$j = 1$ to ${n_2}$}             \State $R[i] = A[q + j]$         \EndFor         \State $L[{n_1} + 1] =  \infty $         \State $R[{n_2} + 1] =  \infty $         \State $i = 1$         \State $j = 1$         \For{$k = p$ to $r$}             \If {$L[i] < R[j]$}                 \State $A[k] = L[i]$                 \State $i = i + 1$             \ElsIf {$L[i] > R[j]$}                 \State $A[k] = R[j]$                 \State $j = j + 1$             \Else                 \State $A[k] = - \infty$ \Comment{We mark the duplicates with the largest negative integer}                 \State $j = j + 1$             \EndIf         \EndFor        \EndFunction  \end{algorithmic} \end{algorithm} \end{enumerate} \end{document}   My result   Comments   As you can see i don't know how to align the algorithm with the itemized text. I don't know how to place Input and Output words below the function, so that they are not numbered and aligned with a function. I like more the style of vertical line block, rather than just condition:end.    I'm new to writing pseudocode algorithms with Latex, but i suspect the style and formatting i'm looking for is in the package algorithm2e. Can someone show me how to achieve the following result:    I want to learn to write pseudocode algorithm in the same style as in the picture above.


In Chamber of Secrets, how did Dumbledore know Harry and Ron were there?  ‘However,’ said Dumbledore, speaking very slowly and clearly, so that none of them could miss a word, ‘you will find that I will only truly have left this school when none here are loyal to me. You will also find that help will always be given at Hogwarts to those who ask for it.’ For a second, Harry was almost sure Dumbledore’s eyes flickered towards the corner where he and Ron stood hidden. Chamber of Secrets - page 195 - Bloomsbury - chapter fourteen, Cornelius Fudge

In the film and book series, Year 4 (Goblet of Fire), how is it Mad-Eye Moody/Barty Crouch could see Harry through his Magical Eye even when he was under the Invisibility Cloak?  As the cloak is a True Invisibility cloak, immune to charms and spells, and according to legend invisible to even Death, how did Mad-Eye detect Harry Potter under the cloak? How Nagini and Mrs. Norris were able to sense Harry were through other senses, such as smell and warmth, but not visually.  I'm referring to the scene/chapter where Snape follows Harry at night. Harry hides under the Invisibility Cloak but his foot is stuck at the broken staircase. Eventually Mad-Eye arrives, sees Harry through his Magical Eye, and talks Snape away.


I have a question and want to receive your advices. Please help me. I am writing some codes with using pointer. My code bellow:  #include <stdio.h> #include <stdlib.h>  void test_pointer (char *t);  int main (){     char *t = "abcdef";    printf("Before excuting func: %s\n", t);    test_pointer(t);    printf("After excuting func: %s\n", t);    return 0; } void test_pointer (char *t) {    printf("In function - before allocating: %s\n",t);    t =(char *) malloc(10);    t = "123456789";    printf("In function - after allocating: %s\n",t); }   In this main(), I declared a char pointer and let its pointed to a string "abcdf" (length 7). But in the test_pointer() function, I used malloc() for allocating a new memory partition for that char pointer and then assigned a new value. That means char pointer had to be updated after using this function. But in real, it's not. Why?  when I executed this code, what I got is: Before excuting func: abcdef In function - before allocating: abcdef In function - after allocating: 123456789 After excuting func: abcdef  Please help me figure out what happened. Thank you very much.

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


Let $X_1,\ldots,X_n$ be independent log-normal random variables such that $$log(X_i)\sim N(\mu,\sigma^2)\ \ \forall i=1,\ldots,n$$  Then what can be said about the distribution of the random variable $Y$?   Where $Y$ is defined as  $$Y=X_1\times\cdots\times X_n$$

Let $X_1$ and $X_2$ be two normal random variables. Write $X_1\sim N(\mu_1, \sigma^2_1)$ and $X_2\sim N(\mu_2, \sigma^2_2)$, to fix ideas.   Consider the corresponding log-normal random variables: $Z_1 = \exp(X_1)$, $Z_2 = \exp(X_2)$.  Question: what is the distribution of the product of the two random variables, i.e., the distribution of $Z_1Z_2$?  If the normal random variables $X_1, X_2$ are independent, or they have a bivariate normal distribution, the answer is simple: we have $Z_1Z_2 = \exp(X_1+X_2)$ with the sum $X_1+X_2$ normal, hence the product $Z_1Z_2$ is still lognormal.  But suppose that $X_1, X_2$ are generally $not$ independent, say with correlation $\rho$. What can we say about the distribution of $Z_1Z_2$?


I have two files with one column. If the first rows in the two files are same, then print 1 otherwise print 0.  file1:  M A A M   file2:  M M A A   output:  1 0 1 0   Can anybody show me an awk script which would do this?

File1:  123 234 345 456   File2:  123 234 343 758   Expected output: File3:  TRUE TRUE FALSE FALSE   so the code should compare two files and print 'TRUE' if it matches otherwise it should print 'FALSE' in the new file. Could anyone please provide the solution for this?


I have a script and a "config" file that pull variables from.  I created the configuration file called config.cfg and used it in my script as such:  #! /bin/bash  if [ -f ./config.cfg ]    then         source ./config.cfg    else        exit   The config files contains a number of different things like  title="Foo Bar - The Untold Story" desc="This is a verbose description of Foo Bar's Untold Story" author="S. Nafu" date="01/01/1932" image_url="./path_to_image/foo.bar.jpg" image_link="http://www.foo.bar/foo_bar"   So far, eveything works because I can issue (in the script) the command:  echo $title   and get   Foo Bar - The Untold Story   What I am Trying to Accomplish  I want to create an XML file based on these fields and attributes.  Ideally,  want to parse the file and determine if the variable was declared, not if it has a value or not.  So...here is the code I came up with:  function writeln  {    local attrib=$1    local value=$2    local fmt="%s%s%s\n"     printf $fmt "<$attrib>$value</$attrib>" }  function writeChannel {     local fmt="%s\n"     printf $fmt "<channel>"     while read line     do         local xml_attrib=`echo $line | cut -d "=" -f1`         local xml_value=`echo $line | tr -d '"' | cut -d "=" -f2`         writeln $xml_attrib $xml_value      done < config.cfg  }   When I execute the code, I get what is expected:  <title>Foo Bar - the Untold Story</title> <desc>This is a verbose description of Foo Bar's Untold Story</desc> ....   Now, what I would like to do is use the variable "title" based on what I parsed (assume I don't know that the variables name is "title")  Basically, I want to do take the xml_attrib variable, concatenate a "$" to it and then get the contents.  So, using the first line of my config.cfg file,   xml_attrib = "title"   How would I address that string as a var and say   echo $title   Any ideas?

I think an example is in order. Consider I have these two environment variables setup (by a Continuous Delivery tool): PACKAGE_VER=1.2.3 and USE_VERSION_FROM=PACKAGE_VER.  What I want now is a script that can't predict the name of the variable pointing out 1.2.3, only USE_VERSION_FROM. And so, I'm looking for a way to get my script to know the version to use (1.2.3) without knowing anything other than that USE_VERSION_FROM points out the name of the variable that holds the version number.  My naïve non-working first attempt:  #!/bin/bash VERSION_TO_USE="${${USE_VERSION_FROM}}"


Will  be supported on the Android App in the future? I visit A51 rather frequently and I would like to see it in the App.

I'm using the official Stack Exchange mobile app for iOS or Android, and  My app crashed! It doesn't look good on my new smartphone. It won't run after I updated my device. I noticed another bug. I have an idea for a new feature which is currently not in the app.  How do I report bugs with or request features for the iOS and Android apps? Also:  I've used the built-in functionality of the app to report a bug or submit a feature request. Did I do the right thing? The app prompted me to post on Meta after an error occurred. Should I post about it here? I'm wondering why the latest version is from 2017. I've heard rumors that the apps are no longer supported; is that true? I can't find the app on my device's app store anymore! Where did it go?     We get a lot of bug reports from users about the mobile apps, which are unsupported, and at the moment, there is no centralized Q&A pair for those to be closed as duplicates of (the relevant answers are spread across multiple unrelated questions). This question is an FAQ proposal, to serve as a directly-related duplicate target for those questions.


How can we format the date in xslt ?  Example:   <xsl:value-of select ="name of function(I/P, 'MMM dd, yyyy')"/>

When I use the XML serializer to serialize a DateTime, it is written in the following format:  <Date>2007-11-14T12:01:00</Date>   When passing this through an XSLT stylesheet to output HTML, how can I format this? In most cases I just need the date, and when I need the time I of course don't want the "funny T" in there.


I recently upgraded my system to Ubuntu 16.04 but after the up gradation I notice the date and time widget has disappeared from the top panel.  I tried the commands sudo killall unity-panel-service but didn't work. I Re-installed it but that too didn't work  I tried setting it on GUI on but the clock tab in Time & Date appears dead.   It would really nice if someone could help me with it.

I've been using Ubuntu with Gnome Classic for a while and I've noticed recently that in the "Indicator Applet Complete" in the Top Panel, my name and the clock have disappeared.    I think it happened a while ago when I was messing around with packages. Every time I did apt-get... it would say "the following packages can be removed by apt-get autoremove", so I did it and then the clock and my name stopped appearing.   Can anyone help me? Thanks. It would be greatly appreciated.


I am writing thank-you notes to Professors before I graduate from my Bachelors' program. I am unsure how to address letters to two specific individuals:   One is listed as a "Lecturer in Music" on my school's website and has no vita published online. He has a DMA (Ph.D equivalent for composers), but I can't determine if he has held the title of Professor at another institution. He has been at my school for 10 years, so this is unlikely.  The other is listed as a "Lecturer in Discipline" on my school's website but his vita, which is on the same webpage, lists his title as "Adjunct Assistant Professor". He has his Ph.D in Economics. He has held Assistant Professorships elsewhere but his career has largely been in the private sector.   I feel like I shouldn't be listing either of them as "Professor" in my recipient addresses, but I don't want to be disrespectful. I call them Professor in person and in class.   What would be the most appropriate way to address these letters without ruffling any feathers?

When writing letter to an academic professor (not necessarily from student to professor), what is the appropriate way to address his/her title?  I have seen in letters using  Dear Prof. X even when the addressee is not a full professor  Dear Dr. X though, knowing that the addressee is a full professor  Dear Mr/Mrs X though, knowing that s/he has an academic title


I had applied for uk visa for mrcp paces exam on 23rd june 2016. I am Undergoing Training in cardiology and receiving RS 18000(120 UK POUNDS) per month as stipend. the transaction they have shown is from my mothers account and I can also prove that she supports me financially as I take her monthly house rent.I have evidence of this transaction as well. Kindly suggest a way out.

I have applied recently for a general visitor visa to the UK to spend 10 days during Christmas with my British unmarried partner and it has been turned down.   The Entry Clearance Officer stated on his refusal notice the following:     I note that you have never previously travelled to the UK or any country with similar immigration requirements and you therefore do not have a history of travel and compliance to consider.      You have submitted an employment letter to confirm your occupation in KSA but I am required to also assess your personal, domestic and economic circumstances in determining whether you are genuine visitor travelling to the UK for the period and purpose you state.      You claim an income of SAR ........ per month which equal ........ GBP and from the evidence submitted this appears to be your sole source of income.   I note that this monthly income is reflected on your bank statements. However, the bank statement you have presented show a recent large deposit that are in excess of your stated income and inconsistent with the account history. You haven't provided evidence toward the origin of this recent deposit and in the absence of reasonable evidence I am not satisfied that these bank statements accurately reflect your personal circumstances.      In view of the above, I am not satisfied you have demonstrated that your circumstances are as you claim and therefore I am not satisfied that you're travelling to the UK for the period and purpose you stated. 41(i)and(ii).   Its true that I have deposited that sum of money right before I apply and it was a commission I received from work earlier this month.   So, could you please give me your advice on the above as I am planning to apply again soon. and how to avoid my application being refused again?


So I'm currently practicing DFS & BFS approaches to binary trees and I am confused on how multiple arguments are being passed into the .append statements below. I know that .append can only take one argument and that when the the arguments are encapsulated in parenthesis they are treated as so, but what does it mean when you encapsulate them?   class Solution:     def maxDepth(self, root):         """         :type root: TreeNode         :rtype: int         """          stack = []         if root is not None:             stack.append((1, root)) # <---- Here          depth = 0         while stack != []:             current_depth, root = stack.pop()             if root is not None:                 depth = max(depth, current_depth)                 stack.append((current_depth + 1, root.left))  # <---- Here                 stack.append((current_depth + 1, root.right))  # <---- Here          return depth   To reiterate, what does .append((arg1, arg2)) mean? How are those args treated and what logic is behind it?

What's the difference between the list methods append() and extend()?


I wanted to know if iterating over files in directory with  for f in directory/*   will have some default order of processing entries (file name, created date, etc.?), or is it non-deterministic?  It is probably obvious, but I couldn't find the information.

Is the expansion of a wildcard in Bash guaranteed to be in alphabetical order? I am forced to split a large file into 10 Mb pieces so that they can be be accepted by my Mercurial repository.  So I was thinking I could use:  split -b 10485760 Big.file BigFilePiece.   and then in place of:  cat BigFile | bigFileProcessor   I could do:  cat BigFilePiece.* | bigFileProcessor   in its place.  However, I could not find anywhere that guaranteed that the expansion of the asterisk (aka wildcard, aka *) would always be in alphabetical order so that .aa came before .ab (as opposed to be timestamp ordering or something like that).  Also, are there any flaws in my plan? How great is the performance cost of cating the file together?


How to write < in LaTeX or in elsarticle template? Like (p<0.01).   When I put \ before <, LaTeX can't read and just shows ! in pdflatex Thnx.

When typing < or > in LaTeX and compiling with pdflatex, the less than and greater than symbols appear at upside down exclamation points. I'm not in math mode.


I have a dual boot Windows 7 + Ubuntu 12.04 system (64 bit).  About a week ago, using GRUB to load into Ubuntu resulted in a freeze at the loading screen.  I could still run into recovery mode, so using the console from that I tried a few solutions I found on the web.     sudo apt-get update     sudo apt-get upgrade     sudo apt-get install fglrx     sudo aticonfig --initial     sudo reboot No luck there. Then I tried updating the Nvidia drivers (GTX 760):  sudo apt-get update sudo apt-get purge nvidia-* sudo apt-get install nvidia-current-updates   Still nothing. In fact, now I just get a black screen with a blinking cursor when I boot into Ubuntu regularly.  I can still boot into recovery mode, and can not find a solution.  Text appears when I shut down off the blinking cursor screen  (it turns purple, and says something like "terminating ubuntu").  I am a new user to linux, and the most advanced thing I've done in terminal is using the nano editor.  This may be important, so about a week before this error started, I used a partition tool to increase Ubuntu's main partition to 100 gigs.  After that, both Ubuntu and Windows still worked normally, until the error described above.  Windows still works fine (Posting this question while in Windows on the same machine).

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


okay so, my lighting is being weird and I have several dark spots, it doesn't matter how many lights i have or where i move them, they still persist, its also bugging me that the gloves are the exact same material as the white spots on the shoes, but are look darker. I've tried changing the environmental lighting too, but it doesn't help

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


Geordi's visor is capable of seeing spectra outside of the normal human visual range. The holodeck creates its environment at least partly by creating actual holographic images. Such images would be simpler to simulate if they remained within that same visible spectrum. But this would not be as satisfying to Geordi as to most other participants.

We've seen how he interprets people and things with his VISOR, but if the holodeck is all force-fields and holographic imaging, how does he interact in a similar way to other members?   What does the holodeck look like to Geordi LaForge using his VISOR?


I've downloaded Anaconda on Ubuntu 17.10. I can launch it from the terminal using the command anaconda-navigator. It doesn't come launch icon though.   I've looked online, and have gotten to a Launcher Properties app (pictured below), but I must be entering incorrect values into the fields.     Does the terminal command not work as the command in the launcher app? And can the name and comments be anything I desire?   Thank you for your time.

I have used the guide from similar question ()  but nothing works when it comes to Ananconda3 shortcut.  Here is my desktop file for anaconda:  [Desktop Entry] Version=1.0 Type=Application Name=Anaconda-Navigator GenericName=Anaconda Exec=bash -c anaconda-navigator Icon=/home/paygilant/anaconda3/lib/python3.6/site-packages/anaconda_navigator/s$ Terminal=false StartupNotify=true MimeType=text/x-python;   I have succeeded the image part, but can't actually launch it. There is an icon on my desktop and I have put in the command bash -c anaconda-navigator.  Please help me identify what am I missing?


I wanted to install Ubuntu in my Windows 7 machine in a partitioned drive named 'B:', but if /dev/sda is my primary, what is my partitioned drive then?

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


When your sample size is large enough and your estimator is asymptotically normal distributed $\sim N(0,1)$, how can you calculate the p-values? Can we use $2\times\text{pnorm}(-\text{abs}(Z))$?

I do have an estimator which have an asymptotic standard normal distribution under the null hypothesis .How to calculate the asymptotic p values ?


IForgot my mail id & password of my google account , how recover id & password ? my phone was rebooted and it cant start without google account & not accept any other google account pls help me

I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: )


So I was using Notepad++ today and then all of a sudden I couldn't move my mouse or keyboard but there was this message that was being typed out in a new page on Notepad, it was about the freedom of speech then it said Je Suis Charlie.  Do I have a virus on my system or malware that is allowing someone to control the computer?  I'm really scared because I had no idea what was going on.

I updated notepad++ and it started writing to the screen.  I quickly closed it not knowing what it was, but now I'm curious do I have a 'hacked' copy of notepad++?


are very useful. They have advantages over functions that return lists. However, you could len(list_returning_function()). Is there a way to len(generator_function())?  UPDATE: Of course len(list(generator_function())) would work..... I'm trying to use a generator I've created inside a new generator I'm creating. As part of the calculation in the new generator it needs to know the length of the old one. However I would like to keep both of them together with the same properties as a generator, specifically - not maintain the entire list in memory as it may be very long.  UPDATE 2: Assume the generator knows it's target length even from the first step. Also, there's no reason to maintain the len() syntax. Example - if functions in Python are objects, couldn't I assign the length to a variable of this object that would be accessible to the new generator?

Python provides a nice method for getting length of an eager iterable, len(x) that is. But I couldn't find anything similar for lazy iterables represented by generator comprehensions and functions. Of course, it is not hard to write something like:  def iterlen(x):   n = 0   try:     while True:       next(x)       n += 1   except StopIteration: pass   return n   But I can't get rid of a feeling that I'm reimplementing a bicycle.  (While I was typing the function, a thought struck my mind: maybe there really is no such function, because it "destroys" its argument. Not an issue for my case, though).  P.S.: concerning the first answers - yes, something like len(list(x)) would work too, but that drastically increases the usage of memory.  P.P.S.: re-checked... Disregard the P.S., seems I made a mistake while trying that, it works fine. Sorry for the trouble.


class B;  class A {     B b;     A();  };  class B {     A a;     B(); };   I have two classes as follows. For some reason, even though I forward declare class B, I have an error that says that:  field 'b' has an incomplete type!    Why is this the case?

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


I have recently been the victim of some Dos attacks.  The facts : I received a very high amount of packets saturating my connection and preventing me from accessing the Internet during one hour (average). They have been performed by players on Xbox live who first threatened me, told me which IP I had and then launched the attack from a load test website, a "booter".  I often write some shell scripts so I made some investigations and tried to write a script which would detect the bad packets and DROP the IPs. I made several attempts. The problem is that after 8 seconds and over 300,000 packets (from 1,000 different IPs) received, I stop receiving anything. Not a single packet. So my script logs tell me it was able to drop those IPs but it can no longer perform its task because nothing comes in my connection.  Does anybody have an idea where the packets got stuck ? Could it be my ISP not forwarding such traffic ? In that case, there is nothing I can do. If I do not receive the packets, I cannot filter them.  What can I do ?  Thanks a lot for your advice.

Any software for windows Writing custom (intelligent) microsoft windows firewall extension (C#/C++/C) Writing custom (intelligent) firewall for windows Installing nginx etc. on the same computer and use it as proxy with rules.   "You could not solve all Ddos problems with software" is not answer for this question.I want to reduce Ddos vulnarebility of my server.(It will stop low-level Ddos attacks)  Hosted solutions or cloud services are not related with this question.  Closing some of the ports and protocols via Microsot Windows Firewall is not related with this question.  Any idea?  EDIT After Questions  Low level: sample scenerio: 500 zombie clients and each of them sending 100 Custom Get/Post requests per second)   Web Application is on IIS. I want to stop attacks before they reach to IIS.  EDIT After Helpful Comment  How can the DDOS attack achieve its aim?   Exhausting bandwidth ( Not related with my question) Exhausting network hardware of server (NIC) ( Not related with my question) Exhausting server resources (RAM,CPU)  (Yep, I mean this)   If you stop attacks late, then you lost more resources! (Is this false?)   You can stop attacks on Web Application Level (in Asp.net MVc Code or in Handler) You can stop attacks on IIS (Dynamic Ip Restrictions)  You can stop attacks on lower levels (Firewall ..)   EXTRA INFO ABOUT THE LAST ATTACK (7 Hours ago)  When I connected server during the attack IIS Cpu Utilization was %92-%99. And when I try to connect homepage I got this error:  A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.)


I'm trying to find $\lim_{n\to\infty}(\frac{1}{\sqrt{n^2+1}} + \frac{1}{\sqrt{n^2+2}} + ... + \frac{1}{\sqrt{n^2+n}})$.   I tried to use the squeeze theorem, failed. I tried to use a sequence defined recursively: $a_{n+1} = {a_n} + \frac{1}{\sqrt{(n+1)^2 +n+1}}$. It is a monotone growing sequence, for every $n$, $a_n > 0$. I also defined $f(x) = \frac{1}{\sqrt{(x+1)^2 +x+1}}$. So $a_{n+1} = a_n + f(a_n)$. But I'm stuck.   How can I calculate it?

strong textFind $\lim_\limits{n\to \infty}\left({1\over \sqrt{n^2+1}}+{1\over \sqrt{n^2+2}}+\cdots+{1\over \sqrt{n^2+n}}\right)$. I do know it is bounded by $1$. I tried using the sandwich rule with no success. How can I solve it?


Hi I am newbie here and this is my first question so please do not mind if I don't use the correct language or anything.  I want to know the relation between size of a concave mirror ( measured by radius of curvature I think ) and amount of heat produced at its focus when concave mirror is kept in sunlight. If climatic conditions matter ( I think they do ) then assume them to be similar to coastal regions and area should lie in subtropics or tropics. Please provide the explanation for relation.  My question is different from "What temperature is achieved in focus point by 5000 flat 1x1cm mirrors onto a satellite dish? " as I want to take climatic conditions and latitude into account.   I can ignore climatic conditions if their effect is not more than +-10W on heat produced. You can consider the size to be about 1.5 times of r5800

There is this  ("R5800 Solar Death Ray") where teenager built a 5000 mirror device which concetrates the solar rays which is showing the potency of the mosaic method of concentrating sunlight using elliptical dish. It can fire the wood, boil the water in seconds, melt an aluminum, glass or even burn the whole in concrere or rock.  What is the approximate maximum temperature (could be a range) is achieved by this mirror device in its focus point on sunny day?       The R5800 solar concentrator, replaced by the new R23k, is made from   an ordinary fiberglass satellite dish. It is covered in about 5800   3/8" (~1cm) mirror tiles. When properly aligned, it can generate a   spot the size of a dime with an intensity of 5000 times normal   daylight. This intensity of light is more than enough to melt steel,   vaporize aluminum, boil concrete, turn dirt into lava, and obliterate   any organic material in an instant. It stands at 5'9" and is 42"   across.   Technical details & calculations:     Calculations: Area of dish aperture (elliptical)= (pi x 102cm x   73cm)/4 = 5848 sq cm       Area of focal point (circular)= pi(0.6cm)^2 = 1.14 sq cm      Dish Type= 0.7m x 1m offset focus elliptical.      Concentration Power= 5000x      Output Power Estimate = 560 watts


My os is Fedora 24 and I tried to test the suid bit functionality.  I wrote below bash as Setuid.bash:  #!/bin/bash if [ $USER = 'root' ] then     echo "Like Root Run"     echo "Root User Add in " $(date) >> /etc/SetUid else     echo "Other User Run"     echo $USER "User Add in " $(date) >> /etc/SetUid fi   with -rwsrw-r-x. 1 root root 249 May 21 14:45 /bin/Setuid.bash permission and -rwx------. 1 root root 432 May 21 14:45 /etc/SetUid  Now, when I tried /bin/Setuid.bash as root I got:     Like Root Run   but when run that with Test user I encountered:     Other User Run      bin/Setuid.bash: line 8: /etc/SetUid: Permission denied   I'll appreciate if any one let me know, where is my way wrong?

The setuid permission bit tells Linux to run a program with the effective user id of the owner instead of the executor:  > cat setuid-test.c  #include <stdio.h> #include <unistd.h>  int main(int argc, char** argv) {     printf("%d", geteuid());     return 0; }  > gcc -o setuid-test setuid-test.c > ./setuid-test  1000  > sudo chown nobody ./setuid-test; sudo chmod +s ./setuid-test > ./setuid-test  65534   However, this only applies to executables; shell scripts ignore the setuid bit:  > cat setuid-test2  #!/bin/bash id -u  > ./setuid-test2  1000  > sudo chown nobody ./setuid-test2; sudo chmod +s ./setuid-test2 > ./setuid-test2  1000     Wikipedia :     Due to the increased likelihood of security flaws, many operating systems ignore the setuid attribute when applied to executable shell scripts.   Assuming I'm willing to accept those risks, is there any way to tell Linux to treat the setuid bit the same on shell scripts as it does on executables?  If not, is there a common workaround for this problem? My current solution is to add a sudoers entry to allow ALL to run a given script as the user I want it run as, with NOPASSWD to avoid the password prompt. The main downsides to that is the need for a sudoers entry every time I want to do this, and the need for the caller to sudo some-script instead of just some-script


So I was assigned this homework problem: $$\ {s \choose s} + {s+1 \choose s} +...+ {n \choose s} = {n+1 \choose s+1}$$ for all s and all $n \geq s$ I've tried to email both my professor and my TA and their explanations seem contradictory. My professor responded saying the statement I need to prove is "The formula is correct for $0 \leq s \leq n$." Whereas my TA told me I need to use induction on both variables and I'm not sure how to do that. Any help is appreciated!

After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$  What's the name of this identity? Is it the identity of the  modified.  How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?  Thanks for your help.    EDIT 01 : This identity is known as the  because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.


I'm learning about gamma distribution. Any idea to derive gamma PDF? I am searching for a better intuition or a better sense to understand this function.  Note{ I understand how to integrate gamma function. I know that gamma distribution can be derived from exponential distribution, while exponential distribution can be derived from Poisson distribution, but I don't know how the process of derivation work.

What is the intuition behind gamma distribution?  For instance, I understand how to "construct" Gaussian distribution. This is my intuition:   Bernoulli distribution - which is simple concept A sequence of Bernoulli trials is a Binomial distribution. I understand how binomial coefficient is constructed Using Stirling approximation we can deduce Gaussian distribution   Hence I understand that shape of a Gaussian distribution is determined by the binomial coefficients and so on.  How can Gamma distribution be derived step by step using relatively simple concepts?


I'm trying to call a complicated python script in a flask app, but not entirely sure on how to do it right now. If it was simple I would just copy and paste the script with a router in flask, but that would get too messy. So far I have this for my main.py. I want to call a script temp.py.  from flask import Flask, render_template, request app = Flask(__name__)  @app.route('/') def base():     return render_template("base.html")   @app.route('/temp', methods=['GET', 'POST']) def temp():   if __name__ == "__main__":     app.run(debug=True)

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


I have thought about this question alot. Unfortunately couldn't picture any good path to the desirable result. Suppose $G$ is a group with order $n$. Assume $(n,\phi(n)) = 1$, So they're relatively prime. Prove that $G$ is Abelian group. I am looking forward to hearing from you. Any hints, tips, or creative solutions are welcome.

Sorry for the last mistaken problem I just posted. Now I know that only having the order being odd square free is not enough for a group to be cyclic.   Here's the complete problem which the main goal is to show that any group of order $n$ satisfies $\gcd (n,\varphi(n))$=1 is cyclic. It asks me to do it in the following way:  (a) If $n > 2$, $n$ is an odd squarefree integer.  (b) Show that there is a $H = G/N$ of prime order.  (c) Show that $G \cong N \times H$ and $G$ is abelian.  (d) $G$ is cyclic.    Any ideas is appreciated.


If  $\frac{d(\sin{x})}{dx}= \cos{x}$  is proven using the limit $\lim \limits_{x \to 0}\frac{\sin{x}}{x}=1$ (as it is in most textbooks), would it be circular to then use $\frac{d(\sin{x})}{dx}= {\cos{x}}$ and L'Hospital to prove the limit $\lim \limits_{x \to 0}\frac{\sin{x}}{x}=1$ (because limit $\lim \limits_{x \to 0}\frac{\sin{x}}{x}= \frac{\cos{0}}{1})$ later in the same textbook?

I have heard people say that you can't (or shouldn't) use the L'Hopital's rule to calculate $\lim\limits_{x\to 0}\frac{\sin x}x=\lim\limits_{x\to 0}\cos x=1$, because the result $\frac d{dx}\sin x=\cos x$ is derived by using that limit.  But is that opinion justified? Why should I be vary of applying L'Hopital's rule to that limit?  I don't see any problem with it. The sine function fulfills the conditions of the L'Hopital's  rule.  Also, it is a fact that the derivative of sine is cosine, no matter how we proved it. Certainly there is a way to prove $\frac d{dx}\sin x=\cos x$ without using the said limit (if someone knows how, they can post it) so we don't even have any circular logic. Even if there isn't,  $\frac d{dx}\sin x=\cos x$ was proven sometime without referencing the L'Hopital's rule so we know it is true. Why wouldn't we then freely apply the L'Hopital's rule to $\frac {\sin x}x$?  PS I'm not saying that this is the best method to derive the limit or anything, but that I don't understand why it is so frowned upon and often considered invalid.


If I cast the light cantrip on an object and the object breaks while the spell is still in effect is each piece of the broken object still lit?  Could the pieces be carried in different directions?  Would the amount of light decrease based on the size of the piece?

The description of the  cantrip says:     You touch one object that is no larger than 10 feet in any dimension.   Until the spell ends, the object sheds bright light in a 20-foot   radius and dim light for an additional 20 feet. The light can be   colored as you like. Completely covering the object with something   opaque blocks the light. The spell ends if you cast it again or   dismiss it as an action.   What happens when that object is broken into two or more pieces? Do the pieces carry part (or the whole) of the intensity of the 20/20 light? And if each PC gets one piece, wouldn't that effectively create many light sources at the cost of one cantrip (1 action)?    What if the object is destroyed (e.g. piece of paper that's burned)? Would that effectively terminate the spell?


Burning hands states:     As you hold your hands with thumbs touching and fingers spread, a thin sheet of flames shoots forth from your outstretched fingertips.    However, it goes on to affect a cone with a 15 foot diameter base (which is certainly not a thin sheet).     Each creature in a 15-foot cone must make a Dexterity saving throw   What area can actually affect creatures, the thin sheet or the cone? Is it different for objects?     The fire ignites any flammable objects in the area that aren't being worn or carried.   For a use case: Does a tiny creature flying 10 feet away and 10 feet in the air get hit by the 5 foot tall caster's straight burning hands? Does the carpet below catch fire?

says two things about the shape of the spell’s area of effect (PHB, p. 220):      a thin sheet of flames shoots forth from your outstretched fingertips     Each creature in a 15-foot cone [is affected by the spell]    These seem to conflict, as a thin sheet of flame and the definition of the cone AoE (PHB, p. 204) are different shapes. (And we know , so that doesn’t help resolve it.)  What is the area of effect of burning hands?  (This came up in the context of answers to .)


I am in the process of building a one level home in PA. After the formed concrete walls were poured and the framing began, I noticed that on one side of the house that the sill plate was flush with the edge of the foundation wall in the rear, but, by the time the sill plate got to the front it was 2 1/2" away from the edge of the foundation wall. In summary, the sill plate walks from flush with the foundation wall at the rear to 2 1/2" at the front. This happens over about a 50' run.  Any thoughts or concerns would be appreciated. Any recommendations on what sorts of questions to ask when I meet the site supervisor on Monday?


I have a server which runs a few hundred processes simultaneously, most of them are idle, it is some sort of web crawler it sleeps between requests for various reasons.  So as a result, my load average is usually something like: 21.64, 27.05, 29.16  That's very very high right? But everything runs smoothly!  And my CPU consumption is something like (mpstat 60 1 output):  11:07:06 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle 11:08:06 AM  all   34.82    0.00    4.16   10.70    0.00    0.31    0.00    0.00    0.00   50.01 Average:     all   34.82    0.00    4.16   10.70    0.00    0.31    0.00    0.00    0.00   50.01   So, since I'm not even running at 100% CPU usage I feel like I do not have a reason to be worried, or am I missing something? There is a slight delay when nginx is serving requests, but that's expected given the large number of queued requests, But I read somewhere that a load average higher than 1 is a cause for alarm, and I honestly don't see why that is.   So please advise.  Thanks

I am using a linux server which has 128GB of memory and 24 cores. I use top to see how much it is used. Its output is pasted at the end of the post. Here are two questions:  (1) I see that each of the running processes occupies a very small percentage of memory (%MEM no more than 0.2%, and most just 0.0%), but how the total memory is almost used as in the fourth line of output ("Mem:  130766620k total, 130161072k used,   605548k free,   919300k buffers")? The sum of used percentage of memory over all processes seems unlikely to achieve almost 100%, doesn't it?  (2) how to understand the load average on the first line ("load average: 14.04, 14.02, 14.00")?   Thanks and regards!  Edit:  Thanks!  I also really like to hear some rough numbers based on used percentage of memory to determine if a server is heavily loaded, since I once became the one who cramed the server without understanding the current load.  Is swap regarded as almost the same as memory? For example, when memory and swap are almost of same size, if the memory is almost running out but the swap is still largely free, may I just view it as if the used percentage of memory + swap is still not high and run other new processes?  How would you consider together CPU or memory (or memory + swap) usage? Do you become worried if either of them reaches too high or both?  Output of top：  $ top    top - 12:45:33 up 19 days, 23:11, 18 users,  load average: 14.04, 14.02, 14.00 Tasks: 484 total,  12 running, 472 sleeping,   0 stopped,   0 zombie Cpu(s): 36.7%us, 19.7%sy,  0.0%ni, 43.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st Mem:  130766620k total, 130161072k used,   605548k free,   919300k buffers Swap: 63111312k total,   500556k used, 62610756k free, 124437752k cached    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND  6529 sanchez   18  -2 1075m 219m  13m S  100  0.2  13760:23 MATLAB 13210 timothy   18  -2 48336  37m 1216 R  100  0.0   3:56.75 absurdity 13888 timothy   18  -2 48336  37m 1204 R  100  0.0   2:04.89 absurdity 14542 timothy   18  -2 48336  37m 1196 R  100  0.0   1:08.34 absurdity 14544 timothy   18  -2  2888 2076  400 R  100  0.0   1:06.14 gatherData  6183 sanchez   18  -2 1133m 195m  13m S  100  0.2  13676:04 MATLAB  6795 sanchez   18  -2 1079m 210m  13m S  100  0.2  13734:26 MATLAB 10178 timothy   18  -2 48336  37m 1204 R  100  0.0  11:33.93 absurdity  12438 timothy   18  -2 48336  37m 1216 R  100  0.0   5:38.17 absurdity 13661 timothy   18  -2 48336  37m 1216 R  100  0.0   2:44.13 absurdity 14098 timothy   18  -2 48336  37m 1204 R  100  0.0   1:58.31 absurdity 14335 timothy   18  -2 48336  37m 1196 R  100  0.0   1:08.93 absurdity 14765 timothy   18  -2 48336  37m 1196 R   99  0.0   0:32.57 absurdity 13445 timothy   18  -2 48336  37m 1216 R   99  0.0   3:01.37 absurdity 28990 root      20   0     0    0    0 S    2  0.0  65:50.21 pdflush 12141 tim       18  -2 19380 1660 1024 R    1  0.0   0:04.04 top  1240 root      15  -5     0    0    0 S    0  0.0  16:07.11 kjournald  9019 root      20   0  296m 4460 2616 S    0  0.0  82:19.51 kdm_greet     1 root      20   0  4028  728  592 S    0  0.0   0:03.11 init     2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd     3 root      RT  -5     0    0    0 S    0  0.0   0:01.01 migration/0     4 root      15  -5     0    0    0 S    0  0.0   0:08.13 ksoftirqd/0     5 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0     6 root      RT  -5     0    0    0 S    0  0.0  17:27.31 migration/1     7 root      15  -5     0    0    0 S    0  0.0   0:01.21 ksoftirqd/1     8 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1     9 root      RT  -5     0    0    0 S    0  0.0  10:02.56 migration/2    10 root      15  -5     0    0    0 S    0  0.0   0:00.34 ksoftirqd/2    11 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/2    12 root      RT  -5     0    0    0 S    0  0.0   4:29.53 migration/3    13 root      15  -5     0    0    0 S    0  0.0   0:00.34 ksoftirqd/3


What are the rules for referring to a ministry (or any other department, organisation, etc) of a specific country? I found both on Google. Are the US and UK exceptions (as it's the US Ministry of Defence)?

In a recent Financial Times article (Yemen PM Escapes Assissnation), the apostrophe necessary to show possession was left out. I've seen colleagues do it as well. Isn't it supposed to be "Yemen's PM Escapes...?" Other times I've seen people write "Japan Minister of Finance tackles deflation..." or "India VP resigns..." I have noticed that in most of these cases, the omission of the apostrophe was right before a captilazed appellation (president, country, municipal, etc.) What's going on? Firm grammar rules stipulate that there be an apostrophe, yet there isn't one. If the FT does it, then there must be an exception (in journalism?) that I'm unaware of. Must there or must there not be an apostrophe?


In the S08E05 of The Big Bang Theory, Leonard and Howard argue about the timeline of Back to the Future Part II. They talk about how the future Biff would go to a different future once he gives the almanac to 1955 Biff. And then when Sheldon came to explain it, I kinda lost it.

In Back to the Future Part II, Doc picks up Marty in 1985 and takes him to 2015. Then old Biff realizes the Delorean is a time machine. Old Biff steals the Delorean and travels from 2015 to 1955 to give the 1955 version of himself the 2015 sports almanac.   When old Biff then returned to 2015 from 1955, shouldn't he have arrived in a way-different 2015? Instead, he arrives in the same 2015 that he departed, where Doc and Marty are still running around as if nothing changed.  Here's pic of Doc Brown in BTTF2 explaining how Old Biff created new timeline:    I think this is a problem created by perspective. When Old Biff takes the Delorean back in time, we viewers do not go along for the ride. We're left hanging in a 2015 that becomes obsolete when Old Biff changes 1955. Seems our 2015 has two options: continue to exist as an alternate to the 2015 Old Biff created, or cease to exist. Either way, still seems our 2015 would be unreachable by Old Biff and the Delorean on their return from 1955.


I have some file image of filesystem, and I want mount it with parameter changing files and directories UID and GID. I cannot change its parameters, because it is read-only filesystem.  I found some idea, using some overlayfs and by find command walk through all files on mount points and rewrite attributes. But it needs some additional filesystem. I don't want use this method. I don't need write anything to this filesystem.  Then is there some idea to change UID/GID on the fly by mount options? Is there some cover like filesystem to use on this situation?

I can successfully mount an ext4 partition, the problem is that all the files on the partition are owned by the user with userid 1000. On one machine, my userid is 1000, but on another it's 1010. My username is the same on both machines, but I realise that the filesystem stores userids, not usernames.  I could correct the file ownership with something like the following:  find /mnt/example -exec chown -h 1010 {} \;   But then I would have to correct the file ownerships again back to 1000 when I mount this external drive on another machine.  What I would like is to give mount an option saying map userid 1000 to 1010, so that I don't have to actually modify any files. Is there a way to do this?


Let $K= \{x: Ax\leq b, x\geq0\}, b\geq 0$. Show that if there is a nonzero solution $x\geq 0$  of $Ax\leq 0$, then $K$ is unbounded. ($A$ is $m \times n$, $x$ is $n \times 1$ matrix, $b$ is $m \times 1$ matrix)?

Let $K = \{ x :  Ax \le b, x \ge 0 \}$, $b \ge 0$. If there are solutions $x \ge 0$ different from zero of $A x \le 0$, show that $K$ is unbounded.(A is mxn, x is 1xn b is 1xm matrix.)


I have a web server, and I was told that the version of Apache running on it is the latest version, regardless of what the output of httpd -v states.  When I execute httpd -v, I see 'Server version: Apache/2.4.6 (CentOS)'  I was told to not pay attention to this version number, and the underlying Apache is running at the latest version. Something about the upstream...?  How can I verify this? As I am pretty cautious that my web server is still running an older and vulnerable version.  Thanks for the help!

We run Ubuntu Lucid 10.0.4 as the foundation of our LAMP environment. We are trying to become PCI compliant so that we can pass CC info through our server. We have run some third-party scans on our servers to begin the certification process and have run into errors regarding PHP 5 versions and Apache versions. The latest PHP version hosted in our official lucid repository is about 10 versions lower than what PCI compliance requires.   How do we upgrade to stay current with PCI compliance requirements?   We need to get from php 5.3.2 to php 5.3.15  As well as up to apache 2.2.23  I've searched far and wide for an answer and haven't come up with a realistic answer. Some recommend compiling manually - which sounds like a nightmare, and others recommend a PPA - which sounds insecure. What should we do?


I'm writing my first paper, so I'm unsure about the guidelines I should follow. The subject is within the field of mechatronics and computer simulation.  If I use some basic physics equation in it (say Newton's second law), should I always add some reference that validates this formula? Or such basic equations don't need to be validated?  If the answer to the above is no, then what if I introduce a lesser known physical model (such as Coulomb's friction model)? Should I then add some reference explaining it in detail to the reader?

I once jokingly included in a thesis:     The equations of motion [1] for a rigid body can be reformulated as…      [1] I. Newton, Philosophiæ Naturalis Principia Mathematica, 1687.   While citing Newton's work for his equations of motion might be over the top, there is a valid underlying question: what criteria can one use to know when a work is “such a classic” that it doesn't warrant citation anymore.  I'll give example in my field:    is a neat trick, and very widely used by people who perform molecular simulation of charged species. It was initially published by Paul Ewald in 1921.  in the Kohn-Sham formalism, published in 1964 (Hohenberg & Kohn) and 1965 (Kohn & Sham). , 1984


How do particles with different Quantum Spin Numbers interact differently with other matter? What does spin cause? I understand that electrons etc act as if they are spinning my emitting a magnetic field (I think?) but what does the spin value represent? Does it represent the rate at which a particle would have to spin at to emit an electromagnetic field of x size? If so, what is the multiplier?    (I am new to particle/quantum physics [I am just researching it for fun {I am in 8th Grade}])

I often hear about subatomic particles having a property called "spin" but also that it doesn't actually relate to spinning about an axis like you would think. Which particles have spin? What does spin mean if not an actual spinning motion?


Question pretty much in title. I am confused as to why it couldn't just be that the energy is shared between the 'leftover' particle and the beta particle hence creating a continuous energy spectrum for the beta decay? In my Finnish high school physics book it was explained by the following statement: "If in the decay no other particles but the 'leftover' particle and beta particle are created, then all beta particles should have maximum energy according to principles of conservation of energy and momentum."Could someone shed some light on this matter? I am sure that I have a fundamental misunderstanding here and I wish it to be corrected. Thank you in advance

the spectrum of the Gamma and Alpha decays are both discrete, i.e. the $\alpha$-particles and the $\gamma$-rays take on only discrete values when emitted from a decaying nucleus.  Why is it then, that the $\beta^{\pm}$ can take on continuous values?  The main thing that distinguishes the beta decay from the other two is, that it is a three body problem, i.e. the nucleus does not only decay into an electron/positron, but also into a electron-neutrino/antineutrino. I don't see yet how this immediately implies that the spectrum of the electrons is continuous though.  The way I understand the two body decays is, that the initial nucleus spontaneously decays into the two bodies, i.e. a smaller nucleus and a gamma or alpha particle. As the energy levels in both the nuclei are quantized, only certain values for the energy of the photon and the Helium core are allowed, sine Energy and momentum need to stay conserved.  Does the third particle change things in the way that there basically are two things (i.e. the electron and the neutrino in the beta decay) that are not restricted by an inner energy level hierarchy in the way the nuclei are, thus allowing the energy given by the nuclei to be split arbitrarily (and continuously) between the electron and the neutrino?  If this is the wrong explanation, please correct me.


I recently purchased a Pipo m8 Pro () and would like to know if i can install ubuntu for tab.   If i can, can you also advice how i should install it.   thanks,  Faazil

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


Construct a measurable set $E\subset [0,1]$ such that for any   non-empty open sub-interval $I$ in $[0,1]$, both sets $E\cap I$ and $E^c\cap I$ have positive measure.      [Stein's Hint: For the first part, consider a Cantor-like set of positive measure, and add in each of the intervals that are omitted in the first step of its construction, another Cantor-like set. Continue this procedure indefinitely.]   So I tried using the hint to construct the desired set, but I must be misunderstanding something because I do not think the construction works.     My Thoughts:  I believe the basic idea is that we generate a Cantor-like set $C_1$ by removing repeatedly open intervals of some appropriate length at each stage of the construction starting from $[0,1]$.  Then as said in the hint, at the first step in the construction we removed centrally some open interval $I_1$ from $[0,1]$. Then we generate another Cantor-like set $C_2$ from $I_1$. During the first stage of $C_2$'s construction we removed $I_2$ from $I_1$. Repeat indefinitely...  My problem with this is that during the second stage of the construction of $C_1$, we removed $2$ open intervals, call one of them $\mathcal{I}$, from $[0,1]\setminus I_1$. If we take the union of all these Cantor-like sets, denote it as $E$, then wouldn't $E\cap \mathcal{I}=\emptyset$?  If true, then it seems we would have to apply this to all the open intervals that $C_1$ removes and generate a collection of Cantor-like sets from them. Each of which would need the same procedure done to them.   This doesn't seem correct to me and we may need to define $E$ as the countable union of countable unions of Cantor-like sets.    Any help thinking correctly about this problem would be much appreciated.  Note: It's proven (I've proved) that the Cantor-like sets Stein is talking about have positive measure (Exercise 4 in Stein).

This is from problem $8$, Chapter II of Rudin's Real and Complex Analysis.  The problem asks for a Borel set $M$ on $R$, such that for any interval $I$, $M \cap I$ has measure greater than $0$ and less than $m(I)$.  I was thinking of taking the Cantor approach: taking $R$ to be the union of $[a,b]$ with $a$ and $b$ rationals, and for each $[a,b]$ we construct Cantor sets inside it. During theconstruction of each Cantor set, in order to have positive measure on it, we need to take off smaller and smaller intervals from it, namely the proportion goes to $0$. As a result, these Cantor sets are extremely "dense" on their ends. If for an interval $I$ it intersects with the Cantor set on $[a,b]$ while $b-a>>m(I)$, we shall expect the measure of intersection to be rather close to $m(I)$ and then we lose control on these cases.  Is there any way to fix this or shall I consider other approaches?  Thank you


I am using  \documentclass[a0,portrait]{a0poster}   and in the following part I would like to give name1 and name2 the same Affiliation and name3 another Affiliation.  \begin{minipage}[b]{0.75\linewidth} \veryHuge \color{NavyBlue} \textbf{title} \color{Black}\\[2cm] % Title \huge \textbf{name1\thanks{aa}, name2\thanks{aa}, name3\thanks{bb} }\\[0.1cm] % Author(s) \huge Department of xxx, University of xxx\\[0.4cm] % University/organization \end{minipage}   Unfortunately, there only appears the superscript numbers 1, 2 and 3, respectively, over the names but not what I wrote in the paratheses in the thanks-commands.  What can I do?

I need to use a minipage environment and I need a footnote in that minipage. I want the footnote to be numbered in the normal footnote sequence and to occur together with the rest of the footnotes in my document. But, as this minimal example shows:  \documentclass{article}  \begin{document}  Spam  \begin{minipage}{.5\linewidth}     Foo\footnote{bar} \end{minipage}  Ham  \end{document}   the obvious thing produces a footnote that 1) appears at the bottom of the minipage, and not the page itself, and 2) is "numbered" alphabetically.   How can I get a regular footnote in a minipage?


Using (the latest) Firefox on Android (6.0.1) there's no "edit" link to the right of "Your Communities" which is present on the full site. This may be by design, although it's not clear why having the ability to search for text and then click "add" and then "save" is deemed to be any more problematic for mobile users than desktop ones.

On the mobile view, the top-left navigation menu has a header which is also a link titled "More Stack Exchange Communities":        This link is broken; it goes to  which is 404.  "Your Communities" is also broken. It looks like maybe the links are using the domain meta.stackexchange.com where they should be stackexchange.com.


Sorry for bad formatting, I couldn't mark the 3rd root on the right hand side... I've figured this out into the point where (and yeah, the problem is to prove that this applies to all non-negative real numbers)     $(a+b+c)/3\geq (abc)^{1/3}$   $$(a+b+c)^3\geq27abc\\ a^3+3a^2b+3a^2c+3ab^2+6abc+3ac^2+b^3+3b^2c+3bc^2+c^3\geq27abc$$  I'm not sure how to proceed. Any advice is appreciated - a full answer would of course be better. Thanks in advance!

The arithmetic - geometric mean inequality states that $$\frac{x_1+ \ldots + x_n}{n} \geq \sqrt[n]{x_1 \cdots x_n}$$ I'm looking for some original proofs of this inequality. I can find the usual proofs on the internet but I was wondering if someone knew a proof that is unexpected in some way. e.g. can you link the theorem to some famous theorem, can you find a non-trivial geometric proof (I can find some of those), proofs that use theory that doesn't link to this inequality at first sight (e.g. differential equations …)?  Induction, backward induction, use of Jensen inequality, swapping terms, use of Lagrange multiplier, proof using thermodynamics (yeah, I know, it's rather some physical argument that this theorem might be true, not really a proof), convexity, … are some of the proofs I know.


I'm trying to run a batch file in python using the following command: os.system(r'file_path\file_name.bat')  and subprocess.run(file_path)  The os command line opens the command prompt for few seconds but shows error and closes immediately. The subprocess command line does nothing. I tried using the responses in the similar question, but none helped. Is there anything that i could be missing here?

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


How to kill process which does not want to? I have Access Denied message when trying to kill the process. I know it can be due to device driver waiting and probably this is the reason.  But my question is how to kill process nevertheless? I am administrator, I don't want a process to wait any device drivers or something. I want it to die.   How to accomplish this?  Running Task Manager, procexp and procexp64 as an administrator didn't help.

I get "Access denied" when trying to end a process on Windows 8.  From  on Stack Overflow, I've read:     The process may have a thread active in kernel mode that is not exiting. Best way to diagnose that is by using Task Manager, Details tab, right-click one of the column headers and choose "Select Columns". Tick "Handles". Look at the displayed value for the process. If you see a non-zero value then the process is very likely to have a handle opened and is waiting for a device driver to perform an I/O request. And that device driver is otherwise impervious to Windows asking it to cancel the request. Narrowing down the troublemaker is not that easy, you have to know more about exactly what kind of I/O requests your process performs. Follow up on this by asking a question about it at superuser.com*   So yeah... this problem has accured to the following programs:    Spotify Skype Battlefield 3   I've checked that I have full permission on everything. Even added "Everyone" with full access.   The other solution involved something with C++ which I have no clue about.  I have tried asking support on Microsoft sites but they only told me to go to Security and add everyone with full access.


The rings of power (or maybe just the One Ring) prolongs life but does not increase it.  This allowed Gollum to live way beyond a normal lifespan which is explained in the lore.  However, he loses the Ring and it is found by Bilbo in the goblin caves during The Hobbit.  Bilbo is fifty years old when he finds the Ring and gives it to Frodo when he is 111 but he is described in the books to be very well preserved for his age.    I'm not sure how much time passed between Bilbo giving the ring to Frodo and Frodo arriving at Rivendell the first time but I assume it to be within a few months to a few years.  In that short time after Bilbo gives the ring to Frodo, old age starts manifest itself and both visibly and physically his age starts to catch up with him.  Now Bilbo is still within a natural life span but without the Ring he becomes much closer to the frail hobbit his age should be.    My question is, if time caught up to Bilbo so quickly after losing the Ring, how was Gollum able to live 60+ years without the Ring without his true age catching back up to him?  I don't recall in the books but in the movies he is still pretty limber for someone who is a few hundred years old.

Gollum had his life largely extended because he possessed the One Ring. He appeared to be an old, deformed, and twisted creature.  According to , he had the Ring for 478 years. His loss of the Ring and the events of The Lord of the Rings are separated by around 77 years.  Did the Ring continue to extend his life after he lost it?


I am only broadly familiar with mathematics, so please have patience with me. I am wondering about the consistency of both the (a) Goldbach Conjecture and (b) its negation. If the Goldbach Conjecture would be decided, then would we see that (a) or (b) entailed/contained a contradiction on its own, or only that there would be a contradiction of either (a) or (b) together with some other mathematical axioms?

The result closest to Goldbach conjecture is Chen's theorem [Sci. Sinica 16 157–176], the proposition ``1+2''. It is natural to ask if it is likely that under our arithmetic axioms the Goldbach conjecture is an undecidable proposition.


My question detected as a similar question, and the similar answer is to throw your SD in the garbage! I want to update my question by asking, what happens technically when a microSD card happens to act like that? It is totally readable, but not changeable, either delectable or formattable. It turned to a stone slab with carved data on it. early question: I recently trying to format and reuse a microSD card, which turned to "Secure Digital Storage Device" by an android phone 7.1 version. The data on the card is available and totally accessible but every moment I want to delete a folder it is automatically recovered. Even when I used it on the desktop, I did not insert it into the phone. Every possible solution in links like below turned out to not work.  I used many ways to solve this issue, which provided with other websites, they all failed to work: Diskpart Format, Use the Registry. Please note that I don't want to use third-party software. please do not post solutions like that. I am curious how this card is so undeletable, I can use it for other purposes, and this discussion open for your explanation. but for now, I want a method to simply reuse my micro sd as an ordinary sd card.

TL;DR: I have a Micro-SD card that has a primary partition that isn't formatted and can't be selected and I have tried:   DBAN nuke (wiped) Windows formatting 3rd party program formatting diskpart.exe Windows partition manager   I can't get it to work, please help.  I bought a micro-SD card which I had Kali Linux on and later wiped it as I wanted to use the card in my phone instead. The card failed and I think I messed up with the format of the card or my phone is too bad to work properly with an SD (cheap Chinese android). I am trying to re use it again to put Kali back on it but I am having problems.  When I try to connect it, it detects and no damage that I can recall reader is working too, Windows says I need to format it before I can use it. It just tries to and says Windows could not do it. I tried to check if there was maybe an issue with the partitions in it so I tried to select it in diskpart.exe and it recognizes the card but when I try to select the "primary" part, it just spits out: "There is no partition selected". The primary partition is active and I can't delete it because it won't select it and I can't create a new partition because the primary partition is there is taking the full size of the SD card but can't be selected.  I have also tried a DBAN nuke to clear any and all data off, it and, it just plain won't work. Formatting, partitioning and wiping it have all failed and it has no clear damage on it (bought this year). Anyone have something else I could try?


When referring to a team of people, would it be appropriate to say that the team "reviews" something, or that they "review" that thing? Wouldn't both usages be correct depending on whether you're referring to the team as a whole, or the individuals that make it up?  Ex: "A team of trained monkeys reviews the best jobs."  It's possible that the "team [...] reviews the best jobs," but not possible to have "trained monkeys reviews" the best jobs, even though the latter section is part of the overall sentence.

Possible Duplicate:          When I'm referring to a group of multiple things, should it be considered singular or plural for the purposes of applying a verb to it?  For example, which is correct in the examples below?     A sentence is a group of words that is followed by a period.   A sentence is a group of words that are followed by a period.      The group of people constitutes a jury.   The group of people constitute a jury.      A group of crows is called a 'murder'.   A group of crows are called a 'murder'.   My instinct is that it depends on whether the verb is referncing the group itself or the members of the group directly, but is that right?


Below is a chart which shows traffic from Google for a new website. What could be the reason for those dynamics: fast growth and slow decline?

There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most.  Since there are , the question really is:  What steps are necessary to figure out what caused such a drop?  There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such.


I have a data set as follow:  Cow_ID  Age DIM 1   1424    0 1   1425    1 1   1426    2 1   1427    3 2   1428    4 2   1429    5 2   1430    6 2   1431    7 3   1432    8 3   1433    9 3   1434    10 3   1435    11 3   1436    12 4   1437    13 4   1438    14 4   1439    15   I want to use awk to subset this data according to Cow_ID and write it to a file. Especially, each file also contain the header as shown in the big data set. I am using this at this moment but it does not work:  awk 'Cow_ID=1 {print}' > data1.txt   This is the example output I want to have:  data1:  Cow_ID  Age DIM 1   1424    0 1   1425    1 1   1426    2 1   1427    3   Data2:  Cow_ID  Age DIM 2   1428    4 2   1429    5 2   1430    6 2   1431    7   and so forth.

I have a .txt that can be exemplified like this:  NAME | CODE name1 | 001 name2 | 001 name3 | 002 name4 | 003 name5 | 003 name6 | 003   I need to write a script to split this file according to the CODE column, so in this case I'd get this:  file 1: NAME | CODE name1 | 001 name2 | 001  file 2: NAME | CODE name3 | 002  file 3: NAME | CODE name4 | 003 name5 | 003 name6 | 003   According to some research, using awk would work:  $ awk -F, '{print > $2".txt"}' inputfile   The thing is, I also need to include the header to the first line and I need the file names to be different. Instead of 001.txt, for example, I need the file name to be something like FILE_$FILENAME_IDK.txt.


What is difference of these sentences?where can i used it?  "i have walked since in the morning"  "i have been walking since in the morning"

Could you correct the comments in parentheses, please? Are they right?        I have lived in Los Angeles. (A completed action; the person does not live there anymore).   I have lived in Los Angeles my whole life. (The person is still living there, or spent her whole life in Los Angeles, but is currently   living in another location).    I have been living in Los Angeles. (She doesn't live there anymore, but was living there recently, or is still living there).   I have been living in Los Angeles my whole life. (The person is still living there or spent her whole life in Los Angeles, but is   currently living in another location).      Thanks


The question asks: Let $n\ \in \mathbb{N}$ in base $10$ as $n=a_ka_{k-1}\cdots a_1a_0$. Let $m=a_k+a_{k-1}+\cdots + a_1+a_0$. Then $9\mid n$ if and only if $9\mid m$ Here is my Proof: $9\mid n$ implies that $n=9k$ where $k\in \mathbb{Z}$ Next, we can express $n$ as such: $$n=a_0+10a_1+100a_2+\cdots\\ n=a_0+(9+1)a_1+(99+1)a_2+\cdots\\ n=a_0+9a_1+a_1+99a_2+a_2+\cdots\\ n=(\underbrace{a_0+a_1+a_2+\cdots}_\text{m}) + 9(\underbrace{a_1+11a_2+\cdots}_\text{k})$$ Thus, $n=m+9k$ which implies that $9\mid(n-m)$ which can be written as the congruence, $n\equiv m\pmod 9$. Now, from here, what steps do I need to take to prove the theorem?

I don't know if this is a well-known fact, but I have observed that every number, no matter how large, that is equally divided by $9$, will equal $9$ if you add all the numbers it is made from until there is $1$ digit. A quick example of what I mean:  $9*99 = 891$ $8+9+1 = 18$ $1+8 = 9$  This works even with really long numbers like $4376331$ Why is that? This doesn't work with any other number. Similarly for $11$ and alternating digits sums.


I would like to vectorize a PNG containing lines (DN=1 for line, DN=0 for transparent background). See below. As the data is georeferenced I'm asking it here. I would like to automate the vectorization and I'm currently looking into Python/GDAL/QGIS solutions with a vector result in the form of a shapefile. I found gdal_polygonize but this tools creates a polygon shapefile while I would like to create polylines. Does anyone have an idea how to make this work?  UPDATE: Searching for an open source solution, so without using ArcGIS like  solution.

How can I convert raster (stream segments result of a watershed analysis) to vector polylines, preferably shapefile. In ArcGIS this is easily acomplished with the Raster to Polyline tool.  I only see Polygonize (Raster to Vector) tool under the Raster -> Conversion menu.


Practically how to separated between Fraunhofer and Fresnel diffraction? Do all diffraction fringes from single slit have same peaks? Why?

What is the difference between  and ? I mean diffraction is just bending of light waves or waves in general around a point. So how can there be two types of diffractions?  If Diffraction means something else in this context, then please explain the difference between these two types of diffraction.


This question () seems to suggest that there is a maximum number of suggested edits that can be in the queue at a time.  What is this value?  Is it different for each site on Stack Exchange?

We know that Stack Overflow has a suggested edit queue, visible to the users who have the  privilege. Someone said the queue has a fixed size.  What's the fixed size of the suggested edit queue?  Is it often that the queue gets filled up and users can no longer suggest edits?


I add scrip to run on terminal start.  I forgot unchecked "Exit after script run" or so.  Now my terminal keeps closing and i can't run it!  How do i reset that option ?

I fooled around with the colors and stuff, in the terminal, and now want to go back to the maroon and white default config of the the terminal. What files do I have to delete?


Let's say you have a dropdown where a user can choose a color. I'm currently comtemplating whether or not to use the following scheme. When a user selects a color, that color disappaers in the sorted list of colors, but of course it is still visible at top (B) This is different from how dropdown menu's usually work (A):    The advantage could be that users cannot reselect something that is already selected. In the color dropdown example this advantage is very small, but consider these cases:   A dropdown with only 6 options. Reducing this dropdown by 1 item makes it faster to mentally process all the options, considering the selected item is already processed in the user's mind and he doesn't have to reprocess/look at it again. It saves space on the screen (again, the example with the color dropdown might not be relevant for this point). A navigation bar where selecting an item would cause the page to reload (or go to another page). You do not want the user to be able to select the page they're currently viewing again, because that would cause an annoying and unnecessary reload. A possible disadvantage could be that the list would change everytime, which actually increases mental load. For example: consider the options:      A B C D E.    When A is selected, then "B" would be the first visible option to select, C the second and so on:     A      B C D E   When a user now selects D, the order of the unselected items change:     D      A B C E   Suddenly, users who thought "the first item is always B", might misclick because now A is first and B is second in the list op options.  Any additional thought on this?

For example, you have a combo box which contains 10 elements including the one that is currently selected. When you prompt to drop down the list to choose another, should the currently selected item also be in this list?


$$I=\int_{0}^{1} \frac{\log x}{\sqrt {1+x^2}}dx$$  My attempt:$$I=\int_{0}^{1}\log x d(\log(x+\sqrt{1+x^2}))$$ $$=\log x\log(x+\sqrt{1+x^2})|_0^1-\int_{0}^{1}\frac{\log(x+\sqrt{1+x^2})}{x}dx$$ I don't know how to proceed below, please help me. That is different to me.

I am trying to evaluate $$I=\int_{1/2}^1 \frac{\log(x)}{\sqrt{x^2+1}}\,dx$$ My attempt was to integrate by parts with $u=\log(x)$ and $v=\log{(x+\sqrt{1+x^2}})$ to get$$I=-\log{\frac{1}{2}}\log{\left(\frac{1}{2}+\sqrt{1+\frac{1}{4}}\right)}-\int_{1/2}^1 \frac{\log{(x+\sqrt{1+x^2}})}{x}\,dx$$ so simplifying the integral is $$I=\log{(2\phi)}-I_1$$ where $I_1=\int_{\frac{1}{2}}^1 \frac{\sinh^{-1}(x)}{x}\,dx$ If possible I would love to get some help in evaluating those.  I also thought about considering $I(k)=\int_{\frac{1}{2}}^1 \frac{x^k} {\sqrt{x^2+1}}\,dx$ writting the denominator as a binomial series, integrate it then derivate and plug $k=0$ to get the answer but the series is not nice.


Compute $A^{100 }$ where   $A = \begin{bmatrix}  1 &2 \\ 3& 4 \end{bmatrix}$.   I can  calculate $A^{100}$  using a calculator, but  my question  is that  is  there  any  short formula/method   or  is their any trick  to find the  $A^{100}$?

Let $A= \pmatrix{1&4\\ 3&2}$. Find $A^{1000}$.  Does this problem have to do with eigenvalues or is there another formula that is specific to 2x2 matrices?


I have a useful script greplog that does: grep -Eh --color $1 /var/log/apache2/other_vhosts_access.log{.1,}  so I can easily search like this: greplog index.php  But greplog "POST /test.php"  doesn't work: it searches for POST or /test.php whereas it should be a full pattern search, with the space included. Why? Why isn't $1 replaced by "POST /test.php"? Indeed this works fine: grep -Eh --color "POST /test.php" /var/log/apache2/other_vhosts_access.log{.1,}

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I want to sync music to ipod 4g device, without the use of itunes in ubuntu 10.04, I used to do this with gtkpod until gtkpod stopped supporting fourth generation ipods.  I tried to setup itunes with wine, but in vain. Is there any other open source software which can help me with this ? I do not want to instal windows for this.

What ubuntu applications provide support? (guides, how to's, status) Also, specifically, details on support for syncing music to iPhone's and iPod's with the latest OS version:   Can you sync music to apple devices using >iOS4? (iPhone & iPod) What applications allow you to do this and how? (guides, how to's, status)    What has already been established is:   Apple does not support Linux and has no plans to.  provides some support, however it currently does not support music/video synchronization with devices >iOS4. Go to  and scroll to the section titled "" to see if your device version is supported.


The face is not smooth out after I applied boolean modifier and after shade smooth.

I tried to manipulate a cube with the Boolean modifier. I tried to cut out an edge of the cube with a cylinder. Also, the shading result looks awful in FLAT SHADING mode, so I turned on SMOOTH SHADING.   Has anyone an idea how to achieve a better result. (I also cut out a Sphere first, this made the result less awful).   I used Blender Internal and rendered with smooth shading for smoothness.  Using flat shading looks okay, except the "round" cutouts :/  Face normals are okay.  First image is smooth shading.    EDIT: User Pisurquatre suggested the EdgeSplit modifier, works perfect to me (Maybe a little tweaking here and there):


I'm trying to read the output of the  ~$ ifconfig command with a python script and grab the private IP-address. this is for example the output of the command: ~$ ifconfig   vmnet1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 172.16.216.1  netmask 255.255.255.0  broadcast 172.16.216.255         inet6 fe80::250:56ff:fec0:1  prefixlen 64  scopeid 0x20<link>         ether 00:50:56:c0:00:01  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 213  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 172.16.37.1  netmask 255.255.255.0  broadcast 172.16.37.255         inet6 fe80::250:56ff:fec0:8  prefixlen 64  scopeid 0x20<link>         ether 00:50:56:c0:00:08  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 213  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  so then if we go ahead and direct the output of the command to this python script... import sys import re  data = sys.stdin.read() x = re.search(r"^vmnet[2-9]:\s?.*(\n.*){7}", data) print(x)  ~$ ifconfig | ./script.py  the output should be: vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 172.16.37.1  netmask 255.255.255.0  broadcast 172.16.37.255         inet6 fe80::250:56ff:fec0:8  prefixlen 64  scopeid 0x20<link>         ether 00:50:56:c0:00:08  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 213  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  but instead i simply get: None

I'm having a bit of trouble getting a Python regex to work when matching against text that spans multiple lines. The example text is ('\n' is a newline)  some Varying TEXT\n \n DSJFKDAFJKDAFJDSAKFJADSFLKDLAFKDSAF\n [more of the above, ending with a newline]\n [yep, there is a variable number of lines here]\n \n (repeat the above a few hundred times).   I'd like to capture two things: the 'some_Varying_TEXT' part, and all of the lines of uppercase text that comes two lines below it in one capture (i can strip out the newline characters later).  I've tried with a few approaches:  re.compile(r"^>(\w+)$$([.$]+)^$", re.MULTILINE) # try to capture both parts re.compile(r"(^[^>][\w\s]+)$", re.MULTILINE|re.DOTALL) # just textlines   and a lot of variations hereof with no luck. The last one seems to match the lines of text one by one, which is not what I really want. I can catch the first part, no problem, but I can't seem to catch the 4-5 lines of uppercase text. I'd like match.group(1) to be some_Varying_Text and group(2) to be line1+line2+line3+etc until the empty line is encountered.  If anyone's curious, its supposed to be a sequence of aminoacids that make up a protein.


Followed the Doc 2.4 wiki to make the tennis ball,   I am stuck!  Edit: Blender 2.71 makes it so simple, appended the object from the .blend made with 2.49, (tried making it from scratch in 2.71 but couldn't find anything to change the cylinder into a sphere as in 2.49). Anyhoo, voila!

How do you add more than one material to a mesh?   I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it.  I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal.