Tutorial by Examples: a

Detailed instructions on getting retrofit set up or installed.
var person = { name: ko.observable('John') }; console.log(person.name()); console.log('Update name'); person.name.subscribe(function(newValue) { console.log("Updated value is " + newValue); }); person.name('Jane');
Though Go supports ++ and -- operators and the behaviour is found to be almost similar to c/c++, variables with such operators cannot be passed as argument to function. package main import ( "fmt" ) func abcd(a int, b int) { fmt.Println(a," &...
You can attach an image in a texture to a framebuffer, so that you can render directly to that texture. glGenFramebuffers (1, &framebuffer); glBindFramebuffer (GL_FRAMEBUFFER, framebuffer); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, ...
You can read texture data with function glGetTexImage: char *outBuffer = malloc(buf_size); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture); glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, outBuffer); ...
Go to the Microsoft link for the OpenXML SDK download. Click the red download button. On the next screen click the box next to OpenXMLSDKToolV25.msi and click next to begin the download. Once the download is complete, launch the OpenXMLSDKToolV25.msi and follow the instructions on the screen. Th...
preserveAspectRatio is an attribute that indicates whether the image should be scaled uniformly. This attribute only works if the <svg> element also has a viewBox. The default value is xMidYMid, which maintains the aspect ratio and centers the path inside the SVG container: <!-- when not ...
To set up a default SceneKit project you can use the Game Template.
If you are inserting data into a table with an auto increment column and if you want to get the value of the auto increment column. Say you have a table called my_table: CREATE TABLE my_table ( id serial NOT NULL, -- serial data type is auto incrementing four-byte integer name character varying...
Swift Function for loading an animation from a file: func animationFromSceneNamed(path: String) -> CAAnimation? { let scene = SCNScene(named: path) var animation:CAAnimation? scene?.rootNode.enumerateChildNodes({ child, stop in if let animKey = child.animationKeys.first...
There are two types of Active Patterns that somewhat differ in usage - Complete and Partial. Complete Active Patterns can be used when you are able to enumerate all the outcomes, like "is a number odd or even?" let (|Odd|Even|) number = if number % 2 = 0 then Even else Odd N...
When you try to restore database from another server you might get the following error: Error 3154: The backup set holds a backup of a database other than the existing database. In that case you should use WITH REPLACE option to replace database with the database from backup: RESTORE DATABAS...
The Same Database reference allows you to split a single database into multiple projects. This is useful for cases where a project is very large or where different teams manage different parts of the database. If you consider that you have two .sqlproj SSDT database projects with the following stru...
productFlavors { // Define separate dev and prod product flavors. dev { // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin // to pre-dex each module and produce an APK that can be tested on // Android Lollipop without time c...
I have previously written documentation on this site in order to describe how to make web services on Symfony I will write again a tutorial for the symfony >= 3 version. We think that we have a installed web-server on a configured version of Symfony Framework. You must have composer (php packag...
Prerequisites JDK 1.7 or later installed. You can find the Oracle JDK's here. Steps Download Payara Server Full. Unzip the Payara Server at some location on your computer. We will use C:\payara41 as INSTALL_DIR for Windows users and /payara41 for Linux/Mac users. Starting / stopping Pa...
Let's understand something. JavaEE consists of a number of specifications. When you install an Application Server (Payara for example), you install all of the specifications at once. For example there's a specification for an ORM called JPA (Java Persistence API), a specification to build Component ...
Using the Profiler Class One very good practice is to use Profiler.BeginSample and Profiler.EndSample because it will have its own entry in the Profiler Window. Also, those tag will be stripped out on non-Development build using using ConditionalAttribute, so you don't need to remove them from you...
REPL stands for 'Read Evaluate Print Loop.' The REPL can be used to write and execute code one line at a time and is an alternative to writing code to a file and then compiling or interpreting the entire file before execution. To start the SMLNJ REPL from a command prompt: smluser> sml Standar...
If you want to sort your data numerically or alphabetically, you can simply use order by [column]. If you want to sort using a custom hierarchy, use a case statement. Group ----- Total Young MiddleAge Old Male Female Using a basic order by: Select * from MyTable Order by Group retur...

Page 768 of 1099