JqGrid is implemented as jQuery plugin, our plugin uses jQuery UI CSS or Bootstrap CSS for styling. Thus one would have to include the corresponding JavaScript and CSS files. The second basic thing, which one should know, is the fact that free jqGrid uses HTML internally. One would have to create a...
Bucket Sort is a sorting algorithm in which elements of input array are distributed in buckets. After distributing all the elements, buckets are sorted individually by another sorting algorithm. Sometimes it is also sorted by recursive method.
Pseudo code for Bucket Sort
Let n be the length of t...
use std::ops::Drop;
#[derive(Debug)]
struct Bar(i32);
impl Bar {
fn get<'a>(&'a mut self) -> Foo<'a> {
let temp = self.0; // Since we will also capture `self` we..
// ..will have to copy the value out first
Foo(self, temp) ...
In some scenarios, we might want to narrow down the results being shown by PlaceAutocomplete to a specific country or maybe to show only Regions. This can be achieved by setting an AutocompleteFilter on the intent. For example, if I want to look only for places of type REGION and only belonging to I...
No Java variable represents an object.
String foo; // NOT AN OBJECT
Neither does any Java array contain objects.
String bar[] = new String[100]; // No member is an object.
If you mistakenly think of variables as objects, the actual behavior of the Java language will surprise you.
For...
Another way to .Install installers is by using Castle's FromAssembly class. It gives an array of functions to locate installers in the loaded assemblies. For example:
//Will locate IInstallers in the current assembly that is calling the method
container.Install(FromAssembly.This());
For more d...
Castle enables to register components also via XML Registration.
//To install from the app/web.config
container.Install(Configuration.FromAppConfig());
//To install from an xml file
Configuration.FromXmlFile("relative_path_to_file.xml");
Read Castle's documentation for "What ...
Background: The Household entity includes a set of options, each of which is an entity that is managed in an admin backend. Each option has a boolean enabled flag. If a previously enabled option is set to disabled it will need to be persisted in later Household edits, but cannot be edited away. T...
# encode/decode UTF-8 for files and standard input/output
use open qw( :encoding(UTF-8) :std );
This pragma changes the default mode of reading and writing text ( files, standard input, standard output, and standard error ) to UTF-8, which is typically what you want when writing new application...
So far, we defined how easy it is to write a custom element that hides the messy html behind it and gives the user, an easy to write and brief markup.
Time to code it!
Our custom element, to display the bar below the hero image should
Accept a Link to be shared
Accept a Link to the Repo to be ...
On whichever page you want to display your product / project portfolio, invoke the custom element like so:
<article id="project-neighbourhood">
<div class="row">
<div class="col-12 hero">
<img src="path-to-hero-image...
Empty string
Empty string is not null but has zero length:
string emptyString = "";
// an empty string is not null...
assert(emptyString !is null);
// ... but it has zero lenght
assert(emptyString.length == 0);
Null string
string nullString = null;
a null string is null (De ...
Depth-first search is an algorithm for traversing or searching tree or graph data structures. One starts at the root and explores as far as possible along each branch before backtracking. A version of depth-first search was investigated in the 19th century French mathematician Charles Pierre Trémaux...
Counting sort is an integer sorting algorithm for a collection of objects that sorts according to the keys of the objects.
Steps
Construct a working array C that has size equal to the range of the input array A.
Iterate through A, assigning C[x] based on the number of times x appeared in A.
Tr...
Cycle Sort is sorting algorithm which uses comparison sort that is theoretically optimal in terms of the total number of writes to original array, unlike any other in-place sorting algorithm. Cycle sort is unstable sorting algorithm. It is based on idea of permutation in which permutations are facto...
;;Recursively print the elements of a list
(defun print-list (elements)
(cond
((null elements) '()) ;; Base case: There are no elements that have yet to be printed. Don't do anything and return a null list.
(t
;; Recursive case
;; Print the next elem...
ASP.NET identity is a membership management system which allows a user to register and login into a web application. ASP.NET identity system can be used in entire ASP.NET framework, like ASP.NET MVC, Web Forms, Web Pages, Web API and SignalR. ASP.NET identity can be used when people are building a w...