Tutorial by Examples: cs

C-h t runs the function help-with-tutorial, which opens a buffer containing a tutorial on the basic editing functionality of emacs, including moving around in text, and working with files, buffers, and windows.
Insertion sort is a very simple, stable, in-place sorting algorithm. It performs well on small sequences but it is much less efficient on large lists. At every step, the algorithms considers the i-th element of the given sequence, moving it to the left until it is in the correct position. Graphica...
In order to determine some simple statistics of a value in a column of a table, you can use an aggregate function. If your individuals table is: NameAgeAllie17Amanda14Alana20 You could write this statement to get the minimum, maximum and average value: SELECT min(age), max(age), avg(age) FROM i...
Intro The Graphics class allows you to draw onto java components such as a Jpanel, it can be used to draw strings, lines, shapes and images. This is done by overriding the paintComponent(Graphics g) method of the JComponent you are drawing on using the Graphics object received as argument to do the...
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...
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...
.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...
FRP, or Functional Reactive Programming, has some basic terms which you need to know. Every piece of data can be represented as Observable, which is an asynchronous data stream. The power of FRP is in representation synchronous and asynchronous events as streams, Observables, and providing the same...
Every Windows Phone project contains App.cs class: public sealed partial class App : Application This class is your global application context. General Application class usage: App entry point, particularly for various activation contracts. Application lifecycle management. Application g...
Tensorflow works on principle of dataflow graphs. To perform some computation there are two steps: Represent the computation as a graph. Execute the graph. Representation: Like any directed graph a Tensorflow graph consists of nodes and directional edges. Node: A Node is also called an Op(s...
The value of a type hole can simply said to be undefined, although a typed hole triggers a compile-time error, so it is not strictly necessary to assign it a value. However, a typed hole (when they are enabled) produces a compile time error (or warning with deferred type errors) which states the nam...
The Scala compiler can also deduce type parameters when polymorphic methods are called, or when generic classes are instantiated: case class InferedPair[A, B](a: A, b: B) val pairFirstInst = InferedPair("Husband", "Wife") //type is InferedPair[String, String] // Equiv...
#include <SPI.h> #define CSPIN 1 void setup() { pinMode(CSPIN, OUTPUT); // init chip select pin as an output digitalWrite(CSPIN, 1); // most slaves interpret a high level on CS as "deasserted" SPI.begin(); SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MO...
Atomic variables can be accessed concurrently between different threads without creating race conditions. /* a global static variable that is visible by all threads */ static unsigned _Atomic active = ATOMIC_VAR_INIT(0); int myThread(void* a) { ++active; // increment active race fr...
C++11 Note: in all the following, the existence of the C++11 constant nullptr is assumed. For earlier versions, replace nullptr with NULL, the constant that used to play a similar role. Creating a pointer variable A pointer variable can be created using the specific * syntax, e.g. int *pointer_...
A tuple is simply a concatenation of multiple values: of possibly different types whose number and types is known statically For example, (1, "Hello") is a 2 elements tuple composed of a i32 and a &str, and its type is denoted as (i32, &'static str) in a similar fashion as i...
You can enhance your own classes with generics just like NSArray or NSDictionary. @interface MyClass<__covariant T> @property (nonnull, nonatomic, strong, readonly) NSArray<T>* allObjects; - (void) addObject:(nonnull T)obj; @end
In order to be able to work with C structs as Ruby objects, you need to wrap them with calls to Data_Wrap_Struct and Data_Get_Struct. Data_Wrap_Struct wraps a C data structure in a Ruby object. It takes a pointer to your data structure, along with a few pointers to callback functions, and returns a...
You can execute a database query from a String rather than a regular SOQL expression: String tableName = 'Account'; String queryString = 'SELECT Id FROM ' + tableName + ' WHERE CreatedDate >= YESTERDAY'; List<SObject> objects = Database.query(queryString); Since dynamic SOQL queries a...
String Strings are created by wrapping the text with double quotes. Double-quoted strings can evalute variables and special characters. $myString = "Some basic text" $mySecondString = "String with a $variable" To use a double quote inside a string it needs to be escaped usi...

Page 12 of 24