Tutorial by Examples: f

Send a 304 Not Modified response status from the server send in response to a client request that contains headers If-Modified-Since and If-None-Match, if the request resource hasn’t changed. For example if a client request for a web page includes the header If-Modified-Since: Fri, 22 Jul 2016 14:3...
Vim's standard search commands are / for forward search and ? for backward search. To start a search from normal mode: press /, type your pattern, press <CR> to perform the search. Examples: /foobar<CR> search forward for foobar ?foo\/bar<CR> search backward for ...
In normal mode, move the cursor to any word then press * to search forwards for the next occurrence of the word under the cursor, or press # to search backwards. * or # search for the exact word under the cursor: searching for big would only find big and not bigger. Under the hood, Vim uses a sim...
Fragments are reusable parts of lexer rules which cannot match on their own - they need to be referenced from a lexer rule. INTEGER: DIGIT+ | '0' [Xx] HEX_DIGIT+ ; fragment DIGIT: [0-9]; fragment HEX_DIGIT: [0-9A-Fa-f];
Functions within a class can be overloaded for when they are accessed through a cv-qualified reference to that class; this is most commonly used to overload for const, but can be used to overload for volatile and const volatile, too. This is because all non-static member functions take this as a hi...
Disclaimer: the examples presented here are only for the purpose of showing the use of abstract classes and inheritance and may not necessarily be of a practical use. Also, there is no sich thing as polymorphic in MATLAB and therefore the use of abstract classes is limited. This example is to show w...
A class or a structure may declare any function it's friend. If a function is a friend of a class, it may access all it's protected and private members: // Forward declaration of functions. void friend_function(); void non_friend_function(); class PrivateHolder { public: PrivateHolder(in...
Methods may declared as friends as well as functions: class Accesser { public: void private_accesser(); }; class PrivateHolder { public: PrivateHolder(int val) : private_value(val) {} friend void Accesser::private_accesser(); private: int private_value; }; void Access...
A whole class may be declared as friend. Friend class declaration means that any member of the friend may access private and protected members of the declaring class: class Accesser { public: void private_accesser1(); void private_accesser2(); }; class PrivateHolder { public: P...
This is a protected and non-static method of the Object class. This method is used to perform some final operations or clean up operations on an object before it gets removed from the memory. According to the doc, this method gets called by the garbage collector on an object when garbage collecti...
Fast and short way to extract extension from file name in JavaScript will be: function get_extension(filename) { return filename.slice((filename.lastIndexOf('.') - 1 >>> 0) + 2); } It works correctly both with names having no extension (e.g. myfile) or starting with . dot (e.g. .h...
Fast and short way to format value of type Number as money, e.g. 1234567.89 => "1,234,567.89": var num = 1234567.89, formatted; formatted = num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,'); // "1,234,567.89" More advanced variant with support of any number o...
Use DOMContentLoaded when the <script> code interacting with DOM is included in the <head> section. If not wrapped inside the DOMContentLoaded callback, the code will throw errors like Cannot read something of null document.addEventListener('DOMContentLoaded', function(event) { ...
Here is an example of how to import a function that is defined in an unmanaged C++ DLL. In the C++ source code for "myDLL.dll", the function add is defined: extern "C" __declspec(dllexport) int __stdcall add(int a, int b) { return a + b; } Then it can be included into ...
""" ================================================================================ CREATE A 2 BY 2 GRID OF SUB-PLOTS WITHIN THE SAME FIGURE. ================================================================================ """ import matplotlib.pyplot as plt ...
UCanAccess is a pure Java JDBC driver that allows us to read from and write to Access databases without using ODBC. It uses two other packages, Jackcess and HSQLDB, to perform these tasks. Once it has been set up*, we can work with data in .accdb and .mdb files using code like this: import java.sq...
You can create and configure build types in the module-level build.gradle file inside the android {} block. android { ... defaultConfig {...} buildTypes { release { minifyEnabled true proguardFiles getDefaultProguar...
Similar to repeaters used in other languages. This binding will allow you to replicate a block of html for each item in an array. <div data-bind="foreach:contacts"> <div class="contact"> <h2 data-bind="text:name"> <p data-bin...
When working with multiple open Workbooks, each of which may have multiple Sheets, it’s safest to define and set reference to all Workbooks and Sheets. Don't rely on ActiveWorkbook or ActiveSheet as they might be changed by the user. The following code example demonstrates how to copy a range from...
The Help Class encapsulates the HTML Help 1.0 engine. You can use the Help object to show compiled Help files (.chm) or HTML files in the HTML Help format. Compiled Help files provide table of contents, index, search, and keyword links in pages. Shortcuts work only in compiled Help files. You can ge...

Page 139 of 457