How to apply a glass shader on my imported geometry?

I'm new to Blender so I'm doing all my modelling in Maya and transfer to Blender using wavefront obj. I have create a simple wine glas, no texture applied, just geometry. I can apply color to it but when I increase the transmission value nothing happens.  Do I need to import my .mtl file? Tried to unwrap the UV's as well.


Hopefully, this is not a duplicate question. I tried searching for answers before posting, but I'm pretty new to Linux and I couldn't find anything that I could understand. I might need some ELI5 help.  I'm running Ubuntu 16.04. I've got a full boot drive. I determined that it's because there are A LOT of extra kernels that I really don't need.     The thing is, when I try to remove the oldest (I think it's the oldest. It's the one with the lowest number) using:  sudo apt-get autoremove linux-image-4.4.0-31-generic   This error is thrown multiple times:  gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-4.4.0-75-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-4.4.0-75-generic (--remove):  subprocess installed post-removal script returned error exit status 1 Removing linux-image-extra-4.4.0-92-generic (4.4.0-92.115) ... depmod: FATAL: could not load /boot/System.map-4.4.0-92-generic: No such file or directory run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-92-generic /boot/vmlinuz-4.4.0-92-generic run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-92-generic /boot/vmlinuz-4.4.0-92-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-92-generic /boot/vmlinuz-4.4.0-92-generic update-initramfs: Generating /boot/initrd.img-4.4.0-92-generic depmod: WARNING: could not open /var/tmp/mkinitramfs_AjLDSQ/lib/modules/4.4.0-92-generic/modules.order: No such file or directory depmod: WARNING: could not open /var/tmp/mkinitramfs_AjLDSQ/lib/modules/4.4.0-92-generic/modules.builtin: No such file or directory   I'm not sure if I'm reading this right, but I think it's saying that I need more space in order to clear up space. I have no idea what to do. Please help me.   I'm sure anyone wanting to help me will need more information. Please let me know if you do. I'm just sorry I can't anticipate them.  And thank you!


Can I create an if / else statement which compares variable type of user input in Python 2.7?

I was trying to make a simple Python program which gets a user input through the variable "user_input" and then it determines the variable type through the function "type()." Here is a sample of the code:  user_input = raw_input('Enter something: ') if type(user_input) == 'int':     print "integer" elif type(user_input) == 'str':     print "string"   So you see, the code prompts the user to type down something, and if what they type down is an integer, it will print "integer" and if the input is a string type, it will print "string". The code does execute without an error message, but when I type down either a string value or an integer, it prints nothing, no spaces, no messages, N-O-T-H-I-N-G. Here is an example:   >>> Enter something: hello >>>   So since it is not working, I have to ask, is it possible for Python to even compare variable types of a user input and then go through an if / else statement?


Induction Proof for $F_{2n} = F^2_{n+1} - F^2_{n-1}$

As stated in the tag, I'm trying to prove by induction the claim $F_{2n} = F^2_{n+1} - F^2_{n-1}$, where $F_{n}$ is the $n^{th}$ Fibonacci number. I've spent hours on the inductive step without substantial progress, and am hoping someone can provide a path to the desired result.    To facilitate the proof, we're given $F_{2n-1} = F^2_{n} + F^2_{n-1}$  (Also, in various past attempts not reflected here I tried to use the following substitutions whenever it seemed prudent: $F_{n} = F_{n-1} + F_{n-2} = F_{n+1} - F_{n-1}$; and $(x^{2} - y^{2}) = (x - y)(x + y)$).  For the inductive step, let $n\geq 1$ and assume $F_{2n} = F^2_{n+1} - F^2_{n-1}$. For $n+1$ we want to show $F_{2(n+1)} = F^2_{n+2} - F^2_{n}$. So  \begin{align}   F_{2(n+1)} &= F_{2n + 2} \\              &= F_{2n+1} + F_{2n} \\              &= (F_{2n} + F_{2n-1}) + F_{2n} \\              &= 2 F_{2n} + F_{2n - 1} \\              &= 2 (F^2_{n+1} - F^2_{n-1})                   + F^2_{n} + F^2_{n-1}                       &&\text{by the inductive hypothesis} \tag{1} \\              &=...F^2_{n+2} - F^2_{n}                      \end{align} I have two challenges.  The first is squeezing $-2 F^2_{n}$ out of (1).  The only reasonable way I can see to do that is to expand the $-F^2_{n-1}$ term in  $2 F^2_{n+1} - F^2_{n-1}$ to $-(F_{n} - F_{n-2})^2$. If in instead I combine it with $F^2_{n-1}$ then it seems impossible to generate the $-2 F^2_{n}$ term needed to offset $F^2_{n}$ and produce $-F^2_{n}$.   The second challenge is to find $(F^2_{n+2}$ in (1), and the only way I can see to do that is to expand the $F^2_{n+1}$ term in $2(F^2_{n+1} - F^2_{n-1})$to $(F_{n+2} - F_{n})^2$. Doing that not only generates $2 F^2_{n}$ which totally screws things up, but it also generates a bunch of intermediate terms I can't get rid of, and it's driving me crazy.


If $\Sigma \vdash \varphi$ then $\Sigma \vdash \forall x \varphi$. Why when $(\varphi \implies \forall x \varphi)$ is not true?

In the book of first order logic I'm reading they say that if $(\varphi_1,...,\varphi_n)$ is a proof from a set of formulae $\Sigma$, then so is $(\varphi_1,...,\varphi_n,\forall x \varphi_j)$ for all $1\leq j \leq n$. They assume that as an axiom but it doesn't make sense to me. Why if $\varphi$ is true then so is $\forall x \varphi$? For example if $\varphi$ is $x=1$ that wouldn't mean that $\forall x : x=1$ , or would it?  Maybe what I don't understand is: why $(\Sigma \vdash \varphi \implies \Sigma \vdash \forall x \varphi)$ is true but $(\varphi \implies \forall x \varphi)$ is not true?  The book is this:


Also duplicate of      Basically, what I am trying to do is :  struct A {     virtual ~A() {}     virtual int bar() = 0; };  struct B {     int bar() {return 1;} };  struct C {     int bar() {return 2;} };   struct D {     template <class T>     static int foo() {         T a;         return a.bar();     } };   template<class T, class U> int callFoo() {     return T::foo<U> (); ///error: expected primary-expression before '>' token }   int main(int argc, char** argv) {         std::cout << D::foo<B>() << std::endl; //This works of course         std::cout << D::foo<C>() << std::endl; //This works of course         std::cout << callFoo<D,B>() << std::endl;         std::cout << callFoo<D,C>() << std::endl;     }   How can I call a templated static method of a class which is parameter template of my function?


Best way to apply a "friend system"-like table?

I am making a website that has multiplayer games like chess, poker, etc.  Users will be able to add friends. I was thinking about how could I make this relationship in the database, and I thought of two methods:  1 - Using a row for every friendship e.g  id   |   friend1   |   friend2   2 - Using only a row per user, adding all friends in a string separated by comma (in a text field maybe?) e.g  |id   |   user    |   friends                | ---------------------------------------------- |1    |    rellfy |   user1,user2,user3,user4|   What would be the best method to use? Using a string only, and parsing it later through the application, or querying for friends directly?


I have 4 hard disk drives that have temperatures which go beyond the recommended 50 degrees (Celsius). (I have several Samsung Spinpoint F3 which are 1Tb each and they do have good temps, between 32 and 35 degrees. That's normal for me. But in this case, 50+ is not normal.)  I have already read the question and answer provided , but none of the solutions  helped. What tools can I use or what terminal commands should I execute to lower the temperature of these drives?  And on a similar note, if I were to use a method similar to , how would I know which hard drive I am reading?   Where can I check to see which HDD is related to, for example, /sys/class/scsi_host/host0/link_power_management_policy ?  I have already tested powertop, hddtemp, disks and others to check and try to lower the temp with no luck.


Is this estimate $p_{n+1}^2 < p_1 \cdot p_2 \cdot ... p_n$ true for prime numbers?

I think to remember that if $p_1, ..., p_n$ are the first $n$ prime numbers, then $$   p_{n+1}^2 < p_1 \cdot p_2 \cdot ... p_n $$ for all $n \ge 4$, but I can't find a reference for it. If true, is it obvious (something like Euclid's trick) or more like Bertrand's postulate, etc.?


I've a few questions in mind:   Why is $\pi$ irrational? If it is, then how can 2 rational quantities (circumference, diameter) can produce irrational number? How are we able to determine digits of $\pi$ accurately?


Markdown editing help page needs an update

The  shows this for the Basic Links:  There are three ways to write links. Each is easier to read than the last: [Google](http://www.google.com/)Here's an inline link to . [Google][1]Here's a reference-style link to . [Yahoo!][yahoo]Here's a very readable link to .    [1]: http://www.google.com/   [yahoo]: http://www.yahoo.com/   Instead, it should look like  Here's an inline link to [Google](http://www.google.com/). Here's a reference-style link to [Google][1]. Here's a very readable link to [Yahoo!][yahoo].    [1]: http://www.google.com/   [yahoo]: http://www.yahoo.com/   Can this be updated?


In Zelda games, bottles are pretty useful and often there are one or two that are well-hidden. I'm a bit surprised in this one that I've only done 3 dungeons of the game and already found 4 bottles.  How many are there, and where can I find them all?


I have turn on my developer option in my Samsung galaxy grand price. how to hide the developer options in android 5.1.1?


Can I enter other Schengen countries with EU residence permit but without passport?

I have some travel plans to go from Netherlands to France by car. I possess Dutch residence permit, but I am non-EU citizen. The problem is that I might need to submit my passport to get visa to another country I plan to go to later. So I have: residence permit and photocopy of my passport. Is it    legal to cross borders by car with this set of documents what are possible fines and other repercussions if police or other authorities ask for my documents in France or Belgium?


Is there a way to speed up YouTube playback?


Is there a small package free way of implementing something like this in pdflatex and LaTeX?  I wish for the outcome of   \documentclass{article} \begin{document}     `It's a nice day!' \end{document}   To be     ʻIt's a nice day!ʼ   I know that due to there being a single apostrophe inside the quote can mess up stuff, so I'm more then happy to use a function or macro, like \apos, to insert it.  I know that the apostrophe I want has the Unicode value of 39, so is in the standard ASCII implementation. "U+0027 ' apostrophe (HTML: &#39; &apos;) typewriter apostrophe."


Nullpointer exception on method with Nullable parameter

I have a static util method that I am calling with some values being null.  Here is the method signature that I am calling:  public static void logAndDisplayError(@Nullable Shell parentShell, String dialogTitle, String exceptionMessage, @Nullable Exception e, @Nullable Integer statusCode, boolean is1CD)   Here is the call to the method:  EclipseError.logAndDisplayError(getShell(), "Error Occured On Finish", message, null, null, true);   Inside the method, I am making a MessageDialog which is causing a null pointer.  Here is the MessageDialog creation:  MessageDialog dialog = new MessageDialog(parentShell,                  dialogTitle,                  MessageDialog.getImage(Dialog.DLG_IMG_MESSAGE_ERROR),                  getErrorMessage(e.getMessage(), e, statusCode),                  MessageDialog.ERROR,                  new String[]{"1CD Help", "Ok"},                  1);   The null pointer is occuring on this call in the MessageDialog:  getErrorMessage(e.getMessage(), e, statusCode)   So we know that e and statusCode are null. But I have Nullable defined in the getErrorMessage method...  private static String getErrorMessage(String exceptionMessage, @Nullable Exception e, @Nullable Integer statusCode)   Why is it throwing the null pointer?  Also, here is the @Nullable I am using:  org.eclipse.jdt.annotation.Nullable


Matrices that can only be permutation matrices

How to prove that if $A$ and $B$ are two $n×n$ matrices with non negative integer entries such that $AB=I$ then $A$ and $B$ are permutation matrices?  Permutation matrices are matrices with the columns just a permutation of the identity matrix. How do I proceed. Can somebody give hint?


In a viral infection, which symptoms are caused by the virus itself, and which symptoms are caused by the body fighting the virus?

Most symptoms commonly associated with respiratory viral infections, like the common cold, are actually immune in nature. Fever is the body's attempt to overheat the virus, excess mucous is the body's attempt to catch virus before it enters the body, fatigue is the result of immune exertion in fighting the virus, chills are the result of fever, etc.  What types of symptoms of a respiratory viral infection tend to be directly caused by the virus, and what types tend to be caused by the body fighting a viral infection? A better way to ask this might be, what symptoms of a respiratory viral infection would an immunocompromised individual show?


How happy Harry was having seen Toby's house!   I don't know whether this sentence is grammatically correct or not! In my opinion, the part "having seen Toby's house" is used as a supporting idea, which is similar to this: "Keeping these ideas in mind, we compiled this book for young readers."   Please help me!  My question is a different problem, I just don't understand the role of "having seen Toby's house"part, and wonder if it's okay to combine with "how happy harry was".


What is in the space between a nucleus of an atom and its electrons?

There is a common analogy about the structure of an atom, such as the nucleus is a fly in the centre of a sports stadium and the electrons are tiny tiny gnats circling the stadium (tip of the hat to 'The Greatest Show on Earth') but what is in the space between the 'fly' and circling 'gnats'?


Guess I will multiply threads, but sorry, I'm still confused:  at Jan Kazimierz University in Lwow  or  at the Jan Kazimierz University in Lwow  I've found the second one more common, though I feel the first one is more appropriate because the university is named after a person (Polish King Jan Kazimierz)? I mean, you don't say at the Stanford University, do you?


I have a binary sequence of length $2^{20}$. I am using the NIST statistical test, assess.   What should be taken for ./assess and  How many bitstreams? in this test? In the final Analysis report, what p-values should be there to pass this test?


I have HP workstation Z440 : Xeon W3520 and I want to make on it Ubuntu server. Is it compatible?  thank you.


Expected days to finish a box of cookies

Adam has a box containing 10 cookies. Each day he eats each cookie with a probability of $\frac12$. Calculate the expected number of days it takes Adam to complete the cookies.   As a start we can set $X$ as the expected days it takes for Adam to finish eating the cookies. However I'm unable to progress further.


Need transit Visa for dubai for Indian Passport holders Or no

Sir i am leaving from Ecuador to india on 19th august,16, on KLM flight,from dubai to Amritsar i going by Spice jet,i need to Stay at dubai International airport for 5 hours,either i need the transit Visa Or no ? Kindly reply and make me oblige                                    Amrit Sidhu


Add multiple children to an unordered list with appendchild

Hello everybody,      // Create element const li  = document.createElement('li');  // Add class li.className = 'collection-item';   // Add attribute li.setAttribute('title', 'New Item');  // Create text node and append li.appendChild(document.createTextNode('Hello World'));  // Create new link element const link = document.createElement('a'); // Add classes link.className = 'delete-item secondary-content'; // Add icon html link.innerHTML = '<i class="fa fa-remove"></i>';  // Append link into li li.appendChild(link);  // Append li as child to ul  document.querySelectorAll(".btn")[0].addEventListener("click", function(){   document.querySelector('ul.collection').appendChild(li); })   This the the code I use to append an element which i created to an unordered list. It works fine when I click on the button the first time, but then nothing more happens. I expected that a new element would be added, whenever i click the button. Why does it only append the element one time? Can you guys help me?


Optional requirement on where clause in LINQ

The goal is to build a search form that can be entered on multiple field searches. But entering all fields are optional. What is the equivalent code in LINQ? Thanks.  string str = ""; if(a!="")     str += "f1 == a"; if(b!="")     str += " && f2 == b"; if(c!="")     str += " && f3 == c";  select f1, f2, f3 from p where str;


Using a higher current charger on a laptop which requires a lower current

Possible Duplicates:             I have an ASUS K50IN laptop which requires an input of 19 V at 3.42 A. Its charger has stopped working (wires cut by rats!). My brother have a charger that is 19 V, 7.1 A. Their polarity is the same and the tip fits correctly.. Can I use this charger on my laptop?


Theorem: $AB$ and $BA$ have the same non-zero eigenvalues

Theorem: $AB$ and $BA$ have the same eigenvalues, where $A_{n\times n}$ and  $B_{n\times n}$, and $\alpha\neq0$  Step 1: Let $v$ be an eigenvector corresponding to the eigenvalue $\alpha\neq0$ of $AB$. $ABv=\alpha v$ and by definition $v\neq0$. We are looking for a vector $w$ such that $BAw=\alpha w$ 2. If we apply $B$ to both sides of $ABv=\alpha v$, we have $BABv=B\alpha v=\alpha Bv$. Then, $BA(Bv)=\alpha (Bv)$ and $w=Bv$. If we can show that $Bv\neq0$ then $w$ is an eigenvector, $\alpha\neq0$ is an eigenvalue of $BA$, and $AB$ and $BA$ have the same eigenvalues when $\alpha\neq0$. 3. $\alpha\neq0$ and take $Bv=0$. If $Bv=0$, $ABv=0=\alpha v$. As $v\neq0$, $\alpha=0$, however this is a contradiction and therefore $Bv\neq0$ and $w$ is an eigenvector. As $w$ is an eigenvector, $\alpha\neq0$ is an eigenvalue of $BA$, and $AB$ and $BA$ have the same eigenvalues when $\alpha\neq0$. Q.E.D.


What are the relationship between administrators groups of domain, dev computer and of Sharepoint services?

I know-know I can search and read but anyway I would need to ask in order to escape possible typos, personal misunderstandings and to better remember.     I develop on a machine with installed Sharepoint 2010 Sever where I have local groups:     Administrators Description: Administrators have complete and unrestricted access to the computer/domain   WSS_Admin_WPG Description: Members of this group have write access to system resources used by Microsoft SharePoint Foundation      **Does the description of "Administrators" ("computer/domain") imply all privileges of "WSS_Admin_WPG" ?    Does the description of **WSS_Admin_WPG (in part of "system resources used by Microsoft SharePoint Foundation") imply Sharepoint Server?**    The WSS_Admin_WPG group has entries of:     "BUILTIN\Administrators (S-1-5-32-544)" group   and some user domain accounts   Is "BUILTIN\Administrators (S-1-5-32-544)" group the same (alias to?) as "BUILTIN\Administrators" entry I observe among Sharepoint Farm Administrators (through "Central Administration")?       Is the entries of domain accounts excessive (or necessary)     in "WSS_Admin_WPG" if these accounts make part of "Administrators" group?     in "Farm Administrators" if these accounts are part of "BUILTIN\Administrators (S-1-5-32-544)" group?     What are relationship (difference) between "BUILTIN\Administrators" and "Administrators"?


"Which" vs. "what" — what's the difference and when should you use one or the other?

Most of the time one or the other feels better, but every so often, "which" vs. "what" trips me up.   So, what's the exact difference and when should you use one or the other?


How is distance between galaxies and rate of expansion of universe calculated?

I have recently read in book 'Theory Of Everything' that rate of expansion of the universe is changing 5%-10% per 1000 million years, I would like to know how such calculation has been made.   Edit: I want to know the principle and theory of finding the distance between galaxies and rate of expansion of the universe and not just formulae.


I have the following abstract class:  public abstract class PinkBoxMasksDataAbstract {     public string PinkBoxText { get; set; } }   and 2 subclasses:  public class PinkBoxMasksDataNoOverlay : PinkBoxMasksDataAbstract { }  public class PinkBoxMasksDataOverlay : PinkBoxMasksDataAbstract {     public int PinkBoxLeft { get; set; }     public int PinkBoxBoxTop { get; set; }     public int PinkBoxHeight { get; set; }     public int PinkBoxWidth { get; set; } }   then I have another class, which has PinkBoxMasksDataAbstract class as parameter:  public class ZonalMatchResult<T> where T : PinkBoxMasksDataAbstract {     public decimal Confidence { get; set; }     public int GreenBoxLeft { get; set; }     public int GreenBoxTop { get; set; }     public int GreenBoxHeight { get; set; }     public int GreenBoxWidth { get; set; }      public List<T> PinkBoxMasksData { get; set; } }  public class ZonalResult<T> where T : PinkBoxMasksDataAbstract {     public int ExitCode { get; set; }     public string ErrorMessage { get; set; }     public int NumberOfGreenBoxMatches { get; set; }     public int NumberOfPinkBoxExtractFrames { get; set; }     public int ProcessingTime { get; set; }     public bool HasOverlay { get; set; }      public List<ZonalMatchResult<T>> MatchResults { get; set; } }   now I want to create this class this way:              ZonalResult<PinkBoxMasksDataAbstract> zonalResult;             if (isOverlayRequired)                 zonalResult = new ZonalResult<PinkBoxMasksDataOverlay>();             else                 zonalResult  = new ZonalResult<PinkBoxMasksDataNoOverlay>();   but I get an error:     Cannot implicitly convert type   'Domain.ZonalResult<Domain.PinkBoxMasksDataOverlay>' to   'Domain.ZonalResult<Domain.PinkBoxMasksDataAbstract>'      Why it happens if PinkBoxMasksDataOverlay is subclass of PinkBoxMasksDataAbstract? How to fix?


"room 7" "page 44": Why no def. article "the"?

Can anyone simply explain why the following expressions do not take the definite article “the”? I know (as a native speaker) that no article is needed; just looking for the precise grammar functioning here.      Room 7   (Bob is in Room 7)     Page 44   (Please open to page 44.)


PuTTY slow connecting to Linux SSH server

When connecting to a Linux SSH server using PuTTY, the PuTTY log shows 2 authentication attempts. The first attempt uses "root" as the username and no password. "none" is displayed in the first packet, meaning no password was used. The connection fails because the Linux SSH server is configured to only authenticate connections that have a password or public key. The second attempt uses "root" as the username and "SECRET" as the password. Access is granted because "root" and "SECRET" are a valid username/password for the Linux SSH server.    After clicking on the Open button in PuTTY, immediately the prompt to enter username "root" appears. After entering username "root", it takes about 8 seconds for the password prompt to appear. I am certain the cause of this 8 second delay is because the client and server are busy with the first authentication attempt that has "none" and no password. After entering password SECRET and pressing enter, access is granted immediately.    I am not certain why PuTTY first attempts to connect with username "root" and no password. Is there some way to configure PuTTY to not make the first attempt with username "root" and no password.


What temp files generated by latex can I delete without risk?

My projectfolder consist of several 'real' files and is full of files I don't know. There are some cleaning procedures which deletes specified endings after a run but I am not sure which filetypes I can delete without risk of some sort of data lost?  In my folder I have the endings:  - .aux - .bbl - .bcf - syntex.gz - .blg - .out - .pgs - .toc   Can I just delete all of them or will my project is getting corrupt then?  EDIT.... and without receiving speedlost in a new compilation


Let $\Bbb D^n$ be n-dimensional ball and $S^{n-1}$ the $n-1$ dimensional sphere realized as boundary of $\Bbb D^n$. Prove that following are equivalent.   There is no retraction $\Bbb D^n\to S^{n-1}$ Every Continuous map $\Bbb D^n \to \Bbb D^n$ has a fixed point.   I can do for the case of $n=2$. For this case, I don't even need the help of 2. to prove 1. just i will show there is  induced homomorphism between them such that $\pi _*(S^{1}) \to \pi _*(\Bbb D^2) \to \pi_*(S^1)$ does not commute. Next direction is also easy for the case of n=2  But I can't do for the case of $n>2$. could u please do for me for higher dimension.


Community♦ can't count: 1 is not greater than 1

Community♦ raises auto-flags for disputed reviews, like this:    Note the report of "more delete votes than 'looks good'".  I was curious about the details, so I looked at the review and found this:    One "Looks ok", one "Delete".  How is that "more delete votes than 'looks good'"?  (Also, side issue, but shouldn't that be 'looks ok' now?)


What's the condition for $\dot{x} = f(x,y)\\ \dot{y} = g(x,y)$ To be rewritable as $\dot{x} = \frac{\partial F(x,y)}{\partial y}\\ \dot{y} = -\frac{\partial F(x,y)}{\partial x}$ Can I always find a transformation $z=z(x,y)$ such that $\dot{x} = \frac{\partial G(x,y)}{\partial z}\\ \dot{z} = -\frac{\partial G(x,y)}{\partial x}$


A question about convergence test in $2^n$ form

For a decreasing and non-negative sequence {$a_n$}, we have:   if $\displaystyle \sum_{k=1}^{\infty}2^k \cdot a_{2^k}$ converges, then $\displaystyle \sum_{k=1}^{\infty}a_{k}$ also converges.  Is the converse of this statement also write? That is:  If $\displaystyle \sum_{k=1}^{\infty}a_{k}$ converges, does $\displaystyle \sum_{k=1}^{\infty}2^k \cdot a_{2^k}$ also converge? And why?  Thank you in advance.


Find $\lim\limits_{n \to \infty} \int_0^1 \sqrt[n]{x^n+(1-x)^n} \,dx$.

I have the following limit to find:  $$\lim_{n \to \infty} \int_0^1 \sqrt[n]{x^n+(1-x)^n} \, dx$$  And I have to choose between the following options:  A. $0$  B. $1$  C. $\dfrac{3}{4}$  D. $\dfrac{1}{2}$  E. $\dfrac{1}{4}$  This is what I did:  $$\int_0^1 \sqrt[n]{x^n+(1-x)^n}  \, dx = \int_0^{\frac{1}{2}} \sqrt[n]{x^n+(1-x)^n} \, dx + \int_{\frac{1}{2}}^1 \sqrt[n]{x^n+(1-x)^n} \, dx$$   If we consider the first term of this sum:   $$\int_0^{\frac{1}{2}} \sqrt[n]{x^n+(1-x)^n} \, dx \ge \int_0^\frac{1}{2} \sqrt[n]{x^n+x^n} \, dx = \int_0^\frac{1}{2}2^{\frac{1}{n}}x \, dx$$  And that means:  $$\lim_{n \to \infty} \int_0^{\frac{1}{2}} \sqrt[n]{x^n+(1-x)^n} \, dx \ge \lim_{n \to \infty} \int_0^\frac{1}{2}2^{\frac{1}{n}}x \, dx = \int_0^\frac{1}{2}x \, dx =  \frac{1}{8} \tag 1$$   If we consider the second term of that sum we have:   $$\int_{\frac{1}{2}}^1 \sqrt[n]{x^n+(1-x)^n} \, dx \ge \int_\frac{1}{2}^1 \sqrt[n]{(1-x)^n+(1-x)^n} \, dx = \int_\frac{1}{2}^1 2^{\frac{1}{n}}(1-x) \, dx$$  And that means:  $$\lim_{n \to \infty} \int_{\frac{1}{2}}^1 \sqrt[n]{x^n+(1-x)^n} \, dx \ge \lim_{n \to \infty} \int_\frac{1}{2}^1 2^{\frac{1}{n}}(1-x) \, dx = \lim_{n \to \infty} \int_\frac{1}{2}^1 (1-x) \, dx = \frac{1}{8} \tag 2$$  Now we can sum $(1)$ and $(2)$ and we have:  $$\lim_{n \to \infty} \int_0^1 \sqrt[n]{x^n+(1-x)^n} \, dx \ge \frac{1}{4}$$  So now we have a lower bound. We can do something similar for the upper bound.   Again, let's consider the first term of that sum:   $$\int_0^{\frac{1}{2}} \sqrt[n]{x^n+(1-x)^n} \, dx \le \int_0^{\frac{1}{2}} \sqrt[n]{(1-x)^n+(1-x)^n} \, dx =  \int_0^{\frac{1}{2}} 2^\frac{1}{n}(1-x) \, dx$$  That means:  $$\lim_{n \to \infty} \int_0^{\frac{1}{2}} \sqrt[n]{x^n+(1-x)^n} \, dx \le \lim_{n \to \infty} \int_0^{\frac{1}{2}} 2^\frac{1}{n}(1-x) \, dx =  \int_0^{\frac{1}{2}} (1-x) \, dx =  \frac{3}{8} \tag 3$$   And if we consider the second part of that sum:   $$\int_{\frac{1}{2}}^1 \sqrt[n]{x^n+(1-x)^n} \, dx \le  \int_{\frac{1}{2}}^1 \sqrt[n]{x^n+x^n} \, dx =  \int_{\frac{1}{2}}^1 2^\frac{1}{n} x \, dx$$  And that means:  $$\lim_{n \to \infty} \int_{\frac{1}{2}}^1 \sqrt[n]{x^n+(1-x)^n} \, dx \le \lim\_{n \to \infty} \int_{\frac{1}{2}}^1 2^\frac{1}{n} x \, dx =  \lim_{n \to \infty} \int_{\frac{1}{2}}^1 x \, dx =  \frac{3}{8} \tag 4$$  And now if we sum $(3)$ and $(4)$ we get:  $$\lim_{n \to \infty} \int_0^1 \sqrt[n]{x^n+(1-x)^n} \, dx \le \frac{3}{4}$$  So after all of that, we have:  $$\frac{1}{4} \le \lim_{n \to \infty} \int_0^1 \sqrt[n]{x^n+(1-x)^n} \, dx \le \frac{3}{4}$$  But this didn't help me all that much. Choices C, D and E are still consistent with this inequality that I got. So what should I do to find the exact answer? Or did I do something wrong in my calculations?


Show $(|a|+|b|)^p \leq |a|^p+|b|^p$ for $0\leq p \leq 1$

How to show that for any real numbers $a$ and $b$  $$(|a|+|b|)^p \leq |a|^p+|b|^p$$ for $0\leq p \leq 1$ ?


How to reset chapter and section counter with \part

To get the output Toc or pdf bookmark below:   Part I     Chapter I     Chapter II Part II     Chapter I     Chapter II   I need to reset the chapter counter. I google and get one method.   \makeatletter \@addtoreset{chapter}{part} \makeatother   Yes, It can output like this. But hyperref package can not link to right target for chapters after chapter I. That is said page ref link broken.  I like to define all style in style file. the mini-document:   \documentclass[]{book} \usepackage[]{hyperref} \usepackage{mini} % my own style file  \begin{document} \tableofcontents \part{Test} \chapter{One} \chapter{Two} \part{Test} \chapter{Three} \chapter{Four} \end{document}    and the mini style file:   \renewcommand\part{%   \if@openright     \cleardoublepage   \else     \clearpage   \fi \setcounter{chapter}{0}} % I reset manually here.


How to decrease space above and below displayed equations

This is my code.  \documentclass{article} \usepackage{amssymb,amsmath,amsthm,enumitem}  \begin{document} How can I decrease vertical space between text above and below \$\$ \ldots \$\$ ? $$x^{2}+y^{2} = 1$$ How can I decrease vertical space between text above and below \$\$ \ldots \$\$ ?  And how can I decrease vertical space between text above and below align command ? \begin{align*} abdefg &= 1\\      &\leq 2. \end{align*} How can I decrease vertical space between text above and below align command ? \end{document}   And it shows as this picture   Everyone know how to fix it? Please help.


Is there a way to do this in LaTeX 3?  I looked at , and I am not sure that it addresses my question, but I belive it states that this is not possible in LaTeX 2e.  This is most common for me when I have a marginpar that is tied to text that happens to fall out near the bottom of a page. This also happens if I use marginnote instead.  If someone has ideas for how to post a MWE, let me know and I'll post one.


How is this equation obtained? $\int_0^\infty \frac{x^{s-1} dx}{e^x-1}=\Pi(s-1)\zeta(s) $

This equation: $$\int_0^\infty \frac{x^{s-1}}{e^x-1} dx=\Pi(s-1)\zeta(s) $$ was used by Riemann in his famous paper from 1859. Seemingly it follows from: $$ \int_0^\infty e^{-nx}x^{s-1}dx= \frac{\Pi(s-1)}{n^s}$$  a result achieved by repeated integration by parts. How does the first equation follows from the second?


I want to extend my Encrypted LVM to the adjacent free space, I tried  in VirtualBox and find that if the adjacent free space is in the front of LVM all data will be lost if you do the extending with the fdisk follow the article, so will I need to move the partition to the front of the free space before I enlarge the real disk? How do that or do you have advice?


British or Australian live action kids show in the mid 90's

I remember catching this show maybe 2-3 times randomly while channel surfing as a kid. That being said, I only have fragments of what I remember.   I remember that there was a group of kids. Maybe from 12-15 or so in age. I remember they had the power to teleport either to and from an underground base, or they could teleport freely. The setting was in London... or Sydney... I can't remember and it was so long ago, I'm blending the accents they had... I'm pretty sure it was London, tho. The group of kids had other powers maybe, I don't recall.


“have despatched...yesterday” vs. “despatched … yesterday”

I have a doubt in the below sentence whether to use Past Simple or Present Perfect Tense,     We have despatched the parcel yesterday.      We despatched the parcel yesterday.   I know the second one is right because the parcel was despatched yesterday which means the action is completed (Past Tense).  But what about the first sentence, because the parcel was despatched, however the parcel is not reached the customer yet. So is it ok to use "have despatched" in the sentence (Present Perfect) in the mail to inform the customer?


The 21st century use of Supper and Dinner

In the 21st century, generally would we still say we have both supper and dinner along with lunch on the same day?  I live in Seychelles and the eating habit here is breakfast-lunch-heavy dinner. Even when you offer a light supper, they say they'll wait for the dinner.


I have a Noctua NF-F12 computer fan (specs: ). I also have a Samsung USB Wall Adapter (Originally for charging my tablet). The USB Wall Adapter says it can output 5V 2.0A.  My computer fan, according to the specs, runs at 12V 0.05A. How do I go about powering this? Some have said to purchase a 5V to 12V step up module with a USB connection, then solder the fan wires onto that, and plug the USB end into the wall adapter or would it work if I plugged it into a computer's USB port?   I've also seen DC wall adapters for sale. I saw a 12V DC Wall Adapter, and it says it can output 12V 100mA. However, most of them supply 500 mA, 1A, or 2A. My fan says it only needs 50 mA (0.05A). What happens if I solder the fan wires to this DC Wall Adapter? It is 12V but isn't it too much current? Will this burn out the fan?  Edit: With all that said, is it best to just purchase a DC power supply and splice the fan wires, or can I go with a 5V to 12V step-up module with a USB connection and use any of my USB wall chargers instead?  Thank you in advance.


Three operator causes StackOverflowException

I know, I could simply use abs in this case, but I'm just curious: why is this happening?  public float maxThrotle{     set { maxThrotle = value < 0 ? -value : value;    //this line causes problem     }     get { return maxThrotle; } }


How to get content type of a file which has no extension?

I have saved all types of file without extension.  When reading through Java code, how to get content type of file?  File file = "/admin/sun" byte[] pdfByteArray = FileUtils.readFileToByteArray(file); if (fileName.endsWith(".pdf")) {     response.setContentType("application/pdf"); } else {     response.setContentType("image/jpeg"); } response.getOutputStream().write(pdfByteArray); response.getOutputStream().flush();   What is if the file extension .pdf or .jpeg it is working then without extension how to get content-type?


There is a Sci-fi novel, I thought it was Ringworld but I can't find the passage.  There was, as a small plot point about the past, a bio-agent accidentally released that destroyed all the plastic bags and a lot of other polymer based articles, like Hawaiian Shirts, in the world. I don't remember if the Hawaiian Shirts were mentioned in the book specifically, or if was something I thought of immediately when I read the passage.  Anyone know where I can find this, because I recall liking the story and would like to reread it.


Can we prove that the universe is finite or infinite?

If I say that the universe is finite, how can you say with certain that I am wrong?


Global variable within JavaScript function

I have the following code:  function timeLine (wrapper,slider,boxwidth,labels,labelWdth) {     this.wrapper = wrapper;     this.slider = slider;     this.boxwidth = boxwidth;     this.labels = labels;     this.labelWdth = labelWdth;      this.setupBlocks = function(){                   $(this.wrapper+' .blocks').each(function(){             // Get longest block for some reason this causes us problems!             newWidth = $(this).data('cover') * this.boxwidth;              $(this).width(newWidth+'px');             $(this).css('margin-left',$(this).data('left') * this.boxwidth+'px');         })       }   The problem I am finding is that the this.boxwidth variable within the setupBlocks function is returning NULL.  If I defined these properties at a function level shouldn't this.variable still be available?  I guess the jQuery each is overwriting that, so how can I set the this. list as completely global?  I thought you had to have this for JS classes in this format (as per  which I was using as I normally don't do Classes with JS).


$\binom{p}{i}$ divisible by $p$, with $p$ prime

Let $p$ be a prime. How do you show that the binomial coefficients $\binom{p}{i}$ are divisible by $p$ for $1\leq i\leq p-1$? And how does this result in the congruency $(x+y)^p\equiv x^p+y^p\pmod p$ for $x,y\in\mathbb{Z}$?


get() from a List, but passing long as argument in Java

I am trying to get an element from a list List<Class> listofitems, and I have a globale variable position of type long. I would like to perform listofitems.get(position) but it doesnt allow me to do so since get takes int as argument. If I want to keep the type of position as long, if there are any other way to do this? (any other way besides casting position to int)?


How can I get event from element that dynamically added to DOM

I'm creating input field dynamically in my page with some id like #MyField And when I try to catch click event by $('#MyField').click(function (){}) it doesn't work! Am I do it in wrong way?


How can I improve this simple trigger and what would the test class look like?

I am not able to understand how to write a test cases for this trigger. What the trigger does is, if a new case is created and it has an email in it, then look for a contact that has the same email and associated the contact with the case. trigger CaseEmailToContactEmail on Case (before insert) {          for(Case c : Trigger.New) {         System.debug('Case details: ' + c);         try{             if(c.SuppliedEmail != null){                             Contact con = [Select Id, Name, hed__AlternateEmail__c, Email From Contact Where Email =: c.SuppliedEmail OR hed__AlternateEmail__c =: c.SuppliedEmail ];                 if(con.Id != null ){                     c.ContactId = con.Id;                 } else {                     System.debug('no Contact record found with case email');                 }                          }         } catch(Exception e){             System.debug('Exception occured: ' + e);         }         finally {             System.debug('No email found on case object');         }      }   }


Find $(a,b)$ such that $\lim\limits_{x\to 0}\frac{f(x)}{x}=1$ implies $\lim\limits_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$

Let $f$ denote any function such that $\lim\limits_{x\to 0}\frac{f(x)}{x}=1$. Find the value of $a$ and $b$, assuming that $\lim\limits_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$.   My  attempt: $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$ $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3\frac{(f(x))^3}{x^3}}=1$ $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3}=1$ $\lim_{x\to 0}\frac{1+a\cos x-b\frac{\sin x}{x}}{x^2}=1$ $\lim_{x\to 0}\frac{1+a\cos x-b}{x^2}=1$ As denominator is tending to zero,so numerato will also tend to zero. $1+a-b=0............................(1)$ Applying L Hospital rule, $\lim_{x\to 0}\frac{-a\sin x}{2x}=1$ So $a=-2$ and $b=-1$ But the answer given in my book is $a=\frac{-5}{2}$ and $b=-\frac{3}{2}$. I do not understand where have i gone wrong?


I have 4 Apex classes I worked on and some that was already created but had to tweak it. I would like to deploy them on Production but facing some issues. Let's start with the first one, Code Coverage : 0% I know I need to duplicate the classes and use @isTest in it and test it. What I don't know is what is to test? Like this code below, what do I need to test?:     public class attachPDFToInvoice {          private final Invoice__c a; //Invoice object          //constructor     public attachPDFToInvoice (ApexPages.StandardController standardPageController) {         a = (Invoice__c)standardPageController.getRecord(); //instantiate the Invoice object for the current record     }          //method called from the Visualforce's action attribute     public PageReference attachPDF() {                  //generate and attach the PDF document         PageReference pdfPage = Page.Invoice; //create a page reference to our pdfDemo Visualforce page, which was created from the post https://interactiveties.com/blog/2015/render-visualforce-pdf.php                  pdfPage.getParameters().put('id',a.Id);                  Blob pdfBlob; //create a blob for the PDF content         if (!Test.isRunningTest()) { //if we are not in testing context             pdfBlob = pdfPage.getContent(); //generate the pdf blob         } else { //otherwise, we are in testing context and getContent() gets funky so create the blob manually             pdfBlob = Blob.valueOf('Some Text for a boring PDF file...');         }         Attachment attach = new Attachment(parentId = a.Id, Name = 'Invoice.pdf', body = pdfBlob); //create the attachment object         insert attach; //insert the attachment                  //redirect the user         PageReference pageWhereWeWantToGo = new ApexPages.StandardController(a).view(); //we want to redirect the User back to the Account detail page         pageWhereWeWantToGo.setRedirect(true); //indicate that the redirect should be performed on the client side         return pageWhereWeWantToGo; //send the User on their way     }  }  What would that do? What I don't understand is it's working on the sandbox, why do we need to add anything??? it's working :) Thanks for your help!


I can't get my Cognito form to load. It just keeps giving me this error message:  Invalid Form Our apologies, this form has been disabled due to suspicious content. If you believe you have received this message in error, please contact the original form author.  How do I solve this?


I recently upgraded from 14.04 Trusty to 16.04 Xenial. Prior to the upgrade, I used the caffeine-plus indicator icon to tell the my laptop when it could sleep. The mode I normally used was to have Caffeine enabled so the computer would only sleep/suspend when the lid was closed. However, there were occasions when I wanted to be able to let the idle timer have its intended effect.  Since the upgrade, Caffeine doesn't appear to do anything anymore. I can leave my computer with a long-running process, deliberately keeping the lid open, only to come back to find it sleeping and the process unfinished.  How can I get the previous behavior back? Note that I'm looking for a toggle, not a permanent change. As a toggle, it should have a visual indication as to whether it's enabled or not. An indicator icon would be great.  Note  The searching I did prior to asking this question turned up either: a) old (outdated) posts about how to use Caffeine, or b) permanently disabling sleep to work around various hardware bugs. My question is simply about restoring the functionality I had in 14.04, a topic I didn't find addressed.


I'm trying to write an essay for university using LaTeX and BibLaTeX but it's my first time using it so I think I may have messed up somewhere as I can't find any real beginner's guide!  \documentclass[12pt,twocolumn]{article} \usepackage{times} \usepackage{filecontents} \usepackage[style=authoryear]{biblatex}  \begin{filecontents}{refs.bib} @ONLINE     {arstechnica,     AUTHOR = "Jon Brodkin",     TITLE = "{Yahoo IP lawsuit: We patented “Facebook’s entire social network model}”,     URL = "http://arstechnica.com/tech-policy/2012/03/yahoo-patent-lawsuit-we-invented-facebooks-entire-social-network-model/",     URLYEAR = 2012 } \end{filecontents}  \addbibresource{refs.bib}  \begin{document}  \title{Title}  \author{Author} \date{\today} \maketitle  \cite{arstechnica}  *(text...)*  \printbibliography \end{document}   The output for the text looks correct but trying the references looks like [arstechnia ] and the errors are:  Package biblatex Error: File 'positionpaper.bbl' not created by biblatex \begin{document} Citation 'arstechnica' on page 1 undefined Empty bibliography There were undefined references. Please (re)run Biber on the file:(biblatex) positionpaper(biblatex) and rerun LaTeX afterwards.   Any help would be appreciated!


I am reading Hartshorne's Algebraic Geometry and on p. 5, in the proof of Proposition 1.5, there suddenly appeared the symbol $Z=(Y-Y_1)^-$ in the second paragraph. What does the symbol mean? This is supposed to make $Z=Y_2\cup\cdots\cup Y_r$ hold.


On this forum, I have had many of the more experienced users tell me to tweak my format so that I eliminate badboxes.  I do not see the point of nitpicking my LaTeX code to eliminate badboxes.  I have many badboxes in all of my documents and they compile just fine.  So, my question is what is so bad about badboxes?


First row inserted successfully, when ever second row inserting into excel getting NullPointerException

import java.io.FileInputStream; import java.io.FileOutputStream;     import java.io.IOException;     import java.util.List;     import java.util.concurrent.TimeUnit;  import org.apache.poi.ss.usermodel.DataFormatter; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook;  import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.Select;  public class CityBusRoutes {      static String cityName;     static String routeNo;     static String routeDetails;      static String routeList;      public static void main(String[] args) throws IOException {          // TODO Auto-generated method stub          System.setProperty("webdriver.chrome.driver",                 "D://Selenium//Selenium Drivers//chromedriver_win32//chromedriver.exe");         WebDriver driver = new ChromeDriver();          driver.get("http://www.onefivenine.com/busRoute.dont?method=findBusRoute");          driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);          FileInputStream fis = new FileInputStream("D://City bus routes task//routes-list.xlsx");         XSSFWorkbook wb = new XSSFWorkbook(fis);         XSSFSheet sh = wb.getSheetAt(0);          int totalNoOfRows = sh.getLastRowNum();         System.out.println("Row count :"+totalNoOfRows);          for (int i = 1; i < totalNoOfRows; i++) {              XSSFRow row = sh.getRow(i);             cityName = new DataFormatter().formatCellValue(row.getCell(0));             routeNo = new DataFormatter().formatCellValue(row.getCell(1));              System.out.println("route opened");              Select ddl1 = new Select(driver.findElement(By.id("cityId")));              ddl1.selectByVisibleText(cityName);              Select ddl2 = new Select(driver.findElement(By.xpath(".//*[@id='routeId']")));             ddl2.selectByVisibleText(routeNo);              System.out.println("route selected");              routeDetails=driver.findElement(By.xpath("html/body/table/tbody/tr[3]/td[2]/div[2]/table[2]")).getText();             routeList=driver.findElement(By.xpath("html/body/table/tbody/tr[3]/td[2]/div[2]/table[3]/tbody/tr/td[1]/table")).getText();                  row.getCell(2).setCellValue(routeDetails);                 row.getCell(3).setCellValue(routeList);                  FileOutputStream fos = new FileOutputStream("D://City bus routes task//routes-list.xlsx");                  wb.write(fos);                 fos.close();         }     }    }   Below is my StackTrace:  Row count :2668 route opened route selected route opened route selected Exception in thread "main" java.lang.NullPointerException at CityBusRoutes.main(CityBusRoutes.java:100)   Reading first two cells in first row and writing next two cell in first row, Reading first two cells in second row also happening but writing into second row  is not happening and showing the above error.


Light spectrum dispersion effect in Blender?

I'm trying to achieve the effect where a beam of light sent through a prism or other refractive object, separates out into the light spectrum. (See image below)    This effect is especially useful to have when modeling gemstones, since the 'sparkle' of colors produced by this effect adds a lot of realism to the model.  It does not seem possible to get Cycles to produce this effect, since Cycles handles each ray of light as only a single, one-colored ray. Is there any way to coax Cycles (or any other render engine) into treating light as a full spectrum? Is this kind of treatment of light even possible in Blender?


How to do imbalanced classification in deep learning (tensorflow, RNN)?

I am trying to do binary classification of News Articles (Sports/Non-Sports) using recurrent neural net in tensorflow. The training data is highly skewed [Sports:Non-Sports::1:9].  I am using cross-entropy as my cost function, which treats both classes equally.  What are the ways by which user can penalise one class? Or is there any other cost function suitable for this purpose?


what does this ping listing mean -- it does not have an IP address but some hex numbers

Something's screwy on our network at work, and I'm no longer able to reach a server where I'm developing a database application. I'm not the network admin, and he's out sick.  When, from my workstation, I ping the server on which SQL Server instance lives:    ping server6   this is the reply:  Pinging SERVER6 [fe80::6579:d35e:3471:f21c%11]  Why is there no IP address as there normally is? Is this an IPv6 address, and if so, why am I seeing it?


What SOM does sounds good and very useful on a paper (putting similar individuals close together, nonlinear version of PCA) for visualization and for dimensional reduction. Also there are whole chapters about it in ML books (e.g. Marsland), but I newer saw it being used in any serious way, also it was not merged in scikit-learn for the same reason.  If it sounds so good, why it is not? And if it so terrible, why is it being mentioned in ML courses, instead of more useful approaches?


How to maker a LaTex drawing of dominoes falling as the following figure?


JavaFX - Error in setOnMouseClicked when I click on empty row in tableView

I get an Error for setOnMouseClicked when I click on empty row on the table. This only happens when I click on an empty row at first after running the code. my method is this: table.setOnMouseClicked(e -> {                 try {                     User selected = table.getSelectionModel().getSelectedItem();                     String query = "SELECT * FROM persons WHERE PersonID=?";                     pst = conn.prepareStatement(query);                     pst.setString(1, selected.getPersonID());                     rs = pst.executeQuery();                      while (rs.next()) {                         txtFirstName.setText(rs.getString("Firstname"));                         txtLastName.setText(rs.getString("Lastname"));                         ((TextField) txtDob.getEditor()).setText(selected.getDob());                         }                      pst.close();                     rs.close();                 } catch (SQLException ex) {                     ex.printStackTrace();                 }             });  this is what I get in my console. This only happens when I click on How can I solve this ? Exception in thread "JavaFX Application Thread" java.lang.NullPointerException     at application.Main.lambda$8(Main.java:266)     at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)     at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)     at javafx.event.Event.fireEvent(Event.java:198)     at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3470)     at javafx.scene.Scene$ClickGenerator.access$8100(Scene.java:3398)     at javafx.scene.Scene$MouseHandler.process(Scene.java:3766)     at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)     at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)     at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)     at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:381)     at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)     at java.security.AccessController.doPrivileged(Native Method)     at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:417)     at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)     at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:416)     at com.sun.glass.ui.View.handleMouseEvent(View.java:555)     at com.sun.glass.ui.View.notifyMouse(View.java:937)     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)     at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)     at java.lang.Thread.run(Thread.java:748)


16.04 Cannot install anything from Ubuntu Software center

Whenever I double click a deb file, it'd be opened in software center. However, when I click "install" button, it'd change to "installing" for a second but then turn back to "install" and nothing happens. It also says "This software comes from a 3rd party and may contain non-free components" at the bottom. I have enabled all the options in Software & Updates and also tried reinstalling software center but nothing helped.


Am I using index argument of callback function in .map ( ) wrongly?

I'm trying to capitalise the first letter of each word in a sentence. However, the output I got from my code below is: "I'm a little teapot". I tried finding detailed explanations of how the index argument for the callback function for the map function works but found none. I want to instruct it to capitalise the letter if the element before it is a space. What's wrong with my code?  function titleCase(str) { str= str.toLowerCase().split("");  var newArr= str.map( function(i,j){  if ( j===0 ){ return i.toUpperCase();} else if (str[j--]===" "){ return i.toUpperCase(); }  return i;  });  return newArr.join(""); }   console.log(titleCase("i'm a little tea pot"));


Why does my friend have fewer Pokémon than me?

Why does my friend only have 138 spaces in his Pokédex, when I have 142 spaces in the Pokédex?    We both play the game on Android and I am pretty sure we both have the same version of the game.  Could it maybe be because my friend got it from Germany while I downloaded the apk? Did I maybe find or hatch special Pokémon that don't appear in the Pokédex before I get them? Is there even more Pokémon? Do I have special powers?


A bone was rotated 90 degrees on the Y axis.  I simply want to get (0, 90, 0), but in Blender it is represented by Euler angles (86.4, 44.9, 66.3).  How do I get rotation on the global axis In Python code?    import bpy obj = bpy.data.objects["Armature"] for pbone in obj.pose.bones:     rotate_x = pbone.rotation_euler.x ##1.5072393417358398 (Euler)     rotate_y = pbone.rotation_euler.y ##0.7828118801116943 (Euler)     rotate_z = pbone.rotation_euler.z ##1.1571569442749023 (Euler)      '''     rotate_x _y _z are all euler angles of Bone.     But I want to get these as below.     It will be     rotate_x = 0     rotate_y = 1.5708(or 90)     rotate_z = 0     because rotate 90 degrees on Axis Y.     '''


Is Colossus strong only when he transforms?

The superhuman strength of Colossus is given to him only when he transforms or does he have superhuman strength all the time?  If possible I would like answer both from comic universe and x-men movie universe


Chrome is doing four things. The browser itself, a GPU process, the tab for this website and one extension. So why are there eight chrome.exe processes?  Half of them don't even seem to be doing anything. Nothing crashes or malfunctions when they close. They just suck resources, apparently.


What are the pros and cons of having multiple co-advisors during a PhD?

Can you have more than one co-advisor as well ? I yet have to check with my department but wanted to see the pros and cons of it.   I did read  but wanted to see if someone else has opinions as well ?


How to fix this NullReferenceException error?

I am trying to fix an error that says "Object reference not set to an instance of an object". The purpose of this script is to spawn a prefab that follows the mouse when you click a UI button. The script works fine despite showing the error(yellow triangle), but when I add a line referencing another scripts array(marked >>>) in the HandleNewObjectHotkey function) the game refuses to run(red stop sign). For context, this script shown is attached to an empty game object. The button retrieves the script from this game object, and specifically uses the HandleNewObjectHotkey Function. I would like to know how I can fix the placeable Object Prefab from producing an error, or a suggestion to bypass it. Things I've tried: making placeableObject prefab public, removing serialize field, attaching the prefab to the script itself in assets, change everything from private to public. [SerializeField] private GameObject placeableObjectPrefab;           // shows error here in visual studio, suggesting to make read-only (doesn't fix the problem)   private GameObject currentPlaceableObject; private float mouseWheelRotation; public int objectsSpawned;  // -------------- Money stuff  private float money; private MoneyDisplay moneyDisplay; private ObjectCostDisplay objectcostDisplay;  private void Awake() {     moneyDisplay = GameObject.FindObjectOfType<MoneyDisplay>();     objectcostDisplay = GameObject.FindObjectOfType<ObjectCostDisplay>();  }  private void Update() {      if (currentPlaceableObject != null)     {         MoveCurrentPlaceableObjectToMouse();         RotateFromMouseWheel();         ReleaseIfClicked();     } }  private void ReleaseIfClicked() {     if (Input.GetMouseButtonDown(0))     {         currentPlaceableObject = null;     } }  private void RotateFromMouseWheel() {     mouseWheelRotation += Input.mouseScrollDelta.y;     currentPlaceableObject.transform.Rotate(Vector3.up, mouseWheelRotation * 10f); }  private void MoveCurrentPlaceableObjectToMouse() {     Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);      RaycastHit hitInfo;     if (Physics.Raycast(ray, out hitInfo))     {         currentPlaceableObject.transform.position = hitInfo.point;         currentPlaceableObject.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal);     } }  public void HandleNewObjectHotkey()                                             //error says issue is in this function.  {     money = objectcostDisplay.CostsList[0];   // >>>   adding this is what causes unity to refuse to run the game due to error mentioned. Deleting this lets game run, error still present.       if (objectsSpawned <= 3 && money <= moneyDisplay.currentMoney)                   {         if (currentPlaceableObject == null )         {             currentPlaceableObject = Instantiate(placeableObjectPrefab);                     objectsSpawned++;             moneyDisplay.UpdateMoney(money);          }     }      if(objectsSpawned == 3 && money <= moneyDisplay.currentMoney)     {         Debug.Log("You have reached the limit for this item!");      }      if(objectsSpawned <= 3 && money > moneyDisplay.currentMoney)     {         Debug.Log("You don't have enough money for this!");      } }  }


Show that if $x$ is a primitive root modulo $p^r$, then $x$ is a primitive root modulo $p$

I'm trying to solve the following problem:  Let $p\geq 3$ be a prime number, let $r \in \Bbb N$, and let $x$ be a primitive root modulo $p^r$. Show that $x$ is a primitive root modulo $p$.    I'm pretty much out of ideas. I tried to use the following claim: $a$ is a primitive root modulo $n$ if and only if for every  prime $q$ such that $q$ divides $\varphi(n)$ we have: $$a^{\frac{\varphi(n)}{q}}\not\equiv 1\pmod n$$  But got nothing.


Good detailed explanation of /etc/network/interfaces syntax?

I understood the very basic concept of how to use /etc/network/interfaces, but all I find online are examples, example after example, which I can copy-paste from. What I miss is an explanation of the syntax, an explanation of the meaning of the commands and which order the commands require. I want to understand, because most of the time copy-paste is not enough, because I'm not working on a fresh machine, so I can't just overwrite existing configurations because it would break a lot of stuff. man interfaces was not very helpful since it is written very complicated.  Example questions I have: what does inet in an iface line mean exactly (I could not even find it in the manpage), what does manual in an iface line mean exactly (many examples use it, but according to manpage it needs an extra config file then, which the examples don't present), when do I use or need them? When not? When I create a bridge, what exactly happens to the interfaces?


How remove all programs comes from a package?

When you install a program like postgresql, it installs several programs for its last version.  Once installed how remove all those packages? because using  apt-get remove postgresql   removes only that head package


If $\mathrm{Tr}(A)=0$ then $T=R^{-1}AR$ has all entries on its main diagonal equal to $0$

Prove that if $A$ is a square matrix and $\mathrm{Tr}(A)=0$, then there exists an invertible matrix $R$ such that the matrix $T=R^{-1}AR$ has all entries on its main diagonal equal to $0$.   It seems like the formula $A=S\Lambda S^{-1}$, but maybe it does not help.  Thanks so much.


Centrally managing large number of android tablets

I'm involved in a project that will deploy approximately 400 android tablets. All the devices are on the same network. Is there an easy way to centrally manage the following:  Creating and updating policies to restrict users from launching apps or updates Update a custom written application  Set device into kiosk mode and auto start an app  Any help would be appreciated.


Asymptotic behavior of $\sum\limits_{n=1}^{\infty} \frac{nx}{(n^2+x)^2}$ when $x\to\infty$

Prove that : $$\lim_{x\to \infty} \sum_{n=1}^{\infty} \frac{n x}{(n^2+x)^2} = \frac{1}{2}.$$ Furthermore, can we have an asymptotic expansion here? Mathematica gives a pretty one, but I could not prove it.    Doing an Asymptotic expansion for the summand gives that it like $\frac{n}{x}$ for large $x$ but this is completely useless, what I'm I messing here?   I prefer that you do not write the full solution if you feel that it is easy.


Newbie question. Trying to get my head around reference vs value arguments in Java, consider the following:  //Helper function int[] to csv     public static String csv(int[] values){     String ret = "";     for(int i = 0; i < values.length; i++)         ret = String.format("%s%s%s",ret,i == 0 ? "" : ", ",values[i]);     return ret; }  //Helper function, print to console public static void print(int[] v){     System.out.println(csv(v)); }    public static void method1(int[] input){     input[0] = 3; input[1] = 4; input[2] = 5; }  public static void method2(int[] input){     input = new int[]{6,7,8}; }  public static void main(String[] args) throws Exception {     int[] original = {0,1,2};     print(original);      method1(original);     print(original);   //As expected      method2(original);     print(original);   //Modification ignored }   In the above, changes to the array in method 1 are stored, but in method 2, the new assignment inside the function does not affect the original array and therefore has local scope.  So what if for example I need to do an array resize operation on an array passed by reference? is this not possible in java?


Can someone provide more details about deleting?

In help center, I find      However, the number of delete votes required scales to the number of votes on the question and all its answers.   Can someone provide more details about deleting mechanism? I am still a little confused.


There are already many questions about the epic badge and that it was assigned too late, but:  I have just received the  on  after earning 200 rep today (which incl. 2x15 for two accepted answers). However the rep listing under  states for me:  rep cap was reached via rep from upvotes *only* on 41 days rep cap was exceeded on 48 days   I had been keeping an eye on those numbers so the badge came as a surprise. Is this an error? I'd really like to earn the badge ;-).  Also just to clarify: Must the rep cap be hit, i.e. must a limitation have been encountered? By this I mean you got 21 up-votes at one day (20 to get the max 200 rep + 1 to hit the limitation, which is than listed as [0] in the listing). Or is it enough to get 200 (or 200+) rep points in any combination? My listing tells me that both of these values are below 50 times. I've tried hitting the recalculate button, with no change.    Ok, I manually recounted all days where I got 200 or more rep. I actually count 50 of them, however on one I had exactly 200 which might not count for the rep cap was exceeded on number while counting for the badge. This makes 49 days. I thought the last missing one might simply be because the day isn't over, but now it is 5 min after midnight UTC and it is still just 48.    The same -2 offset happened now to me with the Legendary badge:  rep cap was reached via rep from upvotes *only* on 111 days earned at least 200 reputation on 148 days   I don't mind it at this point, but in general there should be an exact display of the days available.


Double Copula or "double is" in professional/technical writing

I am proofreading a professional, technical text written by someone else. In the text, I encountered, "But, the reality is is a..." My intuition says that this should be rewritten as, "But, the reality is that a..." because it looks like a "double is" or a ""  However, I can't tell for sure if this is a legitimate use of two successive copulae. Does, "But, the reality is..." qualify as a dependent clause? It seems to me that "But,..." does not make the subject dependent. Am I right? Am I wrong?  The sentence with a little more context: "But, the reality is is a company like Spacely Sprockets cannot continue to do old fashioned things..."  (We have already had a discussion about beginning sentences with "but" in professional writing. It appears that the consensus is that it is both appropriate and acceptable here.)  I would like to see a way to clearly identify this statement as something that ought to be changed in the document. Grammar dissection, linking to authoritative works and explanations of grammar mechanics will all help me answer this question. Simple answers like, "it's wrong," don't help me be a better proofreader or editor. I already know it is wrong, but I  don't know why it is wrong.


here is my .  I have a class numberonly it works on load page, but when I append input it is not working on text box.  I know it not re-initialize after I append input that is my main aim to append event on append.  This is my html:: (Please see )  <div id='addinputdiv'>   <input type="text" class='numberonly' />  </div> <button onclick="addinputt()">Add Input</button>   numberonly class have on key down and key up events, I want to bind it on new input append.


How to find out on which partition my home dir is?

How can I find out on which partition my home dir is?


Intuition on the Kullback–Leibler (KL) Divergence

I have learned about the intuition behind the KL Divergence as how much a model distribution function differs from the theoretical/true distribution of the data. The source I am reading goes on to say that the intuitive understanding of 'distance' between these two distributions is helpful, but should not be taken literally because for two distributions $P$ and $Q$, the KL Divergence is not symmetric in $P$ and $Q$.   I am not sure how to understand the last statement, or is this where the intuition of 'distance' breaks down?   I would appreciate a simple, but insightful example.


Not continuity of a multivariable function given by $\frac{2x^2y}{x^2+y^2}$

Let $f(x,y)=     \begin{cases}       \frac{2x^2y}{x^2+y^2} & \text{if }  (x,y) \neq (0,0) \\       0       & \text{if }  (x,y)=(0,0) .  \end{cases}$  (i) Prove the directional derivatives of $f$ exist in any direction at the point $(0,0)$.  (ii)¿Is $f$ continuous on $(0,0)$?  For (i) I took $u=(u_{1},u_{2}) \in \mathbb{R^{2}}$ such $\|u\|=1$ and $0=(0,0)$. So $$\lim_{t \to 0} \frac{f(0+ t u)-f(0)}{t}=\lim_{t \to 0}\frac{2(tu_{1})^2 (tu_{2})}{(tu_{1})^4+(tu_{2})^2}=\lim_{t \to 0}\frac{(t^2 u_{1}^2)(t^2 u_{1}^{2}) tu_{2}}{t^{4}u_{1}^{4}+t^{2} u_{2}^{2}}$$. But I cannot find the limit when $t$ approaches to $0$. Which by finding them I would prove the directional derivative exist at every direction right?  For (ii) I got the intuition $f$ is not continuous at $(0,0)$ so I took $\lbrace (\frac{1}{k},\frac{1}{k}) \rbrace_{k \in \mathbb{N}}$ and $\lbrace (\frac{1}{k},0) \rbrace_{k \in \mathbb{N}}$ which are two different sequences in $\mathbb{R}^{2}$ converging to $(0,0)$. However, $\lbrace f(\frac{1}{k},\frac{1}{k}) \rbrace_{k \in \mathbb{N}}=\lbrace \frac{1}{k^{2}} \rbrace_{n \in \mathbb{N}} \to 0$ and $\lbrace f(\frac{1}{k},0) \rbrace_{k \in \mathbb{N}} \to 0$. So maybe my intuition was not right?  Also I've have approach $(0,0)$ through $(x,mx)$ and when this and gives me 0 as this value approaches to zero bit I cannot find another trajectory approaching through $(0,0)$ which gives me another value distinct to $0$. :(  Can anyone help me end the proof of continuity or not continuity, please?


I want to do the invert of an Inset: extruding new faces around an edge loop with the same distance everywhere like this image (in blue the new faces that i want to create):


I attended a 2y MSc mixed mode (Coursework+Thesis) program which is incomplete as of today. I have completed two semesters and still 2 more semesters to go.   I have dropped 3rd semester and never attended the 4th one. Coz,   I ran out of money. I didn't like the program as it contained too much coursework. A whole load of coursework unrelated to my area of research interest was hindering my effort towards getting into research. Suppose, I am interested in Machine Learning. But, I have to study Economics and so on.   Now, I found that I, actually, can apply to Ph.D. programs without completing an MSc program (there are a lot of universities which accept Ph.D. students without MSc). I have good GRE score, so the chance of getting into a Ph.D. program is very high. But, I am worried that my previous incomplete MSc program will discredit my CV and statement of purpose as the dropped semester would be considered as failed courses.  Would it be a crime to not to disclose the incomplete MSc program? What would be the possible consequence of concealing an incomplete degree?


Does GCM (or GHASH) only provide 64-bit security against forgeries?

In a  a doubt was voiced about my answer, which claims GCM to requires $2^{128}$ for a successful forgery. The doubt was that the square root needs to be taken meaning the security would be $2^{64}$.  So of course I immediately checked the relevant security theorem ():  $$\mathbf{Adv}^{\text{auth}}_{\operatorname{GCM}[\operatorname{Perm}(n),\tau]}(\mathcal A)\leq \frac{0.5(\sigma+q+q'+1)^2}{2^n}+\frac{q'(\ell_A+1)}{2^\tau}$$  with $\sigma$ being the total plaintext size in blocks, $q$ being the total number of encryption queries, $q'$ being the total number of decryption queries, $n$ being the size in bits of the underlying permutation, $\ell_A$ being maximum authenticated input length in blocks and $\tau$ being the tag size in bits.  Now clearly from this we can see that performing $2^{n/2}=2^{64}$ queries yields a strong enough advantage for a break.  Now my question is: When talking about "n-bits of security" or "needs $2^n$ operations to break", do we usually talk about "online" security, ie queries to an oracle can be done and cost $1$ or "offline" security where no oracles are available or do we need to make this decision depending on the situation?  TL;DR: Does GCM offer 64 or 128 bit security?


Generalizing polygon file while maintaining topology in QGIS?

I have a polygon Shapefile, which I need to generalize. How can I generalize the poligons and ensure that there are no topological errors like "slivers".   I already tried:   Vector -> Geometry Tools  -> polygones to lines Vector -> Geometry Tools  -> simplfy geometries ... here I can already see on the screen, that I am producing overlaps and gaps nevertheless now I try Vector -> Geometry Tools  -> lines to polgones   and here the program show an error and crashes


why are folder names green in color ubuntu 20.04

I have folders in green color when I do ls -l then they appear colored  what could be reason for this.


Question about Subrings and integraly closed

Proposition in abstract algebra. The book gives this as a proposition and asks the reader to do it as a exercise. It seems it should be easy.(Assuming every ring has a 1)  Let R be a subring of S. If S\R is closed under multiplication then R is integrally closed in S  I went by cotradicton let s be in R\S then. We get that $$ s^n+a_1s^{n-1}..sa_{n-1}+a_{n}=0 $$ From  and the a's are in R. Now I am thinking this $$ s^n=(-1)(a_1s^{n-1}..sa_{n-1}+a_{n}) $$ Now multiplying both sides by s again $$ ss^n=(-s)((a_1s^{n-1}..sa_{n-1}+a_{n}) $$ Now by closure $ss^n$ is in S\R which means the rest $(a_1s^{n-1}..sa_{n-1}+a_{n})$ is in S\R which means the a's are in it which is a contradiction Does this look correct?


Mockito.when().thenReturn() doesn't work or returns null

During the test there is a NullPointerException thrown. I tried to debug it and the only thing I worked out was that eventOptional is always null. Just as if Mockito.when().thenReturn() didn't work. Can anybody help? Here's my code for a tested service and for the test itself:  @Service public class EventService {      @Autowired      public EventService(EventRepository eventRepository) {         this.eventRepository = eventRepository;     }     //...     public void updateEvent(EventDTO eventDTO) {         Optional<Event> eventOptional = eventRepository.findOneById(eventDTO.getId());          eventOptional.orElseThrow(() -> new BadRequestException(EVENT_NOT_FOUND));         //...     } }   And the test class:  @RunWith(MockitoJUnitRunner.class) public class EventServiceTest {      @Mock     private EventRepository eventRepository;     @InjectMocks     private EventService eventService;      private Event sampleEventFromDb;      @Before     public void setUp() throws Exception {          MockitoAnnotations.initMocks(this);     }      @Test     public void shouldUpdateEventTestAndWithProperTime() throws Exception {         EventDTO eventDTOMock = Mockito.mock(EventDTO.class);          sampleEventFromDb = Event.builder()             .name("name")             .startDateTime(LocalDateTime.now())             .placeName("place")             .description("description")             .publicEvent(true)             .owner(new User())             .build();          Mockito.when(eventRepository.findOneById(anyString())).thenReturn(Optional.of(sampleEventFromDb));         Mockito.when(eventDTOMock.getId()).thenReturn("1");          eventService.updateEvent(eventDTOMock); //NullPointerException         //...     } }


I have problem when I try apt-get update i get error:     407  Proxy Authentication Required ( Forefront TMG requires   authorization to fulfill the request. Access to the Web Proxy filter   is denied.  )   How ever I can use internet from Mozilla, when I set proxy parameters. Any ideas how to fix this?      /etc/apt/apt.conf file all good.


I'm trying to obtain the Jeffreys' prior for a negative binomial distribution. I can't see where I go wrong, so if someone could help point that out that would be appreciated.  Okay, so the situation is this: I am to compare the prior distributions obtained using a binomial and a negative binomial, where (in both cases) there are $n$ trials and $m$ successes. I get the right answer for the binomial case, but not for the negative binomial.   Let's call the Jeffreys' prior $\pi_J(\theta)$. Then,  $$ \pi_J(\theta)\propto [I(\theta)]^{1/2}. $$  Under the regularity conditions (fulfilled as we are dealing with the exponential family),  $$ I(\theta)=-E\left(\frac{\partial^2 \log L(\theta|x)}{\partial \theta^2}\right) $$ where for the negative binomial $n$ is $x$ in the above expression (the total number of successes $m$ is fixed, $n$ is not). The distribution --I think-- is  $$ p(m|\theta)\propto\theta^m(1-\theta)^{n-m} $$ since $\theta$ is defined as the probability of success and $m$ is the number of successes. This is also the likelihood, since $m$ is a scalar and not a vector. Hence,  $$ L(\theta|n)\propto\theta^m(1-\theta)^{n-m}\\ \log L(\theta|n)=m\log\theta +(n-m)\log (1-\theta)\\ \frac{\partial\log L(\theta|n)}{\partial \theta}=\frac{m}{\theta}-\frac{n-m}{1-\theta}\\ \frac{\partial^2\log L(\theta|n)}{\partial \theta^2}=-\frac{m}{\theta^2}-\frac{n-m}{(1-\theta)^2} $$ so the Fisher information is  $$ I(\theta)=-E\left(\frac{\partial^2\log L(\theta|n)}{\partial \theta^2}\right)=\frac{m}{\theta^2}+\frac{E(n)-m}{(1-\theta)^2}=\frac{m}{\theta^2}+\frac{\frac{m\theta}{1-\theta}-m}{(1-\theta)^2}\\ =\frac{m(1-\theta)^2+\frac{m\theta^3}{(1-\theta)}-m\theta^2}{\theta^2(1-\theta)^2}=\frac{m(1-2\theta)+\frac{m\theta^3}{(1-\theta)}}{\theta^2(1-\theta)^2}\\ =\frac{m(1-2\theta)(1-\theta)+m\theta^3}{\theta^2(1-\theta)^3}=\frac{m(1-3\theta+2\theta^2+\theta^3)}{\theta^2(1-\theta)^3}\\ \propto\frac{1-3\theta+2\theta^2+\theta^3}{\theta^2(1-\theta)^3} $$  This, however, does not give me the correct answer. The correct answer is  $$ \pi_J(\theta)\propto \frac{1}{\theta(1-\theta)^{1/2}} $$ which means that the Information I get should be   $$ I(\theta)=\frac{1}{\theta^2(1-\theta)} $$ since the prior should be proportional to the square root of the information.   Can anyone find any mistakes? I wouldn't be surprised if I screwed something up with the set up of the distribution (successes vs failures with their respective probabilities, etc).   I used the expected value from  and I know the correct answer from .


Advice on alternatives to using dozens of check boxes in an interface

I wanted to get some UI design advice. I am not sure this is the proper forum to ask this question so here goes.  My situation is I have a table that has 51 bit values to hold the values of statutes.     In production, this table would have over 10,000 records for the different LocationID's.  The UI for this in its pure database for would have a page with the dozens of text boxes.  Is there a better, cleaner way to do this?  Any recommendation or links to how others have handled this situation.  Please feel free to post any additional questions if further clarification is needed.


Best option to connect Macbook Pro with Thunderbolt and HDMI to a monitor with DP and VGA

Macbook Pro: Retina, 15-inch, Mid 2015. macOS Catalina. Has HDMI and thunderbolt port. Monitor: VGA and Display Port. Already tried using a HDMI to VGA adapter but it doesn't work with mac at all. Is there any other way than to purchase expensive Apple adapters?


How to open an Esri Personal Geodatabase (*.mdb;) in QGIS 3.4 of 64 bit in Windows 10 Pro?

I am a learner. While I start to load Esri personal database, QGIS 3.4 does not support it.


claims that adding baking soda is crucial when soaking chickpeas. Is this true, and if so, what is the reason that this works?


How to emphasize within a listing two successive identifiers separated by a space?

I have this pgfplots code that I want to put in a lstlisting environment:  \pgfplotsset{    every axis x label/.append style = {       font = \small    },    every axis y label/.append style = {       font = \small,       rotate = -90,       xshift = 0.5em    } }   How can I convince the listings package that those strings like every axis x label have to be treated as identifiers? I don't like the idea of assigning the role of keyword to the single substrings every, axis, x, label.


Deep copy std::string::c_str() to char *

Currently I have a complex function that myself and our team are not wanting to refactor to utilize std::string and it takes a char* which is modified. How would I properly make a deep-copy of string::c_str() into a char*? I am not looking to modify the string's internally stored char*.  char *cstr = string.c_str();   fails because c_str() is const.


How to calculate percentiles from z-scores

We often get reference tables to match z-scores with equivalent percentiles.   Can anyone help me calculate percentiles from z-scores? What's the formula?   Thank you.


How can you use @ symbols in classnames when using SASS?

Is it possible to have an @ symbol in a classname when using sass? I keep getting compilation errors even though it seems to be valid syntax in CSS.  I want classnames like:  .u-6@sm {     width: 50%; }   I've tried a variaty of approaches using interpolation but can't get it to spit out the CSS with the @ symbol.  e.g.  $at-symbol: unquote('@'); .u-6#{$at-symbol}sm {     width: 50%; }   That doens't work. I also tried a function to return it and a mixin that accepts a symbol as a param but still nothing.  The weirdest thing is that if I do this:  .u-6\@sm {     width: 50%; }   it compiles fine with both backslash and the @ symbol. Huh? Whaa?  So why can't I use just the @?


How do i print the memory address of void**?

I am trying to print the void* memory address inside void**, like this:  #include <stdio.h> #include <stdlib.h>  int main(){      void** MyArray = malloc(500 * sizeof(void*));     printf("Last pointer: %p\n", *MyArray[499]);     free(MyArray);     return 0;  }   But when i try to compile I get a warning and an error:        Line: 6   Col: 31 in D:\C\test.c  [Warning] dereferencing 'void *' pointer   Line: 6 Col: 2 in D:\C\test.c [Error] invalid use of void expression      What I'm doing wrong? Thanks


Are Diffie-Hellman, RSA and other types of public key cryptography different?

Are these schemes fundamentally different? Are other schemes fundamentally different in the sense that you can do different operations with them (or the same operations, but needing different primitives)?  For instance, Whit Diffie is on record as saying that he originally much preferred RSA because it provided signatures (at the time, things like ElGamal etc were not invented so RSA seemed superior).  RSA is often used as “key transport”, which seems like something Diffie-Hellman cannot do? But in a sense you can do it: Merely compute $k=g^{ab}$ and use $k$ and some symmetric cipher to “transport” your session key $k_s$? This requires the use of a symmetric cipher, whereas RSA key transport does not. Maybe there are other ways of doing it that only require the same primitives as RSA?  In addition, DH schemes like ElGamal seem to all require randomness to produce signatures (I could be wrong?), whereas RSA does not (except for padding I suppose?), but RSA does seem to require a hash function (I could be wrong)? Are they fundamentally different?  So my question is, are there fundamentally different properties of certain public key encryption schemes? Especially RSA and DH?


simulate censored data (right censored) using R statistics

I want to generate right censored data, but I want to be able to pass in a parameter to a function to dictate that a certain percentage of the data will be censored. I have found this R-package:   simple.surv.sim {survsim}  But it seems to generate things randomly, I can get the proportion of censored data doing a summary statistic on the output dataframe from this simple.surv.sim function, after it generates the data . But how would one get a particular proportion of the data to be censored. [Note: I will be using the weibull distribution as the distribution of choice]  Hope someone can help.


Iterate through 2 Python list and get all x to y combinations

I have the following two lists: x = [1,2] y = [4,5,6] I want to iterate x by z. I have a variable called code set to NONE and another variable called value also set to NONE.  Here is the output I am aiming for: 1st iteration, code = 1 and value = 4 2nd iteration, code = 1 and value = 5 3rd iteration, code = 1 and value = 6 4th iteration, code = 2 and value = 4 5th iteration, code = 2 and value = 5 6th iteration, code = 2 and value = 6  Here is what I have tried: x = [1, 2] y = [4, 5, 6]  code = None value = None   for x_ids, y_ids in zip(x, y):     code = x_ids     value = y_ids     print("c", code)     print("v", value)  output:  c 1 v 4 c 2 v 5  Can anyone suggest how to get the output described above?


What is the default password for Ubuntu 12.04?

Possible Duplicate:          I've just had someone install Ubuntu 12.04. I am not a techie - just a user. I am now asked for a password which I do not have and has never been set. Is there a default one? Otherwise I have to work as a guest all the time... Not so great. I appreciate any help.


Whether to use weight or its z-score or percentile?

I am trying to do regression analysis with level of a chemical in blood as dependent variable and age, gender and weight of children as predicting variables. The sample size is about 5000. Age and weight are highly correlated in children. My doubts are:    Should I use z-scores or percentiles for weight rather than raw values?  Should I use some other technique rather than ordinary linear regression?  Do I need to check if data has normal distribution at this sample size?   Edit: I want to clarify regarding z-score or percentile here: I have ages as 5,6,7,8 etc with no fractional ages. I thought for each age I can calculate z-score or percentile of weight for that individual child and use it instead of raw weight. By this I can answer the question that 'Is being overweight for age has any effect on blood level of the chemical'? Is this reasonable argument? Also, this question differs from the earlier question and is not a duplicate. My questions 2 and 3 do not figure in the title.   Regarding a comment on biological issues by @DLDahly: The ages are 5-15 years. Biologically, I want to determine if the weight is a predictor of blood level of chemical, independent of age? Chemical level rises with age, but it is not clear if being overweight increases it further. Actually, one cannot rule out the possibility that this rise may be related mainly to weight and not to age as such.


A simple doubt in number theory problem for an even number,

I considered an even number $n\geq 9$, where it is divisible by some positive integer $k$.  Also, $k$ does not divide $\frac{n}{2}\ $ (negation of the hypothesis in my ).  Let $n = kq$.  Can we say that $q$ is even in this case? Can anyone help to get it theoretically?  Thanks a lot for the help.   My attempt:  Let $n = kq$.  Since $k$ does not divide $\frac{n}{2}$, we have   $n/2 = k.q_1 + r$ for $0<r\leq k-1$.  How to conclude the even or odd property of $k$ and $q$ here?


Can a number with $100$ $0$'s $100$ $1$'s and $100$ $2$'s ever be a perfect square? I have no idea where to even start. Some hints would be nice. Thanks in advance :)


Is there a way to break up an image file into separate polygons based on colour?

I have a set of land-use maps that I created years ago in ArcMap (see image attached), I need to do more work using them but I have since lost the shapefiles. Is there any way in ArcGIS that I can break this image into polygons based on the different colours of the image? Or do I need to redraw them all by hand?


Java: how to split text by just any possible newline/linebreak characters

Im trying to find a regex with whom i can split a certain Text by any possible new character. I know that i could use "\\r?\\n" as regex which would work in almost every case and for almost every platform.  But today i faced a problem where im receiving a String from a Swing component which can't be splitted with this regex like i was hoping.  If the String is printed into the eclipse console i can see that there are linebreaks but probably not using \r\n for linebreaks (dont know yet which special character it is actually, i can see only a the newlines in eclipse console and didn't find a way to display the unicode character for example).  After searching a while for a solution how i can determine these newlines i found another regex which is able to find these line breaks:  Matcher matcher = Pattern.compile("^(.*)$", Pattern.MULTILINE).matcher(>>String<<<);   Now im searching for a way how to combine these regex's or use just one expression to find just any newline.  Anyone a idea?  I found the reason:  My Text had some trailing new lines and i was using the wrong String split function. Instead of using  text.split("\\r?\\n")   i had to use   text.split("\\r?\\n", -1)   to get all lines...


Should I get a letter of recommendation from my mother, who is a famous researcher in my field?

My mother is a quite famous researcher (she has a PhD) on the field I want to do a PhD in. She works on the industry (not academia). I helped her on successful projects. She knows more about my work than my professors since we have worked much longer together.  Is it a good idea to ask for a recommendation letter from her? Since our personalities are very similar she can point out the high probability that I will be successful like her?


A software engineer used hp as username while installing Ubuntu on my device, and I want to change it to my name but all efforts have proved fruitless.  current state:  hp@phavor-george:~$   I want to change the hp part to my name, for example  muxx@phavor-george:~$


Is there any way to identify which posts use which gutenberg blocks?

Is there any way to list/report out which posts use a specific Gutenberg block in the post - almost like a 'search blocks' feature? I run a blog with about 1000 posts, and recently, one of the Gutenberg blocks plugins that I use has become incompatible with my theme, so I needed to disable it. I now have a large number of posts that I need to update and change any of the posts that used blocks supplied by the now-disabled plugin to use the more generic WP-supplied blocks. Does WP have a straightforward way to identify which posts have these blocks so I can avoid 'editing' every single post on my blog just to see if the invalid blocks are present? Thanks in advance. P.S. I'm new to SE, so if this is in the wrong area or doesnt belong here, just let me know.


Many users are experts in areas which they don't need to ask questions on, yet there knowledge is only spread in the stackexchange world through the answering of questions.  It would be fantastic if users had the option of blogging about certain areas, integrated into their user profiles, which are also searchable, allowing them to blog about their areas of expertise, and still be integrated into stackexchange.  This could even be a status symbol if you only allow users with a certain reputation in an area, to blog on that topic.  EDIT following replies:   I believe not all blog posts can be covered by raising a question and then answering it, some topics do not lend themselves to that paradigm.  Linking to a blog is not the same as having it's content in the stackexchange network. The content is not searchable in stack, is not associated with tags, voted on, or commented on in the same way. A blog post does fit into a Q&A paradigm, in that it is a sharing of knowledge, however typically on a more complicated scenario, like how to configure something, how to best approach a particular problem, etc. This functionality doesn't have to be used by everyone, but would add to the scope of the stackexchange set of websites, and would have a beneficial impact on their use on the internet.    So I still see this as being worthwhile, and in the stackexchange set of sites interests to introduce.  Edit 2: This would also help to ensure, that blog posts which are linked from stack answers, will be available instead of vanishing at some point in the future. (Some answers need comprehensive replies, which need detail which it's better to link to someone's blog post, then to copy and past the content from it.)


Can my husband board his flight 1 day before visa start date IF he lands in the UK on the start date?

My Husbands Visa is Valid from the 30th Sept (Sunday) I'm trying to find out if he can board a flight on the 29th to land on the 30th or if he must board the flight on the 30th when the visa is already valid? I have contacted British Airways (who he's flying with) and all they stated was 'It should be fine but you must contact the UK Goverment'   Does anybody know who I should contact to get it in writing? I can't seem to find an e-mail address for general visa flight inquires. Has anyone done this before and was it okay?  Thank you for any help anyone can give me! It is very much appreciated.


I am trying to solve this problem but nothing is thought on my mind. Please any one help me to solve this problem  $\sqrt{x + \sqrt {x + \sqrt{ x + \cdots } } } = 5$ then find the value of $x$.


Unable To Cancel Installation In Software Center (Matlab)

A Note: This question may be the exact same question as given in  but the solutions listed there haven't worked for me.  Question:   I am trying to terminate a software installation from Ubuntu Software Center. I tried installing matlab-support 0.0.17 from the software center:     This package does not provide MATLAB. Instead, it configures an   existing MATLAB installation to integrate more comfortably in Debian   installation.   However,  I didn't have MATLAB installed on my system and accidentally attempted to download matlab-support 0.0.17. As a result, I'm facing the following problem:  Whenever I open Ubuntu Software Center, I notice that there is a process always running. It shows matlab-support 0.0.17 installing...    I look for a way to terminate the installation from the Progress tab to get this:    Once there, I see no way to deselect or terminate the process.  Edit: Output for sudo apt-get install -f  Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.   Edit: Output for sudo apt-get upgrade  Reading package lists... Done Building dependency tree        Reading state information... Done The following packages have been kept back:   dpkg-dev libatlas3gf-base libblas-dev libblas3gf libdpkg-perl liblapack-dev liblapack3gf linux-headers-generic-lts-quantal   linux-image-generic-lts-quantal r-base-dev r8168-dkms texinfo 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.   Edit: Output for dpkg -l | grep matlab No output message:  anirudh@anirudh-Vostro-3445:~$ dpkg -l | grep matlab anirudh@anirudh-Vostro-3445:~$    Edit: Output for sudo apt-get install matlab-support  Reading package lists... Done Building dependency tree        Reading state information... Done The following NEW packages will be installed:   matlab-support 0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded. Need to get 0 B/27.9 kB of archives. After this operation, 165 kB of additional disk space will be used. debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Selecting previously unselected package matlab-support. (Reading database ... 187961 files and directories currently installed.) Unpacking matlab-support (from .../matlab-support_0.0.17_all.deb) ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Processing triggers for hicolor-icon-theme ... Processing triggers for man-db ... Setting up matlab-support (0.0.17) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing matlab-support (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  matlab-support E: Sub-process /usr/bin/dpkg returned an error code (1)   Edit: Output for sudo fuser -v /var/cache/debconf/config.dat                       USER        PID ACCESS COMMAND /var/cache/debconf/config.dat:                      root      11060 F.... dpkg-preconfigu   Edit: Another set of commands with output sudo kill -9 11060 and sudo apt-get install matlab-support :  anirudh@anirudh-Vostro-3445:~$ sudo kill -9 11060 anirudh@anirudh-Vostro-3445:~$ sudo apt-get install matlab-support E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   Edit: Output for sudo fuser /var/lib/dpkg/lock (No output message)  anirudh@anirudh-Vostro-3445:~$ sudo fuser /var/lib/dpkg/lock [sudo] password for anirudh:  anirudh@anirudh-Vostro-3445:~$