I was checking code and I came across the following snippet:  int check(char *a) {      (void)(a);//What is this line doing??     return 0; }  int main(void)  {      char *p;     p=(char *)malloc(sizeof(char));     check(p);     return 0; }   What is (void)(a); doing?
int fn();  void whatever() {     (void) fn(); }   Is there any reason for casting an unused return value to void, or am I right in thinking it's a complete waste of time?  Follow up:   Well that seems pretty comprehensive.  I suppose it's better than commenting an unused return value since self documenting code is better than comments. Personally, I'll turn these warnings off since it's unnecessary noise.    I'll eat my words if a bug escapes because of it...
How is Bohr's model related to electron cloud models via the correspondence principle? Does the series $\sum\limits_{n=1}^\infty \frac{1}{n^3 \sin^2n}$ converge or diverge? I have this series given by $$\sum\limits_{n=1}^\infty \frac{1}{n^3 \sin^2n}.$$ I know that the terms are all nonnegative. Can I get a subsequence of $\frac{1}{n^3 \sin^2n}$ such that its sum diverges to $+\infty$? HTML table headers always visible at top of window when viewing a large table Storage order vs Result order This is a spin-off question from .   says this on the subject of storage order (clustered index) and the output order     A lot of people believe that a clustered index guarantees a sort order on output. But that's not what it does; it guarantees a storage order on disk.   See, for example, .   I've read the blog post by Hugo Kornelis and understands that an index doesn't guarantee that the sql server reads the records in a specific order. Yet I have a hard time accepting that I can't assume this for my scenario?  CREATE TABLE [dbo].[SensorValues](   [DeviceId] [int] NOT NULL,   [SensorId] [int] NOT NULL,   [SensorValue] [int] NOT NULL,   [Date] [int] NOT NULL, CONSTRAINT [PK_SensorValues] PRIMARY KEY CLUSTERED  (   [DeviceId] ASC,   [SensorId] ASC,   [Date] DESC ) WITH (     FILLFACTOR=75,     DATA_COMPRESSION = PAGE,     PAD_INDEX = OFF,     STATISTICS_NORECOMPUTE = OFF,     SORT_IN_TEMPDB = OFF,     IGNORE_DUP_KEY = OFF,     ONLINE = OFF,     ALLOW_ROW_LOCKS = ON,     ALLOW_PAGE_LOCKS = ON)   ON [MyPartitioningScheme]([Date])   My original query was this:  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   ORDER BY Date DESC   But I suggest that I could as well use this one (read below for my explanation):  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   As you can see, my table rows are small (16bytes) and I've got only one index, a clustered. In my scenario, the table consists of 100.000.000 records at this moment (and this will most likely increase tenfold).  When the database server queries this table it has two ways of finding my rows, either it seeks the primary key and thereby reading and returning my values in desc. order of Date, or it has to do a full table scan. My conclusion is that a full table scan on all those records will be way too slow and the database server will therefore always seek the table via its primary key and thereby returning the values sorted by Date DESC Can't install any app, App Store asks for credit card I haven't been installing anything on my iPad Mini for the past few weeks. But previously, I just had to tap on "Install", enter my Apple ID password and go.  Now, for every new application, even those free ones, I have to confirm each time, that I'm 17 or over. And then App Store asks to enter my credit card information. If I disagree and hit "Cancel", installation process is interrupted and I can't install any application, even free one.  I don't trust Apple at all and I'm not willing to share my credit card information, especially that I'm installing only free applications.  I'm pretty sure that I haven't changed anything in the configuration of my iPad Mini for ages.   Am I missing some significant change to the App Store or this is some kind of bug or virus? Is there anything I can do in this situation? How can I install a free application from the App Store, without having to share my credit card information with Apple? The grammaticality of "that don't impress me much" I'd like to know how the sentence "That don't impress me much" sounds to a native English speaker.  The phrase is the title of a song by Shania Twain, and to my eyes it contains a clear error. It is obviously intended, and I want to know what was the effect that the author wanted to obtain.  Other examples that come to mind:   “She's got a ticket to ride, but she don't care” — The Beatles “My love don't cost a thing” — Jennifer Lopez “It don't matter” — Akon “She don't care about me” — heard in the Lost series “It Don't Mean a Thing” — a jazz album title “The Sun Don't Lie” — another album title EDIT:  The vector space for the $(\frac{1}{2},0)$ Representation is $\mathbb{C}^2$ as mentioned by Qmechanic in the comments to his answer below! The vector spaces for the other representations remain unanswered.  The definition of a representation is a map (a homomorphism) to the space of linear operators over a vector space. My question is: What are the corresponding vector spaces for the   $(0,0)$ Representation $(\frac{1}{2},0)$ Representation  $(0,\frac{1}{2})$ Representation $(\frac{1}{2},0) \oplus (0,\frac{1}{2}) $ Representation $(\frac{1}{2},\frac{1}{2})$ Representation infinite dimensional Representation? please I tried to find counterexamples to see that $l^p$ is not norm with $p&lt;1$ in the triangle inequality but I have problems with convergence when I choose some successions. Thanks. Sign of determinant when using $det A^\top A$ We have been given matrix: $$A =          \begin{pmatrix}         a&amp; b&amp; c &amp;d \\         b &amp;−a&amp; d&amp; −c\\         c&amp; −d &amp;−a&amp; b \\         d &amp;c&amp; −b&amp; −a\\         \end{pmatrix}     $$ ...and have been asked to calculate $\det(A)$ using $AA^T$.  We see that:  $$AA^T=\begin{pmatrix}         a^2+ b^2+ c^2+ d^2&amp; 0&amp; 0&amp;0\\         0 &amp;a^2+ b^2+ c^2+ d^2&amp; 0&amp; 0\\         0&amp; 0 &amp;a^2+ b^2+ c^2+ d^2&amp; b \\        0 &amp;0&amp; 0&amp; a^2+ b^2+ c^2+ d^2\\         \end{pmatrix}     $$   So, $\det(AA^T)= (a^2+ b^2+ c^2+ d^2)^4$  Now which should I choose: $(a^2+ b^2+ c^2+ d^2)^2 $ or $ -(a^2+ b^2+ c^2+ d^2)^2$ ?  Please explain me which one and why. When creating the id attributes for HTML elements, what rules are there for the value? So I know umask can restrict privileged users, using this format umask ugo.  I understand that the read = 4, write = 2, and exec = 1. However, when I type umask, it returns 4 digits which is 0022 or 0073. I have no understanding of how does this work now because there is an extra digit. What is that extra digit and what does 0022 mean? Who is / was the "Lord of the Rings"? Who is the Lord, as referred to in the title? Frodo? Sauron? Someone else? Or is it more of an abstract title, not referring to a single person, like "He who wields the One Ring"? "Where somebody/something at" ? I'm not a native English speaker, so I would like to have an explanation of that expression: "Where something/somebody at?"  Examples :      Where Brooklyn at ? (interlude in a Lonely Island album)      Where you at ? (seen on a game server, instead of Where are you, I suppose)   Are not they supposed to say "Where is/are ..."? Difficult variation of the committee problem Question is :  Suppose $X$ is a topological space of infinite cardinality which is homeomorphic to $X\times X$. Then which of the following is true:   $X$ is not connected. $X$ is not compact $X$ is not homeomorphic to a subset of $\mathbb{R}$ None of the above.   I guess first two options are false.  We do have possibility that product of two connected spaces is connected.  So, $X\times X$ is connected if $X$ is connected. So I guess there is no problem.  We do have possibility that product of two compact spaces is compact.  So, $X\times X$ is compact if $X$ is compact. So I guess there is no problem.  I understand that this is not the proof to exclude first two options but I guess the chance is more for them to be false.  So, only thing I have problem with is third option.  I could do nothing for that third option..  I would be thankful if some one can help me out to clear this.  Thank you :) How to achieve echo cancellation with Pulse Audio? I want to use echo cancellation for my Skype calls and Empathy on Ubuntu 12.10 (pulseaudio 2.1).   Does anyone know how to do that? Using sObject.get() to fetch a field value from a related parent object I have a contact in a generic sObject in apex and while I'm able to easily get detail field values using   sObject.get('MyContactField__c')  I'm not able to get fields off the related parent object, and I'm sure the related field is in memory, based on the debug logs. This returns a runtime error:  sObject.get('Account.MyAccountField__c')  with the error     Invalid field Account.MyAccountField__c' for Contact   How do I get a field value off of a parent on a generic sObject? I keep having to re-install Ubuntu after trying advice.  This is very frustrating.  All I want is to boot to a Linux command prompt.  Please help! Software to draw illustrative figures in papers I would like to have suggestions of good software for drawing illustrations in research papers. I already know about , but this works only on Linux and is at times, clunky when it comes to text. Moreover the resolution is not always perfect making it difficult to manoeuvre the objects. Besides it is tough to learn and master, with all its weird click procedures.   I would love to know about better alternatives. Not talking about graphs here, just block diagrams and explanatory illustrations. Smart Phone's camera socket I just want ask how the socket in the image is called?   I couldn't really find and the closer I could get is only Raspberry's module.