Tutorial by Examples: and

For given type Person: public class Person { public string Name { get; set; } public int Age { get; set; } public string Clothes { get; set; } } List<Person> persons = new List<Person> { new Person{ Name = "Jon", Age = 20, Clothes = "some clothes...
These types are in all versions of SQL Server datetime smalldatetime These types are in all versions of SQL Server after SQL Server 2012 date datetimeoffset datetime2 time
Generally execute() command is used for fire and forget calls (without need of analyzing the result) and submit() command is used for analyzing the result of Future object. We should be aware of key difference of Exception Handling mechanisms between these two commands. Exceptions from submit() ar...
C++14 C++14 introduced a standard way of deprecating functions via attributes. [[deprecated]] can be used to indicate that a function is deprecated. [[deprecated("reason")]] allows adding a specific reason which can be shown by the compiler. void function(std::unique_ptr<A> &&a...
Members of objects or classes can be accessed using the object operator (->) and the class operator (::). class MyClass { public $a = 1; public static $b = 2; const C = 3; public function d() { return 4; } public static function e() { return 5; } } $object = new MyCl...
#include <iostream> #include <string> int main() { const char * C_String = "This is a line of text w"; const char * C_Problem_String = "This is a line of text ኚ"; std::string Std_String("This is a second line of text w"); std::string...
display: inline-block; The display property with the value of inline-block is not supported by Internet Explorer 6 and 7. A work-around for this is: zoom: 1; *display: inline; The zoom property triggers the hasLayout feature of elements, and it is available only in Internet Explorer. The *di...
Step 1: Create events.xml file according to your requirement in frontend, Backend, or both YKM/Banner/etc/frontend/events.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=&q...
Shall the property value's assignment be executed before or after the class' constructor? public class TestClass { public int TestProperty { get; set; } = 2; public TestClass() { if (TestProperty == 1) { Console.WriteLine("Shall this be e...
What are events? VBA is event-driven: VBA code runs in response to events raised by the host application or the host document - understanding events is fundamental to understanding VBA. APIs often expose objects that raise a number of events in response to various states. For example an Excel.Appl...
CREATE TYPE MyUniqueNamesType as TABLE ( FirstName varchar(10), LastName varchar(10), CreateDate datetime default GETDATE() PRIMARY KEY (FirstName,LastName) )
This example finds an array of approximately evenly spaced points along an entire Path. It decomposes all Path segments created with context.lineTo, context.quadraticCurveTo and/or context.bezierCurveTo into points along that Path. Usage // Path related variables var A={x:50,y:100}; var B={x:12...
In order to compile docker its recommended you have at least 2 GB RAM. Even with that it fails sometimes so its better to go for 4GB instead. make sure git and make is installed sudo apt-get install make git-core -y install a new kernel (at least 4.2) sudo apt-get install linux-generic...
# create docker container export cid=$(docker run -d --security-opt seccomp:unconfined busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done') # container is started and prints a number every second # display the output with docker logs $cid # checkpoint the cont...
To use SQL syntax with model, that would transfer result to proper instantions, you should use directly one of Phalcon\Mvc\Model\Resultset classes: $users = new \Application\Models\Users(); // bitwise operation on `flag` field $sql = 'SELECT * FROM phorum.users WHERE (15 & (1 <&...
SELECT OBJECT_ID('MemOptTable1') AS MemOptTable1_ObjectID, OBJECT_ID('MemOptTable2') AS MemOptTable2_ObjectID GO SELECT name,description FROM sys.dm_os_loaded_modules WHERE name LIKE '%XTP%' GO Show all Memory Optimized Tables: SELECT name,type_desc,durability_desc,...
For example, this is traditional tempdb-based table type: CREATE TYPE dbo.testTableType AS TABLE ( col1 INT NOT NULL, col2 CHAR(10) ); To memory-optimize this table type simply add the option memory_optimized=on, and add an index if there is none on the original type: CREATE TYPE dbo....
Declare the cursor to scan a list of records Open it Fetch current record into variables (this increments position) Use %notfound to detect end of list Don't forget to close the cursor to limit resources consumption in current context -- DECLARE CURSOR curCols IS -- select column name a...
To get the list of all backup operations performed on the current database instance: SELECT sdb.Name AS DatabaseName, COALESCE(CONVERT(VARCHAR(50), bus.backup_finish_date, 120),'-') AS LastBackUpDateTime FROM sys.sysdatabases sdb LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_nam...
Same as above in the FOR SYSTEM_TIME FROM <start_date_time>TO <end_date_time> description, except the table of rows returned includes rows that became active on the upper boundary defined by the <end_date_time> endpoint. SELECT * FROM Employee FOR SYSTEM_TIME BETWEEN '201...

Page 83 of 153