Tutorial by Examples: amp

DECLARE @DateFrom DATETIME = '2016-06-01 06:00' DECLARE @DateTo DATETIME = '2016-07-01 06:00' DECLARE @IntervalDays INT = 7 -- Transition Sequence = Rest & Relax into Day Shift into Night Shift -- RR (Rest & Relax) = 1 -- DS (Day Shift) = 2 -- NS (Night Shift) = 3 ;WITH roster AS ...
A slider control uses draggable handles to select numeric values. Below is an example of a basic slider initialization: <script> $(function() { $( "#slider" ).slider(); }); </script> <div id="slider"></div>
The @Header and @Body annotations can be placed into the method signatures and Retrofit will automatically create them based on your models. public interface MyService { @POST("authentication/user") Call<AuthenticationResponse> authenticateUser(@Body AuthenticationReques...
docker-compose.yml version: '2' services: php: image: phpmyadmin/phpmyadmin links: - mysql:db depends_on: - mysql mysql: image: k0st/alpine-mariadb volumes: - ./data/mysql:/var/lib/mysql environment: - MYSQL_DATABASE=mydb ...
COALESCE() returns the first NON NULL value in a list of arguments. Suppose we had a table containing phone numbers, and cell phone numbers and wanted to return only one for each user. In order to only obtain one, we can get the first NON NULL value. DECLARE @Table TABLE (UserID int, PhoneNumber va...
<svg width="400" height="400"> <defs> <pattern id="pattern1" width="0.2" height="0.2" patternUnits="objectBoundingBox"> <circle cx="10" cy="10" r="10" fill="#0000ff" /&...
/* Callback for JVMTI_EVENT_VM_INIT */ static void JNICALL vm_init(jvmtiEnv* jvmti, JNIEnv* env, jthread thread) { jint runtime_version; jvmti->GetVersionNumber(&runtime_version); stdout_message("JVMTI Version: %d\n", runtime_verision); } /* Agent_OnLoad() is ca...
Code source View the output here using System; using System.Diagnostics; using System.IO; using PdfSharp; using PdfSharp.Drawing; using PdfSharp.Pdf; using PdfSharp.Pdf.IO; namespace HelloWorld { /// <summary> /// This sample is the obligatory Hello World program. /// &l...
class Digit { public Digit(double d) { val = d; } public double val; // User-defined conversion from Digit to double public static implicit operator double(Digit d) { Console.WriteLine("Digit to double implict conversion called"); return d.val;...
With the Class Based generic Views, it is very simple and easy to create the CRUD views from our models. Often, the built in Django admin is not enough or not preferred and we need to roll our own CRUD views. The CBVs can be very handy in such cases. The CreateView class needs 3 things - a model, t...
Our first syntax example shows the animation shorthand property using all of the available properties/parameters: animation: 3s ease-in 1s 2 reverse both paused slidein; /* duration | timing-function | delay | iteration-count | di...
Guice is a Java library. To use it you have to add a JAR file into the classpath of your Java project. Sample classes Below are several classes for a "Hello, world!" example. An interface of a hello "service": public interface HelloWorldService { public void sayHello(); ...
By default, Eloquent models expect for the primary key to be named 'id'. If that is not your case, you can change the name of your primary key by specifying the $primaryKey property. class Citizen extends Model { protected $primaryKey = 'socialSecurityNo'; // ... } Now, any Eloqu...
Use try-finally to avoid leaking resources (such as memory) in case an exception occurs during execution. The procedure below saves a string in a file and prevents the TStringList from leaking. procedure SaveStringToFile(const aFilename: TFilename; const aString: string); var SL: TStringList; ...
What is XAMPP? XAMPP is the most popular PHP development environment. XAMPP is a completely free, open-source and easy to install Apache distribution containing MariaDB, PHP, and Perl. Where should I download it from? Download appropriate stable XAMPP version from their download page. Choose the ...
Assuming the call to your web application's login handler looks like this: https://somepage.com/ajax/login.ashx?username=admin&password=123 Now in login.ashx, you read these values: strUserName = getHttpsRequestParameterString("username"); strPassword = getHttpsRequestParameterSt...
Intent: Define an interface for creating an object, but let sub classes decide which class to instantiate. Factory Method lets a class defer instantiation to sub classes. UML diagram: Product: It defines an interface of the objects the Factory method creates. ConcreteProduct: Implements Produc...
NHibernate uses classes to map into tables or views. Creating a Plain Old CLR Object (POCOs, sometimes called Plain Ordinary CLR Objects) is a good practice for persistent classes. A POCO has its data accessible through the standard .NET property mechanisms, shielding the internal representation fro...
Show a "Hello World!" in message box. MsgBox, Hello World! Show "Hello World!" stored in variable MyString in message box. MyString := "Hello World!" MsgBox, %MyString% Show a "Hello World!" in tooltip. #Persistent Tooltip, Hello World! Show a &q...
This example shows how PLINQ can be used to calculate the even numbers between 1 and 10,000 using multiple threads. Note that the resulting list will won't be ordered! var sequence = Enumerable.Range(1, 10000); var evenNumbers = sequence.AsParallel() .Where(x => x % 2...

Page 9 of 46