Tutorial by Examples

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...
The effective type of a data object is the last type information that was associated with it, if any. // a normal variable, effective type uint32_t, and this type never changes uint32_t a = 0.0; // effective type of *pa is uint32_t, too, simply // because *pa is the object a uint32_t* pa = &a...
Create a Security class to run your ACL logic. <?php namespace Plugins; use Phalcon\Events\Event; use Phalcon\Mvc\Dispatcher; use Phalcon\Acl; use Phalcon\Acl\Role; use Phalcon\Acl\Resource; use Phalcon\Acl\Adapter\Memory as AclList; class Security extends \Phalcon\Mvc\User\Plugin ...
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;
Returns a table with a rows containing the values that were actual (current) at the specified point in time in the past. SELECT * FROM Employee FOR SYSTEM_TIME AS OF '2016-08-06 08:32:37.91'
Required compiler features can be specified on a target using the command target_compile_features: add_library(foo foo.cpp ) target_compile_features(foo PRIVATE # scope of the feature cxx_constexpr # list of features ) The features must be part of CMAKE_C_COMPILE_FE...
MailApp is the api from Google App Script that can be used to send mail function sendEmails() { var subject = "A subject for your new app!"; var message = "And this is the very first message" var recipientEmail = "[email protected]"; MailApp.sendEmail(rec...
function getSheetData() { var sheet = SpreadsheetApp.getActiveSheet(); var startRow = 2; // First row of data to process var numRows = 100; // Number of rows to process var startCol = 1; //First column of data to process var numCols = 15; // Number of columns to process ...
Given - A have sheet of employees who have requested for reimbursement. Requirement - We should sent out an email to the employee when their reimbursement is processed So, the sheet is as follows: The function for sending out an email is as follows: function getDataSheet() { sheet = Sprea...

Page 736 of 1336