Tutorial by Examples: c

Suppose you have complex code that creates and returns a list by starting with a blank list and repeatedly appending to it: def create(): result = [] # logic here... result.append(value) # possibly in several places # more logic... return result # possibly in several places...
First, Install gulp and gulp-concat plugin to your project localy npm install --save-dev gulp gulp-concat and add gulp-concat task to your gulpfile.js var gulp = require('gulp'); var concat = require('gulp-concat'); gulp.task('default', function() { }); gulp.task('css', function() { ...
First, Install gulp, gulp-clean-css and gulp-rename to project directory localy npm install --save-dev gulp gulp-clean-css gulp-rename Than add following minify-css task to your gulpfile.js var gulp = require('gulp'); var cleanCSS = require('gulp-clean-css'); var rename = require('gulp-rename...
An existing working copy can be quickly transformed to reflect the contents of a different branch in the same repository. For example, you might have a working copy of the trunk and now need to work on a development branch. Instead of checking out a completely new working copy (which can waste a l...
Introduction As memory prices dropped, Intel-based PCs were able to have more and more RAM affordably, alleviating many users' problems with running many of the ever-larger applications that were being produced simultaneously. While virtual memory allowed memory to be virtually "created" ...
A Subversion repository can be configured so that certain contents or commands are only accessible to certain users. In order to access this restricted content, you will need to specify a username and password. Your username and password can be specified directly as part of the command: $ svn che...
To activate the developer mode: Log in to the ODOO front end Click on the User Name drop down at the top-right side Select 'About' Click on 'Activate developer mode' from the pop-up window.
#include <vector> #include <string> #include "agent_util.hpp" //this file can be found in Java SE Development Kit 8u101 Demos and Samples //see http://download.oracle.com/otn-pub/java/jdk/8u101-b13-demos/jdk-8u101-windows-x64-demos.zip //jdk1.8.0_101.zip!\demo\jvmti\v...
With the RequireQualifiedAccess attribute, union cases must be referred to as MyUnion.MyCase instead of just MyCase. This prevents name collisions in the enclosing namespace or module: type [<RequireQualifiedAccess>] Requirements = None | Single | All // Uses the DU with qualified acc...
public class IntStack { private IntStackNode head; // IntStackNode is the inner class of the class IntStack // Each instance of this inner class functions as one link in the // Overall stack that it helps to represent private static class IntStackNode { privat...
When creating a nested class, you face a choice of having that nested class static: public class OuterClass1 { private static class StaticNestedClass { } } Or non-static: public class OuterClass2 { private class NestedClass { } } At its core, static nested c...
A full explanation of Access Modifiers in Java can be found here. But how do they interact with Inner classes? public, as usual, gives unrestricted access to any scope able to access the type. public class OuterClass { public class InnerClass { public int x = 5; } p...
This topic is intended for intermediate to advanced F# developers "What are Monads?" is a common question. This is easy to answer but like in Hitchhikers guide to galaxy we realize we don't understand the answer because we didn't know what we were asking after. Many believe the way to un...
To create a prefab, drag a game object from the scene hierarchy into the Assets folder or subfolder: The game object name turns blue, indicating it is connected to a prefab. Now this object is a prefab instance, just like an object instance of a class. A prefab can be deleted after instanti...
In Lua, booleans can be manipulated through logical operators. These operators include not, and, and or. In simple expressions, the results are fairly straightforward: print(not true) --> false print(not false) --> true print(true or false) --> true print(false and true) --> false ...
Note that many datatypes don't need to be quoted, since they evaluate to themselves. QUOTE is especially useful for symbols and lists, to prevent evaluation as Lisp forms. Example for other datatypes not needed to be quoted to prevent evaluation: strings, numbers, characters, CLOS objects, ... Her...
class MyHello { def sayHello() { "Hello, world" } } def cl = { sayHello() } cl() // groovy.lang.MissingMethodException cl.delegate = new MyHello() cl(); // "Hello, world" Used extensively by Groovy DSLs.
DateTime now = new DateTime.now(); DateTime berlinWallFell = new DateTime(1989, 11, 9); DateTime moonLanding = DateTime.parse("1969-07-20 20:18:00"); // 8:18pm You can find more in depth information here.
For sending and receiving events we first need an Event object. Event objects are actually simple POJOs. public class ArbitaryEvent{ public static final int TYPE_1 = 1; public static final int TYPE_2 = 2; private int eventType; public ArbitaryEvent(int eventType){ this....
For receiving events you need to register your class on the EventBus. @Override public void onStart() { super.onStart(); EventBus.getDefault().register(this); } @Override public void onStop() { EventBus.getDefault().unregister(this); super.onStop(); } And then subscribe ...

Page 270 of 826