How to know the Employees.class is null or not using Java Relection?  Example Class: Employees.class  Problem:   employees.getName(); value getName is Mikel employees is null if employess != null is TRUE. this class already 'new Employees()'   Employees.Class  public class Employees{  private Long id;&lt;br&gt; private String kodStuff;&lt;br&gt; private String Name;&lt;br&gt;  //Getter and Setter&lt;br&gt; }   Example Process Method:  public void check(){     Employees employees = new Empoyees;     employees.setName("Mikel");     employees.setKodStuff("KL370");     //employees not save yet and process redirect check value of Name wuth return boolean     Boolean empty = checkName(employees);  }  public boolean checkName(Employees employees){     boolean notNull = false;     if(employees !=null &amp;&amp; StringUtils.isNotBlank(employees.getName())){ // this is line 11         notNull = true;     }     return notNull; }   Throws exception at line no '11':  java.lang.NullPointerException   How can i check null exception during process on line no.11?
I use object != null a lot to avoid . What is an alternative to: if (someobject != null) {     someobject.doCalc(); }
Scanning Java annotations at runtime Returning multiple values from a C++ function I have trouble on this question: "Characterize the groups G for which the map $$\iota: G \to G$$ sending $$x \mapsto x^{-1}$$ for all $x \in G$, is an automorphism of $G$." From  post I have seen that $G$ must be abelian. Can anyone propose another characteristic of $G$ that I can derive from the given conditions besides abelian? Thank you so much!! I am given that $V$ is n-dimensional vector space over $\mathbb{C}$ and $T \in L(V)$. And $T$ has least $m$ distinct nonzero eigenvalues. How do I show that $\text{null}(T^{n-m}) = \text{null}(T^{n-m+1})$?  I'm really not sure how to start here so just the first couple steps would be very helpful. Thanks!! Can the ship's captain really perform your wedding when in international waters? On , Mark Mayo posted a comment that any marriage has to be on dry land or close to it.  But I'm sure all of us have heard of ships' captains marrying couples at sea.  From the movie Casablanca:     Say, why don't we get married in Marseilles?   ...   Well, let's see. What about the engineer? Why can't he marry us on the train?   ...   Well, why not? The captain on a ship can. It doesn't seem fair that...    So is this fiction after all? If not how does it fit with Mark's comment? What special rules and such should we know?  If I'm travelling at sea with a significant other and wish to tie the knot, can we do so with any captain on any ship on any sea? Must it be international waters? Import/export 3ds format in Blender 2.8 I need to import and specially export in 3DS format. I know that I can import a file in 2.79 and the copy-paste to 2.8, but then when I copy-paste it back to 2.79 I'm having problems with textures missing. Is there any way to import/export 3ds in 2.8 without using any other version or software like we did in 2.79? The extension is missing in the add-ons repository either. Add default syntax highlighting for the [dart] tag I just approved several edits from a user adding  to questions with the  tag. Apparently , Google Code Prettify has added support for Dart.  I suggest it's time to follow suit and update the default syntax highlighting associated with the  tag. Adding it manually to every question sounds like way too much work, even if I all I have to do is click the "Approve" button. How to cluster time series? I have a question about cluster analysis. There are 3000 companies, which have to be clustered according to their power usage over 5 years. Each company has values for every hour during 5 years. I would like to find out if some companies have the same pattern in usage power over the time period. The results should be used for daily prediction of power usage. If you have some ideas how to cluster time series in SPSS, please share with me. I had recently faced a problem:     Solve the Diophantine Equation $x^2 - y! = 2001$.   Solving it was quite easy. You show how $\forall y \ge 6$, $9|y!$ and since $3$ divides the RHS, it must divide the LHS and if $3|x^2 \implies 9|x^2$ and so the LHS is divisible by $9$ and the RHS is not. Contradiction. Hence, the only solution is $(45, 4)$.  That made me wonder, how we can solve the Diophantine Equation $x^2 - y! = 2016$. We cannot apply the same logic here. $2016$ is a multiple of $9$ and it is clear that $3|x$ and $9 \nmid x$. How do I proceed from here? Consider the factorization into irreducibles of $6$ in $\mathbb{Z}[\sqrt{-5}]$. We have $6=2 \times 3$ and  $6=(1+\sqrt{-5}) \times (1-\sqrt{-5})$, i.e. $2$ distinct factorizations. And,  $$6^2=3 \times 3\times2\times2$$ $$=(1+\sqrt{-5}) \times (1-\sqrt{-5}) \times (1+\sqrt{-5}) \times (1-\sqrt{-5})$$ $$=(1+\sqrt{-5}) \times (1-\sqrt{-5})\times3\times2.$$ More generally, $6^n$ will have $n+1$ distinct factorizations into irreducibles in $\mathbb{Z}[\sqrt{-5}]$ by a simple combinatorial argument. But, can we construct a ring in which there exists an element that has an infinite number of distinct factorizations into irreducibles? To make life harder, can we construct an extension of $\mathbb{Z}$ in which this happens? I have been thinking about this for a while and have managed to find no foothold.. Any help is appreciated. Let $\mathbb{F}_{27}$ denote the finite field of size 27. For each $\alpha\in\mathbb{F}_{27}$ , define $ A_{\alpha}$ $=$ { $ 1, 1+\alpha , 1+\alpha+{\alpha}^2 , 1+\alpha+{\alpha}^2+{\alpha}^3 , .... $} . Then  prove that  the number of  $\alpha\in\mathbb{F}_{27}$ such that $|A_\alpha|$=26 equals 12.  $ 0\in A_\alpha $ if and only if $\alpha\neq 0$ For the first proof , the multiplicative group of the field $\mathbb{F}_{27}$ is cyclic and its order is 26  , so there are 12 generators in that group.   Now  I need  to  show  that  $ 1+\alpha+{\alpha}^2+.. {\alpha}^{25} $ =0  , where order of $\alpha$=26 . Since   $\alpha ^{26}$ =1 ($\alpha$-1)(1+$\alpha$+${\alpha}^2$+...+${\alpha}^{25}$)=0 , since $\alpha\neq 1$  , So $ 1+\alpha+...+{\alpha}^{25} $ =0 My question is , can I write these last two  lines?  I mean are those two lines alright to write? If those two lines are invalid then I need some help to show  $ 1+\alpha+{\alpha}^2+..+{\alpha}^{25} $=0  .Thanks How to center text vertically within a textbox in Photoshop It's pretty annoying that you can't center text vertically in Ps automatically, like you can in Indd. It's even more annoying that the bounding box of text can't be 'collapsed' or 'fit to text', like in Indd.  I could convert the text to shape, but then I lose coloring. I could convert to smart object, but then its not vector anymore, for when I export to pdf.  Is there a work around anyone knows of that would make it easier to center text vertically? Handling data in a PHP JSON Object Trends data from Twitter Search API in JSON.  Grabbing the file using:  $jsonurl = "http://search.twitter.com/trends.json"; $json = file_get_contents($jsonurl,0,null,null); $json_output = json_decode($json);   How do I work with data from this object. As an array? Only really need to extract data from the [name] values.  JSON object contains:  stdClass Object (     [trends] =&gt; Array         (             [0] =&gt; stdClass Object                 (                     [name] =&gt; Vote                     [url] =&gt; http://search.twitter.com/search?q=Vote                 )              [1] =&gt; stdClass Object                 (                     [name] =&gt; Halloween                     [url] =&gt; http://search.twitter.com/search?q=Halloween                 )              [2] =&gt; stdClass Object                 (                     [name] =&gt; Starbucks                     [url] =&gt; http://search.twitter.com/search?q=Starbucks                 )              [3] =&gt; stdClass Object                 (                     [name] =&gt; #flylady                     [url] =&gt; http://search.twitter.com/search?q=%23flylady                 )              [4] =&gt; stdClass Object                 (                     [name] =&gt; #votereport                     [url] =&gt; http://search.twitter.com/search?q=%23votereport                 )              [5] =&gt; stdClass Object                 (                     [name] =&gt; Election Day                     [url] =&gt; http://search.twitter.com/search?q=%22Election+Day%22                 )              [6] =&gt; stdClass Object                 (                     [name] =&gt; #PubCon                     [url] =&gt; http://search.twitter.com/search?q=%23PubCon                 )              [7] =&gt; stdClass Object                 (                     [name] =&gt; #defrag08                     [url] =&gt; http://search.twitter.com/search?q=%23defrag08                 )              [8] =&gt; stdClass Object                 (                     [name] =&gt; Melbourne Cup                     [url] =&gt; http://search.twitter.com/search?q=%22Melbourne+Cup%22                 )              [9] =&gt; stdClass Object                 (                     [name] =&gt; Cheney                     [url] =&gt; http://search.twitter.com/search?q=Cheney                 )          )      [as_of] =&gt; Mon, 03 Nov 2008 21:49:36 +0000 ) C++ STL Vector Iterator accessing members of an Object I think I've declared a Vector with an object correctly.  But, I don't know how to access it's members when looping with Iterator.  In my code, the line --->>  cout &lt;&lt; " " &lt;&lt; *Iter;  How do I print the contents of the members?  Like *Iter.m_PackLine ???  Not sure if I used the correct terminology, but appreciate the help!  Thanks  class CFileInfo {   public:       std::string m_PackLine;       std::string m_FileDateTime;       int m_NumDownloads; };  void main() {   CFileInfo packInfo;    vector&lt;CFileInfo, CFileInfo&amp;&gt; unsortedFiles;   vector&lt;CFileInfo, CFileInfo&amp;&gt;::iterator Iter;    packInfo.m_PackLine = "Sample Line 1";   packInfo.m_FileDateTime = "06/22/2008 04:34";   packInfo.m_NumDownloads = 0;   unsortedFiles.push_back(packInfo);    packInfo.m_PackLine = "Sample Line 2";   packInfo.m_FileDateTime = "12/05/2007 14:54";   packInfo.m_NumDownloads = 1;   unsortedFiles.push_back(packInfo);   for (Iter = unsortedFiles.begin(); Iter != unsortedFiles.end(); Iter++ )  {     cout &lt;&lt; " " &lt;&lt; *Iter; // !!! THIS IS WHERE I GET STUMPED     // How do I output values of the object members?   } }  // end main I have installed a vlc in centos 6.5. I want to run it as root. But I get the following error,      "VLC is not supposed to be run as root. Sorry. If you need to use   real-time priorities and/or privileged TCP ports you can use   vlc-wrapper (make sure it is Set-UID root and cannot be run by   non-trusted users first)." How to make terminal autocomplete when there are several files/directory? If I have several directories, like:  afoo abar   sometimes my terminal will refuse autocomplete when I press tab (e.g. "cd a" then tab), and print the list of directories instead. Sometimes it even throws a noisy, annoying sound. Any idea how to make it autocomplete in cases like this? E.g it can show abar first, and then afoo if I press tab again. I saw this is the case in windows, or some applciation in Ubuntu I want to make an arena where mobs will fight each other and a player can bet on one side or the other. For example: There are 2 skeletons in dyed armor; red and blue. Each color representing a team. When they spawn I want them to fight each and then when one dies I want it to announce which team is the winner and give the player the "money" due. I'm just not sure how to get the skeletons to attack each other without a player instigating it. Unable to acheive desired effect with ID mask I'm trying to make the render have an effect where the stars (which are exploded fragments) have a glowing glare-like effect and the other objects (i.e. film reel and cubes) are their natural colors.  However, despite having made the star objects all a pass index of 1 and the rest 0 by default, everything seems to render a green glowing effect that's supposed to be only for the objects with a pass index of 1.  To illustrate:  This is the render of the image naturally (I rendered at very low quality but it's just for demonstration purposes):    And this is with the composite nodes:    So in essence I want the objects in the the first render I showed to keep those colors, but the stars to have the colors of the green glowing effect.  As you can see from the 2nd picture everything has the green effect.  My node setup is pretty big so I will provide a link to download the  so you can see the nodes more clearly. How can adding a 2nd IV make the 1st IV significant? I have what is probably a simple question, but it is baffling me right now, so I am hoping you can help me out.  I have a least squares regression model, with one independent variable and one dependent variable. The relationship is not significant. Now I add a second independent variable. Now the relationship between the first independent variable and the dependent variable becomes significant.  How does this work? This is probably demonstrating some issue with my understanding, but to me, but I do not see how adding this second independent variable can make the first significant. Let $(a_n)_{n}\in\ell^2:=\ell^2(\mathbb{R})$ be a fixed sequence. Consider the subspace $$C=\{(x_n)_{n}\in\ell^2 : |x_n|\le a_n\text{ for all }n\in\mathbb{N}\}.$$  According to the book [Dunford and Schwartz, Linear operators part I, page 453] $C$ is compact in the $\ell^2$-norm, but there is no proof. How can I show that $C$ is indeed compact in $\ell^2$ ?