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
diff -r 1150327c24d7 hgext/largefiles/lfcommands.py | |
--- a/hgext/largefiles/lfcommands.py Sun Jan 08 17:09:01 2012 +0100 | |
+++ b/hgext/largefiles/lfcommands.py Sun Jan 08 17:41:58 2012 +0100 | |
@@ -117,22 +117,10 @@ | |
def _addchangeset(ui, rsrc, rdst, ctx, revmap): | |
# Convert src parents to dst parents | |
- parents = [] | |
- for p in ctx.parents(): | |
- parents.append(revmap[p.node()]) |
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 static bool IsManagedAssembly (string file) | |
{ | |
try { | |
using (Stream fs = new FileStream (file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { | |
BinaryReader reader = new BinaryReader(fs); | |
//The 4-byte PE Header indicator is at 0x3C | |
fs.Position = 0x3C; | |
uint peHeader = reader.ReadUInt32(); | |
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
// This path can be reentered if something else tries to close the window | |
// before the user responds to the "Save changes?" dialog. | |
// This results in a stack of "Save changes?" dialogs, and unpredictable behavior | |
// when responding to all but the first. | |
// The Right Fix would be to make it impossible for this to happen. | |
// For now, we work around by replacing the OnClosing handler | |
// until we get an answer back from the user. |
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; | |
using System.Collections.Generic; | |
namespace Sort | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
var list = new List<int> () { |
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
// RB tree implementation -*- C++ -*- | |
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | |
// Free Software Foundation, Inc. | |
// | |
// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) | |
// any later version. |
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
#!/bin/sh | |
arch=`uname -i` | |
case $arch in | |
x86_64) | |
echo '64bit!' | |
;; | |
i*86) | |
echo '32bit!' |
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
static function TestFunction(context : String) | |
{ | |
Debug.Log("static function TestFunction I " + context); | |
yield 0; | |
Debug.Log("static function TestFunction II " + context); | |
} |
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; | |
using UnityEngine; | |
public class ScopedHorizontalLayout: IDisposable | |
{ | |
public ScopedHorizontalLayout (params GUILayoutOption[] options) | |
{ | |
GUILayout.BeginHorizontal (options); | |
} | |
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
import UnityEngine | |
class Notebook (MonoBehaviour): | |
selectedTab = 0 | |
tabs = ("First", "Second"); | |
panels = (DrawFirst, DrawSecond) | |
def OnGUI (): | |
selectedTab = GUILayout.Toolbar (selectedTab, tabs) | |
panels[selectedTab]() |
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
Linux: | |
linux-vdso.so.1 => (0x00007fff1ffff000) | |
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f68b8647000) | |
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f68b7d0e000) | |
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f68b794f000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007f68b9359000) | |
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f68b8429000) | |
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f68b8221000) | |
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f68b7f25000) |