GNU Emacs uses a special format for documentation: info.
The Common Lisp standard has been converted to the Texinfo format, which can be used to create documentation browsable with the info reader in GNU Emacs.
See here: dpans2texi.el converts the TeX sources of the draft ANSI Common Lisp standard...
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...
The elapsedMillis library provides a class with the same name that keeps track of the time that passed since it was created or set to a certain value:
#include <elapsedMillis.h>
#define OUTPIN LED_BUILTIN
#define PERIOD 500
elapsedMillis ledTime;
bool ledState = false;
void setup...
.default-settings() {
padding: 4px;
margin: 4px;
font-size: 16px;
border: 1px solid gray;
}
#demo {
.default-settings;
}
The above example when compiled would only produce the following output. The .default-settings() mixin definition would not be output in the compiled CSS fi...
This trick helps you select an element using the ID as a value for an attribute selector to avoid the high specificity of the ID selector.
HTML:
<div id="element">...</div>
CSS
#element { ... } /* High specificity will override many selectors */
[id="element&quo...
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...
The DatePicker class has a property, SelectedDate, which enable you to get or set the selected date. If there is none selected, it means its value will be null.
if (datePicker.SelectedDate == null)
{
// Do what you have to do
}
trigger MyTrigger on SomeObject__c (after insert, after update) {
if (Trigger.isAfter && Trigger.isInsert) {
System.debug('The following records were inserted: ');
for (SomeObject__c o : Trigger.new) {
System.debug(o.Name);
}
} else if (Trigg...
The standard (17.6.4.2.1/1) generally forbids extending the std namespace:
The behavior of a C++ program is undefined if it adds declarations or definitions to namespace std or to a namespace within namespace std unless otherwise specified.
The same goes for posix (17.6.4.2.2/1):
The behavi...
The value of an entry widget can be obtained with the get method of the widget:
name_entry = tk.Entry(parent)
...
name = name_entry.get()
Optionally, you may associate an instance of a StringVar, and retrieve the value from the StringVar rather than from the widget:
name_var = tk.StringVar()
...
Nesting is great for keeping related selectors together to make it easier for future developers to understand your code. The parent selector, represented by an ampersand ("&") can help do that in more complex situations. There are several ways its can be used.
Create a new selector th...
This are the tools you need to build SFML for Android on a Windows Machine
CMake
Git
Android SDK
Android NDK
Apache Ant
MinGW (msys basic)
Java jre
Java jdk
Android USB Driver (Download: http://adbdriver.com/ )
Make sure you've installed all tools (Tools -> Android SDK Tools / Platf...
You can find the Android Sample in [SFML_ROOT]\examples\android
You can copy it to leave the SFML repository in it's original state. Open cmd.exe in the sample location.
To get a list of all available Android build targets:
android list target
Run Update Project for the Sample:
android upda...
my_array = array('i', [1,2,3,4,5])
my_array.append(6)
# array('i', [1, 2, 3, 4, 5, 6])
Note that the value 6 was appended to the existing array values.
Click the “Move examples” button
Select the examples you want to move
Click “Move”
Select “Search for a Topic”
Paste the URL of the topic in the search box
Click “Move Examples”.
Click “Submit Drafts” or “Edit Drafts”
A mixin is just a module that can be added (mixed in) to a class. one way to do it is with the extend method. The extend method adds methods of the mixin as class methods.
module SomeMixin
def foo
puts "foo!"
end
end
class Bar
extend SomeMixin
def baz
puts "...
When I first started managing the keyboard I would use separate Notifications in each ViewController.
Notification Method (Using NSNotification):
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
NSNotificationCenter.defaultCenter().a...
Principal Component Analysis finds sequences of linear combinations of the features. The first linear combination maximizes the variance of the features (subject to a unit constraint). Each of the following linear combinations maximizes the variance of the features in the subspace orthogonal to that...
SoundEffect.Play() plays the sound effect in a "fire-and-forget" fashion. The sound plays once and its lifetime is managed by the framework. You are not able to change the properties (volume, pan, pitch) of the sound during playback, loop it, position it in 3D or pause it.
You can hold a ...