Career prospects for a Math PhD student in pure math?

I have scoured the internet and everyone seems to be saying different things. These range from    "You will have no problem getting a job in quant/finance etc", to  "You are in a hopeless situation and are completely unemployable"   Consider the following situation:   I am at a PhD student at a mid-20s US institution studying pure math I have very limited programming skills I am an Australian national and want to live in Australia long term.   I am not overly optimistic about my future career prospects. Since I am near the beginning I thought I better think about this now rather than 5-6 years down the track.  Question: Is it likely that I'll be able to find a reasonably well-paid, stable job after graduation (even outside of academia)? Are there things I can do now to improve my chances (beyond "trying hard")? Would I be better off doing another masters in computer science or machine learning back in Australia instead of this PhD in pure math?


How to identify the name of the package?

Lets say I want to download the 'Full GNOME Desktop Environment, with extra components' in the image below. What is the name of the package? is it 'gnome' or 'Full GNOME Desktop Environment, with extra components' or ...?


I have an iPhone 6. How can I use two Bluetooth audio devices and the 3.5mm audio jack together?

Me and my friends want to listen to music together. Two of us have Bluetooth Headphones (Beats Solo2 Wireless, Beats Studio Wireless) and one has a wired headset. Is there any way to use all three of these together?


How do I fix: check and repair file system (ntfs) on /Dev/sda3

It all started when I installed Ubuntu 18.04, then when I restart it sends me grub rescue, I can't access Windows 10 nor Ubuntu 18.04, I did a live USB and found out, the following list of software packages is required for ntfs file system support: ntfs-3g/ntfaprogs,I am not an expert at this but I don't know if it's seriously bad, any help will do, THANKS


Evalute $ \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{\binom{n}{k}}{n^k(k+3)} $

Evaluate $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{\binom{n}{k}}{n^k(k+3)}$.   $\bf{My\; Try::}$ Although we can solve it by converting into definite Integration.  But I want to solve it without Using Integration.  So $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{\binom{n}{k}}{n^k(k+3)} = \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{(n-1)(n-2).......(n-k+1)}{k!\cdot n^{k}\cdot (k+3)}$  Now How can i solve after that, Help required, Thanks


Does URL encoding create duplicate content?

An SEO expert was testing my site, and noticed that my URLs contained the special character :. He said that would create duplicate content, because google would interpret any url containing : as two separate URLs: one with : and one with %3A. Is he right?


Something weird is going on with my login on at least one site

I noticed, when viewing a question on the , that my username and profile is not correct.  , and .  Something is weird here:   My profile "about" section is filled in and I have the Autobiographer badge. I certainly never manually filled in the about page there so clearly this account is connected to my main account as the profile text was filled in automatically. Yet, the username and avatar does not match. Also I have the association bonus there, so it definitely wasn't me logging in randomly, I must have been already logged in as myself network-wide when I created that account (assuming I created that account).  The "private information" section in that user900 profile is completely blank (no full name, no email address), unlike all of my other profiles. Only the "about me" is really filled in.   Points 1 + 2 = there's no reason why the username or avatar should be different.  Point 3 is a mystery.  Also I am quite sure it's connected to my account. When I log out of Literature it does log me out of the entire network. And when I log in to the network, that account on Literature shows up again.  What is going on here? Is this a bug? An accidental merge? Did I do something weird?   None of this makes any sense to me. There's no reason why I should have a profile with a generic username and gravatar on that site given the other observations.  Additional random data points:   I use the same Google login for everything here. Just to be sure I reviewed account activity for my Google account. There are no security alerts, no unrecognized devices, and no suspicious logins or other activity. I do not use the mobile apps. I sometimes use the mobile site through my phone, but I checked my phone's browser history (which I have not cleared since January) and confirmed that I have never visited that site there. Looks like I haven't cleared my desktop browser history either, and I can at least verify that I did indeed create the account on March 1st, there is a visit to the  and the first question I visited was , although it does not appear that I took any actions there. According to my browser history I edited my profile, or at least visited the edit page, on March 2 (via MSE) and March 4 (via SO). I would have applied the changes to all communities. According to  the Literature site profile was updated on March 3, two days after it was created. Not sure if this is a red herring, but these events did all happen around the same time. Yesterday, I had an unregistered account on the UX site merged with mine (long story), it seemed to happen without a hitch, not sure if that's related.


Math behind 2D convolution for RGB images

I read many threads discussing why 2D convolutional layer is typically used for RGB images in neural network. I read that it is possible to use 3D conv layer. What I do not understand is the math behind it. Say your image is 300 by 300, and the kernel_size = (3, 3) and filter = 16 for the Conv2D layer. Input_shape would be (300, 300, 3) because there are 3 channels(RGB).  Since the kernel is 2D, the convolution can only be done at 1 channel at a time. Is that correct? Are the same kernel applied/convolved for the 3 channels? If so there should be 3 output but the dimension of the output would be (298, 298, 16). Is it averaged over the 3 channels?


I am wondering if the following sentence is correct:     We add the information their study provides with to our article.   The context is: their study provides with some information. And we add the information to our article.  I want to keep the word "add", and someone told me that "provides with to" sounds wired...


Getting absolute path without resolving symlinks in python

There are many examples of resolving the path of a file while following symlinks, and I'd like to get the absolute path to a file without resolving symlinks.  I think this is the solutions:   ex=Path('example.txt')   abs_ex = ex.parent.resolve()/ex   Is there something I'm missing in terms of another function or argument to resolve()?  There is an answer regarding using os.path.abspath but I'm asking about pathlib in Python 3.6 or better.


Can an xbox 360 controller be used on PC with a standard wireless adapter?

I have bought an Xbox 360 wireless controller and I want to use it on pc, but unfortunately, I cant find the Xbox 360 wireless receiver. Is it possible to use a normal wireless adapter for Xbox 360 controller?


How can one make Firefox ignore my GTK theme entirely?

I have a dark GTK theme installed in my Ubuntu 10.10 install and a persona installed for Firefox that I also like.  The problem is that Firefox is using my dark GTK theme for items like buttons and text fields on common web pages, and this commonly creates unreadable menus, text areas, and buttons.  (white text on white backgrounds, or black text on black buttons).  I don't want to change either theme, because they look great in every other application, and I don't want to have to do something crazy to my Firefox install like use custom user scripts or CSS overrides.   All I want to do is tell Firefox to stop using my GTK theme completely. This appears to be what Google's Chrome browser does and it makes the most sense by far.   How can web developers possibly work around all the possible GTK themes out there?


Is it possible to create a catch-all email using postfix which accepts any email address and sends an email to an external address?

Some background and my challenge:  Background  I am using Magento 2.x using a virtual machine set-up which runs on Ubuntu 16.04  Challenge  My goal is to be able to test emails sent to me from the Magento application.  In an ideal situation, I would not use an extension or third-party service (although a third-party SMTP server on the linux box could work).    To achieve my goal, I need to be able to register as a customer in the Magento application with any email address (fake or real) and have the email sent to the same external email address, no matter what.  What I've done so far   I've installed postfix I've installed Magento using luma.com as the domain (and set up my hosts file accordingly on my host machine, etc.) I've created a linux user account called "contact" I've configured inet_interfaces in /etc/postfix/main.cf as loopback-only I've set mydestination to $myhostname, localhost.$mydomain, $mydomain I've configured Magento to send its store emails from contact@luma.com I've set up an aliases file as the following:  postmaster:    root root:          contact contact:       me@gmail.com    Then I ran newaliases As far as I recall, email sends fine with this setup.  Hooray!  Next, the catch-all part.  For this, I've tried loads of things, and none seem to work.  From the reading I've done, I've tried the following:  In /etc/postfix/main.cf, I added the following:      virtual_alias_domains = luma.com     virtual_alias_maps = hash:/etc/postfix/virtual   Next, in /etc/postfix/virtual, I encountered my first problem.  As far as I understand from the reading I've done, I'm supposed to use something like:      @example.com   contact   This step apparently ensures that any email sent via postfix (e.g. from the Magento application) which uses an @example.com email address would be routed to the contact linux user I created above.  Then, my thinking was that the system would use the alias I set up to ultimately send out that email from contact@luma.com (via the settings in Magento) through to the external address I set up in the aliases file.  This approach would theoretically allow a user to register for an account with Magento using, say, joe@example.com, and then send the associated Welcome email to my external email address.  The issue with this is that I need the system to do this for any email, not just for emails ending in @example.com  Just for sake of completeness, I'll say that before asking this question, I was most recently researching how to achieve this part of the challenge using pcre tables. I've also tried configuring something using luser_relay, but both of these things are over my head at this point, so I'm lost.  My hope is that someone can offer some guidance as to whether I'm on the right path, where I may have missed something, and ultimately, offer some advice on whether my challenge can be solved and how I might go about solving it.  NOTE: I originally posted this over at stackoverflow but was advised to post it here.  Hopefully this is acceptable. Thanks for reading.


I want view a PDF file in my JavaFX project with the HostServices hostServices.  In the application, I want to show the PDF when a button is clicked, but I always get a NullPointerException when I click the button. How can I fix that?  This is my code:  private void showPdf(){     File file = new File("/home/ousainou/Documents/Biometric/Report.pdf");     HostServices hostServices = getHostServices();     hostServices.showDocument(file.getAbsolutePath());                 }


Maximal Ideals in Ring of Continuous Functions

Dummit and Foote, 7.4.33(a): Let $R$ be the ring of all continuous functions $[0,1] \to \mathbb{R}$ and let $M_c$ be the kernel of evaluation at $c \in [0,1]$, i.e. all $f$ such that $f(c) = 0$. Show that if $M$ is a maximal ideal in $R$ then $M = M_c$ for some $c$.    I am aware of proofs that use the compactness of $[0,1]$; however I have been told that a simpler proof exists using only the isomorphism theorems for rings along with basic facts about ideals. I have tried on my own to prove it this way but still have no success; is it possible?  (My attempts go something like: since $M$ is maximal, the quotient ring $R/M$ is a field. Then it would be nice to use the fact that $R/M$ has no zero divisors, but I can't quite make it work. Alternatively, consider $M \cap M_c$.)


How do I clone Ubuntu and Kali Linux (dual boot) from an old internal HDD to a new internal HDD without losing any data?

I have bought a new internal HDD hard drive as the previous one is old enough now I use Ubuntu and Kali Linux in dual boot and I have done a lot of customization and don't want to do that again with fresh install how do I clone both Kali Linux and Ubuntu as it is now to the new internal HDD without losing any data?


Wordpress PHP code not displaying in webpage

I have been overcoming some issues on my own and teaching my self about Ubuntu. I have now got to point of installing word press. However it won't display anything I put in . I did try one of the plug in for wordpress php every were but still no luck. I am running    Server version: Apache/2.4.18 (Ubuntu), Server built:   2017-06-26T11:58:04     PHP 7.0.18-0ubuntu0.16.04.1 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies     with Zend OPcache v7.0.18-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies  mysql> SELECT @@version; +-------------------------+ | @@version               | +-------------------------+ | 5.7.18-0ubuntu0.16.04.1 |    wordpress version 4.8   Everything when I check it tells me it is running correctly, have run the command to make sure php is enable to run.  I have done clean install thinking that I may have missed a command line entry some where but I fixed the mistakes I had which where to do with my spelling. I have read a number of forms tried as many ways as possible. Wordpress works ok. Just when I enter php code, it does not show it, the code works correctly in windows version of wordpress.


Error creating window handle before window loads

I have a large windows forms program with a lot of controls. The first window I see when I run it is the Login screen, it only has a combobox, button, textbox and a few labels. When I press the button it loads Form1. Form1, on load automatically creates an instance of Game, which it minimizes and embeds Game into Form1 using this code:  Game.Location = new Point(146, 6); Game.TopLevel = false; Game.Visible = true; Game.BringToFront(); Game.FormBorderStyle = FormBorderStyle.None; Controls.Add(Game);   I get the      "Error creating window handle"   error on this line (for some reason it's not on the window create line):  this.timer.Interval = 10;   Please help, others have said that this is to do with too many windows, but there I've tried deleting windows in project and I get the same error.


I was trying to review  in SO, but it showed me error, Too many of your edits were rejected. I get it, that I've made a mistake of editing too many  QAs and some of them got rejected and I'm sorry for that. I want to understand, how long (some approx. time frame) will I see this message? Is it temporary or permanent status?


Escape a string for a sed replace pattern

In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="<funny characters here>" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user.


What is the name for the region enclosed by an $n$ dimensional object?

In a $1$ dimensional object, the name for the region enclosed by it is the length of the object. In a $2$ dimensional object, the name for the region is the area of the object. In a $3$ dimensional object, the name is the volume of the object. What  is the name in a $4$ dimensional object? Hypervolume? In general, what can we call the name of this region in a $n$ dimensional object? ("the region enclosed by this $n$ dimensional object" seems too long and wordy).


Is there a way to get index fragmentation without using dm_db_index_physical_stats?

I am using SQL Server 2016 SP1 standard edition.  The view dm_db_index_physical_stats is very slow on big databases. Even if I specify the 'LIMITED' option.  I use the view to get index fragmentation, to determine if I should do a REBUILD or a REORG in my maintenance. But as the databases grows, the call to the DMV dm_db_index_physical_stats takes more and more time. On some database, which can be as big as 1TB, it can take an hour to query the DMV. (I have no down time, there is always clients connected to the database doing work.)  So I was wondering if there's a way to know index fragmentation without querying the DMV.


Parametrize shading in table through TikZ

I wanted to do some shading in a table according to its values. For example, if you see the table below:    a  b   c   d  a 90 10  0   0 b 0  80  10  10 c 0  0   95  5 d 0  10  5   85   I want to shade automatically each numeric cell with a mixture of black and white according to its value. That is, (a,a) = 90 should be something like black!90, and (c,d) = 5 should be black!5. Also, if you can parametrized the shading operation so one can define the color and if we use the value or the complement that would be great.  I was thinking in something like , but I cannot see how can one achieve that in a table.   Can you give me some advice on how to achieve such automatic styling?


Windows 10 licence integrity on hard drive swap

I need to replace a user's laptop to a new one. The guy had to install a shit ton of customers' apps on it and I'd rather not reconfiguring a full windows instance and reinstalling each app.  So I thought about swapping his current hard drive to the new laptop directly. My concern though is about the windows licence on the new computer.  If I'm not wrong, windows 10 licences are tied to the BIOS but how will the swap be handled by the laptop ? Will it keep running flawlessly with the built-in licence or will there be some kind of conflict ? The windows 10 version on each computer are the same (pro).  EDIT : Absolutely nothing in common with the proposed possible duplicate...


Is 2 hours and 5 mins enough time for transfer from international to domestic flight in Melbourne Tullamarine?

I'll be flying from Malaysia to Canberra pretty soon. My flight from malaysia will reach Melbourne at 4.55am while my connecting flight from Melbourne to Canberra is at 7am. Both flights are in the same airport but different terminals (T2 to T3).  I was wondering if 2 hours and 5 mins sufficient for me to go through customs, collect my baggage and re-check-in for my connecting flight to canberra? Or do i need to re-book my flight?


How can i install suggested programs, twice? I just did an apt get install and a list of packages were suggested. Thats fine. I went ahead and added --install-suggests, however during installing the suggested programs, even more suggestions came up, how do i install those? Ill have a go and run it again see if that works Working in ubuntu 20.04 server whilst installing the first suggested packages, even more packages were suggested for the first set of suggested packages


Vertex count appears incorrect after removing doubles

I've only just started studying the Blender Python API. I'm writing a script (see below) to automate something I've done by hand : joining two adjacent cubes and cleaning up the resulting mesh.   After joining and removing doubles, I expect to have 12 vertices instead of 16 in the resulting object. In the Info header, this seems to be the case, but when I print to the windows terminal I still see 16. Also I do see the output from remove_double(), here's a screenshot :    So what's wrong here ? What is the right way to access an object's mesh, and count its vertices ?  Joao  import bpy  # Create two adjacent cubes and join them bpy.ops.mesh.primitive_cube_add(location=(1,0,0)) ob = bpy.context.object bpy.ops.mesh.primitive_cube_add(location=(3,0,0)) ob.select = True bpy.ops.object.join()  # Expect 16 vertices, 24 edges, 12 faces result = bpy.context.object print(str(len(result.data.vertices)))  # Go to edit mode, remove double vertices bpy.ops.object.mode_set(mode = 'EDIT') bpy.ops.mesh.remove_doubles()  # Expect 12 vertices, 20 edges, 11 faces result = bpy.context.object print(str(len(result.data.vertices)))


Find all $x,y,z \in \mathbb{N}$ that $x^xy^y=z^z$

I was curious about the following diophantine equation $$x^xy^y=z^z$$ The equation seemed to have no positive integer solutions except for when $x$ or $y$ was $1$.  Though I attempted to solve the equation using prime factoring, I was able to proceed no further.   However, since I believe that I saw this question in a book, it is likely that this question is a duplicate or has been solved before. In that case I wish to apologize.   Any progress on the question would be appreciated.


how to model the exponential growth of luminosity when you flick a light on

My original thought was:  $$ L = L_0 \left( 1 - e^{-t/\tau} \right) $$  where $L$ = luminosity and $L_0$ = initial luminosity.   But when I tested this I found that the time constant $\tau$ was higher for smaller values of Voltage, so I have no idea and all I can find is the luminosity of planets etc. Any help would be good.


All introductory books on calculus talk a lot about how to get derivatives of functions, this is fine with me. What however that's still confusing to me is the real use of derivatives. for example the y(x) = x^2 has 2x has its derivative. How is 2x useful in relation to the original function.


How to remove leading whitespace from a string in Bash

For example, I have a string, "     some string", and I want to put "some string" in another string variable. How do I do that?  My code:  function get_title() {     t1=$(get_type "$1")     t2="ACM Transactions"     t3="ELSEVIER"     t4="IEEE Transactions"     t5="MIT Press"     if [ "$t1"=="$t2" ];         then         title=$(less "$1" | head -1)     elif [ "$t1"=="$t5" ];     then         title=$(less "$1" | head -3)     fi     echo "$title" }   As you can see the $title can return unwanted whitespace in front of text in center aligned texts. I want to prevent that.


How to group multiple values into a single column in SQL

Given the following SQL  SELECT      T1."PN" as "Part Number",     T2."QTY" as "Quantity",     T2."BRANCH" AS "Location", T3."STOCK" as "Bin" FROM      "XYZ"."PARTS" T1,     "XYZ"."BALANCES" T2,     "XYZ"."DETAILS" T3 WHERE (T2."PART_ID" = T1."PART_ID") AND (T3."PART_ID" = T1."PART_ID") ORDER BY "Part Number" ASC, "Location" ASC   We get results such as  YZ-7-CA-080                 88  01  STOCK7 YZ-7-CA-080                 88  01  03482  YZ-7-CA-080                 88  01  A8K2D   For location 01, there are 88 pieces of that part number YZ-7-CA-080 and they can be found in any of the 3 bins STOCK7, 03482, or A8K2D. The location value refers to a common branch like a warehouse and the quantity is for the entire warehouse, not the bins.  I need to change the output so we can write out instead one entry with bins as a list  YZ-7-CA-080                 88  01  STOCK7,03482,A8K2D   So I am looking for a good way to do this refactoring of the results in SQL. I feel there should be a way to use a function or subquery or something like that and hoping there is a single multi-db solution but assume there could be a need for different solutions on different dbs. (Oracle is the primary solution we are trying to solve but secondary priority db we need this for is SQL Server).  Note: There are multiple locations per part number so its not enough to set distinct on the first column to reduce the multiple part number entries. There would be multiple of the same part number at location 02 also with the same issue.   Ideas?


If $X$ is a connected metric space, then a locally constant function $f: X \to $ M, $M $ a metric space, is constant.  Thoughts:  I can see that this is similar to the definition of connectedness: that any continuous map from $X$ to a two-point space is constant. How would I go about proving the above statement though?  Thanks.


Why does this happen? Two methods that should give the same result but they don't:  a_good=[[0,0],[0,0]] for i in [0,1]:     for j in [0,1]:         a_good[i][j]=str(i)+str(j) #[['00','01'],['10','11']]  a_error=[[0]*2]*2 for i in [0,1]:     for j in [0,1]:         a_error[i][j]=str(i)+str(j) #[['10','11'],['10','11']]  !?


Is there a reason to use multiple question marks instead of an asterisk in filename expansion?

If I have a number of directories, named, for example 10001 through 10025 is there any reason to use ls 1*/foo vs. ls 100??/foo?  I have a lot more than 25 of them, so I mostly curious if there's any differences in speed.  I know the difference in use between the two, that the asterisk will match longer file names, like 10001.backup. But let's say I don't have any files that don't follow my conventions. Is there any behind-the-scenes differences?


Why didn't my Level 1 Barbarian become Level 2 when donated?

I am in a level 8 clan which means that if you donate a troop of level 1, it will automatically become level 2. But when I donated a Level 1 Barbarian to a member of my clan, it did not become level 2.   Is this a glitch or what?


Use of “the” in between "most of ___ Earth's"

In this sentence :  New research suggests most of Earth's heavy metals were spewed from a largely overlooked kind of star explosion called a collapser.  Here the should be used or not between "most of ___ Earth's"? I'm asking about this due to the presence of “most of” - it's limiting here Earth's heavy metals.


This is about my following declined but helpful flag.    History:  I saw an answer which almost copy-pasted another answer and I decided to flag that.  In my first flag, I chose not an answer option, as it was the closest. Also I try to avoid choosing in need of moderator intervention because I already received, "Using standard flags helps us prioritize problems and resolve them faster."  The first flag was declined with a common reason. But when I explained in a second flag with in need of moderator intervention (which was the only option to give an explanation). That flag turned out be helpful.  Feature Request:  Is it possible to add some feature(s) to ease the flagging of duplicated answer?  Note: I can think of two options:   A duplicate answer option to go with the original/first answer. An optional text box for description in not an answer option.


What is an elementary proof to the fact that $\frac{1}{p_1} + \frac{1}{p_2} + \frac{1}{p_3} + \dots$ diverges. ($p_i$ denotes the $i$th prime.)


Is there a way to simply splice in an additional length of 12/2 NM-B cable?

Is there a way without using junction boxes to simply splice in additional length of 12/2 NM-B cable? Can I use twist caps?  I'm putting in a dog door and as it so happens, there is some 12/2 right in the way of the location I've chosen. There's no additional slack in the cable, and I don't want to rip up more drywall than I have to. I'm tempted to just cut it and splice in an additional foot or two with twist caps to get it out of the way. I don't know if this is safe or legal. Do I need to get junction boxes? Attached some pictures for fun.  Also, there is a 1-gang electrical outlet box that is going to the outside. I'm moving that up a bit.


How do I make my pen anchor points around isometric grid?

As you can see in the photo there lines dont link up pefectly and don't follow the guidelines precisely. Is there a way I can make every exact?


Where do the regions of Westeros appear to align as of the season 6 finale?

Based on , my understanding is that there are 9 regions of Westeros subject to the rule of the Iron Throne, from Dorne joining up to Cersei killing Robert.  With whom does [insert region] align in what appears to be Daenerys vs Cersei?   Kingdom of the North -- Daenerys probably but currently busy with White Walkers Kingdom of the Mountain and the Vale -- Daenerys probably but currently busy with White Walkers (supposedly; depends on what Littlefinger has in mind) Kingdom of the Isles and Rivers (Iron Islands) -- Daenerys Kingdom of the Isles and Rivers (Riverlands) -- Cersei because the Freys are with the Lannisters? Kingdom of the Rock -- Cersei because she is a Lannister Kingdom of the Stormlands -- Cersei? Kingdom of the Reach -- Daenerys after invitation of Varys and Ellaria Principality of Dorne -- Daenerys after invitation of Varys presumably Crownlands -- Cersei since Cersei is currently occupying the Iron Throne   Am I understanding this right? Anything wrong?


C# find T4MVC function calls by regular expression

I'm converting my ASP.NET MVC application to Core! One of my problem is converting 'Url.Action(MVC.Account.ResetPasswordCode())' to 'Url.Action("ResetPasswordCode","Account")'. I need to find all 'MVC.Foo.Bar()' or  'MVC.Foo.Bar.Baz()' matches by regular expressions.  I have tried this patterns in regex.  "(MVC.)(.*?)(\\(\\))"   But result is wrong.  Thanks.


How to get a list of all the commands available for Ubuntu?

I want to start using the terminal more often, but I don't know what are the different commands available to me. Is there a way to list all the different commands that I can make use of?


Can we please remove the review queues pop-up?

Recently, there's been a pop-up about review queues:  It is extremely annoying, as I believe   .  It does a lot more to distract and aggravate people than it does to inform them, and it acts against one of the keys to SE's success: a clean UI. I for one do not want the site bugging me to death every other day, by covering things up and being distracting, about features that I will most likely never use - or about ones that are not new to me and that haven't changed.  This makes it harder and much more stressful to do things with the features that I do use, and many people feel the same way. Can we please remove this immediately, and can we please avoid these sorts of "Got it" pop-ups in the future?  I don't remember ever meeting a user, here or in real life, who thought well of these things.


How can I get these two pgfplots to be exactly aligned?

I have two pgfplots plots that have exactly the same width as far as their displayed data goes, but have different x-label widths and y-label widths. How can I get them to align such that the part where the data is displayed is on the same x-position on the document? first plot:    ^ 200| 150| 100| some data  50|  --|----------->    | 50 100 150  second plot:       ^ 200000| 150000| 100000| some data  50000|     --|----------->       | 50 100 150  Here's how they align in my document (using \centering):      ^   200|   150|   100| some data    50|    --|----------->      | 50 100 150        ^ 200000| 150000| 100000| some data  50000|     --|----------->       | 50 100 150  Here is how I want them to align (but they still have to kind of be in the center of the document):       ^    200|    150|    100| some data     50|     --|----------->       | 50 100 150        ^ 200000| 150000| 100000| some data  50000|     --|----------->       | 50 100 150  I have an idea on how this could work: Is there some option (I searched online but didn't find anything) that tells pgfplot to kind of have "floating" labels? (I am rendering these pgfplots as seperate pdf files and then I include them in my main tex-file, because somehow I can't get them to externalize, but that is a different story)


(1)$1=\sqrt{1}$  (2)$=\sqrt{-1×-1}$  (3)$=\sqrt{-1}×\sqrt{-1}$  (4)$=i×i=-1$  $1=-1$  Which step is wrong? I guess step 3 but I dont know why


How to prove that $\sum_{r=0}^n\binom{n}{r}2^r=3^n$

I need help proving that $$\sum_{r=0}^n\binom{n}{r}2^r=3^n$$  I'm thinking this should use the idea that $\binom{n}{r}=\binom{n}{n-r}$ but I'm not sure how to proceed with it.  Thanks in advance!


\documentclass[10pt]{beamer} \usepackage[utf8]{inputenc} \usepackage{multicol} \usepackage{lipsum}% Just for this example \usepackage{graphicx} \raggedcolumns % for NOT stretching the columns with manual columnbreak \usepackage{listings} \usepackage{fancyvrb}  \usepackage{listings}  \usepackage{bm}  \usepackage{xcolor}  \lstset{% setup listings          language=R,% set programming language          basicstyle=\small,% basic font style          keywordstyle=\bfseries,% keyword style          commentstyle=\ttfamily\itshape,% comment style          numbers=left,% display line numbers on the left side          numberstyle=\scriptsize,% use small line numbers          numbersep=10pt,% space between line numbers and code          tabsize=3,% sizes of tabs          showstringspaces=false,% do not replace spaces in strings by a certain character          captionpos=b,% positioning of the caption below          breaklines=true,% automatic line breaking          escapeinside={(*}{*)},% escaping to LaTeX          fancyvrb=true,% verbatim code is typset by listings          extendedchars=false,% prohibit extended chars (chars of codes 128--255)          literate={"}{{\texttt{"}}}1{<-}{{$\leftarrow$}}1{<<-}{{$\twoheadleftarrow$}}1          {~}{{$\sim$}}1{<=}{{$\le$}}1{>=}{{$\ge$}}1{!=}{{$\neq$}}1{^}{{$^\wedge$}}1,% item to replace, text, length of chars          alsoletter={.<-},% becomes a letter          alsoother={$},% becomes other          otherkeywords={!=, ~, $, *, \&, \%/\%, \%*\%, \%\%, <-, <<-, /},% other keywords          deletekeywords={c}% remove keywords  }    \begin{document}  \begin{frame}{Appendix}[fragile]  %\frametitle{R code:Extracting crimes 2015} \begin{lstlisting} datecrimes15 <- which(substr(datecrimes,7,10)==2015) crimes15 <- crimes[datecrimes15,] burgl=crimes15[which(crimes15$OFNS_DESC=="BURGLARY"),] Number of burgleries in 2015 ztca <- readShapePoly("ztca/cb_2014_us_zcta510_500k.shp", verbose=TRUE) ny <- ztca[as.character(ztca$ZCTA5CE10) %in% as.character(zipcode[zipcode$state=="NY",]$zip),]  extract nyzip codes latlongdata=cbind(robbery$Longitude[which(!is.na(robbery$Longitude & robbery$Latitude))],robbery$Latitude[which(!is.na(robbery$Longitude & robbery$Latitude))]) extract the latitude and longitude of burglaries pts <- SpatialPoints(as.matrix(latlongdata[,1:2])) dat <- pts %over% ny #Intersect the coordinates of burglaries with zipcode zctamap=as.numeric(as.matrix(nycZIPS2$zcta5)) nycZIPS2 is  the  shapedataframe of my zipfile in ny burgl=cbind(burgl,dat$ZCTA5CE10[-which(is.na(match(burgl$ziprob,zctamap)))])  counting the nomber of burgleries in each nyc zip  \end{lstlisting}    \end{frame}   \end{document}   I get the error : ! Paragraph ended before \lst@next was complete.                      \par  l.249 \end{frame}   Obviusly the line l.249 is different from this ,but it is referred to the last line of this code


When the OP votes to close own question as a duplicate, immediately close the question

When a user votes to close their own question as a duplicate, it is treated like any regular vote to close, auto-adding a comment to the page suggesting the possible duplicate.    Upon refreshing the page, the user is prompted to re-confirm that yes, their question is a duplicate.    "This question may already have an answer here" - You don't say? :P  Users can already decide to close their own question as a duplicate. It only takes a single extra step to confirm the closure.  When a user votes to close their own question as a duplicate, shouldn't the question be closed instantly without needing to refresh and reconfirm?


Earth's unimpeded rotation for billions of years

My nephew (7th grade) has stumped me with this question.  If I spin a top, it eventually stops, because of friction, air resistance etc.  How come the Earth has been spinning non-stop for 4.5 Billion years?  Is there no impeding force (e.g. air resistance), however weak, that could have stopped the Earth from rotating by now?


I have a SQL Server 2005 database using the full recovery model. If I execute the following commands:  ALTER DATABASE test SET RECOVERY SIMPLE; ALTER DATABASE test SET RECOVERY FULL;   or   BACKUP LOG test WITH  truncate_only;   Then try to run a log backup:  BACKUP LOG test TO  DISK = 'backupfile.bak'   I receive the error message:     BACKUP LOG cannot be performed because there is no current database backup.   Question:     How do I check that I will not be able to take a log backup, without running a backup log command?


I want to know if there is no risk to install ubuntu 18.04 in Lenovo Z50-70, dis you test the new distro in that model of lenovo? Remember ubuntu 17.04 crashed the Bios of this model,  I wanna install this release (18.04) but I am afraid of crahs my laptop Lenovo Z50-70, becuase I nees dual boot with win 10.


Some of the candidates that want to colonize Mars have the vegan trait. The description of the trait reads: "Don't worry. They'll tell you".   What are the benefits/drawbacks of having Vegan colonists?


Prove that $\sum _{n=1}^{\infty \ }\left[n^3\sin \left(\frac{1}{n}\right)-n^2+\frac{1}{6}\right]$ converges

EDIT: I want to prove it with "converges absolutely" and not something else. I want to prove that the sequance $\sum _{n=1}^{\infty \ }\left[n^3\sin \left(\frac{1}{n}\right)-n^2+\frac{1}{6}\right]$ converges. I thought of trying converges absolutely, but I don't even know how to start. Also, trying to derivate the inside function doesn't help showing that the function is a non-negative one. Any ideas? Thanks!


Book about an alternate history where the Cuban Missile crisis turned into full-scale war

This book was published in the last decade, probably in the last five years. The story, if I remember correctly, takes place in the present - meaning when the book was published.  In one universe a few people survive in a timeline where the Cuban Missile crisis turned into full-scale war and the world was devastated. Somehow this universe 'bleeds' into our universe, just how I don't know.  I saw the book in a bookstore but I never read it.  Does anyone know what this is?


Very slow, intermittent WiFi speeds with 14.04 and Intel PRO/Wireless 5100 AGN [Shiloh]

I did a fresh install of Ubuntu 14.04 LTS on the harddisk of a Lenovo Y650 Ideapad laptop.  The wireless adapter is an Intel PRO/Wireless 5100 AGN [Shiloh].  Initially I could not connect to any wireless networks; however, I could see them.  There are no issues when connecting via Ethernet.  I was only able to connect to the wireless network by entering this command in the Terminal:  echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf   The speeds are extremely slow and intermittent.  When I am able to run a speed test, the ping is good (24 to 26 ms) but the download speeds range from 0.15 to 0.30 Mbps.  iwconfig  eth0      no wireless extensions.  lo        no wireless extensions.  wlan0     IEEE 802.11abg  ESSID:"PinkRabbit"             Mode:Managed  Frequency:2.412 GHz  Access Point: E8:40:F2:CD:18:0B              Bit Rate=2 Mb/s   Tx-Power=15 dBm              Retry  long limit:7   RTS thr:off   Fragment thr:off           Power Management:off           Link Quality=70/70  Signal level=-26 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:3  Invalid misc:254   Missed beacon:0   ifconfig  eth0      Link encap:Ethernet  HWaddr 00:23:5a:d2:70:91             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)           Interrupt:17   lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:171 errors:0 dropped:0 overruns:0 frame:0           TX packets:171 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:15613 (15.6 KB)  TX bytes:15613 (15.6 KB)  wlan0     Link encap:Ethernet  HWaddr 00:1e:65:3e:0c:48             inet addr:192.168.0.13  Bcast:192.168.0.255  Mask:255.255.255.0           inet6 addr: fe80::21e:65ff:fe3e:c48/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:42 errors:0 dropped:0 overruns:0 frame:0           TX packets:96 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:9032 (9.0 KB)  TX bytes:16851 (16.8 KB)   nm-tool  NetworkManager Tool  State: connected (global)  - Device: eth0 -----------------------------------------------------------------   Type:              Wired   Driver:            tg3   State:             unavailable   Default:           no   HW Address:        00:23:5A:D2:70:91  Capabilities:     Carrier Detect:  yes  Wired Properties     Carrier:         off  - Device: wlan0  [PinkRabbit] --------------------------------------------------   Type:              802.11 WiFi   Driver:            iwlwifi   State:             connected   Default:           yes   HW Address:        00:1E:65:3E:0C:48    Capabilities:     Speed:           1 Mb/s    Wireless Properties     WEP Encryption:  yes     WPA Encryption:  yes     WPA2 Encryption: yes    Wireless Access Points (* = current AP)     *PinkRabbit:     Infra, E8:40:F2:CD:18:0B, Freq 2412 MHz, Rate 54 Mb/s, Strength       92 WPA WPA2    IPv4 Settings:     Address:         192.168.0.13     Prefix:          24 (255.255.255.0)     Gateway:         192.168.0.1      DNS:             64.71.255.204     DNS:             64.71.255.198     DNS:             8.8.8.8     DNS:             8.8.4.4


Allow undelete votes on posts deleted by automated clean-up

If a post is deleted by automated system, user can not vote to undelete because the deletion is made by the "moderator" Community ♦.    Users should be able to cast undelete votes in this case, rather than flagging or bringing noise to meta about it.    ()


Is there a way to solve for an unknown in a factorial?

I don't want to do this through trial and error, and the best way I have found so far was to start dividing from 1.     $n! = \text {a really big number}$   Ex. $n! = 9999999$   Is there a way to approximate n or solve for n through a formula of some sort?  Update (Here is my attempt):  Stirling's Approximation: $$n! \approx \sqrt{2 \pi n} \left( \dfrac{n}{e} \right ) ^ n$$  So taking the log:     $(2\cdot \pi\cdot n)^{1/2} \cdot n^n \cdot e^{-n}$       $(2\cdot \pi)^{1/2} \cdot n^{1/2} \cdot n^n \cdot e^{-n}$       $.5\log (2\pi) + .5\log n + n\log n \cdot -n \log e$       $.5\log (2\pi) + \log n(.5+n) - n$   Now to solve for n:     $.5\log (2\pi) + \log n(.5+n) - n = r$       $\log n(.5+n) - n = r - .5 \log (2\pi)$   Now I am a little caught up here.


Why is it "Till death do us part" and not “...does…”

Why is the verb "do" used in the phrase, Till death do us part, and not "does"?  I also looked in The Free Dictionary, but it didn't explain why        A common phrase used in wedding ceremonies indicating that the marriage bond is be intended to last until death. Taken from the marriage liturgy in the Anglican Communion's Book of Common Prayer, the phrase refers to the fact that marriage is seen in the Christian faith as insoluble except by the death of one of the partners. (Also worded as "till death us do part," which is how it is written in the Book of Common Prayer.)


Tell if the point A(x,y) lies inside the triangle formed by the points P(a,b) , Q(c,d) , R(e,f) .  I can solve this by finding the sum of the areas of the triangles - APQ , AQR , ARP and comparing this with the area of the triangle PQR. But it takes a good amount of time (which is not good for M.C.Q based exams). Is there any cleaver way to solve this?


I downloaded intel_sdk_for_opencl_2016_ubuntu_6.0.0.1049_x64, tried to run install.sh but it says Unsupported OS, so I then read somewhere that I needed to make .deb file from one of the RPM files, I did it with 2:  opencl-1.2-devel_6.0.0.1049-2_amd64.deb  opencl-1.2-intel-devel_6.0.0.1049-2_amd64.deb  Installed them both with sudo dpkg -i, but I still don't have the libOpenCL.so that I need  Now I'm stuck... :(


Binary classification with strongly unbalanced classes

I have a data set in the form of (features, binary output 0 or 1), but 1 happens pretty rarely, so just by always predicting 0, I get accuracy between 70% and 90% (depending on the particular data I look at). The ML methods give me about the same accuracy, and I feel, there should be some standard methods to apply in this situation, that would improve the  accuracy over the obvious prediction rule.


I have been trying to find a way to easily drop a nice horizontal rule into a LaTeX document.  \hline just makes a line across the page.  It would seem that some package must provide something that is maybe half a page wide, with little bedknobs on the ends or something to act as a nice section marker for paragraphs.  Any ideas?  Or am I boned, and need to come up with my own macro to create such a beast?


Why was the universe in an extraordinarily low-entropy state right after the big bang?

Let me start by saying that I have no scientific background whatsoever. I am very interested in science though and I'm currently enjoying Brian Greene's The Fabric of the Cosmos. I'm at chapter 7 and so far I understand most of general ideas he has talked about. Or at least, I think I understand them :-)  There is however one part, at the end of chapter 6 that I can't grasp.  It is about entropy and the state of the universe a few minutes after the big bang.  On page 171 he says:     Our most refined theories of the origin of the universe -our most refined cosmological theories- tell us that by the time the universe was a couple of minutes old, it was filled with a nearly uniform hot gas composed of roughly 75 percent hydrogen, 23 percent helium, and small amounts of deuterium and lithium. The essential point is that this gas filling the universe had extraordinarily low entropy.   And on page 173-174:     We have now come to the place where the buck finally stops. The ultimate source of order, of low entropy, must be the big bang itself. In its earliest moments, rather than being filled with gargantuan containers of entropy such as black holes, as we would expect from probabilistic considerations, for some reason the nascent universe was filled with a hot,   uniform, gaseous mixture of hydrogen and helium. Although this configuration has high entropy when densities are so low that we can ignore gravity, the situation is otherwise when gravity can't be ignored; then, such a uniform gas has extremely low entropy. In comparison with black holes, the diffuse, nearly uniform gas was in an extraordinarily low-entropy state.   In the first part of the chapter Brian Greene explains the concept of entropy with tossing the 693 pages of War and Peace in the air.  At first, the pages are ordered. The specific order they are in make sense and are required to recognize the pages as a readable book called War and Peace. This is low entropy. It is very highly ordered and there is no chaos.  Now, when you throw the pages in the air, let them fall and then pick them up one by one and put them on top of each other, the chances you get the exact same order as the initial state are extremely small. The chance you get another order (no matter what order, just not the one from the beginning) is extremely big. When the pages are in the wrong order, there is high entropy and a high amount of chaos. The pages are not ordered and when they are not ordered you would not notice the difference between one unordered state and another one.  However, should you swap two pages in the ordered, low entropy version, you would notice the difference.  So I understand low entropy as a highly ordered state with low chaos in which a reordering of the elements would be noticeable.  I hope I'm still correct here :-)  Now, what I don't understand is how a uniform mixture of hydrogen and helium can by highly ordered? I'd say you wouldn't notice it if some particles traded places. I'd say that a uniform mixture is actually in a state of high entropy because you wouldn't notice it if you swapped some hydrogen atoms.  Brian Greene explains this would indeed be the case when gravity plays no important role, but that things change when gravity does play a role; and in the universe right after the big bang, gravity plays a big role.  Is that because a reordering of the particles would change the effects of gravity? Or is there something else that I'm missing here?


Etiquette for suggesting a user accept a different answer?

I'm wondering what the etiquette is for suggesting that a user accept a different answer to their question.   A recent example: shortly after the OP posted the question, an answer was posted and quickly accepted. The answer was technically correct, but was short and low-quality. 45 minutes later another answer was posted, which was lengthy, thoroughly explained the answer to the question, and was just an all-around good answer. The accepted answer has only 1 upvote, and the other answer 5. So clearly there is community consensus regarding which is the better answer; it is not only my opinion driving this question. The problem is that, even though the better answer has more upvotes, it will never rise above the accepted answer when being displayed.  So my question is this: I would like to comment on the question and suggest that the OP change their accepted answer, as the other answer is far superior and I would prefer visitors to the site view excellent content to poor. It is of course their choice, and I would word the suggestion politely, but I'm not sure if it is proper etiquette to advise a user on which answer I think should be accepted. In this case this was actually the OP's first question on the site, which adds another layer of complexity, but I think the etiquette should probably be the same regardless. So, can anyone please advise me on the SE guidelines for such situations? Can I politely prod the OP, or do I need to just leave it alone? (To clarify, none of the answers in question are mine.)    I attempted to find an answer to this question before posting it; the closest I came was , which is related but not a duplicate.


"Where will you go" vs. "Where you will go"

Which sentence is correct between these?      Where will you go?     Where you will go?


To what extent are child actors exposed to the violent aspects of the movie they perform in?

Some movies feature child characters put in violent situations. This can range from crude language to extreme horror (e.g. torture, gore, etc.). As an example,  and its sequel has plenty of those scenes. It looks like a paradox that children can be actors in movies that are definitely not for children.  Do the directors usually try and avoid exposing the very young actors to the violence of such scenes, e.g. by clever dubbing and editing? Are there laws that require them to do so, just like there are ratings that prevent children from seeing some movies?


In Linux shell, am I able to create a directory but the name would be a string returned from another program? And if I am able, how to?  In particular I am asked to create a new directory in my Home, and its name would be the minute on my computer's clock. Let's suppose /home/john/01/, 01 is the minutes on my clock.  I was thinking something like pipeline date +"%M" | mkdir but I do not know how I am gonna put that returned number into the mkdir program.  Finally another idea came to my mind, something like this mkdir (date +"%M") but this as well is a mistake. Any help please?


What a RegEx that can match text in parentheses with nested parentheses

I need some help to write a regex that matches a string in parentheses with nested parentheses and starts with pattern.  (NOTE: the text in the 'parent' parentheses could be without nested parentheses)  Examples:  Some text (pattern: SOME TEXT THAT (I WANT TO EXTRACT)) a bit more text (another pattern: ignore that text) and may be a little more text  Result should be: SOME TEXT THAT (I WANT TO EXTRACT)  Some text (pattern: SOME TEXT THAT (I WANT TO EXTRACT)) a bit more text (another pattern: ignore that text) and may be a little more text  Result should be SOME TEXT THAT (I WANT TO EXTRACT)   Some text (pattern: SOME TEXT THAT I WANT TO EXTRACT) a bit more text (another pattern: ignore that text) and may be a little more text  Result should be SOME TEXT THAT I WANT TO EXTRACT  The RegEx I've tried like /\((pattern:?\s?([^\)]+))\)/gi misses a nested )


Take an example that there is a bubble in a bottomless container (saying that that is possible) if the bubble is deep enough would the water pressure cancel out the buoyancy acting on the bubble and if so what would happen to the bubble? And at what point would this be (This question is slightly different to the other one as this is not limited to the deepest point on earth)


Can I run a script every time the cmd program is run?

I want to show unicode character on my windows console. For this I changed the cmd's font to lucida console and I'm using chcp 65001 before every session I will open a program which will display unicode characters. This only works to session where I ran chcp 65001. If an external program open the cmd instead of myself I can't control it and call chcp before. So I want run it automatically when a new cmd is run (and turn on/off as I want to). Is it possible?


Prove that every element of G is a square

An element is called a square if it can be expressed in the form $b^2 \;\exists b$.   Suppose that $G$ is an abelian group and $H$ is a subgroup of $G$. If every element of $H$ is a square and every element of $G/H$ is a square, prove that every element of $G$ is a square.


Bash - reload profile or bashrc when switching to root

Just moved over to ubuntu land from fedora (wanted try the budgie build). I'm fed land I had a script (from Fedy - posted below.) that changed my prompt to red when I logged into the root shell with sudo -s, this doesn't appear to work in Ubuntu even though I have the following the /etc/sudoers file:  Defaults        env_reset     Could one of you kind folks point out what is blocking or overwriting the export PS1?  Output of cat /etc/profile.d/color_prompt.sh:  # Colors in Terminal (Bash) if [[ ! -z \$BASH ]]; then     if [[ \$EUID -eq 0 ]]; then         PS1="\[\033[33m\][\[\033[m\]\[\033[31m\]\u@\h\[\033[m\] \[\033[33m\]\W\[\033[m\]\[\033[33m\]]\[\033[m\] # "     else         PS1="\[\033[36m\][\[\033[m\]\[\033[34m\]\u@\h\[\033[m\] \[\033[32m\]\W\[\033[m\]\[\033[36m\]]\[\033[m\] \$ "     fi fi


Double induction example: $ 1 + q + q^2 + q^3 + \cdots + q^{n-1} + q^n = \frac {q^{n+1}-1}{q-1} $

I'm working on a double induction problem with the following prompt:     Prove by induction on $n$ that for any real number $q > 1$ and integer $n \ge 0$:   $$ 1 + q + q^2 + q^3 + \cdots + q^{n-1} + q^n = \frac {q^{n+1}-1}{q-1} $$    Based on , I would imagine the solution is:   Base case $(q,n)$ as $(2,n)$ and $(q,0)$ Assume premise for $(2,n)$ and prove $n+1$ Assume premise for $(q,0)$ and prove $q+1$   But even the base cases confuse me...for example on $(q,0)$: $$1+q^0 = \frac {q^{0+1}-1}{q-1} $$ $$2 = 1 $$  That can't right. Maybe I omit the $q^0$ on the LHS, but why?


Given equations of motion, how can we check if there is a lagrangian from which we can derive them?

Suppose we are given a set of equations of motion for $N$ bodies, which generically will go like this  \begin{equation} \frac{d^2\mathbf{r}_i}{dt^2}=\mathbf{F}_i \left((\mathbf{r}_i)_{1 \leq i \leq N}, (\frac{d \mathbf{r}_i}{dt})_{1 \leq i \leq N}, (\frac{d^2 \mathbf{r}_i}{dt^2})_{1 \leq i \leq N} \right) \end{equation} $\mathbf{r}_i$ is the position of body $i$ and $\mathbf{F}_i$ is just the sum of all the generalized force terms acting on it. $\mathbf{F}_i$ could depend on the positions $\mathbf{r}_i$ and velocities $\frac{d \mathbf{r}_i}{d t}$ of any of the other bodies, but also on powers of position and velocity, and even terms involving acceleration.   The question is: If we know $\mathbf{F}_i$, how can we know if this equations of motion can be derived from a lagrangian? Is there a systematic way to check that? Is there a systematic way of getting said lagrangian?


I do a 35km return commute into a big city. Almost daily, someone tries to run me over.   Just in the past month I've experienced the following:   I filter to the front of the traffic, wait at the front of the bike lane, and the car behind me who is not blocked at all, because i'm a meter over to the left into the bike lane, makes a sharp turn into my lane to deliberately drive into the back of my bicycle, while the lights are still red. I have to do an emergency takeoff and left turn through the red into a side street to get away. cycling along a major road in the bike lane at night with bright flashing lights at the front of my bike and red light at the rear. I ride past a side street where someone is waiting to turn right, and as I'm directly in front of his car, he slams on the gas and pulls out, narrowly avoiding cleaning me up. Going through a roundabout, in the middle of the lane, lights on, broad daylight. Following about 20m behind the car in front of me. Again, go past a side street, and the driver pulls out at full speed just as i'm going past him. Only narrowly avoid getting run over because I scream out some sort of profanity at a voice breaking volume and he backs off slightly.    How do you deal with attempts on your life by people who are more focussed on eating their macdonalds and throwing their cigarette butts out the window than the safety of other road users?


From SR we know that the measurement of space and time are relative to the specific reference frame of the observer.   What about measuring energy content?  When an object is accelerated to a near light speed, constant velocity it takes allot of energy to get there, and that energy is essentially 'stored' within the object, right?  If I'm within the reference frame of that object, but have no knowledge of the history of being accelerated (say I was in cryo-sleep), is there any way as an observer I can measure or determine that the energy within the object I'm traveling with has increased?  If not, then how do we know here on earth, or as a whole solar system or galaxy, that we are not traveling near light speed?


Shrink the database only up to its initial size which is set after creating database

In SQL server every database has a property Initial Size (MB) which can be seen in properties of database in SSMS. By default it will be 3 MB for mdf and 1 MB for ldf file.  So now if create a new database then it will be set to default size(i.e 3 MB for mdf and 1 mb for ldf file). But after creating the database  I change the initial size to some other value say For mdf 10 MB and ldf 5 MB.(In real-time some database administrator may want to change initial after creating database)  But now if shrink the database it will shrink beyond the initial size I have set after creation(consider that no data is there in database otherwise it will shrink to its actual content size). It will shrink till the initial size it had during creation of database(i.e 3mb for mdf and 1 mb for ldf). I was expecting to shrink till the initial size which I have set(i.e 10 mb for mdf and 5mb for ldf). Can it be possible to do? If possible then how?  In some article i saw like dbcc SHRINKFILE can be used to shrink beyond initial size and dbcc SHRINKDATABASE cannot shrink beyond initial size. But I want to shrink only till the initial size to which I have set.  Note: I know that shrink is bad and should not be done.But I want to know how it can be done? If sql server considers only the initial size set during creation of database then what is the use of setting the initial size after creating database?  EDIT:  From microsoft shrink related article: Using DBCC SHRINKDATABASE you can not shrink database below its initial size.  My question is Can I change the initial size of existing database itself?  EDIT:  I have about 5 sql server instance. All the database where created with default size of 3 mb for data and 1 mb for log(about 3 years back). Now all the databases are in the range of 100-1000 mb. I wont shrink the database normally as it is not good practice. But some database grow more than 10 GB(mdf file itself as i insert so much data in it). So when database is large I will shift unimportant and old contents from this database to another server as it is not required in that server for me. So that database size reduces from 10 GB to 1 GB. Now the remaining 9 Gb left unused. Now I  want to specify database size to be reduced to 2 GB so that i will get 1 GB free space(Also 2 Gb is the ideal size for this database), Which can be used to avoid autogrowth till next 1 Gb of data is filled. Also i have set 100 MB auto-growth for this kind of large database which has more writes. So instead of specifying size as 2 GB in shrinkfile command,if it was possible to change initial size to 2 GB (which shrink considers) then it would have been better. During this database creation there was no plan about size ,autogroth etc. As it was created about 3 years back. Now i am planning to set autogrowth etc. I cant again create new database with new initial size and shift data. So I was asking whether I can change the Initial size for existing database?


Can I fix the Xbox 360 “Red Ring of Death” myself?

I've heard of kits that can fix your Xbox 360 if you happen to get the . Do any of these work, and do they void your warranty? Are there any other noteworthy tips or tricks?


My claim is $O(4)\ncong SO(4)\times C_2$, since there is no "$-I$" role as in the proof that $O(3)\cong SO(3)\times C_2$, as $\det(-I)=1$ in $\mathbb{R}^4$. However, I cannot proceed like $O(2)$ case that both $SO(2)$ and $C_2$ are abelian while $O(2)$ is not. Are there any properties I missed?


AdSense | Get verification for a 'secret' blog

I've posted a similar question (      ) earlier but this is now more relevant, so please give me a note to   delete the previous question if you feel it should be removed.   I have a section in my website where I want to publish articles based on my work ( art/design/photography ), promotional materials for local events/businesses and other more national promotional meterial ( plus maybe some personal posts ).  So as you can tell, it's a bit of a random section, meaning that there is no real home page. I simply want people to be able to visit the article directly from social media or 3rd party websites.  The url/links are structured as:  http://example.com/articles/id/40294092 ... A local business profile http://example.com/articles/id/53904930 ... A music event article   Meaning that simply visiting http://example.com/articles will result in a redirect back to http://example.com.  So if I want my articles to have AdSense adverts, I obviously need to give the root of my articles, which in this case will result in a blank page, followed by the redirect.  How can I get Google AdSense to verify my url?


I have been using gparted for years under any ubuntu version. gparted won't start under ubuntu 17.10. Is this a bug of ubuntu 17.10?


Is there a way to make a function where you can call it like a python method?

Is there a way to make a python function so that you can call it like a method? So say i had variable x, and I had a function: def func(y):      return str(y)+"hi"  Then call it like x.func() and have it take x in as the input?


Convert and redirect URL in uppercase to lowercase using .htaccess

I would like to redirect a URL with uppercase characters http://localhost/A/B to a lowercase version http://localhost/a/b using the .htaccess file. Using regex I can capture A and B but is it possible to convert them to lowercase?


I am trying to display both the datetime and the IP address of my log file:  Apr 20 07:03:53 123.345.45.123 ^             ^ ^            ^ |---datetime--| |-----IP-----|      my code:  datetimeRegex = re.compile(r'^\w{3}\s\d\d\s\d\d:\d\d:\d\d')  IPRegex = re.compile(r'\d+.\d+.\d+.\d{1,3}')  f = open("logfile.log","r")  count = 0  for line in f.readlines():     datetime = re.match(datetimeRegex, line)     IPaddr = re.match(IPRegex, line)     if datetime and IPaddr:         count += 1         print str(count) + ":" + str(datetime.group()) + "IP: " + str(IPaddr.group())   I tried to see what is not matching and I think it is IPaddr that isn't matching because I removed IPaddr from my if statment and my output would print the dates. It is when I added IPaddr that nothing would print. So I think I am not matching my IP address correctly. However I tried a sample IP and my regex on an online regex tester and it seemed to work. Is there something missing in my REGEX? Or perhaps there is something wrong with my logic? If there is a faster or more efficient way to parse through the log file, I am open to suggestions.


Extra }, or forgotten error when using `\textcolor`

I am trying to highlight lines in my listing and I keep getting an error that says: Extra }, or forgotten $. ...  I am trying to highlight :  \begin{lstlisting}[language=Java, numbers=none] (*@ \textcolor{red}{ if (n == 0) {           throw new NoDataException(LocalizedFormats.EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY);     } }  @*) \end{lstlisting}   Expected output(in red color)  if (n == 0) {           throw new NoDataException(LocalizedFormats.EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY);     }   Any help will be much appreciated! Thanks


Delete all jpg in a folder that are smaller than specific width/heigth

I have restored with photorec about 7.500 jpg's. I have moved them all in one folder. A big portion of them is thumbnails. But i can't just go on and delete lets say all of them that are smaller than X bytes because i have some old pictures which were taken from older phones. So there are thumbs that are 15KBs and also regular photos of about the same size but with bigger resolution (dimensions).   So i want a way to remove those that are smaller than x pixels wide for example. Can this be done from the terminal?  Thanks.


How can I enable the "magic sysrq key" on ubuntu desktop?

The magic SysRq key does not work on my Ubuntu 16.04 desktop. I imagine it's now disabled by default. My attempts to enable it did not work, and the only thing Google finds is a 2007 forum post from when it was apparently enabled by default.  Can I enable it? If so, how?  [Added the following after the first answer:]  According to  "In Ubuntu the combination of Alt+SysReq acts as "print screen" command." This is in fact the behaviour I observe on a non-hung system, even after doing sudo sysctl -w kernel.sysrq=1 I get some kind of screen capture on my desktop. Not what I want.  It's not practical to write to /proc/sysrq-trigger from a system that's basically hung, trying to get information to debug the problem.


In which comic book did Steppenwolf stab Wonder Woman, and did she die as a result?

What was the comic book in which Steppenwolf stabbed Wonder Woman? I saw a comic panel once where he stabbed her.  And did she really die from the wound?


How can I make extra money with photography?

I have photos in Getty Images, in Shutterstock, Imagekind and I recently added some to RedBubble, but I'm not having the expected results.  Does anyone have some history of success selling photographs or working as a photographer?  Examples of my work are available in .    Also asked by   I am an amateur who sometimes takes pictures of nature or random things. I've been told by several people that my pictures are worth money.  How can I monetize my best shots?  I don't really want to do a lot of work, editing, SEO or whatever. I'm looking for an easy way where I would just upload my pictures somewhere and let it go.  Maybe stock photos? People buying prints? I have no idea how that works...  EDIT: maybe a link to see which type of photography I do can help


Generate wordlist by List of List of character

I want to generate a wordlist by list of list of character, like:  A=[['a','b','c'],['d'],['e','f']]   where a[0] stores all possible character at first place, a[1] stores all possible character at second place and so on. All possible words generated by list 'A' will be:  ade adf bde bdf cde cdf   I am generating this list by:  for i in a[0]:     for j in a[1]:         for k in a[2]:             print i+j+k   This code works fine for fixed length of list(i.e. len(A)). I want to write a generalize code which can generate wordlist by list of any size.


How to make bidirectional pipe between two programs?

Everyone knows how to make unidirectional pipe between two programs (bind stdout of first one and stdin of second one): first | second.  But how to make bidirectional pipe, i.e. cross-bind stdin and stdout of two programs? Is there easy way to do it in a shell?


Nginx redirect all old domain subdomains to new one

I had a very long domain, so I decided to change it to a shorter and more friendly one. But since I have a lot of subdomains (in fact, I have a subdomain wildcard), I wanted to keep the subdomain while changing only the domain part. So, I made the following rule:  server {   listen 80;   server_name ~^(\w+)\.olddomain\.com$;    rewrite ^ $scheme://$1.doma.in$request_uri? permanent; }   I have read a lot of other questions where this snippet solved the problem. But with me, Nginx always redirects to .domain.in, without any subdomains. What am I missing? I have tested the regex against regex101 and the examples work fine, Nginx seems unable to redirect it.


I know that I can update a snap package using  sudo snap refresh <package>   But is there a way to update all snaps, like   sudo apt dist-upgrade


Infinite algebraic extensions of $\mathbb{Q}$

I need help to solve the following exercise:   If $K$ is an algebraic extension of $\mathbb{Q}$ (finite or infinite), then we let $O_{K}$ denote the ring of algebraic integers in $K.$ If $\frak{P}$ is a prime ideal of $O_{K}$ then $\frak{P}∩\mathbb{Z}$ is a prime ideal of $\mathbb{Z}.$ Moreover, if $\frak{P}$ is non-zero, then so is $\frak{P}∩\mathbb{Z}$ . Thus $\frak{P}∩\mathbb{Z}=$$ p\mathbb{Z}$ for some prime $p.$ Show that $O_{K}/\frak{P}$  is a field, and is an algebraic extension of $\mathbb{F}_{p}$; then show that it is Galois over $\mathbb{F}_{p}$ with abelian Galois group.  Now suppose that $K/F$ is a (finite or infinite) Galois extension. Let $\frak{P},$  $O_{K}$ be as before and put $\frak{p}=\frak{P} \cap $$O_{F}$, a prime ideal of $O_{F}.$  Show that $\mathrm{Gal}(K/F)$ acts transitively on the set of prime ideals of $O_{K}$ above $\frak{p}.$   Thanks in advance


Generate table using the foreach command from pgffor

I want to generate a table from a list. However for some reason it fails to work. I searched:      and tried different solutions but none of them work for some reason :(  \documentclass{minimal}                                                          \usepackage{tikz}                                                                \begin{document}                                                                   \begin{tabular}{ll}                                                                  \foreach \x/\y in {-2/a,-1/b,1/c,2/d} {%                                               \edef\temp{\noexpand \x & \y \\ }%                                                   \temp                                                                              }%                                                                                \end{tabular}                                                                    \end{document}      Edit...  Also tried   \documentclass{minimal} \usepackage{tikz,etoolbox} \makeatletter \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} \newcommand*\resettabtoks{\global\@tabtoks{}} \newcommand*\printtabtoks{\the\@tabtoks} \makeatother \begin{document} \resettabtoks \foreach \x/\y in {-2/a,-1/b,1/c,2/d}{%   \eaddtabtoks{\x & \y \\ }% }%  \begin{tabular}{ll} \printtabtoks \end{tabular} \end{document}   Does not seem to work.     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))   (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))   ! Undefined control sequence. \  ->\let \reserved@e                           \relax \let \reserved@f \relax \@ifstar {\let \reserv... l.17 }         % ?


using ogr2ogr to import a shapefile into a PostgreSQL/PostGIS database

I am trying to load a shapefile into a PostgreSQL/PostGIS databases with the following statement run within the OSGeo4W shell ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=testing user=postgres password=12345" "D:/TEST_RUBBISH/mains_topo.shp"  I get the following warning which effectively preempts the failure of the insert operation  Warning 1: Geometry to be inserted is of type Multi Line String, whereas the layer geometry type is Line String. Insertion is likely to fail  I have been all over the internet and into the 'PostGIS in Action' book to try and work out how to resolve this but no joy so far Could anyone out there suggest a solution


I have my program using the Poppins font, that Win doesn't have by default, so I installed it and and used it in my project and everything worked fine. However, on another computer that doesn't have this font installed, it replaces it with some different font (Arial or something). How do you handle this problem correctly? Is it by making you program install that font on the user's machine or is there some way to compile the font with the program? Thank you for any advice.


How to remove all files from a directory?

The closest I've gotten is   # rm /path/to/directory/*.*   but that doesn't work for files that don't have an extension...


Can a charged 120v high voltage capacitor really kill you?

recently I have been hacking few psu and have to deal with some high voltage caps. It sort of scared me, but thinking about it, what is the chance of it really killing me.    Is it safe to touch one terminal of a charged and opened 120v cap? I mean the other terminal is opened, and connected to nothing, so there is no current flow, so it should be safe. Touching 2 terminals of a charged cap with one of your finger will give you a shock in your finger, but since no current go through your heart, it will not kill you. am I correct?  The only scenario a charged cap could kill you is when you touch one terminal with one hand, and other terminal with other hand, and the shock go through your heart. but still, what is the chance of that tiny 120v killing you if you are a health person. I think doctors use high voltage to save people.    Is a tiny 120v charged cap really that intimidating?


Does someone falling into a black hole see the end of the universe?

This question was prompted by . Notoriously, if you calculate the Schwarzschild coordinate time for anything, matter or light, to reach the event horizon the result is infinite. This implies that the universe ages by an infinite time before someone falling into the black hole reaches the event horizon, so could that person see the universe age by an infinite time?  To be more precise, suppose the observer starts falling from rest at time $t = 0$ and some initial distance $r > r_s$. If we wait for some time $T$ then shine a light ray at the falling observer. Will the light ray always reach the falling observer before they cross the event horizon? If not, what is the formula for the longest time $T$ that we can wait and still be sure the ray will catch the observer? If $T$ is not bounded it implies that observer could indeed see the end of the universe.  I can think of a qualitative argument for an upper limit on $T$, but I'm not sure how sound my argument is. The proper time for the observer to fall to the event horizon is finite - call this $\tau$. The proper time for the light ray to reach the horizon is zero, therefore the light ray will reach the observer before they cross the event horizon only if $T < \tau$. Hence $T$ is bounded and the observer won't see the end of the universe.  I think a more rigorous approach would be to determine the equations of motion (in the Schwarzschild coordinates) for the falling observer and the light ray, and then find the condition for the light to reach the falling observer at some distance $\epsilon$ from the event horizon. Then take the limit as $\epsilon \rightarrow 0$. In principle this seems straightforward, but in practice the algebra rapidly defeated me. Even for a light ray the radial distance:time equation isn't closed form (Wolfram claims it needs the $W$ function) and for the falling observer the calculation is even harder.


p:selectBooleanCheckBox does not work inside a p:dialog

I'm using PrimeFaces 5.3 with the following code:
                          <h:form id="dialogform">                         <h:outputText id="confirmlabel" value="Are you Sure you want to  #{reportRunnerNamedBean.currentCommand} ?" />
                                                      Check to send only missed emails:

                                                   </h:form>
   No matter what, the backing bean value for the sendMissedOnly is set to false. I have confirmed this by attaching a debugger.  I have even tried adding ajax to the box, it is still false every time, no matter if it is checked or not. Does p:selectBooleanCheckbox just not work in a dialog?


Implementing a feature to save in real time text written on mobile application

I suggest implementing a way to save the question/answer you are writing in case that accidentally the app get closed and being able to restore everything if it's wanted.  I was writing a text in which I spent some time writing it and suddenly the app closed. It was really frustrating and I think that it would be a really nice feature to implement


$(\mathbb{R}^n,d)$ metric space, $U \subseteq \mathbb{R}^n$ connected and open subset. Show that $U$ is also path-connected

I'm working on the following exercise:  Let $X=\mathbb{R}^n$ with the metric topology and let $U \subseteq \mathbb{R}^n$ be a connected and open subset. Show that $U$ is also path-connected.  It's kind of obvious, but I haven't been able to prove it.


How do i level up archery fast in skyrim?

I already readed lots of guides about how to level archery fast but after my level is hight enough i needs hours to level please help me my archery skill is 51


From what I've readed, a resistor is a component which limit the current in a circuit. Supposing that I've a load that is rated for 12v 500mA, if I put a resistor to limit the current to, for example, 100mA what will happen to the load that expect to draw more current? Will it drop more voltage?


What does it mean when a theorem can be proved without induction?

Recently I learned about interpolation with Newton polynomials and divided differences. Specifically we learned how $f[x_0,...,x_k] = \frac{f[x_1,...,x_k] - f[x_0,...,x_{k-1}]}{x_k - x_0}$, where $f[x_0,...,x_i]$ is the coefficient of $x^i$ of the unique polynomial of degree at most $i$ that interpolates $f$ at distinct $x_0,...x_i$. We were able to prove this by choosing an arbitrary $k$ and showing this theorem holds, without induction. I was wondering what is implied about a theorem that can be proved without induction vs a theorem that requires induction to be proved. Does this have any relation to complexity classes maybe?


Graph of Reputation Over Time for all linked accounts

How do I see a graph of a user's total reputation over time?


I know it's not anything but I just want to know how I lost that.  So what happened was I had 932. But now I have 930. I checked my reputation log for today but there wasn't anything on downvotes. I checked for answers but there was only 1 deleted answer and that had 0 score.


What do people mean by a "smooth but not analytic" function?

Can you give any examples? How does this relate to the Taylor series? Is it trye that all analytic functions are smooth, but not all smooth functions are analytic?


By default my system uses gcc 5.4.0 in ubuntu 16.04 to run a specific program l need to switch to gcc 4.8.  My question is the following :   How can l switch to gcc 4.8 before running the program and come back to gcc 4.8.4 once l've finished. The program l have to run is in python :  # what to do befor running the program # python3.6 main.py # how to come back to the gcc version by default    Here are the differents gcc version l have :  dpkg -l | grep gcc | awk '{print $2}' gcc gcc-4.8 gcc-4.8-base:amd64 gcc-4.9 gcc-4.9-base:amd64 gcc-5 gcc-5-base:amd64 gcc-6-base:amd64 gir1.2-packagekitglib-1.0 lib32gcc1 libcaca0:amd64 libgcc-4.8-dev:amd64 libgcc-4.9-dev:amd64 libgcc-5-dev:amd64 libgcc1:amd64 libpackagekit-glib2-16:amd64 libunity-action-qt1:amd64 libwebrtc-audio-processing-0:amd64 qtchooser qtdeclarative5-unity-action-plugin:amd64   EDIT1 Is it correct if l do the following  as suggested    Have l set that correclty ?  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 30  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 30  sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 40 sudo update-alternatives --set cc /usr/bin/gcc  sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 40 sudo update-alternatives --set c++ /usr/bin/g++   But l stack at the last command :  sudo update-alternatives --config gcc sudo update-alternatives --config g++   do l need to set that as :  sudo update-alternatives --config gcc-4.8 sudo update-alternatives --config g++-4.8   and when l want to come back to gcc 5 l set it to :  sudo update-alternatives --config gcc-5 sudo update-alternatives --config g++-5   Am l right ?   EDIT2 l need to run python3.6 with gcc 4.8.4 . The default gcc version of python3.6 is 4.4.7  root@ahmed-OMEN-by-HP-Laptop:~# python3.6 Python 3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 12:22:00)  [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information.   How can l change that ?


What is low latency kernel?  When do we need to use it? Any something may be affected when we use low latency kernel?


How do I get label of the selected item from a lightning:select drop down list?

I would like to get the value of the label of the selected drop down item.  In this case, the label is the Name of the Contact.  <aura:component>  <aura:attribute name="contacts" type="Contact[]"/>  <lightning:select label="Contact" aura:id="contactList" name="contactList">     <aura:iteration items="{!v.contacts}" var="c" indexVar="index">        <option value="{!c.Id}">{!c.Name}</option>    </aura:iteration>  </lightning:select>  </aura:component>   I know how to get the value:  component.find("contactList").get("v.value");   But how do I get the label?


Fire Adaptive Domain rendering like a solid cube

When I render I see a solid cube which is Adaptive domain. But it shouldn't show up. I feel like I missed something. It is my first time simulating fire.  Candle with a solid domain blocking the fire    The material seems to be plugged in to the volume already :/  Node setup


The expected value of days a miner will be stuck

A miner is stranded and there are three paths that he can take.  Path A loops back to itself and takes him 1 day to walk it.  Path B loops back to itself and takes him 2 days to walk it.  Path C is the exit and it takes him 3 days to walk it.  Each path has an equal probability of being chosen and once a wrong path is chosen, he gets disorientated and cannot remember which path it was and the probabilities remain the same.   What is the expected value of the amount of days he will spend before he exits the mine?  I was thinking that maybe it used the Geometric distribution but I don't think that accounts for the varying number of days. If someone could help clear this up it would be greatly appreciated!


Does $k+\aleph_0=\mathfrak{c}$ imply $k=\mathfrak{c}$ without the Axiom of Choice?

I'm currently reading a little deeper into the Axiom of Choice, and I'm pleasantly surprised to find it makes the arithmetic of infinite cardinals seem easy. With AC follows the Absorption Law of Cardinal Arithmetic, which states that for $\kappa$ and $\lambda$ cardinal numbers, the larger infinite and the smaller nonzero, then $\kappa+\lambda=\kappa\cdot\lambda=\max(\kappa,\lambda)$.  I was playing around with the equation $k+\aleph_0=\mathfrak{c}$ for some cardinal $k$. From the above, it follows that $\mathfrak{c}=k+\aleph_0=\max(k,\aleph_0)$, which implies $k=\mathfrak{c}$.  I'm curious, can we still show $k=\mathfrak{c}$ without the Axiom of Choice? Is it maybe possible to bound $\mathfrak{c}-\aleph_0$ above and below by $\mathfrak{c}$? But then I'm not quite sure such algebraic manipulations even mean anything, or work like that here. Certainly normal arithmetic does not! Thanks.


Prove the identity $\sum_{j=n}^N {j\choose n}={N+1 \choose n+1}$

I want a proof of the identity $${n \choose n} + {n+1 \choose n} + {n+2\choose n} +\cdots + {N \choose n} = {N+1 \choose n+1}$$ where $N\geq n$, by algebraic or combinatoric methods.


"Did you contacted them" or "did you contact them"

Did you contacted them?   Did you contact them?      Which of above sentences is correct? If both are correct, what's the difference between them?  In which scenarios can I use them?


When I share a question, say to my facebook or twitter, it gets tracked by the site. (I know it must, otherwise you wouldn't be able to provide badges for successful shares!)  Would it be possible to get some feedback on those shares other than badges? If I know what shares were effective and what ones were largely ignored, it will give me better feedback to share most effectively. If I've put three questions on my Facebook about [topic-X] and they all only get 3 or 4 hits, while the three questions about [topic-Y] all got like 20 or 30 hits, I know that I should be more inclined to share [topic-Y]. But unless I get a badge for it, I don't know anything about it. Furthermore, those badges are only available once, so the long-term feedback provided isn't much.  I've only just started sharing posts, but I'm quite interested in getting this feedback so that I know how effective it is. I'm thinking it could be a tab in the userpage or something like that.


If you hover just above the event horizon of a black hole, would you see the future of the universe?

Let's do this thought experiment. You have an insanely powerful rocket and it can accelerate to 0.999999c. Now you fly to a supermassive black hole and hover just above its event horizon, where the inner gravitational pull towards the singularity matches the outward thrust of your rocket.  Consider: 1. The black hole is non spinning, and doesn't distort space-time into swirling around it.   The black hole is so massive that above the event horizon, you are not sphagettified. The rocket can shield the energy of extreme blueshifted photons that bombard you.    At this point over the event horizon, you would see like 1 million or even 1 billion years of the universe in 1 second of your life, right? Can you witness the end of the universe if you hung around for long enough?  And what if the black hole evaporates by Hawking Radiation before that? Will you immediately return to real time?  PS: This is quite different from falling into a black hole. In this thought experiment, we are not crossing the Event Horizon of the black hole in a split second, but we are physically hanging in there for a long time by Counter Force.  Edit: I'm not sure why this question has been marked as a duplicate, but this differs vastly from an observer falling into a black hole, and nowhere else has it been answered so perfectly and succinctly, as done by Mr. Bob. Many thanks to him.


Fatal Exception: java.lang.NullPointerException error occured randomly while using application

Sometime application having crash issue and my crash log show me Error like this :    Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v4.util.SparseArrayCompat.size()' on a null object reference        at android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:570)        at android.support.v7.app.AppCompatActivity.onSaveInstanceState(AppCompatActivity.java:480)        at android.app.Activity.performSaveInstanceState(Activity.java:1495)        at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1316)        at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:5194)        at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4519)        at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4582)        at android.app.ActivityThread.access$1300(ActivityThread.java:218)        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1747)        at android.os.Handler.dispatchMessage(Handler.java:102)        at android.os.Looper.loop(Looper.java:145)        at android.app.ActivityThread.main(ActivityThread.java:6917)        at java.lang.reflect.Method.invoke(Method.java)        at java.lang.reflect.Method.invoke(Method.java:372)        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)   how to fix this error??  please help me thanks in advance.


Im getting an error trying to output an array in java

I have this line of code in my driver program.  System.out.println("The questions you missed were:" + exam1.questionsMissed());   and this method is supposed to output the questions missed throughout a test of twenty questions. totalIncorrect() returns the number of missed questions.  public int[] questionsMissed() {   int[] missed = new int[totalIncorrect()];   int i = 0;   int x = 0;   do   {      if (correct[i] != student[i])      {         missed[x] = i;         i++;         x++;      }      else      {         i++;      }   }while (i < 20);    return missed;   when i try to call on this method to output the missed questions i get something like   []@9e0bc08   usually a different combo of letters and numbers everytime. Can anyone help me resolve this issue ive been stumped on it for hours  first time actually posting to stack overflow so sorry if anything is difficult to understand


Citing Mathematical Proofs given on Math Stack Exchange

Good morning.  I recently posted a question on Math Stack Exchange  and got a fantastic solution.  The problem in question is one that I've had for some time, and both myself and research professor have been searching for proof of the claim both through papers and using mathematical techniques. It would appear that a particular solution to the problem has been found, though I must go through the proof with my professor to verify its truth.  If it is true, what is the protocol for citing the proof and giving the author credit?  Do stack exchange contributors post solutions knowing that their work may not be credited?  I would never want to plagarize, but the information is useful for the greater problems that we have been trying to solve.


Setup SSH public key for login without password

Today I have setup 3 servers (4 including the server sending the SSH commands) with a public SSH key so I can automate some scripts  It works on the 2 first systems but not on the third.. SSH still prompt for the password when sending a SSH command  Generate SSH public/private key on local server  root@local # ssh-keygen -t rsa file > /var/.ssh_keys/id_rsa passphrase > (empty) root@local # ln -s /var/.ssh_keys/id_rsa /root/.ssh/id_rsa   Append key to remote hosts from local server  root@local # cat /var/.ssh_keys/id_rsa.pub | ssh root@host 'path="/var/.ssh_remote_key" && mkdir -p $path && cat >> $path/authorized_keys && ln -s $path/authorized_keys /root/.ssh/authorized_keys'   Local server  # uname -a Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux  # sshd -V OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015   Remote servers (working)  # uname -a Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux  # sshd -V OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t  3 May 2016   Remote server (still prompting for password)  # uname -a Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux  # sshd -V OpenSSH_6.7p1 Debian-5+deb8u2, OpenSSL 1.0.1k 8 Jan 2015  CHMOD /root/.ssh = 0700 CHMOD /root/.ssh/authorized_keys = 0644


How to know from which number a missed call came, if the caller has multiple numbers?

In iOS 8.4.1, if a caller who has 6 numbers, calls you and you see a missed call. Then, clicking the "i" symbol next to the missed call showed you all the 6 numbers of the caller and the number from which he called, was indicated with blue. This helped in knowing exactly what number he called me from and I could call back on the same number.  iOS 9.0.1 call log does not indicate the number the caller called from with blue (if the caller has more than one number). So, it becomes impossible to call the person back on the same number.  This was one very important feature that made iOS 8 very useful. Apple has taken away a very important feature.


Proving that unconditional convergence is equivalent to absolute convergence

Regarding this discussion here:   (thank you for the great answers, by the way)  I'm still trying to do Exercise 3.2.2 (b) from  by Dr. Pete Clark.  The question states that for the set $S = \mathbb{Z}^{+}$, the series $\sum_{i\in S}x_{i}$ converges unconditionally if and only if it converges absolutely, i.e, $\sum_{i\in S}|x_{i}| < \infty$.  Thanks to the prior discussion, I get why unconditional convergence isn't simply the same thing as regular convergence in the case of $S = \mathbb{Z}^{+}$.  Unconditional convergence (to $x$) even allows for "cherry picking" of terms in the tail, rather than only being allowed to take them in order, and still reguires the resulting sums to stay within the $\epsilon$-band (of $x$).  (Again, thanks for the detailed answers to my previous question on this.)  My "best" attempt hits a brick wall:  Let $S = \mathbb{Z}^{+}$.  Write $S = S^{+}\cup S^{-}$, where $$S^{+} := \{n\in S : x_{n} \geq 0\}$$ and $$S^{-} := \{n\in S : x_{n} < 0\}$$  $(\Rightarrow)$ Now if I assume that $\sum_{n=1}^{\infty}|x_{n}|$ is not finite ( that is, the series is not absolutely convergent ),  I want to show that the unconditional convergence definition fails.  I want to try to construct arbitrarily large finite subsets $K$ of $S^{+}$ or $S^{-}$ such that $\sum_{i\in K}x_{i}$ is arbitrarily large, which would prove the contrapositive.  I think I can do it if one of $S^{+}$ or $S^{-}$ is finite, but this need not be the case.  Any advice or suggestions?  I feel like I hit a brick wall.  Edit:  I added the solution as an answer below for anyone who might have this same question.  Thanks all for the help.


how to show - ArrayList lista = new ArrayList()

I have small problem. I want to show all tables in my ArrayList  The code:  Integer[] numbers = {4, 7, 2, 1, 14, 23, 10, 5};   ArrayList<Integer[]> list = new ArrayList<>();      list.add(numbers);     list.add(numbers);     list.add(numbers);     list.add(numbers);      System.out.println(list.size());      show(list);     public static <T> void show(ArrayList<Integer[]> arg){     for (Integer[] i: arg){         System.out.println(i.toString());          }   All i see is:  [Ljava.lang.Integer;@60e53b93 [Ljava.lang.Integer;@60e53b93 [Ljava.lang.Integer;@60e53b93 [Ljava.lang.Integer;@60e53b93   Use toString to view all records?  Thank's for help.


Why aren't the zombies decomposed after all this time?

In The Walking Dead, the more we go through the seasons, the easier it seems to be to crush the zombies' head. The head literally explodes now with a hard hit.  This seems logical as after all this time, the zombies should be completely decomposed already.  So how are they even walking etc? The decomposition of their body should be in such an advanced state that any movement should make them break apart.  If the virus slows down the decomposition, how is it even possible? No blood is circulating, or anything, so I don't see how.