This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name VanthiaBot | |
// @namespace http://richardcarter.org/ | |
// @include http://87.239.219.99/ | |
// ==/UserScript== | |
var allMonstersDead = function () { | |
var actionbar = unsafeWindow.document.getElementById("actionbar"); | |
return (actionbar.style.display == "none"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A simple, non-optimizing brainfuck to C translator. | |
* 2010-08-31 - Version 1.0 (Cory Burgett) | |
* | |
* This code is hereby placed into the public domain. | |
* | |
* Originally located at: http://www4.ncsu.edu/~cmburget/brainfucc.c | |
*/ | |
#include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.InputStreamReader; | |
import java.net.InetAddress; | |
import java.net.UnknownHostException; | |
public class CompetitionEntry { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all; | |
% load the "MLtraining" matrix | |
load('Examtraining.mat'); | |
% movies.dat: replace :: with @ | |
tic; | |
movies_dat = fopen('movies.dat'); | |
movies = textscan(movies_dat, '%d %s %s', 'delimiter', '@'); | |
[m_ids m_names m_genres] = movies{:}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2010 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This program proves that expressions are evaluated left to right; assignment | |
* statements, therefore, are evaluated left-to-right on the right side of the | |
* equals sign (since that's just an expression) and then assigned to the | |
* thing to the left of the equals sign. | |
* | |
* So when a professor tells you that assignment statements are evaluated | |
* right-to-left, it doesn't mean each symbol in the statement is evaluated | |
* in the order from right to left, just that the stuff on the right is assigned |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Douglas Crockford | |
Sr. JavaScript Architect, Yahoo! | |
JavaScript Programming Style & Your Brain | |
He made JSLint | |
Prefer forms that are error resistant and more reliable | |
return | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by configure, which was | |
generated by GNU Autoconf 2.68. Invocation command line was | |
$ ./configure CFLAGS=-bundle -arch i386 -arch x86_64 CXXFLAGS=-bundle -arch i386 -arch x86_64 | |
## --------- ## | |
## Platform. ## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// spinningsquare.c | |
// compiles on OSX with: | |
// gcc spinningsquare.c -framework glut -framework opengl -o spinningsquare | |
#include <stdlib.h> | |
#ifdef __APPLE__ | |
# include <GLUT/glut.h> | |
#else | |
# include <GL/glut.h> | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var projector = new THREE.Projector(); | |
var ray = projector.pickingRay( mouseCoord, camera ); // (mouse coord are in screenspace and must be [-1, 1]) | |
var objects = ray.intersectObjects( scene.children ); | |
if( objects.length ) | |
{ | |
objects[ 0 ].object; // THREE.Particule or THREE.Mesh | |
objects[ 0 ].face; // THREE.Face3 or THREE.Face4 (is .object is a Mesh | |
objects[ 0 ].point; // THREE.Vector3 | |
} |
OlderNewer