Tutorial by Examples: f

Create an HTML file (in this example libraries/turf.html) with the library you want to load: <script src="../../bower_components/turf/turf.min.js"></script> Import the HTML file (libraries/turf.html) in your component with the rest of your imports: <link rel...
def make_unicode(data): if type(data) != unicode: data = data.decode('utf-8') return data else: return data
In PubNub JavaScript v3, you could implement a unique callback for every channel that you subscribed to as long as you called the subscribe function for each channel and implemented the callback in that subscribe like this: var pubnub = new PubNub({ publishKey: "your-pub-key", s...
Say you have the following model: public class foo { [Required] public string Email { get; set; } [Required] public string Password { get; set; } [Required] public string FullName { get; set; } } But you want to exclude FullName from the modelvalidation becaus...
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...
It depends on kind of hosting that you have: If you have SSH console, then you can do it on hosting after step 2, if you haven't then do it locally: run command php app/console cache:clear --env=prod'. Suppose you have on you hosting folders youdomain/public_html, so in public_html m...
Suppose you have a table and you want to change one of this table primary id. you can use the following scrpit. primary ID here is "PK_S" begin for i in (select a.table_name, c.column_name from user_constraints a, user_cons_columns c where a.CONSTRAINT_TYPE...
Suppose you have the table T1 and it has relation with many tables and its primary key constraint name is "pk_t1" you want to disable these foreign keys you can use: Begin For I in (select table_name, constraint_name from user_constraint t where r_constraint_name='pk_t1') loop E...
Using the -a/--all flag will print all the available information about the kernel. $uname -a Linux hostname 3.13.0-88-generic #135-Ubuntu SMP Wed Jun 8 21:10:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux In this example, we see the kernel name, the hostname, the kernel release number, the kernel v...
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...
trait PartialFunction[-A, +B] extends (A => B) Every single-argument PartialFunction is also a Function1. This is counter-intuitive in a formal mathematical sense, but better fits object oriented design. For this reason Function1 does not have to provide a constant true isDefinedAt method. To...
<appSettings> <add key="ClientValidationEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/> </appSettings>
@model WebApplication4.Models.UserModel @{ ViewBag.Title = "Register"; } <h2>@ViewBag.Title.</h2> @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { @Htm...
public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.A...
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...
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...

Page 281 of 457