Tutorial by Examples: st

<macrodef name = "git"> <attribute name = "command" /> <attribute name = "dir" default = "" /> <element name = "args" optional = "true" /> <sequential> <echo message = "git ...
18.0 By default, any function specified in a -callback directive in a behaviour module must be exported by a module that implements that behaviour. Otherwise, you'll get a compiler warning. Sometimes, you want a callback function to be optional: the behaviour would use it if present and exported,...
To sort this table Employee by department, you would use ORDER BY Department. However, if you want a different sort order that is not alphabetical, you have to map the Department values into different values that sort correctly; this can be done with a CASE expression: NameDepartmentHasanITYusufHR...
Entity falling distance is the distance the entity have fallen without reaching a block. It can be used to calculate different damage from falling, or activating an effect after a big fall. Retrieving the falling distance float distanceFell = entity.getFallingDistance(); Setting the falling ...
Follow the below steps to install Oracle JDK from the latest tar file: Download the latest tar file from here - Current latest is Java SE Development Kit 8u112. You need sudo privilages: sudo su Create a dir for jdk install: mkdir /opt/jdk Extract downloaded tar into it: t...
Packages are collections of R functions, data, and compiled code in a well-defined format. Public (and private) repositories are used to host collections of R packages. The largest collection of R packages is available from CRAN. Some of the most popular R machine learning packages are the following...
Import libraries (language dependency: python 2.7) import tensorflow as tf import numpy as np from sklearn.datasets import fetch_mldata from sklearn.model_selection import train_test_split load data, prepare data mnist = fetch_mldata('MNIST original', data_home='./') print "MNIST data,...
int[string] numbers = ["a" : 10, "b" : 20]; assert("a" in numbers); assert("b" in numbers); assert("c" in numbers);
Here a Turtle Graphics Ninja Twist: import turtle ninja = turtle.Turtle() ninja.speed(10) for i in range(180): ninja.forward(100) ninja.right(30) ninja.forward(20) ninja.left(60) ninja.forward(50) ninja.right(30) ninja.penup() ninja.setposit...
The implementation of ICloneable for a struct is not generally needed because structs do a memberwise copy with the assignment operator =. But the design might require the implementation of another interface that inherits from ICloneable. Another reason would be if the struct contains a reference t...
type Props = { posts: Array<Article>, dispatch: Function, children: ReactElement } const AppContainer = ({ posts, dispatch, children }: Props) => ( <div className="main-app"> <Header {...{ posts, dispatch }} /> {children} </...
Setup To start unit testing your Android project using JUnit you need to add the JUnit dependency to your project and you need to create a test source-set which is going to contain the source code for the unit tests. Projects created with Android Studio often already include the JUnit dependency an...
The HTML5 file API allows you to restrict which kind of files are accepted by simply setting the accept attribute on a file input, e.g.: <input type="file" accept="image/jpeg"> Specifying multiple MIME types separated by a comma (e.g. image/jpeg,image/png) or using wild...
In Production its good practice to secure your data and only allow operations on it to be undertaken via Stored Procedures. This means your application can't directly run CRUD operations on your data and potentially cause problems. Assigning permissions is a time-consuming, fiddly and generally oner...
Customer Table IdFirstNameLastName1OzgurOzturk2YoussefMedi3HenryTai Order Table IdCustomerIdAmount12123.502314.80 Get all customers with a least one order SELECT * FROM Customer WHERE EXISTS ( SELECT * FROM Order WHERE Order.CustomerId=Customer.Id ) Result IdFirstNameLastName2YoussefM...
This is just a small hack for those who use self-defined functions often. Type "fun" RStudio IDE and hit TAB. The result will be a skeleton of a new function. name <- function(variables) { } One can easily define their own snippet template, i.e. like the one below ...
Redis has a Windows port provided by 'Microsoft Open Technologies'. You can use the msi installer found on: https://github.com/MSOpenTech/redis/releases After installation completes you can see 'Redis' is a Windows service (and it's status should be "Started") To write an 'Hello world'...
Scatterplot You have two vectors and you want to plot them. x_values <- rnorm(n = 20 , mean = 5 , sd = 8) #20 values generated from Normal(5,8) y_values <- rbeta(n = 20 , shape1 = 500 , shape2 = 10) #20 values generated from Beta(500,10) If you want to make a plot which has the y_val...
Detailed instructions on getting esp8266 set up or installed.
Detailed instructions on getting android-source set up or installed.

Page 282 of 369