Skip to content

Instantly share code, notes, and snippets.

View pjmagee's full-sized avatar
🌐
I may be slow to respond.

Patrick Magee pjmagee

🌐
I may be slow to respond.
View GitHub Profile
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketAddress;
import java.net.SocketTimeoutException;
import java.util.Arrays;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
using System;
using System.Collections.Generic;
using System.IO;
using DocSearch.Util;
namespace DocSearch.Query.Impl
{
public class QueryInterpreter : IQueryInterpreter
{
private IEnumerable<string> _terms;
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">>
<xsl:output method="html" version="4.0"/>
<xsl:template match="/lecturers">
<!-- XSLT and Literal Result Elements -->
<html>
<head>
<title>Lecturers</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:math="http://www.exslt.org/math">
<xsl:output method="html" version="4.0"/>
<xsl:template match="/">
<!-- XSLT and Literal Result Elements -->
<html>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="name">
<xs:complexType>
<xs:simpleContent>
<xs:extention base="xs:string">
<xs:attribute name="title" type="xs:string" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Professor" />
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="name">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="title" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Professor" />
<?xml version="1.0" encoding="us-ascii"?>
<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Kristin Laughlin (Pixal) -->
<!-- document type declaration follows -->
<!DOCTYPE Customers [
<!ELEMENT Customers (Customer+)>
<!ELEMENT Customer (Name, Addresses, Phone, E-mail?, Orders)>
<!ATTLIST Customer
CustID ID #REQUIRED
CustType (home | business) #IMPLIED
>
<!ELEMENT people (lecturers, students)>
<!ELEMENT lecturers (lecturer+)>
<!ELEMENT students (student+)>
<!ELEMENT student (name, study, hobby)>
<!ELEMENT study (course+)>
<!ELEMENT hobby (#PCDATA)>
<!ELEMENT lecturer (name, teaching, research)>
<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE people SYSTEM "people.dtd">
<people>
<staff:lecturers>
<lecturer>
<name title="Professor" first="Peter" last="Quirk" />
<teaching>
<course code="CO3070">XML and the Web</course>
<course code="CO3300">Web Server Architectures</course>
@pjmagee
pjmagee / gist:4356836
Created December 22, 2012 00:48
Creo6
protected static byte[] buildBaselineCREO6(Player player)
throws IOException {
int[] iCurrentHam = player.getCurrentHam();
int[] iMaxHam = player.getMaxHam();
int[] hamMods = player.getHamModifiers();
if (hamMods == null) {
hamMods = new int[iMaxHam.length];
for (int i = 0; i < hamMods.length; i++) {
hamMods[i] = 0;