Skip to content

Instantly share code, notes, and snippets.

@ChrisLundquist
ChrisLundquist / gist:752273
Created December 22, 2010 23:17
inheritance test
#include <iostream>
class Physics
{
public:
void Update() { std::cout << "Physics!"; }
};
class Graphics
{
@ChrisLundquist
ChrisLundquist / magicka.lua
Created January 29, 2011 04:32
Magicka G15 script / macro
-- To use this script
-- 1) copy and paste this body into the script editor window and save it.
-- 2) Set each G Key in each M mode (that you want to use) to "script"
-- NOTE: Only G1 - G6 are configured since I am using the orange G15,
-- Extending this to 18 is just copy and paste.
-- If you are trying to record macros and they are not working, make sure you have
-- the record delay checkbox checked, however I find this script works better and
-- is more flexible than recording each macro by hand and adjusting the delay.
// Lab 2
// Jeff Heesch
// 10/5/11
// Purpose: To perform mathematical operations on two numbers
#include <iostream>
#include <cmath>
using namespace std;
int main()
#include <stdio>
int main()
{
for(int y = 1; y <= 50; y++){
for(int x = 1; x <= 3; x++){
std::cout << y*x << ","
}
std::cout << std::endl;
}
return 0;
@ChrisLundquist
ChrisLundquist / Week05Assig
Created February 5, 2012 19:30
Hadossa Oudean's Week05 Assignment
/*This program was created by Hadossa Oudean.*/
import java.io.*;
import javax.swing.*;
public class Week05 {
static File select;
static String path;
static boolean okay;
static boolean foundIt;
@ChrisLundquist
ChrisLundquist / iptc test
Created February 26, 2012 21:06
test for collectd dependency
/* gcc test.c -liptc -o a.out */
/* libiptc must be root to run since it maps kernel stuff, otherwise it segfaults */
#include <libiptc/libiptc.h> /* ip_t* */
int main(int argc, char** argv){
struct iptc_handle *handle = NULL;
handle = iptc_init("filter");
iptc_free(handle);
return 0;
}
This test works on Ruby 1.8.7, but blows up on ruby 1.9.2p318
< Some Test Fails >
wrong number of arguments (2 for 0)
< Path Snip >/gems/activesupport-2.3.14/lib/active_support/ordered_hash.rb:16:in `block in to_yaml'
<The offending line>
out.seq(taguri, to_yaml_style) do |seq|
fails because it is called from
// Require Package
public class Assignment1 {
public static void main(String[] argv){
// get package count
// packages = array of packages
// cost = 0;
public class Package {
private double Height, Length, Width, weight;
private bool air = false;
public double Height
{
get { return Height; }
set { Height = value; }
}
public double Length
public void SavingFile()
{
StreamWriter writer = new StreamWriter("books.txt");
foreach (Book book in books)
{
writer.WriteLine(book.ToString());
}
}