Tutorial by Examples

To access the cdr, we have to use the cdr function. (cdr (cons a b)) b Also we can verify the following equality: (eq? b (cdr (cons a b))) #t
List in scheme are nothing else than a series of pairs nested in each other in the cdr of a cons. And the last cdr of a proper list is the empty list '(). To create the list (1 2 3 4), we'd have something like this: (cons 4 '()) > (4) (cons 3 (cons 4 '())) > (3 4) (cons 2 (cons 3 (cons 4...
COMMENT ON TABLE table_name IS 'this is student details table';
COMMENT on TABLE student IS NULL; Comment will be removed with above statement execution.
A enum declares a set of ordered values - the typedef just adds a handy name to this. The 1st element is 0 etc. typedef enum { Monday=1, Tuesday, Wednesday } WORKDAYS; WORKDAYS today = Monday;//value 1
Here’s an example vector asset which we’re actually using in AppCompat: res/drawable/ic_search.xml <vector xmlns:android="..." android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeig...
Here is a simple VectorDrawable in this vectordrawable.xml file. <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="64dp" android:width="64dp" android:viewportHeight="600" android:viewportWidth=&quot...
Detailed instructions on getting automation set up or installed.
private bool navigateFlag = false; protected async override void OnNavigatingFrom(NavigatingCancelEventArgs e) { base.OnNavigatingFrom(e); if (!navigateFlag) { e.Cancel = true; var dialog = new MessageDialog("Navigate away?", Confir,); ...
This is for those moving to data.table >= 1.9.8 You have a data set of pet owners and names, but you suspect some repeated data has been captured. library(data.table) DT <- data.table(pet = c("dog","dog","cat","dog"), owner = c(&quot...
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...
Dependenct Injection Intro An application is composed of many objects that collaborate with each other. Objects usually depend on other objects to perform some task. When an object is responsible for referencing its own dependencies it leads to a highly coupled, hard-to-test and hard-to-change code...
This example will demonstrate how to use Dependency Injection (DI) design pattern in Swift using these methods: Initializer Injection (the proper term is Constructor Injection, but since Swift has initializers it's called initializer injection) Property Injection Method Injection Example Set...
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...

Page 1058 of 1336