Tutorial by Examples

/*(8)*/ SELECT /*9*/ DISTINCT /*11*/ TOP /*(1)*/ FROM /*(3)*/ JOIN /*(2)*/ ON /*(4)*/ WHERE /*(5)*/ GROUP BY /*(6)*/ WITH {CUBE | ROLLUP} /*(7)*/ HAVING /*(10)*/ ORDER BY /*(11)*/ LIMIT The order in which a query is processed and description of each section. V...
HTML and Form Builder is not a core component since Laravel 5, so we need to install it separately: composer require laravelcollective/html "~5.0" Finally in config/app.php we need to register the service provider, and the facades aliases like this: 'providers' => [ // ... ...
Elasticsearch is accessed through a HTTP REST API, typically using the cURL library. The messages between the search server and the client (your or your application) are sent in the form of JSON strings. By default, Elasticsearch runs on port 9200. In the examples below, ?pretty is added to tell El...
Assuming you have a Twilio account and API credentials, add the following to your Gemfile: gem 'twilio-ruby' Alternatively you can gem install twilio-ruby. To have Twilio send an incoming SMS to a particular route in your application, you need to configure the Messaging URL for your phone numbe...
Partial classes provide an ability to split class declaration (usually into separate files). A common problem that can be solved with partial classes is allowing users to modify auto-generated code without fearing that their changes will be overwritten if the code is regenerated. Also multiple devel...
01. Underline Text :- Single/Double Line , Strike Through :- Single/Double Line Step 1 Select the Label and change the label type Plain to Attributed Step 2 Click the label text and Right click Step 3 Then click Font -> Show Fonts Step 4 Then font view will show up and click under...
// Get the current colors of the gradient. let oldColors = self.gradientLayer.colors // Define the new colors for the gradient. let newColors = [UIColor.red.cgColor, UIColor.yellow.cgColor] // Set the new colors of the gradient. self.gradientLayer.colors = newColors // Initia...
? This gives you an introduction and overview of IPython's features. object? This lists all methods and fields of the object and its documentation (if it exists). object?? Same as above, provides even more detail about the object, in particular will try to find and display the source cod...
Add a permission to access the camera to the AndroidManifest file: <uses-permission android:name="android.permission.CAMERA"></uses-permission> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> Xml file : <?xml version=&quot...
Driver: 12c R1 11g R2 (Note: the driver is not included in Maven Central!) Driver class initialization: Class.forName("oracle.jdbc.driver.OracleDriver"); Connection URL Older format, with SID "jdbc:oracle:thin:@<hostname>:<port>:<SID>" Newer...
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...
array_reduce reduces array into a single value. Basically, The array_reduce will go through every item with the result from last iteration and produce new value to the next iteration. Usage: array_reduce ($array, function($carry, $item){...}, $defaul_value_of_first_carry) $carry is the result f...
Python will implicitly convert any object to a Boolean value for testing, so use it wherever possible. # Good examples, using implicit truth testing if attr: # do something if not attr: # do something # Bad examples, using specific types if attr == 1: # do something if att...
NppExec [sourceforge] allows you to execute commands and scripts from a console window in Notepad++. It can be found in the menu bar at Plugins -> NppExec or just by simply hitting the F6 key (the shortcut Ctrl+F6 will run the latest command) . Example: the following will Set the console to o...
The query attribute on queryset gives you SQL equivalent syntax for your query. >>> queryset = MyModel.objects.all() >>> print(queryset.query) SELECT "myapp_mymodel"."id", ... FROM "myapp_mymodel" Warning: This output should only be used for d...
Sometimes, you may have a list structure that looks like this: Animal Listing Table NameTypeDescriptionTitleString (Text)Name of the animalAgeNumberHow old the animal isValueCurrencyValue of the animalTypeLookup (Animal Types Table)Lookup Field (Gives dropdown of choices from Animal Types Table) ...
To get First object: MyModel.objects.first() To get last objects: MyModel.objects.last() Using Filter First object: MyModel.objects.filter(name='simple').first() Using Filter Last object: MyModel.objects.filter(name='simple').last()
Web applications often require static files like CSS or JavaScript files. To use static files in a Flask application, create a folder called static in your package or next to your module and it will be available at /static on the application. An example project structure for using templates is as f...
In an enum it is possible to define a specific behavior for a particular constant of the enum which overrides the default behavior of the enum, this technique is known as constant specific body. Suppose three piano students - John, Ben and Luke - are defined in an enum named PianoClass, as follows:...
A typeglob *foo holds references to the contents of global variables with that name: $foo, @foo, $foo, &foo, etc. You can access it like an hash and assign to manipulate the symbol tables directly (evil!). use v5.10; # necessary for say our $foo = "foo"; our $bar; say ref *foo{SCAL...

Page 488 of 1336