I cannot put a float value into the range, because I get an error
How to use a decimal range() step value?
How to handle calendar TimeZones using Java? I have a Timestamp value that comes from my application. The user can be in any given local TimeZone.  Since this date is used for a WebService that assumes the time given is always in GMT, I have a need to convert the user's parameter from say (EST) to (GMT). Here's the kicker: The user is oblivious to his TZ. He enters the creation date that he wants to send to the WS, so what I need is:  User enters: 5/1/2008 6:12 PM (EST)  The parameter to the WS needs to be: 5/1/2008 6:12 PM (GMT)  I know TimeStamps are always supposed to be in GMT by default, but when sending the parameter, even though I created my Calendar from the TS (which is supposed to be in GMT), the hours are always off unless the user is in GMT. What am I missing?  Timestamp issuedDate = (Timestamp) getACPValue(inputs_, "issuedDate"); Calendar issueDate = convertTimestampToJavaCalendar(issuedDate); ... private static java.util.Calendar convertTimestampToJavaCalendar(Timestamp ts_) {   java.util.Calendar cal = java.util.Calendar.getInstance(       GMT_TIMEZONE, EN_US_LOCALE);   cal.setTimeInMillis(ts_.getTime());   return cal; }   With the previous Code, this is what I get as a result (Short Format for easy reading):  [May 1, 2008 11:12 PM] "It looks straightforward, but actually it isn't" In , I asked about proof of statements which are simple but incorrect.   Here, I ask about statements which seems, at a first glance, straightforward, but if we try to write a proof, we can see it's much harder than it looked. So I expect the answers to contain:   the statement; why it looks easy to prove; why actually it isn't. Removing intercept from GLM for multiple factorial predictors only works for first factor in model shebang line not working with cr-lf Java Serialization with non serializable parts I have:  class MyClass extends MyClass2 implements Serializable {   //... }   In MyClass2 is a property that is not serializable. How can I serialize (and de-serialize) this object?  Correction: MyClass2 is, of course, not an interface but a class. Inverse of Heine–Cantor theorem Search window not opening in ArcMap? How is the Starkiller Base supposed to work more than one time, given how it draws its power? In Star Wars: The Force Awakens, once the Starkiller Base has depleted the star it is drawing power from, is it supposed to travel to another star where it can draw more power? Or is it non-mobile and supposed to fire a few, limited shots only? Or can it somehow reuse the star it is drawing power from, even after it has been depleted?  Its name suggests that it will "kill" or completely deplete the star it is drawing power from, but I haven't noticed an indication in the film that the Starkiller Base can travel to other stars. How would one throw an unwilling creature? My bugbear barbarian, who can lift about double the weight of a wolf, wanted to throw the wolf at a second wolf. How would we go about doing that given existing rules options? Execution order of event receivers and workflow on a list How do I make a bootable USB from Windows? Class imbalance strategies When dealing with the class imbalance problem in a binary classifier, there are three ways I know of to address it: over-sampling, under-sampling and using cost-sensitive methods.   Are there any guidelines, rules of thumb or general strategies to choose among these methods? A possible answer would be: over-sample when the positive class has more than 100 instances (I just made it up). Can a fired moderator be elected as a moderator? While this question is inspired by recent events, it is an independent question and not tied down to any specific moderator or situation.  There's precedent for a moderator who resigned their diamond to simply ask Stack Exchange for their diamond back, without having to stand for reelection. Obviously, this may not apply if the moderator did not resign, but was removed for cause by Stack Exchange.  If a moderator has been "fired" by Stack Exchange (has had their diamond removed involuntarily by corporate action), is the person eligible to pull a  and regain a diamond through the democratic process on one of our sites, or would any such attempt be blocked? I'm aware that there is a restriction on  from standing for election, but this is not the same thing as being stripped of a diamond (fired moderators, IME, aren't also given a full site suspension unless their behavior goes beyond "possibly not a very good moderator" into "supervillain" territory).  If there is no particular rule, what should that rule be?   Should fired moderators be immediately eligible to stand for election, subject only to community approval of them returning? Should fired moderators have to go through a separate re-vetting process with Stack Exchange to regain eligibility to stand for office? Should fired moderators have an ineligibility window in a similar way that suspended users have one (e.g. after X months or years after being fired, they may stand for election). Should fired moderators be forever banned from election?   In no way am I asking about the process for a fired moderator to seek restoration through corporate appeals, etc. I'm asking only about the community election process - if a site's community wants to elect a previously fired moderator, is this inherently objectionable to Stack Exchange? "This is a favorite question" tooltip when not favorite The new Chip credit cards are being introduced to provide better security to consumers, merchants and credit card vendors.    Sample Card:   (source: )    Card Reader &amp; PIN Entry:    Are they really better from a security point of view?  What are the advantages and disadvantages? Redshifting of Light and the expansion of the universe So I have learned in class that light can get red-shifted as it travels through space. As I understand it, space itself expands and stretches out the wavelength of the light. This results in the light having a lower frequency which equates to lowering its energy.  My question is, where does the energy of the light go? Energy must go somewhere!   Does the energy the light had before go into the mechanism that's expanding the space? I'm imagining that light is being stretched out when its being red-shifted. So would this mean that the energy is still there and that it is just spread out over more space? What happened to Startups SE? I really enjoyed that site. I've only posted on it once, but I enjoyed seeing other people's posts and appreciated reading about entrepreneurial dilemmas. Date Difference in php on days? I don't want to use the Super for that, I want to use Alt+Space instead. Best way to extract a subvector from a vector? Suppose I have a std::vector (let's call it myVec) of size N.  What's the simplest way to construct a new vector consisting of a copy of elements X through Y, where 0 &lt;= X &lt;= Y &lt;= N-1?  For example, myVec [100000] through myVec [100999] in a vector of size 150000.  If this cannot be done efficiently with a vector, is there another STL datatype that I should use instead?