If I want to order a list based on more than one property, I can't see a good way of doing that other than forming those properties to numbers and then using OrderBy, for instance:  int someArbitraryNumber = 1000;  List&lt;Tuple&lt;int, int&gt;&gt; test = new List&lt;Tuple&lt;int, int&gt;&gt;() {   new Tuple&lt;int, int&gt;(1, 3),   new Tuple&lt;int, int&gt;(1, 4),   new Tuple&lt;int, int&gt;(1, 5),   new Tuple&lt;int, int&gt;(2, 3),   new Tuple&lt;int, int&gt;(9, 15) };  var orderedTest = test   .OrderBy(x =&gt; x.Item1 + x.Item2 * someArbitraryNumber);   Here I'd be looking to for the resulting list to be:      (1, 3),     (2, 3),     (1, 4),     (1, 5),     (9, 15)   That is to say, first ordered by the second item, then by the first.
I have two tables, movies and categories, and I get an ordered list by categoryID first and then by Name.  The movie table has three columns ID, Name and CategoryID. The category table has two columns ID and Name.  I tried something like the following, but it didn't work.  var movies = _db.Movies.OrderBy( m =&gt; { m.CategoryID, m.Name })
Duality discrete math problem This is the only answer I got wrong on my HW and the prof does not want to give us the correct answers before our midterm     The dual of a compound proposition that contains only the logical operators $\lor$ , $\land$ , and   $\neg$ is the compound proposition obtained by replacing each $\lor$ by $\land$ , each $\land$ by $\lor$ , each $\def\T{{\rm T}}\def\F{{\rm F}}$   $\T$ by $\F$ , and each $\F$ by $\T$ . The dual of $s$ is denoted by $s^*$. Find the dual of these compound propositions.      a) $p \lor\neg q$     I got $\neg p \land q$       b) $p \land (q \lor (r \land \T))$     My answer was $\neg p \lor (\neg q \land r)$       c) $(p \land \neg q) \lor (q \land \F)$     My answer was $(\neg p \lor q) \land  \neg q$  I have tried googling the problem and cannot come up with anything on duals and our lectures are online and upon reviewing do not see anything. I am just confused and looking for a little guidance on what was incorrect with my answers. What is a good data plan for Internet surfing in northern Italy? I've checked the webpages of some their providers, but franly, just like in the case of those in my own language, I literally cannot find my way around them. So if you wouldn't mind sharing a word of two or advice.  I'm looking for a good solution for mobile internet surfing in northern Italy, that can be connected to a laptop (you know, that usb stick with a SIM card inside kind of thing). 15 Gb or so at some decent speed. Can you perhaps give a recommendation or two of what to get?    Edit: Just to define what I'm looking for exactly. A data plan of 15 Gb with an internet key (usb stick into which a SMS card goes) that you plug into a laptop. Preferably non-contractual, so I can cancel when I leave. I am not interested in surfing on my mobile phone since due to size I still prefer the smaller Nokia-like models for calls (smaller to carry) - no internet on them. I want to describe my business and want to refer to it in a sentence.  I am trying to say:      "In 2015 we established a business (that is) named X".   Intuitively, the "that is" part is redundant, and makes the sentence more cumbersome. But I cannot think of a reason why we should be able to drop the verb.  Is the version without the "that is" part grammatically correct? How can it be explained? Can druids Wild Shape into creatures other than beasts? Under Wild Shape it says "assume the shape of a beast" you have seen before. Does this mean they can only transform into creatures that have the beast type, such as bear, wolf, crocodile, etc.? Or can they turn into things with other types, like dragon, monstrosity, humanoid, fiend, etc.? How to get the current branch name in Git? Piping for loop output prevents local variable modification So I had asked a question prior to this one about recurrence relations, but apparently it was a bad one to ask. So I'm trying again to understand how to solve these babies... Here it is:  $$ 3a_{n+1}-4a_n=0, n&gt;=0, a_1=5 $$  What is the general process for solving a relation like this? How to remove/apply all modifiers of one object in python Lets assume you have 1 object with 4 modifiers added to it. I am curious how one would approach the task to apply all or to delete all modifiers of a just selected object that has many modifiers already added.  The console reads out the modifier delete as  bpy.ops.object.modifier_remove(modifier="Box Right ")   So "Box Right " I might have to replace with something like active.object.modifier.name and then work each modifier off?  This would be very helpful when you want to generate a static mesh for animation or 3D printing. Is it possible to set the GPU fan speed using the default free ati driver?  My card (X1900) was deprecated in the fglrx drivers a while back.  The free drivers seem to work with 3D, Compiz and such, but running graphics intensive programs makes my GPU heat up and produce artifacts, while the GPU fan never seems to increase. (When set to 100% in Windows it makes a massively louder noise.) Does the Hunter's Mark spell chain to multiple creatures? I'm looking to play a ranger. The Hunter's Mark spell says:     If the target drops to 0 hit points before this spell ends. you can use a bonus action on a subsequent turn of yours to mark a new creature.   Does that mean I can keep marking a new enemy each time the last one dies until the hour's up? It would be nice to allow users to mark a change in an answer (or question) as minor (e.g. for a simple spelling or grammar correction). A change marked as minor wouldn't push the question on top of the list of questions on the home page or in the feeds. It wouldn't trigger any notification. This could be implemented with a "Minor change" checkbox when editing an entry (a la Confluence). What do you think? Does a particle annihilate only with its antiparticle? If yes, why? Or to put the question another way - what is the result of a proton-positron collision, or an up quark-charm antiquark collision, etc.? As far as I know, annihilation happens only between particles of opposite charge and same mass, but perhaps I am wrong?  And if the types of annihilation mentioned above cannot happen, what are the reasons? Which preposition is correct in the phrase "proficient in/at/with English"? Possible Duplicate:          I'm looking for a good book on commutative algebra covering most of (but not limited to) :   Basic Galois theory and Module algebra Primary decomposition of ideals Zariski topology Nullstellensatz, Hauptidealsatz Noether's normalization Ring extensions "Going up" and "Going down"   The emphasis is on the approach, as I would like a book giving a good geometric intuition of ring theory that I could use as a solid basis to start learning algebraic geometry.  All in all, do you remember a book that gave you a deeper geometric insight of commutative algebra ? How does Cooper get out of the black hole? In the movie Interstellar,  Cooper (played by ) enters a black hole and sends a message to Murph (his daughter). Later, he is found by rangers, but I don't understand how he gets out of the black hole?  As far as I know, nothing can get out of a black hole, as it has extremely high gravity. Price Optimization I ran linear regression on my hotel reservation data and obtained the following model fit in R:  Sales = 170.2 + 3.6*Days_left_to_checkIn + 7.6*Revenue - 9.6*Room_Rate -7.67*cancellation_price + 4.8*Number_of_cancelled_Room -8.9*Online_reputation_of_Hotel  After this, I used the Optimize function to optimize the equation for maximum revenue (Revenue = Room_Rate* Sales)  after substituting all the values of variables I got this equation  f=-9.6*Room_Rate^2 + Room_Rate*253.56  Optimize(f, lwr=10, upr=524)  What is the next step to calculate Room_Rate to maximize the revenue (revenue = Room_Rate * Sales)? Is there any better way to optimize the function of demand? Orthogonal basis for infinite-dimensional vector spaces Why is my mesh inversed when Imported to Unity? So I modeled this sword and all the parts were separate meshes. I used a mirror modifier when I was modeling and then I applied the modifier when I was done to make the parts into solid meshes. Put a UV map on everything and it all looked good in Blender.  Then I put it into Unity and I got what you see in the picture. Part of the sword is inversed. Oddly, the inversed part actually maintains the proper silhouette. It maintains the correct shape, but then is shaded like the front half is missing.  Does anyone have an idea of what's going on and how to fix it?  Thanks, James I am young, just started my career, and looking to begin investing so I can make my money work for me. I'm still living like I did in college (occasional purchase on myself, but most of it goes into savings) and I would like to take the extra money and invest it.   What would you suggest are the best options for me to begin? I was considering getting a personal investor [a financial advisor] for perhaps a year or so, but I've heard that they really are not worth the money. I wanted to get the input of the great minds here. For some reasons, homomorphism is a very hard area for me to make improvements. I've been hitting the brick wall for almost 2 hours.   Prove that no homomorphism exists from $Z_{16}\oplus Z_2$ onto $Z_4\oplus Z_4$.  Assume a homomorphism $\phi$ exists from $Z_{16}\oplus Z_2$ onto $Z_4\oplus Z_4$. Then $\phi$ is an isomorphism.  Note that the $\left | \ker \phi \right |=2$ The $\ker \phi$ is also a normal subgroup for $Z_{16}\oplus Z_{2}$. We want possible normal subgroup of order 2. I.e., 2 elements in each normal subgroups.  By Lagrange's theorem, the order of each element in a group divides the order of a group so the possible order of the elements are 1 or 2. If the elements has order 1, then the Ker \phi cannot have 2 elements.  Hence, $\ker\phi$ = $\left \{ (0,0),(8,0) \right \}$ ,$\left \{ (0,0),(0,8) \right \}$,$\left \{ (0,0),(8,1) \right \}$, possibly.  By the First isomorphism theorem:  $\phi: Z_{16}\oplus Z_2 \rightarrow Z_2\oplus Z_2$  $\Psi: G/\ker \phi \rightarrow \phi\left ( Z_16\oplus Z_2 \right )=Z_2\oplus Z_2$  $g\ker \phi  \mapsto \phi(g)=\Psi(g\ker \phi)$  Any help is appreciated.  Edit: I know that $(2,0)$ has order $8$ in $Z_{16}\oplus Z_{2}$ but any elements in $Z_{4}\oplus Z_{4}$ does not have order $8$ which would have solved the question at the outset. But I would like a different route.