Tutorial by Examples: v

Open a text editor (like Notepad), and type the code below: Imports System.ComponentModel Imports System.Drawing Imports System.Windows.Forms Namespace SampleApp Public Class MainForm : Inherits Form Private btnHello As Button ' The form's constructor: thi...
library(caret) # for dummyVars library(RCurl) # download https data library(Metrics) # calculate errors library(xgboost) # model ############################################################################### # Load data from UCI Machine Learning Repository (http://archive.ics.uci.edu/ml/data...
================== TODO: Link each of the drawing commands below to their individual examples. I don't know how to do this since the links to the individual examples point towards the "draft" folder. TODO: Add examples for these path "action" commands: stroke(), fill(), clip() ...
context.quadraticCurveTo(controlX, controlY, endingX, endingY) Draws a quadratic curve starting at the current pen location to a given ending coordinate. Another given control coordinate determines the shape (curviness) of the curve. <!doctype html> <html> <head> <style...
context.bezierCurveTo(control1X, control1Y, control2X, control2Y, endingX, endingY) Draws a cubic Bezier curve starting at the current pen location to a given ending coordinate. Another 2 given control coordinates determine the shape (curviness) of the curve. <!doctype html> <html&gt...
package { import flash.events.NetStatusEvent; import flash.net.NetStream; import flash.net.NetConnection; import flash.events.Event; import flash.media.Video; import flash.display.Sprite; public class VideoWithNetStatus extends Sprite { private var video:V...
To convert exceptions into Either or Option types, you can use methods that provided in scala.util.control.Exception import scala.util.control.Exception._ val plain = "71a" val optionInt: Option[Int] = catching(classOf[java.lang.NumberFormatException]) opt { plain.toInt } val eitherI...
Recursive joins are often used to obtain parent-child data. In SQL, they are implemented with recursive common table expressions, for example: WITH RECURSIVE MyDescendants AS ( SELECT Name FROM People WHERE Name = 'John Doe' UNION ALL SELECT People.Name FROM Peopl...
You can override the default vmoptions with your own personal settings by choosing Help > Edit Custom VM Options from the Android Studio toolbar. This will create a local copy which you are free to edit. Alternatively, you can edit the default vmoptions directly using the paths given below. Note...
SOAP services can publish metadata that describes the methods that may be invoked by clients. Clients can use tools such as Visual Studio to automatically generate code (known as client proxies). The proxies hide the complexity of invoking a service. To invoke a service, one merely invokes a metho...
To find the largest or smallest element stored in a vector, you can use the methods std::max_element and std::min_element, respectively. These methods are defined in <algorithm> header. If several elements are equivalent to the greatest (smallest) element, the methods return the iterator to th...
View components encapsulate reusable pieces of logic and views. They are defined by: A ViewComponent class containing the logic for fetching and preparing the data for the view and deciding which view to render. One or more views Since they contain logic, they are more flexible than partial v...
The default project template creates a partial view _LoginPartial.cshtml which contains a bit of logic for finding out whether the user is logged in or not and find out its user name. Since a view component might be a better fit (as there is logic involved and even 2 services injected) the followin...
Most examples will work across multiple versions, if you are using a "new" feature you should mention when this was introduced. Example: sort_values.
emacs-live is another popular emacs starter kit, with an additional focus on live music coding using overtone. You can install it in 2 ways: On *nix (e.g. linux, OSX, etc.) systems, run the following command on the command-line: bash <(curl -fksSL https://raw.github.com/overtone/emacs-l...
//iterates over a map, getting the key and value at once var map = hashMapOf(1 to "foo", 2 to "bar", 3 to "baz") for ((key, value) in map) { println("Map[$key] = $value") }
This is the default calling convention for 64-bit applications on many POSIX operating systems. Parameters The first eight scalar parameters are passed in (in order) RDI, RSI, RDX, RCX, R8, R9, R10, R11. Parameters past the first eight are placed on the stack, with earlier parameters closer to th...
// Get the battery API navigator.getBattery().then(function(battery) { // Battery level is between 0 and 1, so we multiply it by 100 to get in percents console.log("Battery level: " + battery.level * 100 + "%"); });
// Get the battery API navigator.getBattery().then(function(battery) { battery.addEventListener('chargingchange', function(){ console.log( 'New charging state: ', battery.charging ); }); battery.addEventListener('levelchange', function(){ console.log( 'New battery...

Page 89 of 296