You start with this:
And must end up with this:
import java.net.InetSocketAddress | |
import scala.xml.{Elem, XML} | |
import org.jboss.netty.buffer.ChannelBuffers | |
import org.jboss.netty.util.CharsetUtil.UTF_8 | |
import com.twitter.finagle.Service; | |
import com.twitter.finagle.builder.ClientBuilder; | |
import com.twitter.finagle.http.{Http, RequestBuilder}; | |
import org.jboss.netty.handler.codec.http._ | |
import org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer | |
import java.net.URL |
(def f (fn x[i] (if (set? (first i)) (if (not-empty (apply intersection (map x i))) "duplicates!" (apply union (map x i))) i))) |
; FILE type for i/o using stdio | |
%struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } | |
%struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } | |
@.read_mode = private constant [3 x i8] c"rb\00", align 1 | |
declare i32 @fgetc(%struct.FILE* nocapture) nounwind | |
declare i32 @feof(%struct.FILE* nocapture) nounwind |
import itertools | |
import math | |
skew(0.0, 0.0) | |
stroke(0.3, 0.3, 0.3, 1.0) | |
class ConcentricCircle(object): | |
def __init__(self, x, y, radius, qty, attraction, width): | |
self.x = x | |
self.y = y |
from calendar import HTMLCalendar | |
from datetime import date | |
from itertools import groupby | |
from django.utils.html import conditional_escape as esc | |
from django.template.loader import get_template | |
from django.template import Context | |
class WorkoutCalendar(HTMLCalendar): |
diff --git a/src/main/scala/dispatch/Json.scala b/src/main/scala/dispatch/Json.scala | |
index 776da7b..14ef7e9 100644 | |
--- a/src/main/scala/dispatch/Json.scala | |
+++ b/src/main/scala/dispatch/Json.scala | |
@@ -123,7 +123,7 @@ object JsValue { | |
def toJson(x: JsValue): String = x match { | |
case JsNull => "null" | |
case JsBoolean(b) => b.toString | |
- case JsString(s) => "\"" + s + "\"" | |
+ case JsString(s) => "\"" + s.replaceAll("\\\\", "\\\\\\\\").replaceAll("\\\"", "\\\\\"") + "\"" |