Skip to content

Instantly share code, notes, and snippets.

  • Change object values to protected from private
  • In second maze constructor with "String [] init" call this(w, h) instead of reimplementing it.
  • Remove braces from one line statements
[16:12:26] ILackNetbook: Also, I got a new app
[16:12:32] ILackNetbook: Dunno if anyone processed it yet
[16:14:39] ILackNetbook: Essentially they're a redditor and meet the bB requirements
[16:14:49] ILackNetbook: But they didnt get a chance to join
[16:15:13] ILackNetbook: He has a background to help us out
[16:15:41] ciferkey *cough*
[16:15:50] ILackNetbook: oh hey ciferkey
[16:15:56] ILackNetbook: Sorry, I missed that you were here
[16:16:02] ILackNetbook: Awesome :)
[16:16:11] ILackNetbook: Welcome to the team
#In r2/config/routing.py
def make_map(global_conf={}, app_conf={}):
#Some other routing location
mc('/submit', controller='front', action='submit')
#So I need to go to /r2/controllers/front.py and find the GET_submit method (by Pylons naming convention)
Firstly, to help I created three helper functions:
One that cleans up the maze (sets distance to zero, parent to null, and seen to false for all cells)
One that, given the distination with its parent field set to its parent (and that one set to its parent and so on),
create the array of path of QCells
One that given the coordinates of a cell, returns an array of its neighbors that are both open and unseen.
So then:
Create a queue.
Put the starting cell on it.
As long as there is a cell on the queue, loop such that
import cv
def inImage(comicName, faceName):
comic=cv.LoadImage(comicName, cv.CV_LOAD_IMAGE_COLOR)
face=cv.LoadImage(faceName, cv.CV_LOAD_IMAGE_COLOR)
W,H = cv.GetSize(comic)
w,h = cv.GetSize(face)
width = W - w + 1
/**
* ArrayBinaryTree implements the BinaryTreeADT interface using an array
*
* @author Dr. Lewis
* @author Dr. Chase
* @version 1.0, 8/19/08
*/
package jss2;
import java.util.Iterator;
import jss2.exceptions.*;
/**
* ArrayHeap provides an array implementation of a minheap.
*
* @author Dr. Lewis
* @author Dr. Chase
* @version 1.0, 9/9/2008
*/
package jss2;
import jss2.exceptions.*;
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, bgColor = "black"
, fgColor = "grey"
, position = Top
, lowerOnStart = True
, commands = [ Run Weather "EGPF" ["-t","<station>: <tempC>C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000
, Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
####################
# Starting tvnamer
Invalid filename: Cannot parse u'/Volumes/Shared/Shows/Code Geass/Season 2/Code Geass R2 Ep. 15.mkv'
Invalid filename: Cannot parse u'/Volumes/Shared/Shows/Code Geass/Season 1/Code Geass 09.mkv'
Invalid filename: Cannot parse u'/Volumes/Shared/Shows/Code Geass/Season 2/Code Geass R2 Ep. 22 - Emperor Lelouch.mkv
...
Usage: tvnamer [options] <files>
tvnamer: error: No valid files were supplied
error: failed to commit transaction (conflicting files)
libusb-compat: /usr/bin/libusb-config exists in filesystem
libusb-compat: /usr/include/usb.h exists in filesystem
libusb-compat: /usr/lib/libusb-0.1.so.4 exists in filesystem
libusb-compat: /usr/lib/libusb-0.1.so.4.4.4 exists in filesystem
libusb-compat: /usr/lib/libusb.a exists in filesystem
libusb-compat: /usr/lib/libusb.so exists in filesystem
libusb-compat: /usr/lib/pkgconfig/libusb.pc exists in filesystem