Tutorial by Examples: l

<?php function wpshout_register_widgets() { register_widget( 'Favorite_Song_Widget'); } add_action( 'widgets_init', 'wpshout_register_widgets' ); class Favorite_Song_Widget extends WP_Widget { function Favorite_Song_Widget() { // Instantiate the parent object parent:...
This example has been taken from here package com.reborne.SmartHibernateConnector.utils; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class LiveHibernateConnector implements IHiber...
The easiest way of installing Vala is to install your distribution-specific package. On Ubuntu: sudo apt install valac On Fedora: sudo dnf install vala On Arch: sudo pacman -S vala On OS X, with Homebrew: brew install vala On Windows, you can get an installer for the latest version ...
/** * An example of nlapiLookupField to retrieve a single field from a related record */ // Get the Sales Rep record ID var repId = nlapiGetFieldValue("salesrep"); // Get the name of the Sales Rep var repName = nlapiGetFieldText("salesrep"); // Retrieve the email...
/** * An example of nlapiLookupField to retrieve multiple fields from a related record */ // Get the Sales Rep record ID var repId = nlapiGetFieldValue("salesrep"); // Retrieve multiple fields from the associated Sales Rep var repData = nlapiLookupField("employee", ...
/** * An example of nlapiLookupField to retrieve joined fields from a related record */ var repId = nlapiGetFieldValue("salesrep"); // Retrieve multiple fields from the associated Sales Rep var repData = nlapiLookupField("employee", repId, ["email", "f...
require(["N/search", "N/currentRecord"], function (s, cr) { /** * An example of N/search#lookupFields to retrieve a single field from a related record */ (function () { var record = cr.get(); // Get the Sales Rep record ID ...
require(["N/search", "N/currentRecord"], function (s, cr) { /** * An example of N/search#lookupFields to retrieve multiple fields from a related record */ (function () { var record = cr.get(); // Get the Sales Rep record ID v...
require(["N/search", "N/currentRecord"], function (s, cr) { /** * An example of N/search#lookupFields to retrieve joined fields from a related record */ (function () { var record = cr.get(); // Get the Sales Rep record ID var...
This is a variation on the generic example. You just need to import your app script and invoke it's run() method in the service's main() function. In this case we're also using the multiprocessing module due to an issue accessing WSGIRequestHandler. import win32serviceutil import win32service imp...
Inside the script, use the first line to store the very first variable (in this example, %1%) with a name to deal with. Example: OpenWithFile = %1% Once you open a file with this script through Windows (Right click on any file on MS Windows and choose 'Open with...' then select the compiled version...
The following example creates a Gui with a single button wich brings the SelectFile dialog box. Gui, Loader: New Gui, Loader: Add, Button, Default Center w220 vLOAD, LOAD Gui, Loader: Show, AutoSize Center, Loader return LoaderButtonLOAD: FileSelectFile, LoadedFile, , , , if ErrorLevel...
This examples creates a new empty Gui sensible to Drag n' Drop event: Gui, Dropper: New Gui, Dropper: Font, s10 w700 Gui, Dropper: Add, Text, y80 vText1, Drag the files here Gui, Dropper: Show, w200 h200 Center, Dropper return DropperGuiDropFiles: DroppedFile:=A_GuiEvent FileRead, ...
fuzzy translations Sometimes makemessages may think that the string it found for translation is somewhat similar to already existing translation. It will when mark it in the .po file with a special fuzzy comment like this: #: templates/randa/map.html:91 #, fuzzy msgid "Country" msgstr...
Cassandra uses two kinds of keys: the Partition Keys is responsible for data distribution across nodes the Clustering Key is responsible for data sorting within a partition A primary key is a combination of those to types. The vocabulary depends on the combination: simple primary key: only...
The partition key is the minimum specifier needed to perform a query using a where clause. If you declare a composite clustering key, the order matters. Say you have the following primary key: PRIMARY KEY((part_key1, part_key_2), (clust_key_1, clust_key_2, clust_key_3)) Then, the only valid qu...
First you disable your network card's automatic checksumming: sudo ethtool -K eth1 tx off Then send your packet, using a SOCK_RAW socket: #!/usr/bin/env python from socket import socket, AF_PACKET, SOCK_RAW s = socket(AF_PACKET, SOCK_RAW) s.bind(("eth1", 0)) # We're putting toge...
This is my FirebaseMessagingService public class MyFirebaseMessagingService extends FirebaseMessagingService { Bitmap bitmap; @Override public void onMessageReceived(RemoteMessage remoteMessage) { String message = remoteMessage.getData().get("message"); //imageUri will ...
Deletes a file, or a file-tree. As with many other OS-* utilities, you have to check status in OS-ERROR. OS-DELETE file-or-dir-to-delete [ RECURSIVE ] Delete the entire /tmp/dir tree: OS-DELETE VALUE("/tmp/dir") RECURSIVE. Delete the file called c:\dir\file.txt OS-DELETE VALUE...
Returns a list of all drives on a system. MESSAGE OS-DRIVES VIEW-AS ALERT-BOX. Result with four drives, C through F: On Linux the list will simply be empty as there by definitions are no "drives" connected. Listing directories is done in another way (INPUT FROM OS-DIR)

Page 729 of 861