Tutorial by Examples

go get downloads the packages named by the import paths, along with their dependencies. It then installs the named packages, like 'go install'. Get also accepts build flags to control the installation. go get github.com/maknahar/phonecountry When checking out a new package, get creates the ta...
FitViewports are viewports that always maintain the aspect ratio. It does this by creating black bars on the edges where there is space left. This is one of the most commonly used viewports. Usage: private Viewport viewport; private Camera camera; public void create() { camera = new Ortho...
Transcript show: 'Hello World!'. This will print Hello World! to the Transcript window in Smalltalk. Transcript is the class that allows you to print to the Transcript window by sending the message show: to that object. The colon indicates that this message requires a parameter which is in this c...
Ping One of the most used command to delay for a certain amount of time is ping. Basic usage PING -n 1 -w 1000 1.1.1.1 REM the -n 1 flag means to send 1 ping request. REM the -w 1000 means when the IP(1.1.1.1) does not respond, go to the next command REM 1.1.1.1 is an non-existing IP so th...
Sleep On older Windows system, timeout is not available. However, we can use the sleep command. Usage sleep 1 Very self-explanatory; sleep for 1 second. However, sleep is a deperacted command and should be replaced by timeout. Availability This command is available on old Windows system. ...
Getting Started Install NuGet packages: Microsoft.AspNet.Identity.EntityFramework Microsoft.AspNet.Identity.Core Microsoft.AspNet.Identity.OWIN Register action - Account controller [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public async Task<ActionResult> R...
In MVC, there are some scenerios where you want to specify an action for routing purposes, either for a link, form action, or a redirect to action. You can specify an action via the MVC namespace. When given a Controller, such as HomeController: public class HomeController : Controller { pub...
ASP.Net exposes Cache API to store data in the cache for retrieval later. Getting Started Store string Cache["key"]="value"; Retrieve string var value=""; if (Cache["key"] != null) value = Cache["key"].ToString(); You can also use t...
By unlisted package, I mean a package that is not available through Package Control (yet). So, you can't find it in packagecontrol.io. BUT, you can still install it using Package Control, so you'll get all the advantages. For example, they'll be automatically updated, just like a "regular&quot...
Main Component File: //our root app component import {Component, NgModule, ViewChild, ViewContainerRef, ComponentFactoryResolver, ComponentRef} from '@angular/core' import {BrowserModule} from '@angular/platform-browser' import {ChildComponent} from './childComp.ts' @Component({ selector: ...
Read the data of Create And Write To A Stream back into a program. with Ada.Streams.Stream_IO; procedure Main is -- -- ... same type definitions as in referenced example -- Fruit_Colors : array (Fruit) of Color; use Ada.Streams.Stream_IO; F : File_Type; X : Fruit...
As of Salt version 2014.1.0, Salt uses a date based system for version numbers. Version numbers are in the format YYYY.MM.R. The year (YYYY) and month (MM) indicate when the release was created. The bugfix release number (R) increments within that feature release. In order to distinguish future rel...
@echo off cls echo Please input the file path, surrounded by "double quotation marks" if necessary. REM If you don't want to redirect, escape the > by preceding it with ^ set /p filepath=^> echo Writing a random number echo %RANDOM% > %filepath% echo Reading the random n...
package main import "fmt" var V int func F() { fmt.Printf("Hello, number %d\n", V) } This can be built with: go build -buildmode=plugin And then loaded and used from your application: p, err := plugin.Open("plugin_name.so") if err != nil { panic(e...
The following example shows how a set of data obtained from a remote source can be rendered into a component. We make an AJAX request using fetch, which is build into most browsers. Use a fetch polyfill in production to support older browsers. You can also use any other library for making requests ...
Running the split command without any options will split a file into 1 or more separate files containing up to 1000 lines each. split file This will create files named xaa, xab, xac, etc, each containing up to 1000 lines. As you can see, all of them are prefixed with the letter x by default. If ...
Let's say we want to go to the last day of the month, this function will help on it: eom <- function(x, p=as.POSIXlt(x)) as.Date(modifyList(p, list(mon=p$mon + 1, mday=0))) Test: x <- seq(as.POSIXct("2000-12-10"),as.POSIXct("2001-05-10"),by="months") > da...
Let's say we want to go to the first day of a given month: date <- as.Date("2017-01-20") > as.POSIXlt(cut(date, "month")) [1] "2017-01-01 EST"
Let's say we want to move a given date a numof months. We can define the following function, that uses the mondate package: moveNumOfMonths <- function(date, num) { as.Date(mondate(date) + num) } It moves consistently the month part of the date and adjusting the day, in case the date re...
Shaders 3.3 + extension.seen at radeon hd5500 #version 330 triangles deployed so that normal to point out of a cube.trace each triangle 3points order. //#include <stdio.h> //#include <string.h> //#include <iostream> //#include <glib.h> #include <gdk/gdkx.h>...

Page 1150 of 1336