Tutorial by Examples

ObjectDataSource If using an ObjectDataSource, almost everything is handled for you already, just simply tell the GridView to AllowPaging and give it a PageSize. <asp:GridView ID="gvColors" runat="server" DataSourceID="sdsColors" AllowPaging="Tr...
Add typings to your package.json { ... "typings": "path/file.d.ts" ... } Now when ever that library is imported typescript will load the typings file
Add the following code to functions.php to remove it from everyone except the Administrator user level: add_action('after_setup_theme', 'no_admin_bar'); function no_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); ...
Data classes in kotlin are classes created to do nothing but hold data. Such classes are marked as data: data class User(var firstname: String, var lastname: String, var age: Int) The code above creates a User class with the following automatically generated: Getters and Setters for all prope...
val list = listOf(1,2,3,4,5,6) //filter out even numbers val even = list.filter { it % 2 == 0 } println(even) //returns [2,4]
The two main libraries providing pattern matching in Common Lisp are Optima and Trivia. Both provide a similar matching API and syntax. However trivia provides a unified interface to extend matching, defpattern.
Because a clack request is represented as a plist, we can use pattern matching as the entry point to the clack app as a way to route request to their appropriate controllers (defvar *app* (lambda (env) (match env ((plist :request-method :get :request-uri uri) (...
Using pattern matching one can intertwine function definition and pattern matching, similar to SML. (trivia:defun-match fib (index) "Return the corresponding term for INDEX." (0 1) (1 1) (index (+ (fib (1- index)) (fib (- index 2))))) (fib 5) ;; => 8
Rails is shipped by default with ActiveRecord, an ORM (Object Relational Mapping) derived from the pattern with the same name. As an ORM, it is built to handle relational-mapping, and more precisely by handling SQL requests for you, hence the limitation to SQL databases only. However, you can stil...
With the case statement you can match values against one variable. The argument passed to case is expanded and try to match against each patterns. If a match is found, the commands upto ;; are executed. case "$BASH_VERSION" in [34]*) echo {1..4} ;; *) seq -s" ...
This is a sample adapter code. public class SampleAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private static final int FOOTER_VIEW = 1; // Define a view holder for Footer view public class FooterViewHolder extends ViewHolder { public FooterViewHolder(View ite...
Introduction JetBrains PhpStorm is a commercial, cross-platform IDE for PHP. It is built on JetBrains' IntelliJ IDEA platform, which is written in Java. It will thus run on all major operating systems that support Java. Users can extend the IDE by installing plugins created for the IntelliJ Platfo...
Install a global package Globally installed packages drops modules in {prefix}/lib/node_modules, and puts executable files in {prefix}/bin, where {prefix} is usually something like /usr/local. Installing a global module means that its binaries end up in your PATH environment variable. Usually you'l...
The following are examples of how to install MIT/GNU Scheme: Debian/Ubuntu installation: sudo apt-get install mit-scheme Manual installation: Download the Unix binary directly from the GNU Project, then follow the instructions from the official webpage: # Unpack the tar file tar xzf mit-sche...
bc is an arbitrary precision calculator language. It could be used interactively or be executed from command line. For example, it can print out the result of an expression: echo '2 + 3' | bc 5 echo '12 / 5' | bc 2 For floating-post arithmetic, you can import standard library bc -l: echo ...
This example is a basic setup for unittesting the StringBuilder.toString() using junit. import static org.junit.Assert.assertEquals; import org.junit.Test; public class StringBuilderTest { @Test public void stringBuilderAppendShouldConcatinate() { StringBuilder stringBui...
If your project doesn't have README.md, GitHub may parse README.rdoc to display details. If it has both, it will use README.md, silently ignoring rdoc. A README file may include- Project Title Describe briefly about your project. You may also provide project's website link, badges, community ...
Fish shell is friendlier yet you might face trouble while using with virtualenv or virtualenvwrapper. Alternatively virtualfish exists for the rescue. Just follow the below sequence to start using Fish shell with virtualenv. Install virtualfish to the global space sudo pip install virtualfish...
Content has been moved back to good 'ol Servlets wiki page
Content has been moved back to good 'ol Servlets wiki page

Page 378 of 1336