Tutorial by Examples: a

SQL Server 2012 / 2014 DECLARE @RowsPerPage INT = 10, @PageNumber INT = 4 SELECT OrderId, ProductId FROM OrderDetail ORDER BY OrderId OFFSET (@PageNumber - 1) * @RowsPerPage ROWS FETCH NEXT @RowsPerPage ROWS ONLY SQL Server 2005/2008/R2 DECLARE @RowsPerPage INT = 10, @PageNumber INT = ...
For getting the next 10 rows just run this query: SELECT * FROM TableName ORDER BY id OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY; Key points to consider when using it: ORDER BY is mandatory to use OFFSET and FETCH clause. OFFSET clause is mandatory with FETCH. You can never use, ORDER BY … FETC...
Since every Applicative Functor is a Functor, fmap can always be used on it; thus the essence of Applicative is the pairing of carried contents, as well as the ability to create it: class Functor f => PairingFunctor f where funit :: f () -- create a context, carrying nothing ...
NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:@"firstsecondthird"]; [string addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0,5)]; [string addAttribute:NSForegroundColorAttributeName value:[UIColor greenColo...
Firebase Cloud Messaging is the Firebase service that handles push notifications. You can add this service in any client: web, Android or IOS. The specific functioning for each must be read from the documentation. For adding FCM in any type of project, is always adding a library. Considering the s...
Let's say we have a form like the one below. We want to send the data to our webserver via AJAX and from there to a script running on an external server. So we have normal inputs, a multi-select field and a file dropzone where we can upload multiple files. Assuming the AJAX POST request was succ...
//Create a new ExcelPackage using (ExcelPackage excelPackage = new ExcelPackage()) { //Set some properties of the Excel document excelPackage.Workbook.Properties.Author = "VDWWD"; excelPackage.Workbook.Properties.Title = "Title of Document"; excelPackage.Workboo...
Introduction The Ninja build system is described by its project website as "a small build system with a focus on speed." Ninja is designed to have its files generated by build system file generators, and takes a low-level approach to build systems, in contrast to higher-level build system...
Introduction NMAKE is a command-line utility developed by Microsoft to be used primarily in conjunction with Microsoft Visual Studio and/or the Visual C++ command line tools. NMAKE is build system that falls under the Make family of build systems, but has certain distinct features that diverge fro...
Introduction The Autotools are a group of programs that create a GNU Build System for a given software package. It is a suite of tools that work together to produce various build resources, such as a Makefile (to be used with GNU Make). Thus, Autotools can be considered a de facto build system gene...
Session storage service : Common factory service that will save and return the saved session data based on the key. 'use strict'; /** * @ngdoc factory * @name app.factory:storageService * @description This function will communicate with HTML5 sessionStorage via Factory Service. */ a...
If a view is created WITH SCHEMABINDING, the underlying table(s) can't be dropped or modified in such a way that they would break the view. For example, a table column referenced in a view can't be removed. CREATE VIEW dbo.PersonsView WITH SCHEMABINDING AS SELECT name, address FROM d...
Maybe Maybe is an applicative functor containing a possibly-absent value. instance Applicative Maybe where pure = Just Just f <*> Just x = Just $ f x _ <*> _ = Nothing pure lifts the given value into Maybe by applying Just to it. The (<*>) function applies...
//Using File.WriteAllBytes using (ExcelPackage excelPackage = new ExcelPackage()) { //create a new Worksheet ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets.Add("Sheet 1"); //add some text to cell A1 worksheet.Cells["A1"].Value = "My secon...
The first to thing to have: a model that contains a has_many relation with another model. class Project < ApplicationRecord has_many :todos end class Todo < ApplicationRecord belongs_to :project end In ProjectsController: class ProjectsController < ApplicationController d...
It is a bad practice to block on async calls as it can cause deadlocks in environments that have a synchronization context. The best practice is to use async/await "all the way down." For example, the following Windows Forms code causes a deadlock: private async Task<bool> TryThis()...
//Using File.WriteAllBytes using (ExcelPackage excelPackage = new ExcelPackage()) { //create a new Worksheet ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets.Add("Sheet 1"); //add some text to cell A1 worksheet.Cells["A1"].Value = "My fourt...
The easiest way to record a macro is the button in the lower left corner of Excel looks like this: When you click on this you will get a pop-up asking you to name the Macro and decide if you want to have a shortcut key. Also, asks where to store the macro and for a description. You can choose any ...
<html> <body> <% out.print("Today is:"+java.util.Calendar.getInstance().getTime()); %> </body> </html>
A data structure is a way of organizing and storing information. Let a "Hello, World!" string be the information that we need to organize and store in byte-addressable memory. Each ASCII character requires 7 bits of storage. Most systems reserve 8 bits (1 byte) for each character, so eac...

Page 866 of 1099