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
| (ns blog.server | |
| (:import org.joda.time.DateTime) | |
| (:gen-class) | |
| (:require [ring.util.response :as ring-res] [ring.middleware.reload :as reload] [ring.middleware.stacktrace :as strace] | |
| [ring.adapter.jetty :as ring-jet] [ring.middleware.file :as rfile] [ring.middleware.file-info :as rfile-info] | |
| [compojure.route :as route] [blog.view.layout :as layout] | |
| ) | |
| (:use | |
| (compojure core) | |
| (blog.persistency couchdb) |
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
| <script type="text/javascript">//<![CDATA[ | |
| var gaJsHost = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.'); | |
| document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
| //]]></script>] | |
| <script type="text/javascript">//<![CDATA[ | |
| try { | |
| var pageTracker = _gat._getTracker('UA-3291642-5'); | |
| pageTracker._trackPageview(); | |
| } catch(err) {} | |
| //]]></script> |
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
| class SpeculationDTO { | |
| private int value1; | |
| private double value2; | |
| } | |
| def xml = """ |
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
| require 'yaml' | |
| require 'ostruct' | |
| require 'xmlrpc/client' | |
| require "cgi" | |
| key = "34af1ea48bef1d5ed090" | |
| server = XMLRPC::Client.new( "snipplr.com", "/xml-rpc.php") | |
| server.call("user.checkkey", key) | |
| hashes = server.call("snippet.list",key) |
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
| /* | |
| * Copyright 2007-2009 the original author or authors. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. |
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
| public <T> String toAmf(final T source) throws IOException { | |
| final StringBuffer buffer = new StringBuffer(); | |
| final ByteArrayOutputStream bout = new ByteArrayOutputStream(); | |
| final Provider<SerializationContext> provider = new SerializationContextProvider();// creating the provider | |
| final Amf3Output amf3Output = new Amf3Output(provider.get());// creating the context instance | |
| amf3Output.setOutputStream(bout); | |
| amf3Output.writeObject(source); | |
| amf3Output.flush(); | |
| amf3Output.close(); | |
| final BASE64Encoder encoder = new BASE64Encoder(); |
NewerOlder