Tutorial by Examples: c

#ElseIf Win32 Then 'Win32 = True, Win16 = False Private Declare Sub apiCopyMemory Lib "Kernel32" Alias "RtlMoveMemory" (MyDest As Any, MySource As Any, ByVal MySize As Long) Private Declare Sub apiExitProcess Lib "Kernel32" Alias "ExitProcess" (ByVa...
hello_world.c #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #define AUTHOR "Bruce Lee" #define DESC "Hello World driver" static int __init init(void) { printk(KERN_DEBUG "Hello World\n"); return 0;...
https://logging.apache.org/log4cxx/ currently undergoing Incubation - there is no official release update/bug fixes once in the past 12 years, last release was 2008 user can select different LogLevels – TRACE, DEBUG, INFO, WARN, ERROR, and FATAL hierarchical Loggers it is possible to log asy...
https://sourceforge.net/projects/log4cplus/ updates/bug fixes - last release was Jan. 2016 user can select select different LogLevels – TRACE, DEBUG, INFO, WARN, ERROR, and FATAL hierarchical Loggers supports multi–threaded applications but is not safe to be used from asynchronous signals’ ha...
https://sourceforge.net/projects/log4cpp/ bug fixes are about once a year, last release was April 2015 supports multi-threaded applications •no clear documentation exist is licensed under the GNU Lesser General Public License (LGPL) as of version 0.2.1, before that have been released under the...
val map = mapOf("foo" to 1) val foo : String by map println(foo) The example prints 1
class MyDelegate { operator fun getValue(owner: Any?, property: KProperty<*>): String { return "Delegated value" } } val foo : String by MyDelegate() println(foo) The example prints Delegated value
This module can be used to : Create a new element. Delete an element from HTML document. Place element in HTML document. Iinitialisation To be able to use the dom-construct module we need to load it as fallow : require(["dojo/dom-construct"], function(domConstruct){...
interface Foo { fun example() } class Bar { fun example() { println("Hello, world!") } } class Baz(b : Bar) : Foo by b Baz(Bar()).example() The example prints Hello, world!
val a = arrayOf(1, 2, 3) // creates an Array<Int> of size 3 containing [1, 2, 3].
val a = Array(3) { i -> i * 2 } // creates an Array<Int> of size 3 containing [0, 2, 4]
val a = arrayOfNulls<Int>(3) // creates an Array<Int?> of [null, null, null] The returned array will always have a nullable type. Arrays of non-nullable items can't be created uninitialized.
General-purpose stopwatch for timing how long a function takes to run: object Benchmark { fun realtime(body: () -> Unit): Duration { val start = Instant.now() try { body() } finally { val end = Instant.now() return Duration.b...
This module provides function that allows you to manipulate CSS classes of DOM elements. Initialization To be able to use the dom-class module we need to load it as fallow : require(["dojo/dom-class"], function(domClass){ // Write code here }); contains() This function check...
<View style={[(this.props.isTrue) ? styles.bgcolorBlack : styles.bgColorWhite]}> If the value of isTrue is true then it will have black background color otherwise white.
<Image style={[this.props.imageStyle]} source={this.props.imagePath ? this.props.imagePath : require('../theme/images/resource.png')} /> If the path is available in imagePath then it will be assigned to source else the default image path will be assigned.
This following example is created by user Michael Dillon from this answer. Consider the following script: @set @junk=1 /* @echo off cscript //nologo //E:jscript %0 %* goto :eof */ //JScript aka Javascript here This script snippet does: Execute the cscript command which calls itsel...
As mentioned here, the old-school method to run another script is by using temporary files. Simple echo it into a file and then run it(and remove it optionally). Here's the basic concept: @echo off echo //A JS Comment > TempJS.js echo //Add your code>>TempJS.js cscript //nologo //e...
You can save a canvas to an image file by using the method canvas.toDataURL(), that returns the data URI for the canvas' image data. The method can take two optional parameters canvas.toDataURL(type, encoderOptions): type is the image format (if omitted the default is image/png); encoderOptions is ...
My laptop is having Windows 10. Here i am giving steps that you can follow to test and learn Ansible. SOME THEORY For Ansible you need a Control Machine and a host(or hosts) to run the Playbook. Control Machine should be Linux based or MacOS(windows not allowed) and need Python (2.6 or higher v...

Page 796 of 826