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
/* Copyright (c) 2011 Zachary J. Gramana | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH |
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
/*! | |
* jQuery JavaScript Library v1.4.1 | |
* http://jquery.com/ | |
* | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ | |
* Copyright 2010, The Dojo Foundation | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
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
/** | |
* ShingleFilter class for Lucene.Net C# ported from Java version 2.9.2 org.apache.lucene.analysis.shingle.ShingleFilter.java | |
* [Last updated: 07-16-2011] | |
* | |
* This version of the file is not complete. It produces System.SystemException: System.NullReferenceException when run. | |
* | |
* System.NullReferenceException: Object reference not set to an instance of an object. | |
* at LuceneIndexer.ShingleFilter.FillShingleBuffer() in C:\Users\..\ShingleFilter.cs:line 381 * | |
* | |
* |
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
// Only load the fields that the query asks for. | |
// The Lucene.Net signature for this is wonky, as | |
// Java Lucene takes a Set<String>. As a result, | |
// we are obliged to create this hashtable where | |
// the keys == values. | |
var loadFields = new Hashtable(); | |
foreach (var fieldName in request.ResultFields) | |
{ | |
loadFields.Add(fieldName, fieldName); |
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
@echo off | |
REM PHPUnit | |
REM | |
REM Copyright (c) 2002-2010, Sebastian Bergmann <[email protected]>. | |
REM All rights reserved. | |
REM | |
REM Redistribution and use in source and binary forms, with or without | |
REM modification, are permitted provided that the following conditions | |
REM are met: |
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; | |
public static class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var m = new Action<int>(i => Console.WriteLine(i.ToString())); | |
m(5); | |
} | |
} |
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
// References: | |
// - MyPreviouslyAdded.dll | |
// - MyGacced.dll | |
// Imports: | |
// - My.Namespace.Bitches | |
// - My.Other.Namespace | |
P("public Version(Version item)"); | |
P("{"); | |
var t = typeof(Version); | |
var props = t.GetProperties(); |
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.Json; | |
... | |
var response = "{ \"foo\": \"bar\" }"; | |
var jsonValue = JsonValue.Parse (response) as JsonObject; | |
// Split the lambda declaration and initialization | |
// so that we can do recursion; | |
Func<JsonValue, NSDictionary> toNSDictionary; | |
toNSDictionary = (obj)=> { |
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
If you want to debug your Xamarin app using LLDB to get a backtrace, then do the following: | |
1) Clone https://github.com/zgramana/ios-deploy (or download https://www.dropbox.com/s/8fl1t1qc5fdg5tn/ios-deploy) | |
2) Run `make` inside that folder. | |
3) Run `./ios-deploy -d -b path/to/bin/iPhone/Debug/MyFoo.app` | |
This will install your app and start it will lldb attached. | |
From the lldb prompt: |
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
<DotNetProjectSubtype | |
guid="{e613f3a2-fe9c-494f-b74e-f63bcb86fea6}" | |
type="MonoDevelop.IPhone.IPhoneProject" | |
migrationHandler="MonoDevelop.IPhone.IPhoneProjectMigrationHandler" /> | |
<DotNetProjectSubtype | |
guid="{6bc8ed88-2882-458c-8e55-dfd12b67127b}" | |
type="MonoDevelop.IPhone.IPhoneProject" /> | |
<DotNetProjectSubtype | |
guid="{f5b4f3bc-b597-4e2b-b552-ef5d8a32436f}" | |
type="MonoDevelop.IPhone.IPhoneBindingProject" |
OlderNewer