This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <string.h> | |
enum { MAX_WORDS = 64, MAX_WORD_LEN = 20 }; | |
int main(void) | |
{ | |
char words[MAX_WORDS][MAX_WORD_LEN]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> | |
<opml version="1.0"> | |
<head> | |
<title>Pocket Casts Feeds</title> | |
</head> | |
<body> | |
<outline text="feeds"> | |
<outline type="rss" text="JavaScript Jabber Only" xmlUrl="https://feeds.feedwrench.com/js-jabber.rss" /> | |
<outline type="rss" text="The Moth" xmlUrl="http://feeds.feedburner.com/themothpodcast" /> | |
<outline type="rss" text="Bullseye with Jesse Thorn" xmlUrl="https://www.npr.org/rss/podcast.php?id=510309" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param el Element | |
* @param CSS property in hyphen case | |
* @param pseudo pseudo selector (optional) | |
*/ | |
function getStyleValue(el, property, pseudo) { | |
// convert hyphen-case to camelCase | |
const elStyle = el.style[property.replace(/(\-[a-z])/g, $1 => $1.toUpperCase().replace('-',''))]; | |
return ((elStyle !== '' && !pseudo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A utility function to flatten an array, nested to any depth. | |
* @param {Array} initialArray | |
* | |
*/ | |
function deepFlatten(initialArray) { | |
return initialArray.reduce((acc, v) => { | |
return acc.concat(Array.isArray(v) ? deepFlatten(v) : v); | |
}, []); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var origFn = browser.driver.controlFlow().execute; | |
browser.driver.controlFlow().execute = function() { | |
var args = arguments; | |
// queue 100ms wait | |
origFn.call(browser.driver.controlFlow(), function() { | |
return protractor.promise.delayed(100); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should notify Record Deleted on deletion', function() { | |
spyOn(UserNotification, 'notifyShort'); | |
spyOn(Utility, 'prompt').andReturn(resolveDummyPromiseAsync()); | |
var task = new Task({ | |
id: '1', | |
activitydate: moment().add('months', 1).format("YYYY-MM-DD") | |
}); | |
var test = ListHelper.editFormFor(task, 'Test Deletion'); | |
var form = $('#modal-edit-form'); | |
form.find('.delete-object').trigger('vclick'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter('widont', function() { | |
return function(text) { | |
return text.replace(/([^\s])\s+([^\s]+)\s*$/, "$1 $2") | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dice = function(d) { | |
var a = d.split('d'), | |
result = 0, | |
num = (typeof (a[0]-0) === 'number') ? a[0] : 1, | |
op = (a[1].match(/[\-\+]/)), | |
max = (op === null) ? a[1] : a[1].split(op[0])[0], | |
mod = (op !== null) ? op[0] + ' ' + a[1].split(op[0])[1] : ''; | |
for (var i = num; i >= 0; i--) { | |
result += (Math.floor(Math.random() * (max)) + 1) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p { | |
background: url(http://www.google.com/images/errors/robot.png) no-repeat 0 0; | |
height: 400px; | |
width: 300px; | |
font: 0/0 a; | |
color: transparent; | |
text-shadow: none | |
} |
NewerOlder