Tutorial by Examples

page.js var context = { items: [ {id: 1, name: "Foo"}, {id: 2, name: "Bar"}, {id: 3, name: "Joe"} ] } exports.loaded = function(args){ var page = args.object; page.bindingContext = context; } exports.showEntry = functi...
Oracle (11g and above) allows the SQL queries to be cached in the SGA and reused to improve performance. It queries the data from cache rather than database. Subsequent execution of same query is faster because now the data is being pulled from cache. SELECT /*+ result_cache */ number FROM main_tab...
Achieving multitenancy on database server with multiple databases hosted on it. Multitenancy is common requirement of enterprise application nowadays and creating connection pool for each database in database server is not recommended. so, what we can do instead is create connection pool with datab...
When you call store.dispatch(actionObject) it is handled synchronously. I.e. reducers would be called and your store listeners would be notified, your react views would be re-rendered on each dispatched action. Middleware is what enables you to delay dispatching or even dispatch different actions ...
Another approach to handling asynchrony in Redux is to use action creators. In Flux, action creators are special functions that construct action objects and dispatch them. myActionCreator(dispatch) { dispatch({ type: "ASYNC_ACTION_START" }); setTimeout(() => { dispatch({ typ...
import pandas as pd data = [ {'name': 'Daniel', 'country': 'Uganda'}, {'name': 'Yao', 'country': 'China'}, {'name': 'James', 'country': 'Colombia'}, ] df = pd.DataFrame(data) filename = 'people.csv' df.to_csv(filename, index=False, encoding='utf-8')
The Python function import_csv_to_dynamodb(table_name, csv_file_name, colunm_names, column_types) below imports a CSV file into a DynamoDB table. Column names and column must be specified. It uses boto. Below is the function as well as a demo (main()) and the CSV file used. import boto MY_ACCESS...
REpresentational State Transfer (REST) is an architectural style used for web development, introduced and defined in 2000 by Roy Fielding. See it on wiki : REST wiki It's based on HTTP protocol (HTTP on Wiki), HTTP requests (GET, POST, PATCH, DELETE...) / responses codes (404, 400, 200, 201, 500.....
Instead of gem 'rails' You can specify a github user/repo combination with gem 'rails', github: 'rails/rails'
WRITE record COMMIT
This example shows how you can use IIS Rewrite rules to force HTTPS by making all HTTP requests return a 301 (Permanent) Redirect to the HTTPS page. This is usually better than using the [RequireHttps] attribute because the attribute uses a 302 redirect, and being in the MVC pipeline it is much slo...
require(['N/search'], function(SEARCHMODULE){ var savedSearchId = 'customsearch_mySavedSearch'; var mySearch = SEARCHMODULE.load(savedSearchId); var resultset = mySearch.run(); var results = resultset.getRange(0, 1000); for(var i in results){ var result = results[i]...
require(['N/search'], function(SEARCHMODULE){ var type = 'transaction'; var columns = []; columns.push(SEARCHMODULE.createColumn({ name: 'internalid' })); columns.push(SEARCHMODULE.createColumn({ name: 'formulanumeric', formula: '{quantity}-{...
Bootstrap defines a custom styling for table using the .table class. Just add the .table class to any <table> to see horizontal dividers and padding: <table class="table"> <thead><tr><th>First Name</th><th>Last name</th></tr></th...
Bootstrap provides a couple of classes for advanced table styling. Striped rows You will have a table with striped rows, if you add .table-striped class: <table class="table table-striped"> <thead><tr><th>First Name</th><th>Last name</th><...
You have to wrap any .table in html container with .table-responsive class to create responsive tables: <div class="table-responsive"> <table class="table"> <thead><tr><th>First Name</th><th>Last name</th></tr></th...
Use .dropdown class on parent element of dropdown menu. Add the .dropdown-menu class to a element to initialize the dropdown menu plugin. Call the plugin by Using class .dropdown-toggle and the data-toggle="dropdown" attribute on a button or a Hyperlink.
<div class="dropdown"> <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Dropdown Example <span class="caret"></span></button> <ul class="dropdown-menu"> &...
Peudo-random generators are frequently useful when designing simulation environments. The following VHDL package shows how to use protected types to design a pseudo-random generator of boolean, bit and bit_vector. It can easily be extended to also generate random std_ulogic_vector, signed, unsigned....
JS // data model var person = { name: ko.observable('Jack'), age: ko.observable(29) }; ko.applyBindings(person); HTML <div> <p>Name: <input data-bind='value: name' /></p> <p>Age: <input data-bind='value: age' /></p> &l...

Page 873 of 1336