python mktime(.timetuple()) returns different results in mac and linux
How to convert local time string to UTC?
Extracting text from HTML file using Python Looks like there is something wrong with reputation calculation:        +2*5 -6*2 = -2...   why there is +6 in reputation popup?  As @Catija said in comment calculation is OK in the profile:        Perhaps the issue is in the top-bar. How to compute $k$'th roots $\!\bmod n$? I have the following equation: $$ n \equiv M^k\mod(b) $$ where n, a, b are integers, and M is unknown. How do I solve this equation to find the M value? Those a and b are public keys of the RSA algorithm and n is the result of encryption. I need to find the encrypted message. $x^y = y^x$ for integers $x$ and $y$ Cropping the exact same part of several pictures I have several pictures that are exactly the same except for some small variations. It was one picture that was photoshopped in several different ways. Now, I need to crop them all (13 in total) but I need to crop exactly the same part of it. It needs to be pixel perfect.  How do I do that with Pixelmator? How to convert int[] to Integer[] in Java? How can I get my graphics card to be recognized in System Info? I am new to Linux/Ubuntu. I installed Ubuntu 11.10 on my Lenovo IdeaPad y510.   System info says    Graphics: unknown.   Driver: unknown,   Experience: Standard.   What should I do to use all my laptop hardware components to work properly with Ubuntu? Screenshot: Definition of Significant Figures In my textbooks,  are defined as:   “Significant figures by definition are the reliable digits in a number that are known with certainty.”  “A significant figure is the one which is known to be reasonably reliable.”    Reliable means giving the same result on successive trials or reliable information can be trusted to be accurate. However, at the end of each of the two definitions it is also written that ‘the last digit of a number is generally considered uncertain in the absence of qualifying information.' For example if the mass of an object is 12.248 gm, the last digit which is ‘8’ is uncertain by plus or minus 0.001 gm. This uncertainty is unreliability in the information. So, the digit ‘8’ is uncertain, and thus according to the definition 1 it is not a significant figure. However, the rules for significant figures say that ‘non-zero digits are all significant’. Due to the last digit ‘8’, if the object was weighed with careful handling minimizing the chances of error, the figures preceding ‘8’ that are (1, 2, 2, 4) are certain and reliable. If the mass of another object is 2 gm, then it is uncertain by plus or minus 1 gm i.e. its mass could be 3 gm or could be 1 gm.  ‘2’ is therefore not certain! What is the reason that significant figures are defined to be the reliable digits in a number? In what sense they are said to be reliable? Ubuntu gets stuck in a login loop Can you turn weather off in Minecraft? If a character is drunk, what are the penalties associated to it? Are there any benefits to it? I do remember a special prestige class for monks about it, but I don't remember anything specific in the core rulebook. I'm planning to attend a Californian university as a visiting scholar (not paid by the university) on a J-1 visa, for a total of four weeks; a colleague of mine will do the same, but for 12 weeks. I've been told (personally, ie. no citable sources) that, if you're staying on a J-1, you're effectively a California resident for the time you're there, and, therefore, need a Californian driver's license.  I've read up on this and found  that states:     If you are a visitor in California over 18 and have a valid driver   license from your home state or country, you may drive in this state   without getting a California driver license as long as your home state   license remains valid.      If you become a California resident, you must get a California driver   license within 10 days. Residency is established by voting in a   California election, paying resident tuition, filing for a homeowner's   property tax exemption, or any other privilege or benefit not   ordinarily extended to nonresidents.   I'm not planning to vote in any elections, nor will I own a home there, but I'm not sure what would constitute "privileges or benefits not ordinarily extended to nonresidents".  Do we need to get driver's licenses in California, or can we use our foreign licenses? How about day trips to Arizona or Nevada?  Note: this seems to be related to , but my question is specifically about staying there on a J-1. Is a constant condition more costly than switching shaders? Can I change the color of the last selected face, so that it is the same as the other selected faces?  Here, I've selected the left face then the right face. Note the right face is some sort of checkered or dithered pattern, and just the outline has the nice orange 'selected' color.    Here I've selected the top face, note the right face has now the nice color.    And here I've deselected the top face. Now, both of the remaining selected faces have the nice color. This is the result I'd rather see instead of image 1. I've started putting into practice the answer to . Yet I would like to change this so that there are brackets around the citations:   in the superscript in text,     in the superscript in footnote,  in the bibliography.   I've managed to get the first one and the last one working. The second one however, I don't know how to do this.   Note that I mainly write in english and in dutch, so I don't think there is much babel interference.  Also, would there be a way to order the footnotes so that first all ''normal'' \footnote{} are printed and below that all \sfcite{} citational footnotes (per page that is)?  Here's what I've managed to concoct:  \documentclass{article} \usepackage[english]{babel} \usepackage[pdfborder={0 0 0}]{hyperref} \usepackage[citestyle=numeric-comp,sorting=none,hyperref]{biblatex} \usepackage{filecontents}  % No brackets around the number of each bibliography entry \DeclareFieldFormat{labelnumberwidth}{\textbf{[#1]}}  %--------------------------------------------------------------- % Essentially verbatim from Joseph Wright % http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/ \makeatletter \ExecuteBibliographyOptions{citetracker,sorting=none}  \DeclareCiteCommand{\notefullcite}[\mkbibbrackets]     {\usebibmacro{cite:init}%         \usebibmacro{prenote}}     {\usebibmacro{citeindex}%         \usebibmacro{notefullcite}%         \usebibmacro{cite:comp}}     {}     {\usebibmacro{cite:dump}%         \usebibmacro{postnote}}  \newbibmacro*{notefullcite}{%     \ifciteseen         {}         {\footnotetext[\thefield{labelnumber}]{%             \usedriver{}{\thefield{entrytype}}\addperiod}}}  \DeclareCiteCommand{\sfcite}[\cbx@superscript]%     {\usebibmacro{cite:init}%         \let\multicitedelim=\supercitedelim         \iffieldundef{prenote}         {}         {\BibliographyWarning{Ignoring prenote argument}}%     \iffieldundef{postnote}         {}         {\BibliographyWarning{Ignoring postnote argument}}}     {\usebibmacro{citeindex}%         \usebibmacro{sfcite}%         \usebibmacro{cite:comp}}     {}     {\usebibmacro{cite:dump}}  \newbibmacro*{sfcite}{%     \ifciteseen         {}         {\xappto\cbx@citehook{%             \noexpand\footnotetext[\thefield{labelnumber}]{%             \fullcite{\thefield{entrykey}}\addperiod}}}}  \newrobustcmd{\cbx@superscript}[1]{%     \mkbibsuperscript{[#1]}%     \cbx@citehook     \global\let\cbx@citehook=\empty} \let\cbx@citehook=\empty \makeatother %---------------------------------------------------------------  \begin{filecontents}{\jobname.bib} @article{ref1,     hyphenation = {american},     title = {Natural Products as Sources of New Drugs over the Last 25 Years},     author = {Newman, D.J. and Cragg, G.M.},     journal = {J. of Nat. Prod.},     volume = {70},     number = {3},     pages = {461--477},     year = {2007}} @article{ref2,     hyphenation = {american},     title = {Natural products as leads to potential drugs: an old process or the new hope for drug discovery?},     author = {Newman, D.J.},     journal = {J. of Med. Chem.},     volume = {51},     number = {9},     pages = {2589--2599},     year = {2008}} @online{ref3,     author = {Quintin, C.},     title = {Les eponges},     url = {http://christophe.quintin.pagesperso-orange.fr/Liste_Doc.html},     urldate = {2009-05-03} } \end{filecontents}  \addbibresource{\jobname.bib}  \begin{document} First citation.\sfcite{ref1,ref2} Some text\footnote{A footnote}.   \pagebreak Second citation\sfcite{ref1}, second citation\sfcite{ref2}, first citation.\sfcite{ref3} \printbibliography \end{document} I'm creating a function where I need to pass an object so that it can be modified by the function. What is the difference between:  public void myFunction(ref MyClass someClass)   and  public void myFunction(out MyClass someClass)   Which should I use and why? Command for forcing a pointer ungrab (captured mouse release) Sometimes Firefox doesn't release the mouse after dragging, so I need to kill the application to force it to release its pointer grab.  Is there any command to force an application to ungrab the pointer without killing it? Use of "Or", inclusive or exclusive? My wife and I are playing a game where you roll dice and move so many spaces in a grid "vertically or horizontally".   In the use of English it is very common to say, this or the other when it comes to making a choice  (exclusive or). Now I know that "or" can also be inclusive, for example "she couldn't read or write", or can be clearly used as an xor "you either come or not" making the statement true for only one of the options but not both.   My issue is where it is not clear whether it is an inclusive/exclusive or, the best example being our game.   I argue that you can move in either direction (inclusive) and the normal use of this conjunction in English should be inclusive unless specified otherwise.   Is this right? I was told that the Galilean relative velocity rule does not apply to the speed of light. No matter how fast two objects are moving, the speed of light will remain same for both of them.   How and why is this possible?   Also, why can't anything travel faster than light? Let $G$ be a finite abelian group s.t. it contains a subgroup $H_{0} \neq (e)$ which lies in every subgroup $H \neq (e) $. Prove that $G$ must be cyclic.   Also what can be said about $o(G)$ ?    I'm clueless about this problem from Herstein. I tried to think $G$ might be a solvable group and its subgroups are all normal (as $G$ is abelian) . But I'm unable to get further.