Lets say you want to filter a query by two columns, but only certain combinations of those columns. For example, it's OK to have account 60400 with reference JE, but you cannot have account 60400 with reference ED, but you can have account 60500 with reference ED.
select * from schema.table where ...
# 1. Login Azure by admin account
Add-AzureAccount
#
# 2. Select subscription name
$subscriptionName = Get-AzureSubscription | Select -ExpandProperty SubscriptionName
#
# 3. Create storage account
$storageAccountName = $VMName
# here we use VMName to play the storage account name and create...
Data Access Object(DAO) design pattern is a standard J2EE design pattern.
In this design pattern data is accessed through classes containing methods to access data from databases or other sources, which are called data access objects. Standard practice assumes that there are POJO classes. DAO can b...
ValueExpression ve = AdfmfJavaUtilities.getValueExpression(<binding>, String.class);
String <variable_name> = (String) ve.getValue(AdfmfJavaUtilities.getELContext());
Here "binding" indicates the EL expression from which the value is to be get.
"variabl...
ValueExpression ve = AdfmfJavaUtilities.getValueExpression(<binding>, String.class);
ve.setValue(AdfmfJavaUtilities.getELContext(), <value>);
Here "binding" indicates the EL expression to which the value is to be stored.
"value" is the desired val...
AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext();
MethodExpression me;
me = AdfmfJavaUtilities.getMethodExpression(<binding>, Object.class, new Class[] { });
me.invoke(adfELContext, new Object[] { });
"binding" indicates the EL expression from wh...
AdfmfContainerUtilities.invokeContainerJavaScriptFunction(AdfmfJavaUtilities.getFeatureId(), <function>, new Object[] {
});
"function" is the desired js function to be invoked
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...
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]...
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...
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...
app.js
angular.module('myApp', ['ui.router'])
.service('User', ['$http', function User ($http) {
this.getProfile = function (id) {
return $http.get(...) // method to load data from API
};
}])
.controller('profileCtrl', ['profile', function profileCtrl (profile) {
// i...
This example introduces the VideoCapture class, where we use it to take an image from a webcam and save it to an image.
import org.opencv.core.Mat;
import org.opencv.core.MatOfRect;
import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.imgc...
This example by Daniel Baggio was taken directly from this StackExchange answer, but has been reposted for visibility.
This class takes an Mat object and returns the BufferedImage object used by the javax.swing libraries. This can be used by a Graphics object to draw the image.
private BufferedIma...
@model ContosoUniversity.Models.Student
//The Html.BeginForm helper Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method.
@using (Html.BeginForm())
{
//Generates a hidden form field (anti-for...
// Model is the class that contains the student data send by the controller and will be rendered in the view
@model ContosoUniversity.Models.Student
<h2>Details</h2>
<div>
<h4>Student</h4>
<hr />
<dl class="dl-horizontal">
<...