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 parallel_invert(l, n): | |
'''Inverts all elements of a list modulo some number, using 3(n-1) modular multiplications and one inversion.''' | |
culm = l[:] | |
for i in xrange(len(l)-1): | |
culm[i+1] = (culm[i] * l[i+1]) % n | |
try: | |
inv = invert(culm[-1], n) | |
except ZeroDivisionError: |
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
#!/bin/bash | |
cpp -m32 -P -nostdinc ttmath/ttmathuint.h | \ | |
tr '\n' ' ' | \ | |
sed 's/\s\+/ /g' | \ | |
sed 's/\([^a-zA-Z0-9'\''_]\) /\1/g' | \ | |
sed 's/ \([^a-zA-Z0-9'\''_%\($]\)/\1/g' | \ | |
sed 's/^ //' | \ | |
sed 's/\<return\>/R /g' | \ | |
sed 's/\<operator\>/O/g' | \ | |
sed 's/\<uint\>/U/g' | \ |
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
diff --git a/browser/devtools/styleinspector/rule-view.js b/browser/devtools/styleinspector/rule-view.js | |
index fb41f9a..e4ae10b 100644 | |
--- a/browser/devtools/styleinspector/rule-view.js | |
+++ b/browser/devtools/styleinspector/rule-view.js | |
@@ -1813,17 +1813,17 @@ CssRuleView.prototype = { | |
* @param {Rule} aRule | |
* The Rule object we're editing. | |
* @constructor | |
*/ | |
function RuleEditor(aRuleView, aRule) { |
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
" Vim syntax file, modified from http://www.vim.org/scripts/script.php?script_id=3064. | |
" Put in ~/.vim/after/syntax/c.vim | |
" | |
" Language: Librcd C | |
" Maintainer: Simon Lindholm ([email protected]) | |
" Last Change: 2014 Aug. 28 | |
" Version: 0.1 | |
" | |
" Changelog: | |
" 0.1 - initial version, modification from vimscript#3064 |
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
enum TryState { | |
TryEval = 1 | |
}; | |
int func() { | |
for (int state; ; ({break;})) | |
if (0) | |
out: break; | |
else | |
for (int i = 0; ; ++i) |
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
<!DOCTYPE html> | |
<meta charset=utf-8> | |
Loaded with: <?= (isset($_POST['submit']) ? 'POST' : 'GET') ?><br> | |
Request number: <?php | |
session_start(); | |
$req = (isset($_SESSION['reqid']) ? $_SESSION['reqid'] : 1); | |
$_SESSION['reqid'] = $req + 1; | |
echo $req; | |
?><br> |
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
#!/usr/bin/env python | |
import sys | |
import os | |
import shutil | |
import argparse | |
if len(sys.argv) == 1: | |
program = os.path.basename(sys.argv[0]) | |
print("Sample usage:") | |
print("$ git bisect start HEAD HEAD~10") |
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
From a4537a44618140589f8448281d6f7616bf9ff09c Mon Sep 17 00:00:00 2001 | |
From: Simon Lindholm <[email protected]> | |
Date: Wed, 22 May 2013 15:52:57 +0200 | |
Subject: [PATCH] Add Debugger.prototype.makeDebuggeeValueFromGlobal | |
--- | |
Debugger-makeDebuggeeValueFromGlobal-01.js | 31 ++++++++++++++++++++++++++++++ | |
Debugger.cpp | 26 ++++++++++++++++++++++--- | |
Debugger.h | 2 +- | |
3 files changed, 55 insertions(+), 4 deletions(-) |
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
/** | |
* Time execution of a piece of code, with a user-provided number 'iterations' | |
* of samples (>= 0), or if 'iterations' is null, just one. | |
*/ | |
timeExecution = function(context, code, iterations) | |
{ | |
var userGiven = true; | |
if (iterations === null) | |
{ | |
userGiven = false; |
NewerOlder