Tutorial by Examples: v

A view is most useful when it can be used to pull in data from more than one table. CREATE VIEW myview AS SELECT a.*, b.extra_data FROM main_table a LEFT OUTER JOIN other_table b ON a.id = b.id In mysql views are not materialized. If you now perform the simple query SELECT * FROM myview, my...
The most important application events are: Application_Start - It is raised when the application/website is started. Application_End - It is raised when the application/website is stopped. Similarly, the most used Session events are: Session_Start - It is raised when a user first requests a page...
Common page and control events are: DataBinding - It is raised when a control binds to a data source. Disposed - It is raised when the page or the control is released. Error - It is a page event, occurs when an unhandled exception is thrown. Init - It is raised when the page or the control is in...
The default event for the Page object is Load event. Similarly, every control has a default event. For example, default event for the button control is the Click event. The default event handler could be created in Visual Studio, just by double clicking the control in design view. The following tab...
ASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET applications you have access to classes in the .NET Framework. You can code you...
Loading the library (ql:quickload "fiveam") Define a test case (fiveam:test sum-1 (fiveam:is (= 3 (+ 1 2)))) ;; We'll also add a failing test case (fiveam:test sum2 (fiveam:is (= 4 (+ 1 2)))) Run tests (fiveam:run!) which reports Running test suite NIL Running test...
There are two common conventions for private fields: camelCase and _camelCaseWithLeadingUnderscore. Camel case public class Rational { private readonly int numerator; private readonly int denominator; public Rational(int numerator, int denominator) { // "this&q...
We can use the Service Container as a Dependency Injection Container by binding the creation process of objects with their dependencies in one point of the application Let's suppose that the creation of a PdfCreator needs two objects as dependencies; every time we need to build an instance of PdfCr...
Tail Call Optimisation makes it possible to safely implement recursive loops without concern for call stack overflow or the overhead of a growing frame stack. function indexOf(array, predicate, i = 0) { if (0 <= i && i < array.length) { if (predicate(array[i])) { return...
These functions are very similar in behaviour. The difference is that ng-if removes elements from the DOM. If there are large parts of the code that will not be shown, then ng-if is the way to go. ng-show will only hide the elements but will keep all the handlers. ng-if The ngIf directive removes ...
In other frameworks pagination is headache. Laravel makes it breeze, it can generate pagination by adding few lines of code in Controller and View. Basic Usage There are many ways to paginate items, but the simplest one is using the paginate method on query builder or an Eloquent query. Laravel ou...
NSURL *url = [NSURL URLWithString:@"http://www.example.com/"]; NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; // Configure the session here. NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration]; [[s...
You need to having a server running online. To securely associate your iOS app with a server, Apple requires that you make available a configuration file, called apple-app-site-association. This is a JSON file which describes the domain and supported routes. The apple-app-site-association file need...
The setup on the app side requires two things: Configuring the app’s entitlement, and enabling the universal links by turning on the Associated Domains capability in the project. Handling Incoming Links in your AppDelegate. 1. Configuring the app’s entitlement, and enabling universal links. ...
PHP provides an alternative syntax for some control structures: if, while, for, foreach, and switch. When compared to the normal syntax, the difference is, that the opening brace is replaced by a colon (:) and the closing brace is replaced by endif;, endwhile;, endfor;, endforeach;, or endswitch;, ...
Assuming we want to modify bit n of an integer primitive, i (byte, short, char, int, or long): (i & 1 << n) != 0 // checks bit 'n' i |= 1 << n; // sets bit 'n' to 1 i &= ~(1 << n); // sets bit 'n' to 0 i ^= 1 << n; // toggles the value of bit 'n' Us...
You must be very careful when providing a forwarding reference overload as it may match too well: struct A { A() = default; // #1 A(A const& ) = default; // #2 template <class T> A(T&& ); // #3 }; The intent here was that A is c...
Active patterns are just simple functions. Like functions you can define additional parameters: let (|HasExtension|_|) expected (uri : string) = let result = uri.EndsWith (expected, StringComparison.CurrentCultureIgnoreCase) match result with | true -> Some true | _ -> N...
The plotly package allows many kind of interactive plots, including maps. There are a few ways to create a map in plotly. Either supply the map data yourself (via plot_ly() or ggplotly()), use plotly's "native" mapping capabilities (via plot_geo() or plot_mapbox()), or even a combination o...
Fortran 2003 introduced support for object oriented programming. This feature allows to take advantage of modern programming techniques. Derived types are defined with the following form: TYPE [[, attr-list] :: ] name [(name-list)] [def-stmts] [PRIVATE statement or SEQUENCE statement]. . . ...

Page 61 of 296