Skip to content

Instantly share code, notes, and snippets.

View sophiebits's full-sized avatar

Sophie Alpert sophiebits

View GitHub Profile
diff -Naur old/lib/archive.c new/lib/archive.c
--- old/lib/archive.c
+++ new/lib/archive.c
@@ -79,6 +79,10 @@
#define LONG_MIN INT32_MIN
#endif
+#if LIBXML_VERSION < 20618
+#define xmlDictCleanup() /* function doesn't exist in older API */
+#endif
import junit.framework.TestCase;
import java.util.Set;
import java.util.HashSet;
public class EditDistanceTester extends TestCase {
private void checkEditDistance(String str1, String str2, int d, String[] transforms) {
assertEquals(d, EditDistance.getEditCost(str1, str2));
HashSet<String> transformSet = new HashSet<String>();
for(String t : transforms) {
diff --git a/railties/guides/source/rails_on_rack.textile b/railties/guides/sour
index eaebb05..c40fcf1 100644
--- a/railties/guides/source/rails_on_rack.textile
+++ b/railties/guides/source/rails_on_rack.textile
@@ -2,7 +2,6 @@ h2. Rails on Rack
This guide covers Rails integration with Rack and interfacing with other Rack c
-* Create Rails Metal applications
* Use Rack Middlewares in your Rails applications
$(document).ready(function() {
$("a.item").click(function(e) {
$(this).addClass("invisible");
setTimeout((function(scope) {
return (function() {
return (function() {
$(this).appendTo(".viewport");
$(this).removeClass("invisible onTop");
$("a.item:first").addClass("onTop");
diff --git a/exercises/exponents_1.html b/exercises/exponents_1.html
index 70f4076..fdd8bf4 100644
--- a/exercises/exponents_1.html
+++ b/exercises/exponents_1.html
@@ -14,22 +14,16 @@
<div id="original" data-weight="3">
<div class="vars">
<var id="BASE">randRangeExclude( -10, 10, [0, 1, -1] )</var>
- <var id="BASE_STRING">BASE < 0 ? "(" + BASE + ")" : BASE</var>
+ <var id="BASE_STR">negParens( BASE )</var>
diff --git a/libavcodec/motionpixels_tablegen.h b/libavcodec/motionpixels_tablegen.h
index b56dec6..4b98530 100644
--- a/libavcodec/motionpixels_tablegen.h
+++ b/libavcodec/motionpixels_tablegen.h
@@ -30,7 +30,11 @@ typedef struct YuvPixel {
} YuvPixel;
static int mp_yuv_to_rgb(int y, int v, int u, int clip_rgb) {
- static const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
+ static uint8_t *cm = NULL;
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"],
extensions: ["tex2jax.js","MathMenu.js","MathZoom.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"],
Augment: {
Definitions: {
macros: {
lrsplit: "LRSplit"
}
<!DOCTYPE html>
<html data-require="math expressions">
<head>
<title>Writing Expressions 2</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<!--1. I am including all the comments here for logic
I also have 6 problem types which is a little excessive (4 is probably enough)
require 'sinatra'
require 'json'
require 'net/https'
USER = "KhanBugz"
PASS = ""
def gh_http
http = Net::HTTP.new("api.github.com", 443)
http.use_ssl = true
diff -r 7f333be583d6 exercises.py
--- a/exercises.py Fri Sep 02 14:25:23 2011 -0700
+++ b/exercises.py Sun Sep 04 19:26:16 2011 -0400
@@ -308,6 +308,7 @@
if problem_log.correct:
proficient = user_data.is_proficient_at(user_exercise.exercise)
+ explicitly_proficient = user_data.is_explicitly_proficient_at(user_exercise.exercise)
suggested = user_data.is_suggested(user_exercise.exercise)
problem_log.suggested = suggested