Tutorial by Examples

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...
Trees are a sub-type of the more general node-edge graph data structure. To be a tree, a graph must satisfy two requirements: It is acyclic. It contains no cycles (or "loops"). It is connected. For any given node in the graph, every node is reachable. All nodes are reachable throug...
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` = '...
Manage Roles Global Roles- Create roles with selected set of Jenkins features e.g. Usually for a development project, 2 roles can be created. Developer- Global role can be set to only Overall : Read ProjectOwner- Global role can be set to Overall : Read This restricts developer and project ...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany(mappedBy = "bar") private List<FooBar> bars; } @Entity @Table(name="BAR") public class Bar { private UUID barId; @OneToMany(mappedBy = "f...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany @JoinTable(name="FOO_BAR", joinColumns = @JoinColumn(name="fooId"), inverseJoinColumns = @JoinColumn(name="barId")) private List<Bar&g...
@Entity @Table(name="FOO") public class Foo { private UUID fooId; @OneToMany(mappedBy = "bar") private List<Bar> bars; } @Entity @Table(name="BAR") public class Bar { private UUID barId; @ManyToOne @JoinColumn(nam...

Page 799 of 1336