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...
QModelIndex does not actually know about it's parent/child indexes, it only contains a row, a column and a pointer, and it is the models responsibility to use this data to provide information an index's relations. The model therefore needs to do a lot of conversions from the void* stored inside the ...
The igraph package for R is a wonderful tool that can be used to model networks, both real and virtual, with simplicity. This example is meant to demonstrate how to create two simple network graphs using the igraph package within R v.3.2.3.
Non-Directed Network
The network is created with this pie...
#include <elapsedMillis.h>
void setup() {
Serial.begin(115200);
elapsedMillis msTimer;
elapsedMicros usTimer;
long int dt = 500;
delay(dt);
long int us = usTimer;
long int ms = msTimer;
Serial.print("delay(");Serial.print(dt);Serial.println(") to...
Pattern matching can be used effectively with awk as it controls the actions that follows it i.e. { pattern } { action }. One cool use of the pattern-matching is to select multiple between two patterns in a file say patternA and patternB
$ awk '/patternA/,/patternB/' file
Assume my file contents...
Traditional way
interface MathOperation{
boolean unaryOperation(int num);
}
public class LambdaTry {
public static void main(String[] args) {
MathOperation isEven = new MathOperation() {
@Override
public boolean unaryOperation(int num) {
...
One can verify whether a method was called on a mock by using Mockito.verify().
Original mock = Mockito.mock(Original.class);
String param1 = "Expected param value";
int param2 = 100; // Expected param value
//Do something with mock
//Verify if mock was used properly
Mockito.veri...
Factory Method is one of creational design patterns. It is used to deal with the problem of creating objects without specifying exact result type. This document will teach you how to use Factory Method DP properly.
Let me explain the idea of it to you on a simple example. Imagine you're working in ...
set alpha {a 1 b 2 c 3}
dict get $alpha b
# => 2
dict get $alpha d
# (ERROR) key "d" not known in dictionary
If dict get is used to retrieve the value of a missing key, an error is raised. To prevent the error, use dict exists:
if {[dict exists $alpha $key]} {
set result [d...
First let's create an ExchangeManager object, where the constructor will connect to the services for us. It also has a GetOofSettings method, which will return the OofSettings object for the specified email address :
using System;
using System.Web.Configuration;
using Microsoft.Exchange.WebServic...
DELETE
FROM Helloworlds
This will delete all the data from the table. The table will contain no rows after you run this code. Unlike DROP TABLE, this preserves the table itself and its structure and you can continue to insert new rows into that table.
Another way to delete all rows in table is ...