While being better in many regards, the new connection syntax in Qt5 has one big weakness: Connecting overloaded signals and slots. In order to let the compiler resolve the overloads we need to use static_casts to member function pointers, or (starting in Qt 5.7) qOverload and friends:
#include <...
A role in Perl is essentially
a set of methods and attributes which
injected into a class directly.
A role provides a piece of functionality which can be composed into (or applied to) any class (which is said to consume the role).
A role cannot be inherited but may be consumed by another rol...
The axis offsets for drawing the marker that are specified by refX and refY are applied before the rotation specified by the orient parameter. Below you can see the effects of various combinations of orient and refX, refY to illustrate this.
<svg width="800px" height="600px"&...
The default for drawing markers is to use the stroke width of the calling element, but you can explicitly specify that markers be drawn using the unit system for the element the marker is being applied to by specifying markerUnits="userSpaceOnUse". Markers are drawn into a 3x3 markerUnits ...
Elements can specify start, mid and end markers separately. Below are examples of start, mid and end markers for all elements that can be marked. Please note that Chrome does not currently (July 2016) calculate auto orientation correctly for start and end markers for polygons (bug# 633012), and also...
Creating Hadoop User:
sudo addgroup hadoop
Adding a user:
sudo adduser --ingroup hadoop hduser001
Configuring SSH:
su -hduser001
ssh-keygen -t rsa -P ""
cat .ssh/id rsa.pub >> .ssh/authorized_keys
Note: If you get errors [bash: .ssh/authorized_keys: No such file or di...
To check if a Dictionary has an specifique key, you can call the method ContainsKey(TKey) and provide the key of TKey type. The method returns a bool value when the key exists on the dictionary. For sample:
var dictionary = new Dictionary<string, Customer>()
{
{"F1", new Custom...
Notepad++ provides 2 types of features for auto-completion and suggestions:
Auto-completion that reads the open file and provide suggestion of words and/or functions within the file
Suggestion with the arguments of functions (specific to the language)
To enable it, you need to change a settin...
Parameters hints can be customized by the user as indicated in this link: http://docs.notepad-plus-plus.org/index.php/Auto_Completion#How_to_create_keyword_auto-completion_definition_files
How to create keyword auto-completion definition files
Since version 5.0 Notepad++ has support for so calle...
ODS (on-disk structure) version is a number representing version of the database low-level data layout structure (ODS). When a new feature is added to Firebird it might or might not require the structure of database pages or system tables (database metadata) to change. If it does, the ODS version mu...
For some use cases, you can use the using syntax to help define a custom scope. For example, you can define the following class to execute code in a specific culture.
public class CultureContext : IDisposable
{
private readonly CultureInfo originalCulture;
public CultureContext(string ...
Copy the package installer unit file to /etc where changes will not be overwritten on an upgrade:
cp /lib/systemd/system/docker.service /etc/systemd/system/docker.service
Update /etc/systemd/system/docker.service with your options on ExecStart:
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0...
So you've just created your first class in Python, a neat little class that encapsulates a playing card:
class Card:
def __init__(self, suit, pips):
self.suit = suit
self.pips = pips
Elsewhere in your code, you create a few instances of this class:
ace_of_spades = Card('S...