#split string into an array of strings
source: http://stackoverflow.com/a/3008775/105282
namespace StringChunks
{
static class Tools
{
public static IEnumerable<string> SplitByLength(this string str, int maxLength)
#split string into an array of strings
source: http://stackoverflow.com/a/3008775/105282
namespace StringChunks
{
static class Tools
{
public static IEnumerable<string> SplitByLength(this string str, int maxLength)
/** | |
* Fix for vw, vh, vmin, vmax on iOS 7. | |
* http://caniuse.com/#feat=viewport-units | |
* | |
* This fix works by replacing viewport units with px values on known screen sizes. | |
* | |
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix. | |
* Target devices running iOS 8+ will incidentally execute the media query, | |
* but this will still produce the expected result; so this is not a problem. | |
* |
{ | |
"version": "0.1.0", | |
"command": "cmd", | |
"isShellCommand": true, | |
"args": ["/C"], | |
"tasks": [ | |
{ | |
"taskName": "Build Solution", | |
"suppressTaskName": true, | |
"isBuildCommand": true, // triggered via Ctrl+Shift+b |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "#3d8e33", | |
"@brand-success": "#5cb85c", |
.hide { | |
display: none; | |
} | |
#lnkNew { | |
font-size: .85em; | |
font-weight: normal; | |
margin-left: 1em; | |
} |
if (!jQuery.support.cors && window.XDomainRequest) { | |
var httpRegEx = /^https?:\/\//i, | |
getOrPostRegEx = /^get|post$/i, | |
sameSchemeRegEx = RegExp("^" + location.protocol, "i"), | |
xmlRegEx = /\/xml/i; | |
jQuery.ajaxTransport("text html xml json", function (e, t) { | |
if (e.crossDomain && e.async && getOrPostRegEx.test(e.type) && httpRegEx.test(t.url) && sameSchemeRegEx.test(t.url)) { | |
var n = null, | |
i = (t.dataType || "").toLowerCase(); | |
return { |
if you have a string like "6FA34323-C71F-4FD4-996F-002CE77E6B77"
search w/ regexp using ("[A-Z0-9-]+") replace with \L$1
\U will uppercase
Vim version:
var expired = false; | |
if (new Date("4/5/2008 12:00:00 AM") < new Date()) { | |
expired = true; | |
} | |
alert(expired); |