Tutorial by Examples

mkdir -p toplevel/sublevel_{01..09}/{child1,child2,child3} This will create a top level folder called toplevel, nine folders inside of toplevel named sublevel_01, sublevel_02, etc. Then inside of those sublevels: child1, child2, child3 folders, giving you: toplevel/sublevel_01/child1 toplevel/s...
Fibonacci numbers are used as a very common example for teaching recursion. fib 0 = 0 fib 1 = 1 fib n = fib (n-1) + fib (n-2)
public class Main extends JavaPlugin { @Override public void onEnable() { Bukkit.getPluginManager().registerEvents(this, this); } @EventHandler public void yourEvent(Event e) { //... } }
Problem definition: An 8 puzzle is a simple game consisting of a 3 x 3 grid (containing 9 squares). One of the squares is empty. The object is to move to squares around into different positions and having the numbers displayed in the "goal state". Given an initial state of 8-puzzle...
In Laravel documentation, a symbolic link (symlink or soft link) from public/storage to storage/app/public should be created to make files accessible from the web. (THIS PROCEDURE WILL CREATE SYMBOLIC LINK WITHIN THE LARAVEL PROJECT DIRECTORY) Here are the steps on how you can create symbolic lin...
BlurBitmapTask.java public class BlurBitmapTask extends AsyncTask<Bitmap, Void, Bitmap> { private final WeakReference<ImageView> imageViewReference; private final RenderScript renderScript; private boolean shouldRecycleSource = false; public BlurBitmapTask(@NonNu...
We will follow the official guide for spring-boot and spring-data-jpa. We will be building the application using gradle. Create the gradle build file build.gradle buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework....
When creating a scrapy project with scrapy startproject myproject, you'll find a pipelines.py file already available for creating your own pipelines. It isn't mandatory to create your pipelines in this file, but it would be good practice. We'll be explaining how to create a pipeline using the pipeli...
new Error(message) Creates new error object, where the value message is being set to message property of the created object. Usually the message arguments are being passed to Error constructor as a string. However if the message argument is object not a string then Error constructor calls .toString...
Data in R are stored in vectors. A typical vector is a sequence of values all having the same storage mode (e.g., characters vectors, numeric vectors). See ?atomic for details on the atomic implicit classes and their corresponding storage modes: "logical", "integer", "numeri...
Currently there are numerous incompatibilities with .Net core. This will show status of NancyFx package status. This is grouped by functionality. Currently support is for Nancy 2.* which has not released a stable version yet. Nancy core Nancy : 2.0.0-clinteastwood Nancy Boostrappers Nancy.Bo...
No Longer supported: Get ["/"] = parameters => { return View["index"]; }; Changed to: Get("/", parameters => { return View["index"]; });
Install Atom. You can get atom from here Go to Atom settings (ctrl+,). Packages -> Install go-plus package (go-plus) After Installing go-plus in Atom: Get these dependencies using go get or another dependency manager: (open a console and run these commands) go get -u golang.org/x/...
var gulp = require('gulp'); var path = require('path'); var shell = require('gulp-shell'); var goPath = 'src/mypackage/**/*.go'; gulp.task('compilepkg', function() { return gulp.src(goPath, {read: false}) .pipe(shell(['go install <%= stripPath(file.path) %>'], { ...
package mypackage var PublicVar string = "Hello, dear reader!" //Calculates the factorial of given number recursively! func Factorial(x uint) uint { if x == 0 { return 1 } return x * Factorial(x-1) }
Now you can start writing your own go code with auto-completion using Atom and Gulp: package main import ( "fmt" "mypackage" ) func main() { println("4! = ", mypackage.Factorial(4)) }
In SCSS variables begin with $ sign, and are set like CSS properties. $label-color: #eee; They are only available within nested selectors where they’re defined. #menu { $basic-color: #eee; color: $basic-color; } If they’re defined outside of any nested selectors, then they can be us...
Floating point literals provide values that can be used where you need a float or double instance. There are three kinds of floating point literal. Simple decimal forms Scaled decimal forms Hexadecimal forms (The JLS syntax rules combine the two decimal forms into a single form. We treat t...
function addTwo(a, b = 2) { return a + b; } addTwo(3) // Returns the result 5 With the addition of default function parameters you can now make arguments optional and have them default to a value of your choice.
function argumentLength(...args) { return args.length; } argumentLength(5) // returns 1 argumentLength(5, 3) //returns 2 argumentLength(5, 3, 6) //returns 3 By prefacing the last argument of your function with ... all arguments passed to the function are read as an array. In this examp...

Page 1081 of 1336