Parameter assignment not working as expected
Is Java "pass-by-reference" or "pass-by-value"?
I need to find a bottleneck and need to accurately as possible measure time.  Is the following code snippet the best way to measure the performance?  DateTime startTime = DateTime.Now;  // Some execution process  DateTime endTime = DateTime.Now; TimeSpan totalTimeTaken = endTime.Subtract(startTime); Helvetica font has jagged edges I use 'Helvetica' as my font and build my document using Texmaker. But the PDF generated has jagged edges while using this font and when I use a different font (say Times or even Helvetica sans-serif) it builds just fine.     Please suggest if there is anyway I can get over this. The problem with these jagged edges is that it appears very dull and unreadable at 100% resolution.  OK guys, now here is the MWE  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper,twoside,12pt]{book}  %% Language %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} %\usepackage[utf8]{inputenc} \usepackage{graphicx,color,subfigure}  %% Line Spacing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{setspace} %\singlespacing        %% 1-spacing (default) %\onehalfspacing       %% 1,5-spacing \doublespacing        %% 2-spacing  %% Other Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[left=1.5in, right=1.5in, top=1in, bottom=1in, includefoot, headheight=13.6pt]{geometry} \usepackage[pagebackref=true,breaklinks=true,letterpaper=true,colorlinks,bookmarks=false]{hyperref} \usepackage{helvet} \usepackage[square,numbers]{natbib} \usepackage{hyphenat} \usepackage{fancyhdr}   \begin{document}  \pagestyle{empty} %No headings for the first pages.  \cleardoublepage %The first chapter should start on an odd page.  \pagestyle{plain} %Now display headings: headings / fancy / ...  \pagebreak  %------------------------------------------------------------------------ \chapter{Divorce}   A major change that has occurred in the Western family is an increased incidence in divorce. Whereas in the past, divorce was a relatively rare occurrence, in recent times it has become quite commonplace. This change is borne out clearly in census figures. For example thirty years ago in Australia, only one marriage in ten ended in divorce; nowadays the figure is more than one in three (Australian Bureau of Statistics, 1996: p.45). A consequence of this change has been a substantial increase in the number of single parent families and the attendant problems that this brings (Kilmartin, 1997).   \end{document} Renaming hundreds of files at once for proper sorting I have a ton of files, all named stuff like 1.jpg, 2.jpg, 3.jpg, and so on up to 1439.jpg, however, I have a problem with one of my projects and alphabetizing. It will usually go in the order 1.jpg, 10.jpg, 11.jpg and so on.  What I need is some way to name the files so they are in the format such as 00001.jpg all the way up to 01439.jpg.  How would I be able to do this quickly and efficiently? Approaches to Sand on a Conveyor Belt How to skip kernel update? I am running Ubuntu 12.04.1 LTS i686 on VirtulBox. Every time I check the updates, there's a new Linux kernel. If I install the new kernel, I have to install the Virtulbox Guest Additions again and reboot the server. I don't want to do this every week. I know I can manually uncheck the kernel packages from update manager, but is there a way to skip the kernel update automatically? I found an answer here, but it's for Ubuntu 10. Thanks. Is there any standard notation for specifying dimension of a matrix after the matrix symbol? I want to explicitly specify dimension of matrices in some expressions, something like   $$\boldsymbol{A}_{m \times n} \boldsymbol{B}_{n \times m} = \boldsymbol{C}_{m \times m} \, .$$  Is there any more or less standard notation for this?    While this notation is generally unambiguous, I think it become ambiguous, for example, in the following case. Suppose that I have some column or row vector which is conjugate transpose of correspondingly row or column vector. If I write it in the following way  $$\boldsymbol{A}_{n \times 1}^{\dagger} \, ,$$ we can have 2 different interpretations:   matrix $\boldsymbol{A}_{n \times 1}$ is $n \times 1$ column vector and by $\boldsymbol{A}_{n \times 1}^{\dagger}$ I'm referring to its conjugate transpose which is $1 \times n$ row vector; matrix $\boldsymbol{A}_{n \times 1}^{\dagger}$ itself is $n \times 1$ column vector which is conjugate transpose of $1 \times n$ row vector $\boldsymbol{A}$. Mclaurins with $e^{\sin(x)}$ To evaluate $e^{\sin(x)}$ I use the standard series $e^t$ and $\sin(t)$, combining them gives me:  $e^t = 1+t+\dfrac{t^2}{2!}+\dfrac{t^3}{3!}+\dfrac{t^4}{4!}+O(t^5)$  $\sin(t) = t-\dfrac{t^3}{3!}+O(t^5)$  $\therefore e^{\sin(x)} = 1+\sin(x)+\dfrac{\sin^2(x)}{2!}+\cdots+O(x^5)$  $\iff e^{\sin(x)}=1+\left(x-\dfrac{x^3}{6}\right)+\dfrac{\left(x-\frac{x^3}{6}\right)^2}{2}+\dfrac{x^3}{6}+O(x^5) = 1+x +\dfrac{x^2}{2}-\dfrac{x^4}{6} + O(x^5)$  In the last step, I only evaluate up to $\sin^3x$ term, everything above has a grade equal to or greater than $x^5$  However, I'm wrong. According to Wolfram, the series expansion for $e^{\sin x} = 1+x+\dfrac{x^2}{2}-\dfrac{x^4}{8}+O(x^5)$.  What did I do wrong? I can't seem to find what or where. Derivative of $f(x)=|x|$ Why does gulp.src not like being passed an array of complete paths to files? I'm sure everyone is familiar with the Ship of Theseus paradox, basically "If you replace parts of a ship over time until none of the original ship is left, is the end product still the same ship?"  I just read pop philosophy books, so spare me if this is an idiotic question, but could this be applied to the Brain and consciousness? If you were the take individual atoms/neurons, and somehow replace them with its exact copy one at a time, how would the person experience that?   I don't think there would be an interruption of consciousness, but at the end it's a completely separate (but identical) brain from the one you started with. Exactly as if you had just cloned the whole thing, right? But without interruption.  What interests me is the gradual transition of consciousness here, is it possible to know how that would  work?  I think I remember hearing people argue similarly for both the existence of a transcendent soul and also AI consciousness. And the only other discussion I found of this was on a flat earth forum, so I don't know what to make of that.   I hope I articulated my question clearly. Thank you! Found an error in my thesis I've found a error in my thesis recently, after its submission. I made a mistake that wrongly accepted the hypothesis which should be rejected. What should I do?? How to submit webform programmaticaly? "This webpage has a redirect loop" in Chrome but working fine on FF and IE? Why don't brakes come with 'Safety Levers' any more? It used to be very common to see bikes with dual pull brake levers (if that's even the right name) as shown below. However now it seems almost impossible to find brakes like this.  Even finding a picture to post was hard.  It seems like it would be quite useful to be able to brake from various hand positions.  There was an answer I read a while back (can't find it now) that stated that there was a reason they got rid of those, but no explanation as to why. So any technical reason, or is it just for looks? I'm writing up my dissertation and I'm really confused where to use "the". Examples:     In this experiment, (the?) heat transfer coefficient was calculated, allowing to estimate (the?)frost thickness.    And:     Firstly, (the?) air properties are defined.   And:     As (the?) crystals grow in radius, the amount of air in (the?) ice is reduced, due to (the?) ice becoming more packed.   None of the nouns mentioned above have been used for the first time, so I rule out the use of "a".   Would appreciate any help. Vertical Text in Wpf TextBlock Is it possible to display the text in a TextBlock vertically so that all letters are stacked upon each other (not rotated with LayoutTransform)? Access nested dictionary items via a list of keys? On proving that a finitely generated group has a finite number of subgroups with index $n$. Theorem: If $G$ is a finitely generated group, then it has a finite (maybe zero) number of subgroups of index $n$ for any $n\in \mathbb{N}$.   is a sketch of a proof. It consists of assuming such a subgroup $H$ exists, and allowing $G$ to act on $G/H$ by left multiplication. Such action defines a homomorphism $$\phi :G \rightarrow \text{Sym}(G/H)\cong \mathbb{S}_n$$  If $G=\langle g_1, \ldots ,g_r\rangle$, then the homomorphism is uniquely determined by where it sends the generators $g_i$. In particular, there are at most $(n!)^r$ such homomorphisms.  The last step of the proof requires one to notice that a different subgroup $H'$ of index $n$ in $G$ would produce a different homomorphism, and here is where I'm struggling. I've been able to show that $\text{ker}(\phi )=\text{core}(H)$, yet haven't been able to rule out the possibility of $\text{core}(H)=\text{core}(H')$. Copying applications from applications folder to external and reinstalling osx Is it possible to copy all my applications from the applications folder onto an external, format my mac, reinstall OS X and finally copy the applications back into the applications folder for installing them?  Will that work? I am asking because my macbook seems to be behaving in a very odd manner, has become excessively sluggish and is preventing me from recording anything in logic.. I have tried the usual freeing up space, clean desktop, fixing permissions, verifying and repairing disk as well as resetting pram and making sure I have all the latest software and firmware updates. The macbook is only 8 months old and is running Lion with 8gb of ram, I really cannot understand what is wrong with it. Even when trying to watch a movie, the player will get serious audio/video synchronisation issues and I noticed that every time my wifi is on the fans speed up like a plane taking off. I even checked and it is clean from any dust. I am perplexed :(   If anyone could help me please, I would greatly appreciate it.  Thanks in advance! Sometimes it is convenient to refer to a group of equations by a letter and a number.  For example:   2+1   (A1) 2+4   (A2) x^4   (B3) x^e   (B4)   Placing  \tag{A\theequation}\label{eqn:thisone}\stepcounter{equation}} instead of just \label{eqn:thisone} works, but seems hacky (especially manually stepping the counter).   Is there a better way?