How to recreate the perspective and field of view of an existing photo?

Some days ago, I found myself in the middle of a much-used road to recreate a photo of the same scene from over a hundred years ago. The result is quite alright, but far from perfect.  What techniques, tools and tricks do photographers use who create perfectly matching modern equivalents of old photos? I haven’t found any tutorial online, so I ask you how to find   the right spot, the right focal length, and the right angle   ?


printing sql query result in a single line

I have two columns (groupID, memberID) in table and I execute following mysql query select `groupID` from `tbl_groupassign` where `memberID` = 'check1';  which prints column groupID but I want to show groupID in single row with each groupID separated by comma. For example I get following result by executing above query  groupID group1 group2  but I want show it as group1, group2


find Fourier transform on this given function the function is: $f(x)=e^{-\alpha x^2} , \alpha > 0$

im working on a PDE question. which states :  find Fourier transform on this given function the function is: $$f(x)=e^{-\alpha x^2} , \alpha > 0$$ we know that for Fourier transform : $$F(w)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} f(x) e^{-iwx} dx$$ so $$F(w)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-\alpha x^2} e^{-iwx} dx$$ how should I solve this ? I tried to simplify it but it just got more complicated.


Ways to put numbered balls in boxes no box being empty

I know the formula for putting $n$ identical balls in $r$ different boxes such that each box has at least 1 ball, but what is the formula for putting $n$ different balls in $r$ different boxes, no box being empty?  Thanks!


Prove $\sum_{n=0}^{N+1}P(n)(-1)^n\binom{N+1}{n}=0$ with degree at most $N$ of $P$

If $P$ is a polynomial of degree at most $N$, we have $$\sum_{n=0}^{N+1}P(n)(-1)^n\binom{N+1}{n}=0$$  I tried using pascal's identity $\binom{N+1}{n}=\binom{N}{n}+\binom{N}{n-1}$. I think that differences of polynomials might work.


What determines whether a magic item requires attunement?

As many of my players are into flavorful, unique magic items, I've been attempting to create some custom magic items. Most of them are fairly simple, a sword with an  extra 1d4 shock dmg, a broach that gives advantage to constitution saving throws, a staff that can be used as an everburning torch; stuff like that. One thing I've been having trouble figuring out though is which items should require attunement.      Is there some quality that determines if a magic item requires attunement?


Can I close my Epic Games launcher while downloading GTA V?

I'm installing GTA V right now, can I close the launcher and resume later? The launcher keeps asking me if I close all downloads will be canceled.


Prove that, for every natural number $n > 2$, there is a prime number between $n$ and $n!$. [Hint: There is a prime number that divides $n! - 1$.]


ED endings: Adjective or Past Participle in Perfect Tenses, Passive Voice and after To Be?

I'm having a hard time wrapping my head around this. In the passive voice, we could see sentences like these:     "The car is heated."      "His spirits are lifted."      "The books are packed." vs "The concert hall is packed."     "The wall is painted."  When such sentences are not in the past, I can't figure out how to identify if the final word is an adjective, a past participle or a verb.   In sentences using the perfect tenses, I understand that we use the past participle, but is this acting as an adjective or as a verb? Eg:      "He had been broken by the news."     "They've been bored since Friday." (This I'm pretty sure is the adjective, but I'm putting it in here for completeness)  I've read in some places that we should just call it a past participle and leave it at that, but this is more confusing to me. How can it be a past participle and not act as either an adjective or a verb? Surely it must be a participle acting as a verb or an adjective?  And in a sentence like: "The speaker wants to be transferred," am I right that this final word is an adjective because it is following "to be"?  I suppose this post is just illustrating my numerous questions about this. As you can see, I have many. If there are any resources out there that someone could refer me to, or if someone could offer a detailed explanation about this usage, I would be most grateful.   MA  *** EDIT: I'm supposed to edit this to explain why my post is not a duplicate of two other posts. I read those two other posts and found confusion in the comments  such that the question remains justifiably open for me, and I would suspect a lot of others out there. Specifically, I'm asking:  • Where can one find the rule book on this?• How does the Passive Voice change our assessment of whether it's a verb or an adjective?• How do the Prefect tenses change the way we assess whether it's a verb or an adjective?? Also, isn't is just a little weird that something so complex as participles would be corralled into just one answer on a system like this? Nobody seems to be able to give a straight answer on this, yet I'm supposed to consider retracting my question because it's like another question already asked (but not identical). I don't think that's productive and wonder why it doesn't thrust a dagger into the heart of what StackExchange is trying to do here. This isn't a question about python coding - it's a question of style, which can't be answered simply, judging by the responses to similar posts. You know when you intentionally use a double negative like "Well, it's not not desirable," and some twit shouts "Double negative!" like they caught you peeing in the pool? That's how it feels to have my question linked with those other posts. They're not the same. People are shouting "Same-zies!" before they really take a look at the differences between the questions. What a horrible place this would be if one unanswered question retracted the capacity for a more detailed question to be asked. The other posts don't provide the answer to my questions. At best they give me a little clue towards finding the right approach, but at worst they prove to me that this question confuses everyone and therefore should be asked again in order to resolve it.


Add a banner image after first post, across the WordPress website

I am looking for a way to add a banner image after first post across the website.  If it was about adding a banner on one page only, homepage or category page, then I could have done this in WordPress loop.  if ( $wp_query->current_post == 0 ) {    echo '

'; }   And this works but can't we do something with pre_get_posts or use some other function to achieve this across the website. On homepage, authors, archive, categories, search and tags pages.


Debugging a custom-bib bst file that crashes on book items

I created my own bibliography file with custom-bib (makebst), but when I run it with a reference to a book I get:  $ bibtex PhD [...normal output] Database file #1: PhD.bib You can't pop an empty literal stack for entry oecd2001brc while executing---line 1504 of file wdsphd.bst   The only thing on that line is a high-level ITERATE call.   The style was created with these options:  %% merlin.mbs  (with options: `head,exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}') %% english.mbs  (with options: `exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}') %% merlin.mbs  (with options: `tail,exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}')   The code for book items looks like:  FUNCTION {book} { output.bibitem   author empty$     { format.editors "author and editor" output.check     }     { format.authors output.nonnull       crossref missing$         { "author and editor" editor either.or.check }         'skip$       if$     }   if$   format.btitle "title" output.check   crossref missing$     { format.bvolume output       new.block       format.number.series output       new.sentence       format.publisher.address output     }     {       new.block       format.book.crossref output.nonnull     }   if$   format.edition output   format.isbn output   format.doi output   new.block   format.note output   fin.entry   write.url }   And this is the entry:  @book{oecd2001brc,  author = {OECD},  doi = {10.1787/9789264193550-en},  isbn = {9789264186903},  publisher = {OECD Publishing},  title = {{Biological Resource Centres: Underpinning the future of life sciences and biotechnology}},  url = {http://www.oecd-ilibrary.org/science-and-technology/biological-resource-centres\_9789264193550-en},  year = {2001} }   Is there a way to get a better stacktrace from bibtex? What I have now doesn 't really tell me what is going on. If it can be fixed simply, help would also be appreciated.


So basically I had a dual boot laptop, with Ubuntu 18.04 and Windows 10 Pro. So I had the Windows download from another source, I thought it was activated, but it's not. So now it's gonna be expired soon, I have a lot of files in it , but I use only Ubuntu all the time. So I use all windows just to install stuffs, because i had mistakenly partitioned it more. So all files are in my Windows and I use those files directly from Ubuntu OS. So what will happen if windows expire? Will all my files go? Or is there anything I can do to transfer all my data from Windows to Linux? Or is there any safe way to delete Windows manually without affecting any files?  PS: Need ways without the use of External hard drive


Why do we use ReLU in neural networks and how do we use it?

Why do we use rectified linear units (ReLU) with neural networks? How does that improve neural network?  Why do we say that ReLU is an activation function? Isn't softmax activation function for neural networks? I am guessing that we use both, ReLU and softmax, like this:    neuron 1 with softmax output ----> ReLU on the output of neuron 1, which is input of neuron 2 ---> neuron 2 with softmax output --> ...  so that the input of neuron 2 is basically ReLU(softmax(x1)). Is this correct?


Movie or TV film - full story happen on a military starship,

Almost 10 years ago I saw an English sci-fi film on a Hungarian TV channel. The story was about a military mission started from Earth to an alien planet to destroy the whole race. The full story happened on the same starship (mainly the conversations and the mood of the film was interesting). The leaders of the mission has only one eye, because one of their eye was exchanged to a special monocular computer interface. This interface was used to unlock secret codes. On the way to the alien planet some type of malfunction happened, and also some soldier died. Step by step, more army men died, and near to the end of film just a few people remained. They felt the mission is in danger and tried to save the situation. Finally only one young solder remained alive who launched the nuclear bomb carried by the starship to destroy the planet where the ship arrived. Unfortunately the ship arrived at Earth, because one alien lived with them on the ship and she reversed the ship at the middle of their travel. This enemy alien looked like a normal man, because the aliens made surgical operations on one of their female specimens, and converted her to a human appearance. Does anybody know the title of this film?


How can I sort all my questions by date or by time when they where asked?

How can I sort all my questions by date (by time) in that list that I get to after clicking on my user's name at the top of the screen (right after the envelope icon)?    Update:  I am sorry I forgot to mention that I want my questions to be sorted by the time they were asked, not by the time of their latest responds.   And also, I would want to be able to see the oldest questions at the top of the list (which means that the very first question that I ever asked on "StackOverflow" must be first from top).


Python Regular Expression MULTILINE Not Finding Anything

I have a string like   line = "... ... constant0 username@domain\r"   I need to extract domain  matchObj = re.match( 'constant\d+\s+(\w+)\@(\w+)', line, re.M|re.I)   matchObj  is always returning None. What is that I'm missing here?


Compiles and pops up the panelMain with the MenuBar. I am able to push Edit and go to subMenu where I click Preferences. It comes up with an error stating, "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException". What I am wanting to happen after clicking Preferences is to create a new JFrame which give me an option of choosing three different background colors for mainPanel.  I added a paint drawing of a diagram of what I am trying to create  P4App class  import java.awt.*; import java.awt.event.*; import javax.swing.*; public class P4App extends JFrame {     P4File fileFrame;     JPanel panelMain;     JPanel panelselect;     public P4App()     {         panelMain = new JPanel();         panelMain.setLayout(new BorderLayout());          JMenuBar menubar = new JMenuBar();         JMenu edit = new JMenu("Edit");         edit.setMnemonic(KeyEvent.VK_E);         menubar.add(edit);          JMenuItem pref = new JMenuItem("Preferences");         pref.setMnemonic(KeyEvent.VK_P);         edit.add(pref);          setJMenuBar(menubar);          this.setSize(400,150);         this.setLocation(400,200);         panelMain.setBackground(Color.RED);         this.setVisible(true);         this.setDefaultCloseOperation(EXIT_ON_CLOSE);          fileFrame = new P4File(this);         pref.addActionListener(new ActionListener() {                 @Override                 public void actionPerformed(ActionEvent e) {                     remove(menubar);                     remove(pref);                     add(panelselect);                     revalidate();                     repaint();                 }             });     }      public static void main(String [] args) {         new P4App();     } }   P4File class  import java.awt.*; import java.awt.event.*; import javax.swing.*; public class P4File extends JFrame  {     JRadioButton radiored;     JRadioButton radioblue;     JRadioButton radiogreen;     JPanel panelMain;     JButton buttonok;     JButton buttoncancel;     JPanel panelselect;     JPanel pbuttons;     P4App parent;     public P4File(P4App parent)     {         super("P4File");         this.parent = parent;          ActionHandler actionHandler = new ActionHandler();          panelselect = new JPanel();         panelselect.setLayout(new GridLayout(4,1,5,5));          panelselect.add(radiored = new JRadioButton("Red"));         panelselect.add(radioblue = new JRadioButton("Blue"));         panelselect.add(radiogreen = new JRadioButton("Green"));          ButtonGroup group = new ButtonGroup();         group.add(radiored);         group.add(radioblue);         group.add(radiogreen);          panelselect.add(radiored);         panelselect.add(radioblue);         panelselect.add(radiogreen);          pbuttons = new JPanel();         pbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT,2,2));         pbuttons.add(buttonok = new JButton("OK"));         pbuttons.add(buttoncancel = new JButton("CANCEL"));          panelselect.add(buttonok, BorderLayout.SOUTH);         panelselect.add(buttoncancel, BorderLayout.SOUTH);          buttoncancel.addActionListener(new ActionListener() {                 @Override                 public void actionPerformed(ActionEvent e) {                      panelMain.setBackground(Color.RED);                     System.exit(0);                 }             });     }      private class ActionHandler implements ActionListener     {         public void actionPerformed(ActionEvent e)         {             setColor();         }     }      public void setColor() {         if(radiored.isSelected())         {             setBackground(Color.RED);         }          if(radiogreen.isSelected())         {             setBackground(Color.GREEN);         }          if(radioblue.isSelected())         {             setBackground(Color.BLUE);         }     } }


I need to prove that   $$\lim_{n\to \infty} \sum_{k=1}^n \frac{n}{n^2 + k^2} =  \frac{\pi}{4}$$  using definite integrals. I would like to get a explanation about to do it , and whats the reasons. thanks!!


Can `Phone Calls` application permission allow developer to read my contact book?

I wonder if other people can read my contact list when the app permission(s) has Phone Calls permision like below snapshot.


I'd like to change the behaviour of the launcher, so that if I click on the firefox icon, it runs the command   $ optirun firefox   Does anyone know how to change it?  Thank you


Applying for schengen Visa with a new passport: old passport has US F1 visa without name change

I am going to change the name on my Indian passport from Given Name:ABC XYZ, Surname: "Blank" ----> Given Name:ABC, Surname: XYZ. My US F1 student visa will remain on my old passport with the old name. As far as I've read, this should not cause issues while re-entering the USA as I will have proof of the name change.   The question I have is regarding an application for Schengen Visa (at the Slovenian embassy in the US): will they accept my US F1 visa with the old name as a proof of stay in the United States? Will having these two passports cause problems for getting the Schengen visa?


If the magnetic force doesn't do work then what does it?

Let's assume I have a conductive rod with mass $m$ and with steady current $I$. I can make the current flow in such a direction and magnitude that the magnetic force will make it move up, thus something is doing work on the rod. But it can't be the magnetic field since it's perpendicular to the direction of motion.  I still don't understand; what is doing work on the rod?


I can't get an accurate rounding to 4 decimals

I'm getting this formula, represented in values:  value = 0.0343 + (9 * 1.45/1000);   This gives this result: 0.047349999999999996  If I try to round it to 4 characters, it whould be 0.0474, but the nearest I can get in javascript is 0.0473  Searching for solutions on the web, I've found nothing that helps. These are some possible solutions I found:  value = Math.round(value * 100000) / 100000;   // still gives 0.0473   This function, which still gives 0.0473:   function round (value, decimals) {     return Number(Math.round(value+'e'+decimals)+'e-'+decimals); };   Or the solution presented here:  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round  // Closure (function() {   /**    * Decimal adjustment of a number.    *    * @param {String}  type  The type of adjustment.    * @param {Number}  value The number.    * @param {Integer} exp   The exponent (the 10 logarithm of the adjustment base).    * @returns {Number} The adjusted value.    */   function decimalAdjust(type, value, exp) {     // If the exp is undefined or zero...     if (typeof exp === 'undefined' || +exp === 0) {       return Math[type](value);     }     value = +value;     exp = +exp;     // If the value is not a number or the exp is not an integer...     if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {       return NaN;     }     // Shift     value = value.toString().split('e');     value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));     // Shift back     value = value.toString().split('e');     return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));   }    // Decimal round   if (!Math.round10) {     Math.round10 = function(value, exp) {       return decimalAdjust('round', value, exp);     };   }   // Decimal floor   if (!Math.floor10) {     Math.floor10 = function(value, exp) {       return decimalAdjust('floor', value, exp);     };   }   // Decimal ceil   if (!Math.ceil10) {     Math.ceil10 = function(value, exp) {       return decimalAdjust('ceil', value, exp);     };   } })();   which gives 0, if I call:  Math.round10(value, 1);   Any other suggestion?


Relationship between Gram determinant and cross product

I am trying to prove that the determinant of the Gram matrix is equal to the norm of the cross product squared for $v_1, v_2 \in \mathbb{R}^3$: $$\|v_1 \times v_2\|^2 = \det\Bigl(\begin{smallmatrix} \langle v_1, v_1 \rangle & \langle v_1, v_2 \rangle\\  \langle v_2, v_1 \rangle & \langle v_2, v_2 \rangle \end{smallmatrix}\Bigr)$$ But the only idea I have seems very technical and unpleasant, any suggestions? I have already seen  thread but I don't find it helpful.


Time-evolution operator written through a commutator

I found this expression for the time-evolution operator: $$\begin{split} U(t) & = T_{\leftarrow}\exp\left[-i\int_0^t ds H(s)\right] \\ &= \exp\left[-\frac{1}{2}\int_0^t ds\int_0^t ds' [H(s),H(s')]\theta(s-s')\right]\exp\left[-i\int_0^t ds H(s)\right]\end{split}$$ with $H$ Hamiltonian and $\theta(s-s')$ the Heaviside step function. The commutator of the Hamiltonian at two different times is a c-number function, I don't know if it's important. Does anyone know how to get the last part?


Delete account option missing after changing the profile page recently

I would like to delete the account on Stack Overflow? I have not found any option there after changing the profile page design. How do I delete the account on Stack Overflow?


In  the answerer accused me of downvoting his answer, just because I made comments that his answer doesn't really address what I think was the real intent of the question.  I actually downvote very sparingly. I only downvote answers when they're outright wrong and misleading. But since I frequently make comments (which I hope will be taken constructively), posters often assume I'm also the one who downvoted them.  Is there some way for non-moderators to tell who voted on a question or answer, so I can prove that it wasn't me? Is it in SEDE?


I have this javascript-code:  $('.get_summary').click(function(ev){     alert("get_summary"); });   html-buttons with that class are created dynamically in javascript.  With firebug I can see that the button got the class "get_summary". However, when I click on the button nothing happens. Neither any error in the console are written.  Looking at "Events"-panel in chrome I see that the button is actually not listening to any event. Why? I put an alert in the file where the class got bind to a function. And the alert shows up. I really dont know where I should look to understand why the class is not listening to the function.


I have directory that contains some symbolic links:  user@host:include$ find .. -type l -ls 4737414    0 lrwxrwxrwx   1 user group       13 Dec  9 13:47 ../k0607-lsi6/camac -> ../../include 4737415    0 lrwxrwxrwx   1 user group       14 Dec  9 13:49 ../k0607-lsi6/linux -> ../../../linux 4737417    0 lrwxrwxrwx   1 user group       12 Dec  9 13:57 ../k0607-lsi6/dfc -> ../../../dfc 4737419    0 lrwxrwxrwx   1 user group       17 Dec  9 13:57 ../k0607-lsi6/dfcommon -> ../../../dfcommon 4737420    0 lrwxrwxrwx   1 user group       19 Dec  9 13:57 ../k0607-lsi6/dfcommonxx -> ../../../dfcommonxx 4737421    0 lrwxrwxrwx   1 user group       17 Dec  9 13:57 ../k0607-lsi6/dfcompat -> ../../../dfcompat   I need to copy them to the current directory. The resulting links should be independent from their prototypes and lead directly to their target objects.   cp -s creates links to links that is not appropriate behavior. cp -s -L refuses to copy links to directories cp -s -L -r refuses to copy relative links to non-working directory   What should I do?


Equation of a line maintaining equal ratio distance between two points.

Say I have two points. One at $A = (0, 0)$ and another at $B = (0, 10)$. I wish to derive an equation for a line that, for any point $P$ on the line, would equal a set ratio for the distance $P$ to $A$ and $P$ to $B$.  This is easy if the predetermined ratio for $A:B$ is $1:1$. I would create a line from $A$ to $B$, find its midpoint, then create an orthogonal line at the midpoint. Then at any $P$ on the line I know that the ratio distances from $P$ to $A$ and $B$ will be $1:1$.  But what if the ratio for $A:B$ is something like $11:18$?  This is for a positioning algorithm I am implementing - not for homework :)  EDIT: Note - If an exact formula is not possible, an approximation of the line out to $\pm 200$ from $A$ or $B$ is acceptable as values further from $A$ and $B$ will not be utilized anyway. A linear equation for the final result/approximation is ideal for speed in running multiple computations.


by setting a page, to "register" users into a mysql database, and using the following code:  $name = $_POST['name']; $saltedpwd = md5($definedsalt.$_POST['pwd']); $email = $_POST['email'];  $query = "INSERT INTO `users` ( `name`, `pwd`, `email` ) VALUES ( '$name', '$saltedpwd', '$email' )"; $insert = mysqli_query($database, $query);   is it vulnerable to any possible SQL injections?  About the email activation code, using this code:  $address = $_GET['email'];  if (isset($_GET['val']) && (strlen($_GET['val']) == 64)) { $validate = $_GET['val']; }  if (isset($address) && isset($validate)) { $query = "UPDATE users SET activated = 'true' WHERE ( email ='$address' AND validate='$val' ) LIMIT 1"; $result_query = mysqli_query($database, $query);  $get_member = ($database, "SELECT name FROM users WHERE email = '$email'"); $query_get = mysqli_fetch_array($get_member); $validated_name = $query_get['name']; $insert_validate = "INSERT INTO `member` ( `name` ) VALUES ( '$validated_name' ); $result_insert = mysqli_query($database, $insert_validate);   Is it then vulnerable to any SQL injections? I suppose yes, because I have to retrieve the value from a $_GET request, so I guess them are allowed to put something like:   page.php?email=address@address.com'SQL_INJECTION'&val=123456asdfghjkl   Am I wrong?  If it is actually vulnerable, how do I prevent any injections?


How to use OAuth only for login, not create account unless the user wants one

I have a lovely OAuth setup so people can use facebook to register for my force.com site.    It works great for new users, or for existing users where facebook email matches their account.    There's a field on the Auth Provider page called "Single Sign-On Initialization URL" that's used as the link for the registration button and the login button in the salesforce documentaiton.  But if someone clicks the Login button (custom login page) it's linking to the "Single Sign-On Initialization URL" from my Auth Provider.    What I'd like to do is return "no account found...would you like to create one?"  What I'm trying to prevent is people trying to sign on with facebook who already have accounts UNDER A DIFFERENT EMAIL on my portal and then it creates a duplicate account for them.  By letting them know the account doesn't exist, they could know they need to login the old way and use that "link" option.  Otherwise, they'll be wondering why that have to do new user setup, where all their data is, etc.  Here's the flow  1  Login via facebook/OAuth  2a If it's an existing user, login them in.  2b If it's a new user, direct them to the registration page.  There, they can set up an account via facebook OAuth (what the login button is currently doing now).  That way, if they know they have an account already, we can help them with linking it.  The only solution we have so far is to have the Registration handler prevent registration.  But I only want it to prevent registration from the login page, not from the registration page.


What are the differences between a table type and a table variable in MS SQL

Are there differences between a table variable and a table type in Microsoft SQL Server? Or is a table type just a table variable that is defined once for broad usage?


I had a question which is as follows:Number of words of 4 letters formed using the word IITJEE.The book says the answer as coefficient of $x^4$ in  4!$\mathrm{[1+ \frac {x}{1!}+\frac{x^2}{2!}]}^{2}[1+x]^2$.My question is where did this  $\mathrm{[1+ \frac {x}{1!}+\frac{x^2}{2!}]}^{2}$ come from?


PuTTY - Automatic Reconnect After Internet Interruption?

After a small hiccup in internet connection, any open PuTTY windows throw up a message box saying there was a connection error.  Is there a way to automate retry attempts?  Or better yet, tell it to watch the status of the network and reconnect when internet access is reestablished?  I know there's the "stackoverflow" solution of writing a program that invokes PuTTY using its command line interface using -load and -pw.  But I'm looking for a "superuser" solution because that seems like less work.  Should I look into Tunnelier instead?  Background: I'm using an SSH tunnel with port forwarding to get remote access to a database on BlueHost.


What are the advantages and disadvantages of using the GAC?

And on top of that, are there cases where one has to use the global assembly cache or where one cannot use it?


Entity component system, Communication between components

I am trying to implement ECS for my simple 2D game. I would like to ask a question about how components should communicate between themselves and with entity.  I tried to implement few components, like SpriteComponent, MoveComponent, CollisionComponent, etc.. What is the appropriate way of communication between these components? E.g. my Sprite & Physics components need to know about current position, which is affected by Move component. I gave every single of my components handle that refers to the entity, which they can send to engine and call different functions, like updatePosition(EntityHandle handle, float x, float y). Is this the right approach?


inviting friends to SO: give them a head start credit!

SE reputation and privileges system is well balanced: we do not trust new users we know nothing about until they earn the community trust by participating in SE activities.  However, sometimes for new users it is very difficult to get started as the basic privileges are very restrictive. For example, a colleague of mine, a brilliant programmer, hesitated when I encouraged him to use SO because of this barrier placed to guard SE from unknown users.  I propose a new feature: "an invitation to SE", a trusted user (X reps and up) will get a bank of invitations he/she can use to invite people they know and trust. A new user that was invited will start with enough reputations (I believe 15) so that he has no "new user restrictions", (instead of 1) reflecting the fact that by invitation he is not a stranger to the community and deserve to be trusted with some privileges.   I believe a somewhat similar "invitations" mechanism was installed recently in SE careers website.    UPDATE: (Aug 6th,2015) Regarding concerns raised by : - a "walk-in" user cannot be trusted at first because we don't know him, in contrast we (or at least someone) knows the "invited" user and believe he/she can be trusted to a certain extent. Maybe trusted just enough to remove the "new user" restrictions. - I don't think invited users deserve the rep-boost, but it's the easiest way I could think of to remove the "new user restrictions" -- if you have another way of achieving this goal it should be just as good for this feature. - The most significant barrier is the restriction on leaving comments: during the time I am active is SO, this restriction was the most "painful" for new users. - How to prevent "abusing" of this mechanism? well, first, I think "invitation" privileges should be given only to "trusted users" (I believe 20K reps and up). These users care about SE, knows how it works and we trust their judgement when they invite users that can contribute to the community. Second, there will be given only a restricted amounts of invitations per trusted user to "hand out", he/she should only get more if the users that he/she invited are indeed "good" users (i.e., gained extra X reputation over T days). Thus we can control the amount of invitations that can be handed out. If this features works well more invitations can be given to trusted users.      Status: (Aug 13th, 2015) Judging by the answers/comments/downvotes I guess that's a "no" for this feature request. Well, was worth trying pushing this idea. I appreciate the feedback. Thanks.


Tranfer/transit via Schengen area with 2 separate tickets and no visa

I'm Russian. I have no Schengen visa. I want to buy a ticket going via Schengen Area with a transfer less than 24 hours. A transfer will take place in an international airport of Germany, or Spain or some others. I have several options.  The thing is, it'll be an international airport with a transit zone and I won't leave it.  If I buy a normal a single ticket, there'll be no problem with the transfer or transit. For instance, Brazil - Portugal - Turkey.   However, I've discovered that the price of 2 separate tickets on the same route with the same tranfer and duration will be cheaper, around 2 times.  The tickets may be even of different airlines. Still, the condition will remain: no chaning of an airport,  no leaving the transit zone, the duration of transit will be less than 24 hours.  Now, people tell me that in case of 2 separate tickets I'll face a problem with boarding. That is, the 1st airline will take into account only the 1st ticket and neglect the 2nd one. For some unclear reason.   Because those would be 2 separate tickets, possible of different airlines. Or even of the same airline, but if they're 2 physically separate ones, there would be a problem.  For an airline it'd look like as if I travelled only half-way, with a single, one-way ticket to Schengen Area. And, therefore, it'd reject to board me in the beginning.  Is this true? If so, what is the rule what doesn't allow to travel with 2 separate tickets via Schengen? And only allows to have single physical one  Is this according to Timatik in the first place?  Note, that I don't take into accout a checked-in baggage - I may have none. Therefore, for the sake of simplicity, suppose I won't have it.


how to stop ubuntu from auto mounting my phone?

I am using USB cable to charge my phone, however, ubuntu auto mount my phone and show the files in it. How could I stop this?


Integral of pdf and cdf normal standard distribution

$$ \int_{-\infty}^{\infty}\Phi(a+bx)\phi(x)dx=\Phi\left(\frac{a}{\sqrt{1+b^2}}\right) $$  I have a problem with showing the above result, where $\phi(x)$ and $\Phi(x)$ respectively are the pdf and cdf of the standard normal distribution. I've tried to prove it by calculating the pdf $\phi(a+bx)$ first and combine it with the pdf $\phi(x)$ but the result is complicated and doesn't yield $\phi\left(\dfrac{a}{\sqrt{1+b^2}}\right) $ . I really need your help. Thanks.


C-language Same code different result in main and in function

I have tried 2 ways to code length of an array one works the other not and I just don't understand what's the problem. First one works, secon not. This works: #include<stdio.h>    int main(void)   {     char array[] = {'r', 'o', 'c', 'k', 'n', 'r', 'o', 'l', 'l'};      int length = sizeof(array) / sizeof(array[0]);     printf("Length is %d\n", length);     return 0; }  This doesn't work, it always gives me 4. #include<stdio.h>   unsigned int arraylen(const char *array) {      unsigned int length = sizeof(array) / sizeof(array[0]);     return length; }  int main(void) {     const char array[] = {'r', 'o', 'c', 'k', 'n', 'r', 'o', 'l', 'l'};     unsigned int length = arraylen(array);     printf("Length is %d\n", length);      return 0; }


Exit php script somehow, but keep it running

I have a PHP script running which is taking hours, and I have to close my computer. I ran the script using php script.php.  Is there any way I can close this script while keeping it running? (It's running on a server)  I am connected to the remote DigitalOcean server via SSH on my Mac.  Note: What I'm trying to achieve is not killing the process, but continuing the process. I know I should have used screen or nohup, and that's my bad I didn't do it before.  Is the only solution not terminating the session by not closing my computer?  Ps.: Not a duplicate of the other question that someone link to. You can see that the correct answer to my question is different than the correct answer of the other question as well. Problem here is keeping a script that's running under my user running even though exiting the session.


Any simple way to share constants between helper methods in a Lightning Component?

With events being fired and also handled in a helper, I have multiple copies of simple constants and so there is some risk of silent failure due to typos.  Given the helper functions are defined as properties of an object, it appears possible to define constants in the same way and reference them via the helper instance:  ({     ADD_ACTION : 'ADD',     EDIT_ACTION : 'EDIT',      onRowAction : function(component, event, helper) {         var action = event.getParam('action');         switch(action.name) {             case this.ADD_ACTION:                 ...             case this.EDIT_ACTION:                 ...         }     }, })   But is there a better way to share constants between helper methods in a single Lightning Component?  PS  itzmukeshy7's use of objects to group the constants is a nice refinement:  ({     actions: {         ADD: 'ADD',         EDIT: 'EDIT'     },      onRowAction : function(component, event, helper) {         var action = event.getParam('action');         switch(action.name) {             case this.actions.ADD:                 ...             case this.actions.EDIT:                 ...         }     }, })


Run time error 1004 when the sheet is protected

I am new with VBA My worksheet works as normal with the command button. When i tried to protect my worksheet, right click on the worksheet tab and selected protect sheet with password. Once i completed it, i generated my command button in the worksheet, it showed error as below  I did not use any code for protection but right click on the worksheet and clicked on protect sheet. It worked to other sheets except the sheet I am using command button. The code I used for the command button works well when the worksheet is not protected as below. Sub Hide_Unhide()      If Range("A4").Value = "Yes" Then         Rows("4:4").EntireRow.Hidden = True     Else         Rows("4:4").EntireRow.Hidden = False     End If          If Range("A5").Value = "Yes" Then         Rows("5:5").EntireRow.Hidden = True     Else         Rows("5:5").EntireRow.Hidden = False     End If      End Sub


objects distorted by the earths curvature

We are doing a project where we hope to make people think about the fact that the earth is round.   We want to imagine if we in London could see others places in the world and how the earths curvature would distort them.   We want to make chairs.   How would we make this exact ? We are trying to find the degree of curvature of certain places in relation to london. We hope to distort a model of a normal chair in software like CAD by inserting a 'degree of curvature' .   Can you help with this ???


Why is it in a company’s interest to have high stock prices?

I understand that it is in the interest of a company to sell shares initially: It is a good way to get money to invest and grow.  But once the shares are “out there”, why should the company care about their value? Is there any concrete benefit to the company of its own shares rising in price?  (This is, in a way, the dual question to .)


Need to delete a directory with name '~' created accidentally

I don't remember exactly how this directory got created. It's name is ~, the alternative we all use for home diretory. I also see a sticky bit attached with this directory. How shall I delete it? I fear running a normal rmdir would delete all the files from the home directory recursively. Here are the details :  mtk4@laptop:~/temp$ ls -l total 4 drwxrwxr-t 2 mtk4 mtk4 4096 Oct 17 2011 ~   How shall I proceed?  Another question : What does the total number specify on the first line of output of ls -l ? '4' in this case. There is just 1 directory as shown(other than . and ..).   I am using ubuntu 12.04.  Also asked same question on , as it seems to be relavant on both sites.


I'm trying to add an entity form in Ctools popup. I'm using this module  . My entity form path is like this eform/submit/quote  module docs say use this as link  modal_forms/%ctools_js/eform/submit/%entityform_empty  I'm really lost how to put my quote entity form here according to that link.


Use of ground symbols in circuit diagrams

In  is the following diagram for a voltage booster intended for small battery powered devices    The  says GND is control/logic ground and PGND is power ground but this isn't reflected in the symbols chosen in the diagram. I'm also puzzled why the link to earth is shown on GND rather than on PGND.  From  it seems that various parts of the above circuit are to be tied to chassis ground and not to (say) digital/common/signal/control/logic ground.    Why specify chassis ground? Am I wrong in interpreting that as the metal part of an enclosure which is (usually) tied to earth through the mains electrical connection for safety purposes.  I have looked at similar questions here† but am still puzzled by the choice of symbols on the example circuit.  Why are these particular symbols used in this circuit diagram?  † Related questions


Mysterious cord running from wall. Safe?

My wife and I are preparing to sell our home and are discovering some weird things. Our home was built in 1958, so it is older. We found this in a corner that had some furniture in front of it.   We are wondering    What kind of wiring is this?  Is it safe to handle or remove?


My younger brother (10) likes to play Garry's Mod, but when he plays online, he sees lots of bad words in the text chat. Is there a way he can play online, but with the text chat disabled? Or if that's not possible, can I set it up so that the profanity is filtered out?


I'm wondering (since it just happened to me), is it possible to "cancel" ("undo", "delete", "retract", whatever) a flag I just raised if I misclicked it, so the mods won't waste time?  I looked everywhere, but I can't find such a feature.


I came across something really strange today in class. Because it was an anecdote, the story changed from past to present. Then, in the same sentence, the writer used the past perfect tense with the present tense.     "I go into the room, and see the guy take my bag that I had left there."   Can this possibly be correct?


Using a selectRadio list to set the value of individual checkbox fields

I have a VF page on the Account.  I have set up 3 radio selections using apex:selectRadio and a Script.  I would now like to populate custom fields on the Account (Field1__c, Field2__c, Field3__c) with the radio selection the user chose. These fields are checkboxes.  Does anyone know how I can do this?  Thanks,  <apex:page standardController="Account" tabStyle="Account">      <apex:form id="theForm">     <apex:actionRegion >

                              <apex:selectRadio layout="lineDirection" styleClass="radioClass" onclick="TypeSelect(this);">                     <apex:selectOption itemLabel="Amp" itemValue="Amp"></apex:selectOption>                     <apex:selectOption itemLabel="Eng" itemValue="Eng"></apex:selectOption>                     <apex:selectOption itemLabel="Age" itemValue="Age"></apex:selectOption>                 </apex:selectRadio>                     <apex:inputHidden id="AmpVal" value="{!Account.Amp_Account__c}" />                     <apex:inputHidden id="EngVal" value="{!Account.Eng_Account__c}" />                     <apex:inputHidden id="AgeVal" value="{!Account.Age_Account__c}" />                 <apex:actionSupport event="onchange" reRender="Detail"/>


I have installed Ubuntu os in my macbook Pro mid 2012 in 100gb partition storage. Today I want to delete that partition so I was using terminal for that but due to some mistakes by mac os get deleted and when I power on my macbook it shows question mark folder so I boot it in internet recovery mode but when I go to disk utility to first aid my disk it shows that disk0s2 is not mounted nothing happens when I click on Mount.... please help me what I have to do


Warning! Legacy WGL is unable to select between different OpenGL versions

I was using blender 2.76b on a Windows 7 Ultimate, and nothing really weird showed up when I opened blender and the cmd window appeared, before the blender window appeared.  I updated it to 2.77a, and now in the cmd window, it says:     Warning! Legacy WGL is unable to select between OpenGL versions.   Is this a big issue that I would want to fix, or would it not matter?  If I should fix it, how should I fix it?  System specs:   Laptop: Samsung Sens R410  OS: Windows 7 Ultimate, was Windows Vista Home Premium OEM (according to the sticker on the underside)  CPU: Intel Pentium Merom T2390 Dual Core 1.87 Ghz  RAM: Installed 5Gb, but can only use 2.75Gb 667 MHz  GPU: ATI Radeon X1250 with 256Mb memory with a weird driver that has OpenGL  issues. The 3d cursor moves when I drag the arrow to move an object in the 3d viewport. I think this is because I am using Vista drivers, and there are no drivers for windows 7.


PDF reader suggestion in Ubuntu 17.10 (that supports wayland session)

The default PDF reader in Ubuntu doesn't support bookmarking pages, writing notes and underlining text. Because I need this I am looking for another PDF reader.   I was trying to install Adobe Reader but it did not work. Anyone got any good PDF readers to suggest, or a working procedure to get Adobe Reader installed on 17.10?


Regarding program startup in the standard

I have a couple of questions regarding § 5.1.2.2.2 in the standard.        The function called at program startup is named main. The implementation declares no prototype for this function. It shall be   defined with a return type of int and with no parameters:       int main(void) { /* ... */ }      or with two parameters (referred to here as   argc and argv, though any names may be used, as they are local to the   function in which they are declared):       int main(int argc, char *argv[]) { /* ... */ }      or equivalent;10) or in some other   implementation-defined manner.      What does "some other implementation-defined manner" refer to? Does it refer to footnote 10, which states:     Thus, int can be replaced by a typedef name defined as int, or   the type of argv can be written as char ** argv, and so on.   ...or the actual definition of main? If so, does this mean that given a certain implementation, the compiler can say main should be defined however it wants (this runs contrary to what I've read on the internet saying it must be int main. For example, in § 5.1.2.2.3 it states:         If the return type of the main function is a type compatible with int, a return from the initial call to the main function is equivalent   to calling the exit function with the value returned by the main   function as its argument;11) reaching the } that terminates the main   function returns a value of 0. If the return type is not compatible   with int, the termination status returned to the host environment is   unspecified.      ...which seems to leave a lot of leeway to the implementation.     — The parameters argc and argv and the strings pointed to by   the argv array shall be modifiable by the program, and retain   their last-stored values between program startup and program   termination.   What does "retain their last-stored values mean"? Does this mean functions like  violate the standard because they permute argv?


Can I use it to refer to everything. An example:  I took everything out of the washer and put it in the dryer.


Assume that G is of order 4 (not a cyclic group) find all its subgroups.

I know that the cyclic group it contains at least one element that generates the group itself


How to remove a loaded class from classloader?

My situation is like this - two test cases, let's say TestA and TestB need to run in different env. However TestA goes first, it will dynamically compile some generated codes, add them in classpath and then load them. On the contrary, TestB need a clean env which does not include previously loaded classes.  Is there anyway to do that? Clean up classloader, remove specific loaded class?


Let $A, X_0 \in \mathbb{R}^{n\times n}$ and $det(A) \ne 0$.  Define the following reccurence: $$X_{k+1} = X_k + X_k(I-AX_k)$$  Prove $$\lim_{x \rightarrow \infty} X_k = A^{-1} \iff \rho(I-AX_k) < 1$$ where $\rho(B)$ means the biggest eigenvalue (in abs value) of the matrix $B$.  Any hints on how to prove it?


problem updating ubuntu 20.04.1 on Raspberry Pi 4 -- error refers to apt-secure (8) manpage

ubuntu@ubuntu:~$ sudo apt update Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease Hit:2 http://archive.canonical.com/ubuntu eoan InRelease Ign:3 http://ports.ubuntu.com/ubuntu-ports eoan InRelease Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease Ign:5 http://ports.ubuntu.com/ubuntu-ports eoan-updates InRelease Hit:6 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease Hit:7 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease Ign:8 http://ports.ubuntu.com/ubuntu-ports eoan-security InRelease Err:9 http://ports.ubuntu.com/ubuntu-ports eoan Release   404  Not Found [IP: 91.xxx.xx.152 80] Err:10 http://ports.ubuntu.com/ubuntu-ports eoan-updates Release   404  Not Found [IP: 91.xxx.xx.152 80] Err:11 http://ports.ubuntu.com/ubuntu-ports eoan-security Release   404  Not Found [IP: 91.xxx.xx.152 80] Reading package lists... Done E: The repository 'http://ports.ubuntu.com/ubuntu-ports eoan Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ports.ubuntu.com/ubuntu-ports eoan-updates Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ports.ubuntu.com/ubuntu-ports eoan-security Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. ubuntu@ubuntu:~$


Can an irrational number raised to an irrational power be rational?  If it can be rational, how can one prove it?


describes how you can use the debootstrap utility to install a base Debian unstable/sid system on an existing Linux machine. The new install is accessible using chroot.  When doing this, what security issues should be kept in mind? For example, what needs to be done to stop background/startup processes from starting in the new chroot or otherwise interfering with the main system?


I am looking at collecting spatial information from a range of stakeholders to identify opportunities within a landscape.  However, the data that we are collecting are not presently mapped and so we wish to use an interactive method to get this information onto a map.  Which online websites/methods would people recommend for circulating to a non-technical audience to try and get them to map what they know?    Where the emphasis is on ease of use by the stakeholder.


I am a beginner and I am trying to use things that I have learned so far. I wrote this code and supposedly must return the message "You have found the lucky number" if the number you give it's one of the numbers array. I used the String.valueOf() method so I can get the hang of it.  The problem is, even if I give a number that is in the array I get the message "YOU HAVEN'T FOUND THE LUCKY NUMBER". I can't understand what is wrong.  Thank you.  import java.io.*;  class GameHelper  {     public String getUserInput(String prompt){         String inputLine = null;         System.out.print(prompt +" ");         try {             BufferedReader is = new BufferedReader (             new InputStreamReader(System.in));             inputLine = is.readLine();             if (inputLine.length() == 0) return null;     } catch (IOException e) {         System.out.println("IOException: " + e);       }         return inputLine;   } }  class IntArray {     int[] numbers={1,9,8,5,6};     String result="YOU HAVEN'T FOUND THE LUCKY NUMBER";      String joker(String guess)     {          for(int i=0;i<numbers.length;i++)         {             if (guess==String.valueOf(numbers[i])){             result="You have found the lucky number";             break;             }         }         return result;     }  }      class ProjectMain {   public static void main (String[] args)   {     GameHelper helper = new GameHelper();     IntArray player1 = new IntArray();     String x = helper.getUserInput("enter a number ");     System.out.println(player1.joker(x));          } }


I have a gravel bike with an MTB setup. SRAM GX rear mech, SRAM XO shifter, 1x11 system, Shimano disc brakes. How would I go about replacing my flat handlebars with road bars?  Alternative 1 Get a hold of a Shimano 11-speed shifter, a brake lever and a Jtek Shiftmate to convert from Shimano ratio to SRAM.  Alternative 2 Get a hold of SRAM 11-speed road shifter and brake lever. Also need new hydraulic brakes which are not compatible.  Alternative 3 Get new mechanical disc brakes. Get SRAM shifters with mechanical levers.   So what is the best alternative? Or do I have more options?   And can I use SRAM GX rear mech with SRAM Apex or Rival shifters without a ratio adapter like Jtek Shiftmate?   Much appreciated. Cheers!


How do you pay taxes on mined crypto currency that doesn't have a true price yet?

Lets say I created a new coin and mined 1 trillion of them. It isn't on any exchange to get its true value.   But someone on a forum pays me $100 for 100 coins. Now these coins value is at $1 and shows up on exchanges for $1 for each coin. Then I mine another 1 trillion. Am I liable to pay $1 trillion in taxes? How would that work?


Points of a Measure Zero Sets Covered by Intervals Infinitely Many Times

Given a measure zero set $E$, by definition we have forall $\varepsilon > 0$, a covering of $E$ by intervals whose lengths sum to $< \varepsilon$.  I want to prove that we can cover $E$ in intervals such that the sum of the lengths the intervals is $< 1$ and each point in $E$ is contained in infinitely many of the intervals.  Do you know how to prove this? Thank you


I found this exercise in Matsumura, Commutative Ring Theory, (Exercise 7.2).     If $A\subset B$ are integral domains with the same field of fractions and $B$ is faithfully flat over $A$, then $A=B$.   Can anyone give me a proof for this statement or tell me where to find it?


SELECT a string formatted array by row in SQL Server

For instance I have a string parameter @p_colors with a value like:   'yellow','blue','red'  which is passed into a stored procedure. And when I try to select it like this:  EXECUTE(CONCAT('SELECT ', @p_colors));   The result is the values are selected by columns.  No column name | No column name | No column name ------------------------------------------------ Yellow         | Blue           | Red   How will I do it if I want to display them by row like this:   No column name | ---------------- Yellow         | ---------------- Blue           | ---------------- Red            | ----------------   using only the string formatted parameter. Is there any way in SQL to make this?   EDIT:  The actual result will be inserted into a temp table so the actual code is :  EXECUTE('INSERT INTO #colors(color) SELECT ', @p_colors);


Do we use 'work in' or 'at' a gas station?

Which one is correct?     Wind up working in a gas station (song name by Frank Zappa)   or     He knew that Old Joe didn’t work at the gas station anymore   (an example from Grammar textbook.)   Or may both variants be acceptable?


Is it ok to supply 24 volt from the power supply with output 24 v 10 Amps to sensor which current & Voltage consumption (max) is 12-30V 35mA

Is it ok to supply 24 volts from the power supply with output 24 v 10 Amps to my sensor which voltage supply range+Vs is 12-30 V and current consumption (max) is 35mA, will current output from the power supply (10A) will destroy my sensor ??


I've downloaded Ubuntu and it won't open as the file is damaged

I downloaded Ubuntu, but it says the file is damaged and it won't open. Since I've contributed nearly $30 dollars I don't want to pay twice. Please how do I download it again ?


Standard error of regression coefficient without raw data

After searching here:    I am still curious about this.  Is it possible to derive the standard error of a regression coefficient from summary data alone?   E.g., assume we are given the following variance-covariance matrix.  $\begin{bmatrix}Var(X) & Cov(X,Y)\\Cov(X,Y) & Var(Y)\end{bmatrix}$  We can derive the regression coefficient $\beta_{XY} = Cov(X,Y) / Var(X)$.  Given a specific n, is it possible to derive the standard error of $\beta$ as well? If so, which formula is being used? It appears that all formulas for regression standard errors that I could find assume that you know the variance of residuals of the regression, which we don't know from summary data alone.  ---UPDATE--- Based on feedback by Greg and whuber, I am now at a point, where I know that  $\sigma^2(b) = \sigma^2(X'X)^{-1}=\sigma^2(Var(X)(n-1))^{-1}$,  but typically matrix formulas for the standard error of $b$ then note that $\sigma^2$, the unknown variance of the errors, is estimated with MSE.   Based on comments by whuber, sum of squares residuals is:  $Y'Y - bX'X$, which according to Greg can be spelled out as  $Var(Y)(n-1) - b(Var(x)(n-1))$  And to go from here to MSE, I think (?) all that is left is divide by n-2,  so $(Var(Y)(n-1) - b(Var(x)(n-1))) / (n-2)$  And plugging this all in yields:  $\sigma^2(b) =((Var(Y)(n-1) - b(Var(X)(n-1))) / (n-2))\times(Var(X)(n-1))^{-1}$  I will try to see if this works out in R, and will report back. If anyone sees something blatantly wrong, I appreciate the heads up.


This question has been bothering me since I was six years old- we know that Aunt Buru and Uncle Owen are moisture farmers, but what is it that they do?  What is the process?  Is it profitable?  What is the yield and who buys it, or are they more self-sustaining than commercial?  What types of jobs did the droids do?


I killed a bunch of guards and villagers and now everyone hates me, and the NPC's have not respawned. How to I get them to like me again and get the guards to respawn?


Homeomorphism(topological spaces) version of Cantor–Bernstein–Schroeder theorem

Let $A$ , $B$ be topological spaces such that there for some subset $D$ of $B$ there is a homeomorphism form $A$ to $D$ and for some subset $E$ of $A$ there is a homeomorphism form $B$ to $E$ ; then must there exist a homeomorphism from $A$ to $B$ ?


sed: print only first occurence of a pattern match

Several questions are similar to this one, but I have not found a solution that works when I want to search for a pattern over several lines. The following  sed -n '/First string/,/Second string/ p' my.file   will print all occurrences of the matched pattern, but I would like only the first occurrence. I am using GNU sed.


I'm using book in LyX. I changed the name on the text itself using this \renewcommand\appendixname{Anexo} , but on the ToC i get:  A Expressoes fatores de forma B Expressoes radiosidade . .  I wanted it to be like this:  Anexo A Expressoes fatores de forma Anexo B Expressoes radiosidade . .


Is Stack Overflow talking about their period? I sure don't want to share it with people.  See for yourself:        Appears below questions without answers on the main site.


Ubuntu 16.04 Live Installation Disk Puts Computer to Sleep

I recently purchased a DELL Inspiron 15 3000 Series laptop.  I created an Ubuntu 16.04 Live Installation DVD. However, when I attempt to create a dual boot of Ubuntu 16.04 and Windows 10, the Ubuntu Live Installation DVD puts the laptop into "sleep" mode and it never wakes up to allow me to complete the installation of Ubuntu.   After I boot from the Ubuntu Live installation disk, I see the Ubuntu loading screen with the 4 dots under the logo, but from there my monitor shuts off.  I can hear the hard disk still working.  I tried leaving the machine alone for hours in case my processor is just slow (only 1.6 ghz intel pentium), but that doesn't help, the machine never comes out of sleep mode to allow me to install Ubuntu.  I even verified the integrity of the Ubuntu Live Installation disk by booting from it in my old laptop and it worked perfectly.  I believe that there may be some type of driver conflict that will not allow me to finish installation... any ideas?  Big Ubuntu fan... why can't install it?


Did Dumbledore's scar adapt to reflect Muggle changes in the London Underground?

We learn about Dumbledore's scar when he drops Harry off at the Dursleys:  "Couldn't you do something about it, Dumbledore?" "Even if I could, I wouldn't. Scars can come in useful. I have one myself above my left knee which is a perfect map of the London Underground. (Philosopher's Stone, Chapter 1, The Boy Who Lived)  Plainly this is a light-hearted aside. Although I do find the idea of Dumbledore consulting his knee to work out which station to get off at whilst using the Tube hilarious.  However, the Muggle underground has clearly undergone a number of changes over the years. For instance,  will change the structure and layout of the Underground significantly when it becomes operational in 2018.  question deals with the issue a bit but doesn't answer the specifics of how Dumbeldore's scar worked. Did Dumbledore's scar change over the years? Is there any indication that scars work this way?


ASP.Net textbox should not suggest old values

I want my textbox to NOT suggest the old values (when clicked) entered in it before.


I am not a number theorist and I am learning about relations.  I encountered a relation that says      $a \leq b$ if $a$ divides $b$   Can someone clarify what it means to a number to divide another number?  Does it mean what I think? $a$ divides $b$ if $a | b \in \mathbb{Z}$?     So given a set $S = \{a, a^2, a^3, \ldots\}$, with relation $a | b \leftrightarrow a \leq b$, does the relation hold   going from left to right or right to left? i.e. $a|a^2, a^2|a^3, \ldots$


Issue: Time is not in sync between Ubuntu and Windows 8

I am using Ubuntu 12.04 dual booting with Windows 8.1. Recently I am noticing  that whenever I boot alternative OS the time is not the same i.e. When I switch from Ubuntu to Windows, system time in Windows gets delayed by some hours. But if I correct it and boot again to Windows, the time displayed is right one. Similarly, when I boot into Ubuntu, the time is delayed once its corrected its alright the next time. I am using Grub bootloader.


I am asked to prove the following :  Let $B_t$ be a standard brownian motion.   The $n$th Hermite polynomial is $\displaystyle H_n(t,x)=\frac{(−t)^n}{n!} e^{x^2/(2t)} \frac{d^n}{dx^n}e^{-x^2/(2t)}$.   Show that the $H_n$ play the role that the monomials $\dfrac{x_n}{n!}$ play in ordinary calculus.   In other words show : $dH_{n+1}(t, B_t) = H_n(t, B_t)$  Now my guess is that we can take the integral of both sides and use ito integration ? But I am not sure how to proceed from there.


Why does $\operatorname{rank}(\mathbf{X})$ equal $\operatorname{rank}(\mathbf{X^TX})$? What is $\dim(\mathbf{X^TX})$?

Why does $\operatorname{rank}(\mathbf{X})$ equal $\operatorname{rank}(\mathbf{X^TX})$? Is this true in general, please? And what is $\dim(\mathbf{X^TX})$, please? Does it equal to $\dim(\mathbf{X})$ in general, please? Thank you!  Imagine I prove the first claim by assuming that $\mathbf{X}$ is an $n\times k$ matrix with $n>k$ and $\mathbf{X}$ has rank $l<k$. Then, we know $\operatorname{nullity}(\mathbf{X})+\operatorname{rank}(\mathbf{X})=\dim (\mathbf{X})=l<k.$  To this end, I need to show first that $\dim(\mathbf{X})=\dim (\mathbf{X^TX})=l$. And then show $\operatorname{nullity}(\mathbf{X})=\operatorname{nullity}(\mathbf{X^TX})$.  I do not know how to show the first claim. Any hint, please? Thank you!  Provided the first claim is true, it is easy to see the following. If $\mathbf{X}v=\bf{0}$, then $\mathbf{X^TX}v=\bf{0}$. If $\mathbf{X^TX}v=\bf{0}$, then $v^T\mathbf{X^TX}v=\bf{0}$, which implies that $\mathbf{X}v=\bf{0}$. Hence, the second claim is proved.


I mainly studied Illustrator to use it in T-Shirt custom design.  Now, I have this problem.  According to the tutorials that I see.  When working on print jobs, I should use CMYK mode rather than RGB.  I am just having trouble utilizing blending mode in CMYK transparency panel.  They sometimes dont look so well especially doing abstract designs.  If I switch to RGB, the design looks good in illustrator but does'nt print well on my CMYK printer.  Question is, how do I do about this problem of mine.  Anyone having this?


Will a Shimano MTB 9 speed derailleur work with 10 speed cassette?

In general, what issues am I likely to run into, if I use a 9 speed derailleur with 10 speed cassette?  Is the chain width main problem?  I'm interested in Shimano XT CS-M771 cassette/XT M772 Shadow 9 Speed Rear Mech combo.  Will it work?  If it will, what flatcar shifter would work the best (indexed)?


Bash script to sleep at given CPU temperature ~ update for 16.04

This is a radically updated version of the question. I have to update this because  is flagged as duplicate of this one, while this has no valid answer anymore.     Initial version of this question, which had the 11.04 tag:   I am new to scripting and linux, my comp gets too hot sometimes and I want to make a script to detect temp1 and if it's over 65 C, it must put it to sleep. I have a diffuculty at comparing values in the script, I couldn't manage to define figures correctly, would anybody fix it please? Here is my stab at it so far   #!/bin/bash  max=65  val=$   sensors | grep '^temp1:' | sed -e 's/.*: \+\([+-][0-9.]\+\)°C.*$/0\1/'  while true; do     if [[ "$val" > "$max" ]]; then         sudo /etc/acpi/sleep.sh force         sleep 1     else         sleep 10     fi     clear     sensors done     The above got  with  a script that according to the comments was at some point updated to work in 14.04:   #!/bin/bash   while true; do     val=$(sensors | awk '/temp1/ {print $2}')     max="+75.0"     if [[ "$val" > "$max" ]]; then         dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend     fi     sleep 10     clear     sensors  done  exit 0     As indicated in the linked question, the above script doesn't work in 16.04.   That question got  with a simplistically modified version of the script:   #!/bin/bash   while true; do     val=$(sensors | awk '/temp1/ {print $2}')     max="+75.0"     if [[ "$val" > "$max" ]]; then         systemctl suspend     fi     clear     sensors  done  exit 0   But while it does the job (the system goes to sleep when going above 75), it takes more CPU power than expected and pushes the temperature up while running up to 10 degrees celsius; this is more useful, more cooling when not running!  I don't know if the problem is with the initial 11.04 script or with the last change but this needs a fresh answer for 16.04.


Were Doc's calculations incorrect as to when Marty should drive the DeLorean?

In the original Back to the Future when Marty is trying to get back to 1985, Doc puts an alarm clock on the dashboard of the DeLorean and tells Marty:     "I've calculated the distance and wind resistance retroactive from the moment the lightning strikes. When this alarm goes off you hit the gas."     Moments before the alarm goes off, the DeLorean's engine stops and Marty struggles to get it to start again. While he struggles with it the alarm clock rings. When the engine eventually starts Marty then starts to drive the car and he is successful to travelling back to 1985. Because he started a few seconds late due to the engine trouble, were the Doc's calculations incorrect by a few seconds?


Why $∀x(P(x)→Q)$ is equivalent to $∃xP(x)→Q$

Given $x$ occurs free in $P$. If $x$ does not occur free in $Q$, then $∀x(P(x)→Q)$ is semantically equivalent with $∃xP(x)→Q$. How to understand this statement. And also, need an example to show that the formula will not necessarily be equivalent if $x$ does occur free in $Q$.  I guess what struggles me is I'm not quite understand what does "free" mean in this case. But it would be better to have answer for the above question.


Showing that the groups (Q,+) and (Q⁺,*) are not isomorphic

The additive group of rational numbers is not isomorphic to the multiplicative group of positive rational numbers. How should I show this? What structural property does the first group possess that the other does not?


Is there a way of recording keystrokes while editing?

When inserting a block of code, several lines, previously copied with CTRL/C, and pasted with CTRL/V, I have do "down" "home" four "space"s, over and over. Please, is there a way to record these keystrokes and re-play them with a single key?  Of course marking up a many lined block of code may be already allowed for, but I could not locate it in the Help. Even so, it would be a useful feature, and is found in emacs and probably other text editors.


I've created a script to empty my trash. I want to be able to execute it without having to use the terminal. Is there anyway I could do this?


how to add arcgis 10.1 rest service in openlayers

I need to add ArcGis 10.1 rest services to openlayers. Can any one share the ideas, it would be great.


What's with the very slightly larger mass of the neutron compared to the proton?

Neutron mass: 1.008664 u  Proton mass: 1.007276 u  Why the discrepancy?  On a related note, how does one go about measuring the mass of a neutron or proton, anyway?


I was experimenting with various integration techniques, and I stumbled upon the integral:  $$ \int{\frac{\tan{x}}{x} dx} $$  I tried using a number of methods, but I could not solve it. Checking on WolframAlpha, I found that the integral does not have an elementary antiderivative. However, I am not satisfied with simply assuming it's non-elementary if I have difficulty in solving it.   My question: Is there a test to determine if an antiderivative is elementary or not?


Wireshark is not able to capture on any of the interfaces

I just switched to Ubuntu from openSuse where I used wireshark with no problem.  Now I receive the error that "You don't have permission to capture on that device" referring to my 802.11 wifi.  I have root privileges but not running as root.  I installed Wireshark from the Ubuntu software Center.  Solution please.


60's or earlier fantasy about two children pranksters who turn out to be persian deities

This is fantasy, not SF. It was a novel, alone in its own book, but it was a rather small book. And I read it in the 60's, I am sure. (I understand that the tag "fantasy" should not be used for a question to identify a fantasy story, only on questions on the genre itself)  It starts rather small scale, a girl (I think) who could control insects, bees if I remember properly, and uses them to pester another child (probably a boy) who has ways to get rid of the bees. Then it starts escalating.  In the end it becomes an epic fight between the forces of Good and those of Evil. I remember that the Zoroastrian deities Ahura Mazda and Ahriman are mentioned (I got this spelling in Wikipedia right now, the spelling in the book might well have been different but I am sure they were the ones from Zoroastrian religion)


Everytime I try to update my ubuntu, it returns this:         W: Failed to search   404  Not Found      W: Failed to search http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found      W: Failed to search http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found      W: Failed to search http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found      E: Failed to download of some indexs. They were ignored or others have been used in the place   And also I can't install pygame...


Showing that $\{(x,|x|):x\in\mathbb{R}\}$ is not the image of an immersion

Show that $A=\{(x,|x|):x\in\mathbb{R}\}$ is not the image of an immersion $f:\mathbb{R}\to\mathbb{R}^2$.   Here are the definitions I know:   Let $M$ be a differentiable manifold. A tangent vector at $p\in M$ is a linear function $v:C^{\infty}(M)\to\mathbb{R}$ that is Leibnizian at $p$. The collection of these is the tanget space $T_pM$. The differential map of a differentiable map $f:M\to N$ at a point $p\in M$ is the function $df_p:T_pM\to T_{f(p)}N$ given by $df_p(v)(g)=v(g\circ f)$ where $v\in T_pM$ and $g\in C^{\infty}(N)$. An immersion is a differentiable map $f:M\to N$ such that $df_p$ is injective for every $p\in M$.   Thus, if we suppose that $f:\mathbb{R}\to\mathbb{R}^2$ is a differentiable map with $f(\mathbb{R})=A$, we should show that $df_p$ is not injective for some $p\in\mathbb{R}$. I really don't know what to do, but maybe we should use that $x\to |x|$ is not differentiable in the usual sense at $x=0$, but what tangent vectors should we take in order to show $df_p$ is not injective?  Thank you.


I know this seems like a simple question - I had just assumed that your points were directly related to the amount of time spent in the game. But my top scores table definitely shows situations where the number of seconds I played was less, but I got a higher score. Is there something else that gives bonuses or affects your speed as you play, or is this a bug? I watched to see if jumping over something added a bonus or slowed down the movement speed, but I didn't notice any obvious changes. Here's some examples from my top scores list, and why it confused me. Compare rows 1 and 2, where 1 has 161 more points, but 2 lasts 0.36 seconds longer. Rows 3-5 have some similar things happening, but on a much smaller scale. That's small enough I can believe it's timing variability in the code, but the difference between 1 and 2 is far larger than that.     # Score Seconds     1 620 39.07   2 459 39.43   3 57 4.89   4 55 4.99   5 52 4.39


I am trying to edit the style svmono.cls to tweak the default spacings, but there are entries whose values are not clear to me. In particular, what are \z@ and \p@ in the definitions in lines 244 and 587 (see below)? Thanks, Jorge.  EXCERPT FROM svmono.cls:  \setlength{\parskip}{\z@ \@plus \p@}  \renewcommand\section{\@startsection{section}{1}{\z@}%                        {-30\p@}% \p@lus -4\p@ \@minus -4\p@}%                        {16\p@}% \p@lus 4\p@ \@minus 4\p@}%                        {\normalfont\secsize\secstyle                         \rightskip=\z@ \@plus 8em\pretolerance=10000 }}


How to directly prove that $M$ is maximal ideal of $A$ iff $A/M$ is a field?

An ideal $M$ of a commutative ring $A$ (with unity) is maximal iff $A/M$ is a field.  This is easy with the correspondence of ideals of $A/I$ with ideals of $A$ containing $I$, but how can you prove it directly?  Take $x + M \in A/M$.  How can you construct $y + M \in A/M$ such that $xy - 1 \in M$?  All I can deduce from the maximality of $M$ is that $(M,x) = A$.


SQL Sever 2016 with the latest updates. Running on WS2012R2. Following error message is received:     The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 5 (2017-04-14T21:34:10). Exception Message: Cannot send mails to mail server. (The operation has timed out.).  )   I have tried several ways of setting up Database Mail, a mixture of precreated scripts and following the interface in SSMS.   I have also tried two different mail server credentials (Google and a Web Hosting Company), and both fail with the same error.  The Web Hosting Credentials are used on a PHP Script on another Server which works perfectly fine.  What should I check to get this working?


How can I prove $5^{3^n}+1$ is divisible by $3^{n+1}$

The problem was to prove that $5^{3^n}+1$ is divisible by $3^{n+1}$ for all nonnegative integers.   I attempted to prove the claim by induction.  Claim: For all $ n \ge 0 $  $$ 3^{n+1} ~|~ 5^{3^n}+1 $$ Basis case: $$ 3^{0+1} = 3  ~|~ 6 =  5^{3^0} + 1 ~ ~\checkmark$$  Inductive step: Assume $$ 3^{k+1} ~|~ 5^{3^k} + 1 $$ It follows by the definition of divides, $ 5^{3^k } + 1 = 3^{k+1}\cdot m $ for some integer $m$.     Then $$~~~~~ 5^{3^{k+1}} +1 \\   = 5^{3^k \cdot 3 }+1  \\ = 5^{3 \cdot 3^k}+1   \\ = \left( 5^3 \right)^{3^k} +1  \\=  125^{3^k} +1 $$ I have no idea how to proceed. Am I on the right track? If it is possible can I get a hint. One thing I did notice is that it might be easier to prove $$ 3^{n} ~|~ 5^{3^n}+1 $$ This statement seems to be true, since the basis case is then $1|6$.


Trying to find a book about kids with 'sunguns' revolting against alien overlords

I'm trying to identify a book (or possibly a series, as I seem to recall reading a sequel which still left the story unfinished).  I read the book or books in the early 90's and had picked them up from a jumble sale at school, so they were probably published in the 80's or possibly 70's. I guess you would class them as YA fiction, though that wasn't really such a thing back then...  As I recall the story began with a slave transport craft crash landing on an alien world, with only a handful of teenage and pre-teen humans surviving. They scraped together what they could, including a couple of functional 'sunguns' (basically, laser rifles) and began a low level guerilla rebellion against the alien race that were using humanity as slave labour on the planet.  I've googled 'sungun' repeatedly, thinking that this should be the best way of finding the story but the references that come up are all for other stories or conspiracy technologies.  Anyone got any vague recollections of a book or series like this?


I'm trying to remove Wine and everything back to normal. never used it and have no need for it

I made a mistake and no I want to get rid of this Get:8 [https://dl.winehq.org/wine-builds/ubuntu](https://dl.winehq.org/wine-builds/ubuntu) bionic InRelease \[6,259 B\]  Err:8 [https://dl.winehq.org/wine-builds/ubuntu](https://dl.winehq.org/wine-builds/ubuntu) bionic InRelease    The following signatures couldn't be verified because the public key is not available: NO\_PUBKEY 76F1A20FF987672F  Reading package lists... Done  W: GPG error: [https://dl.winehq.org/wine-builds/ubuntu](https://dl.winehq.org/wine-builds/ubuntu) bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO\_PUBKEY 76F1A20FF987672F  E: The repository '[https://dl.winehq.org/wine-builds/ubuntu](https://dl.winehq.org/wine-builds/ubuntu) bionic InRelease' is not signed.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.


How it's possible that the same Lie algebra give different Lie group?

I've seen that there are different groups like $SU(2)$ and $SO(3)$ with isomorphic Lie algebra. I know that putting the elements of the linear algebra in the exponential function gives the group elements, in this case I don't understand how it's possible that two isomorphic linear algebras gives different groups  Does it mean that when I put two isomorphic group in the exponential function I can obtain two non isomorphic groups?


How to get a combined ticket in IRCTC (Indian Railway)

Suppose I want to go from Station A to Station C but Station C is not a stoppage of some train say train 01, so I can get a combined ticket from station A to Station B  through train 01 plus Station B to station C through a different train say 02, so my total fare will be of same ticket as from Station A to Station C.  We can get Combined ticket from the Booking Window but how's that possible on the IRCTC website?


Use previous Tikz figure compilation for future compilations?

(I'm not sure I have titled this question correctly. Modify if preferred.)   I have a document with a large number of Tikz figures, and a lot of text. The figures are in final state. I am now working on the text. How can I avoid compiling the figures every time I compile the document, whilst still keeping the figures in the document? Is there a method to "use figures from previous compilations"? I am using TexStudio.  I have a tendency/compulsion/obsession to compile every half a minute or so, in order to see how the added text looks like. Having many Tikz figures just makes the process inefficient. I don't want to deal with my tendency/compulsion/obsession.


When I using try to update using apt-get update, I am getting error as follows,  Err http://ppa.launchpad.net trusty/main amd64 Packages                           404  Not Found Hit http://vn.archive.ubuntu.com trusty-backports/main amd64 Packages           Err http://ppa.launchpad.net trusty/main i386 Packages                            404  Not Found Hit http://vn.archive.ubuntu.com trusty-backports/restricted amd64 Packages     Ign http://ppa.launchpad.net trusty/main Translation-en_US                      Hit http://vn.archive.ubuntu.com trusty-backports/universe amd64 Packages       .......                                         W: Failed to fetch http://ppa.launchpad.net/upubuntu-com/web/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found  W: Failed to fetch http://ppa.launchpad.net/upubuntu-com/web/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead.   how can to fix this ?


Beamer - place text of footnote in footline

I must place footnotes and footcites at the bottom of the frames, like shown in the picture:   The line above the footnotes must always be there, and it must have a minimum distance to the bottom of lets say 2.5em.  So I see two possible solutions:   Add the footnote via \setbeamertemplate to the footline. Change the format of the footnoteline and let it always appear, even if no footnote was used.   For the last hours, I tried to accomplish point 1, but I had absolutely no success. Can you please help me? Otherwise I have to use *whisper* Powerpoint. ;)    EDIT: Do you know the phenomenon that only after you ask someone, you can get the right ideas? ;)  Here is a MWE of my current solution:  \documentclass[xcolor={dvipsnames}]{beamer}  \usepackage[absolute, overlay]{textpos} \usepackage{environ}   \usetheme{default} \setbeamertemplate{navigation symbols}{}%remove navigation symbols   \newcommand{\makemyrule}{%     \setlength{\unitlength}{14pt}%      minimum distance to bottom     \ifdim\footnoteheight>\unitlength \setlength{\unitlength}{\footnoteheight} \fi%     check which distance is bigger     \begin{textblock*}{\linewidth}(0pt,\dimexpr\textheight-\unitlength)%    place with use of textpos         \textcolor{blue}{\rule{\paperwidth}{.3ex}}     \end{textblock*} }   \let\oldfootnote\footnote%      redefine the footnote command \renewcommand{\footnote}[1]{\Addheight{#1}\oldfootnote{#1}}  \newlength{\footnoteheight} \newsavebox{\mytext} \newcommand{\Addheight}[1]%     measure height of the text         {%                 \savebox{\mytext}{\small\strut\parbox{\textwidth}%                 {\hspace*{2em}\thefootnote#1}\strut}%       approximated by eye, not perfect!                 \addtolength{\footnoteheight}{\ht\mytext}%                 \addtolength{\footnoteheight}{\dp\mytext}%         }     \NewEnviron{myframe}[1]{%     \begin{frame}{#1}%     \setlength{\footnoteheight}{0pt}%     \BODY%     \makemyrule%     \end{frame}%     }    \renewcommand\footnoterule{}  \begin{document} \begin{myframe}{} \frametitle{Beamer example} using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al and a lot more information to create a linebreak} excessively \footnote{You do not need to read this, this is only blindtext to create even more and more text. Blindtext will go on forever, nobody can stop the allmighty blindtext. I think I am a blindtext author.} \end{myframe}{} \begin{myframe} \frametitle{Beamer example} using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al} \end{myframe}{} \begin{myframe} \frametitle{Another example} without footnotes\\ \end{myframe} \end{document}   What this does: At the beginning of each myframe-environment, the length \footnoteheight is reseted to zero. When a \footnote is placed, the height of the text is added to this length. At the end of each frame, via \makemyrule the bottom rule is created, which is above the footnote texts (my solution is not perfect) or, if there are no footnotes, at least 14pt above the bottom.  My wishes (not real problems, but I want it to work better) are   The height of the footnotetext is only approximated. I would like a solution where you can measure the height of the formatted footnote. The frame environment needs to be renamed to myframe. I would like a solution which works without changing the document. But it all failed, because I could not execute \makemyrule before \end{frame} automatically.


Is there a way to create a unique ID using Node.js without additional modules?

In my Node.js application I need a unique ID - it need to be a UUID or something like that, just unique (auto-incrementing a number is not unique enough ;-)).  At the moment I am using , but I'm curious whether there is a way of how to achieve this without an additional module.  I though about using a timestamp, but that's not unique (as several calls to +Date() may happen in the same millisecond.  Any other idea on how to achieve this?


Backspace and arrow keys are not working in terminal vim. I tried to solve the issue using following commands from root user:  sudo apt-get update sudo apt-get install vim   But I am getting following message on the terminal:  root@abhi:/home# sudo apt-get install vim Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  vim : Depends: vim-common (= 2:7.4.052-1ubuntu3) but 2:7.4.273-2ubuntu4 is to be installed        Depends: vim-runtime (= 2:7.4.052-1ubuntu3) but 2:7.4.273-2ubuntu4 is to be installed E: Unable to correct problems, you have held broken packages. root@abhi:/home#    How can I solve this issue?


The quintic equation: Why is there no closed formula?

We know that polynomials up to fourth degree have closed solutions using radicals. And we know that starting from the quintic no polynomial will have a closed solution using radicals.  Question 1: What I want to know is, why does this happen for the fifth order polynomial? What is so special about the number 5? I don't want a prove. I am looking for an intuitive explanation.   Question 2: Is there a closed formula for higher order polynomials using other functions and operations? I heared that Felix Klein did something like that, but I could not find a closed formula for the solution.


Bounty was not awarded and the answer was accepted

A bounty of 250 rep was not awarded.  I answered  the question and the answer was accepted as the correct answer several days before the bounty expired, the answer had 3 up-votes and was the only answer.   I went through three iterations as the question changed and I spent a reasonable amount of time on the answer, it was complete code with log output and well commented.  The SO .  What am I missing?  Here is the text from the help system: "If the bounty was started by the question owner, and the question owner accepts an answer posted during the bounty period, and the bounty expires without an explicit award then we assume the bounty owner liked the answer they accepted and award it the full bounty amount at the time of bounty expiration."    That paragraph has no mention about when the answer was started.


Does 'All countable unions' include 'all finite unions'?

One of the requirements of a sigma-algebra is that all countable unions are in the algebra i.e. if $A_n\in B$ for $n=0,1,2,...$ ($B$ been our algebra and $A_n\subset U$) then we require: $$ \bigcup\limits^\infty_{n=1} A_n\in B$$ my question is whether this includes all finite unions i.e. do we also require: $$A_1 \cup A_4\in B$$ etc?


forgot password for another one user account created in my system, how to solve it?

I have two user accounts and forgot one user's password. I have tried to reset it from the boot menu. After selecting recovery mode I have selected Drop to root shell prompt option but then it asked me to "give the root password for maintenance(or type control-D to continue)" don't know the password and even typing control-D doesn't work   What should I do now??  Please give me a solution


What is the price for an enchanted weapon?

The DMG describes enchanted weapons, but does not say the prices for most. I'm wondering if there is is a scale or chart, or can you only buy some of them? If possible, can you provide an example?


need suggestion, Common file system between MAC OS Mavericks and Windows 7

I have Mavericks on one HDD and Windows7 x64 on another HDD in same machine. Windows can't even see MAC partitions while MAC gains READ ONLY access to NTFS partition.  I want a robust and common file system for windows (data) partitions which can be accessed from MAC with full read and write support. My NTFS partitions are not huge as terabytes, in fact 50GB to 500GB max at the moment.  I have Googled and tried to analyze worthiness and reliability for the two solutions most commonly appearing exFAT NTFS drivers on MAC (paragon being recommended as faster)  I found cases with reliability issues and issues disk operations latency  I do have frequent power outages. I believe NTFS and HFS+ takes care and self heal upto some extent under such situations.  sigh! if MAC had native read/write support for NTFS this problem would have never existed for me.   please suggest a solution


Cleaning polygon after using dissolve to repair geometry in QGIS?

I'm trying to obtain the boundaries of shapefile, thus to clean the inside as a matter of speaking. While I had expected that dissolve while get me a proper polygon, unfortunately it still has some remainders. How could I get rid of them?  Does QGIS have a tool similar to Repair Geometry?  Here's the source    Result below:


Can you get a style in JS without it being attached to a DOM element?

Let's say I have this simple style:     .element {      width: 60px;    }   But I have no DOM element with that class. Can I use pure JS to get that style?  presupposes you are accessing a something the DOM has computed. If so, could someone explain which CSSOM element would be used to access it?


Logo in beamer on the first page - how to add 2 logos on the same position

I used the following code to introduce to logo in my document:   \titlegraphic{\includegraphics[width=2.5cm]{lit}\hspace*{5cm}~%    \includegraphics[width=3.5cm]{uvt2} }   how should i proceed such that the two logos to be on the first slide at the same position.  Now I obtained the following picture:


Ajax call to my Wordpress website from an external application

I have on website on wordpress and a external web app. I try to make an AJAX call from this external web app to get some info from my wordpress site/ database but i got an error message 400.  Here is my ajax call code :            jQuery.ajax({          type:"POST",         url: "https://www.groupio.fr/wp-admin/admin-ajax.php",         contentType: 'json',         dataType: "JSON",         responseType:'json',          data: {             action : "itempricingfunction",             ean : "EANTEST0101010"         },          success:function(data){              alert(data);          },          error: function(errorThrown){             console.log(errorThrown);         }         });    and here is my functions.php file inside my wordpress website :  function itempricingfunction(){   $product_ean = (isset($_POST['ean'])) ? htmlentities($_POST['ean']) : NULL; echo json_encode(array('product_ean' =>$product_ean));       exit; }  add_action("wp_ajax_nopriv_itempricingfunction", "itempricingfunction"); add_action("wp_ajax_itempricingfunction", "itempricingfunction");   The response from wordpress is error 404.   Can you help me to communicate and set/get some data from my worpdress website please ?  Thank you in advance.


What would a stock be worth if dividends did not exist?

Let's say dividends don't exist, and will NEVER do, for all companies in the world.  What would stocks then be worth?  The stock could be valued according to the book value. Maybe more if the company has any usefulness (for example a media company) for the owner.  Besides that, would stocks have any value at all for the shareholders?  Some people claim that shareholders could still get profits from capital gain, but could there be any capital gain without dividends?  Again: I'm talking about a theoretical situation where absolutely no dividend would ever be paid. It's completely different than not paying dividend for 50 years or so.   Again²: my question is different than the one suggested. Here I assume dividends (or any other form of capital like share repurchase) will never be paid. I know this is not possible in reality, and this is only a theoretical situation. So why am I asking this question? Because some people claim that investors only need to care about the increase of the stock's price. IMO, the price of a stock can't increase if there is no other form of capital gain.  And I should have been more clear about the dividends. What I meant is any form of returning capital to the shareholders. So the shareholders could only get a gain from the increasing stock's price. I believe this is in fact, not possible in the long term (as Chris said in his point 3).  Edit: I wonder if the people who marked it as duplicate even read it..


Why does my loading matrix following PCA with a varimax rotation contain only ones and zeros?

I'm running a PCA using the R function prcomp. This is the function:  d2.pca <- prcomp(sel.d2, center=TRUE, scale.=TRUE)   So variables are scaled an centered. (This always has to be done, right?)  This is my original loadings matrix:                      PC1    PC2    PC3    PC4 var1              0.551 -0.246  0.576 -0.551 var2             -0.545 -0.233  0.736  0.328 var3             -0.427 -0.704 -0.333 -0.460 var4             -0.467  0.625  0.126 -0.613   When I apply variamx rotation:  varimax(d2.pca$rotation)   The output is this one:  $loadings  Loadings:                  PC1 PC2 PC3 PC4 var1              1              var2                      1      var3                 -1          var4                         -1                   PC1  PC2  PC3  PC4 SS loadings    1.00 1.00 1.00 1.00 Proportion Var 0.25 0.25 0.25 0.25 Cumulative Var 0.25 0.50 0.75 1.00  $rotmat        [,1]  [,2]   [,3]   [,4] [1,]  0.551 0.427 -0.545  0.466 [2,] -0.246 0.704 -0.232 -0.625 [3,]  0.576 0.333  0.736 -0.125 [4,] -0.551 0.461  0.328  0.613   This looks very strange to me, how should I interpret the loadings (1 and -1 values) matrix after varimax rotation? Any help or advise will be appreciated, I'm probably missing something...  Note: KMO was 0.6 for the correlation matrix. Just in case, here it is the correlation matrix:           var1        var2        var3        var4 var1    1.000      -0.680      -0.491      -0.771 var2   -0.680       1.000       0.697       0.550 var3   -0.491       0.697       1.000       0.166 var4   -0.771       0.550       0.166       1.000


Question about external JavaScript and SEO

I have a question about external JavaScript and SEO. Assume I have a site called example.com with and index page of:  <html> <body>   <div class='main-container'>     <script src='http://www.other.com/page.js'></script>   </div> </body> </html>   and   // at http://www.other.com/page.js document.write('blue fish and green grass');   Will Google crawl what is outputted by www.other.com/page.js? Are there any techniques or strategies to make that content crawlable so that the text 'blue fish and green grass' was indexed?   Edit:  This  seems to suggest that it is not but is also somewhat dated.


Grouping by chapter in List of Figures and Tables with ClassicThesis

I checked extensively the forum and the net in order to solve this seemingly simple problem, without success. I know that there are a lot of posts regarding this problem, but I was unable to find the one that was fitting my purpose.  I would like to add an extra line inside the List of Figures and Tables when switching from one chapter to another, when using the scrbook class of ClassicThesis.  So for example it should be:   Figure 1.1 Figure 1.2 Figure 2.1 Figure 3.1   while what I obtain now is:   Figure 1.1 Figure 1.2 Figure 2.1 Figure 3.1   Here is the MWE that reproduces my problem, with a possible solution that I took from , which unfortunately doesn't work in my case:  \documentclass{scrbook} \usepackage{classicthesis} \usepackage{classicthesis-ldpkg} \usepackage{subfig} \usepackage{graphicx} \begin{document}  \makeatletter \let\my@chapter\@chapter \renewcommand*{\@chapter}{%   \addtocontents{lof}{\protect\addvspace{10pt}}%   \my@chapter} \makeatother  \listoffigures  \clearpage  \chapter{1}  \begin{figure} \centering \includegraphics[scale=.9]{fig1} \caption{Figure 1 of the chapter 1} \end{figure}  \begin{figure} \centering \includegraphics[scale=.9]{fig2} \caption{Figure 2 of the chapter 1} \end{figure} 1 \chapter{2}  \begin{figure} \centering \includegraphics[scale=.9]{fig3} \caption{Figure 1 of the chapter 2} \end{figure}  \chapter{3}  \begin{figure} \centering \includegraphics[scale=.9]{fig4} \caption{Figure 1 of the chapter 3} \end{figure}  \end{document}   Thanks for your kind help.


403 Forbidden error in sudo apt-get upgrade ubuntu 17.4

Err:1 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libqt5test5 amd64 5.7.1+dfsg-2ubuntu4~1.17.04.1   403  Forbidden [IP: 91.189.91.26 80] E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/q/qtbase-opensource-src/libqt5test5_5.7.1+dfsg-2ubuntu4~1.17.04.1_amd64.deb  403  Forbidden [IP: 91.189.91.26 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?