Wrap buttons or secondary text in .panel-footer. Note that panel footers do not inherit colors and borders when using contextual variations as they are not meant to be in the foreground.
<div class="panel panel-default">
<div class="panel-body">
Panel content...
The map operation is a useful tool when working with arrays and vectors, but it can also be used to deal with Option values in a functional way.
fn main() {
// We start with an Option value (Option<i32> in this case).
let some_number = Some(9);
// Let's do some consecutive ...
One common use for the FOR XML function is to concatenate the values of multiple rows.
Here's an example using the Customers table:
SELECT
STUFF( (SELECT ';' + Email
FROM Customers
where (Email is not null and Email <> '')
ORDER BY Email ASC
FOR XM...
Install
npm install tsify
Using Command Line Interface
browserify main.ts -p [ tsify --noImplicitAny ] > bundle.js
Using API
var browserify = require("browserify");
var tsify = require("tsify");
browserify()
.add("main.ts")
.plugin("tsify"...
Sometimes we have to resize a UILabel based on dynamic content where the text length is unknown. In this example, width of the UILabel is fixed at 280 points and the height is infinite, lets say 9999. Estimating the frame with respect to the text style and maximumLabelSize.
Objective-C
UILabel * l...
DROP PROCEDURE if exists displayNext100WithName;
DELIMITER $$
CREATE PROCEDURE displayNext100WithName
( nStart int,
tblName varchar(100)
)
BEGIN
DECLARE thesql varchar(500); -- holds the constructed sql string to execute
-- expands the sizing of the output buffer to accomoda...
cat >file
It will let you write the text on terminal which will be saved in a file named file.
cat >>file
will do the same, except it will append the text to the end of the file.
N.B: Ctrl+D to end writing text on terminal (Linux)
A here document can be used to inline the content...
Writes an error message to the console if the assertion is false. Otherwise, if the assertion is true, this does nothing.
console.assert('one' === 1);
Multiple arguments can be provided after the assertion–these can be strings or other objects–that will only be printed if the assertion is fals...
To setup a new credential profile with the name myprofile:
$ aws configure --profile myprofile
AWS Access Key ID [None]: ACCESSKEY
AWS Secret Access Key [None]: SECRETKEY
Default region name [None]: REGIONNAME
Default output format [None]: text | table | json
For the AWS access key id and se...
There are situations when we don't want to rely upon Free Store for allocating memory and we want to use custom memory allocations using new.
For these situations we can use Placement New, where we can tell `new' operator to allocate memory from a pre-allocated memory location
For example
int a4b...
The fundamental concept of the customizer is that admins can live preview changes to their site, and then permanently add them.
The following can be copied and pasted into a theme's functions.php file to
Add a customizer section called My First Section
Add a customizer setting called Hello Worl...
Instantiating a socket can be done in various ways.
by 2 line declaration & instantiation:
First we need to define a variable which will hold a Socket class object:
Socket socket;
then we can create a Socket class object:
socket = new Socket();
We can also make a one line defin...
Installing aws cli in Ubuntu / Debian Instance
sudo apt-get install -y python-dev python-pip
sudo pip install awscli
aws --version
aws configure
Installing aws cli using python
Using pip you can install aws cli in windows, OS X and Linux
sudo pip install awscli
Configuring the AWS Comman...
Floating-point numbers cannot represent all real numbers. This is known as floating point inaccuracy.
There are infinitely many floating points numbers and they can be infinitely long (e.g. π), thus being able to represent them perfectly would require infinitely amount of memory. Seeing this was a ...
Objective-C
NSString *textToShare = @"StackOverflow Documentation!! Together, we can do for Documentation what we did for Q&A.";
NSURL *documentationURL = [NSURL URLWithString:@"http://stackoverflow.com/tour/documentation"];
NSArray *objectsToShare = @[textToShare, docum...