Skip to content

Instantly share code, notes, and snippets.

View smiler's full-sized avatar

Christian Axelsson smiler

  • Uppsala, Sweden
View GitHub Profile
(**************************************************************************
* File : mir.sml
* Project : ML IRC Robot
* Author : Christian Axelsson
* Created : 2006-01-23
* Description : An IRC robot written in SML (with Moscow ML extensions)
**************************************************************************)
val _ = app load ["Socket", "Byte", "Date"];
(* event
This represent all events that can be triggerd. Note than some events may
require 'net/http'
require 'rexml/document'
url = URI.parse('http://api.eve-online.comu')
begin
request = Net::HTTP.start(url.host, url.port) { |http|
http.get('/Server/ServerStatus.xml.aspx')
}
rescue => ex
puts "Failed to connect to API server: #{ex.message}"
require 'net/http'
require 'rexml/document'
class EveOnline < Plugin
def on_load()
@triggers = Hash[".tq" => "get_tq_status"]
end
def name
"EVE Online server status v0.1"
# -*- coding: utf-8 -*-
class Plugin
attr_reader :triggers
attr_reader :hooks
def self.subclasses()
classes = []
ObjectSpace.each_object(Class) do |c|
next unless c.ancestors.include?(self) and (c != self)
select c.channel
from channels c
where c.id in (select ct.channelid
from channel_tags ct
join tags t on ct.tagid = t.id
where t.tag = 'tag 1')
and c.id in (select ct.channelid
from channel_tags ct
join tags t on ct.tagid = t.id
where t.tag = 'tag 2')
-- Model at http://i.imgur.com/kuxy2.png
-- Find all channels that have tags 'tag 1' and 'tag 2'
select c.channel
from channels c
where c.id in (select ct.channelid
from channel_tags ct
join tags t on ct.tagid = t.id
where t.tag = 'tag 1')
// Booking tooltip logic
overlay.tooltip({
track: true,
delay: 300,
top: 15,
left: 15,
showBody: false,
bodyHandler: function () {
return function generateTooltipBody(person, booking) {
var startTime = booking.StartTime.getComponents();
_,-%/%|
_,-' \//%\
_,-' \%/|%
/ / ) __,-- /%\
\__/_,-'%(% ; %)%
%\%, %\
This is a multi-part message in MIME format.
------=_NextPart_000_00A6_01CC7796.0BF33630
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hej,
M=E5nadsomst=E4llningen =E4r klar och Primula har startat igen
private enum CountryGroup_Balticum
{
Estonia,
Latvia,
Lithuania
}
public static List<int> getCountryIDsForBaltStates(ListItemCollection countries)
{
List<int> countryIDs = new List<int>();