Tutorial by Examples

In the example project.json below, an assembly Microsoft.AspNet.Identity.EntityFramework was added which is mscorlib based. { "version": "1.0.0-*", "dependencies": { "Microsoft.AspNet.Identity.EntityFramework": "2.2.1", ...
Targeting multiple frameworks with project.json is simple. However the result are two different compilations. Take the following example: { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.6.0", "...
Another popular error is the referring of packages which does not satisfy all framework on the global scope when multiple frameworks are targeted. { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.6.0", ...
CREATE DATABASE SAMPLEDB; This will create a new database called sampledb.
CONNECT TO SAMPLEDB; From the command line (db2clp, terminal, db2cmd) you can write: db2 CONNECT TO SAMPLEDB
The following statement will create a new table called employee: CREATE TABLE EMPLOYEE ( EMPNO CHAR(6) NOT NULL, FIRSTNME VARCHAR(12) NOT NULL, LASTNAME VARCHAR(15) NOT NULL, SALARY DECIMAL(9,2) , PRIMARY KEY (EMPNO) ...
Let's suppose we are going to insert rows in the previously created table. We can explicitly name the columns we are going to out values is and its order: INSERT INTO EMPLOYEE (EMPNO, FIRSTNME, LASTNAME, SALARY) VALUES ( '123456', 'Ali', 'Veli', 100000); If we know the order and we are going...
SELECT 'HELLO WORLD' FROM SYSIBM.SYSDUMMY1; 1 ----------- Hello World 1 record(s) selected. "The SYSIBM.SYSDUMMY1 table contains one row. The table is used for SQL statements in which a table reference is required, but the contents of the table are not important"...
By using server.close() and process.exit(), we can catch the server exception and do a graceful shutdown. var http = require('http'); var server = http.createServer(function (req, res) { setTimeout(function () { //simulate a long request res.writeHead(200, {'Content-Type': 'text/plain'})...
SQLite.NET is an open source library which makes it possible to add local-databases support using SQLite version 3 in a Xamarin.Forms project. The steps below demonstrate how to include this component in a Xamarin.Forms Shared Project: Download the latest version of the SQLite.cs class and add...
You will need a development device Go to your Apple Developer Account and create a provisioning profile with Push Notifications enabled You will need some sort of way to notify your phone (AWS, Azure..etc) We will use AWS here public override bool FinishedLaunching(UIApplication app, NSDictio...
If you have a directory with existing source files, you can use qmake with the -project-option to create a project file. Let's assume, the folder MyProgram contains the following files: main.cpp foo.h foo.cpp bar.h bar.cpp subdir/foobar.h subdir/foobar.cpp Then by calling qmake -projec...
Scala offers implicit conversions between all the major collection types in the JavaConverters object. The following type conversions are bidirectional. Scala TypeJava TypeIteratorjava.util.IteratorIteratorjava.util.EnumerationIteratorjava.util.IterableIteratorjava.util.Collectionmutable.Bufferjav...
>>> df = pd.DataFrame({'Name':['John Smith', 'Mary Brown'], 'Gender':['M', 'F'], 'Smoker':['Y', 'N']}) >>> print(df) Gender Name Smoker 0 M John Smith Y 1 F Mary Brown N >>> df_with_dummies = pd.get_dummies(df, ...
SELECT val FROM (SELECT val, rownum AS rnum FROM (SELECT val FROM rownum_order_test ORDER BY val) WHERE rownum <= :upper_limit) WHERE rnum >= :lower_limit ; this way we can paginate the table data , just like web serch page
Before creating any extension, always check if it has already been implemented. The first thing one would have to do is define the extension class which will house the twig filters and/or functions. <?php namespace AppBundle\Twig; class DemoExtension extends \Twig_Extension { /** ...
Create folder. Open it in command line. Run npm install webpack -g. Create 2 files: cats.js: var cats = ['dave', 'henry', 'martha']; module.exports = cats; app.js cats = require('./cats.js'); console.log(cats); Run in command line: webpack ./app.js app.bundle.js Now in folder will be fil...
Create folder. Open it in command line. Run npm install webpack -g. Create 2 files: cats.js: define(function(){ return ['dave', 'henry', 'martha']; }); app.js require(['./cats'],function(cats){ console.log(cats); }) Run in command line: webpack ./app.js app.bundle.js Now i...
as written in MDN at July 2016: This feature is not implemented in any browsers natively at this time. It is implemented in many transpilers, such as the Traceur Compiler, Babel or Rollup. So here is example with Babel loader for Webpack: Create folder. Add package.json file there: { &quo...
as written in [MDN][1] at July 2016: This feature is not implemented in any browsers natively at this time. It is implemented in many transpilers, such as the Traceur Compiler, Babel or Rollup. So here is example with Typescript loader for Webpack: //TODO Create simplified version of this ar...

Page 831 of 1336