Tutorial by Examples

ADD 1 TO cobol This modifies the variable cobol. Overflow silently ignored. ADD 1 TO cobol GIVING GnuCOBOL This doesn't modify cobol, the result of the ADD being stored in GnuCOBOL. Again, overflow of the storage allocation silently ignored (the field will stay at its old value on size erro...
[Header( "My variables" )] public string MyString; [HideInInspector] public string MyHiddenString; [Multiline( 5 )] public string MyMultilineString; [TextArea( 2, 8 )] public string MyTextArea; [Space( 15 )] public int MyInt; [Range( 2.5f, 12.5f )] public float MyFlo...
[DisallowMultipleComponent] [RequireComponent( typeof( Rigidbody ) )] public class AttributesExample : MonoBehaviour { [...] } [DisallowMultipleComponent] The DisallowMultipleComponent attribute prevents users adding multiple instances of this component to one GameObject. [Requi...
[ExecuteInEditMode] public class AttributesExample : MonoBehaviour { [RuntimeInitializeOnLoadMethod] private static void FooBar() { [...] } [RuntimeInitializeOnLoadMethod( RuntimeInitializeLoadType.BeforeSceneLoad )] private static void Foo() { ...
[AddComponentMenu( "Examples/Attribute Example" )] public class AttributesExample : MonoBehaviour { [ContextMenuItem( "My Field Action", "MyFieldContextAction" )] public string MyString; private void MyFieldContextAction() { [...] ...
[InitializeOnLoad] public class AttributesExample : MonoBehaviour { static AttributesExample() { [...] } [InitializeOnLoadMethod] private static void Foo() { [...] } } [InitializeOnLoad] public class AttributesExample : MonoBeh...
Use .PHONY to specify the targets that are not files, e.g., clean or mrproper. Good example .PHONY: clean clean: rm *.o temp Bad example clean: rm *.o temp In the good example make knows that clean is not a file, therefore it will not search if it is or not up to date and will ex...
Data frames are R's tabular data structure. They can be written to or read from in a variety of ways. This example illustrates a couple common situations. See the links at the end for other resources. Writing Before making the example data below, make sure you're in a folder you want to write to....
Detailed instructions on getting core-bluetooth set up or installed.
This example uses C++14 and boost::any. In C++17 you can swap in std::any instead. The syntax we end up with is: const auto print = make_any_method<void(std::ostream&)>([](auto&& p, std::ostream& t){ t << p << "\n"; }); super_any<decltype(print...
"Hello World!" Also, check out the detailed discussion of how, when, whether and why to print a string.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Draw two rectangles on the canvas</title> <style> canvas{ border:1px solid gray; } </style> <script async...
We can change the tasks execution order with the dependsOn method. task A << { println 'Hello from A' } task B(dependsOn: A) << { println "Hello from B" } Adding `dependsOn: causes: task B depends on task A Gradle to execute A task everytime before the B ta...
project('projectA') { task A(dependsOn: ':projectB:B') << { println 'Hello from A' } } project('projectB') { task B << { println 'Hello from B' } } To refer to a task in another project, you prefix the name of the task with the path of the pr...
task A << { println 'Hello from A' } task B << { println 'Hello from B' } B.dependsOn A It is an alternative way to define the dependency instead of using the task name. And the output is the same: > gradle -q B Hello from A Hello from B
import React, { Component } from 'react'; import { AppRegistry, Text } from 'react-native'; class HelloWorldApp extends Component { render() { return ( <Text>Hello world!</Text> ); } } AppRegistry.registerComponent('HelloWorldApp', () => HelloWorldApp); ...
You can add multiple dependencies. task A << { println 'Hello from A' } task B << { println 'Hello from B' } task C << { println 'Hello from C' } task D << { println 'Hello from D' } Now you can define a set of dependencies: B.dependsOn A...
You can add multiple dependencies. task A << { println 'Hello from A' } task B(dependsOn: A) << { println 'Hello from B' } task C << { println 'Hello from C' } task D(dependsOn: ['B', 'C'] << { println 'Hello from D' } The output is: >...
The remote module allows simple RMI (remote method invocation) of main process objects from renderer process. First create the main process in index.js const {app, BrowserWindow} = require('electron') let win = null app.on('ready', () => { win = new BrowserWindow() win.loadURL(`file://...
Create index.js as const {app, BrowserWindow, ipcMain} = require('electron') let win = null app.on('ready', () => { win = new BrowserWindow() win.loadURL(`file://${__dirname}/index.html`) win.webContents.openDevTools() win.on('closed', () => { win = null }) }) ipcM...

Page 774 of 1336