Given a string personName, I'm trying to create a boolean condition2 equal to the condition  the first or last letter in personName is 'A' (case-insensitive). e.g., 'aha' or 'A'   Here's what I've tried so far:  boolean condition2; if (personName.charAt(0) = "a" || personName.charAt(personName.length()-1) = "a") {     condition2 = true; } else {     condition2 = false; }
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?
How to represent a list as a cycle How to print original variable's name in Python after it was returned from a function? I have enum and use the variables like myEnum.SomeNameA, myEnum.SomeNameB, etc.  When I return one of these variables from a function, can I print their names (such as myEnum.SomeNameA) instead of the value they returned? Referencing bib files with spaces in the filename How to make `sudo` preserve $PATH? Why does my wife's skin buzz when she's using her laptop? I opened Cairo-dock in my terminal with: open cairo-dock and that worked but if I close the terminal it goes with it. How can I keep it open regardless of the terminal? Google Chrome PPA upgrade invalid signature Show that the polynomial $X^5 + X^3 + \bar{1}$ in $(\mathbb{Z}/2\mathbb{Z}[X])$ is irreducible Grepping through .gz log files Does there exist a magical shell piping which would allow easily to grep through bunch of .gz log files without needing to extract them somewhere?  .gz files are Apache logs, result of log rotation. I'd like to quickly check how often certain URIs are accessed in the past. Shortcode display outside the div I have created a shortcode that retrives and displays a form.The content of the attribute in HTML.   function check_my_login( $atts)     {          return '&lt;form action="" name="" method="post" enctype="multipart/form-data"&gt;                &lt;div class="form-group"&gt;                     &lt;label for="description"&gt;Project Description&lt;/label&gt;                     &lt;textarea name="p_description" placeholder="Project Description" class="form-control"&gt;&lt;?php if (isset($_POST['p_description']) &amp;&amp; $_POST['p_description'] != '') echo $_POST['p_description'] ?&gt;&lt;/textarea&gt;                 &lt;/div&gt;                  &lt;div class="form-group"&gt;                     &lt;label&gt;Project Attachment&lt;/label&gt;                     &lt;input type="file" name="p_attachment"&gt;                 &lt;/div&gt; &lt;/form&gt;';     }     add_shortcode( 'kentaUser', 'check_my_login' );   Now use this shortcode inside the Post/page.   Like this    &lt;div class='manage_page'&gt;[kentaUser]&lt;/div&gt;  But my shortcode content display out side the div.Display upper side in post/page content.  &lt;div class='manage_page'&gt;&lt;/div&gt;    Any one short out this problem. Post Feedback link is broken I first noticed this a while back. But it has yet to resolve itself.  When I click on the  in the 10k tools, it hangs for a while.Then it gives me an error message: Show that the square of any prime number is the Factof of some integer Set multicolumn width to default table width Google Maps Location History is showing an incorrect location Alright, I'm toying around with converting a PIL image object back and forth to a numpy array so I can do some faster pixel by pixel transformations than PIL's PixelAccess object would allow.  I've figured out how to place the pixel information in a useful 3D numpy array by way of:  pic = Image.open("foo.jpg") pix = numpy.array(pic.getdata()).reshape(pic.size[0], pic.size[1], 3)   But I can't seem to figure out how to load it back into the PIL object after I've done all my awesome transforms.  I'm aware of the putdata() method, but can't quite seem to get it to behave. Functional Analysis: The rank of an operator detemines if it's a compact operator. Rewriting a custom-post-type permalink with taxonomy term? Does the everywhere differentiability of $f$ imply it is absolutely continuous on a compact interval? Suppose $f$ is differentiable everywhere on $[0,1]$. Must $f$ be absolutely continuous on $[0,1]$? I know this is true if $f'$ is integrable but I'm not sure in this more general case. How can I flush the output of the print function? How do I force Python's print function to output to the screen? Can I switch the alt and ctrl keys on my keyboard?