Tutorial by Examples: f

Header fields (usually just called ‘headers’) may be added to an HTTP request to provide additional information with the request. A header has semantics similar to parameters passed to a method in any programming language that supports such things. A request with Host, User-Agent and Referer header...
On CLiki, a Wiki for Common Lisp and free Common Lisp software, a list of Proposed ANSI Revisions and Clarifications is being maintained. Since the Common Lisp standard has not changed since 1994, users have found several problems with the specification document. These are documented on the CLiki p...
These macros merge control flow and binding. They are an improvement over anaphoric anaphoric macros because they let the developer communicate meaning through naming. As such their use is recommended over their anaphoric counterparts. (if-let (user (get-user user-id)) (show-dashboard user) (...
c++03 The Rule of Three states that if a type ever needs to have a user-defined copy constructor, copy assignment operator, or destructor, then it must have all three. The reason for the rule is that a class which needs any of the three manages some resource (file handles, dynamically allocated me...
To prompt for credentials, you should almost always use the Get-Credential cmdlet: $credential = Get-Credential Pre-filled user name: $credential = Get-Credential -UserName 'myUser' Add a custom prompt message: $credential = Get-Credential -Message 'Please enter your company email address a...
Check if a path is a directory or a file The is_dir function returns whether the argument is a directory, while is_file returns whether the argument is a file. Use file_exists to check if it is either. $dir = "/this/is/a/directory"; $file = "/this/is/a/file.txt"; echo is_d...
The Common Lisp Quick Reference is a document which can be printed and bound as a booklet in various layouts to have a printed quick reference for Common Lisp.
In general, classes in Perl are just packages. They can contain data and methods, as usual packages. package Point; use strict; my $CANVAS_SIZE = [1000, 1000]; sub new { ... } sub polar_coordinates { ... } 1; It is important to note that the variables declared in a packa...
To filter a selection you can use the .filter() method. The method is called on a selection and returns a new selection. If the filter matches an element then it is added to the returned selection, otherwise it is ignored. If no element is matched then an empty selection is returned. The HTML Thi...
article.twig.html <article> <h1>{{ article.title }}</h1> {% block content %} <p>{{ article.content }}</p> {% endblock %} </article> articles.twig.html {# use default template for article #} {% for article in articles %} {% include &...
public static class ArrayHelpers { public static bool Contains<T>(this T[] array, T[] candidate) { if (IsEmptyLocate(array, candidate)) return false; if (candidate.Length > array.Length) return false; for (int a = 0; a <...
redis-cli is the Redis command line interface program that allows to send commands to Redis and read the replies sent by the server, directly from the terminal. Basic command line usage is below: Access to redis: $ redis-cli 127.0.0.1:6379> Access to redis with authentication: $ redis-cli ...
The trim() method returns a new String with the leading and trailing whitespace removed. String s = new String(" Hello World!! "); String t = s.trim(); // t = "Hello World!!" If you trim a String that doesn't have any whitespace to remove, you will be returned the same S...
If efficiency is important, a fast way to iterate over pixels in a cv::Mat object is to use its ptr<T>(int r) method to obtain a pointer to the beginning of row r (0-based index). According to the matrix type, the pointer will have a different template. For CV_8UC1: uchar* ptr = image.ptr&...
ISO/ANSI SQL: SELECT Id, Col1 FROM TableName ORDER BY Id OFFSET 20 ROWS MySQL: SELECT * FROM TableName LIMIT 20, 42424242424242; -- skips 20 for take use very large number that is more than rows in table Oracle: SELECT Id, Col1 FROM (SELECT Id, Col1, row_num...
ISO/ANSI SQL: SELECT * FROM TableName FETCH FIRST 20 ROWS ONLY; MySQL; PostgreSQL; SQLite: SELECT * FROM TableName LIMIT 20; Oracle: SELECT Id, Col1 FROM (SELECT Id, Col1, row_number() over (order by Id) RowNumber FROM TableName) WHERE RowNumber <= 2...
android { ... defaultConfig {...} buildTypes {...} productFlavors { demo { applicationId "com.example.myapp.demo" versionName "1.0-demo" } full { applicationId "com.example.myapp.full"...
Add typings to your package.json { ... "typings": "path/file.d.ts" ... } Now when ever that library is imported typescript will load the typings file
Add the following code to functions.php to remove it from everyone except the Administrator user level: add_action('after_setup_theme', 'no_admin_bar'); function no_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); ...
val list = listOf(1,2,3,4,5,6) //filter out even numbers val even = list.filter { it % 2 == 0 } println(even) //returns [2,4]

Page 121 of 457