Tutorial by Examples: a

An example on how to compose the reader, writer, and state monad using monad transformers. The source code can be found in this repository We want to implement a counter, that increments its value by a given constant. We start by defining some types, and functions: newtype Counter = MkCounter {...
As an example you want to disable pagination in your default index action and get all results in index. How can you do that? It's simple. You should override the index action in your controller like this: public function actions() { $actions = parent::actions(); unset($actions['index'])...
Create training instances from .arff file private static Instances getDataFromFile(String path) throws Exception{ DataSource source = new DataSource(path); Instances data = source.getDataSet(); if (data.classIndex() == -1){ data.setClassIndex(data.numAttributes()...
The sqlite3 module was written by Gerhard Häring. To use the module, you must first create a Connection object that represents the database. Here the data will be stored in the example.db file: import sqlite3 conn = sqlite3.connect('example.db') You can also supply the special name :memory: to ...
Build the APK First of all we need to build the APK. ionic build --release android Generate private Key Then we will create a keystore to sign the APK. keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 Change my-release-key with ...
You browse the Records Browser first by Record Type, i.e. "Sales Order", "Invoice", "Employee". There is no searching capability within the Records Browser, so all navigation is done manually. Record Types are organized alphabetically, so you first click on the first le...
Each schema provides you with an overwhelming amount of information about each record type. It is important to know how to break down all of this information. At the top of the schema is the name of the Record Type followed by the Internal ID of the record type; this internal ID is the programmatic...
As stated previously, there is no searching capability built in to the Records Browser. Once you've navigated to the appropriate Record Type, if you don't already know a particular field's Internal ID, the easiest way to find it is to use your browser's Find function (usually CTRL+F) to locate the f...
The nlapiSubmitField column is a critical piece to understand. This column indicates whether the field is available for inline editing. If nlapiSubmitField is true, then the field can be edited inline. This greatly impacts how this field is handled when trying to use the nlapiSubmitField or record.s...
import React, { Component } from 'react'; import { View, Text, StyleSheet } from 'react-native'; const styles = StyleSheet.create({ red: { color: 'red' }, big: { fontSize: 30 } }); class Example extends Component { render() { return ( ...
You can pass an array to the style prop to apply multiple styles. When there is a conflict, the last one in the list takes precedence. import React, { Component } from 'react'; import { View, Text, StyleSheet } from 'react-native'; const styles = StyleSheet.create({ red: { color: ...
ColumnColumn AExample formulaExample formulaRow 12Row 23Row 35=A1+A2=Sum(A1,A2)
You can call the CEE3DLY service in 24- 31- or 64- bit mode to delay a task to the nearest second. It is CICS save and will only delay the thread. An example: IDENTIFICATION DIVISION. PROGRAM-ID. SLEEPYTM. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. ...
Before running gulp you need to install Node.JS and npm The head of the Gulp.js is: var gulp = require('gulp'); clean = require('gulp-clean'); // A gulp plugin for removing files and folders. imagemin = require('gulp-imagemin'); // Minify PNG, JPEG, GIF and SVG images Then assign path...
Before starting gulp we need to install node.js and npm. Then install gulp-sacc $ npm i gulp-sass --save-dev // i = install Gulp Head var gulp = require('gulp'); // Requires the gulp-sass plugin var sass = require('gulp-sass'); Gulp Body gulp.task('sass', function(){ return gulp.src('...
One way to avoid deep nesting (as recommended above) is to generate the collection actions scoped under the parent, so as to get a sense of the hierarchy, but to not nest the member actions. In other words, to only build routes with the minimal amount of information to uniquely identify the resource...
Use dynamic_cast<>() as a function, which helps you to cast down through an inheritance hierarchy (main description). If you must do some non-polymorphic work on some derived classes B and C, but received the base class A, then write like this: class A { public: virtual ~A(){} }; class B...
VBScript is a weakly typed language; variables are all of type variant, though they usually have an implied subtype denoting the data they hold. This means that your variable, no matter what you call it, can hold any value: Dim foo foo = "Hello, World!" foo = 123.45 foo = #01-Jan-2016...
Save data to and from file import pickle def save(filename,object): file=open(filename,'wb') pickle.dump(object,file) file.close() def load(filename): file=open(filename,'rb') object=pickle.load(file) file.close() return object >>>list_object=[1,...
Unity is an xUnit-style test framework for unit testing C. It is written completely in C and is portable, quick, simple, expressive and extensible. It is designed to especially be also useful for unit testing for embedded systems. A simple test case that checks the return value of a function, might...

Page 835 of 1099