Tutorial by Examples: a

// Include Nodejs' net module. const Net = require('net'); // The port on which the server is listening. const port = 8080; // Use net.createServer() in your code. This is just for illustration purpose. // Create a new TCP server. const server = new Net.Server(); // The server listens to a ...
// Include Nodejs' net module. const Net = require('net'); // The port number and hostname of the server. const port = 8080; const host = 'localhost'; // Create a new TCP client. const client = new Net.Socket(); // Send a connection request to the server. client.connect({ port: port, host:...
Start by downloading the latest stable release from https://hive.apache.org/downloads.html -> Now untar the file with $ tar -xvf hive-2.x.y-bin.tar.gz -> Create a directory in the /usr/local/ with $ sudo mkdir /usr/local/hive -> Move the file to root with $ mv ~/Downloads/hive-2.x.y /...
AppleScript can display dialogs and alerts to the user. Dialogs are for optionally requesting user input. display dialog "Hello World" display alert "Hello World" You can customise the buttons of either using buttons and passing a list of text. display dialog "Hell...
SELECT ROWNUM NO FROM DUAL CONNECT BY LEVEL <= 10
Dependency installation ( https://www.npmjs.com/package/gulp-imagemin ) $ npm install --save-dev gulp-imagemin Usage /* * Your other dependencies. */ var imagemin = require('gulp-imagemin'); /* * `gulp images` - Run lossless compression on all the images. */ gulp.task('images', f...
You can create a custom exception and throw them during the execution of your function. As a general practice you should only throw an exception when your function could not achieve its defined functionality. Private Function OpenDatabase(Byval Server as String, Byval User as String, Byval Pwd as S...
Travis is the original Continuous Integration service that became popular in the Meteor community. It's solid and reliable, has long had a open-source hosting tier, and has run hundreds of thousands of Nightwatch tests over the years. .travis.yml Simply put a .travis.yml file in the root of your ...
SauceLabs is an Automated Testing Platform for the enterprise. It supports both continuous integration, cross browser testing, and a mobile device cloud. Costs are higher than with Travis, Circle, or BrowserStack, hwoever. { "selenium" : { "start_process" : false, ...
BrowserStack uses a device cloud for cross-browser testing. The intent is to allow testing of Selenium scripts on every device possible. { "selenium" : { "start_process" : false, "host" : "hub.browserstack.com", "port" : 80, }, ...
#lang racket (for ([path (in-directory)] #:when (regexp-match? #rx"[.]rkt$" path)) (printf "source file: ~a\n" path)) The #lang line specifies the programming language of this file. #lang racket we are using the baseline, battery-included Racket programming language. O...
This example extends the basic example passing parameters in the route in order to use them in the controller To do so we need to: Configure the parameter position and name in the route name Inject $routeParams service in our Controller app.js angular.module('myApp', ['ngRoute']) .contro...
You can import a single package with the statement: import "path/to/package" or group multiple imports together: import ( "path/to/package1" "path/to/package2" ) This will look in the corresponding import paths inside of the $GOPATH for .go files and ...
// my-feature.module.ts import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { MyComponent } from './my.component'; import { MyDirective } from './my.directive'; import { MyPipe } from './my.pipe'; import { MyService } from './my.service...
Select * from firm's_address; Select * from "firm's_address";
Say you have a table named table or you want to create a table with name which is also a keyword, You have to include the name table in pair of double quotes "table" Select * from table; Above query will fail with syntax error, where as below query will run fine. Select * from "tab...
Create class and add imports to parse information: import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.IgnoreExtraProperties; //Declaration of firebase references private DatabaseReference mDatabase; //Declaration of firebase atributtes public Stri...
To enable a CORS policy across all of your MVC controllers you have to build the policy in the AddCors extension within the ConfigureServices method and then set the policy on the CorsAuthorizationFilterFactory using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Cors.Internal; ... pub...
When publishing Sitecore item programmatically the developer should keep in mind that Sitecore could be configured for several publishing targets, as well that several languages could be defined for item. ID targetDatabaseFieldId = ID.Parse("{39ECFD90-55D2-49D8-B513-99D15573DE41}"); ...
public class HomepageTests { private IWebDriver _driver; [SetUp] public void LoadDriver() { _driver = new ChromeDriver(); } [Test] public void Valid_Home_Page_Title() { _driver.Navigate().GoToUrl("Your homeoage url / loc...

Page 730 of 1099