Skip to content

Instantly share code, notes, and snippets.

@osdezwart
osdezwart / FindEntry.cs
Created December 23, 2010 22:28
WinDbg debug session of infinite loop in Dictionary`2.FindEntry
private int FindEntry(TKey key)
{
if (key == null)
{
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);
}
if (this.buckets != null)
{
int num = this.comparer.GetHashCode(key) & 0x7fffffff;
for (int i = this.buckets[num % this.buckets.Length]; i >= 0; i = this.entries[i].next)
@osdezwart
osdezwart / kode.rb
Created October 31, 2010 12:06
kode.rb Autoindenting of ruby code (Kode::Indenter)
=begin
/***************************************************************************
* Copyright (C) 2006, Paul Lutus *
* Copyright (C) 2008, Antono Vasiljev *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
namespace :admin do
resources :users
resources :events
resources :routes
resources :comments, :member => {:reject => :get, :aprove => :get }
end
this doesn't work when I run rake routes I get
GET /admin/comments(.:format) {:action=>"index", :controller=>"admin/comments", :member=>{:reject=>:get, :aprove=>:get}}
Posting <delete><query>*:*</query></delete>
Posting <commit waitSearcher="true" waitFlush="true" />
Posting
<add>
<doc>
<field name="id">DEL12345</field>
<field name="name">Delete test product 1</field>
<field name="manu">Acme ltd</field>
<field name="cat">electronics</field>