If a singleshot timer is required, it is quiet handy to have the slot as lambda function right in the place where the timer is declared:
QTimer::singleShot(1000, []() { /*Code here*/ } );
Due to this Bug (QTBUG-26406), this is way is only possible since Qt5.4.
In earlier Qt5 versions it has to ...
The config location for your runner is:
Debian/Ubuntu/CentOS
/etc/gitlab-runner/config.toml if run as root
~/.gitlab-runner/config.toml if run as non-root
Windows
config.toml where your binary is located
A minimal config.toml can look like this:
concurrent = 1
[[runners]]
name = "E...
Gmail Example
MAIL_URL=smtp://username%40gmail.com:[email protected]:465/
Note: This setup only allows 2000 emails to be sent per day. Please see https://support.google.com/a/answer/176600?hl=en for alternative configurations.
Org provides a full markup language which helps structuring the document, and is reflected as accurately as possible when exporting to other formats (like HTML or LaTeX).
Structure
Document title
#+TITLE: This is the title of the document
Sectioning
* First level
** Second level
Lists
Or...
Setup
First, install the necessary packages with:
npm install express cors mongoose
Code
Then, add dependencies to server.js, create the database schema and the name of the collection, create an Express.js server, and connect to MongoDB:
var express = require('express');
var cors = require('...
This can be useful if you're writing a game or something that needs to execute a piece of code every a few seconds.
import android.os.Handler;
public class Timer {
private Handler handler;
private boolean paused;
private int interval;
private Runnable task = new Runnable ...
Firstly, we set node category
let groundBody: UInt32 = 0x1 << 0
let boxBody: UInt32 = 0x1 << 1
Then add Ground type node and Box type node.
let ground = SKSpriteNode(color: UIColor.cyanColor(), size: CGSizeMake(self.frame.width, 50))
ground.position = CGPointMake(CGRectGetMidX(sel...
Set scene as delegate
//set your scene as SKPhysicsContactDelegate
class yourScene: SKScene, SKPhysicsContactDelegate
self.physicsWorld.contactDelegate = self;
Then you have to implement one or the other of the contact functions: optional func didBegin(contact:) and/or optional fund didEnd...
MSBuild evaluates PropertyGroup, Choose and ItemGroup elements that are directly under the Project element before those that are in Target elements.
Directly under the Project element, PropertyGroup and Choose elements are evaluated in the order in which they appear, and then ItemGroup elements a...
=SUMPRODUCT((A1:A100<>"")/COUNTIF(A1:A100,A1:A100&""))
counts unique cell values within A1:A100, excluding blank cells and ones with an empty string ("").
How does it do that? Example:
A1:A100 = [1, 1, 2, "apple", "peach", &qu...
add_action( 'init', function() {
// do something here
} );
Using a function block to hook a set of instructions. With the init hook, the set of instructions will be executed right after wordpress has finished loading the necessary components.
function my_init_function() {
// do something here
}
add_action( 'init', 'my_init_function' );
Using the name of the function to hook a set of instructions. With the init hook, the set of instructions will be executed right after wordpress has finished loading the necessary components.
...
class MyClass {
static function my_init_method() {
// do something here
}
}
add_action( 'init', array( 'MyClass', 'my_init_method' ) );
Using a static method of a class to hook a set of instructions. With the init hook, the set of instructions will be executed right after w...