Tutorial by Examples: er

public class AuthenticationHandler : DelegatingHandler { /// <summary> /// Holds request's header name which will contains token. /// </summary> private const string securityToken = "__RequestAuthToken"; /// <summary> ...
The following example shows how to instantiate a class for logging via the ServiceLoader. Service package servicetest; import java.io.IOException; public interface Logger extends AutoCloseable { void log(String message) throws IOException; } Implementations of the service The...
A Resource bundles contain locale-specific objects. You can pass the bundle to the FXMLLoader during its creation. The controller must implement Initializable interface and override initialize(URL location, ResourceBundle resources) method. The second parameter to this method is ResourceBundle which...
The time for Scheduler Tasks are measured in Ticks. Under normal conditions, there are 20 ticks per second. Tasks scheduled with .scheduleSyncRepeatingTask will be run on the Main Thread Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() { @Override public void run(...
Here is an example of inserting large chunks of data at once. All the data you want to insert is gathered inside of a ContentValues array. @Override public int bulkInsert(Uri uri, ContentValues[] values) { int count = 0; String table = null; int uriType = IChatContract.MessageColu...
If you have multiple libraries in the same solution, you can add local (project) references between them: { "dependencies": { "NETStandard.Library": "1.6.0", "MyOtherLibrary": { "target": "project" } }...
function test($x) { return $x; } $server = new SoapServer(null, array('uri' => "http://test-uri/")); $server->addFunction("test"); $server->handle();
ABCD1penred5002penblue-503penred04pencilblue175pencilgreen-1.5 To sort by column D with "order by": =QUERY("A1:D6","select * order by D desc",1)
ABCD1penred5002penblue-503penred04pencilblue175pencilgreen-1.5 To only return "pencil" data: =QUERY("A1:D6","select * where B='pencil' ",1) To only return rows that contain "pen" (all rows): =QUERY("A1:D6","select * where B contains 'pen' ...
This basic example shows how an application can instantiate a classloader and use it to dynamically load a class. URL[] urls = new URL[] {new URL("file:/home/me/extras.jar")}; Classloader loader = new URLClassLoader(urls); Class<?> myObjectClass = loader.findClass("com.exampl...
You can use other operators besides $set when updating a document. The $push operator allows you to push a value into an array, in this case we will add a new nickname to the nicknames array. db.people.update({name: 'Tom'}, {$push: {nicknames: 'Tommy'}}) // This adds the string 'Tommy' into the n...
If two pointers are compared using <, >, <=, or >=, the result is unspecified in the following cases: The pointers point into different arrays. (A non-array object is considered an array of size 1.) int x; int y; const bool b1 = &x < &y; // unspecified int ...
If the underlying type is not explicitly specified for an unscoped enumeration type, it is determined in an implementation-defined manner. enum E { RED, GREEN, BLUE, }; using T = std::underlying_type<E>::type; // implementation-defined However, the standard does require th...
A reference is not an object, and unlike an object, it is not guaranteed to occupy some contiguous bytes of memory. The standard leaves it unspecified whether a reference requires any storage at all. A number of features of the language conspire to make it impossible to portably examine any storage ...
If a function has multiple arguments, it is unspecified what order they are evaluated in. The following code could print x = 1, y = 2 or x = 2, y = 1 but it is unspecified which. int f(int x, int y) { printf("x = %d, y = %d\n", x, y); } int get_val() { static int x = 0; r...
Most printable characters can be included in string or regular expression literals just as they are, e.g. var str = "ポケモン"; // a valid string var regExp = /[Α-Ωα-ω]/; // matches any Greek letter without diacritics In order to add arbitrary characters to a string or regular expression,...
The time for Scheduler Tasks are measured in Ticks. Under normal conditions, there are 20 ticks per second. Tasks scheduled with .scheduleSyncDelayedTask will be run on the Main Thread Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { @Override public void run() { ...
post-receive hooks can be used to automatically forward incoming pushes to another repository. $ cat .git/hooks/post-receive #!/bin/bash IFS=' ' while read local_ref local_sha remote_ref remote_sha do echo "$remote_ref" | egrep '^refs\/heads\/[A-Z]+-[0-9]+$' >/dev/null &am...
As of Kafka 0.9, the new high level KafkaConsumer client is availalbe. It exploits a new built-in Kafka protocol that allows to combine multiple consumers in a so-called Consumer Group. A Consumer Group can be describes as a single logical consumer that subscribes to a set of topics. The partions ov...
KafkaConsumers request messages from a Kafka broker via a call to poll() and their progress is tracked via offsets. Each message within each partition of each topic, has a so-called offset assigned—its logical sequence number within the partition. A KafkaConsumer tracks its current offset for each p...

Page 239 of 417