This file contains hidden or 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
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> | |
<os:ShortName>Google Viewer</os:ShortName> | |
<os:Description>View document in google docs</os:Description> | |
<os:InputEncoding>UTF-8</os:InputEncoding> | |
<os:Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIjSURBVHjanJFfSFNRHMe/9+xud/+62ubmYIEFoZUpvrQ99JD1HFFvPQVhZVIo5KugElTkSKOoDAZB4EsP1WtQFBixF4shtWkMi4bztpzuunvddPd0znSVeQ3yB18u5/7O9/P7nnMESim2qgej0XabJPXX+evb3bKMxYUcctnsh1KxOHixs+MZ3yNsBRgeuXthf0vraEPTAVBiQXWfBQa+TiWQmko+YpCzpoC+voHDR44dHd/d3IZCcWVT3ymJSE3GMfN5+hT5uykIgrTT6xnY29y6wWywQYt6CT+WlvFdXUbTwRYQQvpFk/RefyAY0o3fP7hRUXWIFgKHTYRQLkMrUwiSq80M4MzldZka9Jc5k9dYbCtqnRJkuxWSaIGLrRfyDGoCIGllPs0mBYtasTLZxgzc7HPbUeOwVVIQCMgyADEBrIxPfIyVtAK00ip4ED69xr6WwOuSKpC0kkUsnnxtBtA9FhWRe48RkB0gAljktbM7mXiazLyK29EnWDWMwU3POBQZicxm5npnVQppRy16zp2GL+CDlRC42fMlZ9KIjj3HRDzR+e7p/Ycb7uD6jcjlcDjU663 |
This file contains hidden or 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
/** | |
* Calculates the size of an object. This is based on SharedObject.getSize(). | |
* @param o The object to get the size of | |
* @return The size of the object. | |
*/ | |
public static function getObjectSize(o:Object):Number { | |
var so:SharedObject = SharedObject.getLocal("__getObjectSizeHelper"); | |
so.data.o = o; | |
var size:Number = so.getSize(); | |
so.clear(); |
This file contains hidden or 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
resizeDragger = new BoundedDragResizer(this, resizeHandle, | |
BoundedDragResizer.rangedCheckSizeFactory(new Dimensions(50, 20))); | |
/////////////////////////////////////////////////////////////////////////////// | |
/** | |
* Factory that returns a checkSize() implementation that bounds the window | |
* to be within some min and max size. No validation is done on the min | |
* and max sizes. |
This file contains hidden or 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
def score(dice) | |
count_dice_types(dice).each_pair.inject(0) { |score, pair| | |
value, count = pair | |
score + score_dice_value(value, count) | |
} | |
end | |
def score_dice_value(value, count) | |
return 0 if count == 0 | |
return tripple_score(value) + score_dice_value(value, count - 3) if count > 2 |
This file contains hidden or 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
# By hand: | |
def test_valid_suit_transition_clubs_diamonds | |
c1 = Card.get 10, :clubs | |
c2 = Card.get 9, :diamonds | |
assert SolitaireStack.are_cards_sequential?(c1, c2) | |
end | |
def test_valid_suit_transition_clubs_hearts | |
c1 = Card.get 10, :clubs |
This file contains hidden or 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
require 'rbtree' | |
# A queue that keeps its elements sorted based on the <=> operator. | |
# Requires the rbtree gem | |
class SortedQueue | |
include Enumerable | |
def initialize(ary=[]) | |
@queue = RBTree.new |
This file contains hidden or 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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\cygwinbash] | |
@="Open Cygwin Zsh Here" | |
[HKEY_CLASSES_ROOT\Directory\shell\cygwinbash\command] | |
@="c:\\cygwin\\bin\\bash.exe --login -c \"cd \\\"`cygpath -u '%L'`\\\";mintty&\"" |
This file contains hidden or 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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\powershell] | |
@="PowerShell Here" | |
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command] | |
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'" |
This file contains hidden or 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
$devid = "*DEV_4236" | |
$status = devcon status $devid | Select-String "running" | |
if($status -eq $null) | |
{ | |
write-host "Enabling wireless" | |
devcon enable $devid | |
} | |
else |
This file contains hidden or 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
package testsupport | |
{ | |
import flash.events.Event; | |
import flash.events.IEventDispatcher; | |
import flexunit.framework.Assert; | |
/** Helper class for asserting that certain events occur and others don't */ | |
public class EventChecker { | |
private var _source:IEventDispatcher; |
OlderNewer