Tutorial by Examples: l

The FlagsAttribute should be used whenever the enumerable represents a collection of flags, rather than a single value. The numeric value assigned to each enum value helps when manipulating enums using bitwise operators. Example 1 : With [Flags] [Flags] enum Colors { Red=1, Blue=2, ...
String.prototype.toLowerCase() console.log('QWERTY'.toLowerCase()); // 'qwerty'
Detailed instructions on getting ssl set up or installed.
/// <summary> /// Returns the data for the specified ID and timestamp. /// </summary> /// <param name="id">The ID for which to get data. </param> /// <param name="time">The DateTime for which to get data. </param> /// <returns>A Data...
To generate an XML documentation file from documentation comments in the code, use the /doc option with the csc.exe C# compiler. In Visual Studio 2013/2015, In Project -> Properties -> Build -> Output, check the XML documentation file checkbox: When you build the project, an XML file wi...
If you put your commonly used aliases into an .iex.exs file at the root of your app, IEx will load them for you on startup. alias App.{User, Repo}
php artisan route:list --method=GET --method=POST This will include all routes that accept GET and POST methods simultaneously.
Salt can be installed via : salt-bootstrap: a shell script, that can install salt (client and/or master packages) on standard Unix/Linux platform, Platform Specific binaries: available for Windows, Mac OS X and Linux, Package Management systems: available for pacman, apt-get, yum and other pack...
TreeWalker is a generator-like interface that makes recursively filtering nodes in a DOM tree easy and efficient. The following code concatenates the value of all Text nodes in the page, and prints the result. let parentNode = document.body; let treeWalker = document.createTreeWalker(parentNode, ...
Stored procedures can be created through a database management GUI (SQL Server example), or through a SQL statement as follows: -- Define a name and parameters CREATE PROCEDURE Northwind.getEmployee @LastName nvarchar(50), @FirstName nvarchar(50) AS -- Define the query to be...
Horizontally vim -o file1.txt file2.txt Vertically vim -O file1.txt file2.txt You may optionally specify the number of splits to open. The following example opens two horizontal splits and loads file3.txt in a buffer: vim -o2 file1.txt file2.txt file3.txt
<!DOCTYPE html> <html> <head> <meta charset='utf-8' /> <title></title> <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> <!-- find the latest library and style versions here: https://www.mapbox.com/m...
So, you make first a .war file let's say a portlet of name <YOUR PLUGIN>.war. You wanna have it running on a glassfish domain under Liferay portal. Steps to success: Navigate to Control Panel -> Plugins Installation on Liferay Hit Install new portlets Hit Configuration Fill in to Dep...
A while loop will cause the loop statements to be executed until the loop condition is falsey. The following code will execute the loop statements a total of 4 times. i = 0 while i < 4: #loop statements i = i + 1 While the above loop can easily be translated into a more elegant fo...
Before to launch you to code with Pug, you need to have some prerequisits. You will need to install: NodeJS with NPM ExpressJS (optional) After installing NodeJS, you can check in your terminal the correct installation doing: $ node -v If successful, it will print the number of Node's ve...
git log --after '3 days ago' Specific dates work too: git log --after 2016-05-01 As with other commands and flags that accept a date parameter, the allowed date format is as supported by GNU date (highly flexible). An alias to --after is --since. Flags exist for the converse too: --before ...
Itertools "islice" allows you to slice a generator: results = fetch_paged_results() # returns a generator limit = 20 # Only want the first 20 results for data in itertools.islice(results, limit): print(data) Normally you cannot slice a generator: def gen(): n = 0 wh...
Sometimes, you may want something to occur regardless of whatever exception happened, for example, if you have to clean up some resources. The finally block of a try clause will happen regardless of whether any exceptions were raised. resource = allocate_some_expensive_resource() try: do_stu...
Download and install the latest IDEA version. Download and install the latest version of the Cursive plugin. After restarting IDEA, Cursive should be working out of the box. Follow the user guide to fine-tune appearance, keybindings, code style etc. Note: Like IntelliJ, Cursive is a commercial pr...
Suggested Install Method Windows: Download and run the binary setup file. Linux(Debian): Run this command in your command line: $ apt-get install python-qt4 pyqt4-dev-tools qt4-designer OS X : Run this command in your command line: $ brew install pyqt Install Manually You can also downloa...

Page 130 of 861