Tutorial by Examples: e

Direct loop foreach ($colors as $color) { echo "I am the color $color<br>"; } Loop with keys $foods = ['healthy' => 'Apples', 'bad' => 'Ice Cream']; foreach ($foods as $key => $food) { echo "Eating $food is $key"; } Loop by reference In the fo...
See also Common Lisp Learning Resources. Online Books Practical Common Lisp, Peter Seibel. Good for experienced programmers. Common Lisp: A Gentle Introduction to Symbolic Computation Good for people new to programming. Common Lisp, the Language On Lisp, Paul Graham The Common Lisp Cookbook ...
Profiles permit the programmer to organize maps into classes, enhancing code readability and maintainability. Any number of profiles can be created, and added to one or more configurations as needed. Profiles can be used with both the static and instance-based APIs. public class User { public...
Often it is useful to be able to load all of the profiles in one or more assemblies into a configuration. AutoMapper provides the method AddProfiles method, which has several overloads that allow profiles to be loaded by passing the Assembly, specifying the assembly name, or specifying a type contai...
If there is no need for frontend in your next project, you can run sails new with additional flag --no-frontend. sails new NameOfProject --no-frontend This will generate everything needed for backend and will omit view, assets and grunt files. More about command line and sails-new: http://sails...
A chrome extension is seperated into a maximum of 4 parts: the background page the popup page one or more content scripts the options page Each part, since they are innately separate, require individual debugging. Keep in mind that these pages are separate, meaning that variables are not d...
Before talking about porting Firefox extensions from/to, one should know what WebExtensions is. WebExtensions - is a platform that represents an API for creating Firefox extensions. It uses the same architecture of extension as Chromium, as a result, this API is compatible in many ways with API in...
In the extension code you can use any chrome.* API if you decalared the required permissions. In addition, some API's works only from background pages, and some API's works only from content scripts. You can use most of chrome.tabs methods declaring any permissions. Now we focus on chrome.tabs.crea...
If you want to add nested routes you can write the following code in routes.rb file. resources :admins do resources :employees end This will generate following routes: admin_employees GET /admins/:admin_id/employees(.:format) employees#index POST ...
The following configuration options should be called on a Rails::Railtie object config.after_initialize: Takes a block which will be run after rails has initialized the application. config.asset_host: This sets the host for the assets. This is useful when using a Content Delivery Network. This i...
The following configuration options can be used for configuring assets config.assets.enabled: Determines whether the asset pipeline is enabled. This defaults to true config.assets.raise_runtime_errors: This enables runtime error checking. It's useful for development mode config.assets.compress:...
Rails allows you to configure what generators are used when running rails generate commands. This method, config.generators takes a block config.generators do |g| g.orm :active_record g.test_framework :test_unit end Here are some of the options OptionDescriptionDefaultassetsCreates asset...
Merge Sort is a divide-and-conquer algorithm. It divides the input list of length n in half successively until there are n lists of size 1. Then, pairs of lists are merged together with the smaller first element among the pair of lists being added in each step. Through successive merging and through...
After installing Julia, to launch the read-eval-print-loop (REPL): On Unix Systems Open a terminal window, then type julia at the prompt, then hit Return. You should see something like this come up: On Windows Find the Julia program in your start menu, and click it. The REPL should be launched...
The Julia REPL is an excellent calculator. We can start with some simple operations: julia> 1 + 1 2 julia> 8 * 8 64 julia> 9 ^ 2 81 The ans variable contains the result of the last calculation: julia> 4 + 9 13 julia> ans + 9 22 We can define our own variables usi...
There are three built-in REPL modes in Julia: the Julia mode, the help mode, and the shell mode. The Help Mode The Julia REPL comes with a built-in help system. Press ? at the julia> prompt to access the help?> prompt. At the help prompt, type the name of some function or type to get help f...
Code First infer the relationship between the two entities using navigation property. This navigation property can be a simple reference type or collection type. For example, we defined Standard navigation property in Student class and ICollection navigation property in Standard class. So, Code Firs...
We have a tree data type like this: data Tree a = Tree a [Tree a] deriving Show And we wish to write a function that assigns a number to each node of the tree, from an incrementing counter: tag :: Tree a -> Tree (a, Int) The long way First we'll do it the long way around, since it illust...
HTML 3.2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> HTML 3.2 is well supported by most browsers in use. However, HTML 3.2 has limited support for style sheets and no support for HTML 4 features such as frames and internationalization. HTML 2.0 <!DOCTYPE HTML P...
To easily convert all tables in one database, use the following: SET @DB_NAME = DATABASE(); SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements FROM information_schema.tables WHERE table_schema = @DB_NAME AND `ENGINE` = 'MyISAM' AND `TABLE_TYPE` = '...

Page 707 of 1191