Tutorial by Examples: o

While it's good practice to use a Unix based operating system (ex. Linux or BSD) as a production server you can easily install PostgreSQL on Windows (hopefully only as a development server). Download the Windows installation binaries from EnterpriseDB: http://www.enterprisedb.com/products-services-...
Assume you have a custom file you want to create an importer for. It could be an .xls file or whatever. In this case we're going to use a JSON file because it's easy but we're going to pick a custom extension to make it easy to tell which files are ours? Let's assume the format of the JSON file is ...
The "right-left" rule is a completely regular rule for deciphering C declarations. It can also be useful in creating them. Read the symbols as you encounter them in the declaration... * as "pointer to" - always on the left side [] as "array of" ...
A goto statement transfers control to the statement with the corresponding label within the same function. Executing the goto statement must not cause any variables to come into scope that were not already in scope at the point of the goto. for example see the standard library source code: https:/...
WeakMap object allows you to store key/value pairs. The difference from Map is that keys must be objects and are weakly referenced. This means that if there aren't any other strong references to the key, the element in WeakMap can be removed by garbage collector. WeakMap constructor has an optional...
To get a value associated to the key, use the .get() method. If there's no value associated to the key, it returns undefined. const obj1 = {}, obj2 = {}; const weakmap = new WeakMap([[obj1, 7]]); console.log(weakmap.get(obj1)); // 7 console.log(weakmap.get(obj2)); // undefined
To assign a value to the key, use the .set() method. It returns the WeakMap object, so you can chain .set() calls. const obj1 = {}, obj2 = {}; const weakmap = new WeakMap(); weakmap.set(obj1, 1).set(obj2, 2); console.log(weakmap.get(obj1)); // 1 console.log(weakmap.get(obj2)); // 2 ...
To remove an element with a specified key, use the .delete() method. It returns true if the element existed and has been removed, otherwise false. const obj1 = {}, obj2 = {}; const weakmap = new WeakMap([[obj1, 7]]); console.log(weakmap.delete(obj1)); // true console.log(weakmap.has(obj...
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...
In order to get started, you just need to install the Unity nuget package. Run the following command from the package manager console: PM> Install-Package Unity Alternatively, you can use Visual Studio to install Unity on a particular project using the Manage NuGet Packages for Solution opti...
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 <&...
-- Create demo database CREATE DATABASE SQL2016_Demo ON PRIMARY ( NAME = N'SQL2016_Demo', FILENAME = N'C:\Dump\SQL2016_Demo.mdf', SIZE = 5120KB, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'SQL2016_Demo_log', FILENAME = N'C:\Dump\SQL2016_Demo_log.ldf', ...
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....
For faster performance you can memory-optimize your table variable. Here is the T-SQL for a traditional table variable: DECLARE @tvp TABLE ( col1 INT NOT NULL , Col2 CHAR(10) ); To define memory-optimized variables, you must first create a memory-optimized table type and...
Recommendation Because the symbols i and j can represent significantly different things in MATLAB, their use as loop indices has split the MATLAB user community since ages. While some historic performance reasons could help the balance lean to one side, this is no longer the case and now the choice...
You could use "SP_HELPINDEX Table_Name", but Kimberly Tripp has a stored procedure (that can be found here), which is better example, as it shows more about the indexes, including columns and filter definition, for example: Usage: USE Adventureworks EXEC sp_SQLskills_SQL2012_helpindex ...
CREATE TABLE dbo.Employee ( [EmployeeID] int NOT NULL PRIMARY KEY CLUSTERED , [Name] nvarchar(100) NOT NULL , [Position] varchar(100) NOT NULL , [Department] varchar(100) NOT NULL , [Address] nvarchar(1024) NOT NULL , [AnnualSalary] decimal (10,2) NOT NULL ...
SELECT * FROM Employee FOR SYSTEM_TIME BETWEEN '2014-01-01 00:00:00.0000000' AND '2015-01-01 00:00:00.0000000' WHERE EmployeeID = 1000 ORDER BY ValidFrom;

Page 560 of 1038