Variations for Querying EF Entity Collections - Trade-offs or Preference?
LINQ - Query syntax vs method chains & lambda
Batch files: How to read a file? How you can read a file (text or binary) from a batch file? There is a way to read it in a binary mode or text mode? Why do popular but not ideal questions keep being closed? I notice a really worrying trend of some really popular questions being closed and eventually deleted. Some of them became legends already, like this one  ? Yes, it does not fit the format ideally, but what is point of obeying the letter of the law to such extent that it becomes ridiculous? Ok, closing is fine if community leaders became so pedantic, but why go so far as to even delete it? At this point it looks like burning old pictures just because you don't like them.  Update: Summary  For now I heard only two clear arguments:   Those questions pollute search results.  Those questions don't play well with enforcing question and answer standards.   Both of that statements are easily verifiable and to my experience are just false. Do DOM tree elements with ids become global variables? I am wondering if there is away (possibly a better way) to order by the order of the values in an IN() clause.  The problem is that I have 2 queries, one that gets all of the IDs and the second that retrieves all the information. The first creates the order of the IDs which I want the second to order by. The IDs are put in an IN() clause in the correct order.  So it'd be something like (extremely simplified):  SELECT id FROM table1 WHERE ... ORDER BY display_order, name  SELECT name, description, ... WHERE id IN ([id's from first])   The issue is that the second query does not return the results in the same order that the IDs are put into the IN() clause.  One solution I have found is to put all of the IDs into a temp table with an auto incrementing field which is then joined into the second query.  Is there a better option?  Note: As the first query is run "by the user" and the second is run in a background process, there is no way to combine the 2 into 1 query using sub queries.  I am using MySQL, but I'm thinking it might be useful to have it noted what options there are for other DBs as well. I know that a similar question has been asked in:        although I didn't really understand the answer and couldn't really make it work.  However, I have tried something different. I decided to read the manual page for ls and it mentions different environment variables that can be set when dealing with the ls command. If one goes to the -G option it says to look at the CLICOLOR environment variables. I did and that one links you to documentation for the LSCOLORS environment variable. I went to it and it mentions:     "The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color. "   It also mentions that the default value of LSCOLORS is "exfxcxdxbxegedabagacad" and that each part specifies the color of some specific thing in the ls command. For example, the first pair ex in example specifies the color of directories. the second fx the color of symbolic links etc... e means blue and x means default "foreground".  1) First what does this mean: "when colors are enabled with CLICOLOR"?  2) What does "foreground" mean?  What must environment variables be for the ls command to color the output however I desire?    I also tried:  ls --color   But it threw me the following error:  ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]   The same error happened when I did ls --color=auto: it alone also throws an error. I have no idea why, and am not sure if it was due to iTerm2 or OS X or why that happened. It seems it works on other systems... What and with what was Luthor doing in the ship at the end of the movie? After Doomsday was defeated, a spec-ops team sent to the Kryptionian ship in Metropolis found Luthor submerged in water, in front of a... thing, which "held" three metal cubes. The thing looked up, roars, and dissipates into thin air.    What the hell was that all about? I am really confused. What was that creature and what was Luthor doing with it? I'm using the gnome flashback session with metacity window manager, but I can't change to any metacity theme in any of the tweaking tools, as they're not even appearing in the lists. Is there anything I can do? A new Victorian-set British novel begins sentences containing h-dropping with lower-case e's, as in " 'e took my money, 'e did." This seems incorrect but I'm at a loss to find the rule. I recently upgraded to 12.04 from 11.10 and since upgrading have been unable to log in to my user profile. The upgrade went okay and I can login to a guest session fine but whenever I try to login to my profile, after entering my password, I just return to the login screen.  I've changed my password in Root (passwd &lt;username&gt;) and can log in to tty1 with no issues, it's just in GUI I'm having problems.  I'm using a HP dv7 laptop, 32-bit Ubuntu install, Intel® Core™2 Duo CPU P7350 @ 2.00GHz × 2, Nvidia graphics.  Any help would be appreciated. How can I repeat the header but not the caption with longtable? I am trying to set up a longtable where the header is repeated on every new page but the caption only appears once at the top of the page.  The table is defined as follows:  \begin{longtable}{|l|l|l|} \caption{the table caption} \label{tab:11swpkg}\\ \hline \rowcolor{gray} HeaderCol1 &amp; HeaderCol2 &amp; HeaderCol3\endhead     \hline\hline Item11 &amp; Item12 &amp; Item13 \\ \hline Item21 &amp; Item22 &amp; Item23 \\ \hline Item31 &amp; Item32 &amp; Item33 \\ \hline \end{longtable}   This nearly works because the header is indeed repeated after a page break but so is the caption. How can I get rid of the caption after a page break? How do I move the "Show Applications" icon in Ubuntu Dock? Ubuntu 17.10 introduces the GNOME Shell with the  (based on  GNOME Shell extension) and it allows you to put the Dock on the bottom of the desktop:    However, there is no easy way to move the Show Applications icon (shown on the right) to the left of the Dock. There is no such setting in GNOME Control Center. There is already a  filed, but does anybody know any workaround until it gets fixed by Ubuntu Dock developers? Suppose $n$ is a non negative integer $\geq 4$ and $\sigma\in S_n$ a permutation. Conjugacy classes in $S_n$ are completley determined by the cycle structure of $\sigma$. If we let the alternating group $A_n$.act on $S_n$ by conjugation, the orbits coincide with the conjugacy classes in $S_n$ except for those (even) permutations whose cycle structure is composed of even cycles (which corresponds to cycles of uneven length) of distinct order (fixed points are treated as cycles of length $1$.) See   For instance a $3$-cycle in $A_4$ has cycle structure $[3,1]$ which fits the bill, and a $5$-cycle in $A_5$ or $A_6$ works too, since the cycle structure is $[5]$ and $[5,1]$ respectively. On the other hand, a $3$-cycle in $A_5$ will does not satisfy the criteria as it has cycle structure $[3,1,1]$ with two fixed points.  In this case, the conjugacy class of $\sigma$ inside $S_n$ splits in $2$ orbits of the conjugation action of $A_n$, and if $\tau$ is any odd permutation, for instance $(12)$, then we have $$\mathrm{Conj}_{S_n}(\sigma)=\mathcal{O}(\sigma)\coprod\mathcal{O}(\tau\sigma\tau^{-1})$$  My question is How can we differentiate between the two orbits? Does it have geometric meaning?    I can see that this information can be useful when looking at representations of the alternating groups, since there are as many irreducible representations as conjugacy classes. As for some geometric interpretation, I ask because there is one for the three cycles in $A_4$. If $S_4$ is understood as the group of symmetries of a regular tetrahedron, then $A_4$ is the subgroup of direct symmetries, and a $3$-cycle corresponds to a rotation of angle $\frac{2\pi}{3}$ or $\frac{4\pi}{3}$ with axis passing through one of the vertices. Conjugacy classes inside $A_n$ preserve the angle, and that's how we can tell them apart. In this case the computations are so simple we don't really need this picture, but I think it is a nice way to understand the fact $3$-cycles in are not all conjugate inside $A_4$... What is the name for the grammatical figure, where the present tense is substituted for a past event? I am preparing a book for publication which contains the following passage:     Stromberg in Religious Liberalism in Eighteenth-Century England   (1954) noted that 'the critical moment in the emergence of a positive   spirit of reform...consisted in the awareness of evil as being social   and remediable. It begins about 1750.'   My proof reader (my wife) has picked this out suggesting it should be the past tense. However if I say It began about 1750 it seems to convey too much certainty about the exact date. I just want to convey an impression of it being something which emerges in the mid-eighteenth century. I believe use of the present tense is the way to go.   But what is this artifice called, this use of the present to convey mild uncertainty? Recovering a password for a Word 2007 document Was drafting an email and my senior wanted to type "Planting saplings is our way of saying we care for our Nature". I felt that's wrong English. Shouldn't it be "we care for Nature"? (it makes it a bit impersonal to remove the 'our', but if 'our nature' isn't right, can the cuteness factor of mentioning 'our nature' be preserved?. Which is correct?) Please add an option to search posts I have voted on When I vote up questions or answers, I'm not only increase poster's reputation but also saving a link to the post in my profile — the "Votes" tab shows all posts I have voted on, so it's possible to view the posts again without searching.  But finding the needed answer is uncomfortable when the number of posts voted on is too large.  Please add an option to search in my voted posts.  Adding a new  would be easier. But I think that a filter in the "Votes" tab will be more comfortable (at least for me). Also this filter could be used in other tabs in the profile, e.g. the "Answers" and "Questions" tabs. Prove $\chi(G)\chi(\bar{G}) \geq n$ for chromatic number of graph and its complement Some people love creating or fostering the creation of events that are noisy, chaotic and fun, such as parties, arguments, reunions, etc. Sometimes there's a negative connotation to this (like in provoking an argument), but sometimes there is not (like in organising a big, noisy party).  The word I'm looking for would be the English equivalent to the Spanish armadanzas, just in case this is helpful.  Any ideas? Normalizing constant in Bayes theorem I read that in Bayes rule, the denominator $\Pr(\textrm{data})$ of   $$\Pr(\text{parameters} \mid \text{data}) = \frac{\Pr(\textrm{data} \mid \textrm{parameters}) \Pr(\text{parameters})}{\Pr(\text{data})}$$   is called a normalizing constant. What exactly is it? What is its purpose? Why does it look like $\Pr(data)$? Why doesn't it depend on the parameters? "DataBinding: 'index+NewsItem' does not contain a property with the name 'Link'", but property exists (Not a Typo)