Tutorial by Examples: and

We need to define a collection with a url property. This is the url to an API endpoint which should return a json formatted array. var Books = Backbone.Collection.extend({ url: "/api/book", comparator: "title", }); Then, within a view, we'll fetch and render asynch...
Create a Laravel application: $ composer create-project laravel/laravel hello-world Navigate to the project folder, e.g. $ cd C:\xampp\htdocs\hello-world Create a controller: $ php artisan make:controller HelloController --resource This will create the file app/Http/Con...
Commander.js var program = require('commander'); program .version('0.0.1') program .command('hi') .description('initialize project configuration') .action(function(){ console.log('Hi my Friend!!!'); }); program .command('bye [name]') .description('initialize pro...
These events can be used to communicate between 2 or more controllers. $emit dispatches an event upwards through the scope hierarchy, while $broadcast dispatches an event downwards to all child scopes.This has been beautifully explained here. There can be basically two types of scenario while comm...
Create a new application here: create application Choose standalone applicaton and confirm app creation via SMS. Fill Package namefor Android as your current package name. You can get your package name inside android manifest file, at the very begginning. Get your Certificate fingerprint by exe...
1. Install GLFW First step is to create an OpenGL window. GLFW is an Open Source, multi-platform library for creating windows with OpenGL, to install GLFW first download its files from www.glfw.org Extract the GLFW folder and its contents will look like this Download and install CMake to buil...
What is an exception? Exception in PL/SQL is an error created during a program execution. We have three types of exceptions: Internally defined exceptions Predefined exceptions User-defined exceptions What is an exception handling? Exception handling is a possibility to keep o...
using CLI: $ opennlp SentenceDetector ./en-sent.bin < ./input.txt > output.txt using API: import static java.nio.file.Files.readAllBytes; import static java.nio.file.Paths.get; import java.io.IOException; import java.util.Objects; public class FileUtils { /** * Get file data as...
Install the required dependencies: 'org.apache.solr:solr-solrj:5.5.1' 'org.apache.httpcomponents:httpclient:4.3.6' 'com.ibm.watson.developer_cloud:java-sdk:3.2.0' The code below assumes you have a Solr collection with documents and you have trained a ranker, otherwise follow this tutorial pub...
the easiest way is to have the local branch checked out: git checkout old_branch then rename the local branch, delete the old remote and set the new renamed branch as upstream: git branch -m new_branch git push origin :old_branch git push --set-upstream origin new_branch
vagrant reload --provision
Format a date: Date date = new Date(); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); String localizedDate = df.format(date) Format a date and time. Date is in short format, time is in long format: Date date = new Date(); DateFormat df = DateFormat.getDateTimeInstance(DateFor...
MAPCAN: CL-USER> (mapcan #'reverse '((1 2 3) (a b c) (100 200 300))) (3 2 1 C B A 300 200 100) CL-USER> (defun from-to (min max) (loop for i from min to max collect i)) FROM-TO CL-USER> (from-to 1 5) (1 2 3 4 5) CL-USER> (mapcan #'from-to '(1 2 3) '(5 5 5)) (1 2 3 4 5...
MAPC: CL-USER> (mapc (lambda (x) (print (* x x))) '(1 2 3 4)) 1 4 9 16 (1 2 3 4) CL-USER> (let ((sum 0)) (mapc (lambda (x y) (incf sum (* x y))) '(1 2 3) '(100 200 300)) sum) 1400 ; => (1 x 100) + (2 x 200) + (3 x 30...
The Hello World Web Script handles GET HTTP methods. But what if you want to create data on the server? For that your web script should handle POST. Here is a simple example that creates new folders in Company Home. It is invoked by making a POST call with a JSON body that looks like: {'name':'tes...
Overriding properties (both read-only and mutable): abstract class Car { abstract val name: String; open var speed: Int = 0; } class BrokenCar(override val name: String) : Car() { override var speed: Int get() = 0 set(value) { throw UnsupportedOpera...
When automating the provisioning of new nodes to a swarm, you need to know what the right join token is for the swarm as well as the advertised address of the manager. You can find this out by running the following commands on any of the existing manager nodes: # grab the ipaddress:port of the mana...
The sample content used here is Tears of Steel, by Blender Foundation. Specifically, we will use the download titled "HD 720p (~365MB, mov, 2.0)". This is a single file that ends with the extension "mov" and will play in just about any modern media player. Note that the download...
Here the steps required to create a Firebase project and to connect with an Android app. Add Firebase to your app Create a Firebase project in the Firebase console and click Create New Project. Click Add Firebase to your Android app and follow the setup steps. When prompted, enter yo...
!process - list user mode processes .process - set process context !peb - show process environment block !teb - show thread environment block !locks - deadlock analysis .dump - save a crash dump file to disk

Page 94 of 153