Tutorial by Examples: er

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...
In features/documentation.feature: Feature: Documentation Scenario: User views documentation When I go to the "Cucumber" documentation Then I should see the "Cucumber" documentation A minimal feature has a Feature line and a Scenario with one or more steps begi...
We can limit no of rows from result using rownum clause select * from ( select val from mytable ) where rownum<=5 If we want first or last record then we want order by clause in inner query that will give result based on order. Last Five Record : select * from ( select val f...
This example will show how to make a simple "Hello User [name]" after the login. The example is based on performing a custom action using a hook From your command line terminal, navigate to your Plugins SDK’s hooks folder. To create a hook project, you must execute the create script. Her...
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...
Everybody loves twitter bootstrap, but some of us don't like it's default design. So here's a simple guide on how to start customizing boostrap's design. Twitter boostrap when cloned provides a set of default css files which we can override. The mail css file that we need to override is the boostra...
If you want to use the MySQL command IN() in the QueryBuilder, you can do it with the in() function of the ExpressionBuilder class. // get an ExpressionBuilder instance, so that you $expressionBulder = $this->_em->getExpressionBuilder(); $qb = $this->_em->createQueryBuilder() ->se...
def make_unicode(data): if type(data) != unicode: data = data.decode('utf-8') return data else: return data
Ever wondered why you cannot use Assert.Equals() for both Nunit and MSTest. If you have not then maybe as a start you need to be aware that you cannot use this method. Instead you would use Assert.AreEqual() to compare two objects for equality. The reason here is very simple. Like any class the Ass...
When your Bluetooth LE Watcher's callback is triggered, the eventArgs include an RSSI value telling you the received signal strength (how strong the private async void OnAdvertisementReceived(BluetoothLEAdvertisementWatcher watcher, BluetoothLEAdvertisementReceivedEventArgs eventArgs) { // Th...
let's assume we have three table which can be used for simple website with Tags. Fist table is for Posts. Second for Tags Third for Tags & Post relation fist table "videogame" idtitlereg_dateContent1BioShock Infinite2016-08-08.... "tags" table idname1yennefer2eliza...
Express var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send('Hello World!'); }); app.listen(3000, function () { console.log('Example app listening on port 3000!'); }); Koa var koa = require('koa'); var app = koa(); app.use(functi...
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...
You can access the exact same context as the method you override. class Boat def initialize(name) @name = name end def name @name end end puts Boat.new("Doat").name # => "Doat" class Boat def name "⛵ #{@name} ⛵" end end ...
Modules can be split across many .js files in the same folder. An example in a my_module folder: function_one.js module.exports = function() { return 1; } function_two.js module.exports = function() { return 2; } index.js exports.f_one = require('./function_one.js'); exports.f_two...
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...
An internally defined exception doesn't have a name, but it has its own code. When to use it? If you know that your database operation might raise specific exceptions those which don't have names, then you can give them names so that you can write exception handlers specifically for them. Otherwis...
As the name suggest user defined exceptions are created by users. If you want to create your own exception you have to: Declare the exception Raise it from your program Create suitable exception handler to catch him. Example I want to update all salaries of workers. But if there are no work...
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...
This command, given a commit range commit1..commit2, rewrites history so that git commit author becomes also git committer: git filter-branch -f --commit-filter \ 'export GIT_COMMITTER_NAME=\"$GIT_AUTHOR_NAME\"; export GIT_COMMITTER_EMAIL=\"$GIT_AUTHOR_EMAIL\"; exp...

Page 262 of 417