Tutorial by Examples: a

MSDN-GetObject Function Returns a reference to an object provided by an ActiveX component. Use the GetObject function when there is a current instance of the object or if you want to create the object with a file already loaded. If there is no current instance, and you don't want the object ...
The following code implements a simple YoutubePlayerFragment. The activity's layout is locked in portrait mode and when orientation changes or the user clicks full screen at the YoutubePlayer it turns to lansscape with the YoutubePlayer filling the screen. The YoutubePlayerFragment does not need to...
When using an inline data declaration inside of a SELECT...ENDSELECT block or SELECT SINGLE statement, the @ character must be used as an escape character for the DATA(lv_cityto) expression. Once the escape character has been used, all further host variables must also be escaped (as is the case with...
To reverse a list, it isn't important what type the list elements are, only what order they're in. This is a perfect candidate for a generic function, so the same reverseal function can be used no matter what list is passed. let rev list = let rec loop acc = function | [] -...
let map f list = let rec loop acc = function | [] -> List.rev acc | head :: tail -> loop (f head :: acc) tail loop [] list The signature of this function is ('a -> 'b) -> 'a list -> 'b list, which is the most generic it can be. This does not p...
Google Cloud Project Google Cloud Datastore is a NoSQL Database as a Service (DBaaS) that provides developers with a scalable replicated database that is fully managed by Google. For its initial setup you need to either have an existing Google Cloud Platform (GCP) project, or create a new one. Clo...
The Dictionary allows getting a unique set of values very simply. Consider the following function: Function Unique(values As Variant) As Variant() 'Put all the values as keys into a dictionary Dim dict As New Scripting.Dictionary Dim val As Variant For Each val In values ...
<?php set_query_var( 'passed_var', $my_var ); get_template_part( 'foo', 'bar' ); ?> Access it in foo-bar.php <?php echo $passed_var; ?>
You can access the real data type of interface with Type Assertion. interfaceVariable.(DataType) Example of struct MyType which implement interface Subber: package main import ( "fmt" ) type Subber interface { Sub(a, b int) int } type MyType struct { Msg stri...
To run macros and maintain the security Office applications provide against malicious code, it is necessary to digitally sign the VBAProject.OTM from the VBA editor > Tools > Digital Signature. Office comes with a utility to create a self-signed digital certificate that you can employ on th...
HTML: <div class="wrapper"> <img src="http://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png?v=c78bd457575a"> </div> CSS: .wrapper{ position:relative; height: 600px; } .wrapper img { position: absolute; top: 0; le...
Let's say we have a text file and we want to read all words in that file, in order to do some requirements. file.txt: This is just a test file to be used by fscanf() This is the main function: #include <stdlib.h> #include <stdio.h> void printAllWords(FILE *); int main(void...
TypeScript Angular 2 Component import {Component, OnInit, ViewChild, Renderer} from '@angular/core'; import {SuiTransition} from "ng2-semantic-ui/components/transition/transition"; @Component({ selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.co...
For anything below 1.9 SpawnEgg egg = new SpawnEgg(EntityType.CREEPER); ItemStack creeperEgg = egg.toItemStack(5); For 1.9 and above In versions 1.9 and higher, Spigot does not have an implementation for creating spawn eggs without using NMS. To accomplish this, you can use a small custom cl...
class Functor f where fmap :: (a -> b) -> f a -> f b One way of looking at it is that fmap lifts a function of values into a function of values in a context f. A correct instance of Functor should satisfy the functor laws, though these are not enforced by the compiler: fmap id = i...
The Data.Functor module contains two combinators, <$ and $>, which ignore all of the values contained in a functor, replacing them all with a single constant value. infixl 4 <$, $> <$ :: Functor f => a -> f b -> f a (<$) = fmap . const $> :: Functor f => f a ...
If you installed Node using the default directory, while in the global mode, NPM installs packages into /usr/local/lib/node_modules. If you type the following in the shell, NPM will search for, download, and install the latest version of the package named sax inside the directory /usr/local/lib/node...
When we refer the module in the code, node first looks up the node_module folder inside the referenced folder in required statement If the module name is not relative and is not a core module, Node will try to find it inside the node_modules folder in the current directory. For instance, if you do...
Steps to create "Hello, World!" application in Oracle Application Express: Log in to your workspace. Click Application Builder. Application Builder page opens. Click Create. Page with 4 application types appears. Page contains short help text about each application type. Click Deskto...
Detailed instructions on getting travis-ci set up or installed.

Page 833 of 1099