Tutorial by Examples: def

If for some reason, the default PowerShell module repository PSGallery gets removed. You will need to create it. This is the command. Register-PSRepository -Default
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskWrites() .penaltyLog() //Logs a message to LogCat .build())
Private Const HashTypeMD5 As String = "MD5" ' https://msdn.microsoft.com/en-us/library/system.security.cryptography.md5cryptoserviceprovider(v=vs.110).aspx Private Const HashTypeSHA1 As String = "SHA1" ' https://msdn.microsoft.com/en-us/library/system.security.cryptography.sha1c...
The first step for coding for localization is to create default resources. This step is so implicit that many developers do not even think about it. However, creating default resources is important because if the device runs on an unsupported locale, it would load all of its resources from the defau...
Progress supports one dimensional arrays, but they are called EXTENTS. /* Define a character array with the length 5, and display it's length */ DEFINE VARIABLE a AS CHARACTER EXTENT 5 NO-UNDO. DISPLAY EXTENT(a). Individual positions i the array is accessed using "standard" c-style b...
Generally you should always define all variable and parameters as NO-UNDO unless you really need to. DEFINE VARIABLE cString AS CHARACTER NO-UNDO. cString = "HELLO". DISPLAY cString.
In TestDefaultFldr() I set Fldr to the default Inbox. The constant olFolderInbox can be replaced by other values giving access to any of the default folders. If you type Set Fldr = Session.GetDefaultFolder(, the VB editor will display a drop down list of all the possible values. Sub TestDefaultFl...
Every application needed to store User Session or User related details inside application in UserDefaults.So we made whole logic inside a Class for managing UserDefaults better way. Swift 3 import Foundation public struct Session { fileprivate static let defaults = UserDefaults.standard ...
This is the definition of a TEMP-TABLE named ttTempTable with three fields. NO-UNDO indicates that no undo handling is needed (this is usually what you want to do unless you really need the opposite). DEFINE TEMP-TABLE ttTempTable NO-UNDO FIELD field1 AS INTEGER FIELD field2 AS CHARACTER ...
set and multiset have default compare methods, but in some cases you may need to overload them. Let's imagine we are storing string values in a set, but we know those strings contain only numeric values. By default the sort will be a lexicographical string comparison, so the order won't match the n...
Button API provides an easy way to assign common keyboard shortcuts to buttons without the need to access accelerators' list assigned to Scene or explicitly listening to the key events. Namely, two convenience methods are provided: setDefaultButton and setCancelButton: Setting setDefaultButton ...
By convention elementFormDefault is always set to qualified, but lets look at what it actually does. First with elementFormDefault set to qualified. <?xml version="1.0" encoding="utf-8" ?> <!--Created with Liquid Studio 2017 (https://www.liquid-technologies.com)--&g...
In this example we define a package header and a package body wit a function. After that we are calling a function from the package that return a return value. Package header: CREATE OR REPLACE PACKAGE SkyPkg AS FUNCTION GetSkyColour(vPlanet IN VARCHAR2) RETURN VARCHAR2; ...
This approach will prevent a user from embedding a second SQL statement in their input for execution. Dim strSQL As String Dim db As DAO.Database Dim qdf As DAO.QueryDef strSQL = "PARAMETERS [FirstName] Text(255), [LastName] Text(255), [Phone] Text(255); " _ & "INS...
package main import "fmt" var V int func F() { fmt.Printf("Hello, number %d\n", V) } This can be built with: go build -buildmode=plugin And then loaded and used from your application: p, err := plugin.Open("plugin_name.so") if err != nil { panic(e...
There are two ways to define models in sequelize; with sequelize.define(...), or sequelize.import(...). Both functions return a sequelize model object. 1. sequelize.define(modelName, attributes, [options]) This is the way to go if you'd like to define all your models in one file, or if you want to...
/* * Component is an interface * which all elements (files, * folders, links ...) will implement */ class Component { public: virtual int getSize() const = 0; }; /* * File class represents a file * in file system. */ class File : public Component { public: virtual int...
A static data member of the class may be fully defined within the class definition if it is declared inline. For example, the following class may be defined in a header. Prior to C++17, it would have been necessary to provide a .cpp file to contain the definition of Foo::num_instances so that it wou...
A typedef declaration has the same syntax as a variable or function declaration, but it contains the word typedef. The presence of typedef causes the declaration to declare a type instead of a variable or function. int T; // T has type int typedef int T; // T is an alias for int int A[1...
The rule that typedef declarations have the same syntax as ordinary variable and function declarations can be used to read and write more complex declarations. void (*f)(int); // f has type "pointer to function of int returning void" typedef void (*f)(int); // f is an alias for &...

Page 23 of 27