Skip to content

Instantly share code, notes, and snippets.

(function (a) {
a.browserTest = function (e, g) {
var f = "unknown",
d = "X",
b = function (k, j) {
for (var c = 0; c < j.length; c = c + 1) {
k = k.replace(j[c][0], j[c][1])
}
return k
},
(import '(winterwell.jtwitter Twitter))
(defn connect-to-twitter []
(let [twitter (new Twitter "lazycoder" "NotMyRealPassword")]
(do (println "Connecting to Twitter"))
(do (println (. twitter (getStatus "lazycoder"))))
twitter)
)
(do (connect-to-twitter))
var foo = {
buttonHandler: function(e) {
if(foo.AjaxState == "Executing") {
foo.AjaxSuccessCallback = function() {foo.buttonHandler.call(e);};
} else {
//button handler code goes here
}
},
MakeAjaxCall: function() {
foo.AjaxState = "Executing";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Let Me Bing That For You</title>
<style type="text/css">
body {
font-family:Arial,Helvetica,Sans-Serif;
font-size:small;
# == About camping.rb
#
# Camping comes with two versions of its source code. The code contained in
# lib/camping.rb is compressed, stripped of whitespace, using compact algorithms
# to keep it tight. The unspoken rule is that camping.rb should be flowed with
# no more than 80 characters per line and must not exceed four kilobytes.
#
# On the other hand, lib/camping-unabridged.rb contains the same code, laid out
# nicely with piles of documentation everywhere. This documentation is entirely
namespace Company.Internal.FunctionalTests.PPM.Selenium.GanttTests
{
[TestClass]
public class GanttChartTests
{
[TestMethod]
public void should_load_with_no_tasks_except_the_default_blank_task()
{
var ganttChart = GanttTest.NewTest
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace CodeSamplesForArena.net
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
namespace CodeSamplesForArena.net
{
class Program
{
static void Main(string[] args)
{
// Before and after refactoring
//
// Before
//
function showMessage(result)
{
if (result == Success ) {
$('#Success').show();
public class New
{
private iFoo _Foo;
public string PropertyName { get; set; }
public string PropertyValue { get; set; }
public New(iFoo foo) : this(foo, string.Empty){}
public New(iFoo foo, string propertyName) : this(foo, propertyName, string.Empty) { }
public New(iFoo foo,string propertyName, string propertyValue)