Applications of bitwise operators in C and their efficiency?
Real world use cases of bitwise operators
When using the ssh or ftp commands from the Bash shell, does the server that I am connecting to learn of the domain name used? I understand that the domain name is locally translated into an IP address via DNS. In HTTP, after that happens, the server is told the original domain name as well in order to serve the correct page, or to present the correct TLS cert (SNI).  host serverfault.com GET /   Does a similar phenomenon happen when connecting to ssh or ftp?  I ask because I am  trying to ssh into a server (GoDaddy webhosting) which expects a domain name, but is not letting me in when I try to connect via user@IPaddress as the DNS is not yet moved to the GoDaddy IP address. I'm trying to typeset SuperCollider code using the listings package.  Any "freestanding" identifiers that begin with a capital letter are class names, and should be highlighted; by "freestanding", I mean outside of strings or comments. I would be tickled pink if listings could let you define identifiers in terms of regexp, e.g. [A-Z][A-Za-z0-9_]* but the manual doesn't suggests that as a possibility.  SuperCollider has some 2300 classes... I really don't relish listing all of them literally in my preamble. I guess I could extract them by hand for each individual listing, but I'd rather not have to.  Is there a way to do this without a really massive morekeywords expression? (Perhaps using another package?)  Sample SuperCollider code:  p.clear;  ~grains.addSpec(\tfreq, [1, 40, \exp]); ~grains.addSpec(\overlap, [0.1, 10, \exp]); ~grains.addSpec(\pos, [0, b.duration]);  // 3.43 is nice! ~grains.addSpec(\rate, [0.5, 2, \exp]); ~grains = { |tfreq = 25, overlap = 6, pan = 0, amp = 0.2, pos = 3.43,    rate = 1|    var trig = Impulse.ar(tfreq);    TGrains.ar(2, trig, b, rate, pos, overlap / tfreq, pan, amp) }; ~grains.play;   Impulse and TGrains should be highlighted in blue. I have dozens of other listings using different capitalized keywords. What does "can only heal so much" mean in this sentence? Is there any way to add pasta to soup without the pasta doubling in size and getting mushy in the fridge later.I've even tried putting uncooked pasta in with the same result. If $f \in \mathcal{L}^1(\mathbb{R})$ then $\lim_{h\rightarrow 0}\int_{-\infty}^\infty |f(x+h)-f(x)|dx\rightarrow 0$ I am working on some past prelim problems and one of them is the following: If $f \in \mathcal{L}^1(\mathbb{R})$ then $\lim_{h\rightarrow 0}\int_{-\infty}^\infty |f(x+h)-f(x)|dx\rightarrow 0$   Update: Following Jackie Chong's advice, I am attempting this problem with the dominated convergence theorem. Since $f\in L^1(\mathbb{R})$, $f$ can be approximated from below by a sequence of continuous functions $f_n$. Then, I believe I can say that, for all $n$ sufficiently large, $|f_n(x+\frac{1}{n})-f_n(x)|\le 2|f(x)|$. (I'm not sure of this part thought). Then $2|f(x)|$ is integrable and hence a dominating function for $|f_n(x+\frac{1}{n})-f_n(x)|$. So by the dominated convergence theorem we can take the limit inside $\lim_{n\rightarrow \infty}\int|f_n(x+\frac{1}{n})-f(x)|dx=\int \lim_{n\rightarrow \infty}|f_n(x+\frac{1}{n})-f(x)|dx=0$ Is this on the right track?  Another approach that I thought may work, but which I'm less certain of is the following: If $f$ can be approximated by $C^1$ functions (I have no real justification for this, so please correct me if its wrong), then for each $n$ and each $x$ there is some $y(x,n)\in B_{1/n}(x)$ such that $|f(x+\frac{1}{n}-f(x)|=\frac{1}{n}|f'(y(x,n)|$ but from here I don't see how to proceed, because just because $|f|$ is integrable, I can't justify $|f'|$ being integrable, but if there is some way to fix this approach, hints would be appreciated.   Another thing I was thinking was to first approximate $f$ from below by continuous functions $f_n$ then to define $g_{m,n}=|f_n(x+\frac{1}{m})-f_n(x)| \chi_{[-m,m]}$. Then, for each $n$, the function $g_{m,n}$ is continuous on its support, and since it support is compact, it is uniformly continuous there. Can this be used to justify bringing the limit $\lim_{n\rightarrow \infty}$ inside the integral? Then apply the monotone convergence theorem? I know this idea is probably even more sketchy than my previous one, but if it can be fixed please let me know :)  Thanks! I try to search for lines that start with "1" using   ls -1 | grep ^1*   but it returns lines that do not start with 1. What I am missing here? What does ':' (colon) do in JavaScript? I'm learning JavaScript and while browsing through the jQuery library I see : (colon) being used a lot. What is this used for in JavaScript?   // Return an array of filtered elements (r) // and the modified expression string (t)    return { r: r, t: t }; Can a massless rope accelerate? How to modify existing, unpushed commit messages? How do I wrap text in a pre tag? How to use THAT and WHO GOTO still considered harmful? Everyone is aware of Dijkstra's  (also  .html transcript and  .pdf) and there has been a formidable push since that time to eschew the goto statement whenever possible. While it's possible to use goto to produce unmaintainable, sprawling code, it nevertheless remains in . Even the advanced  control structure in Scheme can be described as a sophisticated goto.  What circumstances warrant the use of goto? When is it best to avoid?  As a followup question: C provides a pair of functions, setjmp and longjmp, that provide the ability to goto not just within the current stack frame but within any of the calling frames. Should these be considered as dangerous as goto? More dangerous?    Dijkstra himself regretted that title, for which he was not responsible. At the end of  (also  .pdf) he wrote:     Finally a short story for the record.   In 1968, the Communications of the ACM   published a text of mine under the   title "The goto statement considered   harmful", which in later years would   be most frequently referenced,   regrettably, however, often by authors   who had seen no more of it than its   title, which became a cornerstone of   my fame by becoming a template: we   would see all sorts of articles under   the title "X considered harmful" for   almost any X, including one titled   "Dijkstra considered harmful". But   what had happened? I had submitted a   paper under the title "A case against   the goto statement", which, in order   to speed up its publication, the   editor had changed into a "letter to   the Editor", and in the process he had   given it a new title of his own   invention! The editor was Niklaus   Wirth.   A well thought out classic paper about this topic, to be matched to that of Dijkstra, is , by Donald E. Knuth. Reading both helps to reestablish context and a non-dogmatic understanding of the subject. In this paper, Dijkstra's opinion on this case is reported and is even more strong:     Donald E. Knuth: I believe that by presenting such a   view I am not in fact disagreeing   sharply with Dijkstra's ideas, since   he recently wrote the following:   "Please don't fall into the trap of   believing that I am terribly   dogmatical about [the go to   statement]. I have the uncomfortable   feeling that others are making a   religion out of it, as if the   conceptual problems of programming   could be solved by a single trick, by   a simple form of coding discipline!" URLs are linked despite being inside a code span Markdown source:  `http://google.com`  - `http://google.com`     - `http://google.com`   Rendered result:  http://google.com   http://google.com   http://google.com    Note that the third code span is a link. Adding a newline before the list item makes the link disappear. I never had this problem until today. When I watch a youtube video everything is fine, until I make the video fullscreen. It actually continues to play perfectly when fullscreen, but when I then exit fullscreen my sidebar and topbar are gone, and the screen is just frozen. Also my cursor is gone. It does seem to respond to ALT-F4, but it takes about 15 seconds to even close the window, and after that everything is unusable (basically frozen). What's strange though, when I re-enter fullscreen after exiting (and unity being frozen) the video plays perfectly still.   For now my workaround is opening tty1 and executing pkill -u username which logs off the user. I have looked at /var/log/syslog but it seems to be empty.  Is this freezing a common problem, if not, how can I make steps to fix this?    EDIT with specs:  I'm on a simple Samsung laptop with:  Ubuntu 14.10 64-bit,  Intel® Core™ i5-3210M,  Intel® Ivybridge Mobile (So integrated intel hd graphics 4000),  8GB ram. I don't think i've ever changed my video drivers, but it's reported as i915.  Ubuntu is up to date, and my browser is Chrome 40.0.2214.91 (64-bit). (Will test out now with firefox, but already posting this because my pc might freeze again)     EDIT 2: It doesn't freeze on Firefox. Will try reinstalling chrome now... EDIT 3: Reinstalling chrome didn't help. Will try chrome 32-bit too now... Can I kill the Golem pre-hardmode? Why can't variables be declared in a switch statement? I've always wondered this - why can't you declare variables after a case label in a switch statement?  In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:  switch (val)   {   case VAL:     // This won't work   int newVal = 42;     break; case ANOTHER_VAL:     ...   break; }     The above gives me the following error (MSC):     initialization of 'newVal' is skipped by 'case' label   This seems to be a limitation in other languages too.  Why is this such a problem? Every time I think I have the curve modifier mastered, it throws me a another curve ball (no pun intended).  Why in  can I not get the lights to follow the spiral curve? When the modifier is activated, the lights are stretched and distorted along the curve.  I created the curve by converting it from a mesh (string of verts). Why does it not display like a normal Bezier? Is that related to my problem?  I am following all the "rules" that I am aware of, as detailed here: . The curve seems to run in the correct direction. The origin point is at the first point of the curve. The curve modifier on the lights is set to -Y which is the local orientation of the curve's direction.  What am I missing? Apply for Schengen visa in a third country Can a Kenyan citizen studying in Russia and temporarily visiting family in Kenya apply for a Schengen visa in Nairobi and not in Russia, where he has his residence? "Each of these is" vs. "each of these are" Each of these CDFIs are finding solutions for communities that lack   access to traditional financial products and services, and the NEXT   Awards will accelerate their success.   OR     Each of these CDFIs is finding solutions for communities that lack   access to traditional financial products and services, and the NEXT   Awards will accelerate their success.   The difference is, the first one uses "CDFIs are" and the 2nd sentence uses "CDFIs is"  Which one is correct? Any why? iCloud has sucked up all my laptop's files - can you transfer files directly from iCloud to Google Drive? I'm trying to disconnect my macbook from iCloud, as it's been creating some problems.  I was told by an Apple Support employee that doing so is only recommended once you've backed up everything from your Mac somewhere, to ensure you don't lose any files - so my goal is to upload everything to Google Drive before messing with my laptop's iCloud settings. The problem is, almost none of the projects that I want to back up to Google Drive are truly on my laptop - instead I mostly just have folders full of file names, which are placeholders for the real files that have been sucked into iCloud. This means I have to re-download everything to my computer before uploading it all to Google Drive. Another crucial piece of information is that I only have 1 GB of storage left on my macbook, which prevents me from re-downloading any complete projects/folders at a time. So unfortunately my current method is this: downloading 1-5 files at a time, uploading these few things to Google Drive, deleting the copies from my laptop and trash, repeat (thousands of times). So, I was wondering if anyone could offer any alternative methods for uploading stuff to Google Drive in this situation - for example, is there a way to transfer files directly from iCloud to Google Drive without having to download them to my laptop first? I should probably mention that I've scoured my laptop for duplicated files and applications I no longer use, make sure to empty my trash regularly, etc (I also asked Apple Support to help me make sure I wasn't missing out on any other ways to maximize storage space). The most obvious culprit of my lack of space is the massive 150 GB iCloud folder on my laptop, which appears to contain duplicates of everything on my computer. I can't seem to do anything about it until I've disconnected from iCloud itself (its reasons for existence are unclear to me in the first place...but that's beside the point lol).