I am trying to use the value of a String obtained through JOptionPane. However, there is a problem with reading the String. What am I doing wrong here?   import javax.swing.JOptionPane; public class convertNumber123 {         public static void main(String[] args){             String numsystem1;             numsystem1 = JOptionPane.showInputDialog("Please enter the numeral system that you want to convert from: binary, octal, decimal or hexadecimal.");              if (numsystem1 == "Binary" || numsystem1 == "Octal" || numsystem1 == "Decimal" || numsystem1 == "Hexadecimal")                 System.out.println (numsystem1 + "it is!");             else                  System.out.println ("Please, enter the correct system name.");         } }
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?
Is it possible to match encrypted documents using user-defined search terms? Suppose I am storing a number of encrypted documents in a database. I would like to make it possible to identify the subset of documents whose contents match user-specified search terms without a) maintaining a plaintext index or b) decrypting documents on the fly. Is there any way to accomplish this securely?  By the same token, I'm wondering if a collection of encrypted documents can be sorted according to an encrypted attribute (e.g., document title) without first decrypting all attribute values. Does someone know if the following is true:  Let $\mathbb{X}$ be some arbitrary Banach space. $\{x_k \}_{k=1}^{\infty} \in \mathbb{X}$ is a sequence chosen from $\mathbb{X}$.  Now, if the series  $$\sum_{k=1}^\infty \|x_k\|_X$$ converges, would the "more generic" series $$\sum_{k=1}^\infty x_k$$  also converge?  If yes, could you please give the proof (or just mark the proof steps) ?  Thank you. Why does Python code use len() function instead of a length method? I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object.  Update  Ok, I realized I was embarrassingly mistaken. __len__() is actually a method of a string object. It just seems weird to see object oriented code in Python using the len function on string objects. Furthermore, it's also weird to see __len__ as the name instead of just len. Is there a way to force a C# class to implement certain static functions? I am developing a set of classes that implement a common interface. A consumer of my library shall expect each of these classes to implement a certain set of static functions. Is there anyway that I can decorate these class so that the compiler will catch the case where one of the functions is not implemented.  I know it will eventually be caught when building the consuming code. And I also know how to get around this problem using a kind of factory class.  Just curious to know if there is any syntax/attributes out there for requiring static functions on a class.  Ed Removed the word 'interface' to avoid confusion. How do I change the email address used for Google Play? My email address I use for the Play Store will be invalid soon, so I need to change it. However I don't want to make a new account because I want to keep all my apps. How can I do that? How to add some non-standard font to a website? Is there a way to add some custom font on a website without using images,  or some other graphics?  For example, I was working on a wedding website, and I found a lot of nice fonts for that subject. But I can't find the right way to add that font on the server. And how do I include that font with CSS into the HTML? Is this possible to do without graphics? Calculating RSA private exponent when given public exponent and the modulus factors using extended euclid I have this alias set in my system /etc/bashrc file:  alias root="sudo !!"   The intention of this being to run the last used command using sudo of course. When used, it of course appears to substitute the last command in history to the bashrc file upon shell initialization, and not the actual command that you would get if you were to run sudo !! in an interactive shell. I've also tried alias root="sudo fc -s" to no avail.  I realize this is probably something to do with how the BASH does command substitutions, but can someone explain why this is, and provide a usable substitute?  I'm running BASH version 3.2.51(1)-release (x86_64-apple-darwin13). What is the easiest way to export just the selected objects in Illustrator? The title says it all, I want to know what the simplest way to export the selected objects.  In Inkscape, there is a menu option called export selected which does just this.    The aforementioned option lets you export the selection as a composite image or as a batch of individual images.  Both would be nice, but in this scenario I want to export the selected objects as a single image.  I can already create a new document, and paste in the selected items.  I am looking for a way that is easier than this.  How can I save / output / export only the objects I currently have selected, to an image file, in Adobe Illustrator CS5? How can I make a material only apply to a side of a plane? Why is the network configuration I set in /etc/network/interfaces ignored on Ubuntu 17.10? Movie about gene therapy and genetics-based jobs I saw a movie several years ago and I have not been able to find it since.  It was about a dystopian society where parents could modify the genes of their children before birth.  Some individuals, including the protagonist, had not had this done, and so had a somewhat inferior genetic makeup.  Jobs are based on the results of genetic tests, and the protagonist, a male, was slated for a less than ideal job. In the movie, he fakes his identity and has major surgery to make him a little taller to match his ID. He is trying to get his dream job (astronaut?).  The only other parts I remember are   the protagonist, to keep up the ruse, managing to run on a treadmill faster than his  genetic limit a very suspicious character pulling the protagonist's DNA from a hair left in a comb The specified DSN contains an architecture mismatch Error Maximum Likelihood Estimator for $\theta$ when $X_1,\dots, X_n \sim U(-\theta,\theta)$ Exercise :     Calculate a Maximum Likelihood Estimator for the model $X_1,\dots, X_n \; \sim U(-\theta,\theta)$.   Solution :  The distribution function $f(x)$ for the given Uniform model is :  $$f(x) = \begin{cases} 1/2\theta, \; \; -\theta \leq x \leq \theta \\ 0 \quad \; \; , \quad\text{elsewhere} \end{cases}$$  Thus, we can calculate the likelihood function as :  $$L(\theta)=\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n\mathbb I_{[-\theta,\theta]}(x_i)= \bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[0,\theta]}(|x_i|) $$  $$=$$  $$\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[-\infty,\theta]}(|x_i|)\prod_{i=1}^n \mathbb I_{[0, +\infty]}(|x_i|)$$  $$=$$  $$\boxed{\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[-\infty,\theta]}(\max|x_i|)}$$  Question : How does one derive the final expression in the box from the previous one ? I can't seem to comprehend how this is equal to the step before.  Other than that, to find the maximum likelihood estimator you need a $\theta$ sufficiently small but also $\max |x_i| \leq \theta$ which means that the MLE is : $\hat{\theta} = \max |x_i|$. The space obtained by identifying the antipodal points of a circle "Much of it is" or "Much of it are"? I'm writing an college-entrance essay and for me it's imperative that I understand and implement the correct one of these two expressions:     "Much of it is" or "Much of it are"   If you need context:     I'm having trouble with my writing. The reason I'm having trouble is that much of it is about....   Should there be an "is" or an "are"? Relation bewteen Hessian Matrix and Curvature According to ,  It describes the local curvature of a function.   AFAIK, for one-variable function $f(x)$, its local curvature is  $$\kappa = \frac{|f''|}{(1 + f'^2)^{3/2}},$$ and its Hessian matrix is  $$\mathcal{Hess}(f) = [f''],$$ right? And here is my problem, I think the local curvature is not just described by its Hessian matrix, because $f'$ also has its role in it, doesn't it?  And furthermore, for 2-variable function $f(x,y)$, its Hessian matrix is  $$\mathcal{Hess}(f) = \left[ \begin{array}{cc} f_{xx}'' &amp; f_{xy}'' \\ f_{xy}'' &amp; f_{yy}'' \end{array} \right].$$ How does it relate to the local curvature of $f(x,y)$? I need to prove that $K\subseteq \mathbb{R}^n$ is a compact space iff every continuous function  in $K$ is bounded.  One direction is obvious because of Weierstrass theorem. How can i prove the other direction? I tried to assume the opposite but it didn't work for me.  Thanks a lot. Windows 7 "Waiting for background program to close" I am using Windows 7 Home Premium. When I shut down my computer why does the screen show this:    Before shutting down I'm close all programs. Enumerate paragraphs and subparagraphs like sections but with letters I'm using pandoc and in my template.tex exists this code to make the paragraphs and subparagraphs to behave like sections.  % Redefines (sub)paragraphs to behave more like sections \ifx\paragraph\undefined\else \let\oldparagraph\paragraph \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} \fi \ifx\subparagraph\undefined\else \let\oldsubparagraph\subparagraph \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \fi   This code generate number like this:  1. chapter  1.1 section  1.1.1 subsection  1.1.1.1 subsubsection  1.1.1.1.1 paragraph  1.1.1.1.1.1 subparagraph   How to change this code to enumerate with letter like this:  1. chapter  1.1 section  1.1.1 subsection  1.1.1.1 subsubsection  1.1.1.1.a paragraph  1.1.1.1.a.a subparagraph