FragmentManager.beginTransaction() on null object reference when trying to add new dialogFragment to a exsisting dialogfragmen whicht is on a fragment

this is not a duplicate question as the occurrence of the issue is different.. as i am only experiencing this behavior when i try to do exact what i have mentioned(layout order wise)   i am trying to create a new dialog fragment trough another dialog fragment. when i try to do that it throws an error  java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v4.app.FragmentTransaction android.support.v4.app.FragmentManager.beginTransaction()' on a null object reference         at android.support.v4.app.DialogFragment.show(DialogFragment.java:142)     this is the related code   ForgotPasswordFailedFragment forgotPasswordFailedFragment = new ForgotPasswordFailedFragment();         forgotPasswordFailedFragment.show(getFragmentManager(), "Password Reset Failed");     so my view order is something like this..      mainActivity -> fragment -> dialogfragment -> dialogfragment (i'am trying to get this)   i have tried mentioned answers and tease are the  errors that occurred for each change...  ForgotPswrdSuccessFragment forgotPswrdSuccessFragment = new ForgotPswrdSuccessFragment(); forgotPswrdSuccessFragment.show(requireActivity().getSupportFragmentManager(), "Password Reset Failed");  this throws        Fragment ForgotPasswordDFragment{725811b} not attached to an activity.             at android.support.v4.app.Fragment.requireActivity(Fragment.java:724)             at *********.SignIn.ForgotPassword.ForgotPasswordDFragment.showSuccessDialog(ForgotPasswordDFragment.java:85)   ForgotPasswordDFragment is a dialog fragment which is on a fragment  and i am calling another dialogfragment from (ForgotPasswordDFragment)  there..and now that action is throwing above mentioned eror  for this   forgotPswrdSuccessFragment.show(this.getChildFragmentManager(), "Password Reset Failed");   the exception is   java.lang.IllegalStateException: Fragment has not been attached yet.         at android.support.v4.app.Fragment.instantiateChildFragmentManager(Fragment.java:2383)


My code will not execute from line 29 onwaard. I am beginner in java and do not know about exception handling and can not handle the NULL pointer exception thrown. Is there a way other than exception handling or there is flaw in my code?  public static void run(int a){         Scanner scanf = new Scanner(System.in);     switch (a) {             case 1:                 int i=0;                 int q=0;                 while(i!=5 || q!=-99999){                 System.out.println("Enter Student Name");                 String x = scanf.nextLine();                 student[i].setName(x);                 System.out.println("Enter Registration Number");                 String z = scanf.nextLine();                 student[i].set_RegistrationNo(z);                 System.out.println("Enter -99999 to exit");                 i++;                  q =scanf.nextInt();                 }                 break;             case 2:                 System.out.println("Which Record do you want to change?\n 1.Name 2.Registration Number");                 int y=scanf.nextInt();                 if(y==1){                     System.out.println("Enter Student Name");                     student[y].setName(null);                     String x = scanf.nextLine();                     student[y].setName(x);                 }                 else if(y==2)                 {                     student[y].set_RegistrationNo(null);                     System.out.println("Enter Student Registration Number");                     String z=scanf.nextLine();                     student[y].set_RegistrationNo(z);                 }                 question();                 break;             case 3:                 System.out.println("Enter record you want to delete");                 int k=scanf.nextInt();                 student[k].setName(null);                 student[k].set_RegistrationNo(null);                 question();                 break;             case 4:                 System.out.println("Enter record you want to view/search");                 int c=scanf.nextInt();                 System.out.println("Name is");                 student[c].getName();                 System.out.println("Registration number is");                 student[c].get_registrationNo();                 question();                 break;             case 5:                 for(int r=0;r<5;r++){                     System.out.printf("Name of Student %d\n",r);                     student[r].getName();                     System.out.printf("Registration Number of Student %d\n", r);                     student[r].get_registrationNo();                 }                  question();                 break;             case 6:                 break;         }     } }


Binary Search Tree NPE when adding to tree

I am trying to program a binary search tree that uses an integer as a rank (0-7) where the left node can be less than or equal to the current node so you can have multiple nodes with the same rank.  I am getting a null pointer exception when I try to enqueue but I don't understand why as I'm not changing the head node at all. Any help would be appreciated, thanks!  class PriorityQueue<Base> {   private class Node   {     private Base object;     private int  rank;     private Node left;     private Node right;      private Node(Base object, int rank)     {       this.object = object;       this.rank = rank;       left = null;       right = null;     }   }    private Node head;    public PriorityQueue(){     Node head = new Node(null, 8);   }    public Base dequeue(){     if (head == null){       throw new IllegalStateException("no");     }     else{       Node above = head;       Node temp = head.left;       while (temp.left != null)       {         above = above.left;         temp = temp.left;       }       above.left = temp.right;       return temp.object;     }   }    public void enqueue(Base object, int rank){     if(rank < 0){       throw new IllegalArgumentException("no");     }     else{       if(head.left == null){         head.left = new Node(object, rank);       }       else{         Node subtree;         subtree = head.left;         while(true){           if(subtree.rank < rank){             if(subtree.right == null){               subtree.right = new Node(object, rank);               return;             }             else{               subtree = subtree.right;             }           }           else if(subtree.rank == rank){             while(subtree.left != null){               subtree = subtree.left;             }             subtree.left = new Node(object, rank);             return;           }           else if(subtree.rank > rank){             if(subtree.left == null){               subtree.left = new Node(object, rank);               return;             }             else{               subtree = subtree.left;             }           }         }       }     }   }    public boolean isEmpty(){     return head == null;   }  }


i was writing some code for 3d graphics and was making a simple window i get an error  Exception in thread "main" java.lang.NullPointerException at Display.main(Display.java:40) i read different articles about this type of exception but i cant resolve my problem even though i know what is this exception  i have added the comment in front of line 40 import javax.swing.*; import java.awt.*;  public class Display extends Canvas implements Runnable { public static final long serialVersionUID = 1L; private Thread thread; private JFrame frame; private static String title = "myframe"; private static final int width = 800; private static final int height = 600; private static boolean running = false;  public void Display (){     this.frame = new JFrame();     Dimension size = new Dimension(width , height);     this.setPreferredSize(size); } public synchronized void start(){     running = true;     this.thread = new Thread(this, "Display");     this.thread.start(); } public synchronized void stop(){     running = false;     try {         this.thread.join();     }     catch(InterruptedException e){         e.printStackTrace();     } } @Override public void run() {  }  public static void main(String[] args) {     Display display = new Display();     display.frame.setTitle(title);//this line has an exception     display.frame.add(display);     display.frame.pack();     display.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     display.frame.setLocationRelativeTo(null);     display.frame.setResizable(false);     display.frame.setVisible(true);     display.start();   }  }


How can there be fewer sessions than visitors in Google Analytics?

I found here a great  regarding the difference between users and visitors in GA, but somehow my stats (image attached) show 7330 New Visitors had 7312 Sessions (visits). How can there be fewer sessions than visitors, when it should be at least 1 session per 1 new visitor?   Excerpt from the relevant explanation I linked to above:     When Google Analytics says "new visitors" or "returning visitors",   they mean "visits by new users", or "visits by returning users". For   example user A has visited your site before today and user B is new.   Each visits 2 times on the same day separated by at least 30 minutes:      User A Visit 1: Returning user, Returning visitor Visit 2: Returning   visitor User B Visit 1: New user, New visitor Visit 2: Returning   visitor You will have:      2 Users 1 New User 1 Returning User 4 Visitors 1 New Visitors 3   Returning visitors New users will always be the same as new visitors,   but each user may may multiple visits so the total number of visitors   may be greater than the total number of users. Similarly, returning   visitors may be greater than the number of returning users.


How to automate the process of checking an Ubuntu ISO SHA256sum

I know that I can get the SHA256 sums (and MD5 sums) from  as they are provided now within the folders, but is there any way of automating the checking process so that the download of the SHA sum is automatic and so is the checking part? I know that you can 'semi-automate' the process with , but I don't know how to fully automate it, nor how to even get semi-automation with SHA256.  Something like a script that you can input the release and flavour into (including unsupported releases) and it automatically downloads the SHA256 sum and checks would be good.


Dim FilesA As String() Dim FilesB() As String   What is the data type for FilesA? What is the difference between above two declarations? Can they be used interchangeably?


Trilogy: Alien-insects invade earth and are resisted by cyborgs

Looking for a trilogy published around the early 80s.  Insect-like aliens are invading earth.  Humans' brains are placed in robotic bodies.  The protagonist is a child in one of these bodies.  He has to learn how to control the robot & conserve his battery power.  Once train, he can fight back against the aliens using heat-guns + physical attacks.    The aliens are landing/spawning on sites all over the globe.  Part of the plot is discovering a method to disrupt their staging points.  It was probably young-adult oriented.  If anyone remembers this, thank you.


How to change TITLE dynamically after the header is included

I would like to change the title of the HTML page based on the content, but im including only the content below the header part, so i have to change the title from this included php. To explain:  <html>  <header><title>I would like to change</title></header> <!--CONTENT-->         <?         include "pages/some_page.php";         ?> </html>   How could i do that? Anyone can help in this?


Stack exchange for programming beginners?

I am just learning how to program, and I have been using Stack Exchange.  I think it is a fantastic idea for a website, and I think the moderations helps the community as a whole.  However, for someone new to programming like myself, it is hard to ask and answer questions in a constructive way.  I can only answer a small fraction of the questions, and by the time I've written out the code myself, someone has answered it before me, invariably because the problems are hard for me to solve as well.   This is where a Stack Exchange site geared towards beginners would be beneficial to us who are ignorant of asking dumb questions.    I think Meta stack exchange is geared towards conversation, so, what do you guys think?


Finding lim${_{n \rightarrow \infty}}\left( \frac{n^3}{2^n} \right)$

For a class of mine we were given a midterm review; however, I just cannot figure out how to finish this one:      Find the limit $$\lim_{n \rightarrow \infty}\left( \dfrac{n^3}{2^n} \right)$$   My attempt so far:  Let $s_n=\dfrac{n^3}{2^n}$. Note that $2^n=(1+1)^n$. Thus by the Binomial Theorem we have that,  $ (1+1)^n=\sum_{k=0}^{n} {n \choose k}(1)^{n-k}(1)^n $ Evaluating some of the first couple I get the following terms: $1+n+\dfrac{n(n-1)}{2}+\dfrac{n(n-1)(n-2)}{6}+\dfrac{n(n-1)(n-2)(n-3)}{24}+...$  I have noticed that for $n<4$, $n^3 \geq 2^n$. However, it seems that when $n\geq 4, n^3 < 2^n$. Thus, would it be possible to make an argument that for $n \geq 4, s_{4}>s_{5}>s_{6}>...$? Therefore, by evaluating for $n=4$ and using some algebra you get the following:  $s_{4}=\dfrac{24n^3}{24+24n+4n(n-1)(n-2)+n(n-1)(n-2)(n-3)} \leq \dfrac{24n^3}{n^4} = \dfrac{24}{n}$   and we know that lim$_{n \rightarrow \infty} \left( \dfrac{1}{n} \right)=0$ and lim$_{n \rightarrow \infty} \left( -\dfrac{1}{n} \right)=0$  Therefore, since $\dfrac{1}{n} \geq s_{4} > s_{5} >s_{6} > ...s_{n}\geq-\dfrac{1}{n}$, by the Squeeze Theorem $s_{n}$ converges to zero as well?


My Wordpress site was hacked today. When I investigated, I noticed that there were some malicious files under wp-content/uploads/ folder. I had set the permission of uploads folder to 777 for uploading images from the administration interface. And, I believe this was abused using the possible misconfiguration of the Apache server.  What should the permission of uploads folder be?  How should Apache be configured in order to enable image uploading through the administration interface and prevent accessing the content of the folder by unauthorized people?


What are the new PC to monitor connector I saw

I am getting a new video card. I want to connect my PC to 2 monitors. I used the HDMI port.  Then I saw 2 other ports. I recoqnize that one of them is DVI. The other one is very new. I wonder what it is.  It looks like HDMI connector. I will put photograph here.  Okay this is how it looks like    It's between HDMI and DVI


How can the probability that a number contains the digit 3 be 1?

Based on this  which claims almost all integers contain a $3$, I have a few questions on the reasoning behind recurring decimal numbers like $0.9999\ldots =1$  What they have shown is that $$\lim_{n \to + \infty} \frac{10^n-9^n}{10^n} = 1$$  this basically means that probability of eg. a $3$ occurring in a set of numbers like for $1-10, 1-100,$ increases as the upper bound gets large.  So you are more likely to see a $3$ when you take $1-100000$, than $1-10$ as the probability gets higher.  So what I would like to know is as '$n$' approaches $∞$ does probability of seeing a '$3$' equals $0.99999....$?  But since $0.9999... = 1$ wouldn't this not make sense, since there are infinitely many numbers that do not have a '$3$'?  All I need is for an explanation as to why this logic is wrong. Simpler answers are most appreciated.  Note   I am not looking for the reason as to why 0.9999...=1.


With that I can find the package name within an application  Package pack = Item.class.getPackage();   But all examples which I can find here or elsewhere to find the classes in a package use file to load a jar and look into that. I there a way to gat a classes list within active project without file ?  [EDIT] there are othere answers here but they all didn't work for me  [Edit] is for some reasons this has been blocked for answers. here is the solution      private static Set<Class<? extends Object>> getClassesInPackage(String packagename) {      List<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();     classLoadersList.add(ClasspathHelper.contextClassLoader());     classLoadersList.add(ClasspathHelper.staticClassLoader());     Reflections reflections = new Reflections(new ConfigurationBuilder()             .setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner())             .setUrls(ClasspathHelper.forClassLoader(classLoadersList.toArray(new ClassLoader[0])))             .filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(packagename))));      Set<Class<?>> classes = reflections.getSubTypesOf(Object.class);     return classes;   }


Filling blanks (missing values) in table with value above using ArcGIS Field Calculator?

I'm using ArcMap to tidy up some field collected point data. The point data is a sequential track from a handheld device. In the attribute table i have a field with differant activities that separate out each track. However, only  the first occurrence/point of the activity is filled in and the rest below are blank till the next activity. .eg.  running  -  walking  -  Is there a way to filldown the entries to blank fields below? There are hundreds of blank entries for each one with a value, not sure if this makes a difference.


How can I format phone numbers in SharePoint 2013?

I'm wanting to format a column in SharePoint 2013 to automatically enter the parentheses and dashes in a phone number.   So no matter how the telephone is entered, it shows (###) ###-####.  Thank you in advance.


I am coding c++ in visual studio 2015. I have files called superpixel.h and superpixel.cpp. I wanted to use templates for some of the functions but I read that I cant define templates in cpp files. I don't want to define the templates in the header file because it will just make my code messy with definitions in header and cpp files.  Is there a work around to this ? Do I have to switch all my cpp files to hpp ?


How to navigate between monitors using the mouse in a circular way?

I have three screens, 1, 2, 3.  When I use the mouse and am on the most left screen 1 and want to get to screen 3, I have to move all the way right through to screen 2 in order to get to screen 3.  I rather just move my mouse to the left border so that it comes out directly at the right border of screen 3. Currently, those outer borders stop mouse movement altogether.  So instead of my monitors to form a plane, I want them to connect like the surface of a cylinder.  Is there a way to achieve this using gnome-shell?


binomial distribution converges in distrubtion to standard normal distribution

$$x\sim \frac{x-np}{\sqrt{npq}} \overset{d}{\to} N(0,1)$$   I want to show that normalised binomial distribution converges in distribution to standard normal distribution.   Note that: Convergence in distribution mean  $F$ is cumulative distribution function  If $F_n(x) \to F(x)$ as $n \to \infty $  then $x_n \overset{d}{\to} x$   Also note that   $$M_{x_n}(t) \to M_x(t) \Rightarrow F_n(x) \to F(x) \Rightarrow x_n \overset{d}{\to} x$$   where $M$ is called as moment generating function.  so I need to show that   $$\lim_{n\to \infty} M_{x_n}(t)=M_x(t)$$  For binomial distribution, the moment generating function is $[pe^t +(1-p)]^n$  And for standard normal distribution, the moment generating function is $e^{t^2/2}$


I have a string:  line = "https://dbwebb.se/kunskap/uml#sequence, ftp://bth.com:32/files/im.jpeg, file://localhost:8585/zipit, http://v2-dbwebb.se/do%hack"   I want to get a result like this :   [('https', 'dbwebb.se', ''), ('ftp', 'bth.com', '32'), ('file', 'localhost', '8585'), ('http', 'v2-dbwebb.se', '')]   I tried like :  match = re.findall("([fh]t*ps?|file):[\\/]*(.*?)(:\d+|(?=[\\\/]))", line)   And than i got :  [["https", "dbwebb.se", ""], ["ftp", "bth.com", ":32"], ["file", "localhost", ":8585"], ["http", "v2-dbwebb.se", ""]]   There is one diffrence, you can se ":32" and ":8585". How can i do to get just "32" and "8585" and not the stupid ":"  Thanx!


How strict is Lufthansa with the pet crate sizes for excess baggage?

I'm flying with my cat as excess luggage. Luftansa says the crate needs to be 60cm L x 45cm W x 40cm H but all the crates I can find online are 41cm in height. I don't want them to deny entry to my pet on the flight at the airport, just because his crate is a cm taller than their specifications.


How to fix Feb 5, 2020 No task bar search results bug in Windows 10?

There is a new issue in Windows that is preventing mostly any use of the START button with you keyboard. Did anyone figure out a fix yet?   Editor's note from February 5, 2020: Some Windows 10 users appear to be experiencing an issue with task bar search, in which the box appears blank and does not display search results. We're currently investigating the issue and will update this post accordingly with any new fixes we may find.  Things that I tried and did not work for my machine:  Restart the Windows Search service from the task manager. Reindexing - Rebuilding indices from Control Panel -> Indexing Options -> Advance  One thing that works some of the time is to type what I want into the address bar inside File Explorer.


"As I had intended to" at the end of a sentence

My wife and I are debating the correct ending of a sentence that ends with, "... I did not return to school as I had intended" in a (college level) school paper that is being written.  One of us thinks the sentence should end, "..as I had intended to," the other is violently opposed to ending the sentence with the word "to."  What says the community?


On my device (running Stack Exchange Android app v1.0.95), the Stack Exchange sites sidebar lists "Unknown Site cogsci" with the default Stack Exchange icon.    (Sorry, no freehand circle to highlight the problem entry. It's in the middle, between Community Building and Biology.)  When I tap this icon, the app crashes with (what I believe is) a null pointer exception.  I believe that the site formerly known as Cognitive Science (that is, cogsci.stackexchange.com) was renamed or otherwise migrated sometime in the past few months.  I see a twofold problem:   It looks like the app missed this migration, leaving my sidebar pointing to a non-existent site. In addition, the app crashes when visiting non-existent sites (instead of showing "site not found" or similar).


How to get auto complete to work on aliases

I have created some aliases but tab completion doesn't work for them.  I mean I created an alias impulse typing impul+TAB gives expected result but after that it doesn't works.  I mean it doesn't shows the prediction or auto completion for that command.


Lately, my kids, 4 and 7, have become very picky eaters and don't eat much. If they do eat, they eat prepacked food or anything deep fried like chicken in small amount or few bites. As result, my wife and I are frustrated.   So, I want to know what do kids like to eat the most and how to make them eat the cooked food? My one son hates anything with veggies. He will literally throw up.


Declaring an object to return vs direct return statements C#

Hey I just came across an function and I was confused as which one is better?  private static bool IsEqual(TypeABC output, TypeABC input) {     if( conditions....)     {        return true;     }      return false; }   or   private static bool IsEqual(TypeABC output, TypeABC input) {     bool isEqual = false;      if( conditions....)     {        isEqual = true;     }      return isEqual; }   Both perform the same thing but  I want to know from from any perspective may it be coding standards, performance or garbage collection. Which one of the above is better and why?  Or if its too generic to answer, then advantages / disadvantages of each code over the other.  Also suggest a few tags I should put for this question.


Finding Radii of Convergence for $\sum a_n z^{2n}$ and $\sum a_n^2 z^n$

Setting: Let $\sum a_n z^n$ have radius of convergence $R$.  We have that  $$ R = \frac{1}{\underset{n \rightarrow \infty}{\limsup} \left|a_n \right|^{1/n}} $$  via Hadamard's formula for the radius of convergence.  Question: What are the radii of convergence for (i) $\sum a_n z^{2n}$ and (ii) $\sum a_n^2 z^n$?  Attempt for $\sum a_n^2 z^n$:   For ease of notation, let $R_1$ and $R_2$ denote the radii of convergence for power series $\sum a_n z^{2n}$ and $\sum a_n^2 z^n$ respectively. From Hadamard's formula, we then have  $$ R_2 = \frac{1}{\underset{n \rightarrow \infty}{\limsup} \left|a_n^2 \right|^{1/n}} = \left( \frac{1}{\underset{n \rightarrow \infty}{\limsup} \left|a_n \right|^{1/n}} \right)^2 = R^2 $$   But what about $R_1$?


How to keep inventory on polycraft server?

Any way to keep the inventory and the items without losing them once we die and respawn? There is no option for LAN and the cheats doesn't work as I am in a polycraft mod server.


Should the results of a calculation happen automatically, or require a button push?

This is a problem I've ran into several times, and I imagine that others have ran across it too.    Basically, I have a complicated equation, and I want the user to type in the values needed to calculate the results.  (For what it's worth, there are good default values for the variables in the equation.)  I've constructed a GUI that shows the user the names of the variables/fields that need to be provided, along with a control (like a numeric up/down, slider, etc.) to enter the values of the field.  Below that, I have an area that shows the output of the equation.  So my question is this.  Should my results area automatically change the calculated results whenever the user makes any changes to any of the input fields, or should they push a "Calculate" button to generate the results?  One other thing that probably applies is that the user is not trying to "get the right answer" out of the results.  They shouldn't be using the output to then go back and modify the input to get a better answer.  Are there any benefits to requiring the button press?  Is the extra click to see the results worth those benefits?


Monitor/view response codes of HTTPS traffic (e.g. port 443)?

Is it possible to monitor/view the response codes of traffic to a server with HTTPS? I can use ngrep or tcpdump to view HTTP (port 80) but this won't work for HTTPS (port 443) requests - they simply don't show up.  For example, I'd like to test if web pages that googlebot is requesting are responding with 500 error codes, so that I can track down problems with googlebot not being able to access my pages.  I'm thinking maybe something like WireShark could do it, but I have no idea where to begin with a tool like that, and I'm not sure it can see the response codes since HTTPS is encrypted?


I'm encountering something weird to me and I can't get what is going on. I'm creating a HashMap, then adding some key-value pairs over a loop.Inside the loop i'm changing a pre-initialized array on every iteration. So what I expect is always different arrays as values in the map.Here's the code:  int[] valueArray = new int[3]; int key = 0; Map<Integer, int[]> map = new HashMap<>(); while (key < 5) {     for (int i = 0; i < 3; i++) {         valueArray[i] = key;     }     System.out.println(Arrays.toString(valueArray));     map.put(key, valueArray);     key++; } for (int i = 0; i < map.size(); i++) {     System.out.println("Key: " + i + " Value: " + Arrays.toString(map.get(i))); }   And here's the output:  [0, 0, 0] [1, 1, 1] [2, 2, 2] [3, 3, 3] [4, 4, 4] Key: 0 Value: [4, 4, 4] Key: 1 Value: [4, 4, 4] Key: 2 Value: [4, 4, 4] Key: 3 Value: [4, 4, 4] Key: 4 Value: [4, 4, 4]


I installed Xubuntu and can't find how to make a bootable usb on it to unstall Ubuntu

I installed Xubuntu and am not a huge fan of it.   I want Ubuntu back and can't figure out how to make a bootable usb on Xubuntu.  Please tell me my options


I have created a view, with few exposed filter in it. It is working fine, but I when I filter view using some exposed filter, it appends query string to URL ie  mysite.com/search?field1=value_1&field_2=value2   Instead I wanted to make it SEO friendly like,  mysite.com/search/value_1/value2   Please guide how should I proceed. I have searched for it, but didn't get any solution or I have missed something.  Thanks for your time.


I'm new to android, just trying to get my head around it, but I can't seem to get this to work: I want when a user taps a button a method will be called to see if the 2 password boxed contain the same text, if they do n AlertDialog box will pop up saying that the password has been set. However the alertdialog box never pops up at all for somereason, thanks for your help.  package com.example.jhonti.test2;  import android.app.Activity; import android.app.AlertDialog;  import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView;   public class MyActivity extends Activity {  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_my);       // It works when I put it here     //AlertDialog.Builder altDialog = new AlertDialog.Builder(this);     //altDialog.setMessage("Password set"); // here add your message     //altDialog.show();       final EditText a = (EditText) findViewById(R.id.editText);     final EditText c = (EditText) findViewById(R.id.editText2);      Button b = (Button) findViewById(R.id.button1);     b.setOnClickListener(new View.OnClickListener()     {         @Override         public void onClick(View v)         {              if(a.getText().toString() == c.getText().toString())             {                 setPass(a.getText().toString(), c.getText().toString());             }         }     }); }   @Override public boolean onCreateOptionsMenu(Menu menu) {     // Inflate the menu; this adds items to the action bar if it is present.     getMenuInflater().inflate(R.menu.my, menu);     return true; }  @Override public boolean onOptionsItemSelected(MenuItem item) {     // Handle action bar item clicks here. The action bar will     // automatically handle clicks on the Home/Up button, so long     // as you specify a parent activity in AndroidManifest.xml.     int id = item.getItemId();     if (id == R.id.action_settings) {         return true;     }     return super.onOptionsItemSelected(item); }  private void setPass(String i, String o) {     if((i == o) && (i != ""))     {         AlertDialog.Builder altDialog = new AlertDialog.Builder(this);         altDialog.setMessage("Password set"); // here add your message         altDialog.show();      } }   }


Confused about installing Ubuntu alongside Windows 10

I read the install tutorial and am confused as to how to install Ubuntu alongside Windows 10. In the guide it said it can be done but the window in the guide (Use the checkboxes to choose whether you'd like to Install Ubuntu alongside another operating system) but it doesn't show which choice to choose for the install alongside Windows.


Matplotlib chart does not change size after resize in jupyter

I am having an issue with resizing a bar chart using matplotlib in jupyter notebook, and even after going through other answered questions ( and ) and using the methods described within the answers to those questions, my bar chart does not change size.  Output before resize:   Output after resize:   As you can see, even though the rcParams have clearly changed, the plot still remains the same size. Any pointers as to how I can resolve this issue would be greatly appreciated!


PHP french word displays special characters

I have french words stored in database,however while displaying in browser the characters are not properly displayed,displays like � and so on..How convert such word exactly to french words same as entered in database using PHP ? I have tried html_entity_decode(),works for some of the cases.


How to call jQuery click function from dynamically appended elements?

I am trying to call a jquery button click function from an element created by the append function, but it is not working below is my source code   var tr = $('#t_body').append(                              "
",                              "<input type='checkbox' id='check' value='" + (Order_Result.ORDER_ID) + "'>	",                              "<button class='btn btn-outline-secondary' value='" + (Order_Result.ORDER_ID) + "' id='btn_ViewItem'>pageview</button>	",                              "<button class='btn btn-outline-danger' value='" + (Order_Result.ORDER_ID) + "' id='btn_Delete' ></button>	",   for the above id btn_Delete i have created the function as follow  $("#btn_Delete").click(function(event) {     alert("same"); });   but when I click nothing is happening I have checked the console there is no error and even the appended table date with has been created properly.      what is the problem and why it is not working? please provide me a Solution  Thanks in advance


Are three year degrees from India equivalent to Four years degree in the US?

Is a three years bachelors degree in Commerce and three years bachelors degree in Law from India termed to be equivalent to have a four years graduate degree from the US?


let $(X,\leq)$ and $(Y,\preceq)$ be well-order sets and they are isomorphic.  Prove that there is one isomorphism between $X$ and $Y$.   Notice that $X$ and $Y$ are sets, so by isomorphism I mean isomorphism between sets.


I tried to install Ubuntu 13.04, downloaded from this site, I use a Universal USB Installer to create my bootable USB, when I boot and follow the steps until the one that says "Your Lap has currently installed Windows 7, what do you want to do?" I choose the option "INstall Ubuntu inside {OS}"(it says literaly "inside {OS}") and click CONTINUE, my laptop restarts and the process begin since step 1. I try and try many times, but it always happens. What can I do?  If I choose the option "Something else", it shows that my Hard Disk is already partitioned, and appear thing like: dev/sda...ntsf... A few days ago I installed Ubuntu in Virtual Box, but it ran very slowly, so I decided install it by this. My Lap is Samsung, Windows 7 Intel core i3  Hope you can help me.


Why was there frost on the inside of my windshield?

I usually start my car remotely and let it warm up before I leave for work. This morning I forgot to start my car beforehand, so I had to scrape the ice off the windows. I was surprised to find frost on the inside of the windshield.  This has never happened to me before. As I have no actual education in physics, can someone explain to me?


Ubuntu 14.04 stops responding and capslock light blinks

So, I have a HP pavilion 15 notebook. I have dual boot it with factory installed windows 8.1 and ubuntu 14.04. It is working well. But sometimes, it stops responding. Screen freezes as it is and caps lock starts blinking. Then it don't respond again.I have to restart the laptop manually by power button to access again. What is the reason for this? What is its solution?  This never happened in windows? And Its HDD haven't any errors...


How to backup programs before upgrading Debian?

I currently use Debian Jessie and I would like to upgrade to Stretch, but I fear I would lose all the programs I installed on Jessie.  Is there a way to backup my programs and files before upgrading to Stretch?


How to calculate the effect size for the interaction term (time*Group) in a linear regression?

I need to calculate the effect size for the interaction term (time*odours) of this below linear regression. I can't use Cohen's $f^2$, as is commonly presented in a form appropriate for global effect size. LM1 <- lm(score ~ time*odours)           score: average intensity score of all participants at each time point. time: trial_numbers (from 1 to 20) odours: food / non-food odours Does anybody have any suggestion?


In Oracle, DBMS_LOB.INSTR vs LIKE '%keyword%'

In a few posts, most say INSTR is faster. (Of course, it depends on the situation.)  In the following cases, I wonder whether I should continue to use INSTR or how to optimize it.  CASE 1.  SELECT * FROM TB1, TB2 WHERE TB1.PKID = TB2.P_PKID  The result is displayed immediately when you inquire.  CASE 2.  SELECT * FROM TB1, TB2 WHERE TB1.PKID = TB2.P_PKID AND DBMS_LOB.INSTR(TB2.CONTENTS, 'KEYWORD')>0  But, it takes 10 seconds to search the contents(CLOB Type) using INSTR.  CASE 3.  SELECT * FROM TB1, TB2 WHERE TB1.PKID = TB2.P_PKID AND TB2.CONTENTS LIKE '%KEYWORD%'  Using LIKE takes 22 seconds.  The total number of data is about 100,000.   I just wonder if I should continue to use INSTR, or is there another way?


Vote count rapidly changing for question and its answers

I was just on this question (), using OSX 10.7/ Chrome 19, and the vote numbers kept 'flickering' to different numbers 4-6 times a second, usually within +/-2 votes from what it started at. There was no change in the expanded vote count, and this happened with the questions vote count and some of the answers vote count as well.  Just for clarity's sake, the question's vote count changed from 2->3->4->3->4->2->3 every second, for 1-3 seconds. Even after refreshing the page, this still occurs. It starts intermittenly in the first minute or so of page load


What does it REALLY mean for a metric space to be compact?

I've been trying to wrap my head around the concept of compactness and get an intuitive understand of what it is. The definition used in my text book is the finite subcover definition.     A subset $K$ of a metric space $X$ is said to be compact if every open cover of $K$ contains a finite subcover. More explicitly, the requirement is that if {$G_{\alpha}$} is an open cover of $K$, then there are finitely many indices $\alpha_1,...,\alpha_n$ such that $$K\subset G_{\alpha_{1}}\cup\, ...\cup \, G_{\alpha_{n}}.$$   This definition is not very accessible to me so I've been looking around trying to find something to help me understand it.   So far, I haven't really wrapped my head around the idea yet, but I have learned the following:   Compactness is a kind of limited-ness. Compactness is one of the two properties of finiteness, the other being discreteness. (I saw this in the explanation about foos, the creatures that are red and short, and the word foo has come to mean something both red and short.)  In $R^k$, compactness is equivalent to being closed and bound.    So I guess my question is, what is it about compactness that led mathematicians to call it "compact"? What exactly is compact about it? What does this have to do with the definition (that is, where does the definition come from)? Furthermore, what does it mean to be discrete? I think it would help if you could give me an example of metric spaces that are:   Compact and discrete Compact but not discrete Discrete but not compact Neither discrete or compact   I've already read this question:   The answers on this post explain very well why it is difficult to understand compactness, but I was hoping for something more concrete to help me understand.


If I create an enum like this  public enum ImportType {    Direct,    Indirect,    InBond }   and I have a method that takes an ImportType as parameter as follows  public bool ProcessValidImport(ImportType type) {     // Process ImportType variable here }   I can go and call the method as follows  bool blnProcessed = ProcessValidImport((ImportType)7);   But the ImportType variable value of 7 passed in to the method is not valid at all because any integer will work if cast. The enum defaults to an int type, so what is the best way to validate that an enum in this case is in fact a valid ImportType.


What do the magic numbers 0x5c and 0x36 in the opad/ipad calc in HMAC do?

Wikipedia lists the following pseudocode for HMAC:  function hmac (key, message)     if (length(key) > blocksize) then         key = hash(key) // keys longer than blocksize are shortened     end if     if (length(key) < blocksize) then         // keys shorter than blocksize are zero-padded ('∥' is concatenation)          key = key ∥ [0x00 * (blocksize - length(key))]      end if      // Where blocksize is that of the underlying hash function        o_key_pad = [0x5c * blocksize] ⊕ key      // Where ⊕ is exclusive or (XOR)     i_key_pad = [0x36 * blocksize] ⊕ key       // Where '∥' is concatenation        return hash(o_key_pad ∥ hash(i_key_pad ∥ message))  end function   Why are they there?  How were they chosen?  It seems to me that  $hash(key + hash(message))$ (where + is concatenation) would suffice.    Obviously I'm missing something.  What is it?


Are the amount of spell slots per caster level derived with math or decided arbitrarily?

I’m attempting to make a spreadsheet in google sheets that would function like an automatic character sheet. I know there a pages and charts in the phb concerting spell slot, but I was wondering how the math behind the multiclassing chart specifically worked in 5e. Other than the certain classes having their levels full, half, or 1/3 counted for caster level. I need the math formula for how each leveled slot is decided based on total caster level.


Question: whats the probability that at least 3 out of a group of n people have the same birthday.  I am confused as to where to start. I know that it would be complementary probability, but even then I dont know exactly.  Would it be;  P(at least 3 have the same bday) = 1 - (|all 3 have different| + (2 have the same|)? Any directions and suggestions?


When applying for a job in academia, shall people specify in the CV if they have got visible tattoos?


Can anyone help me understand how to solve these two series?  More than the solution I'm interested in understanding which process I should follow.   Series 1:   $$  \sum_{i = 3}^{\infty} i * a^{i-1}, 0 < a < 1. $$   Series 2:   $$  \sum_{i = 3}^{\infty} i\sum_{k = 2}^{i-1} a^{i-k} * b^{k-2} , 0 < a < 1, 0 < b < 1. $$  These two series come as part of a long mathematical proof which I omitted for brevity, if you think it is relevant I will post it.


Extra space added after equation when it is coloured

For some reason space is added after my equation when I colour it. This does not happen if the colour is added to text.  Is there a simple way to prevent this from happening, like a global setting (I am not interested in manually adjusting the space with \vspace{-1cm})? Perhaps there is a better way to colour my equation (another package, another command, etc), or in other words, am I doing something wrong?    \documentclass[12pt]{standalone}  \usepackage{amsmath} \usepackage{color}  \begin{document}  \begin{minipage}{4cm} \begin{equation*}     a = b + c \end{equation*} \begin{align*}     a - b &= c\\     a-c & b \end{align*} \end{minipage}  \vline  \begin{minipage}{4cm} \begin{equation*} \color{blue}    a = b + c \end{equation*} \begin{align*}     a - b &= c\\     a-c & b \end{align*} \end{minipage}  \end{document}   For reference,  doesn't seem to solve my problem, ie, adding \fboxsep0pt to my preamble did not change the output.   EDIT The comment With {\color{blue}a = b + c} there is no additional space ... solves part of the problem, but it doesn't work when using for example align (it gives an error):  \begin{align*} {\color{blue}    a - b &= c}\\     a-c &= b \end{align*}   If I try to fix this using the command twice leaving the & outside, the spacing around = is wrong:  \begin{align*} {\color{blue}    a - b} &{\color{blue}= c}\\     a-c &= b \end{align*}


Let $R$ be commutative ring with $1$. Let $f \in R$. Suppose $f$ is not nilpotent in $R$. We need to show $R_f \cong R[x]/(fx-1)$, with $D = \{f^n: n \ge 0\}$ and where $R_f = D^{-1}R$. I am given the following hint: [Show that the map $\phi : R[x] \to R_f$ gives a surjective ring homomorphism and the universal property in   Theorem 36 gives an inverse.]           Theorem 36: Let $R$ be a commutative ring with 1 and let $D$ be a multiplicatively closed subset of R containing 1. Then there is a commutative ring $D^{-1}R$ and a ring     homomorphism $\pi: R \to D^{-1}R$ satisfying the following universal property: for any     homomorphism $\psi : R \to S$ of commutative rings that sends 1 to 1 such that $\psi(d)$ is a     unit in $S$ for every $d \in D$, there is a unique homomorphism $\Psi: D^{-1}R \to S$ such that $\Psi \circ\pi = \psi$.      I'm not sure where to go after I define $\phi$. How does the theorem give me an inverse, and how does that show that the two rings are isomorphic? Help would highly, highly be appreciated.


I have found that my Unicorn Coin Mining Strategy is not giving me payouts in large enough sums.   My current strategy is to mine the rocks in the order they appear. Then after I have mined 5 rocks to reset the mining widget as it seams that rocks payout fewer coins over time (law of diminishing returns)  Is there a better strategy for mining for unicorn coins? As I would really like to divide everyone else's rep by 10 and set my own rep above the level of the all mighty Jon Skeet.  Praise be to the Unicorn.


Grub package failed to install in ubuntu installation

I tried installing ubuntu to my external toshiba hard drive. What i did was      made a swap of 16Gb   ext4 / of 165Gb    rest left as free space.   Then some installation happend and got below error. The 'grub-efi-amd64-signed' package failed to install into /target/. Without the grub boot loader  Please help me on this installation.


I am going to subtract two floats but I get 999998.7799999999 why ? It real result is 999998.78  Money1="2,000,001.44 $"; Money2="1,000,002.66 $" Money1= Number(Money1.replace(/[^0-9\.]+/g,"")); Money2= Number(Money2.replace(/[^0-9\.]+/g,"")); console.log(parseFloat(Money1)-parseFloat(Money2));


How to explain to a high school student why a linear differential equation is linear?

My mother is teaching a high school course on multivariable calculus, and they were studying linear differential equations of the form $$y' + P(x) y = Q(x),$$ and the question of why this equation is called "linear" came up.  In terms that these students are familiar with, since they haven't been exposed to linear algebra yet, my thought was to say that the equation for a line, $y = mx+b$, is "linear" in $x$ (ignoring the technicality that it's actually an affine equation, not a linear one), because it's in the form "coefficient times $x$", and then we allow another term which is just a lonely coefficient. And then we extend this notion to saying that the above differential equation is "linear" in $y$ and $y'$, but this time the coefficients are allowed to be functions of $x$.  That's probably a good enough hand-wavy explanation to help students remember the definition, at the very least. I couldn't really think of a good reason why it "should", a priori, be kosher to allow coefficients to be functions of $x$ here. At that point it seems to me like you just have to get into the linear algebraic definition of linearity, which, being completely foreign to the students... it just seems to be a bit too deep of a rabbit hole for this purpose.  So my question is: does anyone have a better way of approaching this? And if you think my hand-wavy explanation above is largely acceptable, is there a way you can explain why multiplying by non-constant functions of $x$ "should" still be considered linear in $y$?


New Google Search Console does not load any resources such as CSS and JS while it worked fine in the old Search Console tool

When using URL inspection and Live Test in the new Google Search Console the Googlebot does not load most resources (Javascript, CSS and Images). This results in the Search Console telling me my pages are not mobile friendly (because the CSS is not loaded).  When looking at the Live Screenshot the pages look like plain, unstyled HTML.  I tested multiple websites, some created by strangers, others created by me, some hosted on my server, others hosted on servers of major hosting services. On all of these websites the problem occurs.  For every website multiple Live Tests were performed. Sometimes all resources were loaded perfectly, but most of the time (>90%) nearly all of the resources (including resources hosted by Google, e.g. Analytics or Google Fonts) did not get loaded. The Search Console simply marks it as "Other Error"    When using the old Search Console, the websites get marked as "mobile friendly" and are rendered normally. PageSpeed Insights and the new  also render the pages perfectly fine.  The resources are not blocked by the Robots.txt. I also tried explicitly allowing the Googlebot to access CSS, JS and images. It did not help.  I've read speculations, that the new Search Console simulates a very slow mobile connection, but I've created very lightweight dummy-websites whose resources are not getting loaded as well.  How can I get the new Search Engine Console to load my resources?


Getting lat/lng of an object X inches from the GPS?

I'm working on a project where I have a GPS and two receivers to create a triangle with a transmitter. The problem I'm trying to figure out right now is how can I get the position of the two receivers?  I know it can be done, but I'm blanking on the math and Google hasn't been too helpful, maybe I'm not searching it correctly.  Here's my circumstance: GPS is reading lat: 42.331429 and lng: -83.045753. My device is sitting perfectly level and pointing due north. My two receivers are 30 inches to the left and 30 inches to the right. Can anyone help me figure out the equation to get their positions? I know these are going to be very small differences, but that's as far as I've gotten so far.  Also, if things were more complex, how would that be solved? Such as pointing North/West, and 5 degrees rotated on each axis, x, y, and z? I realize that's kind of a crazy scenario, but I like to potentially prepare for every scenario. These are based on being in fixed positions from the GPS and the plane that the GPS is on.


I am implementing a scenario where user inputs an numeric answer in the edit text, which is being compared with addition of two numbers while inputting text using addTextChangeListener. I am trying to calculate true and false counters. I get true counters perfectly in below code.   etTestAddAnswer.addTextChangedListener(new TextWatcher() {                 @Override                 public void beforeTextChanged(CharSequence s, int start, int count, int after) {                  }                  @Override                 public void onTextChanged(CharSequence s, int start, int before, int count) {                     if (etTestAddAnswer.getText().toString().length() == (String.valueOf((firstDigit + secondDigit)).length())) {                         if (etTestAddAnswer.getText().toString().equalsIgnoreCase("")) {                             etTestAddAnswer.setError("Left Blank");                             YoYo.with(Techniques.Wobble)                                     .duration(750)                                     .playOn(tlTestAddAnswer);                         } else {                             if (Integer.parseInt(etTestAddAnswer.getText().toString()) == (firstDigit + secondDigit)) {                                 correctCounter += 1;                                 etTestAddAnswer.setText("");                                 Toast.makeText(AdditionTestActivity.this, "Correct", Toast.LENGTH_SHORT).show();                                 if (finalCounter < 10) {                                     initGame();                                 } else {                                     testAddTime.cancel();                                      //Toast.makeText(AdditionTestActivity.this, "True Answer :" + correctCounter + "\n" + "Wrong Attempts" + falseCounter + "\n" + "Time " + toolbarTimeTestAddition.getText().toString(), Toast.LENGTH_SHORT).show();                                 }                             } else {                                 YoYo.with(Techniques.RubberBand)                                         .duration(750)                                         .playOn(tlTestAddAnswer);                                 etTestAddAnswer.requestFocus();                                 falseCounter += 1;                                 Log.d(TAG, "False Answers: " + falseCounter);                                 etTestAddAnswer.setError("False Answer, \n Try Again..!!");                             }                          }                      } else if (etTestAddAnswer.getText().toString().length() > (String.valueOf((firstDigit + secondDigit)).length())) {                         YoYo.with(Techniques.RubberBand)                                 .duration(750)                                 .playOn(tlTestAddAnswer);                         etTestAddAnswer.requestFocus();                         Log.d(TAG, "onTextChanged: " + falseCounter);                         //falseCounter++;                         etTestAddAnswer.setError("False Answer, \n Try Again..!!");                     }                 }                  @Override                 public void afterTextChanged(Editable s) {                  }             });   But the false counter is incorrect. Like if i am on fifth question and give my first wrong input, the false counters log is like this:  1 2 3 4 5   It should only increment one. Any ideas??


./configure is showing no such file or directory?

I want to install privman downloaded from .  When I run make command after ./autogen.sh and ./configure, it shows me:   make  all-recursive make[1]: Entering directory `/home/syam/Downloads/privman-master' Making all in config make[2]: Entering directory `/home/syam/Downloads/privman-master/config' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/syam/Downloads/privman-master/config' Making all in src make[2]: Entering directory `/home/syam/Downloads/privman-master/src' make[2]: *** No rule to make target `config_parse.h', needed by `all'.  Stop. make[2]: Leaving directory `/home/syam/Downloads/privman-master/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/syam/Downloads/privman-master' make: *** [all] Error 2


How to calculate relatedness in haplodiploid organisms (mainly full sisters and full brothers)?

I have tried to calculate the relatedness for haplodiploid organisms, but cannot understand the calculations behind full sister and full brother.  (taken from  I have managed to solve the other cases. Since female will have ZZ:  female will share 1/2 of her genes with daughter female will share 1/2 of her genes with son female will share 1/2 of her genes with mother female will share 1/2 of her genes with father  Since male will have only Z:  male will share 1 (100%) of his genes with his daughter male won't share anything with his son (unfertilized eggs leads to male in haplodiploidy system) male will share 1(100%) of his genes with his mother male won't share anything with his father (unfertilized eggs leads to male in haplodiploidy system)  Even though I figured out how others work, I wasn't able to calculate r for fullsister fullbrother? How can it be 3/4,1/4,1/2,1/2?


How might we show that traversing a diagonal in square steps is, in the limit, equivalent to traversing the diagonal directly?

Say we're walking on the unit square and wish to make our way from (0, 0) to (1, 1). Obviously, we can go one unit up and one unit right, or, for the same distance, one unit right and one unit up. Similarly, we can go half a unit up and then half a unit right and then repeat these steps, or the mirrored alternative. And so on...  Each of the above options, as long as we allow ourselves to travel only finite distances and only in one axis direction at a time, will result in the same final distance, namely 2. Yet in the limit, these steps will have to collapse to $\sqrt{2}$, as we will by this point be traveling just on the diagonal.  First, are my above intuitions correct? And second, if so, how can we demonstrate the above to be the case?


xelatex error: LaTeX Font Warning: Font shape

Thank you all in advance. I know not much about fonts. but once I compile my document I get:      LaTeX Font Warning: Font shape `EU1/lmr/bx/sc' undefined (Font)              using `EU1/lmr/bx/n' instead on input line 174.   I'm not sure how solve this issue, even though there are other similar posts here but the answers are all too advanced.


What's the difference between the words "journey", "travel" and "trip"?

As they always were interchangeable in an article, I just want to know the difference.


I noticed that the sum of the first $n$ cubes is equal to the square of sum of the first $n$ natural numbers: $$ \sum\limits_{i=1}^n i^3=\frac{n^2(n+1)^2}{4}=\left(\frac{n(n+1)}{2}\right)^2=\left(\sum\limits_{i=1}^n i\right)^2 $$  Is there a clever way to explain (not prove) this identity?


Compositing: how to render object on top of background?

I am doing an animation with a camera to add 3D elements to it (don't really know what it is called) when I press shift z to render my scene, things look great.  but when I try to actually render an image from my animation it only shows the monkey with the shadow, but no background.  I know that it has something to do with compositing nodes and stuff, but I am not sure how to works.. could someone please help? A also I used the new shadow catcher thing to make the shadow appear. Thank you.


What is the differences of Nude and Naked

I know this is an awkward questions, but i really  confuse  this two, which one is use to refer completely  shirtless and which one is use to refer having a little clothes  on ( bra and underpant).


Has Logan aged considerably in the new movie Logan?

In the new trailer we see Logan at the very end holding hands with a girl (sorry I don't know who she is), also throughout the clip we see his beard and there are quite a lot grey hairs in it:                                  Has Logan aged considerably?


Understanding the proof of infinitely many primes $\equiv 3\pmod{\!4}$

Theorem: There are infinitely many primes congruent to $3 \mod 4$. Proof: Assume that $p_1 = 3, . . . , p_n$ are primes of the form $p_j ≡ 3 \mod 4$. We will construct a new one by looking at $N = 4p_1 · · · p_n − 1$ (putting $N = 4p_1 · · · p_n+3$ would also work).  There is more to this proof but the rest of it I understand, what I don't get is where it says "$N = 4p_1 · · · p_n − 1$ (putting $N = 4p_1 · · · p_n+3$ would also work)". I do not understand why we are writing $4p_1 · · · p_n − 1$. Is there a more clear way to prove this theorem?


How to map Linux hard drive identifiers like "sd 3:0:0:0:" to ones like "ata8:"?

In my kernel log, I can see entries like:     [    0.765510] sd 3:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)   and when something fails, it's usually something like:     [ 6007.433977] ata8.00: revalidation failed (errno=-5)   How can I translate the sd:X:X:X:X to ataX:00 so I could figure out which drive is failing?


Prove: $\lim\limits_{n \to \infty} \int_{0}^{\sqrt n}(1-\frac{x^2}{n})^ndx=\int_{0}^{\infty} e^{-x^2}dx$

I'd like your help with the following claim to prove:  $$\lim_{n \to \infty} \int_{0}^{\sqrt n}\left(1-\frac{x^2}{n}\right)^ndx=\int_{0}^{\infty} e^{-x^2}dx.$$  I think I should use the claim:     Let $a,b$ two real numbers and $\{f_n\}$ a sequence of continuous functions on $\left[a,b\right]$  which converges uniformly to $f$ on $[a,b]$. Then    $$\lim_{n\to\infty}\int_a^bf_n(t)dt=\int_a^bf(t)dt.$$   But for this, I must prove that $(1-\frac{x^2}{n})^n$ uniformly converges to $e^{-x^2}$.  How do I do that? One of the hardest and trickiest things to do is to prove this uniformly converges.. every function has its own way. I believe that the more examples I'll see the easiest it will be. Thanks again!


How to know which Linux Distribution I'm using?  uname -a gives   Linux xxxxxx.net 2.6.9-42.0.3.EL.wh1smp #1 SMP Fri Aug 14 15:48:17 MDT 2009 i686 i686 i386 GNU/Linux  How can I know this is Ubuntu/Debian/Fedora or Redhat?  I uses /etc/init.d/serviced restart for restarting serevices, seems it is not Redhat family  [itf][~]$ cat /etc/issue cat: /etc/issue: No such file or directory [itf][~]$ cat /etc/issue.net cat: /etc/issue.net: No such file or directory [itf][~]$ lsb_release -a -sh: lsb_release: command not found [itf][~]$ cat /etc/*-release cat: /etc/*-release: No such file or directory [itf][~]$ cat /etc/*-version cat: /etc/*-version: No such file or directory [itf][~]$ cat /etc/*release cat: /etc/*release: No such file or directory [itf][~]$ cat /etc/*_release cat: /etc/*_release: No such file or directory [itf][~]$ cat /etc/*version cat: /etc/*version: No such file or directory [itf][~]$


What is the highest percentage of surface area that can be seen at any given moment on a symmetrical object?  On a sphere its 50% right? (or close to it)  On a four-sided pyramid viewed from one of its points it would be 75%?  Can you get any higher?


How to graph a function involving limits?

The given function is :  $f(x) = \lim_{n\to\infty} \sqrt[n]{1+x^n}$  $ ;(x \ge 0)$   The function variable is $x$ and not $n$. This seems strange to me. All I can think of is that $f(x)$ is a family of curves which depends on the parameter $n$ and when $n\to \infty$ will the family of curves converge to a single curve? If so how to find it?


How does the diameter of an open ended tube affect the frequency?

I measured (using a software) the fundamental frequency produced in an open ended tube of different lengths. Does the diameter of an open ended (both ends) tube affect the fundamental frequency?


Undergraduate international computer science student [Can i go to grad school?]

I am Computer science major at University of Wisconsin Madison. I just want to ask you if i can get into graduate school with such a low GPA. My current GPA is 2.9 and i have 20 more credit which makes me possible to go over 3.0 But I have finished my freshman year with 2.0 GPA and took 2 years of ESL program.(English as a second language). I have done 2~3 internships in korea and plan to do 2 years of more working experience after i graduate from college this summer.  I am worried about my GPA because it is quite low and my CS GPA is only about 3.4 DO you guys think i have chance of getting into any top 30 or 40 graduate school out there in computer science field?  Thank you


How do I search for questions and answers I have upvoted?

I know I can see a list of upvotes in the user profile section, but the list is paginated so I often have to click through the pages to find a specific answer.    It would be very helpful if it was possible to search/filter the upvotes list.  Is there a way to do this I have not yet found?


Can $\frac{\sqrt{3}}{\sin20^{\circ}}-\frac{1}{\cos20^{\circ}}$ have two values?

I would like to confirm a solution. The question goes as:  Show that $$\frac{\sqrt{3}}{\sin20^{\circ}}-\frac{1}{\cos20^{\circ}}=4$$  Firstly I combined the two terms to form something like: $$\dfrac{\sqrt{3}\cos20^{\circ} - \sin20^{\circ}}{\sin20^{\circ}\cos20^{\circ}}.$$  Clearly, the numerator is of the form $a\cos\theta+b\sin\theta$, and can thus be expressed as $R\sin(\theta+\alpha)$, where $R=\sqrt{a^2+b^2}$, and $\alpha=\arctan(\dfrac{a}{b})$. Following this method, I obtain something like this: $$\dfrac{2\sin(20^{\circ}-60^{\circ})}{\sin20^{\circ}\cos20^{\circ}},$$ which results in the expression to be equal to $-4$. But, we took $R$ to be the principal square root, which was $2$. If we take it to be the negative root, $-2$, it follows that the expression is equal to $4$. So, can this expression have two values?   Edit: I would also like to mention how I computed the numerator:  Numerator:   $\sqrt{3}\cos20^{\circ} - \sin20^{\circ}$.  Now, this can be represented as $R\sin(\theta+\alpha)$. Computation of $R$: $R=\sqrt{a^2+b^2}\implies R=\sqrt{(3+1)}=2$ Computation of $\alpha$: $\tan\alpha=\dfrac{a}{b}\implies \tan\alpha=\dfrac{\sqrt3}{-1}\implies \alpha=-60^{\circ}$, because $\tan(-x)=-\tan x$, and in this case $\tan\alpha=-\sqrt3$, and $-\tan(60^{\circ})=-\sqrt3$, so $\alpha=-60^{\circ}$.  Hence, we conclude that numerator:$$2\sin(20+(-60))=2\sin(-40)=-2\sin(40^{\circ})$$


How do we determine the number of days for a given month in python

I need to calculate the number of days for a given month in python. If a user inputs Feb 2011 the program should be able to tell me that Feb 2011 has 28 days. Could any one tell me which library I should use to determine the length of a given month.


Should we do something about enormous numbers of edits in short times?

First of all, dear , please don't take it as a personal...  Today, I just looked up the  and I saw this user made 543 edits in 24 hours. When I look at , his edits only include (I look at all revisions on last 27 pages) this:   add  tag which questions have already  tag.   Looks like all the edits he made are like this. Since his reputation is over 3k, the system does allow this kind of minor editing without any approval. (As we all know, under 2k reputation users need 3 approval for editing).  Does our system need to prevent this number of minor edits?   Or it is okay for everybody since the user has over 3k reputation?


Converging Geometric Series of a a Bouncing Ball

A rubber ball was dropped from a height of 36m. and each time its strikes the ground it rebounds to a height of 2/3 from which it last fell. Find the total distance traveled by the ball before it comes to a rest.  Answer according to reviewer is 180m  I applied geometric series  $${ \sum_{i=0}^\infty {36\times\left( \frac{2}{3} \right)^i } = 108}$$  well actually I put 250 on the calculator instead of infinity but nonetheless it stays lke that. Is it possible problem set is wrong?


Questions link almost unreadable when active on meta

If you click on  the font color is almost unreadable on the main site here.  Is it possible to make it a slightly different color? (I cannot say if darker or lighter is better)


Saving special characters like •¤♫†³™ into database PHP at the same time echo them in php

I'm creating a listing website where user can make their titles fancy by using special characters:  in my database i have a field name ads_title varchar(255) latin1_swedish_ci  and on my webpage header it says like this  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   when i tested my posting of ads form, i entered in the title this characters ¥šë™test and then when it saves it to the database it turns int olike this Å¡Ã¯â€¢â€¢  why? how can i save those kind of characters in my dbase at the same time echoing it in php. thanks


Where did the name "Stack Exchange" come from?

I get Stack Overflow (which I'm guessing was the first site?) and Super User, Code Review, and the other sibling site names make sense to me.  But I've never heard of a stack exchange before.  Is a stack exchange a real thing, or is this site's name a combination of Stack Overflow and an exchange of ideas?


How to extract only files without creating directory paths from tar.gz file?

I have a tar.gz file from which I have to extract only the files in current directory without creating the whole structure.  For example:    tar.gz contains below files,    /u01/app/oracle/file1 .. .. /u01/app/oracle/file10 /u01/testdata/file1 .. .. /u01/testdata/file5   the tar.gz is present in /u02. So when extracting I want file1 through file10 coming under /u02 instead, the whole directory structure is getting created under /u02


Do "enter the battlefield" abilities trigger heroic? Do creatures that leave and reenter the battlefield trigger again?

So, here's the play:  Player 1 has  on the field. They play  and target the warrior, giving the warrior a +1/1 counter.  Question 1: Would Living Totem's ability trigger Staunch-Hearted Warrior's heroic ability?  Back to the game now. Next turn, player 1 plays  and returns Living Totem to their hand. On the following turn, they play Living Totem back onto the battlefield. Would Living Totem's ability trigger again?


"I want you succeeding" vs. "I want your succeeding"

I am happy seeing you succeed.   I am happy to see you succeed.   I want you to succeed.   I want you succeeding. I want your succeeding.  Could you please explain the differences between them, and the first and second examples independently of each other?


Remember a half-typed command while I check something

I often find myself in the following position: I've started typing a long command at the bash prompt, but half-way through I find out I need to check something with another command. This is a problem when I'm at the console (no X), which is often the case, because then I only have the following unsatisfactory ways to do it, that I know of:    Hit ctrl+alt+F2 and log in on another virtual console, and find out what I wanted, then go back and continue  ctrl+a, type echo + space + enter, find out what I wanted, press ↑ until I find my command, ctrl+a, del x 5, ctrl+e, and continue  Highlight what I've typed so far with my mouse (if gpm is running, which it usually is), press ctrl+c to interrupt, find out what I wanted while being careful not to use my mouse to highlight stuff, then press middle mouse button on a new prompt and continue  Pray to the command line gods that the half-written command will have no adverse effects but simply fail, and gingerly press enter, then find out what I wanted, press uparrow until I get my command back, and continue  Jump into my time machine, travel back in time and remind myself to start screen before starting to type command, travel back to the present, press ctrl+a c, find out what I wanted, press ctrl+a ctrl+a, and continue   So what I want to know is, is there some more elegant way of doing this? A sort of subshell-command or similar?  I'm most interested in methods that do not require any preparations or setup to work.


Windows 10 memory leak, please help me diagnose

I upgraded to Win10 from Win7, been having horrid memory leaks. Basically I can't run my computer for more than 7 days, my virtual memory would reach 55GB+ and make my computer non-responding. It's on "system managed" setting, though I tried giving it more manually and it would just fill up too.  My old Win7(before the Win10 upgrade) on this same computer was fine, could run for 3 months+ without issue. My laptop that has Win10 is also fine, it's now on for 2 months and memory use is minimal.   This is my MEMMAP, poolmon and ProcessHacker info:     This is how long my PC been on for the above screenshot:   This is my PC specs:   Please let me know if there's any other info needed to diagnose the issue.   Btw I have tried poolmon/WPA to diagnose the issue according to various guides found here, but for some reason I'm still unable to determine the cause of the memory leak. So you'll have to tell me exactly what to do differently with poolmon/WPA to find the cause. Thanks!!


How can I control my Apple TV from my Mac?

I have two third gen Apple TVs and a Macbook Pro running 10.8. I use the remote app on my iPhone and iPad all the time, but it seems silly that I have to reach for them when my Macbook is right on my lap.  I'm not looking for a remote iTunes solution or home sharing, I want to actually be able to navigate the Apple TV menus from my Mac and do things like launch Hulu+ and Netflix.  I've searched around a little and can't find anything that claims to do this. Is it possible?


how to call var total to down I want to call var **total** to be operated below but every time I call I can't

how to call var total to down I have tried to talk to do this but always failed. I want to call var total to be operated below but every time I call I can't can you help me?   <input class="largerCheckbox1" type="checkbox" data-exval="<?php echo $user->tertagih; ?>" <?php echo "name='id_history[]' value='1'"; ?> >    <script type="text/javascript">         $(document).ready(function(){             $("#boxes input[type='checkbox']").click(function(){                 var total= 1;                 $("#boxes input[type='checkbox']:checked").each(function calc(){                   //Update total                   **total** += parseInt($(this).data("exval"),10);                 });                  $("#test_<?=$id?>").text(total);                                        });          });   $(document).ready(function(){               $("#hhb").click(function(){                   var three = 3;                    var bilangan1 = **total**;                   var bilangan2 = three;                   var pengurangan = bilangan1 - bilangan2;                   document.getElementById("pengurangan").innerHTML = pengurangan;               });             });  </script>


align* but show one equation number at the end

I am using align*, but I still need an equation number. I know one solution is to use align and add \nonumber to all lines but the last. Is there a 'lazy' way to do it?  I searched a little and found similar ones suggesting use split:    Unfortunately, due to the page break issue I have, I need to use align, because split won't auto page break, as described in .


Extracting specific range of characters from each line

I need to select 10 characters from each line.I have a file like this   TestSampleSampleSampleSample Test1Test2Testtest4Test10Test11 lksdnlkdod   I need to modify it so it looks like:   TestSample  Tes1Test2T  lksdnlkdod


How to select elements from a list and put it in an array using javascript

I want to pick all the elements inside the ul tag and push it in an array using javascript.How should I do that?

Item 1

Item 2

Item 3

Item 4

Item 5


How can I create a block quote enviroment with big quotation marks similar to the  of Wikipedia?  Additionally it would be nice to place  both quotation marks and quote in a colored box and to have the author closer to the citation.


Is it possible to disable CPU throttling on a MacBook Pro with a completely dead (not recognized) battery?

I have a MBP late 2011 running El Capitan, recently my battery died (x over the icon and "no battery available" in the dropdown.) I've noticed since then that CPU intensive tasks are very slow, and I read that without a battery macs will throttle the CPU to half capacity.  So now I'm looking for one of two solutions:  1) Either somehow disable the throttling, or  2) Trick the computer into thinking it has a battery.  In regard to the first one I've tried a few things such as described , removing a plist file that supposedly controlled it, but that hasn't helped. Any help would be greatly appreciated, TIA.  Edit: I've looked over the question about a 2006 MacBook, it's similar but I've tried everything outlined there and nothing has worked. I'm curious if there are any new ideas. I think the difference may be El Capitan.


Invert digits from columns in Excel 2013

Is it technically possible to flip numbers from all cells in a column without a plugin ?  For example, a two column spreadsheet with  Ref, Weight 3300, 500 3200, 500   Would become  Ref, Weight 0033, 500 0023, 500


How to install ubuntu and remove windows

Initially I have windows-10 in my PC. Now I want to remove it and install ubuntu. But RAM of my PC is 2GB only.remove


First name appears in text-citations at specific circumstances

Now, I stuck at a specific trouble and would like to ask you about this. I am using Biblatex and Biber for citations and generate citations in the text via \cite{} or \citep{}.   This works perfectly, with the exception of following entry in the bib-file:  @thesis{kohl_2000,       author = {Kohl, Martin},     location = {Sample},     title = {Sample},     institution = {Sample},     type = {phdthesis},      date = {2000} }   Here, I get (cf. Kohl Martin 2000) instead of (cf. Kohl 2000) by using the command \citep[cf.][]{kohl_2000}. If I change the last name, it works correctly again. It seams that it only appears, if the last name is “Kohl” (also at other publication types). Do you have any idea, why this strange error occurs?


Minecraft directory doesn't have a 'Resource Packs' folder?

I go into my .minecraft folder and there's Assets and all the other files and folders, but no resource packs folder?  If I create one manually, and place the textures inside, they don't show up in-game.  I'm on a Mac.


Biometrika latex template reports error when using theorem-like environments

I need to use the  tex template for writing a report. But using the theorem-like environments (even without any modification to the codes) in styleguide.tex gives the following error: ! Use of \@item doesn't match its definition. \update@series@target@value #1->\def \reserved@a {                                                    #1}\ifx \target@meta@famil...  The error can be caused by any theorem-like environments, for example, \begin{definition}[optional argument] This is a definition. \end{definition}  I don't know much about how such enviroments in custom templates are defined. I can't even find where the codes in the error message are. What changes should I make? I am using Miktex 2.9 on Win10 if it matters. P.S. The template contains several very lengthy files. I don't think copying and pasting them there is a good choice. And it's hard for me to create an mwe without causing new errors since I cannot locate the problem precisely. I'd really appreciate it if you could download the template and check why this error occurs.


In 8.0.17 EPSG Spatial reference systems are not available at installation?

In 8.0.17 INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS is not prepopulated with ORGANIZATION="EPSG" records, leaving the table with only a single record, that for the default SRID=0.  A count in INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS of 1 record instead of the 5152 records found in 8.0.15.  It's breaking my load scripts with the following error due to the previously available spacial reference systems being omitted.  ERROR 3548 (SR001) at line 1: There's no spatial reference system with SRID 4326.   Is this a documented intentional change, or am I missing something?  This is not mentioned in the release notes:     My installations are both default AWS RDS installations made at different times resulting in different mysql versions. The reference systems are present on the prior installation but missing on the second.  version   8.0.15 innodb_version    8.0.15  SELECT count(*) FROM INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS; 5152   version   8.0.17 innodb_version    8.0.17  SELECT count(*) FROM INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS; 1


Fantasy book, main character called Spyder, a tattooist, meets a girl, ends up in a fantasy place

Trying to find a book I read a few years ago. The main character was a guy called Spyder who I think was a tattoo artist, meets a girl at a bar, gets into a fight and I think he sees some weird stuff. Anyway somehow ends up in some fantasy place. All a bit weird.


Getting Null Pointer exception with Sorted Linked List

I have a sorted linked list - priority queue implementation and I get a null pointer exception when I attempt to do the following: get a Job from a method, delete the node in the linked listed associated with that job, change the priority of the job I received from the method and add the job back into the linked list at its new location. this is my loop that runs a job from the sorted linked list: while(!sl.isEmpty()) {         Job currentJob = sl.remove().job;         System.out.println(currentJob.toString());                  if(currentJob.getCurrentJobLength() > 0) {             currentJob.decrementJobLength();             currentJob.incrementEndTime();             sl.insert(currentJob);                          if(cycles == 30) {                 System.out.println();                 Job temp = starvedJob(sl);                 sl.delete(temp);                 temp.setFinalPriority(1);                 sl.insert(temp);                 cycles = 0;             }                      }         cycles++;     }  the null pointer occurs on line: temp.setFinalPriority(1); This is my delete method for the sorted linked list: public boolean delete(Job j) {          Node nodeBeforeDelete = this.head;     if(nodeBeforeDelete == null)         return false;     else if(nodeBeforeDelete.job == j) {         this.head = this.head.next;         return true;     }     while(true) {         Node after = nodeBeforeDelete.next;         if(after == null)             return false;         else if(after.job == j)             break;         nodeBeforeDelete = after;     }     Node after = nodeBeforeDelete.next;     nodeBeforeDelete.next = after.next;     after.next = null;     return true; }  and if it helps, my insert: public void insert(Job job) {     Node newNode = new Node(job);     Node current = head;     Node previous = null;     while(current != null && (job.getFinalPriority() > current.job.getFinalPriority())){         previous = current;         current = current.next;     }          if(previous == null) {         head = newNode;     }else {         previous.next = newNode;     }     newNode.next = current; }  Thank you in advance for any feedback!


Should I flag answers which contain only a link as "not an answer"?

More than often I get a lot of itch when I see an answer which contains only a link. For example .  Check this link, it will solve your query..   This answer does not explain in any way why and how it solves the OP's concrete problem without the need to click the link. Also, if the link ever goes down, then the whole answer is completely useless. I am very tempted to flag this as "not an answer" and hope that the moderator understands the hint and converts it into a comment. Can I flag them as such? Related:


I have some questions about these words:   What's different between these two words? Which word will be correct for use? Which word doesn't use now?


How do you get key frames made from objects automatically following paths?

I am trying to keyframe a ball that is following a path automatically using a driver. The camera is stationary. I can't seem to get the automatic key framer to work?


I know how to enable cheats, but when I search command block in my creative inventory, I can't find it. Where do I get it?


Find multivariable limit $\frac{x^2y}{x^2+y^3}$

Find multivariable limit of: $$\lim_{ \left( x,y\right) \rightarrow \left(0,0 \right)}\frac{x^2y}{x^2+y^3}$$ How to find that limit? I was trying to do the following, but i am not able to find a proper inequality: $$| \frac{x^2y}{x^2+y^3} | = |y-\frac{y^4}{x^2+y^3}| \le$$


Autofocusing multi v single point at a party

Context  I've shot at a party at night recently. I've used mainly multi point (continuous) tracking as it makes more sense, as random events may come and go.  Question  My friend suggests that I should have used single point to increase the amount of images worth keeping. I don't do that but I do bracketing, and it improves my keeper count, as well as just taking multiple shots. If Single point AF preferred when you're shooting at such events or is it more of a personal choice?


How do I give myself an item that can only be placed on a block with a certain damage value?

I'm currently in the process of making a custom map and I want to add blocks that can only be placed on a certain colour clay.  This is the command I tried using.  /give @p cobblestone 1 0 {CanPlaceOn:["hardened_stained_clay"],Damage:3}   However, even with this command the cobblestone can be placed on any colour of stained clay. What command can I use for placing only on a certain block?


Title of novel with girl who can read minds by observing body language, later communicates with a hive mind on an alien planet's surface

As a kid I was greatly influenced by a book where a girl (I believe her name was Marlena) lived in a ship orbiting an alien planet.  The ship was intended to colonize the planet but the humans had encountered difficulty.  People on the surface early on had gone incurably mad.  The planet was covered with single cell organism, but no other life.  Other than the "bacteria" it was sterile.    The girl, along with most of the colonists, was still living on the orbiting ship for the foreseeable future.  The girl had an uncanny knack of reading people's minds by noting minute changes in behavior and body language, kind of like Sherlock Holmes' famous observations.  Eventually she got a chance to go to the surface, and found the planet trying to communicate with her.  In one memorable scene the swirls in the water of a stream formed a face and started trying to call her name, "Eeeena, Aaleeena, Aarleena, Marlena!"  It turns out that the single celled organisms on the planet comprised a hive mind which had tried to communicate telepathically with previous humans by altering their brains slightly, causing the madness.  The girls's brain was different, however, constantly modifying and changing itself so that it was not damaged by the hive mind's attempts to communicate with it.


I have this doubt after watching the movie Interstellar;  Lets assume I am on Jupiter. (I know it is a gas planet, full of hydrogen and helium, has extreme pressure, etc. Let's please ignore those facts for this question). As Jupiter has more gravity compared to Earth, time moves slower on Jupiter compared to Earth.  Now If i have an extraordinary telescope on Jupiter through which I am able to see the people on Earth, as the time moves much faster on Earth, will the people on Earth look like move much faster? (As we see a fast forwarding movie?)  If my understanding is completely wrong, please explain.


how to properly log the output of a console program that frequently updates "parts" of the screen, resulting in a messy log file?

I have some Java executable (jar) that is run my some shell script from a cron job once every night. That executable does not print log statements "as usual" just by printing them out in a sequential manner like line after line (print after print), but while it processes its data its printing a single line with status data and then "overwrite" or "update" just that single line over and over again, until its done with this part of processing. Examples: A common program would output something line this: Program XYZ started..<cr+lf> processing 1<cr+lf> processing 2<cr+lf> processing 3<cr+lf> im done<cr+lf>  Simple! I can easily redirect its output to a file and I'm done. But the program I will have to deal with does it more like this: Program XYZ started..<cr+lf> processing 1<cr> processing 1 - part a<cr> processing 1 - part b<cr> processing 1 - part c<cr> processing 1 - part d<cr> <cr+lf> processing 2<cr> processing 2 - part a<cr> processing 2 - part b<cr> processing 2 - part c<cr> processing 2 - part d<cr> <cr+lf> processing 3<cr+lf> im done<cr+lf>  but much more intensive than I showed here. So it just not always overwrite status lines, but does it a lot while processing. So just redirecting or appending its output to a log file does not seem to make a lot of sense here, since it will just clutter the log file with millions of screen-updates that can not be viewed and understood that easily by humans. So my question is: is there a way or tool for programs that may behave like that to "log" or maybe "screenshot every 30 seconds" their output to a log file?


do I need to put a comma after 2009 in the following sentence:  In 2009, established an institute in India and served as chief executive of the Institute for three years


I have a question:  Let $F$ and $K$ fields such that $F\subset K$. Can we conclude that $1_K=1_F$?  I found any counterexaples when $F$ and $k$ are rings, but not necessarily fields. However when these are fields I don't get conclude nothing...


The site still thinks it's attached to Stack Overflow

When clicking help, you get this:    First, it shouldn't have a button to return to the main site, as this site isn't attached to any other site. Second, What's Meta's wording should be changed, because again, there is no main site.


Find formula for generating function of sequence

My task is to find formula for generating function of sequence $a_0, a_1...$ defined with following recurence  $a_0=1$ and $a_n=\sum_{i=0}^{n-1} (n-i)a_i$.   I rewrote the expression  $a_n=\sum_{i=0}^{n-1} (n-i)a_i=n+(n-1)a_1+(n-2)a_2+...+a_{n-1}$  and I counted few members of sequence $a_1=1,a_2=3,a_3=8,a_4=21$ etc.  There are two answears below-wchich one i correct? Is there any way how to do some backward examination to show that it gives correct solution?


I'm planning to do a fresh OS installation, but first I want to backup my .ssh folder in order to keep my ssh keys. Can I copy it into a usb stick and if so how can I do this? Do I need to do any extra steps in order to "restore" the ssh keys on my new installation?


rtl8723be network adapter not working properly(very low signal strength) after upgrading from 19.04 to 19.10

I've been having this network adapter problem on my HP laptop earlier also, but the general fix() suggested by many users used to solve my issue most of the time. Once I've downloaded the rtlwifi_new, the following codes used to work on 19.04 as a fix.  cd rtlwifi_new make sudo make install sudo modprobe -r rtl8723be sudo modprobe rtl8723be echo "options rtl8723be fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf   The above codes had to be rerun every time a new kernal update was pushed. But after updating to 19.10 yesterday, the fix is no longer working even though the code is not throwing any errors. Now I have to literally sit right next to my modem to get online. I'm not sure if I've provided enough information required to solve this issue. Do let me know if more info is necessary. Kindly help as I couldn't solve this on my own.  EDIT: All solutions I've encountered were for version 19.04 and before. Those fixes worked perfectly. But they don't seem to work on 19.10. Hence raising a new question for 19.10.


Photographers : One or Many Social Personalities

With photography covering such a wide range of topics, it's clear that a lot of photographers are likely to face an issue when it comes to being active in social circles - You don't want to expose people who are interested in your "U" rated work to coversations where you express your liking for "18+" rated content.  So it makes sense to split up your accounts a little, or maybe a lot?  Do any of you ( ON A PERSONAL LEVEL ) simply split yourself into 2 ( Regular & NSFW ), do any of you split your personal interstes further ( Sport . Erotic . Falmily Portrait ), or do any of you dare to use one single account ( Anything goes ).  I'm particularly interested in how you how to split up regular content if it could be deemed as NSFW in a non pornographic way. For example, an interest in modelling which is non nude, but contains gore or fictional graphic violence. This makes it not suitable for family viewing, but it's not going to appeal to fans of the erotic either. So should you have 3 presences ( Universal / Regualar / NSFW )?   In other words:  So lets say as a photographer you own several web/business presences:  Your Name Photography - Fashion, Family Portrait, Local, Street FA Media - Alternative, Dark, Music, Live Events, Light Fetish Dark Eye Promotions - Main Fetish - BDSM The Erotic Studios - Nude - Erotic   From a business perspective, you should own each of these as a site and a social media account, but on a personal level, how do you keep up with all interests without needing to set up another 4 mirror accounts for personal use?  Any examples of how multi-niche photographers out there run their personal presences would be appreciated.


How to change date/time format Linux gnome?

I have installed Gnome on my Linux 18 mint and I see the time at the top says:  Basically it says Sun May 7, 00:26, and I would like for it to say May 7, 2017 | 12:26 AM. I remember being able to right click and edit the calendar and edit this myself but the option seems gone now.   How can I change the way the time displays?


Scripting a propeller or gear ; the info window python code fails to match success of GUI duplicate and rotate applied to master gear or blade

Given the master propeller blade or gear already drawn at the desired radius from the rotation axis, the Blender GUI approach to duplicate the original and x-rotate the copy 15-deg is to type shift+D  rx15 But the corresponding Python script which appears in the info window does not yield a copied object. Here is the latest code suggested by StackExchange, but still not working - thanks much: import bpy from math import pi   j = 1          # count 1-to-n blades while j<= 3:     bpy.ops.object.duplicate_move()     obj = bpy.context.active_object     bpy.ops.transform.rotate(value = j * 2 * pi / 4, orient_axis='X', orient_type='GLOBAL')     j=j+1


Kafka Stream forward method throwing NullPointerException because ProcessorNode currentNode object is null

We have written Kafka stream application which reads from source topic does some business logic in 2 processor and then write the output to sink topic.  Below is the code to create topology, add source,processor(please note we are adding 2 processors) and sink  Topology topology = new Topology(); topology.addSource("sourceProcessor", "source-topic")         .addProcessor("Process", ()->fileExtractProcessorObject , "sourceProcessor")         .addProcessor("XMLJSON", () -> xmlJson , "Process")         .addSink("sinkProcessor", "sink-topic", "XMLJSON"); KafkaStreams streams = new KafkaStreams(topology, getProperties(appConfig,sourceConfig));         streams.start()   Below is the first processor code  public class FileExtractProcessor implements Processor<String, byte[]> {     private ProcessorContext context;     public FileExtractProcessor() {     }      @Override     public void init(ProcessorContext context) {         this.context = context;     }      @Override     public void process(String key, byte[] bytearray) {             /* business logic */              //This is pojo class which will be forwarded to next processor as value             ProcessData pData = new ProcessData();                  // Setting pojo object and forwarding to next processor                 pData.setValue(value);                 pData.setXmlData(files);                 pData.setAppconfig(ac);                  context.forward(value.getRunKeyId(), pData, To.child("XMLJSON"));                 context.commit();         } }   In the above code when we forward method is invoked we get null pointer exception in the below code.  org.apache.kafka.streams.processor.internals.ProcessorContextImpl#forward(K, V, org.apache.kafka.streams.processor.To)  ProcessorNode child = this.currentNode().getChild(sendTo);   java.lang.NullPointerException     at org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:183)     at com.myapp.FileExtractProcessor.process(FileExtractProcessor.java:78)     at com.myapp.FileExtractProcessor.process(FileExtractProcessor.java:22)     at org.apache.kafka.streams.processor.internals.ProcessorNode.process(ProcessorNode.java:118)     at org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:201)     at org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:180)     at org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:133)     at org.apache.kafka.streams.processor.internals.SourceNode.process(SourceNode.java:87)     at org.apache.kafka.streams.processor.internals.StreamTask.process(StreamTask.java:429)     at org.apache.kafka.streams.processor.internals.AssignedStreamsTasks.process(AssignedStreamsTasks.java:474)     at org.apache.kafka.streams.processor.internals.TaskManager.process(TaskManager.java:536)     at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:792)     at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:698)     at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:671)   We are using kafka-stream-2.4.0.jar Can you please help where we are missing here. Not able to figure out why currentNode object is Null. Early help is highly appreciated.


How to determine which process is creating a file?

Given file path, how can I determine which process creates it (and/or reads/writes to it)?


Evaluation of $\int_{-\infty}^\infty \frac{\sin(at)}t\ dt$

I just need to know if this integral converges.  If it does, what is the value?  If not can anyone tell me what is the value of the $$ \int_{-\infty}^\infty 2\,\frac{\cos(w)\sin(w)}{w}\ dw ? $$


First off, I would like to apologize if I am posting this in the incorrect location, as I am not sure where else to put this.  I use Stack Overflow all the time, and I have always wondered if a "select all" option could be added to large amounts of code.


What exactly gives electrons a charge? I understand how in molecules, an imbalance between electrons and protons give ions charges and I also understand that there is really no positive or negative charge, they are just names assigned to opposite charges, but I am just very unsatisfied with not actually knowing what an electron is and why it has a charge.


What is the Single Word for Burning Alive?

Is there any single word substitute for 'Burning Alive'? We've Behead for 'Cut off the head'. Similar  way, What is the Single word equivalent for 'Burning Alive' If any?


Movie identification: A lady who could stop time

This movie or possibly TV episode (I saw it on TV) was set during the Cold War. The main character was a lady who could stop time for about 15 minutes or so.  There are a bunch of relatively mundane things that happen while the Cold War tensions keep rising in the background. In the final scene the main character leaves the store after having stopped time and sees a Soviet missile hanging in the air above the street (since time is stopped) about to impact the town (the missile still had all of the stages attached, for some reason)  Other details that I can (sort of) remember: it was set in a small town, I think during late 70s or 80s