SQL-noobie here that wants to modify the following stored procedure into one that selects a specified amount of rows starting from the specified row. For example I want to select 5 rows starting from the 10th row, ie 10, 11, 12, 13, 14, 15.  Here is what my SP looks like atm:  SELECT Posts.Slug, Comments.commentId, Comments.[date], Comments.name, Comments.[text] FROM Comments  INNER JOIN Posts ON Comments.postId = Posts.Id WHERE Comments.approved = 0   I don't need to order the results as I want to read sequentially, in-case that matters.  Thanks!
What is the best way (performance wise) to paginate results in SQL Server 2000, 2005, 2008, 2012 if you also want to get the total number of results (before paginating)?
I wanted to create an account for Ubuntu One, but I got impatient when the email with the verification code didn't arrive... I thought I might have typed the wrong address, closed the window and tried again. it told me the address already existed and I just got the code. But since I closed the window I missed it. Is there any way to recover the code? Does the alarm work when my phone is turned off? I have an external HD which used to be my TimeMachine drive. I got a different drive for that, so I want the original drive back as an external on my Windows box, but it has this random 200 MB partition labeled as EFI System Partition. How do I get rid of this? If space of bounded operators L(V,W) is Banach, V nonzero, then W is Banach (note direction of implication) Let $V,W$ be normed vector spaces, and $L(V,W)$ be the space of bounded linear operators. Usually I would only see the statement "If $W$ is Banach, then $L(V,W)$ is Banach.". But  writes that there is a converse: "If $L(V,W)$ is Banach, and if $V$ is non-trivial, then $W$ is Banach". This is pretty interesting since I never seen a converse before. I was wondering if anyone has a nice proof.  I tried reversing the proof for the usual direction, but the inequalities can't be reversed. I also tried to start with a Cauchy sequence in $W$, and construct linear operators (using Hahn-Banach to control the operator norms), but alas I cannot say much about the distance between these operators (much less say that it is Cauchy) How best to determine if an argument is not sent to the JavaScript function I need to get rid of the GNOME Desktop Environment which has been installed by default when I updated my pc from 15.10 to 16.04.  After a while, I found myself not only with GNOME DE, but also with Cinnamon alongside (in the login screen, I could choose at least five or six DE!)  Now I am using Unity, and I'm happy with that, and I successfully uninstalled Cinnamon, but now I'm afraid that after uninstalling GNOME I will mess up the Unity DE, since I see many packages running in unity with the packagename starting with gnome-... Would someone mind to help me? Thx in advance Is my MAC address public when browsing the Internet? SVN Error - Not a working copy Recently our svn server was changed and we did a svn switch.  Since the working copy had a huge amount of unversioned resources, the working copy got locked and we started switching folder by folder for all folders under svn, which works perfectly fine.  But at the top most level of the repository, when I try to update files, I get the svn: Working copy '.' locked error and cleanup is not helping either. When I do cleanup, I get errors like these - svn: 'content' is not a working copy directory  Fresh checkout is NOT an option at all. Are there any other ways to cleanup and release the locks and do the switch completely ?  EDIT:  The last paragraph in JesperE's answer     If you get a "not a working copy" when   doing a recursive "svn cleanup" my   guess is that you have a directory   which should be a working copy (i.e.   the .svn directory at the toplevel   says so), but it is missing its own   .svn directory. In that case, you   could try to just remove/move that   directory and then do a local update   seems to be the solution to the problem in the repository. I have identified those folders and did a fresh checkout of those specific folders alone and wow, the locks are released in the subsequent cleanup! Thanks a lot JesperE !!  But, I still cannot figure out the svn switch error which now reads something like,     svn: The repository at   'svn://repourl/reponame/foldername'   has uuid 'm/reponame', but the WC   has 'b5b39681-0ff6-784b-ad26-2846b9ea8e7d'   Any ideas ? I came across this problem and I believe Lagrange's theorem is the key to its solution.  The question is:     Let $p$ be an odd prime. Prove that there is some integer $x$ such that $x^2 \equiv −1 \pmod p$ if and only if $p \equiv 1 \pmod 4$.   I appreciate any help.  Thanks. Transforming positively skewed data with positive and negative values My data (see image below) is positively skewed and contains both positive and negative values. I'd like to transform it to achieve normality so I can apply a repeated measures ANOVA, but can't find a technique that works.  I've considered the following options:   Square-rooting: doesn't keep the sign Square-rooting then making the original negative values negative: makes my data bimodal Natural log transform: can't do this with negative values Add a constant then log transform: this arbitrarily leaves my lowest value as an outlier '' transform (Cox, 2005; also Whittaker et al. 2005): makes my data bimodal Outlier removal (2.5 SD): doesn't fix normality, but an ANOVA on this data has similar results to an ANOVA on the raw data (for better or worse). Perform the non-parametric equivalent (Friedman test) and compare the results: will do this today   My supervisor suggests I should stick with the outlier removal though the data is still visibly skewed, and 'see what the reviewers suggest' but I just wanted to check here in case there was anything I was missing.  Original data:    With outliers (2.5 SD) replaced with the value at that criterion. I later decided to just exclude the outliers, so imagine the highlight data points in each condition removed. Is there a command prompt  equivalent for Windows 7? That is, I want to filter out the results of a command:  Bash use:  ls | grep root  What would it be from a Windows command prompt? @Id @GeneratedValue but set own ID value I am revising for an exam and have just realised that the euclidean algorithm questions in past exams are much harder than in homeworks! So i need some help please.  I have a question here, i already have the solution to it but i dont understand it that well, so i would like someone to please explain what is going on ect, and dont worry about avoiding giving me the full solution as i already have it so a full solution would be good!  Here is the question:  Use euclids Algorithm to find $gcd(172,20)$.  Hence solve $172a + 20b = 1000$ giving all solutions in terms of parameter t. List any solutions for which $a,b&gt;0$.  So it wants the answers in terms of parameter t, which is something i am not familiar with and cannot find in my books.   I have the solution in the solutions paper as   $$172= 8\times20+12 $$ $$20=1\times 12 + 8$$ $$12=1 \times 8 +4$$ $$8=2\times 4+0$$  thus $gcd(172,20)=4$  then   $$4= 12-8=12-(20-12)=2\times 12 - 20$$  $$=2\times(172-8\times20)-20$$  $$=2 \times 172 -17 \times20$$   multiplying by 250 we get   $$1000=500 \times 172 -4250 \times 20$$  so one solution is $a=500, b=-4250$  So, I understand everything up until here!!  Now it says,  Generally, $$a=500-t \frac{20}{4}=500-t$$            $$b=-4250+t \frac{172}{4}=-4250+43t$$  To have $a,b&gt;0$, we need $$500-5t&gt;0, (100&gt;t)$$ to have $a&gt;b$ we need $$-4250+43t&gt;0,(t&gt;98.8)$$$  Need $t=99$, $a=5$, $b=7$  Could someone please help explain what is going on in this last bit of working out? I am pretty good at euclidean algorithm usually but havent seen this type before an am panicking  bit as so close to exam! Any help appreciated how to find t and the other positive solutions would be great!  Please could you show me exactly how it is done here as my lecturer is quite strict with us using his exact methods. Many thanks Changing an element's ID with jQuery I need to change an element's ID using jQuery.    Apparently these don't work:  jQuery(this).prev("li").attr("id")="newid" jQuery(this).prev("li")="newid"   I found out that I can make it happen with the following code:  jQuery(this).prev("li")show(function() {     this.id="newid"; });   But that doesn't seem right to me. There must be a better way, no? Also, in case there isn't, what other method can I use instead of show/hide or other effects? Obviously I don't want to show/hide or affect the element every time, just to change its ID.  (Yep, I'm a jQuery newbie.)  Edit I can't use classes in this case, I must use IDs. Is 'had have + past participle' a correct grammatical form? I know java and would normally put in getter/setter methods. I am interested in doing it in C# with the following code, but it throws a StackOverflow exception. What am I doing wrong?  Calling Code  c.firstName = "a";   Property Code    public String firstName; {     get     {         return firstName;     }     set     {         firstName = value;     } } Ubuntu Screen Resolution How do I change the screen resolution in Ubuntu? I am dual booting Vista and Ubuntu. The preferences tab only has one resolution option for my computer. How can I randomize order of elements in a list? I want to assign the result of an expression (i.e., the output from a command) to a variable and then manipulate it – for example, concatenate it with a string, then echo it.  Here's what I've got: #!/bin/bash cd ~/Desktop; thefile= ls -t -U | grep -m 1 &quot;Screen Shot&quot;; echo &quot;Most recent screenshot is: &quot;$thefile;  But that outputs: Screen Shot 2011-07-03 at 1.55.43 PM.png Most recent screenshot is:   So, it looks like that isn't getting assigned to $thefile, and is being printed as it's executed. What am I missing? How can I distribute a native executable for a Python program? Lately all of my work has been in Python (and Ruby), and I'm in love with those two languages. There are many libraries for game development on Python but the problem I see is that many of those frameworks don't cover the "distribution" aspect of game creation. I'd like to code my game on Python (and any other pure Python extra libraries I need) and be able to distribute an executable for the main PC platforms (Windows, Mac and Linux).  Any options out there or what are the best combinations for this? (maybe pyglet + cx_freeze)