Skip to content

Instantly share code, notes, and snippets.

Paul Scott icio

Block or report user

Report or block icio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:573794
!ENTRY org.eclipse.ui 4 4 2010-09-10 15:43:00.865
!MESSAGE Exception in org.eclipse.ui.internal.PageLayout.addView: org.eclipse.ui.PartInitException: Could not create view: net.refractions.udig.project.ui.layerManager
org.eclipse.ui.PartInitException: Could not create view: net.refractions.udig.project.ui.layerManager
at org.eclipse.ui.internal.ViewFactory.createView(
at org.eclipse.ui.internal.LayoutHelper.createView(
at org.eclipse.ui.internal.PageLayout.createView(
at org.eclipse.ui.internal.PageLayout.addView(
at org.eclipse.ui.internal.PageLayout.addView(
View gist:720026
function spanChars(e)
if (!e) e = document.body;
// Replace the text node with a span for each letter it consists of
if (e.nodeType == document.TEXT_NODE)
var text = e.nodeValue;
for (var c = 0; c < text.length; c++)
icio / gist:729309
Created Dec 5, 2010
View gist:729309
* The largest prime factor
* The provided number is not considered a factor of itself.
* @param int $n The number we wish to find a factor of
icio / gist:766327
Created Jan 5, 2011
View gist:766327
* Add each directory within ./application to the include path so that each file
* is easily accessible.
function include_subdirectories_in_path()
global $paths;
$paths = array('application');
View gist:802351
function bad (foo) {
if ( ! (foo instanceof Bar) ) {
throw new TypeError("This is an annoying restriction!");
return foo.baz(foo.quux(10));
function good (foo) {
if ( !foo.baz || !foo.quux ) {
throw new TypeError("We need foo to have baz and quux methods.");
icio / gist:826934
Created Feb 15, 2011
View gist:826934
- Example usage of Raphael.el.wave
- Produces:
var paper;
View gist:834328
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.ui.Keyboard;
public class Main extends Sprite
icio / gist:848120
Created Feb 28, 2011
Newton-Raphson in R
View gist:848120
#| Using the Newton-Raphson Method, find the root of
#| the function f (with derivative fdx) near the
#| point x (with tolerance e [solution x has abs f(x) < e]
#| and within a limit of 1000 steps)
newtonRaphson <- function(x, f, fdx, e = 0.001, maxSteps = 1000)
step = 0;
while (abs(x) > e && step < maxSteps)
icio / manifest.json
Created Mar 17, 2011
Chrome extension to list all tab locations and copy them to the clipboard
View manifest.json
"name": "Open URL Collector",
"version": "1.0",
"description": "Creates a list of the URLs of open tabs.",
"browser_action": {
"default_icon": "famfamfam_silk_cut_tab.png",
"popup": "popup.html"
"permissions": ["tabs"]
icio / get_prime.php
Created Mar 22, 2011
N-th Prime Numbers
View get_prime.php
* A method for finding n-th prime numbers. Usage example follows at the end.
* @author Paul Scott <>
* Calculate the n-th prime number(s).
You can’t perform that action at this time.