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
user=> (doc redis/atomically) | |
------------------------- | |
redis/atomically | |
([& body]) | |
Macro | |
Execute all redis commands in body atomically, ie. sandwiched in a | |
MULTI/EXEC statement. If an exception is thrown the EXEC command | |
will be terminated by a DISCARD, no operations will be performed and | |
the exception will be rethrown. |
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
;; | |
;; Implementation of exercise 2 found at: | |
;; http://www.knowing.net/index.php/2006/06/16/15-exercises-to-know-a-programming-language-part-1/ | |
;; | |
;; Part of code sparring evening at the first SCLOJUG meeting, | |
;; unfinished then, finished now. | |
;; | |
;; Horrible specification btw. | |
;; |
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
;; Setup Mac keys | |
(setq mac-command-modifier 'meta) | |
(setq mac-option-modifier nil) |
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
using System.Messaging; | |
using System.Transactions; | |
using NHibernate.Criterion; | |
using NUnit.Framework; | |
using System.Collections; | |
namespace NHibernate.Test.NHSpecificTest.NH2238 | |
{ |
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
public class Group | |
{ | |
[DirectoryAttribute("member")] | |
public IList<string> Members { get; set; } | |
} | |
public class User | |
{ | |
[DirectoryAttribute("objectGUID")] | |
public Guid ObjectGUID { get; set; } |
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
// Create a client for sending metrics to "localhost:8125", prefixing all keys with "foo.bar" | |
using(var client = new StatsClient("localhost", 8125, "foo.bar")) | |
{ | |
// Increment a counter | |
client.Incremenet("counter1"); // sends 'foo.bar.counter1:1|c' | |
// Increment a counter by 42 | |
client.Incremenet("counter2", 42); // sends 'foo.bar.counter2:1|c' | |
// Decrement a counter by 5, sampled every 1/10th time |
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
1.9.2p290 :001 > require 'watir-webdriver' | |
=> true | |
1.9.2p290 :002 > browser = Watir::Browser.new :firefox | |
=> #<Watir::Browser:0x27fd323015c1b386 url="about:blank" title=""> | |
1.9.2p290 :003 > browser.goto "file:///page.html" | |
=> "file:///Users/ragge/tmp/page.html" | |
1.9.2p290 :006 > browser.element(:class => "b").text | |
=> "Blahonga" | |
1.9.2p290 :008 > browser.div(:class => "b").text | |
Watir::Exception::UnknownObjectException: unable to locate element, using {:class=>"b", :tag_name=>"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
qnet.ModelCollection.prototype.contains = function(obj, identityFn) { | |
var objIdentity = identityFn(obj) | |
return goog.array.find(this.models, function(model) { | |
var modelIdentity = identityFn(model); | |
if(modelIdentity == objIdentity) { | |
return true; | |
} else { | |
return false; |
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
Typ såhär menar jag: | |
/users -> UserResourse.QueryUsers | |
/users/{userId} -> UserResource.GetUser(userId) | |
/users/{userId}/computers -> ComputerResource.GetComputers(userId) | |
/users/{userId}/computers/{computerId} -> ComputerResource.GetComputer(userId, computerId) | |
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
<head> | |
<script src="[path to closure library root]/closure/goog/base.js"></script> | |
<script> | |
goog.require('goog.dom'); | |
</script> | |
</head> | |
... | |
<script> |
OlderNewer