Tutorial by Examples: c

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...
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...
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...
NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:@"firstsecondthird"]; [string addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0,5)]; [string addAttribute:NSForegroundColorAttributeName value:[UIColor greenColo...
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...
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...
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...
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()...
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 658 of 826