Tutorial by Examples: a

You can create you own Scala annotations by creating classes derived from scala.annotation.StaticAnnotation or scala.annotation.ClassfileAnnotation package animals // Create Annotation `Mammal` class Mammal(indigenous:String) extends scala.annotation.StaticAnnotation // Annotate class Platypus...
require 'maruku' str = " # Title * List 1 * List 2 * List 3 " markdown = Maruku.new(str) puts markdown.inspect
require 'maruku' str = " # Title * List 1 * List 2 * List 3 " markdown = Maruku.new(str) puts markdown.to_html_document
require 'json' data = {"test" => 123} puts JSON.generate(data)
require 'json' document = "{\"test\":123}" puts JSON.parse(document)
require 'json' data = JSON '{"test":23}' # => {"test"=>23} or require 'json' data = JSON['{"test":23}'] # => {"test"=>23}
require 'json' document = JSON 'test' => 23 # => "{\"test\":23}" or require 'json' document = JSON['test' => 23] # => "{\"test\":23}"
Here, a cursor is used to loop through all databases. Futhermore, a cursor from dynamic sql is used to query each database returned by the first cursor. This is to demonstrate the connection-scope of a cursor. DECLARE @db_name nvarchar(255) DECLARE @sql nvarchar(MAX) DECLARE @schema nvarcha...
To install a new library into the Arduino IDE: Open Sketch Menu > Include Library > Manage Libraries. Once you have opened the Library Manager you can use the menu in the top to filter the results. Click on the library you want, select a version in the drop down menu, and click...
Once you have installed a library, you need to include it in your sketch in order to use it. Open the Sketch Menu > Include Library and click the Library you want to include. Now, the IDE has generated the required inclusion tags into your code. Now the Library is included in your ...
Using DYNAMIC-FUNCTION or the CALL-object you can dynamically call functions. DEFINE VARIABLE posY AS INTEGER NO-UNDO. DEFINE VARIABLE posX AS INTEGER NO-UNDO. DEFINE VARIABLE OKkeys AS CHARACTER NO-UNDO INIT "QLDRUS". DEFINE VARIABLE Step AS INTEGER NO-...
Step 1: Creating Custom Error Logging Filter which will write Errors in Text Files According to DateWise. public class ErrorLogger : HandleErrorAttribute { public override void OnException(ExceptionContext filterContext) { string strLogText = ""; Excepti...
SimpleXML is a powerful library which converts XML strings to an easy to use PHP object. The following assumes an XML structure as below. <?xml version="1.0" encoding="UTF-8"?> <document> <book> <bookName>StackOverflow SimpleXML Example&lt...
package main import ( "fmt" "log" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" ) type Person struct { Name string Phone string } func main() { session, err := mgo.Dial("server1.example....
FormComponent.ts import {Component} from "@angular/core"; import {FormBuilder} from "@angular/forms"; @Component({ selector: 'app-form', templateUrl: './form.component.html', styleUrls: ['./form.component.scss'], providers : [FormBuilder] }) export class FormComp...
Implemented in a router: export const MainRoutes: Route[] = [{ path: '', children: [ { path: 'main', component: MainComponent , canActivate : [CanActivateRoute] }] }]; The canActivateRoute file: @Injectable() export class CanActivateRoute implements CanActi...
service I created post service with postRequest method. import {Injectable} from '@angular/core'; import {Http, Headers, Response} from "@angular/http"; import {PostModel} from "./PostModel"; import 'rxjs/add/operator/map'; import {Observable} from "rxjs"; ...
First lets create basic navbar.html with 3 options. (Home, List , Create) <nav class="navbar navbar-default" role="navigation"> <ul class="nav navbar-nav"> <li> <a id="home-navbar" routerLink="/home">Home</a> ...
run the follows commands at cmd npm install -g protractor webdriver-manager update webdriver-manager start **create protractor.conf.js file in the main app root. very important to decleare useAllAngular2AppRoots: true const config = { baseUrl: 'http://localhost:3000/', s...
;; returns 3 (+ 1 2) ;; returns 300 (+ 50 210 40) ;; returns 2 (/ 8 4)

Page 915 of 1099