Create a mirror to reflect objects for vfx compositing

I would like to create a virtual mirror to compose on top of a real mirror to reflect objects in Blender. This is how I imagined it in my mind: (The mirror completely reflects the object but leaves the original real reflection)  But when I try to do it, it looks like this: (the reflection is dark, transparent, and barely visible)  I'm probably not doing this the right way: I'm creating a glossy plane and setting it as a shadow catcher in the visibility part of the object properties. I couldn't find instructions about this anywhere, so I'm just guessing...


Page numbering transition from frontmatter to mainmatter going wrong

My problem is already stated , but I don't have enough reputation to comment on it :-/ I want to know if there are any fixes or solutions to the problem with the hepthesis class?  The last page of the table of contents is numbered with arabic numerals rather than roman numerals. Here is an MWE:  \documentclass[oneside]{hepthesis}  \begin{document}   \begin{frontmatter}     \tableofcontents   \end{frontmatter}    \begin{mainmatter}     \chapter{Introduction}       lalala   \end{mainmatter}  \end{document}


What is the appropriate site for this question about designing a Java library?

What is the right place for the following question? Stack Overflow? Software Engineering? Or another?  I plan to write a library in java, consisting of packages A, B, C and so on. Every package encapsulates a part of the big picture. B relies on A, C on B and so on. For this purpose every package offers a single class to the next package. However, every package is optional in that the user can decide to substitute their own implementation. How do I construct the interfaces (concept, not java entity) between the packages? My first idea was to simply put an interface (java entity) and an implementing class into the package with lower ordinal number, i.e. interface AtoB and class AtoBImpl into A etc. However, if a user of the library does want to use package B but provide their own implementation for A, they not only have to import B.*, but also A.AtoB. While this may not be a big deal, it looks like a better solution might exist. My second idea was to create extra packages only for the interfaces, i.e. a package AtoB containing an interface AtoB. The implementation of that would still reside in A. A user using B but not A now has to import B.* and AtoB.*, but no references to A remain. This looks cleaner to me but also more unwieldy. My third idea was to put all interfaces into a common package, i.e. a package inter containing interfaces AtoB, BtoC etc. Is there a best practise? Or another, better approach? Am I splitting hairs? Thanks!


Expansion of Universe: Spacetime metric and Topological Variations?

There are many posts, questions, comments and excellent answers on this website pertaining to cosmology, expansion, universe, spacetime et cetera. Yet, the following question was not asked or answered, so here it goes.  This question deals with - trying to 'force' an analogy between spacetime metrics and the underlying manifold and it's topological properties. (Due to my lack of mathematical knowledge, I will shamelessly abuse some language and notation here.)  Premise  We know the following very well:   The dynamics of spacetime metric is excellently described by Einstein's Field eqns:  $$G_{\mu\nu} = k\ T_{\mu \nu}$$  The expansion of spacetime metric on a collosal scale is described by: $$ ds^2 = dt^2 - a^2(t) \gamma_{i j} dx^i dx^j$$ The rate of change of this scale factor $a(t)$, in the form of the Hubble parameter, then characterizes expansion of spacetime metric as: $$ H \equiv \frac{\dot{a}}{a}$$ Experiments have measured this parameter and roughly we have [1]: $$H \approx 67.80\pm0.77 \ \frac{Km}{s \ Mpc}$$   Given the above two information and the central role that the metric plays in Riemann Geometry and GR, a colossal amount of information can be extracted about our cosmos.  NOTE -  metric tensor, like any other tensor on a manifold, is a bi-linear map from a certain space to $\mathbb{R}$. It is also an added physical structure on the Riemannian Manifold, which relates our cherished notions from Geometry to the real world (metric defines physical distances).    Question  There is so much wonderful cosmology that has been done and continues to be studied using the metric. But due to their inherent nature, these studies are limited to the geometrical aspects only. My questions are:    What subject, if any, studies the topological aspect of spacetime (topological cosmology, for example)?  What is our current understanding from such studies? Any references or links will be appreciated. Since only the physical space-time metric undergoes physical processes, is the topology of the underlying manifold an unchanging static constant?  More specifically: For the last 13.8 billions of years, the physical distance between two objects has increased (from the metric related physics) which is the expansion of universe. Has the coordinate distance between two objects on an appropriate scale changed? Is it even measurable? Does this question make any scientific sense?  (appropriate meaning the same scale on which the universe is homogeneous and isotropic)    Finally, any general perspective on such a topic is welcome. Thanks in advance!  Reference  [1] arXiv-1303.5062


Why the writing and reading in English are different?

I do not encounter so big problems with the English language although I'm not a native English speaker. But I'm curious why some languages (like English or French) are written different from the way they are read? And the German or Slavic languages are WYSIWYG. So especially for beginners (but I use them sometimes too) there are transcriptions in the dictionaries how to read the corresponding word.  Is this because in the middle ages the west European societies were separated in classes (castes) and some of them were privileged to be literate and some not? Or this is a special way to save the pronunciation of the word?  Thanks in advance and regards!  PS: Some examples (the entire language is an example but... ;))   example [ig'za:mpl]  sometimes ['sʌmtaimz] literate ['litərət] language ['længwidʒ] although [ɔːlˈðəʊ] because  [bi'kɔz] you [ju] ...   and in German the corresponding words:   Beispiel manchmal gebildet obwohl weil du / ihr / Sie   And here (in German) you can see few exceptions too.   "ei" is actually [ai]. "sp" is [ʃp] "ch" is [h] vowel + "h" = long vowel / obwohl [obvo:l] / ihr [i:r] "ie" is [i:]   In English:   "A" is [a] and [ei] "C" is [s] and [k] "E" is [e] and [i] and nothing at the end of the word etc...   But in German "A" is only [a], "E" is only [e]...  I'll not give you examples in Slavic languages.


I would like to make my Chrome/Opera to save login, password data without asking about it. It everytime asks if I want to save a password, but I want it to do this without any popups over time on different websites. Any ideas?


What if my paper is accepted, but later my institution doesn’t allow me to publish in this journal?

My paper was accepted by a publisher; an acceptance letter was mailed to me. However, later my institution didn’t allow me to publish there, because it the journal isn’t indexed by Scopus? How can I withdraw the paper; is there any issue if I submit my paper to another publisher?


I am making a game for unity , modeling in Blender, I am using texture atlas.   I would like to know if I should create many texture atlas, how to combine them in only one texture atlas, and weather or not this is necessary?


Parse "take it easy" "take it seriously"?

In "take it easy", "easy" is an adjective. In "take it seriously", "seriously" is an adverb. I'm baffled. Why not "take it easily"? Using an adverb to modify the verb makes more sense. For the same reason, I should say "take it more slowly", instead of "take it slower", right?


I have an array  array=(src/ucode/pkgs/get_ch.c  qa/tests/ucode/chktest.pl  src/ucode/pkgs/get_ch.c src/profile/settings.txt  src/ucode/pkgs/main_pf.c  src/ucode/pkgs/get_ch.c src/ucode/pkgs/main_ch.c src/ucode/pkgs/main_pf.c)   I need to get unique files from that array  src/ucode/pkgs/get_ch.c  qa/tests/ucode/chktest.pl src/profile/settings.txt  src/ucode/pkgs/main_pf.c  src/ucode/pkgs/main_ch.c   Basically I need to delete duplicate strings from the array


Java.lang.nullpointerexception in database saving query in android

I have watched so many solution and applied all but still getting null pointer exception in my code. Here is my code kindly have a look and reply as fast as anyone can. Thanks in advance.  DBHandler.java Class code  public class DBHandler extends SQLiteOpenHelper { //Database Version private static final int DATABASE_VERSION=1; // Database Name private static final String DATABASE_NAME="Patient.db"; //Table Name private static final String TABLE_NAME="patientDetail";  //Table Columns Names private static final String ID="id"; private static final String NAME="name"; private static final String ADDRESS="address"; private static final String PHONE_NUMBER="phone_number";  //Constructor  public DBHandler(Context context) {     super(context,DATABASE_NAME,null,DATABASE_VERSION); }  //Creating Tables  @Override public void onCreate(SQLiteDatabase db) {      String CREATE_PATIENT_DETAIL_TABLE="CREATE TABLE "+TABLE_NAME+"("             + ID+" INTEGER PRIMARY KEY AUTOINCREMENT,"             +NAME+" TEXT,"             +ADDRESS  +" TEXT,"             +PHONE_NUMBER + " TEXT )" ;      db.execSQL(CREATE_PATIENT_DETAIL_TABLE); }  @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {     //Drop older tables if exist      db.execSQL("DROP TABLE IF EXIST "+TABLE_NAME);      /// Create Table again     onCreate(db); } public boolean insertData(String name,String address, String ph_no) {     SQLiteDatabase db = this.getWritableDatabase();     ContentValues values= new ContentValues();     values.put(NAME,name);     values.put(ADDRESS,address);     values.put(PHONE_NUMBER,ph_no);     long result = db.insert(TABLE_NAME,null,values);     if(result == -1)         return  false;     else         return true;  } }   //insertPatient.java Class Code  public class insertPatient extends Fragment {  DBHandler mydb=null;  EditText editname,editaddress,editph_no;  Button btn_adddata;  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     View rootView = inflater.inflate(R.layout.insert_patient, container, false);      mydb = new DBHandler(getActivity());      editname=(EditText) rootView.findViewById(R.id.insert_name);     editname=(EditText) rootView.findViewById(R.id.insert_address);     editname=(EditText) rootView.findViewById(R.id.insert_ph_no);     btn_adddata=(Button) rootView.findViewById(R.id.insert_button);     btn_adddata.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             adddata();         }     });     return rootView; }  @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     mydb = new DBHandler(getActivity()); } public void adddata() {     mydb = new DBHandler(getActivity());     Toast.makeText(getActivity(), "working button", Toast.LENGTH_LONG).show();    try {         boolean isinserted = mydb.insertData(editname.getText().toString(), editaddress.getText().toString(), editph_no.getText().toString());         if (isinserted) {            Toast.makeText(getActivity(), "data saved", Toast.LENGTH_LONG).show();        } else {            Toast.makeText(getActivity(), "data Not saved", Toast.LENGTH_LONG).show();        }    }    catch (Exception e) {        Toast.makeText(getActivity(), String.valueOf(e), Toast.LENGTH_LONG).show();    } } }   I have appllied so many solutions like either button is initialized or not, getactivity(), getcontext() and getbasecontext() for initializtion of dbhandler object, also made many changes in my db handler with different solutions but still got the same error. I did not checked my solution for activity only as i am using fragment classes so i tried it only in it.


Function with limits only at irrational points

This is the starred example 5.1.8 in Krantz' Real Analysis and Foundations.     Give an example of a function $f: \mathbb{R} \rightarrow \mathbb{R}$ so that $\lim_{x\rightarrow c} f(x)$ exists when $c$ is irrational but does not exist when $c$ is rational.   I'm aware of the Dirichlet and Thomae functions but this seems slightly different. I'm not even sure a solution exists. Thanks for any help!


How to preserve bookmarks when rearranging pages of a PDF file with tools like pdftk?

I am using pdftk to rearrange pages of a pdf file with bookmarks/outlines, but after that, the output file lost the bookmarks of the original.   My command is pdftk in.pdf cat 1-22 43 23-42 44-end output out.pdf.  I was wondering how I could keep the bookmarks while rearranging pages?


Is it advisable to update Blender to the newest version as soon as possible each time?

I know Blender is free software and bugs happen. But my question is, is it good practice to update Blender every time there is an update? Even if a minor one? (i.e I'd consider 2.56 to 2.56b minor or even 2.63, no?)  I haven't been updating very often for fear that updating frequently causes issues like broken settings, non-compatibility or lost user configs?  Or is updating often recommended to keep up to date and adapted to the new changes, i.e like upgrades in the GUI and functionality?


I have two positive semidefinite matrices, $A$ and $B$, of size $((N-1) \times (N-1))$.  I know that for all $i$ and $j$ in $\{1,...N-1\}$, $|A_{i,j}-B_{i,j}|<k$ for some positive real constant $k$ and $|A_{i,j}|<l$ and $|B_{i,j}|<l$ for some positive real constant $l$. How can I place on the below expression an upper bound in terms of $k$, $l$ and $N$?  $$|\det(A)-\det(B)|$$  I.e. I'm looking for an expression in terms of $N$ and $k$, $C_{n,k,l}$, such that:  $$|\det(A)-\det(B)|\leq C_{n,k,l}$$  I believe such an expression exists as I am working through a proof which does something similar but gives no explanation as to how it achieved it. Going by what is in the proof, it seems as though the answer should come to something similar to:  $C_{n,k,l}=k2^{N}N(N!)(l+1)^{N-1}/2$  The proof I am working through says this result should be obvious but I am unsure why.


Why is "a 100% increase" the same amount as "a two-fold increase"?

and is such interpretation the norm?  When something went from 4 units to 8 units, most authoritative sources seem to agree with the use of "a two-fold increase", even though what was actually increased is more like "one-fold", i.e. the original quantity.  But if the "two-fold increase" is the correct usage, why most people seem to interpret "a 100% increase" the same thing?


If $T:V \to W$ is a linear transformation such that $T^2 = 0$, then $Im(T) \subseteq Ker(T)$?

Is it true or false that if $V$ is a vector space and $T:V \to W$ is a linear transformation such that $T^2 = 0$, then $Im(T) \subseteq Ker(T)$ ? I don't understand it that much. It doesn't seem related... I can have a vector $v$ from $V$ that its power by 2 equals zero but $T(v) \neq 0_{v}$


Which SE site could be used to post question on how to contact PC Gamer magazine?

I was thinking of possibly posting it in Arqade, since that covers computer gaming questions. The phone number listed in PC Magazine (for the last year or so) is 800-898-7159, but for the last several months has responded to calls as "no longer in service". The magazine is still being published; magazine racks I visit are carrying this month's edition of the magazine.


Can I connect to a specific access point by BSSID?

Is there any way to get Mac OS X to connect to a specific access point by BSSID? I have a network with the same SSID for multiple access points, and I would sometimes like to specify which specific access point to connect to. Is this something Mac OS X can do natively, or is there a third party tool that can do this?


I have been asking GRUB RESCUE everytime I restart my system, So I finally go to know from a previous thread that :A small partition has to be created on the disk and marked as a code EF02 "BIOS boot partition".  Please tell me how to create this partition.  I tried sudo grub-install /dev/sda3 the error is as follows:  Installing for i386-pc platform. grub-install: warning: File system `ext2' doesn't support embedding. grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged.. grub-install: error: will not proceed with blocklists.  and I also tried sudo grub-install /dev/sda i get this error:  Installing for i386-pc platform. grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible. grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged.. grub-install: error: will not proceed with blocklists.  please help  Thank you


E: The package jdk needs to be reinstalled, but I can't find an archive for it

any one help me please  i can't use apt-get anymore and I searched about this problem and all solutions have failed       i removed jdk and installed it but the problem still exists


How to implement package install suggestion on Debian?

I have noticed that while on Ubuntu, if I type the following:  mc   and it isn't installed, I get the message below:  The program 'mc' is currently not installed. You can install it by typing: sudo apt-get install mc   However in Debian, that is not available. It just gives a "-bash: /usr/bin/mc: No such file or directory" message. How can I implement the same functionality in bash command line on Debian? Yes, I know that if it is package suggestion that I want, I can simply do a regex search using apt-cache search. However I was hoping for the simpler suggestion immediately on typing the name of the program.  As per discussions, the functionality is provided by the package command-not-found. However even after installing it, and also installing bash-completion package, this isn't available on the Debian bash shell.


What are the differences between the Ubuntu shipped kernel and the upstream kernel?

What are the differences in feature set between the main Linux kernel and the kernel being used by Ubuntu?  Why is Ubuntu branched off of the main kernel instead of using the main kernel directly?


Getting google static map at inbetween zoom levels that google maps site does?

I'm not sure if this is new in the Google maps site but you can use the scroll bar to zoom in-between the standard zoom levels.  The plus and minus buttons still jump a full zoom level and there doesn't appear to be any change in the raster in the in-between zoom levels although some road labels change (are they vector then?)  Can I get a static map at the in between zoom level as I often want it a bit more zoomed in but not all the way to the next level?  Also is the in-between zoom available in the JavaScript API?   It doesn't look like this is possible from the Google documentation but that's not always very up to date.


How to add edge loops to a circle (triangle fan)

If I have triangle fan that makes a circle, for example what you get when you Add->Circle, with fill type Triangle Fan, and I want to add more edge loops radially, what's the best way to do that?  I can sort of do this if I extrude the outer edge, then scale down the 'old' outer edge. Once I do this I can do loop cut like normal between the two but this modifies the original edge. I'd like to figure out a way to do this that doesn't touch the outer edges.


Polynomial Linked List of Term objects is returning a NullPointerException

I am working on a polynomial java assignment that consists of three different classes. The first class is a Term class which consists of two int types, coefficient and exponent. Second is the polynomial linked list class which has nodes that hold Term objects in them. And finally I have a driver class which contains the main method.  I have built the beginning of the classes and have started testing but I have run into an issue that continues to give me a NullPointerException. When I input my coefficient and exponent which will then create the Term object and place it inside a new Node, it throws this exception and I can't seem to find out why.  These are my classes:  public class Term {     private int coefficient;     private int exponent;      public Term(int coefficient, int exponent)     {         this.coefficient = coefficient;         this.exponent = exponent;     }      public int getCoefficient()     {         return coefficient;     }      public int getExponent()     {         return exponent;     } }  public class Polynomial {     private Node head;      public Polynomial()     {         head = null;     }      public void readInPolynomial(int coef, int exp)     {         Term term = new Term(coef, exp);         Node temp = new Node(term);         if(head == null)         {             head = temp;         }         else         {             Node current = head;             while(current.next != null)             {                 current = current.next;             }             current.next = temp;         }     }      public void printPolynomial()     {         if(head == null)         {             System.out.println("The polynomial is empty.");         }         else         {             Node current = head;             while(current.next != null)             {                 System.out.print(current.polyTerm.getCoefficient() +                                   "x^" + current.polyTerm.getExponent()                                   + " + ");                  current = current.next;             }             System.out.print(current.polyTerm.getCoefficient() + "x^" +                               current.polyTerm.getExponent());         }     }      private class Node     {         private Term polyTerm;         private Node next;          public Node(Term polyTerm)         {             this.polyTerm = polyTerm;             next = null;         }     } }  public class PolynomialDriver {     private static Polynomial poly;      public static void main(String[] args)     {         for(int i = 0; i < 2; i++)         {             Scanner keyboard = new Scanner(System.in);             System.out.print("Enter the coefficient of your term: ");             int coefIn = keyboard.nextInt();             keyboard.nextLine();              System.out.print("Enter the exponent of your term: ");             int expIn = keyboard.nextInt();             keyboard.nextLine();              poly.readInPolynomial(coefIn, expIn);         }         poly.printPolynomial();     } }   Any advice is truly appreciated. Some things are only there for testing, like the for loop in main, but I'm still getting the NullPointerException when running this code and entering in a coefficient and exponent.  -Bryant


Unable to view or change file permissions

I tried to view file permissions  $ ll yaan/ ls: cannot access yaan/.: Permission denied ls: cannot access yaan/Nenje Nenje - TamilTunes.com.mp3: Permission denied ls: cannot access yaan/..: Permission denied ls: cannot access yaan/Aathangara Orathil - TamilTunes.com.mp3: Permission denied ls: cannot access yaan/Hey Lamba Lamba - TamilTunes.com.mp3: Permission denied ls: cannot access yaan/list: Permission denied ls: cannot access yaan/Latcham Calorie - TamilTunes.com.mp3: Permission denied ls: cannot access yaan/Nee Vandhu Ponadhu - TamilTunes.com.mp3: Permission denied total 0 d????????? ? ? ? ?            ? ./ d????????? ? ? ? ?            ? ../ -????????? ? ? ? ?            ? Aathangara Orathil - TamilTunes.com.mp3 -????????? ? ? ? ?            ? Hey Lamba Lamba - TamilTunes.com.mp3 -????????? ? ? ? ?            ? Latcham Calorie - TamilTunes.com.mp3 -????????? ? ? ? ?            ? list -????????? ? ? ? ?            ? Nee Vandhu Ponadhu - TamilTunes.com.mp3 -????????? ? ? ? ?            ? Nenje Nenje - TamilTunes.com.mp3 valar@valar-Desktop:/song$ cd yaan/ bash: cd: yaan/: Permission denied valar@valar-Desktop:/song$    Also I have tried to change file permission, but it doesn't throw error.  $ sudo chmod 644 yaan/ $   Also, I am not able to open the files. How do I recover them? Or change file permission and ownership?


Although I like Computer Modern font families I'd like to be able to make documents look like they were made by "normal person" and still be able to benefit from the TeX powers*. In short the solution must fullfill four simple requirements:   Cover same font characteristics both for math mode and regular one. Cover glyphs beyond ASCII table correcly. Support luaLaTeX and optionally XeTeX. Cover serif and sans serif faces with all faces (regular, semibold, italic).   Simple requirements but hard to accomplish, though.  So far I am able to fulfill all points with default Computer Modern font failing the zeroth one.  I can also fulfill the points except #2 by using fonts from , say:  \usepackage[utf8]{inputenc} \usepackage{arev} \usepackage[T1]{fontenc}   and I've identified the T1 encoding to be responsible for the limitted support.  I can also fulfill the points except #1, the math font is Still Computer Modern Roman:  \usepackage[utf8]{inputenc} \usepackage{fontspec} \setmainfont{Arial}[ UprightFeatures = { SizeFeatures = { {Size=-10, OpticalSize=8 }, {Size= 10-14, OpticalSize=10}, {Size= 14-18, OpticalSize=14}, {Size= 18-, OpticalSize=18}}} ]   Testing sentence is: Příliš žluťoučký kůň úpěl ďábelské ódy. Feel free to add other dummy sentences if you've found occasions where czech typesetting was correct while the other was not.    * That means user unfriendly interference with styles, easy splitting "Style definitions" part from the Content part, output stability, stable counters, easy referencing and many others. In short, all the little features we like in (lua)LaTeX.


How to check if a process is still running using Python on Linux?

The only nice way I've found is:  import sys import os  try:         os.kill(int(sys.argv[1]), 0)         print "Running" except:         print "Not running"   () But is this reliable? Does it work with every process and every distribution?


When $d \mid n$, the number of elements of order $d$ in a cyclic subgroup of order $n$ is $\phi (d)$

If $d$ is a positive divisor of $n$, the number of elements of order $d$ in a cyclic subgroup of order $n$ is $\phi (d)$=the number of positive natural numbers less than $d$ which are coprime to $d$.  The question I have concerns a part of the proof:  If $d | n$ then there exists exactly one subgroup of order $d$ -- call it $\langle a \rangle$.  Then every element of order $d$ also generates the subgroup $\langle a \rangle$ and an element $a^k$ generates $\langle a \rangle$ iff $gcd(k,d) = 1$ implies that the number of such elements is precisely $\phi (d)$.  How does every element of order $d$ also generate the subgroup $\langle a \rangle$, wouldn't it be only one $a$ since $|\langle a \rangle| = |a|$?  And how does this fact imply $\phi(d)$ is the correct number?


how to use newly set attribute id in jquery

I assign new id to a button. this is my code  $("#update").click(function(){     $("#update").attr('id', 'cancel'); });   and i after changing the id. i want to use it to be functional again in jquery to revert it back to update. having this code.  $("#cancel").click(function(){     $("#cancel").attr('id', 'update'); });   my problem is, after it changed the id attribute when i click the cancel nothing happens. what is the problem of my code.? thank you in advance.


Command to yield just the linux distribution name only

Suppose I have a set of pre-requisites I need to install for any of a number of linux distributions.  In this case, I'd need to switch my install expression against the distribution.   I am aware of uname -v, and I am aware that I can inspect the output of this command with some friable string expression and logic. However what I really need is:  V=$(something-like-uname) echo $V  "Debian" # or "Gentoo" # or "Redhat" # or  "Arch" # etc.   What is this command? (Does it exist?)


How to undelete a directory that was just deleted with "rm -R" command (in cloud drive)?

I deleted an important directory with rm -R command. This is an very populer host data. It was located /var/zpanel/hostdata/ayrintilih After remove ayrintilih directory has gone everything.  I tried to undelete with ext4magic program. But it need to another hdd volume for recovery.  Error message:   ERROR: can not use "/root/recoveried" for recover directory. It's the same filesystem : "/dev/dm-0"   My ISP just replied my request:  Unfortunately there is no way to add another Volume to a virtual Instance.  If it would be a dedicated Server, we could do it, but not in a Cloudserver.  You could try to minimize the partition and create another one, that would  count as another Volume. We also recommend to have allways a  Backup for your Important files.


"Failed to spawn mysql main process: unable to execute: No such file or directory"

I'm a newbie on MySQL ground so bear with me.  I've just finished upgrading 11.10 to 12.04.  Everything seemed to work without any hiccups and all my software and settings are working fine. Apart from MySQL.  When I try:  sudo start mysql   I receive an error:  start: Job failed to start   Where can I possibly diagnose what the problem is? And (hopefully) - how to sort it out?  (I disabled automatic start following advice  if that is of some importance)     Update 1:  Both outputs of:  cat /var/log/mysql.err  cat /var/log/mysql.log   are empty.  Output of dmesg | grep mysql:  [ 1401.785141] type=1400 audit(1335619832.181:25): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=16165 comm="apparmor_parser" [ 1401.791089] init: Failed to spawn mysql main process: unable to execute: No such file or directory     Update 2:  As indicated by AWinter below - it seemed that MySQL disappeared automagically after upgrade and had to be reinstalled.


Correctly handling spaces that occur after a user defined command

I am using LuaLaTeX for a manual and I am running into a spacing issue I am not sure how to resolve. I defined a new command that is simply used to make some text bold. However, I have found that this command eats spaces that follow the command so that the bold word is right next to the word that follows. I don't want to add a space in the definition because sometimes the word comes at the end of a sentence and I don't want an extra space. Below is a sample. How do I get the \lualatex command to behave such that the command does not eat spaces that come after it?  \newcommand{\lualatex}{{\bf lualatex}}  This manual is written in \LaTeX and is processed via the  \lualatex executable. The \lualatex executable has the Lua scripting language embedded which provides a power method of extending the capability of \lualatex.


Python pass condition formatting a dictionary

I am formatting a dictionary like so: for index, team_id in dataframe.get('team_id').items():     format_redis[str(team_id)] = {                 'x': float(dataframe['x'][index]),                 'y': float(dataframe['y'][index]),                 'z': float(dataframe['z'][index]),                 'n': float(dataframe['n'][index])             }  Now I'd like to pass a condition for adding the value, like: ...  {'x': float(dataframe['x'][index]) if str(dataframe['home'][index] == 'home',  'y': float(dataframe['y'][index]) if str(dataframe['home'][index] == 'away'}   But this syntax is not valid. Which one is the right one?


I installed mysql server and want to install the mysql client using following code:  apt-get install mysql-client   but I got following error message:  E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   It looks like the file locked and permission, if it is the case, it does not ask me for a password.  Your help and information is great appreciated.  Regards,  Inung


Iterating/looping through Select by Attributes and Export Data?

In ArcMap 10.5.1, I have 2 feature classes in ModelBuilder; both have a common attribute "Well_Nu."  The goal is to loop for each record in the first classes's attribute table and do:     1) Select by Attributes - Well_Nu = each value    2) Export Data - Export: Selected features, with output feature class: each value_1mi.shp      And repeat this same process for the second feature class.  So I need to create individual feature classes for each (selected) feature.   How should this be done in ModelBuilder?   Noting that I would like to do it for the 2 feature classes, though it appears ModelBuilder only supports one iterator in a model; in this case, I could resort to creating 2 models.


I was trying to install , and I got  npm ERR! Error: EACCES, Permission denied '/usr/local/lib/node_modules' npm ERR!  npm ERR! Please use 'sudo' or log in as root to run this command. npm ERR!  npm ERR!     sudo npm "install" "." "--force" "--global" npm ERR!  npm ERR! or set the 'unsafe-perm' config var to true. npm ERR!  npm ERR!     npm config set unsafe-perm true   How can log in as a root?


What are phrases for the a date meaning "never"?

What are current expressions/phrases for a date or point in time in the future that does not exist, meaning "never"? In German, we have "St. Nimmerleinstag" (meaning "the day of saint never"), what would be comparable English expressions?


When I try to send an email I get the following error:     550 2607:f8b0:4864:20::132 is not allowed to send mail from   mydomain.com. Please see the SPF record, with scope mfrom, identity   myuser@mydomain.com, and ip 2607:f8b0:4864:20::132   I use gmail to send mails from myuser@mydomain.com  This is how all the MX and TXT records I have at Cloudflare:   How to resolve this issue?


How to use hyphens appropriately when listing multiple unhyphenated terms?

Very similiar to , but with an important difference:  If two words share the same end, but do not contain a hyphen, can I also avoid repeating their ends when listing the words?  How would the following be shortened, considering that unidirectional and bidirectional do not contain spaces or hyphens?     To allow unidirectional and bidirectional communication...   In German we would write:     To allow uni- and bidirectional communication...   MS Word however complains about this, marking "uni" as a spelling error.


A class is recursive - when this class gets implemented, the parent class becomes recursive

Take the following example:  class Foo {     public int SomeProperty { get; }     public IEnumerable<Foo> Children { get; }     // .... }   If another class (e.g. Bar) implements Foo, Foo becomes non-recursive and Bar instead becomes recursive.  class Bar {     public Foo { get; } // At this point Foo.Children doesn't make sense anymore     public IEnumerable<Bar> Children { get; } // How can I enforce this part     // ... }   Currently I need to write two versions of every class, one with Children and one without. Inheritance makes this slightly less tedious but I can't statically guarantee that the requirements will be implemented correctly. I was also thinking about some kind of monad pattern with a higher kinded type Recursive but I can't wrap my head around it (especially since I just started learning it).  Any ideas?  Edit: I don't understand how this got marked as a duplicate. While I ended up with writing my own generic tree in the end, I didn't require it in my question and definitely didn't ask for a library. I was asking for general advice on how to approach the problem, where the solution I settled with ended up being a generic tree by chance. The fact that this question got closed after I provided my solution leads me to believe that someone read the answer, searched for trees on SO and then chose the first result, which doesn't help anyone. The "original" question doesn't even provide a solution to my question. This nothing more than laziness paired with the abuse of admin rights.


Logging onto a machine over ssh typically requires a password to be entered before access is granted. Alternatively, a key/certificate (without a passphrase) can be installed onto the remote machine so that logging on no longer requires a password. This is particularly useful for automated or scripted solutions.  However, it is considered inadvisable and unsafe to create a key/certificate without a passphrase. Solutions involving ssh-add and ssh-agent are proposed as a means to enter a passphrase only once per session, but to still use a key/certificate with a passphrase.  What is the solution for automated connections between machines? How can a machine automatically update from a remote Bazaar repository (via bzr+ssh?) on a regular basis, as in a cron job? How can a machine automatically backup data from another machine (via rsync) as part of a cron job? rsyncd? This would not be  though, which is a major disadvantage. I haven't looked at Bazaar daemon/server options.


How are words that describe a certain sound called?

They're different in different languages, but I'm looking for the name of the category of those words.  For example, a sound of dog's barking: "woof-woof". But in Russian it's "ghav-ghav";  A sound of cat: "meow". But in Japanese it's "nya".  Also various sounds that are used in comics: "boing", "bang", "poof", "ka-pow", etc.  EDIT:  These words are called "Onomatopeic"


how to tell if two dates are in the same day?

I am using the moment npm module. I am comparing two dates and want to see if there in the same day.  Is there a clean way of doing that using the moment package  or using straight javascript or typescript?


PHP String position handling names with apostrophes

If there is a name in a database (ie. O'Reilly) and I create the insert statement to insert this name into a database via a SQL query in a PHP script, it will cause an error because the apostrophe in the name will end the string and cause the query to fail ('O'Reilly'). Is there a way to use strpos() to find these apostrophes and replace them with a dash/space/comma/etc.  I have tried   $pos = strpos($value, "'");   if($pos!==false) {   $value[$pos] = "-";  }   But this will replace more than what I want in some columns.  I was hoping for something more like  $pos = strpos($value, "char'char");   if($pos!==false) {   $value[$pos] = "-";  }   Where the words "char" were replaced with some alphanumeric indicator so that the script knew to only replace the apostrophes in the names. Is there a way to do that in PHP?   This question has nothing to do with SQL injection, I am just trying to handle strings with apostrophes in them.


Ubuntu 18.04: Power Off pop-up taking around 8-10 seconds to show up

After recent update I noticed that now when I click on the power icon to shutdown/restart the pop-up is taking around 8-10 seconds to show up. This is happening only after clicking it for the first time after login. In the same session on the next subsequent click, the pop-up shows immediately.  I am using Asus Vivobook S14 with Ubuntu 18.04 version. My Kernel version is:  4.15.0-23-generic


Basically what I have is a very tricky situation. I have ubuntu alongside windows 8.1 as a dual boot. My win 8.1 have recently got into some problems and I cannot access safe mode neither windows repair works. Now I have an idea to insert win 8.1 dvd to repair my old windows but cannot boot because of a ubuntu gnu grub. What is the best way to boot windows from gnu grub because I tried to make it work using bios which also didn't work ?


Confusion related to a derivation in a paper related to gaussian

I was reading this paper where it is mentioned  Let F(·) be the CDF of a continuous random variable X and $\phi^{−1}(·)$ be the inverse of the CDF of N(0,1). Consider the transformation from X to Z by Z = $\phi^{−1}(F(X))$. Then it is easy to see that Z is standard normal regardless of F  I didn't get how it is true. What does $\phi^{−1}(F(X))$ denote here. I am a bit confused. Explanations guys help me out?


If $X_n \stackrel{d}{\to} X$ and $c_n \to c$, then $c_n \cdot X_n \stackrel{d}{\to} c \cdot X$

Let $X_n$, $X$ random variables on a probability space $(\Omega,\mathcal{A},\mathbb{P})$ and $(c_n)_n \subseteq \mathbb{R}$, $c \in \mathbb{R}$ such that $c_n \to c$ and $X_n \stackrel{d}{\to} X$. Then $c_n \cdot X_n \stackrel{d}{\to} c \cdot X$.   Here is my proof: By Lévy's continuity theorem it suffices to show that $$\forall \xi: \quad \hat{\mu}_n(c_n \cdot \xi) \to \hat{\mu}(c \cdot \xi) \qquad (n \to \infty)$$  where $\hat{\mu}_n$ (resp. $\hat{\mu}$) denotes the characteristic function of $X_n$ (resp. $X$). Using the tightness of the distributions one can show that $\{\hat{\mu}_n; n \in \mathbb{N}\}$ is uniformly equicontinuous. We have $$|\hat{\mu}_n(c_n \cdot \xi) - \hat{\mu}(c \cdot \xi)| \leq |\hat{\mu}_n(c_n \cdot \xi)- \hat{\mu}_n(c \cdot \xi)| + |\hat{\mu}_n(c \cdot \xi)- \hat{\mu}(c \cdot \xi)|$$ The first addend converges to zero as $n \to \infty$ by the uniform equicontinuity and the second one converges to zero since $X_n \stackrel{d}{\to} X$.  I was wondering whether there is an easier proof - my own proof seems rather like overkill to me. Thanks!


Suppose I'm running the following JavaScript getTime() function  <script language="JavaScript"> var $x = Math.round((new Date()).getTime()/1000); </script>   What would the equivalent code in PHP look like?


I am having hard time in understanding the concept of holes:   If there is no electron than how can it be a hole? For a moment lets assume absence of electron is termed as hole but how can this absent particle have mass? Under equilibrium  no electrons are present in conduction band. Why cant we termed this absence as holes in conduction band?


Get the external IP address in shell without dig in 2016?

This question:  ""  Solves the question with a call to dig:  dig +short myip.opendns.com @resolver1.opendns.com;   that is the fastest resolution possible, as it involves a single udp packet.  However, that is only one site: OpenDNS, Is there any alternative?  And, makes use of dig, that is not available by default. Again, Is there an alternative?    Note: I needed to solve this problem as the OpenDNS service didn't work locally due to a (also local) redirect of port 53. I finally found out the reason (I had forgotten about the redirect). First, by using this command to find if dnssec is working (locally missing ad flag):  dig pir.org +dnssec +multi   And also using this command to find out if your ISP is redirecting OpenDNS resolutions:  host -t txt which.opendns.com 208.67.220.220   If being redirected, you will get an answer of: "I am not an OpenDNS resolver."


How long does it take for reputation on Stack Overflow Careers to be updated?

Just curious how this works:  My Stack Overflow reputation on my Stack Overflow CV shows an amount X, which is less than my actual Stack Overflow reputation Y. It's been this way for a few days. In addition, some of my 'favorite answers' on my CV have a lower # of votes than they do in reality.  How long does it take for this (I assume cached) value to be updated?


How to include jQuery and JavaScript files correctly?

I'm doing it right now with the following code:   function uw_load_scripts() {     // De-register the built in jQuery     wp_deregister_script('jquery');     // Register the CDN version     wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', array(), null, false);      // Load it in your theme     wp_enqueue_script( 'jquery' ); } add_action( 'wp_enqueue_scripts', 'uw_load_scripts' );   This works, but should I do this for everyone, like this, or for everyone but admin (so that backend uses the WordPress version?):  if (function_exists('load_my_scripts')) {   function load_my_scripts() {       if (!is_admin()) {       wp_deregister_script( 'jquery' );       wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', array(), null, false);      wp_enqueue_script('jquery');        }   }   }   add_action('init', 'load_my_scripts');   This version doesn't work at all actually, I get the WordPress jQuery-version and not the Google one.  Therefore, should I deregister the jQuery that is included in WordPress at all?    Also, how do I add my own scripts (slider scripts, modernizr and my own custom.js) the correct way? I guess I should do this via functions.php as well and not in the header like I'm doing it now, but I'm unsure of how I would do that.


I've got a few, quite silly, non-technical questions about giving  to  releases.  Each Debian release has its unique codename, which is (so far) a characters' name from  movies by .  Here is list of all assigned codenames so far:   release 1.1 is  (Buzz Lightyear) - the spaceman, release 1.2 is  - the tyrannosaurus, release 1.3.x is  (Bo Peep) - the girl who took care of the sheep, release 2.0 is  - the piggy bank, release 2.1 is  (Slinky Dog) - the toy dog, release 2.2 is  - Mr. Potato, release 3.0 is  -  the cowboy, release 3.1 is  - the sergeant of the Green Plastic Army Men, release 4.0 is  - the toy blackboard (Etch-a-Sketch), release 5.0 is  - the toy binoculars, release 6.0 is  - the name for the three-eyed aliens, release 7.0 is  - the name of the rubber toy penguin with a red bow tie, release 8.0 is  - the name of the yodelling cowgirl, release 9.0 is  - a purple rubbery octopus toy at , release 10.0 is  - 's pet dachshund (currently ).   List of upcoming major Debian releases' codenames after :   release 11.0 is  - 's horse (currently ), release 12.0 is  - intelligent worm toy with a built-in flashlight.   There are also:   special codename  () which is symbolic link to codename which is currently unstable,  which is symbolic link to codename which is currently stable,  which is symbolic link to codename which is currently testing.   The list of Toy Story  is quite  but at some time, there will be no more characters' names to assign.  My questions are:   What codenames will be assigned if we run out of characters' names? Who decides what is codename of next release (please don't answer ambiguously like: 'community')? How many releases' names are planned ahead?   BTW: Interesting quote from :     The  of using Toy Story names was  by  who   was, at the time, the Debian Project Leader and was working also at   , the company that produced the movies.     by  (: ).


Minecraft 1.12 Multiplayer world to singleplayer

I have a multiplayer server world that I run locally on my computer. I would like to copy that world into a single player save. Easy explanation.  Problem comes when I try copy and pasting the world; it gets the correct world but has not saved my player, specifically. I spawn in the world's original spawn, which is way too far from my server's spawn to reach, and I have no items. Is there a way to fix this loss of player data? I'm the only player that has logged into the multiplayer server so I'm the only player data present  Update:   The playerdata .dat file is there and it has my uuid in the name, with dashes. I have tried copying my world over directly, and I've also tried creating a world, entering the world once, and then replacing the folder contents with my world files. Both have the same result.


Use the login on StackExchange.com in other SE sites

I am logged in on StackExchange.com, I want to login on another SE site without entering a password. Why do I have to choose a third party provider?  Isn't using cookies possible for subdomains? I see they are set either for stackexchange.com or for .stackexchange.com.  If SE wants to use OpenID instead, why isn't the global account an OpenID account too? It seems I'd have to enter  as OpenID provider, but I never logged in or registered there so I'd need a password.


How do I get my winsxs folder to be smaller on windows 7, above and beyond all of the standard disk clean up?

I'm running my computer on a small 100GB SSD. I noticed that there was 22GB left on it, and I started to investigate.  The biggest culprit on my machine was a 32GB WinSxS folder. I was flabbergasted.  I have followed every article I could find on Google to size this folder down, but despite my efforts, the folder is still just above 10GB!  How can I size this folder down even more? Preferably to 0, lol.  Is there a way that won't screw up my computer? I am in total disbelief that I have a folder that is larger than everything else on this drive, and for all I know, I likely will never need it.  Thanks


I have tried installing all the available updates and when I check again for updates it says the computer is up to date. How can I upgrade?


Is it proper and/or smart to independently ground an older 3 prong dryer outlet and upgrade it to 4 prong?

Just bought an older home that has a 3 prong dryer outlet.  It is right above an unfinished crawl space so it would be easy to run a good grounding cable to a grounding rod and/or an iron water pipe in the crawl space.  Unfortunately, the service wire does not have 4 conductors all the way back to the panel and would be difficult to replace.  Is this a good idea and would this be the equivalent of modern wiring assuming the proper installation of the grounding rod?  Thanks


Which Canon lens would be best for landscapes and night skies?

I have a Canon Rebel T3i. It came with an EF 75-300 and EF-S 18-55. I like to take pictures of wilderness, especially at a distance, and some photos at night of stars and building clouds. What lens would complement those that I already have? I received a 10-18mm f/4.5-5.6 IS STM for Christmas. I'm trying to decide whether to keep that. What would it be best to use for? Or should I return it for something totally different?


Is it acceptable, or to code, to splice electrical wire outside of a junction box behind drywall?

I'm planning to add a set of recessed lights to an existing circuit in my home.  The existing circuit is fairly simple: one light, controlled by one switch, and there is no insulation in the wall or ceiling.  My dilemma is in adding the fixtures into the circuit between the existing fixture and the switch.  I will need to splice additional wire into the circuit, but I'm certain there isn't enough slack to draw the existing line into the fixture's junction box to make the connections.  Should I run new line from the existing fixture to ensure that the connections happen inside the box?  Otherwise, can I splice a short segment into the existing line to get the slack I need?


Is a current-limiting resistor required for LEDs if the forward voltage and supply voltage are equal?

For blue LEDs with a forward voltage of 3.3 V and supply voltage of 3.3 V, is a series resistor still needed to limit current?  Ohm's Law in this case says 0 Ω, but is this correct in practice?  Perhaps just a small value like 1 or 10 Ω just to be safe?


Relationship between McNemar's test and conditional logistic regression

I am interested in the modeling of binary response data in paired observations. We aim to make inference about the effectiveness of a pre-post intervention in a group, potentially adjusting for several covariates and determining whether there is effect modification by a group that received particularly different training as part of an intervention.  Given data of the following form:  id phase resp 1  pre   1 1  post  0 2  pre   0 2  post  0 3  pre   1 3  post  0   And a $2 \times 2$ contingency table of paired response information:  \begin{array}{cc|cc} & & \mbox{Pre} & \\  & & \mbox{Correct} & \mbox{Incorrect} \\ \hline \mbox{Post} & \mbox{Correct} & a & b&\\  & \mbox{Incorrect} & c& d&\\ \end{array}  We're interested in the test of hypothesis: $\mathcal{H}_0: \theta_c = 1$.  McNemar's Test gives: $Q = \frac{(b-c)^2}{b+c} \sim \chi^2_1$ under $\mathcal{H}_0$ (asymptotically). This is intuitive because, under the null, we would expect an equal proportion of the discordant pairs ($b$ and $c$) to be favoring a positive effect ($b$) or a negative effect ($c$). With the probability of positive case definition defined $p  =\frac{b}{b+c}$ and $n=b+c$. The odds of observing a positive discordant pair is $\frac{p}{1-p}=\frac{b}{c}$.  On the other hand, conditional logistic regression uses a different approach to test the same hypothesis, by maximizing the conditional likelihood:  $$\mathcal{L}(X ; \beta) = \prod_{j=1}^n \frac{\exp(\beta X_{j,2})}{\exp(\beta X_{j,1}) +  \exp(\beta X_{j,2})}$$  where $\exp(\beta) = \theta_c$.  So, what's the relationship between these tests? How can one do a simple test of the contingency table presented earlier? Looking at calibration of p-values from clogit and McNemar's approaches under the null, you'd think they were completely unrelated!  library(survival) n <- 100 do.one <- function(n) {   id <- rep(1:n, each=2)   ph <- rep(0:1, times=n)   rs <- rbinom(n*2, 1, 0.5)   c(     'pclogit' = coef(summary(clogit(rs ~ ph + strata(id))))[5],     'pmctest' = mcnemar.test(table(ph,rs))$p.value   ) }  out <- replicate(1000, do.one(n)) plot(t(out), main='Calibration plot of pvalues for McNemar and Clogit tests',    xlab='p-value McNemar', ylab='p-value conditional logistic regression')


In a query selection I would like to display the result whether a field satisfies a condition.   Imagine that I have a table called stock. This table has a column that tells me the number of each item in the stock.  What I would like to do is something like this:  SELECT      stock.name, IF (stock.quantity <20, "Buy urgent", "There is enough") FROM stock   Is there any function in SQL Server to do that?


The font size remains unchanged even though I have used  \fontsize{8}{9.6}\selectfont  MWE:      \begin{frame}     \begin{align}     \fontsize{8}{9.6}\selectfont     \frac{\partial^2 l}{\partial \gamma^2}=&\sum_{i=1}^{n} \delta_{E_i}\bigg[-\frac{e^{\beta_0+\beta_1 x_{i1}}}{\gamma}\bigg(t_i e^{\gamma t_i}\bigg(t_i-\frac{1}{\gamma}\bigg)-\frac{1}{\gamma^2}(1-e^{\gamma t_i})\bigg)     \nonumber\\     &+\frac{e^{\beta_0+\beta_1 x_{i1}}}{\gamma^2}\bigg(t_i e^{\gamma t_i}+\frac{1}{\gamma}(1-e^{\gamma t_i})\bigg)\bigg]\nonumber\\     &+\delta_{R_i}\bigg[-\frac{e^{\beta_0+\beta_1 x_{i1}}}{\gamma}\bigg(t_{Ri} e^{\gamma t_{Ri}}\bigg(t_{Ri}-\frac{1}{\gamma}\bigg)-\frac{1}{\gamma^2}(1-e^{\gamma t_{Ri}})\bigg)     \nonumber\\     &+\frac{e^{\beta_0+\beta_1 x_{i1}}}{\gamma^2}\bigg(t_{Ri} e^{\gamma t_{Ri}}+\frac{1}{\gamma}(1-e^{\gamma t_{Ri}})\bigg)\bigg]\nonumber\\     &+\delta_{I_i}\bigg[-\frac{e^{\beta_0+\beta_1 x_{i1}}}{\gamma}\bigg(t_{Ri}^2e^{\gamma t_{Ri}}-t_{Li}^2e^{\gamma t_{Li}}-\frac{1}{\gamma}(t_{Ri}e^{\gamma t_{Ri}}-\nonumber\\     &t_{Li}e^{\gamma t_{Li}})-\frac{1}{\gamma^2}(e^{\gamma t_{Ri}}-e^{\gamma t_{Li}})\bigg)+\frac{e^{\beta_0+\beta_1 x_{i1}}}{\gamma^2}\bigg(t_{Ri} e^{\gamma t_{Ri}}-\nonumber\\     &t_{Li} e^{\gamma t_{Li}}+\frac{1}{\gamma}(e^{\gamma t_{Ri}}-e^{\gamma t_{Li}})\bigg)\bigg]\\     \nonumber     \end{align} \end{frame}


Proving that ratio of two consecutive Fibonacci numbers to converges to golden ratio by induction

$$\varphi = \frac{1 + \sqrt{5}}{2}$$  We want to prove that ratio of two consecutive Fibonacci numbers approaches $\varphi$ by induction and also utilizing Newton-Raphson method for approximating $\sqrt{5}$ as a rational number with relatively prime numerators and denominators.  Let us first define the Fibonacci Sequence and then write down what we want to prove using the symbolic notation.  $$\phi_1,\phi_2 = 1$$ $$\phi_{n+2} = \phi_{n+1} + \phi_{n}$$ $$1 \le n$$     $$n \to \infty \Rightarrow \frac{\phi_{n+1}}{\phi_{n}} \to \varphi$$   First we need rational approximations for the irrational number $\sqrt{5}$, so we can connect it up to integers:  $$x_{n} = \frac{a_{n}}{b_{n}}$$  $$x_{1} = \frac{2}{1} = \frac{a_1}{b_1}$$  Where the limit as $n$ goes to infinity is $\sqrt{5}$. So according to the Newton-Raphson method we can write that,   $$x_{n+1} = x_n - \frac{F(x_n)}{F'(x_n)} = \frac{x_n^2 + 5}{2x_n}$$  Substituting the $\frac{a_n}{b_n}$ and $\frac{a_{n+1}}{b_{n+1}}$ respectively to the places of $x_n$ and $x_{n+1}$  we will get the following rational number with integer numerator and denominator,  $$\frac{a_{n+1}}{b_{n+1}} = \frac{a_n^2 + 5b_n^2}{2a_nb_n}$$  So that  $$a_{n+1} = a_n^2 + 5b_n^2$$ $$b_{n+1} = 2a_nb_n$$  Let us define  $$\varphi_n = \frac{1 + \frac{a_n}{b_n}}{2} = \frac{a_n + b_n}{2b_n}$$  $$n \to \infty \Rightarrow \varphi_{n} \to \varphi$$  For $n = 1$ (the first case):  $$\varphi_1 = \frac{1 + \frac{2}{1}}{2} = \frac{3}{2}$$  Numerator and denominator are two consecutive Fibonacci numbers, respectively the $\phi_4$ and $\phi_3$. Now here goes our induction hypothesis for $1 \le n$:  if numerator and denominator of $\varphi_n$ are two consecutive Fibonacci numbers, respectively $\phi_{3\cdot2^{n - 1} + 1}$ and $\phi_{3\cdot2^{n - 1}}$ (as the $\phi_{4}$ and $\phi_{3}$ are), then the numerator and denominator of $\varphi_{n+1}$ will be again two consecutive Fibonacci numbers, respectively $\phi_{3\cdot2^{n} + 1}$ and $\phi_{3\cdot2^{n}}$.  $$\varphi_1 = \frac{3}{2} = \frac{\phi_4}{\phi_3} = \frac{\phi_{3\cdot2^{0} + 1}}{\phi_{3\cdot2^{0}}}$$ $$\varphi_2 = \frac{13}{8} = \frac{\phi_7}{\phi_6} = \frac{\phi_{3\cdot2^{1} + 1}}{\phi_{3\cdot2^{1}}}$$ $$\varphi_3 = \frac{233}{144} = \frac{\phi_{13}}{\phi_{12}} = \frac{\phi_{3\cdot2^{2} + 1}}{\phi_{3\cdot2^{2}}}$$ $$...$$ If we can prove that, we will be proved that ratio of two consecutive Fibonacci numbers approaches $\varphi$, of course if i have no mistake to here.  Here is our assumption:  $$\varphi_n = \frac{a_n + b_n}{2b_n} = \frac{\phi_{3\cdot2^{n - 1} + 1}}{\phi_{3\cdot2^{n - 1}}}$$  And here is what we want to prove (i rewritten and manipulated the statement  using previous definitions of $a_{n+1}$ and $b_{n+1}$):  $$\varphi_{n+1} = \frac{(a_n + b_n)^2 + (2b_n)^2 }{(2b_n)^2} = \frac{\phi_{3\cdot2^{n} + 1}}{\phi_{3\cdot2^{n}}}$$  $$\varphi_{n+1} = \varphi_{n}^2 + 1 = \frac{\phi_{3\cdot2^{n} + 1}}{\phi_{3\cdot2^{n}}}$$  It gets really cumbersome for me after this point. Anyone could please give me hints or point out my mistakes if there is?


Creating a bootable CD to install all tablet drivers

I've got a strange question here.  I'm currently installing a special version of Windows 7 on a tablet, and upon install, I obviously lose all tablet functionality such as the touch screen.  I'm also hitting a second problem, I have one USB port, and when I get to the login screen, my peripherals fail to work so I can't use either a mouse or keyboard. They work just fine in the bios.   So my only thought on how to make this work would be to somehow create a bootable CD that will install all the Windows 7 drivers. Is this possible? can anyone think of an alternative route? I can't install a different image.  Thanks!


Cannot undelete my answers when I am out of undelete votes

Trying to be helpful I have voted to reopen several questions today and so I have no more undelete votes.  The side effect of this is that I cannot undelete my answers, which is a pain when I delete them to fix and error and then want to undelete them again. I just get the message "You've reached the maximum number of 3 Undeletion votes today; come back in 6 hours"  Although I haven't checked, I would assume that as delete votes are also rate limited, the reverse is also true and you are not able to delete your answer if you have voted to delete x questions.  Given that deleting/undeleting your own questions doesn't (as far as I know) add to the limit, why is it affected by it.


Problem: Show that every nontrivial connected graph $G$ has a closed spanning walk that contains every edge of $G$ exactly twice.  My Attempt: I've tried to consider two cases. First $G$ is Eulerian, then we have a Eulerian Circuit $C$, which could simply be traversed again. Next, suppose that $G$ is not  Eulerian. In this case, consider the  graph $G$ with additional edges $(u,v)$, where $u$ and $v$ are odd vertices. Then we have a graph which has essentially all vertices of even degree and so we obtain a Eulerian Circuit $C_1$. Now we delete all the edges thata re incident with odd vertices from this graph and thus we are left another subgraph $H$ which has all even vertices giving us another circuit $C_2.$ I claim that $C_1$ and $C_2$ cover all edges twice but I can't prove it. Please help.


Effective spring constant of springs in series

When we consider the analogy of a rod as a spring while considering the combination of rods for finding the stretch we do this- Let for any rod considered as a spring  $$k=\frac{AY}{L}$$ If two rods are connected and undergo stretching due toa force.  For ex: Two connected rods hanging in series on a ceiling. The effective spring constant $k$ is found by $$\frac{1}{k1}+\frac{1}{k2}=\frac{1}{k}$$ Can you give me a proof for this.


How can I graph these figures from scratch?

Good Morning. At the moment I am new in the topic of creating graphics in latex. I know how to handle the editor on average, but I'm just getting started on this topic. I would like you to guide me on how to create graphs of this type and if they have information material that could help me, it would be very useful. Thank you very much.


Ubuntu, windows 8 korora , need help with my Lenovo yoga 2

Ok, so I got this laptop from a friend, wen I turn it on it asks for a password, for an account with username: Nobuntu , or the guest account. Well I cannot log in to this Nobuntu account because I do not have the password and I need it in-order to make any updates, installs, anything. Please help me! Ive tried holding down the shift at boot up iv we tried fn. F8 I cannot figure it out , i am no computer wiz


Particles not view in preview render or render view

With the mesh selected i have a png image. I want my image facing the camera view. Im not animating. Just want my image to focus camera. I tried the particles setting. In the sold view i can see my png image.  (with the object option its visible.  with the billboard options its invisible)    When i tried to render or preview render i cannnot see my png image. Any suggestion or help. Thanks


WhatsApp group messages are not in order

For the past 3 days, my WhatsApp group messages are not getting downloaded (when I switch on WiFi) in order of time. Rather, it looks like they are grouped as per contacts. I looked into this site, and as suggested, tried the following:   Change your phone to use "Automatic Date and Time": didn't help Reinstall WhatsApp: didn't help Checked the WiFi connection: no issue with the WiFi, web is running perfectly in the same phone Removed unnecessary apps which might delay things by totally resetting my phone to factory default, then reinstall WhatsApp: didn't help   What else should I do?


Bufferedreader throws NullPointerException inside of a loop

My code is supposed to read a file line by line, to put each one in a string array named: tuples, (tuples=ligne.split(" "); ) and then add this tuples to an arraylist, one line read = one element of the arraylist. Unfortunately, my code doesn't work! My buffered reader throws a   NullPointerException in my loop!  Error returned in the ExtractFile() method, line 120: tuples= ligne.split(" ");  File file = new File("Department.txt");  BufferedReader in; PrintWriter out; String ligne; int nbCols; //number of metadatas in my file.txt    String metadata[] = new String[nbCols]; String[] tuples = new String[nbCols];//1ere case indique num ligne  ArrayList<String[]> itemset = new ArrayList<String[]>();  public ArrayList ExtractionFile () {     try {         int i = 1;         in = new BufferedReader(new FileReader(file));         while ((ligne = in.readLine()) != null) {             while (ligne.charAt(0) != '1') {                 ligne = in.readLine();//browse until line 1 is found             }             tuples = ligne.split(" ");             itemset.add(tuples);             System.out.println(Arrays.toString(itemset.get(0)));             for (i = 2; i < TuplesCount(); i++) {                 ligne = in.readLine();                 tuples = ligne.split(" ");// THIS LINE THROWS THE EXCEPTION                 itemset.add(tuples);                 System.out.println(Arrays.toString(itemset.get(i)));             }         }     } catch (IOException es) {         es.printStackTrace();     } catch (ArrayIndexOutOfBoundsException exepti) {         exepti.printStackTrace();     }     return itemset; }


So as I know the Slice string looking the strings or the integers but here I don't know why exactly I've got that parameter [:-4]. What exactly the python looks, in order to execute the fireDamage Why I need that parameter while I have the path. import arcpy   arcpy.env.overwriteOutput = True   arcpy.env.workspace = 'C:/gispy/data/ch06'   outDir = 'C:/gispy/scratch/'   fireDamage = 'special_regions.shp'   fireBuffer = outDir + fireDamage[:-4] + 'Buffer.shp'   bufferDist = '1 mile'  park = 'park.shp'   clipOutput = outDir + park[:-4] + 'DamageBuffer.shp'   arcpy.Buffer_analysis(fireDamage, fireBuffer,bufferDist)   print '{0} created.'.format(fireBuffer)   arcpy.Clip_analysis(park, fireBuffer, clipOutput)   print '{0} created.'.format(clipOutput)


Why would a static nested interface be used in Java?

I have just found a static nested interface in our code-base.  class Foo {     public static interface Bar {         /* snip */     }     /* snip */ }   I have never seen this before. The original developer is out of reach. Therefore I have to ask SO:  What are the semantics behind a static interface? What would change, if I remove the static? Why would anyone do this?


I've got a VM with 16gb of memory and recently it's been using some of the swap space.  At first I thought this was because it was using all the memory but then I read some articles about the Cached Memory and how the Linux Kernel uses extra memory for caching.  Checked that and saw that I've got about 13gb being allocated to caching.  I haven't been able to find any answers though as to why swap is being used.  Shouldn't the kernel use memory that is being used as Memory Cache space before it starts using swap space?    Thanks for linking me to that other question, didn't find that for some reason before.


Exploring something completely new, even silly.

As it were, I finally dreamed up a direction to explore and write something about, but just like every other time, I noticed someone senior has written has already explored the line of thought. In Physics, it seems as if there is practically nothing novel that I can explore. I know in part that may be it is just that I am not able to think fast enough.  If I am thinking about exploring something, and realize someone has already explored it, then decide to completely independently explore it without reading their work, and arrive at something similar or different, is this something that I can still put out there with my name? The thing is I have not written anything yet and have no reputation, and so I am hoping that I can put something may be simple but hopefully different and a bit new, even if it is silly. The problem is that as far as I can tell and after trying for a bit, it is looking like the chances of me doing something not completely explored might be even lower than I thought.  I am a serious scholar though not in any program at the moment, and have quite a bit of time. Any suggestions as to what the right approach is would be great.


I am a beginner in 2D animation . Would be grateful if somebody guide me how to animate change of shapes, eg from square to circle. Thanks !


I need explanation for the below questions:   What is reflection in java? In which situation i need to use reflection? Real time scenarios and examples for the need of using reflection?   I am very confused in reflection. I had read a lot of documents but I am still confused. Please give me a explanation where I can understand it completely.


Prevent deletion of folder by accidentally moving or deleting parent folder that has no immutable attribute

In the PARENT_FOLDER I store subfolders with some works I am producing each week, e.g. right now I have these contents: ~/PARENT_FOLDER/StuffProducedTwoWeeksAgo/... ~/PARENT_FOLDER/StuffProducedLastWeek/...  Each week I add a new folder with the work I have done (video editing, whatever) which I want to keep at hand and readable inside ~/PARENT_FOLDER/ but I don't want it accidentally erased, so after I copy a new folder inside ~/PARENT_FOLDER/, I will do chattr +i -R StuffProducedThisWeek  I don't want to chattr +i ~/PARENT_FOLDER  because I still want to copy, create or delete new stuff inside it freely. But I want certain things (those folders called Stuff*) inside there to be secure against deletion. After setting the +i attribute to ~/PARENT_FOLDER/StuffProducedThisWeek it seems I cannot delete or modify it from inside ~/PARENT_FOLDER/, and in the file browser its icon appears with a small lock. But then I can go up one level and simply move to the trash ~/PARENT_FOLDER with an accidental hit to the Delete key that goes unnoticed and the next day I can empty the trash and my work is lost forever. So, I want to be able to modify the contents of ~/PARENT_FOLDER/ except those subfolders marked with the +i attribute but, if I accidetally try to move or delete ~/PARENT_FOLDER/, I would like the OS to prevent me from doing that in order to protect the immutable subfolders. How is that possible?


Given the language $L=\{w\in\{a,b\}^*\mid\text{$w$ has an odd quantity of $a$ and even quantity of $b$}\}$ answer

Find a finite automaton that recognizes the language $$L=\{w\in\{a,b\}^*\mid\text{$w$ has an odd quantity of $a$ and an even quantity of $b$}\}.$$ Indicate whether the automata is deterministic or not.     I tried to find a regular expression for $L$: $$(a(aa)^*+(bb)^*)^*$$ but then I realized that $\lambda\notin L$ since there is not odd quantity of $a$, so my final regex is $$(a(aa)^*+(bb)^*)^+$$ I am not able to find an automata for this language. I tried with:    but if we call $z=a(aa)^*+(bb)^*$ then I am not able to graph $z^+$.  How can we get the automata?


How i solve this?  I have not idea how to approach this differential equation.  y′−∫x0y(t)dt=2   I get the probably familiar DE: y′′−y=0.   please someone can solve this exercise


How can I tell if these pipes are gas lines or water lines?

I recently moved into an in-law unit of a large old house.  In the kitchen, there are two pipes coming out of the wall (one protruding out a little more than the other).  I had assumed they were gas lines to connect my stove.  But since the stove only connects to one pipe, I'm now wondering if they're actually water lines. Can anyone explain how I can tell the difference? On the other side of the wall is a large closet with the air conditioning system, water heater, and what I think is the gas shutoff valve.


Let's say I have a string like this:  $css = '.class {     color: red; }  /* Start Comment */ .replace {     content: "me"; } /* End Comment */';   How can I remove everything inside the comment, including the comment itself?  I want this result:  .class {     color: red; }   I've tried something like this, but it doesn't do it:  $css = preg_replace( '#(/* Start Comment */).*?(/* End Comment */)#', '', $css );   I've also tried this:   Am I missing something ridiculously obvious here?  Really appreciate any feedback - regex is something I need to study further.


Can you make a custom mouse cursor for the game engine?

I would like the mouse to have a custom look like most games and not just the default white.  Is there a way I can make an object as the mouse?


'In any case, follow the guideline "prefer ++i over i++" and you won't go wrong.' What is the reason behind this in C?

I had come across  answer to  question. In one of the line, the author mention's:     In any case, follow the guideline "prefer ++i over i++" and you won't go wrong.   I know that ++i is slightly faster than i++, but thought that there is no reason for them to go wrong. I searched for a while, and the closest I could get to was . It explained clearly that why is it preferred to use ++i, but not still how could you go wrong using i++.  So can anyone tell me how can i++ go wrong?    NOTE: My question isn't a dupe, as I am not asking about the performance. I have already seen that question. I am asking how can i++ be wrong as mentioned in the answer I have mentioned above.


Getting a combined variance, given two variances

I'm getting two error variance values from two third-party sensors, and need to multiply these variances with the position state estimates of the target they're tracking. Once that's done, the combined variance has to be sent back to the sensors.    The problem here is, how to get a combined variance? Obviously (variance1 + variance2)/2 won't work. Is there no practical way to calculate the combined variance if the mean and sample values aren't known?


Real Analysis, Folland Problem 1.3.15 Measures

Given a measure $\mu$ on $(X,M)$, define $\mu_0$ on $M$ by $$\mu_0(E) = \sup\{\mu(F): F\subset E \ \text{and} \ \mu(F) < \infty\}$$ a.) $\mu_0$ is a semifinite measure. It is called the semifinite part of $\mu$. b.) If $\mu$ is semifinite, then $\mu = \mu_0$ (Use Exercise 14) c.) There is a measure $\nu$ on $M$ (in general, not unique) which assumes only the values of $0$ and $\infty$ such that $\mu = \mu_0 + \nu$.  The proof of Exercise 14 can be found  For a.) I believe we need to show that $\mu_0(E) = \infty$. Perhaps we can do this by proof of contradiction, similarly to what the proof in the link above does (actually it seems identical). For b.) I am not sure how we can show $\mu = \mu_0$ I think maybe we have to show by construction that $\mu \leq \mu_0$ and $\mu \geq \mu_0$ For c.) I haven't any idea for. Any suggestions is greatly appreciated.


The plan to produce the Kwisatz Haderach was that all Bene Gesserit would have daughters only, until the time was ready (and we know that Jessica Atreides disobeyed). All this stems from the idea of the Bene Gesserit choosing the gender of their offspring. How are they able to do that? Jessica gave birth before taking the spice, if I remember correctly, so, how is she able to decide she will have a son? Is that ever established?


Relative clause - "...one of those people who make” or “makes"?

Which one is correct?     He is not one of those people who make/makes you angry    Does "make" refer to  "one"? Is there a  possibility that "make" refers to "people"?  Can it be something relative?


First order theory - define a domain with an even number of elements

I'm trying to write a first-order theory that defines a domain of even size (containing an even number of elements). I'm told that I can use a single binary predicate symbol, R, that can be defined as I see fit. I can also assume that infinite sets are "even size".  What I've come up with is the following:  $$∀x\ ∀y\ ∃z\ (R(x,y) ↔ R(z,y))$$  where R(x,y) means x is less than y.  However, after looking at this more closely, it seems that all I'm saying is that each element has an immediate successor. How can I modify this to explicitly say that for every element, there is exactly one element following it? I'm struggling to see how I can state that the pattern continues on the element after that, rather than linking all elements in one chain.  Any help would be appreciated. Thanks!


How can to get forgotten username on Debian?

I have a Debian desktop. On last time, I had updated/upgraded. Now I cannot login (maybe I forgotten username). I cannot login to root too. It seems that we cannot login with root (we just can switch to root). I can make sure about the password. How can I retrieve the username? Thanks! (There are no GUI to login here after update, just a black screen asking for username/password)


How to import files/modules from other directory in python?

I want to import some files/modules from other directory. I have placed an init.py in the directory but still not able to import the files/modules. I am using Pycharm 2019.  I want to use init.py only method and not the sys.path.append.  thanks in Advance!


For $n\in\mathbb{N}^*$, define $a_n=\left(1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}\right)/n$. Does the sequence $(a_n)$ converge and how to prove it?


I have the following table, In the present table we have data inserted manually like shown below but now I want to insert latest cola values into table. create table tbTest (     cola bigserial not null primary key,     colb varchar(10) );  insert into tbTest(cola,colb) values(1,'A'); insert into tbTest(cola,colb) values(2,'B'); insert into tbTest(cola,colb) values(3,'C'); insert into tbTest(cola,colb) values(4,'D'); insert into tbTest(cola,colb) values(5,'E'); insert into tbTest(cola,colb) values(6,'F');  Now I want insert only column colb values and let serial column calculate next value by self: Try 1: insert into tbTest(colb) values('G')  Error: SQL Error [23505]: ERROR: duplicate key value violates unique constraint "tbtest_pkey" Detail: Key (cola)=(1) already exists. Try 2: insert into tbTest(cola,colb) values(nextval('tbtest_cola_seq'),'G')  Error: SQL Error [23505]: ERROR: duplicate key value violates unique constraint "tbtest_pkey" Detail: Key (cola)=(2) already exists. Try 3: insert into tbTest(cola,colb) values(currval('tbtest_cola_seq')+1,'G');  Error: SQL Error [23505]: ERROR: duplicate key value violates unique constraint "tbtest_pkey" Detail: Key (cola)=(3) already exists.


Quantum entanglement faster than speed of light?

recently i was watching a  on quantum computing where the narrators describes that quantum entanglement information travels faster than light!  Is it really possible for anything to move faster than light? Or are the narrators just wrong?  Regards,


She certainly has gone up or she has certainly gone up

She (certainly has or has certainly) gone up in my estimation since she told the manager what she thought of him.  Should 'certainly' be used before or after 'has'?


How to install 'precise' linux-image package from livecd after I accidentally deleted all kernels?

I had some strange issues installing sudo apt-get install linux-image-server and for some reason apt-get was trying to install two different versions of the kenrel, the real issue was that I removed the previous kernel.  The PC got rebooted (I work with two PC's with KVM, pressed Alt + Ctrl + Del while thinking I was in windows getting Ubuntu to reset itself) and walla! I have only meme test in grub, great...  Any idea how I can install a kernel image using liveCD and apt-get ? or am I better with downloading what I need from Ubuntu package site and then how do I use dpkg to install it with a liveCD on my local machine ? Somehow chroot to it from the live CD ?


How was the Cloak of Invisibility Created?

I know the tale of the three brothers but does anyone know any convincing theories on how Ignotus Peverell created it?


From Drupal 8 beta 6 (released today), I have this error :     Error message UnexpectedValueException: Untrusted Host "localhost" in   Symfony\Component\HttpFoundation\Request->getHost() (line 1221 of   core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php).   I use this local url to call my site:   Inside my setting file, I have:       $settings['trusted_host_patterns'] = array(         'theming\.dev$',      );   Note, this error is displayed only when I uncomment this lines:   if (file_exists(__DIR__ . '/settings.local.php')) {    include __DIR__ . '/settings.local.php';  }   What is the problem please ? Thanks.


What is the best way to contact a moderator about a user?

I suspect a user is cheating. He's cheated in the past but I don't want to get into it here. Instead I want to contact a moderator about this. What is the best way to go about this? Should I send an email to the SO team or flag a post in question? Though it isn't about any one post but instead a pattern of behavior. I want to provide some fairly detailed findings, at least the best findings a regular user can provide. Also, do moderators have the ability to look into who is casting votes?


Unmet Dependencies after failed BURG Installation on Ubuntu 20.04

I am completely new to Linux. I just installed Ubunt 20.04 LTS. I tried to install BURG on my Ubuntu but then it failed (I tried it several times). Now I keep getting this error for most of the thingss I try to do with using the termnal. Error is displayed below: nana@nana-HP:~$ apt list –installed E: Type '“deb' is not known on line 55 in source list /etc/apt/sources.list E: The list of sources could not be read. nana@nana-HP:~$   This notification is also on my screen even after restart.  Thanks!


What five odd integers have a sum of $30$?

I've been asked the following question:  What five odd integers from the set  $\{1, 3, 5, 7, 9, 11, 13, 15\}$ that when summed together equals to $30$? Note that any integer can be used more than once.   If my limited knowledge of maths is correct, there should be no answer, as no odd number of odd integers summed together can give an even number.


Unable to copy content to SanDisk 16GB pen drive

I have SanDisk Cruzer 16GB Pen drive. Certainly, I am unable to copy any data into it (You feel that this question is duplicate. but, my situation is different.). It throws an error message as     This device is write protected.   I have googled and found two possible solutions such as,   Use DISKPART to remove this error. Add attribute in RegEdit...   In my case, both of the solution doesn't help me. And also, I have noticed when I ran DISKPART as: my pen drive is in Current Read-only state: yes not Read-Only: yes.  Could any one please help me to resolve this?


I tried to invoke images from url async method. It produces Out of memory error on do in background. My code is below  Code:  class DownloadAsyncTask extends AsyncTask<ViewHolder1, Void, ViewHolder1> {      @Override     protected ViewHolder1 doInBackground(ViewHolder1... params) {         // TODO Auto-generated method stub         // load image directly         ViewHolder1 viewHolder = params[0];         try {             String url = viewHolder.imageURL.replace(" ", "%20");             URL imageURL = new URL(url);             Log.v("Image Url", viewHolder.imageURL);             viewHolder.bitmap = BitmapFactory.decodeStream(imageURL.openStream());         } catch (IOException e) {             // TODO: handle exception             Log.e("error", "Downloading Image Failed");             viewHolder.bitmap = null;         }          return viewHolder;     }      @Override     protected void onPostExecute(ViewHolder1 result) {           // TODO Auto-generated method stub         Log.v("Result bitmap", String.valueOf(result.bitmap));         if (result.bitmap == null) {             result.frndthumb_image                     .setImageResource(R.drawable.avatar_image);         } else {             result.frndthumb_image.setImageBitmap(result.bitmap);         }     } }   Error code:  03-13 13:40:34.170: E/AndroidRuntime(1919): FATAL EXCEPTION: AsyncTask #3 03-13 13:40:34.170: E/AndroidRuntime(1919): java.lang.RuntimeException: An error occured while executing doInBackground() 03-13 13:40:34.170: E/AndroidRuntime(1919):     at android.os.AsyncTask$3.done(AsyncTask.java:278) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at java.util.concurrent.FutureTask.setException(FutureTask.java:124) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at java.util.concurrent.FutureTask.run(FutureTask.java:137) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at java.lang.Thread.run(Thread.java:856) 03-13 13:40:34.170: E/AndroidRuntime(1919): Caused by: java.lang.OutOfMemoryError 03-13 13:40:34.170: E/AndroidRuntime(1919):     at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:493) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:549) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at com.arrichion.userservices.ChallengesAdapter$DownloadAsyncTask.doInBackground(ChallengesAdapter.java:133) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at com.arrichion.userservices.ChallengesAdapter$DownloadAsyncTask.doInBackground(ChallengesAdapter.java:1) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at android.os.AsyncTask$2.call(AsyncTask.java:264) 03-13 13:40:34.170: E/AndroidRuntime(1919):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) 03-13 13:40:34.170: E/AndroidRuntime(1919):     ... 4 more


Problems installing ubuntu - any version

I'm new to Linux so I may ask some simple or stupid questions.  I want to set up a file & web server. Can this be done on the same machine or do I need to have separate machines?  I have downloaded both the desktop ISO & Server ISO versions but cannot get either one to install correctly.  I have created a bootable CD of the server version.   During installation I am asked to select country / keyboard & language, then get an error that the CD cannot be mounted.  Why is it trying to mount the CD? and does this mean I need to have a CD burner in my machine?  The machine has clean / wiped & formatted HDD so no conflicts with any other op sys or software.  Starting to pull my hair out as I have been trying to install for a week now.  When trying to create a bootable CD of the desktop version it failed as it is 707mb and a CD is only 700MB.  My system is 32x Dual P3 processors and 512mb ram 160gb HDD. This is my test system prior to reconfiguring an existing windows machine.  Suggestions / advice please.  Thanks.


How to ban a incoming number on Android 2.3

How could I ban a incoming number?  What is the sequence of menu actions I should follow to get an appropriate menu if any and where to find help documentation on Android user interfaces? I have searched in the net but I'd unable to find any.  I have android 2.3 operating system on my ARM qualcomm 7225a application processor.


Show that the measure is absolutely continuous w.r.t Lebesgue measure

Let $\mu$ be a measure on Borel-sigma algebra on $[0,1]$ which has the property that for every $f$ continuously differentiable, we have   $$ \bigg| \int f' \ d\mu \bigg| \leq  \left (\int_{0}^{1} f(x)^2 \ dx \right )^{1/2} $$  Then prove that :   (i) $\mu$ is absolutely continuous w.r.t Lebesgue measure on $[0,1]$.  (ii) If $g$ is the Radon-Nikodym derivative of $\mu$ w.r.t Lebesgue measure, then there exists a constant $c$ such that $$ |g(x)-g(y)| \leq c |x-y|^{1/2} $$  Can anyone help me with this ? I am unable to proceed in any fruitful direction.  If I have $m(A)=0$, who do I use the above condition to show $\mu(A)=0$ ? All I have is an integral over $[0,1]$.


Is a divorce buy-out of a house a taxable event?

To be clear, this is a question about US Federal Taxes, and I live in Virginia, which is an equitable property (not community property) state.  Additionally, I understand this is not a legal forum wherein I can get legal advice.  I just want the general idea, so that when I go to my lawyer and/or accountant, I have an idea of what to expect.  So, my soon-to-be ex-wife and I have an exceedingly expensive house with a lot of equity in it.  As part of the divorce settlement, I am going to be bought out of my share of the equity.  The question is, is this payout taxable income, or just a redistribution of my portfolio?  I'm assuming that in many ways, the buyout would be treated as if I were selling the house, but the happiest answer I could receive is, "No - it's not."  So, what's the deal then - is a buyout a sale subject to capital gains, or is it just a reshuffling of assets?


Are there any pieces of software available on Ubuntu for the conversion of a series of image files into an animated gif file?

Before you mention this question  I would like to say I'm a total noob when it comes to ubuntu (I know I have 1375 rep but I have since gone back to Windows and have only just now returned and my memory is very fussy) and ImageMagick doesn't seem to have a convert tool any more. I'm used to using PhotoScape on Windows and I rather like its set up so if anyone knows an alternative on Ubuntu that's similar that'd be much appreciated.


I have a very nice and expensive mechanical keyboard. It was designed for a PC and not a Mac.  How do I set up the mapping, so it works like I am used to. For example, I want the Ctrl key on the PC keyboard to act like the Command key on the Mac, so when I press Ctrl-C to Copy, I get the action I am used to.


I want when 5V input is available the battery to start charging and disconnect from output. Also when 5V is not present battery be connected to the output load. Will this idea will work? Can I use 10k for R-Pull?


Compute the following limit: $\lim\limits_{n\to \infty}2n \int \limits_0^1\dfrac{x^{n-1}}{1+x}\,dx.$   The value is 1. I have done this by squeezing it. Is there any other way to evaluate this ?


Indian citizen transiting in Dubai, is a transit visa required?

I am an Indian citizen travelling to Muscat from USA via Dubai. To Dubai by United Airlines via Zurich. Six hours later from Dubai by flydubai.    Since it is a separate booking, do I require a transit visa for Dubai?


What is the best algorithm for overriding GetHashCode?

In .NET, the  is used in a lot of places throughout the .NET base class libraries. Implementing it properly is especially important to find items quickly in a collection or when determining equality.  Is there a standard algorithm or best practice on how to implement GetHashCode for my custom classes so I don't degrade performance?


Java Android precision loss when adding Doubles

When I run this code:    Double test = (23.1d + 0.1d);   Log.i(Constants.TAG, "Test: " + test);   I get:   Test: 23.200000000000003   I need to add values that will at most have two decimals. For example 19.99 + 0.1 =20.09, how can I do it so that precision is not lost?


I recently Installed Ubuntu 18.10 and downloaded gnome-tweaks to customise. I used it for a while and had disabled the icons on the desktop with this tool, but when I wanted to activate them again, I did not see the desktop options in tweaks.  So I could no longer retrieve my Icons on the desktop. Could someone help me recover them? I use Gnome 3.30


Are the following conditional expressions / commands do same in bash scripting for string comparison?  if [[ "str1" == "str2" ]] if [[ "str1" = "str2" ]] if [ "str1" == "str2" ] if [ "str1" = "str2" ]


Why Java's Collection.contains() use 'Object o' as the parameter, unlike Collection.add() which uses the generic E?  This gives rise to potential mistakes like  HashSet<Integer> hash = new HashSet(); hash.contains(1.42); //will always be false


Clarity on implication when p is not true.

"Again, we may put all this together to conclude that our program outputs a boolean value if supplied with an integer input. However, it is important to realise that the presence of $p$ is absolutely essential for the inference to happen. For example, our program might well satisfy $p → q$, but if it doesn’t satisfy $p$ – e.g. if its input is a surname – then we will not be able to derive $q$."   This is text from the book Logic in Computer Science by M. Huth and M. Ryan (page 9).   The second line in the paragraph necessiates the need for p being true, however, the truth table of Implication mentions one case where p is false, but q is true, and the resultant implication is true. How could that be when p is false?


What is meant by "joint likelihood function" in this context?

I have two Binomial distributed random variables. $$X_1\sim\text{Bi}\left(50,\theta_1\right)$$ $$X_2\sim\text{Bi}\left(50,\theta_2\right)$$ I sample from each distribution. $$X_1=x_1=15$$ $$X_2=x_2=26$$ Question  formulate the joint likelihood function using the given information  I am curious to know what a joint likelihood function is? Attempt 1 In this attempt I calculated the likelihood for each observation separately and multiplied them together. I am curious to know if I am on the right track?  First likelihood $$L\left(X_1=x_1|\theta_1,n\right)= {n\choose x_1}\theta_{1}^{x_1}(1-\theta_1)^{n-x_1} $$ $$n=50,x_1=15$$ $$L\left(X_1=15|\theta_1,n\right)= {50\choose 15}\theta_{1}^{15}(1-\theta_1)^{50-15} $$ $$L\left(X_1=15|\theta_1,n\right)= (2250829575120) \theta_{1}^{15}(1-\theta_1)^{35} $$  similarly, the second likelihood is: $$L\left(X_2=26|\theta_2,n\right)= {50\choose 26}\theta_{2}^{26}(1-\theta_2)^{50-26} $$  Is the joint likelihood their product? $$L_{\text{joint}}=L\left(X_1=15|\theta_1,n\right)\times L\left(X_2=26|\theta_2,n\right)$$  Further context This is from a question in a 2nd year undergraduate statistics course which I am struggling with.


Microphone is not working in Ubuntu 14.04.04 LTS

Microphone is not working in my Ubuntu 14.04.4 LTS. I've tried a bunch of ways that I picked from internet. alsamixer seems not updating the mic volume I've increased and is always zero on each reboot.    in the above screenshot Internal Mic Boost seems to zero on every reboot.  I've installed pavucontrol. There it seems internal microphone as unavailable. Microphone Plugged In is default selected option even I'm not using any other input devices.  In gstreamer-properties, the following are the configuration      Default Input    Plugin - Custom Device -  None Pipeline - autoaudiosrc   I've re-installed (twice) alsa and pulse-audio and other related sound libraries. I've disabled 'Allow Skype to automatically adjust my mixer levels'. Installed Audacity, and also some tweaks in alsa-base.conf, still could not resolve the issue.  I'm using Asus Zenbook UX305.


I want a solenoid that stays retracted and propels forward when current is passed through it. Is there a solenoid that does this? What is the difference between push and pull solenoid?


Can 'who' refer to an inanimate object such as a government body?

I'm wondering if it is possible to use 'who' in a sentence like this: 'the name of the government body who has assigned an identification number to the document.'


What to do when I want to improve a locked post?

The locked and closed question  has an  that contains an anti-pattern, .  I tried to edit and to comment, which both did not work, as this is a . Yet, it would be nice if it could avoid advertising anti-patterns.  Is there any way to amend the answer, or any alternative?


FFMPEG - Create a slideshow video from images in a directory, sorted alphabetically

I see  on how to do this with images numerically. But I have a directory of images that look like this for example:  ADAM SANDLER.jpg JOHN DOE.jpg SAM SMITH.jpg   I want to create a video slideshow from all of the images in this directory, sorted alphabetically.  Is there any way to do this?  EDIT  In the end, I'm trying to create a vertical video to post on Instagram. These photos are portraits so it will need to be a "vertical" video. It seems FFMPEG is having issues with this, at least playing the video in Quicktime doesn't seem to be working. It needs to be a 15 second video, and there are 25 images.  This is the command I'm running, and it's just appearing black when I open it in Quicktime. When I open in VLC it's playing but only shows the first couple frames.  ffmpeg -r 1 -i img%03d.jpg -c:v libx264 -pix_fmt yuv420p out.mp4


Two different ways of create a delegate instance?

using System;   delegate void D(int x);   class C  {     public static void M1(int i) {      Console.WriteLine("C.M1: " + i);     }  }    D cd1 = new D(C.M1);   D cd2 = C.M1;   Delegate instances cd1 and cd2  are created differently above.  Are they equivalent?   If not, what differences are between them?  Thanks.


Find the index on 1 in binary number of zeros

I have a set of binary numbers (originally was hex's) that I want to find the index of 1 in it. These sets are :  1000, index = 3 0100, index = 2 0010, index = 1 0001, index = 0   I can't wrap my head around it, I tried getting the decimal representation and do some math magic with it to turn it into 0, 1, 2, 3 but no clue.


Finding local IP addresses using Python's stdlib

How can I find local IP addresses (i.e. 192.168.x.x or 10.0.x.x) in Python platform independently and using only the standard library?


Where can I ask a question about setting up a WordPress blog?

I thought I was supposed to use WordPress Dev. But I got two ticks from the users there that I shouldn't ask my questions there.


$1+2+3+4+5+..... = -\frac{1}{12}$. Is there any intuition for this?

I was looking into a Numberphile video . The guy says he was unable to find an intuition. Does there exist one? Is the premise, $1-1+1-1+...=\frac{1}{2}$, reasonable mathematically?


I am trying to create points inside a console window based on a 80x49 grid. But I am getting stuck on the basic idea. My thought was to first of all print out spaces on the entire page so that later, when my method Draw() is called, it replaces a space with a character of choosing. Keep in mind that the application should be able to print out new points on the same "canvas" again and again. Say that we first print a * at 4,5 and then a * at 4,7 . I am guessing SetCursorPos wouldn't work?


How to insert the "X is a subset of Y, but is not equal to Y" symbol?

How can I insert the "X is a subset of Y, but is not equal to Y" symbol? I have tried using $\subsetneq$, as in $X \subsetneq Y$, but this yields the error message:  Undefined control sequence.   There is no problem using $\subseteq$.  Code:  \title{Subset-Not-Equal-To} \author{} \date{}  \documentclass[8pt]{article}  \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm}  \begin{document} \maketitle  $X \subsetneq Y$ \end{document}


I am learning Javascript with codecademy, and I was doing some comparisons, and for my code I did:  `console.log(1 == 2)`   and it returned False.  I also did:  `console.log(2*2 === 3)`   and that also returned False. To check that I have not made a mistake, I did:  `console.log(1 == 1)`   and that returned True The instructions tell me that === means equal to.  Are there any problems with using == instead of ===? And, which is better to use and why?  Thanks for any help you can give me!