Tutorial by Examples: a

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.....
WRITE record COMMIT
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...
<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...
First install gulp and browserify via npm i gulp gulp-browserify. This will install browserify into your node_modules folder. gulpfile.js var gulp = require('gulp'); var browserify = require('gulp-browserify'); gulp.task('script', function() { gulp.src('./src/script.js') .pipe(br...
If we want to display a jquery calendar for end user who can pick maximum date as current date in the calendar. The below code will useful to this scenario. <?php use yii\jui\DatePicker; use yii\widgets\ActiveForm; ?> <?php $form = ActiveForm::begin(['id' => 'profile-form']); ?&gt...
For some forms you want display the days from future/past days and other days need to disabled, then this scenario will help. <?php use yii\jui\DatePicker; use yii\widgets\ActiveForm; ?> <?php $form = ActiveForm::begin(['id' => 'profile-form']); ?> ..... <?php $day = '+...
If you want to have calendar for from date and to date and also to date calendar days always will be greater than from date field, then below scenario will help. <?php $form = ActiveForm::begin(['id' => 'profile-form']); ?> ..... <?= $form->field($model, 'from_date')->widget(D...

Page 712 of 1099