I'm trying to read data using SqlDataReader. When using SQL Server 2014 I've added the code to my query:  . ORDER BY STATEMENT_ID ASC    OFFSET @beginRow ROWS    FETCH NEXT @offs ROWS ONLY   This works for me in SQL Server 2014 whereas in SQL Server 2008 r2 it doesn't. What is the equivalent to this operation in SQL Server 2008 R2? Is there any, or should I change my approach!?  Thanks in advance.
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)?
Going to any question on the site brings an error page I edited my mesh changing the number of vertices after adding shapekeys, and it get totally messed up when the shapekeys are on. Is there a way to solve this problem without remake the shapekeys all again!? Is it possible to make the -init method private in Objective-C? Received an email intended for another person LWJGL Eclipse Resource Deployment I'm still experimenting with some OpenGL in LWJGL, and as I get to know more and more about OpenGL, I start to do more complicated things like multi texturing, shadowmapping and more. Now, right now I'm using the src folder (src/res) for my resources, and use src/resourcename in my code. When I export it, this won't work on another location as the relative path is ofcourse incorrect. What would be the best way of deploying your game with all the resources in one file? Maybe put the files in the jar?  I would like to hear from a few people how they store and deploy their project with resources, thanks! How to use aes-encryption in PostgreSQL? I tried aes-encryption by using following statement:  SELECT encrypt('test', 'key', 'aes');   which worked, but I am not able to decrypt the value. I inserted it in a field of datatype bytea but I'm not sure if that was the right way.   SELECT decrypt(pw, 'key', 'aes') FROM table WHERE ID = 1;   gives me the error     ERROR:  function decrypt(bytea, unknown, unknown) does not exist   LINE 1: SELECT decrypt(pw, 'key', 'aes') FROM tabelle WHERE ID = 7;                  ^   HINT:  No function matches the given name and argument types. You might need to add explicit type casts.   Does that really mean that encrypt() is an existing function, but not decrypt()? How else could I retreive aes-encrypted values? Showing that $1^k+2^k + \dots + n^k$ is divisible by $n(n+1)\over 2$ Every season near the trade deadline, we see teams that are out of it trading expensive players and/or free agents-to-be, typically for younger players or prospects.  For example, Matt Garza, set to become a free agent after the season, was traded to the Rangers for a few prospects.  It made sense for the Cubs to trade Garza, because he wasn't under contract any further than this season, and thus doesn't have much value to them.  Compare Garza to someone like Mike Trout, who is likely the most valuable property in baseball, given his skill and inexpensive cost over the next several years.  There's no way the Angels would trade him, because he'll be the cost-controlled centerpiece of the team for years to come.  However, with the Angels out of it this year, what if they wanted to trade Trout to a contender (say the Pirates), but only for the remainder of this season?  That is, they'd get several top prospects now, and would have an agreement with the Pirates that they'd trade him back in the offseason (for something pretty worthless, say for a journeyman minor leaguer).  The Pirates get Trout for the stretch run and are happy to give up a few prospects.  Trout doesn't have much value to the Angels this year, but he has a ton of value for next year.  So they get a few prospects for him, in exchange for the part of his career which has very little value to them.  So in effect, the Pirates are renting or borrowing him for the remainder of 2013.  Why don't trades like this happen?  Are there any rules prohibiting trades like this? How to remove the “AMD Testing use only” watermark? I've installed the  (beta) following the step in  for Ubuntu Quantal Quetzal. My system is 64 bit and my graphic card is an ATI RadeonHD 6670, this g.c. is Officially Supported (Catalyst &amp; Open Source), you can confirm that from this .  I don't have any problem, except the AMD testing use only watermark. I see the following frame in any stage into the OS (logged, unlloged, etc.) except in the terminals.     I found different versions of how to remove this image, but this change according to the system, so I want an answer from this popular (trusted) site.   How to solve this issue in Ubuntu 12.10 32b? This procedure is different in a 64b system? Why do I get "unresolved external symbol" errors when using templates? When I write C++ code for a class using templates and split the code between a source (CPP) file and a header (H) file, I get a whole lot of "unresolved external symbol" errors when it comes to linking the final executible, despite the object file being correctly built and included in the linking.  What's happening here, and how can I fix it? Schema for a multilanguage database I'm developing a multilanguage software. As far as the application code goes, localizability is not an issue. We can use language specific resources and have all kinds of tools that work well with them.  But what is the best approach in defining a multilanguage database schema? Let's say we have a lot of tables (100 or more), and each table can have multiple columns that can be localized (most of nvarchar columns should be localizable). For instance one of the tables might hold product information:  CREATE TABLE T_PRODUCT (   NAME        NVARCHAR(50),   DESCRIPTION NTEXT,   PRICE       NUMBER(18, 2) )   I can think of three approaches to support multilingual text in NAME and DESCRIPTION columns:   Separate column for each language  When we add a new language to the system, we must create additional columns to store the translated text, like this:  CREATE TABLE T_PRODUCT (   NAME_EN        NVARCHAR(50),   NAME_DE        NVARCHAR(50),   NAME_SP        NVARCHAR(50),   DESCRIPTION_EN NTEXT,   DESCRIPTION_DE NTEXT,   DESCRIPTION_SP NTEXT,   PRICE          NUMBER(18,2) )  Translation table with columns for each language  Instead of storing translated text, only a foreign key to the translations table is stored. The translations table contains a column for each language.  CREATE TABLE T_PRODUCT (   NAME_FK        int,   DESCRIPTION_FK int,   PRICE          NUMBER(18, 2) )  CREATE TABLE T_TRANSLATION (   TRANSLATION_ID,   TEXT_EN NTEXT,   TEXT_DE NTEXT,   TEXT_SP NTEXT )  Translation tables with rows for each language  Instead of storing translated text, only a foreign key to the translations table is stored. The translations table contains only a key, and a separate table contains a row for each translation to a language.  CREATE TABLE T_PRODUCT (   NAME_FK        int,   DESCRIPTION_FK int,   PRICE          NUMBER(18, 2) )  CREATE TABLE T_TRANSLATION (   TRANSLATION_ID )  CREATE TABLE T_TRANSLATION_ENTRY (   TRANSLATION_FK,   LANGUAGE_FK,   TRANSLATED_TEXT NTEXT )  CREATE TABLE T_TRANSLATION_LANGUAGE (   LANGUAGE_ID,   LANGUAGE_CODE CHAR(2) )    There are pros and cons to each solution, and I would like to know what are your experiences with these approaches, what do you recommend and how would you go about designing a multilanguage database schema. Prove that $ AB$ is a subgroup of order $mn$ if $m$ and $n$ are relatively prime. More examples of Simpson's Paradox, barring the ones on Wikipedia, Titanic, and delayed flights. I hope someone may know fresh examples of  for use in my statistics courses.  The examples I've been using are fine, but I'd like to have some new ones.  I'm familiar with the ones on the Wikipedia page: the gender bias lawsuit at Berkeley, batting averages, mortality rates among low birth babies, party voting on the Civil Rights Act, and success rates of kidney stone treatments.  I'm also familiar with the example of survival rates on the Titanic and the one about delayed flights at America West vs. Alaska Airlines.  These are all good ones, but, like I said, I'm looking for more. Does anybody know any others?  For those who aren't familiar with it, Simpson's paradox is essentially a property of unreduced fractions: It's possible to have, simultaneously, $$\frac{a_1}{b_1} &lt; \frac{c_1}{d_1} \text{ and } \frac{a_2}{b_2} &lt; \frac{c_2}{d_2}, \text{ but } \frac{a_1 + a_2}{b_1+b_2} &gt; \frac{c_1+c_2}{d_1+d_2}.$$   For example, $\frac{1}{3} &lt; \frac{34}{100}$ and $\frac{66}{100} &lt; \frac{2}{3}$, but $\frac{67}{103} &gt; \frac{36}{103}$.  It can be hard to spot this happening in a given real-world scenario. How can I install an app given only its APK file? How do I determine how many spell slots I have if I multiclass into more than one spellcasting class? For example, I have a character that is a level 3 Wizard, a level 5 Eldritch Knight Fighter, a level 4 Arcane Trickster Rogue, a level 4 Paladin, and a 4 Warlock. How many spell slots do I have and how do I determine this? I understand that faster-than-light communication is impossible when making single measurements, because the outcome of each measurement is random. However, shouldn't measurement on one side collapse the wave function on the other side, such that interference effects would disappear? Making measurements on "bunches" of entangled particles would thus allow FTL communication, by making observed interference effects appear or disappear. How does such an experiment not:  1) Clearly imply that faster-than-light communication is possible?  or  2) (if #1 is rejected) Imply that measurement of one half of an entangled pair does not cause the collapse of the other half's wave function.  Why doesn't this thought experiment clearly show that if we maintain that FTL communication is ruled out, we must also rule out "universal collapse" in the Copenhagen interpretation?  EDIT: Here is an example of an explicit experiment (though I think experts could come up with something better):  You can entangle a photon with an electron such that the angle of the photon is correlated with the electron's position at each slit of a double slit experiment. If the photon is detected (it's outgoing angle measured), then which-path information is known, and there is no interference. If the photon is not detected, the interference remains.   The experiment is designed such that the photon and electron go in roughly opposite directions, apart from the tiny deflection which gives which-path information. You set up a series of photon detectors 100 ly away on one side, and your double slit experiment 100 ly away in the opposite direction. Now you produce the entangled pairs in bunches, say of 100 entangled pairs, each coming every millisecond, with a muon coming between each bunch to serve as a separator.   Then the idea is that someone at the photon detector side can send information to someone watching the double-slit experiment, by selectively detecting all of the photons in some bunches, but not in others. If all of the photons are detected for one bunch, then the corresponding electron bunch 200 ly away should show no interference effects. If all of the photons are not detected for one bunch, then the corresponding electron bunch 200 ly away would show the usual double-slit interference effects (say on a phosphorus screen). (Note that this does not require combining information from the photon-detector-side with the electron-double-slit side in order to get the interference effects. The interference effects would visibly show up as the electron blips populate the phosphorus screen, as is usual in a double-slit experiment when which-path information is not measured.)  In such a way the person at the photon detectors can send '1's and '0's depending on whether they measure the photons in a given bunch. Suppose they send 'SOS' in Morse code. This requires 9 bunches, and so this will take 900 milliseconds, which is less than 200 years. The point is that such an experiment would only work if you assume that the measurement of the photon really does collapse the wave function nonlocally. In the construction of types of numbers, we have the following sequence:  $$\mathbb{R} \subset \mathbb{C} \subset \mathbb{H} \subset \mathbb{O} \subset \mathbb{S}$$  or:  $$2^0 \mathrm{-ions} \subset 2^1 \mathrm{-ions} \subset 2^2 \mathrm{-ions} \subset 2^3 \mathrm{-ions} \subset 2^4 \mathrm{-ions} $$  or:  "Reals" $\subset$ "Complex" $\subset$ "Quaternions" $\subset$ "Octonions" $\subset$ "Sedenions"  With the following "properties":   From $\mathbb{R}$ to $\mathbb{C}$ you gain "algebraic-closure"-ness (but you throw away ordering). From $\mathbb{C}$ to $\mathbb{H}$ we throw away commutativity. From $\mathbb{H}$ to $\mathbb{O}$ we throw away associativity. From $\mathbb{O}$ to $\mathbb{S}$ we throw away multiplicative normedness.   The question is, what lies on the right side of $\mathbb{S}$, and what do you lose when you go from $\mathbb{S}$ to one of these objects ? sed command not giving proper output for regular expression used I am trying to fetch data between a range of time intervals from the log file. However, the complete data is not fetched for the end date.  Below is the command used:   sed -n '/26/Nov/2018/,/30/Nov/2018/ p' /path/file.log    The data I am having in the above log file is somewhat like:   192.168.0.123 - - [25/Nov/2018:13:24:59 +0530] "Data 1"  192.168.0.123 - - [26/Nov/2018:13:24:59 +0530] "Data 2"  192.168.0.123 - - [26/Nov/2018:13:25:09 +0530] "Data 3"  192.168.0.123 - - [27/Nov/2018:13:25:09 +0530] "Data 4"  192.168.0.123 - - [27/Nov/2018:13:25:11 +0530] "Data 5"  192.168.0.123 - - [27/Nov/2018:13:25:53 +0530] "Data 6"  192.168.0.123 - - [28/Nov/2018:13:25:53 +0530] "Data 7"  192.168.0.123 - - [29/Nov/2018:13:25:53 +0530] "Data 8"  192.168.0.123 - - [30/Nov/2018:13:25:53 +0530] "Data 9"  192.168.0.123 - - [30/Nov/2018:13:25:53 +0530] "Data 10"  192.168.0.123 - - [01/Dec/2018:13:25:53 +0530] "Data 11"  192.168.0.123 - - [01/Dec/2018:13:25:53 +0530] "Data 12" How can I recover files from partitioned disk? Limit involving binomial coefficients: $\lim_{n\to\infty}\left(\binom{n}{0}\binom{n}{1}\dots\binom{n}{n}\right)^{\frac{1}{n(n+1)}}$ I am facing difficulty with the following limit. $$ \lim_{n\to\infty}\left(\binom{n}{0}\binom{n}{1}\dots\binom{n}{n}\right)^{\frac{1}{n(n+1)}} $$ I tried to take log both sides but I could not simplify the resulting expression. Please help in this regard. Thanks.