Tutorial by Examples: f

Pre build controls to handle Grids, Inputs, Graphs, Trees, and so on. It supports an event model that preserves state over HTTP, which benefits line-of-business Web application development. The Web Forms-based application provides dozens of events that are supported in hundreds of server co...
It makes it easier to manage complexity by dividing an application into the model, the view, and the controller (Separation of concerns). It does not use view state or server-based forms. This makes the MVC framework ideal for developers who want full control over the behavior of an applica...
var gulp = require('gulp'); var path = require('path'); var shell = require('gulp-shell'); var goPath = 'src/mypackage/**/*.go'; gulp.task('compilepkg', function() { return gulp.src(goPath, {read: false}) .pipe(shell(['go install <%= stripPath(file.path) %>'], { ...
Floating point literals provide values that can be used where you need a float or double instance. There are three kinds of floating point literal. Simple decimal forms Scaled decimal forms Hexadecimal forms (The JLS syntax rules combine the two decimal forms into a single form. We treat t...
function addTwo(a, b = 2) { return a + b; } addTwo(3) // Returns the result 5 With the addition of default function parameters you can now make arguments optional and have them default to a value of your choice.
Eclipse does not give you the possibility to change the font size of the views like 'Project Explorer' or 'Servers', which looks ugly on Linux since Eclipse uses the default (desktop) font size. But you can edit specific configuration files to get the proper font sizes. To fix this annoying font si...
There are some general Future trait implementations in the futures crate. One of them is implemented in futures::sync::oneshot module and is available through futures::oneshot function: extern crate futures; use std::thread; use futures::Future; fn expensive_computation() -> u32 { //...
You can pass parameters to the functions in tf.cond() using lambda and the code is as bellow. x = tf.placeholder(tf.float32) y = tf.placeholder(tf.float32) z = tf.placeholder(tf.float32) def fn1(a, b): return tf.mul(a, b) def fn2(a, b): return tf.add(a, b) pred = tf.placeholder(tf....
If you name your file lib_linux.go, all the content in that file will only be compiled in linux environments: package lib var OnlyCompiledInLinux string
Different platforms can have separate implementations of the same method. This example also illustrates how build tags and file suffixes can be used together. File main.go: package main import "fmt" func main() { fmt.Println("Hello World from Conditional Compilation Doc!&...
Vue provides event modifiers for v-on by calling directive postfixes denoted by a dot. .stop .prevent .capture .self .once For examples: <!-- the click event's propagation will be stopped --> <a v-on:click.stop="doThis"></a> <!-- the submit event will no...
When listening for keyboard events, we often need to check for common key codes. Remembering all the keyCodes is a hassle, so Vue provides aliases for the most commonly used keys: .enter .tab .delete (captures both “Delete” and “Backspace” keys) .esc .space .up .down .left .right For ...
.trim If you want user input to be trimmed automatically, you can add the trim modifier to your v-model managed inputs: <input v-model.trim="msg"> .number If you want user input to be automatically typecast as a number, you can do as follow: <input v-model.number=&q...
The error message in the title is a common beginner mistake. Let's see how it arises and how to fix it. Suppose we need to compute the average value of a list of numbers; the following declaration would seem to do it, but it wouldn't compile: averageOfList ll = sum ll / length ll The problem is...
What's the type of (+) ? λ> :t (+) (+) :: Num a => a -> a -> a What's the type of sqrt ? λ> :t sqrt sqrt :: Floating a => a -> a What's the type of sqrt . fromIntegral ? sqrt . fromIntegral :: (Integral a, Floating c) => a -> c
Create a file ckeditor-content.html with the following content: <!DOCTYPE html> <html> <head> <title>CKEditor Get Content Demo!</title> </head> <body> <script src="//cdn.ckeditor.com/4.6.1/basic/ckeditor.js"></script> ...
It's a good practice to scope patches using Refinements, but sometimes it's nice to load it globally (for example in development, or testing). Say for example you want to start a console, require your library, and then have the patched methods available in the global scope. You couldn't do this wit...
Refinements have special limitations. refine can only be used in a module scope, but can be programmed using send :refine. using is more limited. It can only be called in a class/module definition. Still, it can accept a variable pointing to a module, and can be invoked in a loop. An example show...
This can be usefull when you want to visualize incoming data in real-time. This data could, for example, come from a microcontroller that is continuously sampling an analog signal. In this example we will get our data from a named pipe (also known as a fifo). For this example, the data in the pipe ...
struct Mathematics { internal func performOperation(inputArray: [Int], operation: (Int)-> Int)-> [Int] { var processedArray = [Int]() for item in inputArray { processedArray.append(operation(item)) } retur...

Page 367 of 457