Skip to content

Instantly share code, notes, and snippets.

View gist:8490745
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
View d3lib.md

chartFactory

/affini-tech/ChartFactory

Based on D3.JS and Dimple, ChartFactory provide the ability to build quickly D3.JS charts without coding any lines of javascript. Just define your dashboard in a JSON and voila !

charts: [
        {id:'chart1',
         width:800,height:250,
         xAxis:{type:'Category',field: "Month",orderRule:'Date'},
View nodeEvents2.js
var util = require('util'),
eventEmitter = require('events').EventEmitter,
fs = require('fs');
function inputChecker(name, file) {
this.name = name;
this.writeStream = fs.createWriteStream('./'+ file + ".txt",
{
'flags': 'a',
'encoding': 'utf8',
View FSMExample.scala
package examples
import akka.actor._
import scala.concurrent.duration._
import scala.collection.immutable
// Master case classes
case object Start
@vire
vire / Speedometer.scala
Created May 14, 2013
Downloader + Parser implementation
View Speedometer.scala
package com.czechscala.blank
import com.gargoylesoftware.htmlunit.WebClient
import com.gargoylesoftware.htmlunit.html.HtmlPage
object Speedometer extends App {
val downloader = new HttpDownloader("http://www.dsl.sk/speedmeter.php?id=speed_test")
println (downloader.download())
}
You can’t perform that action at this time.