Tutorial by Examples: al

Support for type hinting array parameters (and return values after PHP 7.1) was added in PHP 5.1 with the keyword array. Any arrays of any dimensions and types, as well as empty arrays, are valid values. Support for type hinting callables was added in PHP 5.4. Any value that is_callable() is valid ...
Detailed instructions on getting spring-security set up or installed.
To remove an existing alias, use: unalias {alias_name} Example: # create an alias $ alias now='date' # preview the alias $ now Thu Jul 21 17:11:25 CEST 2016 # remove the alias $ unalias now # test if removed $ now -bash: now: command not found
Sometimes you may want to bypass an alias temporarily, without disabling it. To work with a concrete example, consider this alias: alias ls='ls --color=auto' And let's say you want to use the ls command without disabling the alias. You have several options: Use the command builtin: command...
Note: GRAILS requires a Java JDK installed (a runtime environment JRE is not sufficient) on your system, before setting up Grails. Please refer to, how to install JDK. As of this writing, it is recommended to install the latest JDK. For Mac OSX, Linux, Cygwin, Solaris and FreeBSD: The simplest w...
Cocoa is Apple's API to develop apps for macOS, formerly known as OS X. Cocoa is a container framework, and contains three sub-frameworks. Foundation AppKit CoreData Cocoa Touch is Apple's version of Cocoa to develop apps for iOS, watchOS and tvOS. Cocoa Touch contains the same sub-framewo...
function randomMinMax(min:Number, max:Number):Number { return (min + (Math.random() * Math.abs(max - min))); } This function is called by passing a range of minimum and maximum values. Example: randomMinMax(1, 10); Example outputs: 1.661770915146917 2.5521070677787066 9.4362709657...
public class LogActionFilter : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { Log("OnActionExecuting", filterContext.RouteData); } public override void OnActionExecuted(ActionExecute...
When you want to return a value from a method, you put the type you want to return in the first set of parentheses. - (NSString)returnHello { return @"Hello World"; } The value you want to return goes after the return keyword;
Calling an instance method: [classInstance hello]; @interface Sample -(void)hello; // exposing the class Instance method @end @implementation Sample -(void)hello{ NSLog(@"hello"); } @end Calling an instance method on the current instance: [self hell...
Unlike C++ in C# you can call a virtual method from class constructor (OK, you can also in C++ but behavior at first is surprising). For example: abstract class Base { protected Base() { _obj = CreateAnother(); } protected virtual AnotherBase CreateAnother() { ...
You can create a CALayer and set its frame like this: Swift: let layer = CALayer() layer.frame = CGRect(x: 0, y: 0, width: 60, height: 80) Objective-C: CALayer *layer = [[CALayer alloc] init]; layer.frame = CGRectMake(0, 0, 60, 80); You can then add it as a sublayer to an existing CALayer...
To add a method to a button, first create an action method: Objective-C -(void)someButtonAction:(id)sender { // sender is the object that was tapped, in this case its the button. NSLog(@"Button is tapped"); } Swift func someButtonAction() { print("Button is tapped...
Since Git 1.7.12 it is possible to rebase down to the root commit. The root commit is the first commit ever made in a repository, and normally cannot be edited. Use the following command: git rebase -i --root
TRUNCATE TABLE Employee; Using truncate table is often better then using DELETE TABLE as it ignores all the indexes and triggers and just removes everything. Delete table is a row based operation this means that each row is deleted. Truncate table is a data page operation the entire data page is...
A class designed to be inherited-from is called a Base class. Care should be taken with the special member functions of such a class. A class designed to be used polymorphically at run-time (through a pointer to the base class) should declare the destructor virtual. This allows the derived parts of...
Using the Array::new constructor, your can initialize an array with a given size and a new array in each of its slots. The inner arrays can also be given a size and and initial value. For instance, to create a 3x4 array of zeros: array = Array.new(3) { Array.new(4) { 0 } } The array generated a...
DELETE FROM table_name ; This will delete everything, all rows from the table. It is the most basic example of the syntax. It also shows that DELETE statements should really be used with extra care as they may empty a table, if the WHERE clause is omitted.
Statement-level parallel hints are the easiest: SELECT /*+ PARALLEL(8) */ first_name, last_name FROM employee emp; Object-level parallel hints give more control but are more prone to errors; developers often forget to use the alias instead of the object name, or they forget to include some objec...
In C#, there are two different kinds of equality: reference equality and value equality. Value equality is the commonly understood meaning of equality: it means that two objects contain the same values. For example, two integers with the value of 2 have value equality. Reference equality means that ...

Page 37 of 269