Tutorial by Examples: cd

A deadlock occurs when two competing actions wait for the other to finish, and thus neither ever does. In java there is one lock associated with each object. To avoid concurrent modification done by multiple threads on single object we can use synchronized keyword, but everything comes at a cost....
GCD will guarantee that your singleton only gets instantiated once, even if called from multiple threads. Insert this into any class for a singleton instance called shared. + (instancetype)shared { // Variable that will point to the singleton instance. The `static` // modifier makes it ...
Logistic regression is a particular case of the generalized linear model, used to model dichotomous outcomes (probit and complementary log-log models are closely related). The name comes from the link function used, the logit or log-odds function. The inverse function of the logit is called the lo...
The first thing you need to know when structuring your apps is that the Meteor tool has some directories that are hard-coded with specific logic. At a very basic level, the following directories are "baked in" the Meteor bundler. client/ # client applicati...
DELETE FROM `myTable` WHERE `someColumn` = 'something' The WHERE clause is optional but without it all rows are deleted.
cdecl is a Windows 32-bit function calling convention which is very similar to the calling convention used on many POSIX operating systems (documented in the i386 System V ABI). One of the differences is in returning small structs. Parameters Parameters are passed on the stack, with the first arg...
# make this routine available outside this translation unit .globl string_to_integer string_to_integer: # function prologue push %ebp mov %esp, %ebp push %esi # initialize result (%eax) to zero xor %eax, %eax # fetch pointer to the string mov 8(%ebp), %e...
As parameters (8, 16, 32 bits) 8, 16, 32 bits integers are always passed, on the stack, as full width 32 bits values1. No extension, signed or zeroed, is needed. The callee will just use the lower part of the full width values. //C prototype of the callee void __attribute__((cdecl)) foo(char ...
As parameters (float, double) Floats are 32 bits in size, they are passed naturally on the stack. Doubles are 64 bits in size, they are passed, on the stack, respecting the Little Endian convention1, pushing first the upper 32 bits and than the lower ones. //C prototype of callee double foo(dou...
<svg width="800px" height="600px"> <defs> <filter id="drop-shadow"> <feGaussianBlur in="SourceAlpha" stdDeviation="4"/> <feOffset dx="5" dy="5" result="offsetblur"/> <f...
Padding Remember, members of a struct are usually padded to ensure they are aligned on their natural boundary: struct t { int a, b, c, d; // a is at offset 0, b at 4, c at 8, d at 0ch char e; // e is at 10h short f; // f is at 12h (naturally aligned) lo...
Longer portions of text containing special characters can be escaped with a CDATA section. CDATA sections can only appear in element content. <?xml version="1.0"?> <document> This is a CDATA section : <![CDATA[ plenty of special characters like & < > " ; ...
Pandas uses provides multiple ways to make graphs of the data inside the data frame. It uses matplotlib for that purpose. The basic graphs have their wrappers for both DataFrame and Series objects: Line Plot df = pd.DataFrame({'x': [10, 8, 10, 7, 7, 10, 9, 9], 'y': [6, 4, 5, 5...
For accessing the MS SQL Server database Sqoop requires an additional JDBC driver which can be downloaded from Microsoft. The following steps will install MSSQL Server JDBC driver to Sqoop: wget 'http://download.microsoft.com/download/0/2/A/02AAE597-3865-456C-AE7F-613F99F850A8/sqljdbc_4.0.2206.100_...
PHP's source code is hosted on GitHub. To build from source you will first need to check out a working copy of the code. mkdir /usr/local/src/php-7.0/ cd /usr/local/src/php-7.0/ git clone -b PHP-7.0 https://github.com/php/php-src . If you want to add a feature, it's best to create your own bra...
public void ConfigureServices(IServiceCollection services) { services.AddMvc(); services.AddCors(); services.ConfigureCors(options => options.AddPolicy("AllowSpecific", p => p.WithOrigins("http://localhost:1233") ...
You can specify different dependencies for each platforms: "net45": { "frameworkAssemblies": { "System.Linq": "4.1.0" } }, "netstandard1.3": { "dependencies": { "NETStandard.Library": "1.6....
Images, static data, sounds, etc. are resources in a Playground. If the Project Navigator is hidden, choose View > Navigators > Show Project Navigator (⌘1) There are several ways to add files Drag your resources to the Resources folder or Select the Resources folder and choose File &gt...
Scope testing & output of model <div ng-app="demoApp" ng-controller="mainController as ctrl"> {{$id}} <ul> <li ng-repeat="item in ctrl.items"> {{$id}}<br/> {{item.text}} </li> ...
if ([[dataObject objectForKey:@"yourVariable"] isEqualToString:"Hello World"]) { return YES; } else { return NO; } You can query values stored using KVC quickly and easily, without needing to retrieve or cast these as local variables.

Page 2 of 4