How to do a PHP nested class or nested methods?

How can I do this in PHP  $myDBClass->users()->limit(5);//output you limited users to 5 $myDBClass->comments()->limit(3);//output you limited comments to 3   what I meant is nested methods or nested class (I don't know!) so when I call the limit method as a child of users it will know that I am calling it from  "users" method -or class- and when I call limit method -or class!- from comments It also knows that.  what is the possible structure for a PHP class to do this thing?    the reason for this question because I am working on my own class for database so I can easily use something like this       $DB->comments()->id(" > 3")->limit(10);   to generate the sql code "select * from comments where id > 3 limit 10" Thanks


Can't use limit rules as $\sqrt{n^2+1}$ and n are not convergent sequences


It is given that a certain matrix A has eigenvalue 1 repeated thrice, eigenvalue 2 repeated twice, and eigenvalue 3 with no repeats. What are the possible geometric multiplicity for these eigenvalues. Write down the possible Jordan forms of A.


Ubuntu Desktop version 16.04 AMDGPU-PRO version 17.10-414273 GPU: RX 480 UEFI with secure-boot disabled   On a fresh installation of Ubuntu, I installed AMDGPU-PRO by following . Commands repeated here in case the link goes dead:  apt update apt dist-upgrade cd /tmp tar -Jxvf amdgpu-pro-17.10-414273.tar.xz cd amdgpu-pro-17.10-414273 ./amdgpu-pro-install -y   After restarting, Ubuntu gets stuck booting indefinitely with the following text displayed in tty7:  /dev/sdb5: clean 414434/8847360 files, 8735918/35384576 _   At this point, I can switch to a different tty and login, etc.  Logging in and running amdgpu-pro-uninstall and restarting fixes the hang on boot...but then I don't have drivers.  It might be important to note that I'm dual-booting Windows and Ubuntu from different partitions on the same disk.


entire function with bounded multiplicity is a polynomial

Let $f:\mathbb{C}\to\mathbb{C}$ be an entire function.  Let $n\in\mathbb{N}$ and suppose that  $$\forall w\in\mathbb{C}:\#\{z\in\mathbb{C}:f(z)=w\}\leq n$$  In words, every complex value is attained by $f$ in at most $n$ different places.  Prove that $f$ is a polynomial of degree at most $n$.


How can we stop users adding irrelevant tags, obviously just for farming reputation points

Users frequently add irrelevant tags to questions, obviously just for farming reputation points.  Example:  An OP asks a question which is related to a network issue in  which she tagged correctly with  +  for example.  Now a smart-pant will add the tag  - which shall be used for language related questions, or  which is related to the IDE used for iOS development.  It's obvious that these edits are solely for farming reputation points.  Since a reviewer often doesn't know the subtle differences between these tags, and frequently tries to avoid significant effort to figure this out, he just approves the edit, which is bad enough.  And it's annoying since the "category" of the questions becomes less precise. For example, if someone wants to search for language related issues in , she gets a lot hits with unrelated questions. Thus, the tagging becomes useless.  How should I deal with this, when spotting such a user?


Trying to install php-devel on AWS EC2 server to compile a PHP extension, but getting errors "httpd24 conflicts with httpd-2.2.27-1.3.amzn1.x86_64"

I'm trying to install php-devel on an AWS EC2 server so I can compile a PHP extension. But I get an conflits error.     --> Processing Conflict: httpd24-2.4.10-1.59.amzn1.x86_64 conflicts httpd < 2.4.10   --> Processing Conflict: httpd24-tools-2.4.10-1.59.amzn1.x86_64 conflicts httpd-tools < 2.4.10   --> Finished Dependency Resolution   Error: httpd24-tools conflicts with httpd-tools-2.2.27-1.3.amzn1.x86_64   Error: httpd24 conflicts with httpd-2.2.27-1.3.amzn1.x86_64    You could try using --skip-broken to work around the problem    You could try running: rpm -Va --nofiles --nodigest   Looks like it want me to downgrade httpd24 to 2.2, but I had to change for 2.4 a few months ago in order to get SSL working...  I'm a noob at linux server admin, could anyone help me please ? Thanks  Versions OS : Amazon Linux 2013.3 PHP version : 5.4.26 httpd version : 2.4.10    Command : yum install --enablerepo=remi php-devel Remi repo being   PS : I found a file that seems to be ok at choon.net, but I don't really know if I can install it without any risk.


Identifying the center of the dihedral group of order $2n$

If $$D_{2n} = \{r^i s^j, \quad 0 ≤ i ≤ n − 1, \quad 0 ≤ j ≤ 1 \}$$ is the dihedral group of order $2n$, show that the center of $D_{2n}$, $n > 2$ is the trivial subgroup if $n$ is odd, and is the subgroup $\{e, r^{n/2} \}$ if $n$ is even.  I don't know how to proceed with this one. Kindly help. Thanks in advance.


Using an objects velocity to determine if it falling on a player will kill it

I've been attempting to make a falling object kill a player, but i still want to make sure the player can touch and interact with the object to move it around without dying. The code i've made so far somewhat works as it wont kill the player when they move it will kill the player when it falls and hits them, but the problem is it only works if they have not moved yet from their spawn position (could also be true for when they have stood still for a second). Here is my code  using System.Collections; using System.Collections.Generic; using UnityEngine;  public class BoxyKill : MonoBehaviour {     public Rigidbody2D rgbd;     public CharacterController2D character;      private void OnCollisionEnter2D(Collision2D collision)     {         if (collision.gameObject.tag == "Player")         {             Debug.Log("Hit player");             if (rgbd.velocity.y <= -5f) {                 character.Damage(10);                 Debug.Log("Hit player 2");             }         }     } }   Note - the 'rgbd' is the boxs and this script is attatched to the object  Thanks!  UPDATE  So as of DMGregorys suggestions i have updated the code and while it works i have encountered the same problem (however a lot more controlable this time)   Here is my current code      public Rigidbody2D _body;     private float minimumDamageThreshold=10;     private float collisionDamageScale=.0001f;       void OnCollisionEnter2D(Collision2D collision)     {          Vector2 normal = collision.GetContact(0).normal;         Vector2 impulse = ComputeTotalImpulse(collision);          Vector2 myIncidentVelocity = _body.velocity - (impulse / _body.mass);          Vector2 otherIncidentVelocity = Vector2.zero;         var otherBody = collision.rigidbody;         if (otherBody != null)         {             otherIncidentVelocity = otherBody.velocity;             if (!otherBody.isKinematic)                 otherIncidentVelocity += impulse / otherBody.mass;         }          // Compute how fast each one was moving along the collision normal,         // Or zero if we were moving against the normal.         float myApproach = Mathf.Max(0f, Vector3.Dot(myIncidentVelocity, normal));         float otherApproach = Mathf.Max(0f, Vector3.Dot(otherIncidentVelocity, normal));          float damage = otherApproach - myApproach;         Debug.Log(damage);         character.Damage(damage);     }     static Vector2 ComputeTotalImpulse(Collision2D collision)     {         Vector2 impulse = Vector2.zero;          int contactCount = collision.contactCount;         for (int i = 0; i < contactCount; i++)         {             var contact = collision.GetContact(0);             impulse += contact.normal * contact.normalImpulse;             impulse.x += contact.tangentImpulse * contact.normal.y;             impulse.y -= contact.tangentImpulse * contact.normal.x;         }          return impulse;     } }   It now works and will kill the player, and i have it printing out the damage in the debug for the character script damage function. The only problem is, it will constantly damage the player if it touches the box at all, and the player needs to be able to move the box around so this will slowly kill it. This could be a problem with the variable amounts that i have configured due to a lack of understanding (and a lot of mindless fideling to be honest).


I was told that $$ \int_0^{\infty}\frac{x^3}{e^x-1}dx=\frac{\pi^4}{15}$$ in physics class.  I have no idea to compute this integral by hand. Could someone help me?


Expectation value of momentum in any bound state

How do we prove that the expectation value of momentum operator in any bound state is zero ?  $$ \langle \hat{P} \rangle_{\text{bound state}}=0 $$  and what about the position expectation value ?  How do we prove it for a general case. How do we get a physical intuition from the corresponding wavefunctions ?


Find conditions for a surface of rotation to be regular

I am reading  by Bjørn Jahren, and have some questions about exercise 5.1.4, which says the following:     Let $\alpha(u)=(f(u),g(u)),u\in[a,b]$ be an embedded curve in the $xz$-plane such that $f (u) > 0$ for all $u$. Find a parametrization of the surface of rotation obtained by rotating $\alpha$ around the $z$–axis and find conditions for this to be a regular surface.      Discuss what happens if we remove the condition $f (u) > 0$.   A regular surface is defined by the following:     Definition 5.1.3. Let $S$ be a subset of $\mathbb{R}^3$ which is also a smooth surface, and let $\iota: S \to\mathbb{R}^3$ be the inclusion map. $S$ is called a regular surface if for every local parametrization $x$ of $S$ the Jacobian of the composition $\iota\circ x$ has rank 2 at every point.   A parametrization of this surface is given by $(u,t)\mapsto(f(u)\cos(t),f(u)\sin(t),g(u))$. By the definition of regular surfaces, we need the Jacobian of this parametrizationto be of rank 2. The Jacobian has the columns $(f'(u)\cos(t),f'(u)\sin(t),g'(u))$ and $(-f(u)\sin(t),f(u)\cos(t),0)$. If $g'(u)\neq0$ they are linearly independent if and only if $f(u)\neq 0$, since $\sin$ and $\cos$ are not 0 in the same point. If $g'(u)=0$ linear independence is equivalent to the matrix   $\begin{bmatrix} f'(u)\cos(t) & -f(u)\sin(t)\\ f'(u)\sin(t) & f(u)\cos(t) \end{bmatrix}$  having nonzero determinant, i.e. that $f(u)f'(u)\neq 0$. To conclude, the Jacobian has rank 2 if and only if $g'(u)\neq0\land f(u)\neq0$ or $f(u)\neq0\land f'(u)\neq 0$. Under the condition $f(u)>0$, that is if and only if $\alpha'(u)\neq 0$.  Where do I go from here? I have found conditions given one specific parametrization, but I need to show it for all possible parametrizations. How do I generalize the result? ((EDIT: Maybe this suffices, since I can create an atlas with just this parametrization, by varying the domain?)) What about the points $a$ and $b$ are mapped to? Can I find a parametrization from an open subset of $\mathbb{R}^2$ around these? And what happens if we remove the condition $f(u)>0$, how should I attack that?  Here is a handwritten (i.e. not so readable) and brief solution which may be of some use:  (Available .)


How to remove duplicate letters from a string? Caesar Cipher

import java.io.InputStream; import java.io.OutputStream; import java.io.IOException;  /**    This class encrypts files using the Caesar cipher.    For decryption, use an encryptor whose key is the     negative of the encryption key. */ public class CaesarCipher {    private String keyWordString;    private String removeDuplicates(String word){      for (int i = 0; i < word.length(); i++) {         if(!keyWordString.contains(String.valueOf(word.charAt(i)))) {             keyWordString += String.valueOf(word.charAt(i));         }     }     return(keyWordString); }     /**       Constructs a cipher object with a given key word.       @param aKey the encryption key    */    public CaesarCipher(String aKeyWord)    {         keyWordString = removeDuplicates(keyWordString);       keyWordString = aKeyWord;       //create the mapping string       //keyWordString = removeDuplicates(keyWordString);       int moreChar = 26 - keyWordString.length();       char ch = 'Z';       for(int j=0; j<moreChar; j++)       {          keyWordString += ch;          ch -= 1;       }       System.out.println("The mapping string is: " + keyWordString);    }     /**       Encrypts the contents of a stream.       @param in the input stream       @param out the output stream    */          public void encryptStream(InputStream in, OutputStream out)          throws IOException    {       boolean done = false;       while (!done)       {          int next = in.read();          if (next == -1)           {              done = true;           }          else          {             //int encrypted = encrypt(next);             int encrypted = encryptWordKey(next);             System.out.println((char)next + " is encrypted to " + (char)encrypted);             out.write(encrypted);          }       }    }     /**       Encrypts a value.       @param b the value to encrypt (between 0 and 255)       @return the encrypted value    */    public int encryptWordKey(int b)    {       int pos = b % 65;       return keyWordString.charAt(pos);    } }   When I am going to run this code it gives me a run time error that says:  Exception in thread "main" java.lang.NullPointerException     at CaesarCipher.removeDuplicates(CaesarCipher.java:15)     at CaesarCipher.<init>(CaesarCipher.java:29)     at CaesarEncryptor.main(CaesarEncryptor.java:29)   Let's say I enter JJJJJJJavvvvvaaaaaaa and I want it to yield Java and give me the encrypted code. In order to differentiate from the other question that was already asked I need the removeDuplicates method to execute and have the output to print JavaZYWW.....etc. Any help or suggestions? I help would be greatly appreciated


How do I get terms as a list for a specific post?

get_terms allows me to get all taxonomy values, but how do I limit this to a certain post?  I don't see anyway to feed a specific post ID to get_terms:   Perhaps there is another way to achieve this?


What does it mean that a Wizard is more powerful than another?

When wizards are dueling, if they both know how to cast the Killing Curse, then what is the meaning of one being more powerful than the other?  Specifically, we are repeatedly told how powerful Voldemort is. What exactly does this mean? Except for his Horcruxes, he should be no more advantaged in a duel.  PS: This question is not a duplicate. Its essence is that being able to cast a killing curse is the epitome of magical power in duels, and so Voldemort should not have become anybody special.


Installing CMAKE's latest version from binary without using sudo

I am currently trying to install some executable files in the cluster supported by my academic institution. When running the installation for a particular executable, I am asked to update my CMake version to at least 3.1 (the cluster currently has CMake 2.7). However, I am not a sudoer in the system and can't use 'sudo' or 'apt-get'.   Thus, I am trying to install CMake from source, and the cluster runs on Linux. I've search online on how to do this, but I always run into the trouble of having to use 'sudo', 'apt-get' or './bootstap' which I do not have and can't get without the  'sudo' command.  What is the easiest way to install CMake on my home directory and instruct the cluster to run the new CMake version without using sudo?


Where can I ask a question about employment?

I would have thought careers.stackoverflow.com would have been the place, but I don't see a forum.  I have a question about advancing career positions in IT.


What is an example of Gibbs free energy?

I know it is a letter $G$ in some equation. What I want to know is the example. Is it like chemical bond energy? I read the  on Gibbs free energy but I couldn't understand it. I don't know what exactly the non-expansion energy is. I would like explanations about what Gibbs free energy really is, preferably in a manner as if I were really watching the molecules and their interactions and movements. Edit: For example, Microscopically, the internal energy can be analyzed in terms of the kinetic energy of microscopic motion of the system's particles from translations, rotations, and vibrations, and of the potential energy associated with microscopic forces, including chemical bonds. Can you describe Gibbs free energy like this?


Create and run alias file for command line

I have created a file "~/.aliases" file with the content:  # git stuff alias ga="git add" alias gaa="git add ."   in "~/.bashrc" at the top I have this code.   # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples  . ~/.aliases   I thought this should work but when I run, for example, gaa in the command line, I get an error.   No command 'gaa' found, did you mean:  Command 'gav' from package 'gav' (universe)  Command 'gap' from package 'gap-core' (universe)  Command 'gpa' from package 'gpa' (universe)  Command 'aa' from package 'astronomical-almanac' (universe)  Command 'gac' from package 'gap-dev' (universe)  Command 'gak' from package 'gui-apt-key' (universe) gaa: command not found


I am working on some review problems right now and am extremely stuck on how to solve problem - any help would be so appreciated. We are told to consider the following combinatorial problem:     Unit Intersection: Let X = {1, 2,...,n}. Given a family of subsets $S_1,...,S_m$ of X, determine whether there is a subset T of X such that for all i,|T ∩ $S_i$| = 1 ?   I am then trying to prove that Unit Intersection is NP-complete using a reduction from Exactly-One-3SAT. In the Exactly-One-3SAT problem, we are given a 3CNF formula, and need to decide whether there is an assignment to the variables such that every clause contains exactly one true literal. In a 3CNF formula, every clause has at most three literals. A clause in a 3CNF formula may contain repeated literals.  I've been working for hours trying to find a way to solve this problem, but am so stuck right now. Thank you in advance for any help.


Can/should math majors consider graduate school in physics?

I am a math major in my early years of undergrad, and I'm wondering if math majors can or should consider pursuing graduate school in (theoretical) physics. I don't think there's a barrier in terms of logistics, since there's quite a bit of overlap between pure math and theoretical physics — but I'm not sure if math majors fulfill the prerequisites (if any) to pursuing graduate school in physics. Would a typical math major be required to take some more physics classes than usual, or have some research experience in theoretical physics before trying for grad school in related areas? Or are schools (and advisors) happy to accept pure math majors with minimal physics background whatsoever (maybe to start certain things from scratch in grad school)? My question is specific to PhD programs right after undergrad, and schools in the U.S. or U.K.


Can't delete folder (in Windows 10) that contains special character

I have run into something that looks like a bug in Windows.  I have extracted a RAR archive onto my PC and the extracted folders cannot be deleted by any means!  My OS's language is English with some culture aspects of it set to Greek.  The character that seems to create the problem seems to be 'å'.  Here is a screen-shot that displays the problem:    Using DEL from the cmd doesn't seem to help.  When I try to delete the folder from Explorer nothing happens.  When I try to rename the folder from Explorer I get these weird messages :      Seems like a part of Windows thinks it's a file, while another part of it thinks it's a folder.  So, the question is: does anyone know what goes on here and any way to delete this thing?  EDIT:  As you can see, I have found a solution. But if someone could explain to me WHY Windows has problems with this character while it generally supports Unicode, let me know. I would like to understand the internals of it... (that's the only difference from the other question, I guess)  Does NTFS support both Unicode and ASCII files names and that file used ASCII (for some reason)? Then if it used ASSCII, how on earth was the character displayed correctly in Explorer?


Hi I have a question regarding of limits to infinity please help! Thank You!  The question states the user to find the following limit:  $  \lim_{n\to\infty} n^2 ({\sqrt[n]{x}-\sqrt[n+1]{x}}) $      Where $(x > 0) $  Thank You!!!


wanting a javascript regex notation for replacing cases

e.g.  I want to write a camelToSnake()  camelToSnake = (phrase) ->   return phrase.replace(/([A-Z])/g, /-\L$1/)   is there such options


Any way to control light halos in the compositor based on emission level?

I am wanting to animate a row of LED lights. I have separated the LED lights from the rest of my object with the pass index/ID mask functions; currently all of my LED lights are on pass index #1.  What I want is to have a minor halo effect around the lights, but only when they are active. Currently, when I add a halo effect to my pass index #1, all of the LED lights have a halo effect regardless if the LEDs are emitting light. All LEDs are diffuse and emission shaders, so I can animate by controlling the mix amount between diffuse and emission.   Is there any simple way to have the halo effect created through recognizing light emission values, or will I have to just animate each LED as its own layer of compositing?


Is there any tool for  for Ruby (1.9)? , but maybe there is another tool.  I'm aware that a  has been asked here, but it was a couple years ago and I hope that something has changed.


How to change row color based on a single cell's value?

Possible Duplicate:          I have a spreadsheet where I have cell within a row that will contain specific text via data validation. So for instance a cell could contain the text "Due in 7 Days", "Past Due", or "Closed".  I want the row color to change depending on the text that appears in the cell. So if the text "Past Due" appears in the cell I want that entire row to turn red, if "Due In 7 Days" appears the row should turn yellow, and if "Closed" the row would turn gray.  How can I do that?


How to achieve a wet and dark outline like this

I'm using adobe illustrator and I am putting watercolor effect on my elements. I want it to look like this:   I have added a watercolor background to the element, but then my art looks very plain and flat:     I want to add a thick outline to the art to make it look like the original. Or here are some more examples:


Which is bigger? $Ackermann(G_{64}, G_{64})$ or $G_{G_{64}}$

I have been playing around with the Ackermann function a bit and realized that it gets very big very fast. (Im going to use $A$ for $Ackermann$ throughout this question)  Already $A(5,1)$ is (according to ) an integer too large to represent. It also presents me with a representation that looks like this:   $$ A(5,1) = 2 \uparrow \uparrow \uparrow 4 - 3 = 2 \uparrow^{3} 4 - 3 $$  After playing around a little I found out that it always represents it like this:  $$ A(n,m) = 2 \uparrow^{n-2} (m+3)-3 $$  After seeing this I started to wonder what would happen if you use Graham's number as the arguments. Since the value of it would uncomprehensible I tried to find something to compare it against. Remembering how the number is defined I asked myself if $G_{G_{64}}$ is bigger than $A(G_{64},G_{64})$?  Or in other words:  $$ A(G_{64},G_{64}) = 2 \uparrow^{G_{64} - 2} (G_{64} + 3) - 3 $$ vs $$ G_{G_{64}} = 3 \uparrow^{G_{G_{64}} - 1} 3 $$  I personally supspect it is $G_{G_{64}}$ since it  has a lot more arrows but I'm not entirely sure.


Where can a European buy a US prepaid credit card with a registration address in the US?

I am from the Netherlands and I want to registrar my drone to get a licence. This can be done with an US prepaid credit card with a registration address in the US.  Next month I would be flying to Denver Colorado USA.  What is the easiest way to obtain this card?


How to move minimize maximize and close button to left in ubuntu 17.10? I want them like in old days.  .


How do I merge two columns together in Google Spreadsheets?

I have two columns [first name] [last name]  I need to merge them to one column to see [first name last name]


how to download and Install Latex on Ubuntu 15.04?  Please Help,


Where do I enter cheats, and what do they do?

I joined a co-op game and was notified that I can't earn achievements because my partner was using cheats. What cheats are available and how do I activate them?


This may sound repititve question. But the error incurs after following multiple links found like:  and .  The controller:  public with sharing class SFLoginCtrlr {     public static HTTPResponse getResp(String loginCred){         Map<String, Object> mapLoginCred = (Map<String, Object>)JSON.deserializeUnTyped(loginCred);         String username = ''+mapLoginCred.get('username');         String password = ''+mapLoginCred.get('password');         HttpRequest req = new HttpRequest();         req.setMethod('POST');            req.setTimeout(60000);         req.setEndpoint('https://www.salesforce.com/services/Soap/u/29.0');         req.setHeader('Content-Type', 'text/xml;charset=UTF-8');                 req.setHeader('SOAPAction', '""');         req.setBody('<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><login xmlns="urn:partner.soap.sforce.com"><username>' +username+ '</username><password>' + password + '</password></login></Body></Envelope>');                 HttpResponse res = new Http().send(req);         return res;     } }   The mock class:  @isTest global class ExampleCalloutMock implements HttpCalloutMock{   global HttpResponse respond(HTTPRequest req){     HttpResponse res = new HttpResponse();     res.setStatus('OK');     res.setStatusCode(200);     res.setBody('SUCCESS');     return res;   } }   The test class:  @isTest private class SFLoginCtrlrTest{     static testMethod void SFLoginCtrlrTestMethod(){         Test.startTest();          Test.setMock(HttpCalloutMock.class, new ExampleCalloutMock());          Map<String, String> logincred = new Map<String, String>();         logincred.put('username', 'dummy@user.com');         logincred.put('password', 'notapassword');          SFLoginCtrlr.getResp(JSON.serialize(logincred));          Test.stopTest();     } }   The error received while running test class:     Methods defined as TestMethod do not support Web service callouts   Not sure, where is the issue...


Available space not changing when resizing a partition

In my computer I have several partitions. I have one partition with Fedora that had just below 40 GB of space, and which I wanted to make bigger. Therefore, using GParted, I moved 10 GB from another partition to the Fedora partition. Now, according to GParted, I should have just below 50 GB (see sda12):  However, from Fedora itself the available space looks different:  This was the same space that was available before I resized the partition. How do I make that space actually available to Fedora?


I own a domain, suppose www.something.com. How can I make a web page with a link like www.abc.something.com ? I want to add something in front of the root domain name. Please help.


apt link is not working in opera browser

Opera web browser is not working with apt: links. Is there any solution for this problem? I downloaded this opera 32 bit deb from their website and my distro is Ubuntu 12.04.


In the review pages the question text bleeds through the action box on top

When using the review functionality and I scroll down, the Answer text is hidden by the information box but buttons and tags are visible. The question however completely shines through. See screenshot below. The Answer is above the "Vote up or down to rate the answers helpfulness" and the question is below.


"matrix is not positive definite" - even when highly correlated variables are removed

I am running a factor analysis in SPSS and get a "matrix is not positive definite" error from my correlation matrix. I've tried removing correlated variables, but I have to remove all variables down to those with correlations of r = 0.8 before the "positive definite" issue is resolved. This seems weird, as I have read that this problem normally arises where two or more vbls are nearly perfectly collinear (to me, r = 0.8 is a high correlation, but not near-perfect.) Can anyone suggest a way of dealing with this issue that doesn't just involve arbitrary removal of variables until the problem goes away? Or perhaps explain why I am getting the issue even when I seem to be removing all the really highly correlated variables?              [edit by Gottfried Helms:] By comment to an answer the OP says, there are 14 variables on 10 cases per correlation.


Dictionary says 'lay over' means 'a short stop in a journey', 'stopover', but  I don't understand this sentence translating 'lay over' as 'stopover'.   Here is the sentence, which is from 'Baker's blue-jay yarn' by Mark Twain:     And there's yet another thing; in the one little particular of scolding - just good, clean, out-and-out scolding - a blue-jay can lay over anything, human or divine. Yes, sir, a jay is everything that a man is.


Getting a refund from Tap Portugal due to COVID 19

I think this question has been asked a couple of times such as:       however I'm trying to determine if things have changed since.  I've booked a package holiday with Expedia that consists of a hotel, and flights from London Heathrow to Lisbon and back with the departure date this Thursday. The problem I'm having is trying to get a refund from TAP Portugal with regards to both flights.   The flights were cancelled by the airline at the start of the month and Expedia sent me an email for credit vouchers. There obviously no good to me as I don't have any intentions of flying to Portugal for the next two years and the chance of the airline surviving after this could also be questionable.  I've spoken to Expedia today who have said they can't do anything with regards to the refund as they follow the airlines policy - however I spoke to TAP who are suggesting I speak to Expedia for a refund.   What would be the best way to go through with this? I had booked everything using an American Express Card too - would raising a chargeback still be appropriate or should I ring up TAP or Expedia and find out why I can't get a refund under the specific EU laws?  Edit  Not sure why this question has been closed. The previous question was asked before this crisis got worse with rules changing daily.


How do I resolve an error when attempting the "opam init" command?

Here is the command:     opam init  Here is the error I am getting:     bash: /use/local/bin/opam: cannot execute binary file: Exec format error  Are there any suggestions on what we should try?


How to copy a Web Application or Site Collection structure without the content

I was wondering if it is possible to create a backup of a Web Application or (top level) Site Collection and restore it without the contents (documents) in order to preserve only the site structure (and features).  The gist is to create a copy of the production environment without the documents for a new development environment.  Thank you in advance.


Do I need DATV to meet family at the Heathrow airport during my layover for a connecting flight?

I am travelling from India and have 7.5 hours of layover at Heathrow airport for my connecting flight to Canada. I am arriving on terminal 4 and connecting flight departs from terminal 2. In the meantime of my layover a few of my friends wants to visit me at the airport so do I need DATV to meet them personally? Or is it possible to meet friends at the airport without any transit visa as I am not going out of the airport premises. Do I have to collect my bags and recheck-in if I have DATV? Is there any other possible way to spend the layover time with my friends at the airport?


Proof by induction: inequality $n! > n^3$ for $n > 5$

I'm given a inequality as such: $n! > n^3$ Where n > 5,   I've done this so far:  BC: n = 6, 6! > 720 (Works)  IH: let n = k, we have that: $k! > k^3$  IS: try n = k+1, (I'm told to only work from one side)  So I have (k+1)!, but I'm not sure where to go from here.  I've been told that writing out: $(k+1)! > (k+1)^3$ is a fallacy, because I can't sub in k+1 into both sides, but rather prove from one side only.    Any Help on how to continue from here, would be much appreciated.


I have string    string s1="5 2 13 * +" //as prefix expression.   I want to obtain reversed of above matrix like this.  "+ * 13 2 5"  I have tried stringstream but it make "+ * 31 2 5" and I lost my "13" and I gets "31". This not good my computation.   How can I do? For helping thanks.


I have a question about splitting column values in T-SQL. I have   Address_col  Nevada,USA Tokyo,Japan Hanoi,Vietnam   I want to split the values by comma to   Address_col     Country  Navada          USA Tokyo           Japan Hanoi           Vietnam   How can I do that?


Book Recommendation for mathematical finance

Does anyone know a book which covers topics on:  Brownian Motion   Martingales   Stochastic Calculus  Stochastic Differential Equations   Options pricing. Black-Scholes model  Fundamental Theorems. Interest Rates   Random Walk   Applications in Insurance   Simulations. Convergence   Simulation methods   I would like something in-depth, but at an undergraduate level.


Test for convergence of the series $\sum_{n=1}^{\infty}\frac{n}{\sqrt{n^2 +1}}$

How does one test for convergence of $\sum_{n=1}^{\infty}\frac{n}{\sqrt{n^2 +1}}$?   My work ...  First I had a look at the series.  $S_n = \frac{1}{\sqrt{2}}+\frac{2}{\sqrt{5}}+\frac{3}{\sqrt{10}}+\frac{4}{\sqrt{17}}+...$  I used Geogebra and the series clearly diverges.  I was going to compare this series to:   $S^{'}_n = 1+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\frac{1}{\sqrt{4}}+...$  ... but I couldn't see anyway of showing that:   $S_n \ge S^{'}_n$  When I use the ratio test I get:   $\frac{(n+1)\sqrt{n^2+1}}{(n)\sqrt{n^2+2n+2}}$  Which I can't see any way of simplifying.  What method should I use here?


Creating Drive time analysis service area using ArcGIS Network Analyst?

Although reasonably experienced with ArcGIS I am a bit of a newbie with Network analyst. I have a situation in which things work Ok with the tutorial data but not with mine!  I am trying to determine an 8km road distance from a set of hospitals in East Africa. I have some roads data that I can build into a network. As far as I can see there is full connectivity. If I work using detailed polygons  (which is what I want) I get this.    So the "service area does not go along roads A,B and C, which I would expect it to. and how on earth does it think I am going to get to Point D!!.  Using generalised polygons I get this:    Now I have lost the slightly anomalous point D, but the services area still does not traverse roads A and B.  I am using ArcGIS 10.2 for Desktop.


I have the problem that whenever I want to Install something, there is this lovely error:  /usr/sbin/update-initramfs: 158: /usr/sbin/update-initramfs: mv: not found   I could trace this error back, and the problem is actually this one:  Command 'mv' not found   Now I have the quite interesting task to install the mv-command without being able to install any new Packages. Using Dolphin on Kubuntu 18.4 (I guess it is that one since I didn't do any updates) I am able to copy files, and if someone was able to give me some kind of source file for the mv command, I could "simply" change the update-initramfs file in order to install coreutils which then would "repair" my not actually broken ramfs.  Any Help would be cool, a friend already told me that I would have to completely reinstall the system, if it is possible to prevent that from happening, I would very much appreciate it.  And I guess it is possible to copy with root privileges, but I haven't tried that yet.  Thanks for everybody trying to help.  Edit: in /bin there isn't a file called coreUtils or something like that, I don't know if there should be  ls: cannot access '/bin/mv': No such file or directory   /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games /snap/bin


How to simulate random correlation matrix containing off diagonal structures

I want to simulate a correlation matrix which has some off-diagonal structures and also should have some hierarchical structures. For simulating correlation matrices which contain hierarchical structures, I am using . But, I don't know how to add off-diagonal structures to it. I want to simulate a correlation matrix which somewhat have off-diagonal structures as below image    An example of a hierarchical structure in the correlation matrix is below image   Does anyone have a suggestion on how to simulate such correlation matrices?


I want to be able to make my category.php display like this:  2013 Title 3 Title 2 Title 1  2012 Title 3 Title 2 Title 1   It's already been done for  but how do I get it to display only the category being viewed?   Any assistance would be appreciated.  Thank you!


I'm interested in labelling my latex equation, by giving the physical phenomenon contributing to the term. For instance x = f(y) + g(y). So a horizontal curly bracket to explain that f(y) is derived from some phenomenon, say resistance and g(y) is derived some other phenomenon, say gravity.   How can I give a name to f(y) as resistance and g(y) as gravity in the equation? Hope I'm able to explain my intentions.  Thank you, Aditya


Change the color of the reference citation from bright green to black

I have this part in my thesis template and I want to change the citation color from bright green to black.  How can I change the citation color from bight green to black?  text.tex  \documentclass[     11pt,     english,     twoside,     a4paper,     BCOR8.25mm,     DIV10,     headsepline,     footsepline ]{scrbook}  \usepackage{a4}    \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{cite} \usepackage{color} \usepackage[bookmarks=true,                     bookmarksopen=true,                     bookmarksnumbered=true,                     colorlinks=true,                     linkcolor=black                                      ]                    {hyperref}  \begin{document}  Mowing down trees, flooding streets and battering buildings, Patricia hit land as a Category 5 hurricane on Friday evening before grinding inland. It moved quickly but lost power in the mountains that rise up along the Pacific coast and was downgraded to a tropical depression on Saturday morning as it headed through central Mexico \cite{recordingData}          \bibliographystyle{ieeetr}         \bibliography{bibliography}  \end{document}   bibliography.bib  @article{recordingData,   author = {Leon Stenneth and Ouri Wolfson and Philip S. Yu and Bo Xu},   title = {Transportation Mode Detection using Mobile Phones and GIS Information}, journal = {ACM DL},   year = {2011},     pages = {3} }


Arrows for which kinds of bows constitute different items?

Since the lengths of the bows and, presumably, the optimal drawn string - bow center distance, are different, my DM has said that shortbow arrows and longbow arrows are different items, and trying to use a shortbow arrow with a longbow, or vice versa, would result in a penalty to attack rolls.  I am not sure whether this is an official rule or a houserule of hers, but that's not the main point. (Although I'm still curious about this.)  My main question is, by this logic, do a longbow arrow and a composite longbow arrow constitute separate items? In other words, is a longbow similar enough to a composite longbow for arrows made for one of them to be usable with both?


I've got text with whitespace (including a newline) that I need to replace. I'd like to use sed, but AIX doesn't seem to support the  to sed newline questions I found. The version of bash I'm using is "GNU bash, version 3.00.16(1)-release (powerpc-ibm-aix5.1)"  If I run a command that outputs a bunch of pairs of lines of text like:  alias:  aliasname                 10:00:00:00:00:00:00:00   What is the best way to make it one line for each? If I use ssh user@system command | tr '\n' ' ', it replaces both newlines, and I need to keep the last one or else the output goes into a single line.  Edit: what I've tried so far is:   | sed -e ':1' -e 'N' -e '$!b1' -e 's/\n/ /g' which replaces all the newlines, putting the entire output stream into a single line. | while read i; do printf "%s " $i; done; echo which also replaces all the newlines | tr -d '\n' and | tr -d '\n'; echo, which still replace all newlines, however the echo adds one back at the last command.


How to print the compression speed of a zip file in java?

I have a simple compressor which converts a file to .zip . How can I find out the compression speed in order to print the speed ?  This is my compressor:  public class Compressor {     private static byte[] buffer = new byte[1024];      public static void compress(FileInputStream file) throws IOException {         FileOutputStream fos = new FileOutputStream("compressedFile.zip");         ZipOutputStream zos = new ZipOutputStream(fos);         ZipEntry zipEntry = new ZipEntry("file.txt");          zos.putNextEntry(zipEntry);          int len;         while ((len = file.read(buffer)) > 0) {             zos.write(buffer, 0, len);         }          file.close();         zos.closeEntry();         zos.close();          System.out.println("Done");     } }


Show that if (G,*) is a group of order 1681 , G is commutative.

Can someone help me with this?  also 1681 is a square of a prime number(41).Can we say the same statement for p^2? where p is any prime?


Youngs experiment - Why only 1 frequency?

I think the title is pretty self explanatory, although I wasn't very sure about how to formulate it properly. I am currently studying Young's double slit experiment and some related stuff. One of the requirements for this experiment to work is that the light source has to be coherent.  coherent = only one wavelength and invariable phase.  So, imagine I use a normal light bulb (in stead of a light source that emits one single wavelength) and try to reproduce Young's double slit experiment. A light bulb emits multiple frequencies. The light reaching both slits will be exactly the same as it comes from the same source. So you can perfectly get positive and negative interference and see a pattern on the other side (I think). There will already some sort of interference (generating ) of the longer wavelengths with the shorter wavelengths and so forth before they reach the screen. So this more complex waveform afterwards reaches both slits. But as this waveform is the same at both slits, I think you could still perfectly be able to see an interference pattern.  So does it really matter whether the source emits multiple more than one wavelength? If yes, why should we care?


Why are there no non-trivial regular maps $\mathbb{P}^n \to \mathbb{P}^m$ when $n > m$?

Question. Let $k$ be an algebraically closed field, an let $\mathbb{P}^n$ be projective $n$-space over $k$. Why is it true that every regular map $\mathbb{P}^n \to \mathbb{P}^m$ is constant, when $n > m$?  I can't see any obvious obstructions: there are certainly homomorphisms of function fields (giving rise to the dominant rational maps), and we're not demanding the map be injective or anything. While it is clear that $(F_0 : \cdots : F_m)$ cannot define a regular map on its own unless $F_0, \ldots, F_m$ are all constants, I don't see why it should be impossible to extend $(F_0 : \cdots : F_m)$ by choosing some other $(G_0 : \cdots  G_m)$ which agrees with $(F_0 : \cdots : F_m)$ on the intersection of their domains. Is there something conceptual I'm missing?


What is the full form of an expressionless statement in javascript?

There's a syntax that Javascript adopted from C where you can perform a logical check, without checking anything:  if (foo) {  }   What is this equivalent to? Is it:  if (foo != null) { } if (foo !== null) { } if (typeof(foo) != 'undefined') { } if (typeof(foo) !== 'undefined') { } if (typeof(foo) != 'object') { } if (typeof(foo) !== 'Object') { }   My actual motivation for asking is wanting to ensure that a member "exists" (that is to say, if it is null or undefined then it doesn't exist):  if (window.devicePixelRatio !== null) if (window.devicePixelRatio != null) if (!(window.devicePixelRatio == null)) if (!(window.devicePixelRatio === null)) if (!(window.devicePixelRatio == undefined)) if (!(window.devicePixelRatio === undefined)) if ((window.devicePixelRatio !== undefined))   My concern is if the member is defined, but defined to be null, in which case (as far as i'm concerned) it's not assigned.   I know that the expressionless syntax returns true for a "truthy" value. I'm less interested in a "truthy" value, as an actual value.


I found this font in a book(Structural Steel Design written by Jack C McCormac and Stephen F Csernak), How can I know the type of font?

this is a screenshot of the book(Structural Steel Design written by Jack C McCormac and Stephen F Csernak):


Can I create software for Microsoft Windows in visual studio using Java

I have been learning java recently and is using eclipse as IDE. But , I am not able to make a .exe file with that . all I get is jar file which I know can be executed on the window machine. My question is that can I use Visual studio and create .exe program or for that matter any software for Microsoft Windows using Java ?


How to move a background job from one terminal tab to another?

I have a background job, say jobid 1, in a tab of gnome terminal. Can I move it to a another tab of genome terminal?  I understand that the shell process in the first gnome terminal tab is the parent of the background process. So am I to change the parent/owner of the background process?  I guess that it is the same regardless of a process to be moved is running background or foreground?  Do I need some identifiers of the tabs of gnome terminal, tty things?  I don't really know how to do the above. Just some guessing.


"My goodness" expressed after hearing sad news?

Recently my cat died. He escaped my house and was attacked by a dog. Sadly he didn't survive.  I emailed a male acquaintance ( were not close friends, live long distance, communication is not daily). He's offered a listening ear if I need one. I told him the above ,and that I was feeling sad.  His response by email "My goodness. My heartfelt condolences."  My goodness is expressing surprise?


Compute $\int_0^\infty \frac{\sin(x)}{x}dx$ without residue theorem.

Is there a way to compute $$\int_0^\infty \frac{\sin(x)}{x}dx$$ without residue theorem ?


How to convert a handwritten text on chalkboard to a vector?

I'm pretty much a graphic-design noob. I want to take this equation from this image (I want this handwriting) and convert it into a vector image. How do I go about doing that?


I am trying to write a simple code to understand volatile keyword in java.   The idea is to increment the value of count field of Runner class using two threads. Helper class implements Runnable where run method increments the count which both static and volatile.          class Helper implements Runnable{              @Override             public void run() {                  for(int i=0; i<100000;i++){                              Runner.count+=1;                 }              }         }           public class Runner {              public static volatile long count=0; // to be incremented              public static void main(String[] args){                  Thread t1 = new Thread( new Helper());                  Thread t2 = new Thread( new Helper());                  t1.start();                 t2.start();                  try {                     t1.join();                     t2.join();                 } catch (InterruptedException e) {                     e.printStackTrace();                 }                  System.out.println("Count= "+count); // output expected to be 200000             }          }      The expected output for every run is Count= 200000 , but sometimes i get a different number.   Please help me understand how is that possible


What is the barebones simplest way to recursively rename one extension to another?

I've done a fair share of googling and I've found some rather complex solutions. I feel as though there must be something simpler.  Let's say I have   ./1.txt ./2.txt ./more/3.txt ./more/4.txt ./more/even-more/5.txt   I'd like to rename anything .txt to .info  so   find . -type f -name "*.txt"   .........then what?  EDIT: Pure bash would be preferred


Can I undo the upgrade to iOS 7 by restoring to iOS 6.1.3?

I recently attempted to follow  to upgrade my device (iPhone 4) to iOS 7 without being a developer or registering a UDID.   I loaded and installed iOS 7 and got to the configuration screen. However efter attempting to go through the configuration process it says:     We’re unable to complete your activation. This device is not   registered as part of the iPhone Developer Program. If you are a   member of the Program, please register your device in the iPhone   Developer Program Portal.   The problem is this is also what it says on iTunes so there is no way to access it from the computer.   How can I downgrade back to 6.1.3? I suppose I could register as a paid developer for iOS 7, but that involves forking over $99 and I'm not even sure I could revert to iOS 6 even then.  Additional Information:   I started with an unjailbroken iOS 6.1.3. I downloaded iOS 7.0 CDMA for iPhone 4 from  I have Verizon I Have the iOS 6.1.3 version for my iPhone downloaded from , but I am unsure how I can restore from it because iTunes will not let me do anything because of the above mentioned message.    Update: I managed to entere recovery mode by pressing "power" for 3 seconds, "home" and power for 10 seconds, and just "home" until it had entered recovery mode. I have then begun to restore the phone which requires iOS 6.1.3 to download again through iTunes. Note that the first time you restore it may not work. Mine still booted to iOS 7 until I tried again.


Why are angular velocities of double pendulum small in small angle approximation?

In the lagrangian for double pendulum for small angles, the term $\dot{\theta}_1\dot{\theta}_2 \left [ 1-\frac{(\theta_1-\theta_2)^2}{2} \right ]$ is replaced with $\dot{\theta}_1\dot{\theta}_2$, because $\dot{\theta}_1\dot{\theta}_2  \frac{(\theta_1-\theta_2)^2}{2}$ is neglected. The product $\dot{\theta}_1\dot{\theta}_2$ has the second order of smallness, but why? This  explains for simple pendulum, but says that it is more complicated for double pendulum. What is explanation for double pendulum?  Edit: Correct me if I am wrong, but I think I found the answer. If double pendulum starts oscillating from rest, the potential energy at that moment is $E_{pm}=m_1gh_{1i}+m_2gh_{2i}$, where $h_{1i}$ and $h_{2i}$ are lengths from reference line to centres of masses of two pendulums. In small angles aproximation these heights are $h_{1i}=l_1+l_2-l_{cm1}+\frac{\theta_{1i}^2}{2}l_{cm1}$ and $h_{2i}=l_2-l_{cm2}+l_1\frac{\theta_{1i}^2}{2}+l_{cm2}\frac{\theta_{2i}^2}{2}$. Kinetic energy of first pendulum is $E_{k1}=E_{pm}-E_{k2}-E_{p1}-E_{p2}=\frac{m_1v_1^2}{2}+\frac{I_1\dot{\theta_1}^2}{2}=\frac{m_1l_{cm1}^2+I_1}{2}\dot{\theta_1}^2$. Kinetic energy of second is $E_{k2}=\frac{m_2v_2^2}{2}+\frac{I_2\dot{\theta_2}^2}{2}=\frac{m_2l_{cm2}^2+I_2}{2}\dot{\theta_2}^2$. $E_{k1}=\frac{g}{2}((\theta_{1i}^2-\theta_{1}^2)(m_1l_{cm1}+m_2l_1)+m_2l_{cm2}(\theta_{2i}^2-\theta_{2}^2))-E_{k2}$ $\dot{\theta_1}=\sqrt{\frac{g((\theta_{1i}^2-\theta_{1}^2)(m_1l_{cm1}+m_2l_1)+m_2l_{cm2}(\theta_{2i}^2-\theta_{2}^2))-2E_{k2}}{m_1l_{cm1}^2+I_1}}=\sqrt{\frac{2E_{k1}}{m_1l_{cm1}^2+I_1}}$ $\dot{\theta_2}=\sqrt{\frac{g((\theta_{1i}^2-\theta_{1}^2)(m_1l_{cm1}+m_2l_1)+m_2l_{cm2}(\theta_{2i}^2-\theta_{2}^2))-2E_{k1}}{m_2l_{cm2}^2+I_2}}=\sqrt{\frac{2E_{k2}}{m_2l_{cm2}^2+I_2}}$ Masses and lengths have influence, but $\dot{\theta_1}$ and $\dot{\theta_1}$ should be small because terms $(\theta_{1i}^2-\theta_{1}^2)$ and $(\theta_{2i}^2-\theta_{2}^2)$ are small. Also when $\dot{\theta_1}$ is maximal, $E_{k1}$ is maximal, so $\dot{\theta_2}$ will be smaller. Similar is with $\dot{\theta_1}$. $\dot{\theta_1}$ and $\dot{\theta_1}$ will not be maximal in same time, so their product will be small.


I am experimenting with the multithreading in java and I have a nullPointerException. I try to pass a parameter in my thread and i missed up somewhere but i dunno where. I hope someone can point me where i was stupid :). I wrote this class :   public class MyThread extends Thread{  private String myBelovedParam = null;  public MyThread (String param){     myBelovedParam = param; } public void run(){     try {         AnotherClass.anotherFunction(myBelovedParam );      } catch (InterruptedException e) {         e.printStackTrace();     } }}   And I called it like that :  Thread myThread = new MyThread (theParameterIWant);     myThread.start();   Thanks all and have a good day !  I edit my post (i change the name of everything and i forgot to change some. that why the name of some thread was different).  Here is the error i get in my console :  Exception in thread "Thread-7" java.lang.NullPointerException at play.classloading.enhancers.ControllersEnhancer$ControllerInstrumentation.isActionCallAllowed(ControllersEnhancer.java:187) at anotherFunction(AnotherClass.java) at threads.myThread.run(myThread.java:21)   I tried to change null by empty String -> no Effect When i debug i can see clearly that theParameterIWant is not null.


Why Wi-Fi is getting turned-on automatically in iOS 11

I am using iOS 11 in iPhone 5S but its wi-fi is getting turned-on automatically, is there any way to stop it.


When you change ships does your old one disappear?

I found a ship from a distress signal and misunderstood the inventory prompts when switching to it so all of my old ships inventory is still on the old ship. I have no idea where I left it but I just want to know if it is worth searching for it at all? Will it still be in the same place and will it have everything it had in it before the switch?


I have a problem with the margins that don't seem appropriate ... and i want to change these margins to make it equal on the left and the right, this is a sample of my code :  \documentclass[ a4paper, 12pt, blue, rgb,]{tubsbook} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{lipsum} \usepackage{listings} \usepackage{xcolor} \usepackage{mathtools} \usepackage{hyperref} \usepackage{url} \usepackage{array,multirow} \usepackage{graphicx} \usepackage{subfig} \usepackage{amsmath} \usepackage{algorithmic,algorithm} \usepackage[activate]{pdfcprot} \usepackage{setspace} \onehalfspacing  \title{MULTI-CORE SYSTEM} \logo{\includegraphics{images/c3e_logo.pdf}} \titleabstract{\lipsum[2]} \titlepicture{images/infozentrum.jpg}  \begin{document} .... .... \end{document}   and this is how the margins in the pages look like :  Can someone help me on this?


Question about the answer to "Local polynomial regression: Why does the variance increase monotonically in the degree?"

I appreciated Marco's  explaining why the variance of a local polynomial regression increases monotonically in the degree. However, in the end of the proof, I find difficult to calculate each term in order to conclude the desired inequality.  If I pursue the proof from the last equation there, we can see that $$ \sigma^2 z^\top \left(X^\top X − X^\top q(q^\top q)^{−1}q^\top X\right)^{−1} z \geq \sigma^2 z^\top \left(X^\top X\right)^{−1}z = \mbox{Var}\left[\hat{y}_t\right],$$ by the arguments he mentioned. Then the following inequality holds for all $t\in \mathbb{R}$ $$\mbox{Var}[\hat{y}^∗_t] ≥ \mbox{Var}[\hat{y}_t]+ 2\sigma^2 t^k z^\top B_∗+\sigma^2 t^{2k} D_∗.$$ The conclusion is immediate if $2\sigma^2 t^k z^\top B_∗+\sigma^2 t^{2k} D_∗\geq 0$. Obviously $\sigma^2 t^{2k} D_∗≥0$ by construction of the Schur complement but I don't see how I can show that $2\sigma^2 t^k z^\top B_∗$ is positive for every $t$.  I don't see what I am missing.   Can anyone explain how to finish the proof?


Galois extension with $X^4-2aX^2+b\in\mathbb Q[X]$

Considering the irreducible (by condition) polynomial $f=X^4-2aX^2+b\in\mathbb Q[X]$ and the field extension $K=\mathbb Q(\sqrt{a^2-b})$ of $\mathbb Q$, I want to show the following result:    For $[L:\mathbb Q]=4$ we have $\sqrt b\in K$ where $L$ is the splitting field of $f$.   My thoughts so far: The four roots of $f$ are $\pm\sqrt{a\pm\sqrt{a^2-b}}$. If $L$ is of degree $4$ it must be primitive since $f$ is irreducible, so $L=\mathbb Q\left(\sqrt{a+\sqrt{a^2-b}}\right)$. Then, by multiplying the two roots $\sqrt{a+\sqrt{a^{2}-b}}\cdot\sqrt{a-\sqrt{a^{2}-b}}=\sqrt{b}$ we have that $\sqrt{b}\in L$. Now I want to look at $$\mathbb Q\subset K\subset K(\sqrt b)\subset L$$ and differentiate some cases. The case where $[L:K]=1$ is trivial and the case $[L:K]=4$ can't happen because if we square any root and subtract $a$, we get $\pm\sqrt{a^2-b}\in K$ which means $[L:K]\leq 2$. So let's look at the case where $[L:K]=2$. As I see it, we get two subcases:   For $[L:K(\sqrt b)]=2$ we have $K(\sqrt b)=K$ which finishes the proof. For $[L:K(\sqrt b)]=1$ we have $K(\sqrt b)=L$. This means that $L$ is also the splitting field of $(x^2-b)(x^2-(a^2-b))$. Is this a contradiction? How do I finish this case?


What can I do about my excessively strict parents

Before I start this, I wanted to make it clear that I am NOT "ungrateful" of my parents in any way. I love them more than anything on the Earth, but I feel that they are way more strict than they have to be.  Basically, I cannot have my phone after school or on weekends. I cannot go out with friends or have friends come to me, I cannot walk to my school or gym and my parents tend to treat my other brothers better than me. When I ever I try to talk to them, they put me off with the same response "the rules are not up for discussion". As if this was not restrictive enough, I have no privacy whatsoever. My parents constantly check browsing history and check my messages in the middle of the night without my knowledge. I understand the precautions parents need to take when their kids have phones, but this is just too much. I cant even talk to my friends online (if I even talk that much with them in the first place because I never have my phone) without a manner that my parents would approve of. I also have a feeling that this lack of social interaction is getting to me.   Everything I do is repetitive and boring. I feel like a machine, doing the same thing over and over. In fact, I think this lack of social interaction is why I'm not as good as I used to be in school. Unless I have an incentive to work (ex. "Get good grades on this test and I will let you go out with your friends"), I wont try at all, therefore I would do badly since there was no reason for me to work. I try to explain this to them, but they just won't listen. You are probably thinking I'm delivering it the wrong way, but they end up being the immature ones who start getting mad while I stay silent, trying my best to convince them that social lives do not mean I fall into bad habits or bad influences.   I feel like I express more of my feelings with friends rather than family, and that does not sit right with me. I am ashamed of myself when somebody invites me to hang out with them and I respond with absurd excuses like "I have to catch up on a lot of homework". I am regularly known as the kid who never leaves his house, and the people who mock me for that have every right to do so, because I agree with the fact that this is a boring and repetitive life that I have.  Any good parent would know that this is a restrictive and boring life than the one I deserve. Please help me bring up points to use when I talk to my parents about these issues.


Can you take Gorrilla Glue in Hold Luggage on a plane?

Is glue something that is usually excluded from hold luggage on flights? Its a handy thing to have and I'm considering taking a 60ml tube of Gorilla glue with me.


How do I change this direct speech into reported speech?  Father said,"Never say never."


Looking for a high school level proof of $\gcd (2^n-1 ; 2^m-1)=(2^d-1)$ Where $d= \gcd(m;n)$


As an undergraduate, should I graduate 1.5 to 2 years early with little research experience or 1 year early with a decent amount of research?

So I am an undergraduate student in my third semester and I am mostly done with my double major in Pure and Applied Mathematics/Statistics. I will be done with the requirements for my bachelors by my fifth semester at the latest.  If I want to go for a PhD in Pure Math, would I be better off graduating after my 5th semester or pushing some classes back, taking graduate level classes and seminars in my 6th semester and doing an undergraduate thesis? I have some research done and will be doing more next semester, but that is nowhere near what I would do for the honors thesis.   Alternatively, I could go all out next semester and graduate then. However this would leave me very little time to study for the subject GRE (I am good with the general GRE) and to actually apply for schools due to how busy I will be.  I tried to make this a good question by including as much information as I thought was relevant, but if there are any questions or anything I forgot to mention then please let me know.  Does anyone have advice?


Does Grappling Halve Your Remaining Speed?

This question acts as a clarification to  on this site. Here's the scenario:   You have 60' of movement at the start of your turn You move 30' to any direction You grapple someone at this point How far do you have left to move?


Difference between do_action and add_action

This question might be wrong, I am not sure about it. Because I am not clear on this.  I know add_action it is used to to hook our function to the specified function. For example add_action('wp_head'.'myfunc'); now what ever code in myfunc will be executed in the wp_head(). This is clear but i am having doubt in do_action what it does?  I think it is used to create our own hook like already available hooks(wp_head,wp_footer,..etc) If i am correct can anyone show me a simple understandable answer with simple example.  I have tried the difference in internet but all are pointing to difference between add_action and add_filter. I don't want to go there because first i want to clarify this and then I’ll move there.  Can anybody help me?  EDIT after Question POST  function custom_register() {     echo '<script>jQuery(document).ready(function(){alert("Learning Hooks");});</script>';  } do_action('custom');  add_action('custom','custom_register');   I tried this in plugin but i didn't get the alert message.  But when i hook the same function with wp_head then it is working fine  /******************working****************/ add_action('wp_head','custom_register');


I have added a repo by doing:  add-apt-repository ppa:webupd8team/java apt-get install oracle-java8-installer   output:  Package 'oracle-java8-installer' has no installation candidate


Data loss over ttyACM* in Ubuntu 14.04 whereas success on Ubuntu 16.04 when "cat" command is used

I have a development board which will have 3 ACM interfaces when connected to Ubuntu host and i want to transfer data from Host to Device over ttyACM3.  I have followed the following procedure for data transfer,  Precondition:  1. Modify /etc/inittab to remove Linux console on /dev/ttyGS3  2. Create a binary file with a minimum length of about 20MBytes  Test Steps:  1. DUT side: stty -F /dev/ttyGS3 raw -echo -echoe -echok -echoctl -echoke  2. HOST side: stty -F /dev/ttyACM3 raw -echo -echoe -echok -echoctl -echoke  3. DUT side: cat /dev/ttyGS3 > /tmp/rx_pattern.bin  4. HOST side: cat ./pattern.bin > /dev/ttyACM3  By following above procedure i see some data(~300 KB) is missed at the DUT side randomly when i used Ubuntu 14.04. I have also used "dd" command for data transfer but still there is a data loss.  No data loss seen in Ubuntu 16.04 with the same procedure as mentioned above.  But i tried to transfer the same "pattern.bin" file from the Ubuntu 14.04 Host by using "minicom" application and "cat" command to receive from DUT side, surprisingly i don't see any data loss.  I have took USB Ellisys logs during issue scenario,  1.One of the "OUT" transaction is failed(handshake is NAK) and there is no "PING" transaction for the failed transfer.  2.Whereas in success scenario whenever "OUT" transaction fails, "PING" transaction is present and data is sent again.


Why was the original Q&A apology about Monica Cellio deleted?

After reading on the subject, in one of the many, many Q&As and comments on it, I noticed the original link is now a 404 page ().   What gives?   I understand it experienced a record-level downvote; yet at the same time, it would certainly be interesting from a community history standpoint, especially as passions wane as it becomes bygones.   Perhaps disable answers, edits, and lock it?


It has been well established that stargates use 6 points in space and 1 point of origin to establish a wormhole in the same galaxy(7 chevron address, has been told repeatedly in SG-1) for models later than destiny stargates, but how are wormholes established with destiny-era stargates?  The gates put by seed ships before the destiny was launched use abstract symbols rather than actual constellations. It is hard to get 7 points in space when the ship is moving through billions of light years (said in first episode of SGU). Galaxies move as well as the planetary systems, reason it is hard to have 7 points in space. Destiny-era gates only dial gates in close vicinity rather than later models.


Java-How to insert a string to certain line, say line6, of a txt file

I want to insert a line into a specific location of a .txt file. Now the only way I know is to read out the whole file out as an array, put the given line in the correct place and then write the whole thing back. Is there an easier way to achieve this using Java? My intention is to reduce the file access as much as possible.


Complex Conjugates use with n-gons and circles

a) The equation of the circle centered at $1+2i$ with radius $1$ can be written as $[ z\overline{z} + pz + q \overline{z} + r = 0.]$What is the ordered triple $(p, q, r)$?  b) Let $A_1 A_2 \dotsb A_{11}$ be a regular 11-gon inscribed in a circle of radius 2. Let $P$ be a point, such that the distance from $P$ to the center of the circle is 3. Solve $PA_1^2 + PA_2^2 + \dots + PA_{11}^2.$  I have no clue how to get started on these problems.


this kernel requires an x86-64 CPU, but only detected an i686 CPU But i have a 64bit PC!

I am on 64-bit Windows 8.1. I'm trying to install Ubuntu on VirtualBox. However, I get the error:   this kernel requires an x86-64 CPU, but only detected an i686 CPU Unable to boot - please use a kernel appropriate for your CPU.   But my OS is 64-bit! I have 12GB DDR3 RAM, Intel Core i74700MQ CPU. So why is this happening and how can I fix it?


Can somebody explain me what is "Install it from Software Center", and "install from a command line" please?. I was using another OS and only two days on Ubuntu.Please help me.


how to install Kingsoft Office in Ubuntu 12.04

I am an Ubuntu 12.04 user and I want to install Kingsoft Office but I don't know how to install it.   Please tell me the procedure to install Kingsoft Office in Ubuntu 12.04.


Ways of Updating my Ubuntu 10.10 Notebook

I have recently bought a second-hand notebook, which is running Ubuntu 10.10. I am completely new to Ubuntu and bought this machine because I want to get away from Windows. I now realise that 10.10 is no longer supported and I was advised that I needed to download and install Ubuntu 13. I tried to do this, but was required to give a password in order to do so. I do not have the password, as this is a second-hand machine.   I know that I could start from scratch and install 13, but I'm reluctant to do this, owing to my lack of familiarity with Ubuntu and limited technical skills. Is the only way forward for me to do a complete installation of v13, is there a way to bypass the password?   Thanks in anticipation,   Dave


I have advanced this (image of left), but not know how draw the angle theta.  Help please.  \documentclass[circuitikz,border=5pt]{standalone} \usepackage[latin1]{inputenc}  \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{listings} \usepackage{pgfplots} \pgfplotsset{compat=1.13}  \begin{document}  \tdplotsetmaincoords{70}{120}  \begin{tikzpicture}[     scale = 1.2,     tdplot_main_coords ]      \node[left] at (0,0,0.7) {{\scriptsize $O$}};      \begin{axis} [         xmin = 0, xmax = 6,         ymin = 0, ymax = 6,         zmin = 0, zmax = 15,         axis lines = middle,         ticks = none,         xlabel  = {\scriptsize $x$},         ylabel  = {\scriptsize $y$},         zlabel  = {\scriptsize $z$}     ]      \coordinate (O) at (0,0,0);     \coordinate (P) at (3,3,3);      \node[fill,circle,inner sep=0.5pt] at (P) {};        \draw[] (0,0,0) -- (P) node[anchor = south]{{\scriptsize $P \, (x, y, z)$}};      \draw[] (P) -- (3,3,0);     \node[] at (3.2,3,1.5) {{\scriptsize $z$}};       \draw[dashed] (3,3,0) -- (3,0,0);     \draw[dashed] (3,3,0) -- (0,3,0);      \draw[] (O) -- (3,3,0);     \node[] at (2,1.4,0) {{\scriptsize $\bar{r}$}};      \end{axis}  \end{tikzpicture}  \end{document}


Would a room temperature superconductor break the laws of thermal dynamics?

I know that is roundabout way ask a question about perpetual motion but if I mentioned that in the title. No one would read it 😁 I guess I really need some help with my paradoxical thought. So here goes. it occured to me that one could setup a perpetual motion machine that could perform meaningful work if you had a permanent magnet, a superconductor and some feromagnetic material. There is an old magnetic perpetual motion idea  Now anyone who has played with magnets enough will realise this is impossible because the iron ball will just jump over the hole stick to the magnet. There is no way the ball will fall through the hole.  But it struck me while watching a doco about superconductors that. If you could block the magnetic field with a semiconductor, you could make this silly design work. Now I know you cant. But I want to understand why. And I suspect it's not because  room temperature superconductors break fundamental laws of physics.


prevent the deletion of account records if they have oppurtunity

trigger preventAccountDeletionifopp on Account (before delete) {     for(account accdel:trigger.old){        Opportunity oppprevent =[select Name,(select Name,Owner from Opportunitys)from ACCOUNT =: accdel.id ];         if(oppprevent.size() > 0){           accdel.adderror('Opportunity record is refering this record.So, you cannot delete it...!');         }    } }


Person falls into radiotelescope and his mind gets transported to the far future

This is a fairly long SF story, probably a novella. I read it in the 80's in Spanish in a multi-author collection book. It's probably much older, maybe from the sixties. I remember lots of details about the story but I can't remember the author or the title.   The title might have been "A Midnight Summer Dream", "A Long Summer's Lost Love" or something like that. I'm positive that the title included the word "Summer". Maybe I'm way off with the title and that's why I can't find any information about it.  The protagonist is a contemporary lone inventor creating a new type of radiotelescope that by his calculations should be revolutionary, but can only catch local stations. He climbs into it to see if he can find a defect, slips and falls in. The world fades around him and he finds himself to a cave in the distant future.  His mind has been projected ages into the future, and has been captured by a machine that serves as an oracle of sorts for a primitive species of human. The machine is a terminal for another larger computer that hosts an advanced mind that has gone a bit crazy, called the "Quint" or something similar. Now the machine hosts both and they compete for control.  Throughout the story we learn that the world has evolved and birds have taken control as the primordial sentient species.  The protagonist learns how to let his mind escape out of the machine into the mind of humans and to control them. He uses this to escape the terminal and physically travel in a long journey to the main computer to defeat the "Quint".  Eventually he gets there and mentally battles the "Quint" and finds the way to win and takes over the main computer. He intends to use it to help humans rebuild civilization.  He finally learns over millennia that the Quint was the fifth cycle of sanity/insanity for the other mind. The other mind's purpose was to maintain civilization but eventually would lose its sanity and let civilization decay for long periods. Any mind in his situation will go through those cycles as well, including the protagonist's. But now that there are two minds in the computer, they alternate - with the "sane" mind taking over and keeping the "crazy" one in check while it recovers. The combined. entity is able to protect civilization continuously bringing a continuous age of prosperity.


What to do when you live too far from civilization?

I want to get into Pokemon GO but unfortunately I live out in the middle of nowhere for the next six months. Is there any way I can make progress without having to drop cash, esp. given that I am unable to travel for my current situation?


Prior to The Empire Strikes Back, did anyone predict that Darth Vader is Luke's father?

Every once in a while, I hear about how Darth Vader's name translates to "Darth Father", so those who spoke a foreign language had a clue that he was someone's father. One high profile example of this is Pitch Perfect, where a character who had never seen The Empire Strikes Back predicts the twist ending:  Beca: [Movie endings] are so predictable, like, the guy gets the girl, and that kid sees dead people, and Darth Vader is Luke's father. Jesse: Oh, right, so you just happened to guess the biggest cinematic reveal in history? Beca: "Vader" in German means "father". His name is literally "Darth Father". Jesse: Huh.  Personally, I think that Beca is full of it because "Vader" is a Dutch word, not German (although "Vater" is). But it did raise the question: prior to the release of The Empire Strikes Back, did anybody actually predict that Vader is Luke's father? Or is this just a case of Monday morning quarterbacking?


Thinking of building a new PC with a small (100Gb) SSD and a larger (1TB+) spinning metal hard drive.  Will Focal's installation utility allow me to put grub and the boot files on the SSD, and /var, /etc and /home on the regular hard drive?  I've only ever take the default installation so I'm not familiar with everything it can do...


Date comparison is coming back false even though the Date is equal

I have a datepicker that needs to take the date "12/31/9999" even though maxDate is set to today.  I have it type in like this. However, when I run the comparison in the code, it returns false. private CheckDate(form: FormGroup, group: any) {      if (form.controls["date"].value == new Date("12/31/9999")) {          //form.controls["date"].valid = true;          (group.questions["date"] as DateTimePickerQuestion).maxDate = null;      } }  However, when I compare form.controls["date"].value to new Date("12/31/9999") it comes back as false and doesn't execute my code in the middle. Why is that? Here is a copy/paste of the immediate window checking the values new Date("12/31/9999") Fri Dec 31 9999 00:00:00 GMT-0500 (Eastern Standard Time) {} form.controls["date"].value Fri Dec 31 9999 00:00:00 GMT-0500 (Eastern Standard Time) {} form.controls["date"].value == new Date("12/31/9999") false


Electromagnetic field and continuous and differentiable vector fields

We have notions of derivative for a continuous and differentiable vector fields. The operations like curl,divergence etc. have well defined precise notions for these fields.  We know electrostatic and magneto static fields aren't actually well behaved. They blow up at the sources, have discontinuities and yet we use the same mathematical formulations for them as we would have done for continuous and differentiable vector field.  Why is this done ? Why are laws of electromagnetism(maxwell's equations) expressed in the so called differential forms when clearly that mathematical theory is not perfectly consistent with the electromagnetic field. Why not use a new mathematical structure ?  Is there a resource which can help me overcome these issues without handwaving at particular instances when the methods seem to give wrong results?  Also one of the major concerns is that, given a charge distributions, the maxwell equations in differential form, will always give a nicely behaved continuous and differentiable vector field solution. But the integral form (alone, not satisfying the differential form) can give a discontinuous solution as well. Leading to two different answers for the same configuration of charges. hence there is an inconsistency. Like there is an discontinuous solution for the boundary condition of 2D surface, the perpendicular component of the electric field is discontinuous. ( May be it is just an approximation) and actually the field is continuous but due to not being able to solve the differential equation we give such an approximation, but this isn't mentioned in the textbooks.


How can I find an old flight number from over three years ago? I am trying to make a claim for a delay of over five hours. They sent us to the wrong destination and lost our luggage.


I am going to be using Ubuntu for the first time. How do I install it to hp 3130 cpu? My unit has no OS so I don't really know how to get around it. I was just wondering what if USB stick/drive is not yet recognized, what do I do?


Beamer : How to show together separated things using overlay?

I have to draw and comment simulteanously a complex picture. I can calculate the slide number on witch the comment will appear, but I'd like this be done automaticaly. Is there a way to put labels or some other stuff to synchronise the comment and the drawing. For example to store the current slide number and reuse in the comment ?  Edit   I found almost a solution (I accept of course any other one). Still the problem that \Etape{2} works in the text of the \item, but not as overlay : \item<\Etape{2}->.  I don't know why.  \documentclass[xcolor=dvipsnames,professionalfont,french]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \makeatletter \def\c@slideinframe{\beamer@slideinframe} \def\beamerslideinframe{\beamer@slideinframe} \makeatother   \usepackage{fourier,tikz,ifthen} \usetikzlibrary{calc}  \usepackage[french]{babel}  \tikzset{%     small dot/.style={fill=black,circle,scale=.3}}  \usetheme{Madrid}               % thème \setbeamertemplate{footline}{}  \setbeamercolor{palette primary}{fg=white, bg=MidnightBlue!90} \setbeamercolor{background canvas}{bg=MidnightBlue!15}  \setbeamersize{text margin left=1 mm} \setbeamersize{text margin right=1 mm}  \beamertemplatenavigationsymbolsempty  \xdef\EtapeCounter{1}  \newcommand{\MyLabel}{% \pgfmathparse{int(1+\arabic{slideinframe})}% \xdef\EtapeCounter{\EtapeCounter,\pgfmathresult}% }  \newcommand{\Etape}[1]{% \pgfmathparse{dim(\EtapeCounter)}% \ifthenelse{%     #1>\pgfmathresult}{%     1%     }{%     \pgfmatharray{{\EtapeCounter}}{#1-1}%     \pgfmathresult%     }% }  \begin{document} \begin{frame}[label=bob]{Title} \begin{columns}[onlytextwidth]  % ############################# %         Tikz Picture        # % #############################  \column{\dimexpr\textwidth-4cm} \begin{tikzpicture}  \coordinate (A) at (0,0) ; \coordinate (B) at (4,0) ; \coordinate (C) at (60:4) ;  \coordinate (K) at ($(C)!.5!(B)$) ; \coordinate (J) at ($(A)!.5!(C)$) ; \coordinate (I) at ($(A)!.5!(B)$) ;  \only<.>{\MyLabel} % Step 1  \foreach \Coor/\Text/\Pos in      {A/$A$/below,     B/$B$/below,     C/$C$/above%     }     \node<+->[small dot] at (\Coor) {} ;  \only<.>{\MyLabel} % Step 2   \draw<+-> (A)--(B) ; \draw<+-> (C)--(B) ; \draw<+-> (A)--(C) ;  \only<.>{\MyLabel} % Step 3  \foreach \Coor/\Text/\Pos in      {A/$A$/below,     B/$B$/below,     C/$C$/above%     }     \node<+->[small dot,label={[label distance=-2pt]\Pos:\Text}] at (\Coor) {} ;  \foreach \Coor/\Text/\Pos in      {I/$I$/below,     J/$J$/left,     K/$K$/right%     }     \node<+->[small dot,label={[label distance=-2pt]\Pos:\Text}] at (\Coor) {} ;    \end{tikzpicture}% -- Fin Tikz Picture  % ############################# %         Commentaires        # % #############################   \column{4cm} \begin{minipage}[t][8.3cm]{\linewidth} \small  \begin{itemize} \item<1-> Placer les points. \EtapeCounter  % works \item<4-> \hyperlink{bob<4>}{Tracer les côtés. \Etape{2}}  % doesn't work % \item<\Etape{2}-> \hyperlink{bob<4>}{Tracer les côtés. \Etape{2}} \item<7-> Nommer les points. \item<10-> PLacer les milieux. \end{itemize} \end{minipage}  \end{columns}  \end{frame}  \end{document}


in bash, is there a shortcut to wipe out typed password?

On the command line (usually bash, and somtimes zsh), I sometimes need to enter a password to authenticate myself. in fact, I need to do that several times a day. Sometimes, you fail typing and instead of hitting return (which is bad sometimes as it is recorded by the server) and type it another time, is there a shortcut (like Ctrl-R for searching the history) to wipe out the typed password and start anew?


For a positive integer $n$ let $S(n) = \sum_{i=1}^{2^{n}-1} \frac 1i = 1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+ \cdots +\frac{1}{2^n-1}.$      Then which of the following are true.         (a) $S(100)\leq 100$.   (b) $S(100)>100$.   (c) $S(200)\leq 100$.   (d) $S(200)>100$.      My attempt   For the upper bound  $$\begin{align} S(n) &= 1 + \left( \frac 12 + \frac 13 \right) + \left( \frac 14 + \frac 15 + \frac 16 + \frac 17 \right) + \cdots + \left( \frac 1{2^{n-1}} + \frac 1{2^{n-1}+1} + \cdots + \frac 1{2^n-1} \right) \\ &< 1 + \left( \frac 12 + \frac 12 \right) + \left( \frac 14 + \frac 14 + \frac 14 + \frac 14 \right) + \cdots + \left( \frac 1{2^{n-1}} + \frac 1{2^{n-1}} + \cdots + \frac 1{2^{n-1}} \right) \\ &= \underbrace{1 + 1 + \cdots + 1}_{n\text{ times}} \\ &= n. \end{align}$$  So we get $S(n) < n$ (for $n > 1$), and in particular $S(100) < 100$.   Now I did not understand how to calculate a lower bound, or if there is any other method by which we can solve this.


"Pick up something" or "pick something up"?

I have difficulties with word order:        I have picked up the pencil from the floor. [says my dictionary]   ?I have picked the pencil up from the floor. [could be?]   ?I will pick up it. [sounds weird]   I will pick it up. [sounds right to me]


I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I need to clear all of them. My code is something like this:  void erase(std::vector<int>& myNumbers_in, int number_in) {     std::vector<int>::iterator iter = myNumbers_in.begin();     std::vector<int>::iterator endIter = myNumbers_in.end();     for(; iter != endIter; ++iter)     {         if(*iter == number_in)         {             myNumbers_in.erase(iter);         }     } }  int main(int argc, char* argv[]) {     std::vector<int> myNmbers;     for(int i = 0; i < 2; ++i)     {         myNmbers.push_back(i);         myNmbers.push_back(i);     }      erase(myNmbers, 1);      return 0; }   This code obviously crashes because I am changing the end of the vector while iterating through it. What is the best way to achieve this? I.e. is there any way to do this without iterating through the vector multiple times or creating one more copy of the vector?


Although someone has previously answered a question as to the , I'm still struggling on when to use which word, and if one is preferred in a more formal context.  For example, I was talking about the upcoming FIFA World Cup Semifinal Match, and that I was awaiting one team's "impending victory".  Was that an accurate use? Should I have used "pending victory"?


What is the difference between Reversing Ring and Reverse Protect Ring?

I want buy a  Macro Reversing Ring for Macro shot but then I can't protect the lens with a filter. Can I use Reverse Protect Ring for lens filter (like UV filer) or lens Cap?


Is there a companion algorithm for OTP to ensure integrity and/or authentication?

One-Time Padding is (theoretically) perfect encryption algorithm. Let's assume that these problems are solved:   Fast generation of independent and identically distributed random variables Perfect key distribution system Key only used once. Key destroyed after use, without side channels that would allow any non-trusted third party to attain any key bits.   However, for modern information exchange, it is not sufficient to encrypt information (this is against Eve). In addition to encryption, it is necessary to also protect   integrity (this is against broken phone or cable) and message authenticity (this is against Mallory).   Some recommendations in cryptography recommend to use security level similar for encryption keys and message authenticity keys (i.e. use 128-bit encryption key and 128-bit MAC key). For MAC tag, it is common convention for HMAC or to use at most half of the MAC key length as the output length. Some other algorithms use full block length of the function.  For information theoretic authentication tag security, I would expect that in order to transfer message with length $N$ bits, I would need at least another $N$ bits to transfer "authentication tag" matching with the message.  Choices for Integrity or Authentication  Here are some of example schemes:   Double the bits. I.e. when instead of 0110, process plaintext 00111100 with OTP. This'll eat twice as much key material than OTP, but will protect against any single bit errors, and many of other errors, because it is easy to check at the recipient. (If only worrying about integrity.)  Process concatenation of $P$ (plaintext) and $T$ (mac tag) via OTP. There is problem how to calculate $T$. My first idea would be to use some operation on binary Galois Fields $GF(2^n)$, such as multiplication $C * C$ and use OTP to send that "checksum". (Only for integrity, but detects integrity problems with larger probability than option 1.)   Any suggestions how to efficiently calculate $T$? Are there any schemes which would provide usual security without key length $K=2N$? Are some of preconditions incorrect?  For authenticity it would appear that these are valid options:  3. encrypt-then-mac with an information-theoretically secure mac.  4. mac-then-encrypt with an information-theoretically secure mac.  What would be suitable information-theoretically secure mac for implementing alternative 3? Alternative 4 uses more key material than alternative 3. Are there any situations where alternative 4 would be profitable over alternative 3?  Previous Questions About The Field  You could think of this question as sort of add-on question to: ""


We used to be able to , but that now appears to be broken.  I'd expect a  to return a result, but instead the search engine appears to put quotes around the whole request; the search box shows the search has been replaced with "[python] += list" and the  I was looking for doesn't appear among the returned questions.  Using quotes around the symbols do not seem to help here;  returns an empty result.


If a subgroup has smallest prime index, then it is normal

Assume that $G$ is finite with $p$ the smallest prime dividing its order. Suppose $H < G$ with $[G:H]=p$. Prove that $H \lhd G$.  I've seen this question a few times on here but all the proofs I saw appeal to the First Isomorphism Theorem. I had old class notes showing this proved solely with group actions and orbits but I could only make out some of it so I recreated it from scratch. Can you guys check this for me?  Let $H$ act on the set $G/H$ by left multiplication. Consider the orbit of $H$ itself. $\mathcal{O}_H=\{hH \mid h\in H\}$ and $hH = H$, thus $\mathcal{O}_H$ contains one coset, namely, $H$. Let $x\in G - H$. What can be said about $\mathcal{O}_{xH}$? This action of left multiplication partitions $G/H$ into disjoint orbits of cosets. Because $|G/H| = p$, the sum of the sizes of the orbits is equal to $p$. We already know that $|\mathcal{O}_H| = 1$ therefore       $|\mathcal{O}_{xH}| \leq p-1$. The Orbit-Stabilizer theorem gives us  $|\mathcal{O}_{xH}| |Stab_{xH}| = |H|$. We see that $|\mathcal{O}_{xH}|$ divides $|H|$ and hence divides $|G|$. But since $p$ was the smallest prime dividing the order of $G$, $|\mathcal{O}_{xH}| = 1$.  The immediate consequence is that $|Stab_{xH}| = |H|$. As $Stab_{xH} \leq H$, we have $Stab_{xH} = H$. Therefore for every $h \in H$, $hxH=xH$. This implies  $x^{-1}hx\in H$ and thus $x^{-1}Hx = H$ for all $x \in G$. Therefore, $H \lhd G$.


How to calculate average growth when it's negative?

We have annual reports for company's revenue and can calculate annual growth as  $yg = {y_{i+1} \over y_i}$.  And then we can calculate the average monthly growth as $mg = ({y_{i+1} \over y_i})^{1 \over 12}$.  So for reports 2000-12 $1m and 2001-12 $2m the average monthly growth would be 1.06.  But how calculate monthly growth when the revenue became negative?  For reports 2000-12 revenue = $1m and 2001-12 revenue = $-1m?  P.S.  I need it for simple prediction. For example 2000-12 $1m and 2001-12 $2m  the revenue in 2002-02 could be predicted as $2 \times 1.06^2 = 2.25$


Solution to the Diophantine equation $x^4+y^4=2z^2$

Does there exists a nontrivial positive integer solution with $x\ne y,$ of $$x^4+y^4=2z^2.$$


Why doesn't this mosfet saturate in a configuration and not the other one?

I am playing around with Mosfet specifically .According to the datasheet ,Vgs is about 10 volt.I added 2 resistors to 2 different circuits to see if there is a difference in the component's saturation. I applied then 3 volt to both gates .Surprinsingly the first circuit saturated and the other didn't.I have got then serveral questions:   Why did the Mosfet saturate in the first configuration  and not in both? Why did it saturate with 3 volt and not 10 ? Does  this circuit really need a resistor following drain or source? What additional considerations to take in if i want to drive a load which draw at max 1 A at 24 V?   Here is a schematic of my simple circuit:


I'd prefer to edit TestFile in place to get the desired output. How could I do this? This is a work box so I'd prefer to not have to install additional packages.  TestFile:  randomcollege-nt\jsmith90 randomcollege-nt\aakhbar91 randomcollege-nt\pmanning92 randomcollege-nt\dvader93 jshephard94 bwayne95   Desired output:  jsmith90 aakhbar91 pmanning92 dvader93 jshephard94 bwayne95


The review queue shows a lot of comments that were posted as an answer. The review possibilites only allow to keep the "answer" or flag it (which will usually result in a deletion).  Most of these "answers" are indeed valid comments, providing useful questions, links, etc.!  It would add value to Stackoverflow (etc) to convert these answers to a comment (below the initial question) with one click.


Riemann Zeta Function and Including Complex Numbers

I'm a high-school senior attempting to make sense of the zeta function. I know Riemann regularized it to include complex numbers. Apparently, from this we could obtain that the sum of natural numbers may be assigned the value '-1/12' (zeta of -1)  What I don't get is how did extending the domain to complex numbers help in getting this result.  Thanks,


Cannot install Ubuntu on Acer Aspire 3 - "watchdog: BUG: soft lockup: - CPU#1 stuck for 22s! [migration/1:15]"

I am trying to install Ubuntu Mate on my Acer Aspire 3, with AMD Ryzen 3 2200U and AMD Radeon Vega 3 Graphics, currently running Windows 10.  When I boot from a USB and select Install Ubuntu MATE I am getting the following error:     After that I disabled AMD-SVM and AMD-IOMMU in the BIOS menu, which cleared the first several lines of errors, but I still get some errors and cannot install Ubuntu    Can anyone help me out with this annoying issue?  I contacted Acer support as well, but they said they cannot help since this is regarding an OS other than Windows.


How to delete the files in one folder which are more than 60 days old in UNIX?

I know how to delete the files which are more than 60 days old by modification time, but I want to delete files based on a timestamp in the file name.  For example, I have the below files for each day on monthly basis, and I have these files for last 3 years.  vtm_data_12month_20140301.txt vtm_data_12month_20140301.control vtm_mtd_20130622.txt vtm_mtd_20130622.control vtm_ytd_20131031.txt vtm_ytd_20131031.control   I'd like to write a script find the all files which are more than 60 days old (based on file name) and delete them all except for last file of each month. For example in January I want to delete all but vtm_data_12month_20140131.txt. The issue here is there is a chance that I might have files received for January 30th so in that case I should not delete the latest file but I have to delete the rest.  Please advise me how can I achieve this via shell script?


Difference in sentence meaning between present continuous and simple present constructions

What is the difference between the following sentences?         He is always shooting his mouth off about how good he is. (present continuous)    He always shoots his mouth off about how good he is. (simple present)       In texts they usually use number 1, but I do not see a difference in meaning.


What are the effects of depth and width in deep neural networks?

How does depth and width in neural networks affect the performance of the network?   For example,  introduced very deep residual networks and claimed “We obtain [compelling accuracy] via a simple but essential concept— going deeper.”  On the other hand  argues that wide residual networks “are far superior over their commonly used thin and very deep counterparts.”  Can someone summarise the current (theoretical) understanding in deep learning about the effects of width and depth in deep neural networks?


Let $x_{n} = \sqrt{1 +\sqrt{2 + \sqrt{3 + \dots \sqrt{n}}}}$. Show $\lim_{n \rightarrow \infty} x_{n}$ exists.

Let $x_{n} = \sqrt{1 +\sqrt{2 + \sqrt{3 + \dots \sqrt{n}}}}$.  show $\lim_{n \rightarrow \infty} x_{n}$ exists.  To do this the problem has been broken down into three pieces:  a) Show that $x_{n} < x_{n+1}$ (I've completed this)  b) Establish $(x_{n + 1})^2 <  1 + \sqrt{2} x_{n}$ Hint: square $x_{n+1}$ and factor a 2 out of the square root. (Having trouble with this)  c) Conclude that $x_{n} \leq 2$ and thus  $\lim_{n \rightarrow \infty} x_{n}$ exists. (Having trouble with this)  Attempts  Starting with part b):  After following the hint and doing some algebra the problem has been reduced to trying to establish that:  $$\sqrt{3 + \dots \sqrt{n + \sqrt{n+1}}} < 2 \cdot \sqrt{2 + \sqrt{3 + \dots \sqrt{n}}}$$  At this point we were given a "fact" that $\sqrt{2n} \leq n-1$  Here is where the confusion lies for me. I know I'm supposed to get a chain of inequalities, but I can't seem to breakdown the expression into the necessary parts. Some help here would be nice.  Part c):  I am stumped. Mainly because I'm not sure how to show that this is bounded above. I get the implication that once we establish that this sequence is bounded above, then by the monotone convergence theorem we can establish the sequence converges. My issue here is that at least on the surface taking the limit of the sequence $x_{n}$ it would seem that the  value would extend beyond 2 because I am summing up an infinite amount of objects. So....How should I proceed?


Are the following sentences acceptable to native speakers?   I want it so bad. The children grew up happy and healthy. Jimmy works hard. He followed her quick.   What adjectives can be used as adverbs? Are there rules for that?


What is the easiest way to make a cursive, lowercase ell in LaTeX math mode?


Prove or disproved that for every undirected graph $G$, there is an orientation $D$ on $G$ such that |$deg^+ (v) - deg^- (v)$| $\le 1$ ??


Why earth ground connection does not leak current?

This seems like a question which has been asked multiple times on forums. I researched the problem but I still was unable to figure out the answer which I can at least intuitively understand. So in this simple circuit why is there no current leakage to earth? Assume that it is a true earth ground connection (a rod in the earth for example).  Update: I am giving researched answers below, but not as the only options. I am not satisfied with any of them, and give my explanation as to why. So I am hoping for either an elaboration or an alternative answer.         – Schematic created using   The answers I have found:-    With only one connection to ground there is no circuit for the current to flow through. It can't flow "to" ground, because there is nowhere for it to flow to. There's no difference between ground and a wire dangling in the breeze. However for current to flow there must be potential difference. And because the ground and the battery return has the same potential - why would current prefer to flow specifically to the return point. Especially taken into account that earth can absorb all electrons generated by the battery (on contrary for example to just piece of wire).    The ground isn't a great conductor and while it is in parallel with the service, the amount of current returning through the ground is so small it is effectively zero - Firstly this answer implies that there's some leakage occurs which just depends on earth resistance. Also I do not understand which resistance is taken into account. Where it is measured? I think also the answer relates to the several connection of the circuit to the ground.   So anyone can give real physical explanation of this?


Can wearing eyeglasses cause your eyesight to degrade further?

I've been told that wearing eyeglasses to correct poor vision can cause your vision to degrade even further. In other words, "Hold off wearing glasses for as long as possible, because once you start, it gets much worse."  The claim is that with glasses, the eyes don't have to work as hard to focus and then become "lazier" (for lack of a better term), leading to a vicious cycle of needing more and more correction.  Is there any truth to this claim?