Is there a better way to trim a DateTime to a specific precision?
How to truncate milliseconds off of a .NET DateTime
Say, I'm given a filename like libasound.so.2. Is there a way to query the package manager to correlate the filename with its corresponding package?  I'm interested to get answers for any package manager, but my primary focus is on apt and yum. Per the title, does $\displaystyle\sum_{n=1}^{\infty} \sin(\pi(2+\sqrt{3})^n)$ converge? Converge absolutely?   I'm stuck on this question, not sure how to approach it.  Thank you! How to prove that $\lim\limits_{x\to0}\frac{\sin x}x=1$? For each $y \in \mathbb{R}$ either no $x$ with $f(x) = y$ or two such values of $x$. Show that $f$ is discontinuous. This is from Apostol's Mathematical Analysis.  Let $f$ be a function defined in $[0, 1]$ such that for each real number $y$ either there is no value of $x \in [0, 1]$ such that $f(x) = y$ or there are exactly two such values of $x$. Prove that a) $f$ must be discontinuous on $[0, 1]$. b) $f$ has an infinite number of discontinuities in $[0, 1]$.  Long back I had tried to solve the problem. I reasoned for a) as follows: Suppose that $f$ is continuous and let $m, M$ be its minimum and maximum values on $[0, 1]$. Clearly if $m = M$ then $f$ is constant and clearly for every $x \in [0, 1]$ we have $f(x) = m = M$ which contradicts given property of $f$. So we must have $m &lt; M$. Clearly there are now four distinct points $a, b, c, d$ in $[0, 1]$ such that $f(a) = f(b) = m, f(c) = f(d) = M$. By checking possible linear orderings of $a, b, c, d$ I could find a find a value of $y \in (m, M)$ for which there exist more than 2 values of $x$ such that $f(x) = y$. However this approach looks very clumsy and I suspect much simpler and easier proof is possible. Part b) seemed bit complex and my only guess was that probably $f$ was discontinuous on each subinterval of $[0, 1]$ but I could not prove this claim (may be the claim is wrong!). Perhaps there is a simpler solution to this part of the problem. Apostol's also asks to provide an example of such a function. Any hints on the overall problem will be appreciated.  Update: After looking at Marc's answer, I think I have found a way to show that there are infinitely many discontinuities. Earlier the solution was a part of the question itself but it made the question look quite lengthy hence I moved it to a separate answer. In the beginning of the series, it's mentioned that Muggle-born wizards/witches are identified due to inadvertent spell-casting. However, it seems like later in the book, disarmed wizards/witches are completely helpless.   What is the explanation for why some spells can be cast without a wand and is there an in-universe explanation for why this isn't done? Also, are there spells that can be cast non-verbally (with/without a wand)? How do I migrate an SVN repository with history to a new Git repository? I need to customize my references in the following style using biblatexs Alpha style having the columns Label, Author, and Title and Other Information.    Till now with your help I could already change the square brackets to slashes.   My code so far is:   \documentclass[12pt]{scrartcl}  .  .   \usepackage[% natbib        = true, backend       = bibtex8, %bibtex, biber style         = alphabetic, %citestyle     = alphabetic, maxcitenames  = 2, mincitenames  = 1, %bibstyle      = alphabetic, %authoryear, %draft, %, sorting       = nyvt, maxbibnames   = 6, minbibnames   = 6, language      = ngerman, date          = long, backref       = false, backrefstyle  = none,  % none, three, two, two+, three+, all+ firstinits=true  ]{biblatex}    \usepackage[babel,german=quotes]{csquotes}    \bibliography{input/literatur}      \newrobustcmd{\mkbibslashes}[1]{/#1/}      \DeclareFieldFormat{labelalphawidth}{\mkbibslashes{#1}}    \DeclareFieldFormat{shorthandwidth}{\mkbibslashes{#1}}     \DeclareCiteCommand{\cite}[\mkbibslashes]    {\usebibmacro{prenote}}    {\usebibmacro{citeindex}% \usebibmacro{cite}}    {\multicitedelim}    {\usebibmacro{postnote}}    \renewcaptionname{ngerman}{\refname}{Literaturverzeichnis}   .   .   .   Thanks again Trouble Viewing Whole HDR Image as cycles world When I load an HDR image into an environment texture using Cycles Render, only a small fraction of the image appears. I have a feeling it's an easy fix, but I can not find what needs to be changed. MacOS dmg file question Not entirely sure if this is where to ask this, but I can't find another place to...  I've recently switched from Windows to Mac and I am trying to understand more in depth what I'm working with.  My question is: are .dmg files the equivalent of .zip files in Windows? I came to this theory when downloading a .dmg and when I opened it, it contained a .app and and text file read me. To me, this seems like a compressed file.   Is this correct? How to find a point on a line at a given distance from a given point on the same line (given the equation of the line)? You are given a point P(x,y) on a line of equation ax + by + c = 0. I want another point, Q(a,b) on the same line which is at a distance d from P. There will be two points. I want to find both and know which side of P each one lies.  There are related questions in this forum, but I didn't get what I am exactly looking for. Sorry for beating around the bush, and thanks for any help... Please give me an elaborate explanation. Thanks once again!!! maximum of two uniform distributions I have a question. Let's suppose that the two random variables $X1$ and $X2$ follow two Uniform distributions that are independent but have different parameters:  $X1 \sim Uniform(l1, u1)$  $X2 \sim Uniform(l2,u2)$  If we define X3 as the maximum of X1, and X2, i.e., $X3 = max(X1, X2)$, what kind of distribution would it be? It is certainly not a uniform and I can calculate the cumulative probability, i.e., $p(X3 &lt;= a)$, because $p(X3 &lt;= a) = p(X1 &lt;= a) p(X2 &lt;= a)$. But, I wonder if there exists any density function that can model X3. How to read command line arguments of another process in C#? How can I obtain the command line arguments of another process?   Using static functions of the System.Diagnostics.Process class I can obtain a list of running processes, e.g. by name:  Process[] processList = Process.GetProcessesByName(processName);   However, there is no way to access the command line used to start this process. How would one do that? Pagination go to first page if i'm on last post I have a custom post type and used get_next_post() and get_previous_post() to create a simple pagination. However i need to create a pagination loop (if that is the correct term). If i'm on the first post i need to browse back to the last post and if i'm on the last post i need to browse to the first post. Is there a simple way to do this that i haven't seen but Google, this site and the codex has not been very helpfull :/  The current code i have is. I've tried to use wp_list_pages and other functions but with little luck.  $next_post = get_next_post(); $prev_post = get_previous_post(); $nav = array(     "next_post" =&gt; array(         "url"       =&gt; get_permalink($next_post-&gt;ID),         "id"        =&gt; $next_post-&gt;ID,         "titill"    =&gt; get_field("vinstri_titill", $next_post-&gt;ID)." - ".get_field("vinstri_undirtitill", $next_post-&gt;ID)     ),     "prev_post" =&gt; array(         "url"       =&gt; get_permalink($prev_post-&gt;ID),         "id"        =&gt; $prev_post-&gt;ID,         "titill"    =&gt; get_field("vinstri_titill", $prev_post-&gt;ID)." - ".get_field("vinstri_undirtitill", $prev_post-&gt;ID)     ), ); Beamer how to change color of infolines and frame title How could I change the color of color of infolines and frame title in beamer. I am using this now   \documentclass[xcolor=dvipsnames]{beamer} \usetheme{CambridgeUS} \useinnertheme{rectangles} \useoutertheme{infolines} \usecolortheme[named=Brown]{structure}    I need to change the color from red to brown. [named=Brown] doesn't work for \useoutertheme{infolines}. This is my current output. I also need to change the background of frame title (mouse pointer) How do I execute a file from a FAT USB drive? I'm trying to install a portable app onto my USB drive such that it is compatible with both Ubuntu and Windows (specifically, a program called eToys). Support is already built into the app for both operating systems - there's etoys.sh for Ubuntu and etoys.exe for Windows. I decided to install onto a FAT drive since that can be read from both systems. This works fine for Windows, but for some reason I cannot execute etoys.sh on Ubuntu.  The problem is not with the file - when the whole folder is copied to the local hard drive, the app works great in Ubuntu. But when I try to execute it from the USB, it opens the file in a text editor.  I then tried to run it from a terminal, but I got the message Permission denied.  I've had the same problem with other executables as well.  Is there an easy way to execute things from a USB stick? How to implement keyboard shortcuts on websites When I get exceptions, it is often from deep within the call stack.  When this happens, more often than not, the actual offending line of code is hidden from me:  tmp.rb:7:in `t': undefined method `bar' for nil:NilClass (NoMethodError)         from tmp.rb:10:in `s'         from tmp.rb:13:in `r'         from tmp.rb:16:in `q'         from tmp.rb:19:in `p'         from tmp.rb:22:in `o'         from tmp.rb:25:in `n'         from tmp.rb:28:in `m'         from tmp.rb:31:in `l'          ... 8 levels...         from tmp.rb:58:in `c'         from tmp.rb:61:in `b'         from tmp.rb:64:in `a'         from tmp.rb:67   That "... 8 levels..." truncation is causing me a great deal of trouble.  I'm not having much success googling for this one:  How do I tell ruby that I want dumps to include the full stack? Show that $C[a,b]$ is a complete space under the metric $d(f,g)=\sup_{t\in [a,b]}|f(t)-g(t)|$. When customers buy things from a store, you say:  (1) Customers give ABC Store business.  If I "turn this around", can I say:  (2) ABC Store obtains or acquires business from its customers.  Do these verbs work in (2)? In the Unity3D game engine, a common code sequence for getting remote data is this:  WWW www = new WWW("http://remote.com/data/location/with/texture.png"); yield return www;   What is the underlying mechanism here?  I know we use the yield mechanism in order to allow the next frame to be processed, while the download is being completed. But what is going on under the hood when we do the yield return www ?   What method is being called (if any, on the WWW class)? Is Unity using threads? Is the "upper" Unity layer getting hold of www instance and doing something?  EDIT:   This question is specifically about Unity3D internals. I'm not interested in explanations of how yield statement works in C#. Instead, I'm looking for an inside view of how Unity deals with these constructions, to allow, for example, to WWW to download a piece of data in a distributed manner across several frames.