my code as below
$fields->insertBefore($isTrueField = CheckboxField::create('IsTrue', 'Is it true?'), 'OtherField');
$fields->dataFieldByName('AnotherField')->setAttribute('data-attribute', $isTrueField->ID());
the outputs is checkbox
<!-- example: https://jsfiddle.net/Ariex/ouoq0jbw/ --> | |
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto:400,100,400italic,700italic,700&type=.css"> | |
<style> | |
@keyframes hue { | |
from { | |
filter: hue-rotate(0deg); | |
-webkit-filter: hue-rotate(0deg); | |
} | |
to { | |
filter: hue-rotate(-360deg); |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Web; | |
namespace Routing.Modules | |
{ | |
public class WebAPIBridgeModule : IHttpModule |
/* WebKit */ | |
-webkit-filter: invert(); | |
/* Firefox */ | |
filter: url("data:image/svg+xml;utf8,<svg height='0' xmlns='http://www.w3.org/2000/svg'><filter id='negative'><feColorMatrix values='-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0'/></filter></svg>#negative"); | |
/* IE 6-7 */ | |
filter: progid:DXImageTransform.Microsoft.BasicImage(invert=1); | |
/* IE 8 */ | |
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(invert=1)'; |
my code as below
$fields->insertBefore($isTrueField = CheckboxField::create('IsTrue', 'Is it true?'), 'OtherField');
$fields->dataFieldByName('AnotherField')->setAttribute('data-attribute', $isTrueField->ID());
the outputs is checkbox
^https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)$
(from http://stackoverflow.com/a/26445466/903505)
For more information, you can read a related blog post on this topic
You can now simply do:
# (turn on full debian repo; turn on ssh)
# be root
sudo su
using System; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Create a lock block against a string | |
/// </summary> | |
public class StringLocker | |
{ | |
/// <summary> | |
/// Store map from string to lockable object |
/// <summary> | |
/// Evaluates the arguments in order and returns the current value of the first expression that initially does not evaluate to NULL. | |
/// </summary> | |
/// <typeparam name="T">Target Type, has to be a class type</typeparam> | |
/// <param name="validator">An evaluation method, check if current alternative is valid as a return value.</param> | |
/// <param name="that">The first alternative value</param> | |
/// <param name="alternatives">Alternatives could be a value that is or can convert to target type; or a Func that return value as target type.</param> | |
/// <returns>The first value that is not null (or white spaces for string) in arguments.</returns> | |
public static T Coalesce<T>(this T that, Func<T, bool> validator, params object[] alternatives) where T : class | |
{ |
public static string GetBase64GifSpacer(int width, int height){ | |
var bwidth = BitConverter.GetBytes(width); | |
var bheight = BitConverter.GetBytes(height); | |
var bytes = new byte[] { 0x47,0x49,0x46,0x38,0x39,0x61,bwidth[0],bwidth[1],bheight[0],bheight[1],0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0xF9,0x04,0x01,0x00,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x00,bwidth[0],bwidth[1],bheight[0],bheight[1],0x00,0x02,0x02,0x44,0x01,0x00,0x3B }; | |
return "data:image/gif;base64,"+Convert.ToBase64String(bytes); | |
} |