Tutorial by Examples: ch

A simple OGL 4.0 GLSL shader program that shows that shows how to add details with tessellation shader to the geometry. The program is executed with a python script. To run the script, PyOpenGL and NumPy must be installed. The basic mesh in this example is an icosahedron that consists of 20 triang...
import * as Redux from 'redux'; import {Inject, Injectable} from '@angular/core'; @Injectable() export class exampleService { constructor(@Inject(AppStore) private store: Redux.Store<AppState>) {} setExampleState(){ this.store.dispatch(updateExample("new value"...
app.store.ts import {InjectionToken} from '@angular/core'; import {createStore, Store, compose, StoreEnhancer} from 'redux'; import {AppState, default as reducer} from "../app.reducer"; export const AppStore = new InjectionToken('App.store'); const devtools: ...
The multi_search option allows us to search for a query in multiple fields at once. GET /_search { "query": { "multi_match" : { "query": "text to search", "fields": [ "field_1", "field_2" ] } }...
Here I assume that project app url is APP_URL=http://project.dev/ts/toys-store Set the writable permission to storage_path('framework/sessions') the folder. Check the path of your laravel project 'path' => '/ts/toys-store', the root of your laravel project. Change the name of your cookie 'co...
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context=&quot...
store the cookie with three parts. function onLogin($user) { $token = GenerateRandomToken(); // generate a token, should be 128 - 256 bit storeTokenForUser($user, $token); $cookie = $user . ':' . $token; $mac = hash_hmac('sha256', $cookie, SECRET_KEY); $cookie .= ':' . $mac...
I get the file path from document directory and read that file in chunks of 1024 and save (append) to NSMutableData object or you can directly write to socket. // MARK: - Get file data as chunks Methode. func getFileDataInChunks() { let doumentDirectoryPath = NSSearchPathForDirectoriesI...
This example will help to verify the given time is within a period or not. To check the time is today, We can use DateUtils class boolean isToday = DateUtils.isToday(timeInMillis); To check the time is within a week, private static boolean isWithinWeek(final long millis) { return System.c...
A search request can be executed purely using a URI by providing request parameters. Not all search options are exposed when executing a search using this mode, but it can be handy for quick "curl tests". GET Index/type/_search?q=field:value Another useful feature provided is highlight...
This is shortest, easiest and most commonly used method. Unfortunately, it has one major limitation - cannot be used on searches with more than 4000 results (rows). // Assume that 'N/search' module is included as 'search' var s = search.create({ type : search.Type.TRANSACTIO...
PagedData is an object, returned by the Search.runPaged(options) method. It works exactly as the UI searches do. PagedData object contains 2 important properties, that you can see on the right side of results header in search results page in Netsuite UI: count (the total number of the results) p...
In find and findstr, there are some special characters that require some caution on it. FIND There is only one character that needs escaping - " quote. To escape it, simply add another quote next to it. So " becomes "". Pretty simple. FINDSTR Findstr comes with plenty of ...
FOR /F In a FOR /F statement, some characters needs escaping, here a list(taken and edited from Rob van der Woude's page) CharacterEscaped ResultRemarks'^'Only needed in FOR /F's brackets, unless usebackq is specified.`^`Only needed in FOR /F's brackets, when usebackq is specified,^,┒;^;┃=^=┣ Must...
Here is a list of other special character(s), that require(s)/may need escaping, but not mentioned above. CharacterEscaped ResultRemarks%%%[LF]^[LF]This trick is metioned by Mark Stang in the alt.msdos.batch news group.
each and eachWithIndex are methods to iterate over collections. each have it(default iterator) and eachWithIndex have it,index(default iterator, default index). We can also change the default iterator/index. Please see below examples. def list = [1,2,5,7] list.each{ println it } list.ea...
A bracket is considered to be any one of the following characters: (, ), {, }, [, or ]. Two brackets are considered to be a matched pair if the an opening bracket (i.e., (, [, or {) occurs to the left of a closing bracket (i.e., ), ], or }) of the exact same type. There are three types of matched p...
Ensure you met all requirements, as per Requirements Mount the temporary API filesystems: cd /location/of/new/root mount -t proc proc proc/ mount --rbind /sys sys/ mount --rbind /dev dev/ mount --rbind /run run/ (optionally) If you need to use an internet connection in the c...
Changing root is commonly done for performing system maintenance on systems where booting and/or logging in is no longer possible. Common examples are: reinstalling the bootloader rebuilding the initramfs image upgrading or downgrading packages resetting a forgotten password building softwar...
Chunks are pieces of code that can be executed interactively. In-order to insert a new chunk by clicking on the insert button present on the notebook toolbar and select your desired code platform (R in this case, since we want to write R code). Alternatively we can use keyboard shortcuts to insert a...

Page 105 of 109