Tutorial by Examples: c

Add react-rails to your Gemfile: gem 'react-rails' And install: bundle install Next, run the installation script: rails g react:install This will: create a components.js manifest file and a app/assets/javascripts/components/ directory, where you will put your components place the follo...
React.js builds You can pick which React.js build (development, production, with or without add-ons) to serve in each environment by adding a config. Here are the defaults: # config/environments/development.rb MyApp::Application.configure do config.react.variant = :development end # conf...
It is not a good idea to expose Option types to C# code, as C# does not have a way to handle them. The options are either to introduce FSharp.Core as a dependency in your C# project (which is what you'd have to do if you're consuming an F# library not designed for interop with C#), or to change None...
// If you find yourself doing something like this... function fieldChanged(type, name, index) { if (name == 'salesrep') { var salesRepId = nlapiGetFieldValue('salesrep'); var salesRepEmail = nlapiLookupField('employee', salesRepId, 'email'); nlapiSetFieldValue('custb...
Framebuffer is a type of buffer which stores color values, depth and stencil information of pixels in memory. When you draw something in OpenGL the output is stored in the default framebuffer and then you actually see the color values of this buffer on screen. You can also make your own framebuffer ...
The iv is prefixed to the encrypted data aesCBC128Encrypt will create a random IV and prefixed to the encrypted code. aesCBC128Decrypt will use the prefixed IV during decryption. Inputs are the data and key are Data objects. If an encoded form such as Base64 if required convert to and/or from in ...
PHP has no support for running code concurrently unless you install extensions such as pthread. This can be sometimes bypassed by using proc_open() and stream_set_blocking() and reading their output asynchronously. If we split code into smaller chunks we can run it as multiple suprocesses. Then usi...
It is a basic human instinct to assess risk and to accept or take some kind of action on that risk. This is the essence of security, which is the body of knowledge that provides a framework around this instinct. Security defines three key concepts in a triangular paradigm - Confidentiality, Integri...
OS: Mac OS X 10.11 (Should work on Windows / Linux since we are using Vagrant) Vagrant 1.8.4 Installed Directory Structure on Host OS (Mac OS): /path/to/project /provision /packages Note: If you use different vesions, be sure to update Variables at top of provision.sh script b...
This Example assumes you setup as explained in Example: Setting Up Environment for aurelia-cli Explained of this document. Creating a new project In main host os, open terminal (Mac OS in my case) $cd /path/to/project/vagrant $vagrant up (Launches VM GUI) Log into VM via UI U...
Environment This Example assumes you setup as explained in Example: Setting Up Environment for Aurelia-cli Explained of this document. Summary of setup: On Mac OS X with Vagrant 1.8.4 $cd /path/to/project/vagrant $vagrant up Log into VM via UI as User:vagrant / PW:vagrant $cd /home/vagrant/...
// Must enable the feature to use associated constants #![feature(associated_consts)] use std::mem; // Associated constants can be used to add constant attributes to types trait Foo { const ID: i32; } // All implementations of Foo must define associated constants // unless a defaul...
There are very good configurations to force typings and get more helpful errors which are not activated by default. { "compilerOptions": { "alwaysStrict": true, // Parse in strict mode and emit "use strict" for each source file. // If you have wrong c...
Use the below command to check the replica set status. Command : rs.status() Connect any one of replica member and fire this command it will give the full state of the replica set Example : { "set" : "ReplicaName", "date" : ISODate("2016-09-26T07:3...
Sql Server 2016+ and Azure Sql database enables you to automatically filter rows that are returned in select statement using some predicate. This feature is called Row-level security. First, you need a table-valued function that contains some predicate that describes what it the condition that will...
Security policy is a group of predicates associated to tables that can be managed together. You can add, or remove predicates or turn on/off entire policy. You can add more predicates on tables in the existing security policy. ALTER SECURITY POLICY dbo.CompanyAccessPolicy ADD FILTER PREDICATE...
Row-level security enables you to define some predicates that will control who could update rows in the table. First you need to define some table-value function that represents predicate that wll control access policy. CREATE FUNCTION dbo.pUserCanAccessProduct(@CompanyID int) RETURNS TABLE WIT...
Automatic calculation of low and high thresholds for the Canny operation in opencv
You can configure the database settings in config/connections.js. Example: someMongoDb: { adapter: 'sails-mongo', host: 'localhost', // defaults to `localhost` if omitted port: 27017, // defaults to 27017 if omitted user: 'username_here', // or omit if not relevant password: 'passwo...
Create a new SSDT project Import 3rd party DB Build project to create a dacpac Reference dacpac in other projects

Page 590 of 826