Tutorial by Examples

To get all the server variables run this query either in the SQL window of your preferred interface (PHPMyAdmin or other) or in the MySQL CLI interface SHOW VARIABLES; You can specify if you want the session variables or the global variables as follows: Session variables: SHOW SESSION VARIABLE...
To get the database server status run this query in either the SQL window of your preferred interface (PHPMyAdmin or other) or on the MySQL CLI interface. SHOW STATUS; You can specify whether you wish to receive the SESSION or GLOBAL status of your sever like so: Session status: SHOW SESSION S...
This example show how I have created a package for my project RegExpTestor So first of all, you have to create a tree. In my case I did this: regexp_testor ├── DEBIAN │   ├── control │   └── postinst ├── opt │   └── regexp_testor │   ├── Icon │   │   └── 48x48 │   │   └── r...
public class JSEngine { /* * Note Nashorn is only available for Java-8 onwards * You can use rhino from ScriptEngineManager.getEngineByName("js"); */ ScriptEngine engine; ScriptContext context; public Bindings scope; // Initialize t...
class Person { constructor(firstname, lastname) { this._firstname = firstname; this._lastname = lastname; } get firstname() { return this._firstname; } set firstname(name) { this._firstname = name; } get lastname() { return this._lastname; } ...
Gradle Setup : build.gradle(Module: app) compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } jackOptions { enabled true } What is the Stream API ? Stream is a new abstract layer introdu...
import Json.Decode as JD import Json.Decode.Pipeline as JP type PostType = Image | Video type alias Post = { id: Int , postType: PostType } -- assuming server will send int value of 0 for Image or 1 for Video decodePostType: JD.Decoder PostType decodePostType = JD.int |&...
Google Test is a C++ testing framework maintained by Google. It requires building the gtest library and linking it to your testing framework when building a test case file. Minimal Example // main.cpp #include <gtest/gtest.h> #include <iostream> // Google Test test cases are cre...
Processlist This will show all active & sleeping queries in that order then by how long. SELECT * FROM information_schema.PROCESSLIST ORDER BY INFO DESC, TIME DESC; This is a bit more detail on time-frames as it is in seconds by default SELECT ID, USER, HOST, DB, COMMAND, TIME as time_second...
C++1x offers a selection of mutex classes: std::mutex - offers simple locking functionality. std::timed_mutex - offers try_to_lock functionality std::recursive_mutex - allows recursive locking by the same thread. std::shared_mutex, std::shared_timed_mutex - offers shared and unique lock functi...
If you want to notify other clients/users throughout the application ,you not need to worry about the connection because signalr new connection is created every time you visit other pages in the web app. we can leverage the users feature of signalr to achieve the same. see the example below: Here...
This example just illustrates how this keyword can be used. int a = 10; // Assume that type of variable 'a' is not known here, or it may // be changed by programmer (from int to long long, for example). // Hence we declare another variable, 'b' of the same type using // decltype keyword. de...
Let's say we have vector: std::vector<int> intVector; And we want to declare an iterator for this vector. An obvious idea is to use auto. However, it may be needed just declare an iterator variable (and not to assign it to anything). We would do: vector<int>::iterator iter; Howev...
program ForLoopWithContinueAndBreaks; {$APPTYPE CONSOLE} var var i : integer; begin for i := 1 to 10 do begin if i = 2 then continue; (* Skip this turn *) if i = 8 then break; (* Break the loop *) WriteLn( i ); end; WriteLn('Finish.'); end. Outpu...
program repeat_test; {$APPTYPE CONSOLE} var s : string; begin WriteLn( 'Type a words to echo. Enter an empty string to exit.' ); repeat ReadLn( s ); WriteLn( s ); until s = ''; end. This short example print on console Type a words to echo. Enter an empty string to exit....
To influence property lookup, the get handler must be used. In this example, we modify property lookup so that not only the value, but also the type of that value is returned. We use Reflect to ease this. let handler = { get(target, property) { if (!Reflect.has(target, property)) { ...
std::lock uses deadlock avoidance algorithms to lock one or more mutexes. If an exception is thrown during a call to lock multiple objects, std::lock unlocks the successfully locked objects before re-throwing the exception. std::lock(_mutex1, _mutex2);
std::async: performs an asynchronous operation. std::future: provides access to the result of an asynchronous operation. std::promise: packages the result of an asynchronous operation. std::packaged_task: bundles a function and the associated promise for its return type.
We will look at a simple dispatch event with the example usage. (ns myapp.events (:require [re-frame.core :refer [reg-event-db]])) ...
A for loop iterate through items in an array program ArrayLoop; {$APPTYPE CONSOLE} const a : array[1..3] of real = ( 1.1, 2.2, 3.3 ); var f : real; begin for f in a do WriteLn( f ); end. Output: 1,1 2,2 3,3

Page 1245 of 1336