Easily change the order of our built-in grid columns with .col-md-push-* and .col-md-pull-* modifier classes.
<div class="row">
<div class="col-md-9 col-md-push-3">.col-md-9 .col-md-push-3</div>
<div class="col-md-3 col-md-pull-9">.col-md-...
In addition to prebuilt grid classes for fast layouts, Bootstrap includes Less variables and mixins for quickly generating your own simple, semantic layouts.
Variables
Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use ...
For libraries that specify autoload information, Composer generates a vendor/autoload.php file. You can simply include this file and you will get autoloading for free.
require __DIR__ . '/vendor/autoload.php';
This makes it really easy to use third party code. For example: If your project depend...
In the body of a function nargin and nargout indicate respectively the actual number of input and output supplied in the call.
We can for example control the execution of a function based on the number of provided input.
myVector.m:
function [res] = myVector(a, b, c)
% Roughly emulates the c...
The following is a simple example Perl test script, that gives some structure to allow for testing of other methods in the class/package under test.
The script produces standard output with simple "ok" / "not ok" text, which is called TAP (Test Anything Protocol).
Typically the...
If you'd like to start implementing best practices, for yourself or your team, then Perl::Critic is the best place to start. The module is based on the Perl Best Practices book by Damien Conway and does a fairly good job implementing the suggestions made therein.
Note: I should mention (and Conwa...
Set single element:
$dt->set( year => 2016 );
Set many elements:
$dt->set( year => 2016, 'month' => 8);
Add duration to datetime
$dt->add( hour => 1, month => 2)
Datetime subtraction:
my $dt1 = DateTime->new(
year => 2016,
month => 8,
...
perl -Mojo -E 'p("http://localhost:3000" => form => {Input_Type => "XML", Input_File => {file => "d:/xml/test.xml"}})'
File d:/xml/test.xml will be uploaded to server which listen connections on localhost:3000 (Source)
In this example:
-Mmodule execu...
Type below command:
instmodsh
It'll show you the guild as below:
Available commands are:
l - List all installed modules
m <module> - Select a module
q - Quit the program
cmd?
Then type l to list all the installed modules, you can also use command m &l...
Modal dialog components can be instantiated via jQuery with the function $('#myModal').modal(options), where $('#myModal') is a top-level reference to the specific modal dialog and options is a Javascript object specifying the modal dialog's default attributes.
The options object allows for multipl...
Depending on the version of Weka being used different methods for loading ARFF files should be utilised.
Weka <3.5.5
The following sample code shows how to load an ARFF file:
import weka.core.Instances;
import java.io.BufferedReader;
import java.io.FileReader;
...
BufferedReader reader = n...
Many databases can be used in Weka. Firstly, the DatabaseUtils.props file must be edited to match your database; specifically you must provide your database's name, location, port and correct driver.
jdbcDriver=org.gjt.mm.mysql.Driver
jdbcURL=jdbc:mysql://localhost:3306/my_database
Then the dat...
IronPython enables to use generic classes and methods from the .net framework.
Generics can be used with the same syntax as accessing an index. For passing more than one type-parameter, they must be separated with a comma:
l = Dictionary[int, str]()
That way we create a dictionary where keys on...
A literal inside a enumeration is a discrete type so we can use attribute Image to find out which literal it is as text form. Notice that this prints out the same word as in the code (but in upper case).
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
type Fruit is (Banana, Pear, Orang...
Instead of attribute Image and Ada.Text_IO.Put on enumeration literals we can only use the generic package Ada.Text_IO.Enumeration_IO to print out the literals.
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
type Fruit is (Banana, Pear, Orange, Melon);
package Fruit_IO is new Enume...
You can set the desired UI widget's stylesheet using any valid CSS. The example below will set a QLabel's text color a border around it.
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Mai...