Tutorial by Examples: and

generate sample data frames: In [57]: df3 = pd.DataFrame({'col1':[211,212,213], 'col2': [221,222,223]}) In [58]: df1 = pd.DataFrame({'col1':[11,12,13], 'col2': [21,22,23]}) In [59]: df2 = pd.DataFrame({'col1':[111,112,113], 'col2': [121,122,123]}) In [60]: df3 = pd.DataFrame({'col1':[211,2...
ob_start is especially handy when you have redirections on your page. For example, the following code won't work: Hello! <?php header("Location: somepage.php"); ?> The error that will be given is something like: headers already sent by <xxx> on line <xxx>. In or...
For the sake of this example, it is assumed the user is running Jetty as a distribution. For information on how to run Jetty as an embedded web server, please refer to the official documentation. Jetty can be downloaded from here and is available in both .zip and .gzip formats. Current versions of ...
On CLiki, a Wiki for Common Lisp and free Common Lisp software, a list of Proposed ANSI Revisions and Clarifications is being maintained. Since the Common Lisp standard has not changed since 1994, users have found several problems with the specification document. These are documented on the CLiki p...
There are several good examples of using lambdas as a FunctionalInterface in simple scenarios. A fairly common use case that can be improved by lambdas is what is called the Execute-Around pattern. In this pattern, you have a set of standard setup/teardown code that is needed for multiple scenarios ...
When to use Virtually all WPF controls make heavy use of dependency properties. A dependency property allows for the use of many WPF features that are not possible with standard CLR properties alone, including but not limited to support for styles, animations, data binding, value inheritance, and c...
To make a class a subclass of another class, use parent pragma: package Point; use strict; ... 1; package Point2D; use strict; use parent qw(Point); ... 1; package Point3D; use strict; use parent qw(Point); ... 1; Perl allows for multiple inheritance: package Point2D; use stri...
In Perl, the difference between class (static) and object (instance) methods is not so strong as in some other languages, but it still exists. The left operand of the arrow operator -> becomes the first argument of the method to be called. It may be either a string: # the first argument of new ...
Collections in Java only work for objects. I.e. there is no Map<int, int> in Java. Instead, primitive values need to be boxed into objects, as in Map<Integer, Integer>. Java auto-boxing will enable transparent use of these collections: Map<Integer, Integer> map = new HashMap<&g...
redis-cli is the Redis command line interface program that allows to send commands to Redis and read the replies sent by the server, directly from the terminal. Basic command line usage is below: Access to redis: $ redis-cli 127.0.0.1:6379> Access to redis with authentication: $ redis-cli ...
The trim() method returns a new String with the leading and trailing whitespace removed. String s = new String(" Hello World!! "); String t = s.trim(); // t = "Hello World!!" If you trim a String that doesn't have any whitespace to remove, you will be returned the same S...
Mercurial makes it easy to share your work, and to pull in contributions from other developers. This involves three key steps; cloning, pulling, and pushing. Clone To copy a remote repository to your local disk you "clone" it. To do so simply pass the remote URL you'd like to clone from....
Panels can have sections, sections can have settings, and settings can have controls. Settings are saved in the database, while the controls for particular settings are only used to display their corresponding setting to the user. This code creates a basic section in the panel from above. Inside a...
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...
Content has been moved back to good 'ol Servlets wiki page
Background ============ WebStorm is lightweight yet powerful Integrated Development Environment (IDE) perfectly equipped for complex client-side development and server-side development, it is cross-platform and works on Windows, Mac OS X, and Linux. WebStorm features advanced support for JavaScri...
Example: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <textarea id="content"></textarea> <input type="button" id="copy...
1. Character Class Character class is denoted by []. Content inside a character class is treated as single character separately. e.g. suppose we use [12345] In the example above, it means match 1 or 2 or 3 or 4 or 5 . In simple words, it can be understood as or condition for single characters (...
In case of autologin or "remember me" cookie, the same quirks as in case of subdomain cookies are applying. But this time you need to configure user component, setting identityCookie array to desired cookie config. Open you application config file and add identityCookie parameters to use...
The ng-mouseenter and ng-mouseleave directives are useful to run events and apply CSS styling when you hover into or out of your DOM elements. The ng-mouseenter directive runs an expression one a mouse enter event (when the user enters his mouse pointer over the DOM element this directive resides i...

Page 41 of 153