Tutorial by Examples: o

Auxilliary function that takes a seed and evaluates: uint wang_hash(uint seed) { seed = (seed ^ 61) ^ (seed >> 16); seed *= 9; seed = seed ^ (seed >> 4); seed *= 0x27d4eb2d; seed = seed ^ (seed >> 15); return seed; } anot...
profile_user_profile: path: /profile/{id} defaults: { _controller: ProfileBundle:Profile:profile } requirements: id: \d+ methods: [get, delete] If you decide to use Routing.yml instead of Annotations You can get better view of all routes and...
/* The result can be use for fast way to use columns on Insertion/Updates. Works with tables and views. Example: eTableColumns 'Customers' ColumnNames ------------------------------------------------------ Id, FName, LName, Email, PhoneNumber, PreferredContact INSERT INTO Customers (Id, ...
R-markdown code chunks R-markdown is a markdown file with embedded blocks of R code called chunks. There are two types of R code chunks: inline and block. Inline chunks are added using the following syntax: `r 2*2` They are evaluated and inserted their output answer in place. Block chunks hav...
1)First go through Paypal Developer web site and create an application. 2)Now open your manifest file and give the below permissions <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"...
=QUERY(QUERY(A1:D6,"select C,SUM(D) group by C",1),"select Col2>0",1)
The getForObject and getForEntity methods of RestTemplate load the entire response in memory. This is not suitable for downloading large files since it can cause out of memory exceptions. This example shows how to stream the response of a GET request. RestTemplate restTemplate // = ...; // Optio...
Preemptive basic authentication is the practice of sending http basic authentication credentials (username and password) before a server replies with a 401 response asking for them. This can save a request round trip when consuming REST apis which are known to require basic authentication. As descr...
Using HttpClient as RestTemplate's underlying implementation to create HTTP requests allows for automatic handling of basic authentication requests (an http 401 response) when interacting with APIs. This example shows how to configure a RestTemplate to achieve this. // The credentials are stored he...
get_template_part( 'foo/bar', 'page'); will require 'bar-page.php' from the directory 'foo'.
Phalcon uses db service by default to obtain connection to databases. Assuming you have an conguration file with database field set up, you can include or autoload following code to obtain connection with database for your project: $di->set('db', function () use ($config) { $dbconf = $conf...
Phalcon builds up some information about tables it is using, so it is possible to validate data being inserted to them without implementing everything by hand. Those are meta data for models. To speed up and prevent Phalcon from building Meta Data every time page is refreshed, it is possible to cach...
In addition to using LIMIT SQL statements you can also use the SQLite3 function querySingle to retrieve a single row, or the first column. <?php $database = new SQLite3('mysqlitedb.db'); //Without the optional second parameter set to true, this query would return just //the first column of ...
Assume that we have a system that sends out daily reports over email in the form of attached CSV files and that we want to access these. function getCsvFromGmail() { // Get the newest Gmail thread based on sender and subject var gmailThread = GmailApp.search("from:[email protected] sub...
Using core debugger Node.js provides a build in non graphical debugging utility. To start the build in the debugger, start the application with this command: node debug filename.js Consider the following simple Node.js application contained in the debugDemo.js 'use strict'; function addTwoN...
The main reason that Nightwatch is so powerful, is because of it's excellent configuration file. Unlike most other testing frameworks, Nightwatch is fully configurable and customizable to different environments and technology stacks. .meteor/nightwatch.json The following configuration file is for...
To get Nightwatch working, you'll need a local copy of selenium which is a command-and-control server which manages automated browser instances. You'll also need a web browser which selenium can control, such as chromedriver or phantomjs. Add the following devDependencies to your package.json: { ...
A basic Nightwatch installation for Meteor will have the following directories and files installed. /myapp /myapp/.meteor/nightwatch.json /client/main.html /client/main.js /client/main.css /tests /tests/nightwatch /tests/nightwatch/assertions /tests/nightwatch/commands /tests/nightwatch/da...
NDB relates models as python objects, which can be stored and accessed in the Appengine NoSQL datastore, available to all AppEngine applications. models.py from google.appengine.ext import ndb # https://cloud.google.com/appengine/docs/python/ndb/properties class Series(ndb.Model): &qu...
The first part of this example explains how to implement it. In the second, I will explain how it works. This tries to be a general example. The template for the map (see step 3) and the example functions are fully customizable. ################################# IMPLEMENTATION #####################...

Page 626 of 1038