Skip to content

Instantly share code, notes, and snippets.

View sfentress's full-sized avatar

Sam Fentress sfentress

  • Concord Consortium
View GitHub Profile
@sfentress
sfentress / NetLogoEmbedTest.java
Created December 8, 2008 16:54
NetLogo 4.1pre6 Embedding Test
package org.concord.otrunknl4.test;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.io.IOException;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import org.nlogo.app.InterfaceComponent;
/**
* This test was created to test out the new features in NetLogo 4.1 pre 6. Specifically, it
* was designed to test embedding, controlling and logging of applet-like NetLogo models.
*
* @author sfentress
*
*/
public class NetLogoLogTest
{
dhcp155:rigse sfentress$ jruby -S gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.3
- RUBY VERSION: 1.8.6 (2009-05-19 patchlevel 287) [java]
- INSTALLATION DIRECTORY: /Users/sfentress/git/jruby/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /Users/sfentress/git/jruby/bin/jruby
- EXECUTABLE DIRECTORY: /Users/sfentress/git/jruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-java-1.5
load('./spec/support/env.rhino.js')
load('./spec/support/jquery.js')
load('./spec/lib/jspec.js')
load('./spec/lib/jspec.xhr.js')
load('./spec/lib/jspec.jquery.js')
load('lib/etorki.js')
load('spec/unit/spec.helper.js')
function reporter(results, options) {
var w = new java.io.FileWriter('test-reports/jspec.xml');
textView: SC.ScrollView.design({
hasHorizontalScroller: NO,
layout: { left: 0, top: 0, right: 0, height: 180 },
contentView: SC.LabelView.design({
layout: { left: 0, top: 0, right: 0, bottom: 0 },
isEditable: NO,
escapeHTML: NO,
valueBinding: 'Geniverse.articleController.combinedArticle',
// only check after user flips back to static (non-editing) view
import java.io.*;
import java.net.*;
import javax.swing.*;
import org.nlogo.lite.InterfaceComponent;
/**
* This is an example which tries to load a model from a URL, using InterfaceComponent.openFromSource().
* This model will fail to work correctly because it references an image that it cannot find.
*
<?php
if($_REQUEST['qucs'] || $_REQUEST['spice']) {
//if (false) {
$path = '/usr/local/bin';
if ($_REQUEST['qucs']) {
$data = str_replace('\\', '', $_REQUEST['qucs']) . "\n";
$command = $path . '/qucsator';
} else if ($_REQUEST['spice']){
# run this apache instance with:
# apachectl -f "`pwd`/proxy/apache.conf" -k start
# shutdown the server with:
# apachectl -f "`pwd`/proxy/apache.conf" -k stop
Listen 0.0.0.0:1234
LoadModule headers_module libexec/apache2/mod_headers.so
LoadModule dir_module libexec/apache2/mod_dir.so
LoadModule mime_module libexec/apache2/mod_mime.so
@sfentress
sfentress / raw-otml-snippit.xml
Created February 3, 2011 21:41
raw-otml-snippit.xml
<OTCompoundDoc local_id='xhtml_2'>
<bodyText><p>trying to add a raw otml embeddable after this ...</p></bodyText>
</OTCompoundDoc>
<OTMySpecialObject local_id='raw_otml_1'>
... and other stuff an author might paste in
</OTMySpecialObject>
<OTCompoundDoc local_id='tab_content_page_2' name='1'>
<bodyText>
<div id='content'>
<p class='page_title'>section (1)</p>
<?xml version:"1.0"?>
<methodCall>
<methodName>extapi.callWpMethod</methodName>
<params>
<param>
<value>
<string>rpc-admin</string>
</value>
</param>
<param>