The problem is that I have a Macbook that keeps telling me another computer is using it's IP address. I normally don't have a problem with this as I'd either restart the computer, or router and it would obtain a new IP address.   However, every single IP address the computer is assigned is apparently taken by another computer. I can manually enter an IP and it is then immediately giving a warning about being taken by another computer. I have even left it on automatic DHCP, told the router to assign the computer an IP when DHCP is renewed. And when the computer renews, it says it's being used by another computer.  On the router there is Two other computers (labeled by names) and two android phones (also labeled by names). So I can tell which device is the only Mac on the network. None of the other devices's IPs match the Mac's. And the router states that the Mac's IP has been given the exact IP the Mac says is taken.  I'm not sure what is going on here. But I cannot figure out what the problem is.  So far I have restarted the router and Mac three times and tried to assign over 16 different unique IPs. The router still states the computer is connected and assigned a unique IP while the Mac says it's been assigned an IP that is used by another computer.  If there is anyone that can help with this issue, it would be very appreciative.


How to get time from timePicker in another class?

public class TimePickerClass  extends Activity{  public TimePicker mTimePicker;  @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_time_picker_class); Button saveTimeButton; mTimePicker = (TimePicker) findViewById(R.id.timePicker); mTimePicker.setIs24HourView(true); saveTimeButton = (Button) findViewById(R.id.next_button); saveTimeButton.setOnClickListener(v -> {     getTime(); });    public String getTime(){ //TODO int hour; int minute; hour = mTimePicker.getHour(); minute = mTimePicker.getMinute(); String message; message = "Time:" + hour +" : " + minute; return message; }   Hello! I have a class in which using TimePicker I get the time chosen by the user. I'm trying to do this:  TimePickerClass time = new TimePickerClass(); String userTime = time.getTime();   But this does not work, the application is down. How then can this be realized? The error is as follows:  FATAL EXCEPTION: main           Process: com.gfc.glanceclock, PID: 32256           java.lang.NullPointerException: Attempt to invoke virtual method 'int android.widget.TimePicker.getHour()' on a null object reference


How to show the set {u,v,w} is linearly independent with 2 variables

So the vectors are   r  1   1  1  s   2  1  2s  2    For which values of $r,s$ in subset $\mathbb R$ is the set $\{u,v,w\}$ linearly independent? I got if $s(rs-1)(2r-1)$, does not equal $0$, thus $r$ cannot equal $1/2$, $rs $ cannot equal $1$ and $s$ cannot equal $0$....but i'm feeling $1%$ confident on my answer because the matrices was difficult to reduce to row echelon form Would appreciate any help, Thankyou!


Recover Apple ID despite deleting email address and not being able to answer the security questions

I have an old Apple ID that I've lost access to because I deleted the email address it was tied to and I can't remember the security answers to anymore. I have some purchases tied to it, but the credit card info has been long removed -- it'd be expired by now, anyway. I called Apple Security, but was unable to regain access. Still, I'm wondering if anyone has been in a similar situation and how they went about recovering their account.


Difference between "git add -A" and "git add ."

The command git add [--all|-A] appears to be identical to git add .. Is this correct? If not, how do they differ?


It's the first time I've tried using a texture and after a couple of hours, I cannot find what I'm doing wrong.  Help.  It looks fine in the preview, and looks bad rendered.  I"ve tried lights.  Ideas?


Is there a way to scale by an absolute distance, rather than a percentage?

Let's say I have a ring of vertices that I'd like to scale down, and I'd like them all to move by a fixed amount, like 1mm (I usually work with metric units). What's the easiest way to achieve this? If I type '1' it just sets the scale to 1 and they don't move.    The only way I've come up with to do this is to extrude a vertex along one of the axes by 1mm, and then snap the scale movement to that vertex.      This is a pain though, and if I don't have a vertex that happens to lie on an axis I can't do the little extrusion trick and it doesn't work at all. I do a lot of modeling for 3d printing, and I end up needing to do this all the time. Hoping there's a better way to do this.


C# - Incrementing Two Progress Bar Simultaneously (Mutithreading)

I simply want two progress bar to increment simultaneously on a button click; i have created two progress bars and one button start with two threads t1 and t2 each of which contains different method in order to increment the values of two progress bars (t1 for progressbar1 and t2 for progressbar2 respectively).  Controls I have: Progress Bars: progressbar1, progressbar2 and Button button1.  The code is as follows:      Thread t1, t2;     private void Progressor1()     {         progressBar1.Minimum = 0;         progressBar1.Maximum = 100;          for (int i = 0; i <= 100; i++)                         progressBar1.Value = i;     }      private void Progressor2()     {                     progressBar2.Minimum = 0;         progressBar2.Maximum = 100;          for (int j = 0; j <= 100; j++)                         progressBar2.Value = j;                 }      private void button1_Click(object sender, EventArgs e)  // Start Button     {         t1.Start();         t2.Start();     }      private void MultiThreadedcs_Load(object sender, EventArgs e)// Form Load     {         t1 = new Thread(Progressor1);         t2 = new Thread(Progressor2);     }   At run time it shows me following error:     Error Name = InvalidOperationException   Error Message = Cross-thread operation not valid: Control 'progressBar2' accessed from a thread other than the thread it was created on.   Please help me out with this. I have less idea of threading concepts, i have gone through this solution with no progress in my problem:


Git amend/reword (without adding/changing files)

Often I want to edit a commit message without having to re-select the file-set from the last commit.  git commit file1.c file2.c   Accidental typo in commit message.  git commit file1.c file2.c --amend   This works, but Id like not to have to re-select the file-set from the original commit, I once accidentally did git commit -a --amend and added many changes unintentionally.  I know about git rebase -i HEAD~1 then replace pick with with r (re-word), but this ends up being a few steps.  Is there a way to re-word the last commit in one step without including any new files?


How to install newer versions of the Linux kernel?

A new version of the Linux kernel, 3.4, has been released today. How do I install it?


I want to know if the inverse of a Triangular matrix (Cholesky decomposition of a symmetric, positive-definite matrix in my particular case) is still triangular. If so could someone provide a proof as well?


It wont let me examine the crime scene or talk to Jorleif for assistance

Ive tried examining the crime scene but nothing happens and when i talk to jorleif there is no option to get assistance. Is it because i picked the lock? I also took the strange element is that why?


$\lambda-z-e^{-z}=0$ has one solution in the right half plane

Let $\lambda > 1$ , want to show that the equation $$\lambda-z-e^{-z}=0$$ has exactly one solution in the right half plane $\{z:Re(z)>0\}$. Moreover, the solution must be real.I tried to use Rouche's theorem on $g(z)=\lambda - z$ and $f(z)=e^{-z}$ to get that the number of zeros of $f+g$ and the number of zeros of $g(z)$ is the same, and since $g(z)$ has only one solution then the equation about must also have one solution the problem is I don't know how to choose the correct curve $\gamma$ such that this will work.for the second part I used the IVT to show that $\lambda -x-e^{-x}$ has a zero in  $(0,\lambda)$ to conclude that the solution is real. is this acceptable? Thank you for your help.


How can I check which DNS server am I using (in Linux)? I am using network manager and a wired connection to my university's LAN. (I am trying to find out why my domain doesn't get resolved)


How do I create a tag in Stack Overflow?


How to extract XML data from logs using Unix shell script?

My question is not related to the  Parse XML to get node value in bash script? Also i cannot install/use any new XML parser as per the company policy. This needs to be achieved using shell/perl/awk/sed  I will try to rephrase my question:  1) We have a process.log file in which we have lot of text data and in between we have some XML data published. 2) There of thousands of different XML published in the logs along with other text data. 3) Now i need to select only the XML files which are published after Outgoing XML: value 4) Also the XML file which must be selected and copied to a new file should be the one which matches the value in the ALERTID tag. 5) The ALERTID value will be provided in the script input. So in our case mGMjhgHgffHhhFdH1u4 will be provided in the input and we need to select the full XML file published for this alertid. Starting tag is from  and ending tag is  5) So i need to select the relevant Outgoing XML file in a new file based on a particular ALERTID so it can be replayed in different environments.     Format of the log:   Info Jan 11 17:30:26.12122 The process is not responding to heartbeats Debug Jan 11 17:30:26.12123  Incoming XML :<xml version "1.0" encoding ="UTF-8"?> <Alert trigger = "true" > <Alerttype>orderReject</Alerttype> <AlertID>ghghfsjUtYuu78T1</AlertID> <Order>uusingas</Order> <Quantity>1254</Quanity> </Alert> (CreateInitEventHandler. C:356) Debug Jan 11 17:30:26.12199 The process is going down with warnings Debug Jan 11 17:30:26.148199 Outgoing XML: <xml version "1.0" encoding ="UTF-8"?> <Alert trigger = "true" > <Alerttype>orderheld</Alerttype> <AlertID>mGMjhgHgffHhhFdH1u4</AlertID> <Order>uwiofhdf</Order> <Quantity>7651</Quanity> </Alert>(CreateEventHandler. C:723) Debug Jan 11 17:30:26.13214 The process has restarted and thread opened Debug Jan 11 17:30:26.13215 The heartbeat is recieved from alertlistener process   Now the requirement is to take AlertID in the input, scan the process log and extract the matching outgoing XML in a separate file.  Using awk i am able to extract all the outgoing xml files but not sure how to extract the one  related to a particular AlertID.   Eg:  awk '/Outgoing/{p=1; s=$0} P & & /<\/Alert>/ {print $0 FS s; s="" ;p=0}p' 1.log>2.log


I have an HTML table with 2 rows and 6 columns.  The last column has a Bootstrap button that when clicked, clones the last row and adds it to the table.  After a new last row is added to the table, I remove the button in the penultimate row.  My table is decorated with a class attribute called: advPayment.  Here is my HTML:

             Type	             Ref No.	             Amount	             Deposit Date	             Comment	             &nbsp;

             Cash	             12410008	             $175.00	             05-12-2015	             &nbsp;	             &nbsp;

             Check	             5561	             $325.00	             05-12-2015	             &nbsp;	             Add

    Here is my javascript:  $(".advPayment tbody tr:last td:last a").click(function(e) {     e.preventDefault();      $(".advPayment tbody tr").last().clone().appendTo(".advPayment");     var rowCount = $('table.advPayment tbody tr').length - 1;      // remove Add button from the second to the last row     $(".advPayment tbody tr:nth-child(" + rowCount + ") td:last a").remove();  });    The first time I click on the Add button, the code works.  The next time I click on the button, it doesn't work.  I have a feeling it's due to the way the jQuery button binding works, but I wanted to get a second opinion.  Is there another way to dynamically bind on the fly?


java jar arguments for swing application

I am working on a java swing application which currently allows a user to import one or more files to be processed.   This is done right now by executing the jar using   java -jar [jarname] [filename 1] [filename 2] ... [filename N].   I am tasked with to change the behaviour so as to keep it working in this current mode and add another mode of execution by adding an option parameter:   java -jar [jarname] [filename 1] -o [option].   In the second mode, I need to make sure that the arguments contain a single filename argument with a single option flag followed by a single option argument. The option will be used to process the file. Alternatively, if the jar is executed in the first mode using only one file, there is a menu option in the application that the user should be able to use to process the file with the required option.  I am looking for ideas/tips to accomplish this.  Thanks in advance.


Difference between "irascible", "fractious", "irritable" and "atrabilious"?

It seems that they can all mean "easily provoked to anger"  irascible：Easily provoked to outbursts of anger; irritable.  fractious：Irritable; argumentative; quarrelsome.  irritable：1.Capable of being irritated. 2.Easily exasperated or excited.  atrabilious：1.Characterized by melancholy. 2.ill-natured; malevolent.


It's the last ball of the over. The ball hits the helmet kept behind the keeper. 5 runs will be awarded, but my question here is, will the same batsman face the first ball of the next over?


Is there an easy way to find out which SE site I should post a question in?

I frequent many of the SE sites, but sometimes I have a question on a topic that doesn't fit into any of the sites I've already used.  I find it difficult to find the right site (if one exists at all) for my new question. For example, I have a question about ipod functionality.  I'm not sure where to post it, so I looked at all the sites on the bottom, but didn't see anything.  I was on fitness.stackexchange.com at the time, and all of the links for different sites are blue, and they are in no order (or at least no order that I can tell) so it's very hard to parse.  I was looking for something like "apple" or "iOS" but didn't see it. Then I went to the main "directory" (or what I think of as the main directory) -  - again, this is very difficult to parse.  "Bubbles" are different sizes, and again in no specific order.  The only thing I could think to do was to actually do a text search on the web page for "apple", and it wasn't there so I gave up and came here to ask. The worst part is that once I came here (meta), I glanced at the bottom of the page and immediate saw "apple"!  This link wasn't on the main directory, and wasn't in the collection of links on the other SE site (fitness).  So it was completely luck that I came to meta to ask this question, and the apple site happened to be in the links at the bottom of this page. Am I missing something?  Is there an easier way to find the list of SE sites?  And in general if I have a question, what's the best way to figure out what site to post it in?


Inserting data to lookup field using rest API

In alert I am getting value in data.d.results[0](This is the value that I am getting from other list using rest).Subsystem.Title and also if I use only title column then the value is inserted in the list but when I use a lookup column i.e. Subsystem, then it goes to error function.  $.ajax({         url: "https://sharepoint.com/teams/_api/web/lists/GetByTitle('Features')/Items",         type: "POST",         data:  JSON.stringify({ '__metadata': { 'type': 'SP.Data.FeaturesListItem' },    'Title': data.d.results[0].Title,'Subsystem':data.d.results[0].Subsystem.Title}),         headers: {              "accept": "application/json;odata=verbose",             "content-type":"application/json;odata=verbose",             "X-RequestDigest": $("#__REQUESTDIGEST").val()         },         success: function(d) {alert("Items Inserted!");          //window.location.href=referrer;             },         error: function() {alert("Failed to Insert Items!");} });


From Isaac Asimov (Little Lost Robot)     WHEN I DID SEE SUSAN CALVIN AGAIN, IT WAS AT the door of her office   Is this a grammatic error? Past simple - WHEN I SAW SUSAN


See screen shot...   App Version: 1.6.6.2 Device: Unknown (iPhone11,6) OS Version: Version 13.3.1 (Build 17D50)


Guava MultiMap and ConcurrentModificationException

I don't understand why I get a ConcurrentModificationException when I iterate through this multimap. I read the following , but I am not sure if I understood the whole thing.  I tried to add a synchronized block. But my doubt is what to synchronize with, and when.   The multimap is a field and created like this :   private Multimap<GenericEvent, Command> eventMultiMap =       Multimaps.synchronizedMultimap(HashMultimap.<GenericEvent, Command> create());   and used like this :   eventMultiMap.put(event, command);   and like this ( I tried to synchronize this part on the map, but without success )  for (Entry<GenericEvent, Command> entry : eventMultiMap.entries()) {     if (entry.getValue().equals(command)) {         eventMultiMap.remove(entry.getKey(), entry.getValue());         nbRemoved++;     } }


assigning enum in c# with a string without using if's

I was wondering if there's an option to sign an enum, for say, color, with the options of white black and red, directly with a string "red". without using if's... I mean i don't want to write:  if (string1=="red") {mycolor=Color.red};   thanks!


JavaFX Calling a Method Error Between Controllers

I'm trying to access setImageVisible() which is in MenuController in BackGroundController.  Here is MenuController   package Final;  import java.io.IOException; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.ImageView;  public class MenuController {      @FXML     private ImageView BackGround;          //load fxml to Stage     @FXML     public void onStartPressed() throws IOException{         Parent     PikaVolley=FXMLLoader.load(getClass().getResource("PikaVolley.fxml"));         Scene PikaVolleyScene=new Scene(PikaVolley);         PikaVolleyScene.getRoot().requestFocus();          Main.currentStage.setScene(PikaVolleyScene); //use setScene() to switch the scene      }          //load fxml to Stage     @FXML     public void onSetBackgroundPressed() throws IOException {         Parent Background=FXMLLoader.load(getClass().getResource("BackGround.fxml"));         Scene BackGroundScene=new Scene(Background);         Main.currentStage.setScene(BackGroundScene); //use setScene() to switch the scene     }           //this method is trying to set BackGround invisible     public void setImageVisible() {         this.BackGround.setVisible(false);      }  }   Here is BackGroundController. BG1 is a checkBox with BG1_selected method written in fxml.  package Final;  import javafx.fxml.FXML; import javafx.scene.image.Image;  public class BackGroundController {     private MenuController menuController;      @FXML     public void BG1_selected() {         menuController.setImageVisible();     }  }   My problem is when I select BG1, I get this Error. How can I deal with it?    Sorry, I forgot to put the Main class. Here it is.    package Final;  import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage;   public class Main extends Application {    public static Stage currentStage;  public static Scene MenuScene;         @Override  public void start(Stage primaryStage) throws Exception {   currentStage=primaryStage;   Parent root=FXMLLoader.load(getClass().getResource("Menu.fxml"));   MenuScene = new Scene(root);      currentStage.setTitle("PikaVolley");   currentStage.setScene(MenuScene); //use setScene() to switch the scene   currentStage.show();        }     public static void main(String[] args) {       launch(args);      } }


Cannot suggest basic formatting edits based on whitespace: "Edits must be at least 6 characters"

I often find myself wanting to improve new member's OPs readability by only doing basic formatting:   adding whitespace to break down one chunk of text into several lines/sections adding - to format their successive ideas into a list making use of trailing 4 spaces and backticks to format their code, commands and identifiers.   However, I get stuck by these error messages Edits must be at least 6 characters and I cannot submit.  I understand that very-minor edits may be counterproductive. However, I trust that such a basic "aeration" of a chunky OP, by improving its readability, improves it a lot.  Is there any way to get around this? If not, how should I react in this situation?


I have a list of two dictionaries in Python  list = [{'id' : 'ewsfsdf',             '_source' :                        {'timestamp':'2018-08-08T20:56:01',                         'bytes':'43534534'}},          {'id' : 'ewsfsdz',             '_source' :                        {'timestamp':'2018-08-08T20:57:01',                         'bytes':'4354343534'}}]   I would like to sort the list element by the timestamp in the 2nd depth dictionary. I looked up many other examples of python but could not find a suitable solution to order list element by a dictionary element of a dictionary element in a list.   Can you give me a clue?


Create instance of derived class from Type variable alone

I'm writing a simple networking system. Entities are defined as classes derived from the base class Entity. In order to identify entities over the network, I have a unique ID for each one, but when it comes time to spawn a new entity, I need a way to identify which entity type (and therefore which class) to create, so I also store a typeId for each entity. public abstract class Entity {     uint id;     ushort typeId;     //abstract stuff }  public class Entity_BeachBall : Entity {     //overridden stuff }  Say I have a list of all the derived entity classes like so:     public List<Type> entityTypes = new List<Type>     {         typeof(Entity_BeachBall)     };  Now I have a way to identify which class an entity uses; for instance, if typeId == 0, then that means it should use the class Entity_BeachBall. The problem is, how can I create a new instance of that class, even if it gets immediately implicitly cast back to the base class? This is roughly what I want to do: public static class EntityManager {     public List<Type> entityTypes = new List<Type>     {         typeof(Entity_BeachBall)     };          public Entity GetNewEntity(ushort typeId)     {         return new entityTypes[typeId](); //something like this     } }  Is this possible? If not, is there a better solution?


How do I insert a row which contains a foreign key?

Using PostgreSQL v9.1.  I have the following tables:  CREATE TABLE foo (     id BIGSERIAL     NOT NULL UNIQUE PRIMARY KEY,     type VARCHAR(60) NOT NULL UNIQUE );  CREATE TABLE bar (     id BIGSERIAL NOT NULL UNIQUE PRIMARY KEY,     description VARCHAR(40) NOT NULL UNIQUE,     foo_id BIGINT NOT NULL REFERENCES foo ON DELETE RESTRICT );   Say the first table foo is populated like this:  INSERT INTO foo (type) VALUES     ( 'red' ),     ( 'green' ),     ( 'blue' );   Is there any way to insert rows into bar easily by referencing the foo table?  Or must I do it in two steps, first by looking up the foo type I want, and then inserting a new row into bar?  Here is an example of pseudo-code showing what I was hoping could be done:  INSERT INTO bar (description, foo_id) VALUES     ( 'testing',     SELECT id from foo WHERE type='blue' ),     ( 'another row', SELECT id from foo WHERE type='red'  );


I have a Python program, it generates a string, say fileName. In fileName I hold something like "video1.avi", or "sound1.wav". Then I make an os call to start a program ! program arg1 arg2, where my fileName is arg2. How can I achieve that on the fly, without making the whole program return a single string (the fileName) and then pass it to the shell line? How can I make that during execution. The script executes in Jupyter.  P.S. I am looping and changing the file name and I have to run that script at every loop.


If I observe the following:  $X \sim N(\mu_x,\sigma^2_x)$  $Y|X=x \sim N(x,\sigma^2_y)$  My objective is to calculate the marginal distribution of $Y$.  (Since the variance term does not address some form of correlation $\rho$, the dependence between both random variables clearly needs to be addressed w.r.t. to the expected value of $Y$)  By the usual formulas we will get $f(y)$ by:  $f(y) = \int_{-\infty}^\infty f(x,y)dx$  where $f(x,y) = f(y|X=x) f(x) = \frac{1}{\sqrt{2\pi\sigma_x^2}}\frac{1}{\sqrt{2\pi\sigma_y^2}}exp\{-\frac{1}{2}[(\frac{y-x}{\sigma_y})^2 + (\frac{x-\mu_x}{\sigma_x})^2 ]\}$  I know the usual bivariate case and this looks like that case, where the correlation $\rho$ is zero and solving would be easy. But here in both terms the $x$ factor needs to be addressed and I'm not quite sure how to solve for $x$.


We are running a server right now and the MySQL database is crashing quite often.   We know that we need to find good settings for MaxClients and MaxRequestsPerChild as we are getting lots of traffic and when we get a spike the database goes down.     Is there a good rule of thumb or formula that would help us figure this out?


Should I use Yes/No or Ok/Cancel on my message box?

Semantically, the Yes/No buttons are roughly equivalent to the Ok/Cancel buttons, but in general what would you recommend to use? Should I always use Yes/No or always use Ok/Cancel? Or does it depend on the case?


Length of the Union of Intervals is less than the Sum of Each Length of Intervals?

I am reading Royden and Fitzpatrick's book on Real Analysis, and I have a question about the length function on an interval in $\mathbb{R}$. Is it true that given $\{I_n \}_{n=1}^{\infty}$ of countable collection of open intervals in $\mathbb{R}$:   $$ \ell( \bigcup_{n=1}^{\infty}I_{n}) \leq \sum_{n=1}^{\infty} \ell (I_n)? $$  Where $\ell$ is the length function? It think this was implicitly used in their proof that the outer measure $m^*$ has the subadditivity property. I think it is true though, since, each $I_n$ might not be pairwise disjoint.


What happened to these edits (and the associated reputation)?

My reputation rating on SO took this hit an hour ago, and it is due to what appears to be the simultaneous deletion of multiple questions.  I am uncertain why it happened, am concerned, and would appreciate an explanation.  Going to  shows that it was removed due to moderation.  Was a script run deliberately, or were we hit with a question deletion attack; what happened?  -12     today -2  1 hour ago  removed     How to send a 2d Vector over UDP in c++ -2  1 hour ago  removed     How do I use the Eclipse debugger to debug a Java application? -2  1 hour ago  removed     PHP string error; inconsistency with local and server -2  1 hour ago  removed     Unable to start the MySQL service after a server migration -2  1 hour ago  removed     How to use Java to print a text file on a ticket printer? -2  1 hour ago  removed     How can all of the ZBrush Obj files be imported to make a complete model?


I have a Microcontroller with a DAC output of 0-3.3V. What external circuitry can I use to convert it into a 4-20mA current transmitter.


File truncated to 0 bytes during power failure

Power went down while editing a file with Geany and the file got truncated to 0 bytes ...  Is it possible to recover the file ?


How can I check disk space used in a partition using the terminal in Ubuntu 12.04 LTS?

I am using Ubuntu 12.04 LTS and I was wondering if there is a command that can tell the space used in a partition using the terminal. Like I want to use the su command to change to a user called admin (it is named admin). So I typed :  su admin   Entered the password  Now I want to see the disk space used in this partition. So.... Is there is a command fot that?


Sufficiency to prove the convergence of a sequence using even and odd terms

Given a sequence $a_{n}$, if I know that the sequence of even terms converges to the same limit as the subsequence of odd terms:    $$\lim_{n\rightarrow\infty} a_{2n}=\lim_{n\to\infty} a_{2n-1}=L$$  Is this sufficient to prove that the $\lim_{n\to\infty}a_{n}=L$?    If so, how can I make this more rigorous?  Is there a theorem I can state that covers this case?


Sorting table in polygon shapefile in order of intersecting line?

I have 119 parcels that intersect a polyline.  I want to be able to sort the table to see if any of the land owners in the parcels have have consecutive ownership along the line.    Is there a way to do this, or some other process to see the order?


If $\sum a^2_n$ converges so does $\sum \frac{a_n}{n}$   I'm trying to prove/ disprove this statement. But I couldn't end up with anything yet. Any help?


How to make sure elements are below each other

I want the image to be over the paragraph, but they aren't in this code. is it enough to place elements below each other in html and they will be displayed below each other or not? Is the dosplay flex and aligning affecting the position so that's why the paragraphs aren't below the images?   .wrapper {   display: flex;   width: 100%; }  .div {   width: 30%;   height: 300px;   display: flex;   align-items: center;   justify-content: center; }  .image {   width: 20%;   height: 20%; }

Lorem ipsum dolor sit amet consectetur adipisicing elit. Officia facere neque suscipit incidunt ipsa veniam error, quisquam modi rerum? Voluptatum quia voluptas porro eius asperiores natus velit consequatur explicabo nihil.

Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident, ipsam odio libero ullam facere neque voluptate repudiandae totam dignissimos non ducimus magni! Quidem et saepe expedita, distinctio commodi a temporibus.

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Mollitia, vero fuga! Corporis odio quo eligendi pariatur alias architecto dignissimos. Dolorem, perferendis quidem. Animi modi maxime expedita ad minus a voluptatem.


Was film actually “better” than digital media?

I happen, time and again, to read and hear people – among which people working in cinema – regretting the fact that film (in the sense of actual reels of plastic strip) is nowadays very rarely used when shooting movies. Is there some ground to such nostalgia?  Of course I am not looking for opinions for or against film vs. digital media, but sourced, objective reasons. Is there anything that could be done with film but not with digital supports? Are there measurable differences in effects on viewers?


Script that create Desktop Links on Windows?

i thinking about a simple script or routine to create desktop links on windows machines. is there a way to do it with perl or cmd batch?  like if i do  call shortcut.bat C:\putty.exe Putty   a new desktop link appears on desktop.


Anyone ever seen a "wok adapter" for induction cooktops?

In theory a cheap pressed steel wok would work on an , but the "contact patch" for a traditional round bottomed wok would be so small it would be ineffective.  Has anyone seen a steel or cast-iron "wok adapter" with a flat bottom and a concave "bowl" on top to sit the wok in, serving dual purposes of supporting the wok on the stovetop and transferring the induction heat to the wok?  Could anyone speculate if this would this even work? Or wouldn't you be able to get the wok hot enough?


I have the following slide in a document of class beamer.  \begin{frame}{Modular Design}      \begin{lstlisting}          <code>      \end{lstlisting}  \end{frame}   This however returns  Thinking it might be the listings package which is faulty, I retried with  \begin{frame}{Modular Design}      \begin{verbatim}          <code>      \end{verbatim}  \end{frame}   ...which returns   ! Paragraph ended before \@xverbatim was complete. <to be read again>                     \par  l.170 \end{frame}   Therefore my questions are: 1. What do I do wrong? 2. How can it be fixed?  P.S: I compile it using the Quickbuild of Kile, which apparently uses just pdflatex -interaction=nonstopmode name.tex to compile.


A word for reading something thoroughly until one understands it well?

I was wondering if there was one word in English for "to read something thoroughly until one understands it well"? I am trying to translate a word which has this meaning in Chinese.  Thanks.


Verify that a point belongs to secp256r1

I need to verify that the point in this public key 04 11 95 23 03 f0 f1 f1 45 67 14 98 e4 39 80 ce 25 39 02 6e 72 34 fe 02 38 8a ea cc fb 3a 3d 4d dc d9 6d 3c fe 8b 55 bf ea c3 3a a1 59 13 54 b3 91 79 45 b7 3b 49 d9 0e 96 2a de 79 d3 49 dc 79 ca is in secp256r1. I already know the parameters $a$ and $b$ of the curve, but they are pretty big and they are hexadecimal. I've been trying to pass it to decimal, but I'm not getting it. Should I compute it in hexadecimal? I do also don't understand what are the coordinates of the public key. I mean, the public key is supposed to be a point with x-coordinate and the least important part of the y-coordinate, as the public key begins by 04, isn't it? I'm really sorry, but I'm confused about how to approach this. Note: I saw some questions that were basically the same as mine, but the numbers were much smaller. I do also have PARI/GP to use. EDIT: I tried with SageMath, and the result was y = 98344895439910594971593461997930184197459096557735598026509132013917697767882 a = 115792089210356248762697446949407573530086143415290314195533631308867097853948 b = 41058363725152142129326129780047268409114441015993725554835256314039467401291  Then, I tried y^2 == x^3 + a*x + b, and it gave False, but I know beforehand that the point belongs to the curve. Can you tell me what I am doing wrong?.


I have a strange problem with Illustrator.  The company I am working with has a stock hex colour - #0074aa (1).  According to online conversion sites, this hex code translates to the CMYK of:  C:  100 M:  31.6 Y:  0 K:  33.4   When I add these CMYK values to Illustrator as a colour swatch, these translate to a slightly darker, deeper blue (2).  Alternatively if I add a swatch with the Hex value of #0074aa, the CMYK values are completely different.  Confusingly, if I put the translated CMYK values that Illustrator came up with after entering #0074aa into an online converter, the resulting hex match is completely different - a bright cyan blue (3)!  Does anyone have an idea as to why this is occurring?  When I sent a business card design I made to the printer, the colour printed out was the bright cyan; hence why I am trying to figure out the reason for this problem.  I send my files to the printer by PDF.  I'm working in CMYK mode in Illustrator CS5.  Viewing the CMYK on iPhone also shows the bright cyan colour.


How to unload kernel module 'nvidia-drm'?

I'm trying to install the most up-to-date NVIDIA driver in Debian Stretch. I've downloaded NVIDIA-Linux-x86_64-390.48.run from , but when I try to do  sudo sh ./NVIDIA-Linux-x86_64-390.48.run   as suggested, an error message appears.  ERROR: An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in your kernel.  This may be because it is in use (for example, by an X server, a CUDA program, or           the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading.  Please be sure to exit any programs              that may be using the GPU(s) before attempting to upgrade your driver.  If no GPU-based programs are running, you know that your kernel supports module unloading,             and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to               reboot your computer.   When I try to find out who is using nvidia-drm (or nvidia_drm), I see nothing.  ~$ sudo lsof | grep nvidia-drm lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs       Output information may be incomplete. ~$ sudo lsof -e /run/user/1000/gvfs | grep nvidia-drm ~$   And when I try to remove it, it says it's being used.  ~$ sudo modprobe -r nvidia-drm modprobe: FATAL: Module nvidia_drm is in use. ~$    I have rebooted and started in text-only mode (by pressing Ctrl+Alt+F2 before giving username/password), but I got the same error.  Besides it, how do I "know that my kernel supports module unloading"?  I'm getting a few warnings on boot up related to nvidia, no idea if they're related, though:  Apr 30 00:46:15 debian-9 kernel: nvidia: loading out-of-tree module taints kernel. Apr 30 00:46:15 debian-9 kernel: nvidia: module license 'NVIDIA' taints kernel. Apr 30 00:46:15 debian-9 kernel: Disabling lock debugging due to kernel taint Apr 30 00:46:15 debian-9 kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  375.82  Wed Jul 19 21:16:49 PDT 2017 (using threaded interrupts)


Sum of $3$ triangles' angles: Geometric proof of $\tan^{-1}1+\tan^{-1}\frac12+\tan^{-1}\frac13$

In the given figure,3 squares are fitted together. Some lines are drawn. What is the value of $\alpha +\beta +\gamma$?  I just can derive alpha as 45 degree as it is an angle formed by diagonal of square. How to find the other two?  I have seen similar questions that were solved using trigonometry. I just want the process how to solve it by using only elementary geometry.  Also I saw another problem that answered its complements but I can't understand it


I have a simple program to test exit codes:  int main() {      return 2000; }   In the terminal if I run the program then type:  echo $?   the terminal replies with 208. What? Why would it do that?


The isWholeNumber Method works fine for number less than 16 digits but it does not work with larger values. How do i find if a large digit is whole number or not ?  var isWholeNumber = num => num % 1 == 0;  isWholeNumber(900719925443099.122) // false  isWholeNumber(9007199254430991.122) // true


Okay, when I see acronyms I usually see stuff like NYOB, OMG, PM, stuff like that. I also see some of them with periods on them like N.A.S.A. Do you put the dots in them, or not?


Are there any user friendly ways to access screenshots taken on the Switch?

I have an SD card on my console and have it set to store screenshots on the card.  But it doesn't seem like there's a way to view or otherwise extract those screenshots without having to pull out the SD card and use a reader to access them.  But this is not a desirable option since the Switch has to be turned off before removing the card.  Connecting the Switch to a (Windows) computer doesn't work, it's recognized as a USB device but nothing else.  I can't imagine how it would work if I didn't have an SD card.  How else are we expected to access these screenshots?


Force bash to respect newlines in command output

When I run ls * its returning entries delimited by a newline. However my shell is ignoring the newlines to condense the output. I would like each entry on a separate line.  Currently:  > ls * a b c   Ideally:  > ls * a b c


What are the invariant factors of $G = (\Bbb Z/12\Bbb Z) \times (\Bbb Z/25 \Bbb Z) \times (\Bbb Z/45\Bbb Z)$?

What are the invariant factors of $G = (\Bbb Z/12\Bbb Z) \times (\Bbb Z/25 \Bbb Z)\times(\Bbb Z/45\Bbb Z)$ ?  My way of solving it: $$G \simeq (\Bbb Z/2^2\Bbb Z \times \Bbb Z/3\Bbb Z)\times(\Bbb Z/5^2\Bbb Z)\times(\Bbb Z/3^2\Bbb Z \times \Bbb Z/5\Bbb Z)$$  And because it is easy to "see": $$G \simeq (\Bbb Z/(3*5)\Bbb Z)\times (\Bbb Z/(3^2*5^2*4)\Bbb Z)=(\Bbb Z/15\Bbb Z)\times (\Bbb Z/900\Bbb Z)$$ as when writing $G \simeq (\Bbb Z/n_1\Bbb Z) \times (\Bbb Z/n_2 \Bbb Z)$ we need $n_1$ to divide $n_2$.  But:   What is the general method to find the invariant factors? How many $n_i$ should we use?


How can I take on-device screenshots of "secure" apps?

As per , Android apps using FLAG_SECURE in their activities are protected from screenshots being taken by the system.  You get a blank file when using screencap and some other screenshot apps, and this error when using the hardware buttons:     Can't take screenshot due to limited storage space, or it isn't allowed by the app or your organization.   However, this is not a hard guarantee.  In Android Studio, I can still take screenshots of such "secure" apps with the button pointed out in .  I took a look through the Android Studio source code, and the screenshot is acquired through a framebuffer: request to ADB, which in turn uses screencap.  Before I go looking through source for more info on how this works for adb but not for a root terminal and a possible "developer" solution, I thought I should ask: Has anyone already figured out what's happening behind the scenes here and can an end-user make use of it?  Ideally, without needing a PC.  My device is rooted, so I'm open to apps/commands/etc. that require root (or having USB Debugging enabled).  I've tried a few screenshot apps from pre-Android-2.3 that use root, but none of them still work (presumably due to how the framebuffer is now protected).


This morning I upgraded my PHP version to 7.1 and am seeing an issue when cron tries to run php /var/www/html/artisan schedule:run (a simple PHP command) I see the output:  3/3/2017 10:39:00 AMcrond: can't set groups: Operation not permitted 3/3/2017 10:39:00 AMcrond: USER www-data pid 1562 cmd php /var/www/html/artisan schedule:run 3/3/2017 10:40:00 AMcrond: can't set groups: Operation not permitted 3/3/2017 10:40:00 AMcrond: USER www-data pid 1563 cmd php /var/www/html/artisan schedule:run 3/3/2017 10:41:00 AMcrond: can't set groups: Operation not permitted 3/3/2017 10:41:00 AMcrond: USER www-data pid 1564 cmd php /var/www/html/artisan schedule:run 3/3/2017 10:42:00 AMcrond: can't set groups: Operation not permitted 3/3/2017 10:42:00 AMcrond: USER www-data pid 1565 cmd php /var/www/html/artisan schedule:run 3/3/2017 10:43:00 AMcrond: can't set groups: Operation not permitted 3/3/2017 10:43:00 AMcrond: USER www-data pid 1566 cmd php /var/www/html/artisan schedule:run   The command being run is a Laravel artisan command.  It's run every minute allowing other scheduled work to be completed within the application itself.  There's nothing in this command that writes to any files or anything like that.  The scheduled work talks to a database and sends some email.  Application logs are sent to stdout since it's a Docker container.  cron is run in a container with the command crond -f -d 8.  Here's the Dockerfile:  # This container should be used for any/all CLI processes # including cron, queues, etc. FROM php:7.1-alpine  # Copy the application files to the container ADD . /var/www/html  WORKDIR /var/www/html  # fix permissions in CI RUN sed -ri 's/^www-data:x:82:82:/www-data:x:1000:1000:/' /etc/passwd \     && sed -ri 's/^www-data:x:82:/www-data:x:1000:/' /etc/group  # Install Composer dependencies RUN apk add --update --no-cache git zip unzip \          # needed for spatie/laravel-backup         mysql-client \          # needed for gd         libpng-dev libjpeg-turbo-dev \      && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*  RUN docker-php-ext-install pdo_mysql gd \          # needed for forking processes in laravel queues as of Laravel 5.3         pcntl  # Ownership of the app dir for www-data RUN chown -R www-data:www-data /var/www/html /home/www-data/  # Put php artisan schedule:run in a crontab RUN echo "*       *       *       *       *       php /var/www/html/artisan schedule:run" > /etc/crontabs/www-data  # Make sure when users get into the container they aren't root USER www-data   I've ruled out that php artisan schedule:run is the cause since I can run it manually and everything's fine.  This means it's something within cron.  What is cron doing under the covers that could cause this error?


I have an application which may only have one instance of itself open at a time.  To enforce this, I use this code:          System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcesses();         System.Diagnostics.Process me = System.Diagnostics.Process.GetCurrentProcess();         foreach (System.Diagnostics.Process p in myProcesses)         {             if (p.ProcessName == me.ProcessName)                 if (p.Id != me.Id)                 {                     //if already running, abort this copy.                     return;                 }         }         //launch the application.         //...   It works fine. I would also like it to be able to focus the form of the already-running copy.  That is, before returning, I want to bring the other instance of this application into the foreground.  How do I do that?  Re: SetForeGroundWindow:  SetForeGroundWindow works, to a point:      [System.Runtime.InteropServices.DllImport("user32.dll")]     public static extern bool SetForegroundWindow(IntPtr hWnd);       //...                 if (p.Id != me.Id)                 {                     //if already running, focus it, and then abort this copy.                     SetForegroundWindow(p.MainWindowHandle);                     return;                 }     //...   This does bring the window to the foreground if it is not minimized.  Awesome. If the window IS minimized, however, it remains minimized.  It needs to un-minimize.  Solution via SwitchToThisWindow (Works!):      [System.Runtime.InteropServices.DllImport("user32.dll")]     public static extern void SwitchToThisWindow(IntPtr hWnd, bool fAltTab);      [STAThread]     static void Main()     {         System.Diagnostics.Process me = System.Diagnostics.Process.GetCurrentProcess();         System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcessesByName(me.ProcessName);         foreach (System.Diagnostics.Process p in myProcesses)         {             if (p.Id != me.Id)             {                 SwitchToThisWindow(p.MainWindowHandle, true);                 return;             }         }         //now go ahead and start our application ;-)


ArcGIS Server Setting proxy.ashx with ArcGIS API for JavaScript gives Error 403?

I am trying to set up the proxy for my web application because the request exceeds 2000 characters. I set up the proxy as described in ESRI site. When I run my application I get the error as shown below  **"Unable to load http://localhost/proxy.ashx?http://T...nction/execute Status:403"**   I put my web application (one HTML page with javascript api code) and the two proxy files to my development machine's root folder. This machine is XP.  I have Geoprocessing service running on another machine (TestServer). When the length of GP request exceeds the limit, the application tries to use proxy and that is when I see the error above. This machine is Win 2008.  Status 403 is Forbidden page error.


I'd like to have a horizontally and vertically centered cards. I've done it like this.    *{     margin: 0;     padding: 0;              }          .wrapper{         background-color: darkkhaki;         width: 700px;         height: 700px;                   }          .cards{                  display: flex;         justify-content: center;         align-items: center;                                }               .card{         width: 100px;         height: 250px;         background-color: chartreuse;         border: crimson 2px solid;              }

Lorem ipsum

     However, the vertical center doesn't occur (just the horizontal).  The same happens when I try it with the "text" class.  Thank you for your help :)


When should I use a fixed or variable time step?

Should a game loop be based on fixed or variable time steps?  Is one always superior, or does the right choice vary by game?  Variable time step  Physics updates are passed a "time elapsed since last update" argument and are hence framerate-dependent.  This may mean doing calculations as position += distancePerSecond * timeElapsed.  Pros: smooth, easier to to code  Cons: non-deterministic, unpredictable at very small or large steps   example:  while( game_is_running ) {     prev_frame_tick = curr_frame_tick;     curr_frame_tick = GetTickCount();     update( curr_frame_tick - prev_frame_tick );     render(); }   Fixed time step  Updates might not even accept a "time elapsed", as they assume each update is for a fixed time period.  Calculations may be done as position += distancePerUpdate.  The example includes an interpolation during render.  Pros: predictable, deterministic (easier to network sync?), clearer calculation code  Cons: not synced to monitor v-sync (causes jittery graphics unless you interpolate), limited max frame rate (unless you interpolate), hard to work within frameworks that assume variable time steps (like  or )   example:  while( game_is_running ) {     while( GetTickCount() > next_game_tick ) {         update();         next_game_tick += SKIP_TICKS;     }     interpolation = float( GetTickCount() + SKIP_TICKS - next_game_tick )                     / float( SKIP_TICKS );     render( interpolation ); }   Some resources     —allegedly a reason  is frame-locked to 60fps? Flixel requires a variable timestep (I think this is determined by Flash) whereas  allows both types.  suggests it uses constant time steps.


Why does 2//0.2 return 9.0 but 5//0.5 return 10.0 in Python

In Python 3 interpreter,   1//0.1 2//0.2 4//0.4   returns 9.0, but   5//0.5 3//0.3   returns 10.0. Is this rounding-off behavior correct?


How are the tags which are shown in the question title chosen

When a question is asked, I notice a tag is appended to the question title as the tab title in my browser. For example when a question is tagged , . The tab title will be c# - Question title.   On pets private beta, If a question is tagged dogs, health, The tab title will be health-Question title.  How is the tag that is appended to the question title determined?


./watchbog is using up 198% of my cpu processor and mem 52%. Solar is the user. I tried stopping solar service but of no use. Watchbog is still running and using up as much space.


How can I solve this limit without using L'Hopital rule or other advanced methods?  $\displaystyle\lim_{x \rightarrow 0}\left(\frac{2^x+8^x}{2}\right)^{\tfrac{1}{x}}$


How to remove duplicate letters in a comma separated cell

Hi I want to remove duplicate entries in single column in my datasheet. Is there a short way to do that when writing my output file? It is python3 script.  with open(input) as infile, open (output, 'w') as outfile:     reader = csv.reader(infile, delimiter='\t')     writer = csv.writer(outfile, delimiter='\t')     for gg, poss, codee, ref, alt, *rest in reader:         gg = int(gg)         poss = int(poss)         writer.writerow([gg, poss, codee, d[group][poss-1], ref + ',' +alt] + rest)   In the last line, I want the column "ref + ',' + alt" to not have any duplicate values. With the above command, I have outputs like:  A,B,B,C G,G,A,T G,A,A T,T   I want this to be:  A,B,C G,A,T G,A T   Is there a short command that I can incorporate on the last line? or should I start a new set of command to do this? Please help me! Thank you.  EDIT with OrderedDict  from collections import OrderedDict with open(notmatch) as infile, open (two, 'w') as outfile:     reader = csv.reader(infile, delimiter='\t')     writer = csv.writer(outfile, delimiter='\t')     for gg, poss, codee, ref, alt, *rest in reader:         gg = int (gg)         poss = int(poss)         cls = ref + alt         clss = list(OrderedDict.fromkeys(cls))         writer.writerow([gg, poss, codee, d[gg][poss-1], clss] + rest)   So I used OrderedDict and it seems to give me output like the following for column "clss":  ['A','B','C'] ['G','A','T'] ['G','A'] ['T']   The 5th column which is concat of "ref" and "alt" is the only column where I want to apply this deduplication so I wrote my script in such manner. Everything looks good but there are brackets "[" "] and apostrophe "'" in each cell. How should i modify my code so they are not there?


Transfer values from bash to python script

I have script in bash called "". It can be executed from system folders, for making custom operations with selected files:  #!/bin/bash  while [ $# -gt 0 ]; do     file=$1     #doing smf with selected file     shift done   Аlso, I know about ability launch Blender in cmd, with custom python scripts:  blender -b blendfile.blend -P script.py -x 1 -F PNG -f 1   And I whant to take a value file and transfer it into python script to use it in script.py:  #!/bin/bash  while [ $# -gt 0 ]; do     file=$1     blender -b blendfile.blend -P script.py//+put here $file// -x 1 -F PNG -f 1          shift done   how can I do this?  About : Note, python script launches in blender, not in bash shell


Does the "50 questions in 30 days" rate limit mean 30 calendar days, or 720 hours?

All I'm wondering, is if the 30 day timer that one has after submitting 50 questions lasts for 30 calender days, or exactly 720 hours from when the question was asked.


I'm using Ubuntu 16.04 and there's no fglrx! What happened?


I have the following type of code in my document:  \begin{align*}        (-m)+m & \stackrel{\mathrm{Ax 1.1 (i)}}{=}  m+(-m)\\   &\stackrel{\mathrm{Ax 1.4}}{=}  0 \   I want to align on the = but that is complicated by the fact that there is something hovering over it.  It would seem to be easier to align their centers (no matter what, that is where the = will be).  How can I center a column in align (or align* to be honest, I am not that clear on the difference)


I am trying to append a div with a button so that when when it is clicked I can execute a function.   I am currently appending a div like this.   $('.window').append('

<textarea type="text" class="inputChatText" id="message" name="message" placeholder="enter your message" data-required/>

');   It appends and everything looks right on the page but when I click the button/img nothing happens. For starters i'm just trying to console log the click but eventually want a function to run but cant do this until its clickable.  $('.test').on('click', function() { console.log("The test button was clicked"); });     As you can see here its appending even according to the console   Anyone have any ideas of what I need to do to actually get this to be a clickable event after I append it? Thanks


Get list of files deleted by `find -delete`

This command lists all the files match the provided name:  find . -iname .DS_Store   But when I use -delete parameter with it, I can't see the list of deleted files. They just get deleted.  Preferably without making it complicated with | xarg .. or -exec rm {}, is there any magic flag to see the deleted files when using find . -iname .DS_Store -delete?  PS: I know I can run the command without delete flag before, but I'm looking for something like print0 (though prints uglily) to get the job done.


What happens when a Triwizard Contestant refuses to participate?

It seems different enchantments trigger different consequences - for example, Lily's protective enchantment over Harry disappears the moment Harry turns seventeen, and the Unbreakable Vow results in death if broken. What constitutes the 'binding magical contract' in Goblet of Fire regarding the Triwizard Tournament? What are the repercussions of breaking the Triwizard contract? Both Dumbledore and Mad-Eye Moody stress the fact that Triwizard champions cannot withdraw from the tournament. However, I cannot find any canon reference to what would happen if a Triwizard champion outright refused to participate. Is there any canon source that addresses this? Please no Wikipedia/Wikia answers - I'm looking from information from the books or J.K. Rowling. An appropriate speculative answer based within the spirit of canon if a canon reference cannot be found is fine. For reference:     ‘Once a champion has been selected by the Goblet of Fire, he or she is obliged to see the Tournament through to the end. The placing of your name in the Goblet constitutes a binding,   magical contract. There can be no change of heart once you have become champion.’ - Dumbledore -   Goblet of Fire - page 226 - Bloomsbury - chapter 16, The Goblet of Fire   and     ‘He’s got to compete. They’ve all got to compete. Binding magical contract, like Dumbledore said. Convenient, eh?’ - Mad-Eye Moody -   Goblet of Fire - page 244 - Bloomsbury - chapter 17, The Four Champions


How to prove $\sum_p p^{-2} < \frac{1}{2}$?

I am trying to prove $\sum_p p^{-2} < \frac{1}{2}$, where $p$ ranges over all primes. I think this should be doable by elementary methods but a proof evades me.   Questions already asked here (eg.  and ) deal with the exact value of the above sum, and so require some non-elementary math.


Trouble with FileUtils in Apache commons

I am trying to use apache commons to read a dictionary. When I use this code   for(String line: FileUtils.readLines(new File("dictionary.txt")))     System.out.println(line); }   it prints the whole file. But when i use this code nothing happens when i am 100% sure b and line are the same      for(String line: FileUtils.readLines(new File("dictionary.txt")))     {         if(line.toLowerCase() == b.toLowerCase())             {                  valid = true;              System.out.println(line);         }   So whats wrong?


Best way to get Session ID or oAuth Access Token

What is the best way to get Session ID or oAuth Access Token, without having to use password in Apex Code (or) in custom settings (or) Named Credentials?  Will one of the oAuth flows work in this case?  (obviously username-password flow cannot be considered since it involves passing the password as part of URL)  Here's the use case i am trying to achieve:   I am trying to call the MetaData api of salesforce using the metadata api wrapper available on . Using this i am trying to find out, metrics like number of custom fields, number of test classes, number of classes etc. This process should run in a scheduled batch apex job. In order to call metadata api, i need to pass the sessionid. I used UserInfo.GetSessionID in my batch apex class but that doesn't work as per my research and also tried it. The other option is to call the login service to get the session id or access token, which i can further use to make subsequent calls to metadata api. All the research i did points mostly to articles where the REST api is called to get access token by using connected app credentials, but all of these involve passing password as an attribute to get the access token. So i figure oauth is better way to go and am basically trying to find out the best way(oAuth flow) to get access token without needing to use a Salesforce User's password. And any helpful articles for the same to build this.


Show that $a_{n+1}= 1 + \frac{1}{a_n}$ converges.

Let $\{a_n\}$ be defined by $a_1 =1  $ and $a_{n+1} = 1 + {\dfrac{1}{a_n}}$ with $n \in N$. Show that $a_{n+1}= 1 + {\dfrac{1}{a_n}}$ converges.  I know the limit but how can I show that is a Cauchy sequence or that this sequence converges.


Any free software for creating paid WIFI hotspot?

Anyone know free software (or very cheap) for creating paid access to WIFI - with tokens mechanism?  Can be on Linux, or Windows...  I have a small Hostel and I want to create paid access to wifi (like 1$ for hour).


Can I prove n^2 - n + 1 prime for all even n?

I was playing around with numbers the other day and realized that the first few values for $n(n - 1) + 1$ are prime. Now, I also quickly realized that not all values are prime ($n = 5$ results in 21, which is not prime), but I also noticed that all of the values for which the formula doesn't result in a prime are odd.  I wrote up a quick python script, and since checking $n < 100,000,000$ hasn't provided an even counterexample, I was wondering if I could somehow prove or disprove the hypothesis that, for all even $n$, $n^2 - n + 1$ is prime.  I am aware of Goldbach's proof that for any polynomial, not all of its outputs can be prime, but I don't think that applies if the input is restricted to to just even integers.   Python 3.6.7 code I used:    from math import sqrt from itertools import count, islice  n=0 m=100000000 q=0 p=1 j=0  for n in islice(count(1), m):     if (n % 2):         p = 0     else:         q = n * (n - 1) + 1         p = n > 1 and all(n % j for j in islice(count(2), int(sqrt(n) + 1)))     if (p): print(n, p)     to source of method of checking primality.


Breaking the law of conservation of energy with wormholes?

How don't wormholes violate the conservation of energy and momentum? Picture the following situation: a scientist creates a wormhole connecting the ceiling of a room with the floor. The two openings of the wormhole are vertically aligned, so if someone dropped an object in the entrance near the floor, it would "appear" instantly in the entrance near the ceiling and fall down to the floor because of gravity. And since both entrances are vertically aligned, the object would repeat the process, falling in the entrance near the floor and "appearing" near the ceiling again. This would create a loop that accelerates the object. Now imagine that the object is a magnet. If we constructed a coil around the falling object, we would basically create free infinite energy!!! Could this idea work? If not, why? And if yes, how is this even possible due to the law of conservation of energy?  Please help me not to freak out with this question in mind hahaha! Thank you!


How to detect the cause of what causes Windows Explorer to crash?

I see you have succussfully answered this question previously but it is not specific to my system.  I have downloaded your file and created the relevant dump file but I don't know how to analyse it. Can I upload it to you for some advice please?


Minimal polynomial reducible modulo every prime $p$

Suppose $K = \mathbb{Q}(\alpha)$ with $\alpha = a + b\sqrt{D_1}+c\sqrt{D_2}+d\sqrt{D_1D_2}$ with $D_1,D_2 \in \mathbb{Z}$. Prove that the minimal polynomial $m_\alpha(x)$ for $\alpha$ over $\mathbb{Q}$ is irreducible of degree 4 over $\mathbb{Q}$ but is reducible modulo every prime $p$. In particular show that the polynomial $x^4 - 10x^2 +1$ is irreducible in $\mathbb{Z}[x]$ but is reducible modulo every prime. [Use the fact that there are no biquadratic extensions over finite fields.]  So far I have established the following:  $[\mathbb{Q}(\alpha):\mathbb{Q}]=\deg(m_\alpha(x))=4$  $Gal(\mathbb{F}_{p^n}/\mathbb{F}_p)$ is cyclic, hence no biquadratic extension (which is iso to $V_4$) exists over finite fields.  I'm having a problem proving the reducibility mod every prime though. Any hints?


How do I prove that among any $5$ integers, you are able to find $3$ such that their sum is divisible by $3$?

How do I prove that among any $5$ integers, you are able to find $3$ such that their sum is divisible by $3?$ I realize that this is a number theory question and we use modular arithmetic, but I'm unsure of where to begin with this specific situation.


Depending on the word, using an before a consonant is not right.  What about in this phrase, "David has just gotten an SX250". To me, it does sound a lot better than "David has just gotten a SX250".   I saw a similar phrase in a book the other day, and it did not sound/look right at all!  Don't know if I'm going crazy or what..


When asking a question on stackoverflow, one is suggested to answer one's own question with the following text:     Answer your own question – share your knowledge, Q&A-style   And yet it seems rather unpopular to me, that is, types of questions that seem of good quality (perhaps I'm biased because I'm thinking about my own questions) don't get as much immediate attention. For example:    So my question here, is does this sort of answering your own question right off with your question work and is it really encouraged on stackoverflow?


How did this character travel between star systems in a ship without a hyperdrive?

In The Rise of Skywalker,       Kylo Ren takes an Imperial TIE Fighter from the Death Star II ruins to Exegol. Presumably he found the TIE Fighter in the Death Star ruins, since that's where he was left.   These ships have only ever been depicted as short-range fighter craft, and it seems to be from the Original Trilogy era, given where it apparently came from. How could it get between systems with no hyperdrive?


I have about 5 drupal sites on in motion server but for some reason all sites are showing me the same error which is   "PDOException: SQLSTATE[HY000] [2002] No such file or directory in lock_may_be_available()  My host is telling me that there is nothing out of the ordinary, but clearly some thing is wrong, all 5 websites are showing me this error simultaneously. I need a to resolve this issue , I need some help.


Programmatically setting a layer's bounding box in Geoserver

I have a system built on PostGIS/GeoServer/OpenLayers. Data (a ship's voyage track) is inserted into the database in real-time - a bunch of variables and point geometry type. This is served up via (primarily) WFS to OpenLayers.  I dynamically publish the layer for a new voyage using REST. When done this way, the bounding box (according to the config page) is set to 0,0,-1,-1 for both native and lat/long.  What I'd like to do is set this to a reasonable value programmatically - effectively automating going in and using the 'Compute from Data'/'Compute from Native Bounds' links on the layer config page.  My preference is to do this via a RESTful call, however this doesn't seem to be supported in the current version of the standard API. Any other alternative solutions are more than welcome.


Show that $1/\sqrt{1} + 1/\sqrt{2} + ... + 1/\sqrt{n} \leq 2\sqrt{n}-1$ for $n\geq 1$  I attempted the problem but I get stuck trying to show that if the statment is true for some $k\geq1$ then $k+1$ is also true.  My attempt: Base case $n=1$ is true by inspection  Now assume the statement is true for some $k\geq1$. Then $1/\sqrt{1} + 1/\sqrt{2} + ... + 1/\sqrt{n} +1\sqrt{n+1} \leq 2\sqrt{n}-1 + 1/\sqrt{n+1}$ but I am not sure how to show the rest.


It is my understanding that non-primitive types in JS are passed by reference not by value.   However, in the following code, when I log test.array_reference I am getting the initial value of test_array rather than a reference to the updated array that I expect    function tester() {   let test_array = [];    function change_array() {     test_array = ["foo"];   }    return {     array_reference: test_array,     change_array: change_array   }; } test = tester(); test.change_array(); console.log(test.array_reference); // why is this the initial value and not a reference to the updated array     What am I missing?  Are arrays not always passed by reference?


Can someone explain in lay terms how the research done by Lene Hau about Light speed reduction is actually possible? Isn't the speed of light a constant?


meta_query with meta values as serialize arrays

I'm working on a project in which I'm creating a custom post type and custom data entered via meta boxes associated with my custom post type. For whatever reason I decided to code the meta boxes in such a way that the inputs in each metabox are part of an array. For instance, I'm storing longitude and latitude:
      Latitude:
      <input type="text" id="latitude" name="coordinates[latitude]" class="full-width" value="" />

          Longitude:
      <input type="text" id="longitude" name="coordinates[longitude]" class="full-width" value="" />
   For whatever reason, I liked the idea of having a singular postmeta entry for each metabox. On the save_post hook, I save the data like so:  update_post_meta($post_id, '_coordinates', $_POST['coordinates']);   I did this because I have three metaboxes and I like just having 3 postmeta values for each post; however, I've now realized a potential issue with this. I may want to use WP_Query to only pull out certain posts based these meta values. For instance, I may want to get all posts that have latitude values above 50. If I had this data in the database individually, perhaps using the key latitude, I would do something like:  $args = array(     'post_type' => 'my-post-type',     'meta_query' => array(         array(             'key' => 'latitude',             'value' => '50',             'compare' => '>'         )     )  ); $query = new WP_Query( $args );   Since I have the latitude as part of the _coordinates postmeta, this would not work.  So, my question is, is there a way to utilize meta_query to query a serialized array like I have in this scenario?


Accidentally deleted Ubuntu installation, how can I reinstall it cleanly on a dual boot system?

I have win 7 on my machine and installed Ubuntu as dual boot. While cleaning up some unwanted files I accidentally deleted my Ubuntu installation as well. Now every time I boot my machine, I still get the dual boot option and when I try to use the Ubuntu option it says "corrupted".  Can you please advise how can I get rid of this misleading option and do a complete fresh installation?


How light is able to choose the path to take?

I'm a student at STEM School (10th grade), and I'm studying optics and light in Physics. I was studying the Fermat principle which say:     The path taken between two points by a ray of light is the path that   can be traversed in the least time.   I asked myself, how light is supposed to know which path to take, in so less time (3*10^8 m/s), considering light hasn't mass and how their 'atoms and molecol' set to choose the less time? (Sorry for my english, but english isn't my 1st language)


How should /tmp be automatically cleaned in Ubuntu 16.04?

In , I see answers for pre-14.04, 14.04, 15.10 "and newer", and other information, but there is not an accepted answer for 16.04 specifically, which is what I want to determine. Should I create a config file in , should I install , or is there a newer recommended solution?


Simulating ratio of two independent normal variables

I have two non centered independent normally distributed variables $X$ and $Y$.  Specifically $$ X \sim N(\mu_1, \sigma_1)$$  $$ Y \sim N(\mu_2, \sigma_2)$$   I am interested in sampling from the ratio $X/Y$. I know that the ratio is Cauchy distributed if the denominator distribution is centered at 0 which mine is not. My question is is there an approximate distribution that I can sample the ratio $X/Y$ from using the means and standard deviations from the normal distributions?


Receiving Permission denied when trying to use cat command to create a file

I am working with Ubuntu version 18.04.4 LTS.  I tried to create a file using the following command:  sudo cat > filename.yaml and received a "Permission denied error"  I can create the file using the VIM editor and sudo.  Please advise.


Is there any privillege or criteria that allows you to accept answers earlier?

I have seen users comment that there is a 24h time limit before accepting answers. But I asked a question on Stack Overflow which was answered within 2 minutes. I tried out the answer and it worked. So I accepted it and upvoted it after another 2 minutes.  How come it was possible for me to accept within a few minutes and the other user not? Is there a privilege awarded for that? Any rate limiting?


Stop public betas from downloading on iPhone

I have an iPhone SE running iOS 12 with the beta profile installed. I don't always update to the next beta when it comes out.  Is there any way to stop updates form downloading as they can take up quite a bit of space?


Why do I need to override the .Equals and GetHashCode in C#

I am using Entity Framework 5. In my C# code I want to compare if two objects are equal. If there are not then I want to issue an update.   I have been told I need to override the .Equals method and then also the gethascode method.  My classes look like this:  public class Students    {     public int PersonId { get; set; }     public string Name { get; set; }     public int Age {get; set;}  }   Can some explain why I need to override .Equals and .GetHashCode.  Also can someone give me an example. In particular I am not sure about the hashcode.  Note that my PersonId is a unique number for this class.


Division vs. multiplication by reciprocal in R

I'm working with matrices in R, and noticed something strange:  set.seed(1234) m <- replicate(10, rnorm(20)) all(m / 7 == m * (1/7)) #FALSE   Why is that ? Shouldn't the multiplication by the reciprocal be equivalent to normal division ?


I booted Ubuntu from my SSD. Then I plugged in my HDD into my Computer after linux had booted. As expected, it wasn't detected. How can I make my system detect it?


Let $W=\{p(B):p \text{ is a polynomial with real coefficients}\},$ where $B=\begin{pmatrix}0&1&0\\0&0&1\\1&0&0\end{pmatrix}.$ Then find the dimension of $W.$  I have shown $B^4=B$ and $c_1B+c_2B^2+c_3B^3=0\implies c_1=c_2=c_3=0$ and hence $\{B,B^2,B^3\}$ is a basis of $W.$ So $\dim W=3.$  Am I right?


so i am trying to learn texturing so that i can render my cars, but these car paint materials are pretty hard to make for a noob. I did some research and tried making this shader in cycles but failed miserably. Can anyone help me here? How can i get car paint shader like one shown here in cycles?


Showing Null Pointer Exception Calling From Static Method Android

There are three class History, Databasehandlreone, DatabaseHandler. In History call there is one static method named addHistory(Record record). it calling the non static method which is in same class named calling(String u).  History      class History extends Activity{     public static long addHistory(Record record) {     String u=record.getURL();     History ss=new History();     ss.calling(u);     }     private void calling(String u) {             DatabaseHandlerone db=new DatabaseHandlerone(History.this);             try{             db.good(u);              }catch(Exception e){                 Log.v("Error",e.toString());             }}}   In calling function, it calls the function named good which is in another class name Databasehandlerone.  DatabaseHandlerone.java      public class DatabaseHandlerone {         public DatabaseHandlerone(History history) {             // TODO Auto-generated constructor stub         }      public void good(String s){             try{             DatabaseHandler db=new DatabaseHandler(DatabaseHandlerone.this);             db.deleteall(s);              }catch(Exception e){                 Log.v("Calling from DatabseHandler1",e.toString());             }   }   In good function, deleteall function will be called which is another class called DatabaseHandler.  When I am calling db.deleteall(s). It showing Java.NullPointerException error. can anyone pls Help.  DatabseHandler.this      public class DatabaseHandler extends SQLiteOpenHelper {          public void deleteall(String s){           Log.v("value",s);          }   Logcat              02-21 11:46:35.941: D/libc-netbsd(22197): getaddrinfo: stackoverflow.com get result from proxy >>             02-21 11:46:35.943: D/ID Safe Utils(22197): leave sendOpenUrlBroadcast             02-21 11:46:35.959: V/Good(22197): http://stackoverflow.com/users             02-21 11:46:35.959: V/Calling(22197): http://stackoverflow.com/users             02-21 11:46:35.959: V/After Databse(22197): After DatabseHandler Calling             02-21 11:46:35.959: V/Value(22197): http://stackoverflow.com/users             02-21 11:46:35.959: V/String(22197): http://stackoverflow.com/users             02-21 11:46:35.960: V/DatabaseHandler()(22197): Afert SdCard             02-21 11:46:35.960: V/Calling from DatabseHandler1(22197): java.lang.NullPointerException             02-21 11:46:35.960: V/DatabaseHandler()(22197): Afert SdCard             02-21 11:46:35.960: V/Retreiving Values:(22197): java.lang.NullPointerException


Looking for a specific synonym of "selfish"

A word or phrase that describes best a specific type of person or their behavior. The type of person that would not act upon a threat if said threat is not affecting their personal well-being directly.   Context: "Global warming becomes my problem only if I decide to believe I'll live long enough to see the consequences of it."   Proposals that are tightly related to the given context are more than welcome!


Is https://stackoverrun.com/ related to Stack Overflow?

Recently, I have been getting more and more search results from different search engines that all point to . But the original articles that are shown there seem to come from Stack Overflow.  Is the site related to Stack Overflow or is it a fake site? It's very confusing.


Equivalent of [tag:X] but allow linking to a tag on any SE site

If I enter [tag:X] on meta.stackoverflow.com, it is rendered as a link to tag X on stackoverflow.com.  Similarly if I post [tag:X] on chat, it is interpreted as a link to that tag on the SE site associated with that chat room.  I would like to be able to link to a tag on any SE site, not necessarily the one associated with that chat room.  E.g. I would like to be able to include  in a chat message associated with another site such as  and have it link to the corresponding tag wiki in stackoverflow (not unix.)  As far as I know the closest you can get at the moment is <kbd> elements inside links (e.g.  ) but that does not work in chat and does match the style of "real" taglinks.  Any chance of extending the markup syntax to permit this?


Keeping header "on top" in landscape mode

When using pdflscape and fancyhdr, the headers also get rotated. Whilst it's a normal behaviour in most cases (especially when the document has to be printed), I am dealing with a report which will never be printed, so this default behaviour is more annoying.  Here is a MWE of a document dealing with portrait and landscape pages:  \documentclass[a4paper, 10pt]{article} \usepackage{graphicx} \usepackage{pdflscape} \usepackage{fancyhdr} \usepackage{lipsum} \usepackage[left=2cm, right=2cm, bottom=2cm, top=2cm]{geometry} \setlength{\headheight}{32pt}  \lhead{\includegraphics[scale=.5]{tt}\\Foo} \rhead{\includegraphics[scale=.5]{tt}\\\thepage} \cfoot{}  \fancypagestyle{customlandscape}{% \fancyhf{} \newgeometry{left=1cm, right=1cm, bottom=1cm, top=1cm} % ?? }  \pagestyle{fancy} \begin{document}  \lipsum[1-10] \newpage  \pagestyle{customlandscape} \begin{landscape}     Here is the landscaped content, the header of this page should look like the rest... \end{landscape}   \newpage \pagestyle{plain} \lipsum[1-10] \end{document}   Note : you will have to provide 2 images called tt for it to compile, sorry for that. So, if we look a bit closer, the header of the portrait pages look like this :    How can I manage for my landscape pages to look like this ? :   Currently, by compiling my MWE, you'll notice that the header is on the right on the landscape page.   PS : There is another problem in this MWE, after switching back to portrait, it seems I'm not able to restore the default pagestyle (with the images in the header).


What is the difference between casting and conversion?

Eric Lippert's comments in  have left me thoroughly confused. What is the difference between casting and conversion in C#?


[slider] [img] [img] . . [img] [/slider] Is there a way that I can get the number of nested shortcode in a parent shortcode   Thanks


Show that if $\gcd(a,b) = 1$ and $a|n$, $b|n$ then $ab|n$  What I have is as follows:  If $\gcd(a,b) = 1$ and $a|n$ and $a|n$ we know that:  $a=mn$ and $b=sn$ were $m,s \in \mathbb{Z}$  $ab|n = (mn)(sn)|n = n(ms)|n = \frac{(n)(ms)}{n} = ms$  This is were I am stuck. Im I done here or am I missing something?


I am working with a wildlife-related feature class where I have different fields for common name (i.e. Northern Goshawk), scientific name (Accipiter gentilis), and species code (NOGO). I have domains for all of these which limits acceptable answers to only the species that occur in the area studied. However, as I'm essentially adding the same information 3 times per data point, any species code I enter will only match up with one common name and one scientific name. Is there a way to link these fields so when I enter one field information (say, NOGO) the other two auto-fill?   I'm quite new to geodatabases.


Ubuntu - Root user cannot see $JAVA_HOME variable expanded to $PATH

I have created a variable $JAVA_HOME in `/etc/environment'  JAVA_HOME="/usr/lib/jvm/jdk" PATH="...bla bla bla:$JAVA_HOME/bin"   I also edited /etc/profile to have source /etc/environment so that all users get Java home. and the directory itself has been made 755 for access.  The printout as root for env:  LANG=C.UTF-8     SUDO_GID=1000 USERNAME=root JAVA_HOME=/usr/lib/jvm/jdk SUDO_COMMAND=/bin/su USER=root PWD=/home/ssuser HOME=/root SUDO_USER=ssuser SUDO_UID=1000 MAIL=/var/mail/root TERM=xterm SHELL=/bin/bash SHLVL=2 LOGNAME=root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin   But when I do the same as ssuser without sudo-ing, the environment variable $JAVA_HOME is expanded to the actual path.   SSH_CONNECTION=193.128.134.115 18497 10.1.4.4 22 LESSCLOSE=/usr/bin/lesspipe %s %s LANG=C.UTF-8 JAVA_HOME=/usr/lib/jvm/jdk XDG_SESSION_ID=2 USER=ssuser PWD=/home/ssuser HOME=/home/ssuser SSH_CLIENT=193.128.134.115 18497 22 XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop SSH_TTY=/dev/pts/0 MAIL=/var/mail/ssuser TERM=xterm SHELL=/bin/bash SHLVL=1 LOGNAME=ssuser XDG_RUNTIME_DIR=/run/user/1000 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jdk/bin LESSOPEN=| /usr/bin/lesspipe %s   And this has nothing to do with what's set in /etc/sudoers for env_var reset/keep settings. Because I have tried this in a different computer and it works just fine.   I am slightly clueless as to why this is happening. Also, something very strange I have noticed is that for a single session sudo users aren't being prompted for password. I have checked /etc/sudoers and it is set up correctly to ask password for root.  I have tried closing the session and reopening. I can see as them as a normal user, not root. Also, rebooting doesn't do anything different.


If the coefficients of the quadratic equation $ax^2+bx +c$ are u.i.i.d ran variates in $(0,1)$ what is the probability of roots being real?

If the coefficients a,b,c(taken in order ,c being the constant term) of a quadratic equation are randomly and independenly chosen in the open interval(0,1) what is the probability that both the roots are real?


When using complete sentences in parenthetical e.g. or i.e. situations, should the first word be capitalized?

In a bulleted list of very technical sentences, where each bulleted item has one or two parenthetical examples or restatements which are complete sentences, should the first letter of each e.g. or i.e. sentence be capitalized or not?  Example:   Here is my technical sentence. (e.g., Should the first word of this e.g. be capitalized like this?) Here is another technical sentence.  (i.e., this really isn't a i.e. different example to highlight whether the first word should or should not be capitalized after a parenthetical i.e.)


Execute bash scripts on entering a directory

What is the best way to execute a script when entering into a directory? When I move into a new directory I would like bash to execute the projectSettings.bash script much like RVM does.


Proving that given metric space is complete: $X := (0,\infty)$ and $d:=|\ln(x)-\ln(y)|$

Given the metric space $(X,d)$ with $X := (0,\infty)$ and $d:=|\ln(x)-\ln(y)|$, how can I show that $(X,d)$ is complete?  I need to prove that any Cauchy sequence converges, so:  If $(x_n)$ is a Cauchy sequence in X, then it follows for all $\epsilon \gt 0$ that there exists an $n_0 \in \mathbb{R} : \forall n,m \leq n_0: d(x_n,x_m) \lt \epsilon$.  I couldn't find a direct way to prove this, I guess an indirect approach might go as follows:  Let $(x_n)$ be a Cauchy sequence in X and assume that it does not converge, then it follows that there exists an $\epsilon > 0$ such that for an arbitrary $x \in X : \forall n \in \mathbb{N}: d(x_n - x) \geq \epsilon$ and this would contradict the fact that $(x_n)$ is a cauchy sequence. I'm assuming that this is incorrect since I didn't even use the given metric and this proof would mean that no cauchy sequence converges.  So how can I prove that this metric space is complete? And in general is there a way how to approach these completeness proofs?


How to remove "all new line character" in a JAVA string

I just want to remove everything after a new line in a JAVA string. For Example:- If String = "Class              Name              Address"  I want my output to be = "Class"  It is not a String Array it is one String with 3 lines  Help would be highly appreciated.


What is the air resistance for objects moving supersonically?

A common expression for hydrodynamic drag is a a force that goes $\propto -k v^2$.   Physically I have alwasys interpreted this as being related to the ram pressure $\propto \rho v^2$, i.e. for an object to move through a fluid at speed $v$, one needs to impart momentum $\propto v$ and kinetic energy $\propto v^2$ to air molecules for them to move out of the way.  Once the object reaches the speed of sound, however, it will be moving through the fluid faster the molecules get out of the way, hence causing a shock wave - the familar sonic boom.  How will air resistance change, if it will, in the supersonic regime?


How can I put a curly brace inside an algorithm to group code lines?

I am using the algorithmic package (or even algorithm2e is fine). Is it possible to use curly braces to group some lines in the algorithm so as to be able to put an explanation to the right?


Lost vlc after a partial upgrade - cannot reinstall due to unmet dependencies

I am using Ubuntu 14.04, and run a partial upgrade via Update Manager. This resulted in removing VLC.    I've tried reinstalling using sudo apt-get install vlc but got this error:     Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created or  been moved out of Incoming. The following information may help to  resolve the situation:   The following packages have unmet dependencies:  vlc : Depends:    vlc-nox (= 3.0.0~~git20141202+r58827+31~ubuntu14.04.1) but it is not  going to be installed           Depends: libavutil53 (>= 6:9.1-1) but it is not installable           Recommends: vlc-plugin-notify (= 3.0.0~~git20141202+r58827+31~ubuntu14.04.1) but it is not going to be installed           Recommends: vlc-plugin-samba (= 3.0.0~~git20141202+r58827+31~ubuntu14.04.1) but it is not going to be installed    E: Unable to correct problems, you have held broken  packages.   I've tried the solutions mentioned  (purging vlc) and  (adding the stable-daily ppa) but none of them worked, still getting the same error.  What can I do now?   Updates     Tried sudo apt-get install -f and then installing vlc, still the same results.   Tried the solution from the other question, and after trying several suggestions with no succes, I selected the one that offered to install the most of the packages. VLC was installed but not properly, as I am getting this error now   VLC media player 3.0.0-git Vetinari (revision 3.0.0~~git20141202+r58827+31~ubuntu14.04.1) [000000000243c118] core libvlc error: No plugins found! Check your VLC installation.


What is the most efficient way to get row with the max value?

Imagine we have a beautiful hotel. This hotel has a database with just one table:  room check-in    check_out   other columns... 1    2020-02-04  2020-02-05  ... 1    2020-02-06  2020-02-09  ... 1    2020-04-20  NULL        ... 2    2020-03-29  2020-04-01  ... 2    2020-04-17  2020-04-18  ...   What's the best and efficient way to select the last check-in for every room with other columns' values (otherwise I would just use room, max(check-in)?    Expected result is   room check_in   check_out  other columns...  1    2020-04-20 NULL       ... 2    2020-04-17 2020-04-18 ...   First idea that came to my mind was to join this table with its copy:  WITH last_checkins AS (     SELECT room, max(check_in) AS last_c     FROM rooms     GROUP BY room ) SELECT * FROM rooms r          INNER JOIN last_chekins c                     ON r.room = c.room                         AND r.checkin = c.last_c;   What I dislike about this idea   It seems a bit inefficient. There are 30 million rooms in this hotel. So I would have to join two big tables I'm a bit afraid of joining on dates. It feels like something might go wrong. Check_in column has time too by the way. Which makes it messier.    I would like to know are my concerns relevant?


$\left(\sum_{i=1}^n x_i\right) \cdot \left(\sum_{i=1}^n \frac{1}{x_i}\right) \ge n^2$, for all integers $n\ge 1$.

Let $x_1,\ldots, x_n$ be positive integers. Use mathematical induction to prove that  $$\left(\sum_{i=1}^n x_i\right) \cdot \left(\sum_{i=1}^n \frac{1}{x_i}\right) \ge n^2$$ for all integers $n \ge 1$.  (Given Hint: For all positive integers $a$ and $b$, $\frac{a}{b}+\frac{b}{a} \ge 2$.)  Can anyone help? Thank you.


In a game, you are standing somewhere and a move consists of either moving forward any number of steps, not moving at all, or moving $1$ step backwards. If you complete $n$ moves, find the number of sequences that end with you in your starting position and which never go behind your starting position. If the "never go behind the starting position" condition weren't there, the answer would just be $\binom{2n-1}{n-1}$. However I'm not on sure how to proceed from here.


Cancelling special & general relativistic effects

We know that for a GPS we need to make a correction for both general and special relativity: general relativity predicts that clocks go slower in a higher gravitational field (the clock aboard a GPS satellite moves faster than a clock down on Earth), while special Relativity predicts that a moving clock is slower than the stationary one (slow the clock compared to the one down on Earth).  My question is this: is it possible, in theory, to set up an orbit so that these two effects cancel each other out, allowing a clock on board a GPS satellite to tick as if it were on Earth? Is there a distance at which the special and general effects cancel?  Sorry if this is a stupid question - I'm still not entirely confident with the theory of general relativity.


What's the difference between term_id and term_taxonomy_id

The title says it all. At the moment in my custom taxonomies I'm getting the terms using the term id and taxonomy name.  Thought this question would've been asked before but can't find it anywhere! So just thought I'd ask and see if anyone has any answers.


Does exists any better way to solve "Simple hit problem" ? $y = \frac{a x + b}{c}$

I am looking for other solution of a problem, which I named: $$\text{Simple hit problem}$$ Let: $$y = \frac{a x + b}{c}$$ $$a, b, c, x \in \Bbb{Z}$$ For which $a, b, c$ there exists $x$ for such $y \in \Bbb{Z}$ ?  I noticed that the solution exists for $a, b, c$, if: $$(ax) \ \text{mod} \ c = c - (b \ \text{mod} \ c),$$ but the approach relies on checking all unique values of result of modulo operator from left side of equation.  The question is, if there exists any better approach for this problem or anyway it come down to check, if some equation will be true for some $x \in A$, where A will be a set of finite ammount of values ?


Tables: Mixing tikz and align, help with centering

I know that there's a bunch of posts about vertical and horizontal centering in tables. I have a related issue which I can't figure out how to solve.  I'm trying to center the fourth column, but putting a fourth ">{\centering}" breaks the whole table. Unsure what's going on. Using sharelatex, mostly sure I'm loading the correct package (just 'array' right?).  Ideally, I wish that the pictures in the first column would also be vertically centered, which they aren't, also defeating the purpose of using column type 'm' in the first column.  Also ideally, I'd like to be able to have columns 2, 3, and 4 exist within a single aligned block, so that I could use & to align them to the greater than/less than signs.  Given:  \begin{table}[h] \centering \begin{tabular}{| >{\centering}m{75pt} | >{\centering $} m{65pt} <{$} |  >{\centering} m{20pt} |  m{65pt} |} \hline     \begin{tikzpicture}          \draw [gray] (0,0) circle (15pt);         \filldraw [gray] (0,0) circle (1pt);         \draw [gray] (37.5pt,0) circle (15pt);         \filldraw [gray] (37.5pt,0) circle (1pt);     \end{tikzpicture} & \underline{2r_c \text{sin} \left( ^{\pi} \!/ _{n_k} \right)} & $\geq$ & $2r_f + R_1 r_f$ \\  \hline     \begin{tikzpicture}          \draw [gray] (0,0) circle (15pt);         \filldraw [gray] (0,0) circle (1pt);         \draw [gray] (30pt,0) circle (15pt);         \filldraw [gray] (30pt,0) circle (1pt);     \end{tikzpicture} & 2r_c \text{sin} \left( ^{\pi} \!/ _{n_k} \right) & $\leq$  & $2r_f+\underline{R_1 r_f}$ \\  \hline     \begin{tikzpicture}          \draw [gray] (0,0) circle (15pt);         \filldraw [gray] (0,0) circle (1pt);         \draw [gray] (22.5pt,0) circle (15pt);         \filldraw [gray] (22.5pt,0) circle (1pt);     \end{tikzpicture} & 2r_c \text{sin} \left( ^{\pi} \!/ _{n_k} \right) & $<$  & $\underline{2r_f}+R_1 r_f$ \\ \hline     \begin{tikzpicture}          \draw [gray] (0,0) circle (15pt);         \filldraw [gray] (0,0) circle (1pt);         \draw [gray] (11.25pt,0) circle (15pt);         \filldraw [gray] (11.25pt,0) circle (1pt);     \end{tikzpicture} & 2r_c \text{sin} \left( ^{\pi} \!/ _{n_k} \right) & $<$  & $\underline{2r_f}+R_1 r_f$ \\ \hline \end{tabular} \end{table}


Unable to format/wipe Window Disk without Error (Tried Ubuntu Gparted and Diskpart

I am trying to wipe/reinstall Windows, however, all have no success. In usb live boot to Window installation set up, install new Window to override it, unable to delete or format any of my exisiting disk/partition. I then tried repair your computer -> Troubleshoot -> Command Prompt and wiping with disk part select disk 0 Disk 0 is now the selected disk clean Diskpart Succeeded in cleaning the disk. create partition primary Virtual Disk Service error: There is not enough usable space for this operation. list partition (All partitions are not clean, still the same as before)  I also tried wiping it with Gparted using Ubuntu live boot.  Open Gparted. Select Any of my Window's partition Delete Apply Operations All operations successfully completed Gparted refreshes and the partition is still there and not deleted.  Attempt on fdisk fdisk /dev/nvme0n1 d 3 (any number, doesnt matter) Partition 3 has been deleted w The partition table has been altered. Calling ioctl() to reread partition table. Syncing Disks. fdisk /dev/nvme0n1 p (All disk are still there)


Is there any benefit in using UEFI GPT instead of Legacy MBR?  Many thanks in advance!


Which skill should be used for secret doors or traps: Perception or Investigation?

Which skill should be used for finding secret doors or traps: Perception or Investigation?  If I only look at the SRD, it seams pretty cut and dry; all the examples for Wisdom (Perception) are creatures and all the examples for Intelligence (Investigation) are objects, but if I look at the Player's Handbook, page 178, the green box example is using Perception for secret doors or traps.   Specifically, under Investigation:     deduce the location of a hidden object,   And the green box:     When your character searches for a hidden object such as a secret door or a trap, the DM typically asks you to make a Wisdom (Perception) check.   Which is correct?


I just installed a fresh 18.04 xubuntu on my new laptop. The F keys has some utility buttons for volume, screen brightness adjustments etc.  The original function keys only work with fn button pressed - the function keys override the F keys  How do I revert the keys back so these function keys only work with with fn key presses?


Why is the cloth cooled to a temperature below that of the hot wind?

When a wet cloth is hung up in a hot wind in the desert, it is cooled by evaporation to a temperature that may be or so below that of the air. Discuss this process in light of the second law of thermodynamics.    I come up with the following facts: Think of the cloth and the water on it separately. The cloth is a closed system(no matter exchange between the system and the environment). This system transfer its heat into the water since its temperature decreases. The water on the cloth can be also thought of as a closed system. Then since the temperature of the water increases, it absorbs heat from both the cloth and the hot wind.   I don't know whether they are true, and I really want to know why the cloth can cooled to a temperature below that of the air.


Is the set inside a set subset of the bigger set?

I just started set theory (ncert maths 11th grade) and it had a question:  Let $A = \{1 , 2 , \{3,4\} , 5 , 6\}$ Is $\{3,4\}$ a subset of A?  The book said no. I think the answer should be yes, since $A$ contains a set which contains the elements $3,4$ hence $A$ contains $3,4$ and by the definition of subset $\{3,4\}$ should be a subset of $A$.


Pokemon: How do I switch back & forth from "real world" camera view?

I turned the camera off somehow which made it easier to catch, but can't seem to turn it back on


mutual information of two identical signals

library(infotheo) > mutinformation(c(1,2,3),c(1,2,3)) [1] 1.098612 > mutinformation(c(1,1,1),c(1,1,1)) [1] 0   Why is there a difference?  I keep reading that this should either be 0 or infinity, yet I get neither  Is this because I have not defined the joint probability?


Cyclic subgroups dealing with prime numbers Question

Let G be a group with |G| = pq. (p and q are both prime).  How can we prove that every proper subgroup of G is cyclic?


After uninstalling Ubuntu cannot boot into Windows because of Grub

I have Toshiba pc that came with Windows 8, later updated to Windows 8.1 Had Ubuntu 14.04 installed on it fully replacing Windows. Now I want to give my pc to my brother and he wants Windows back. I uninstalled Ubuntu and now can use only live Ubuntu disc. If I do not use it it symphysis goes into black screen and Gnu Grub version 2.02 beta2-9ubuntu1.3  Grub> I don't have a recovery disc. I tried: - win 10 iso and win7 iso from boot menu Doesn't load. Help