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...
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
...
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...
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...
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...
This is a simple RMI example with five Java classes and two packages, server and client.
Server Package
PersonListInterface.java
public interface PersonListInterface extends Remote
{
/**
* This interface is used by both client and server
* @return List of Persons
* @throws...
Lists as arguments are just another variable:
def func(myList):
for item in myList:
print(item)
and can be passed in the function call itself:
func([1,2,3,5,7])
1
2
3
5
7
Or as a variable:
aList = ['a','b','c','d']
func(aList)
a
b
c
d
In addition to libraries defined in EcmaScript language specification and EcmaScript internationalization API specification, d8 also implements the following functions and objects.
print(args...): function. Print to stdout.
printErr(args...): function. Print to stderr.
write(args...): function....
If class A is in relationship with class B and class B has property with the same name and type as the primary key of A, then EF automatically assumes that property is foreign key.
public class Department
{
public int DepartmentId { set; get; }
public string Name { set; get; }
publi...
WPF does not support displaying anything other than an image as a splash screen out-of-the-box, so we'll need to create a Window which will serve as a splash screen. We're assuming that we've already created a project containing MainWindow class, which is to be the application main window.
First of...