Skip to content

Instantly share code, notes, and snippets.

diff -r c07cda5335f1 tg/dottednamesupport.py
--- a/tg/dottednamesupport.py Sun Nov 29 14:41:33 2009 -0700
+++ b/tg/dottednamesupport.py Fri Jan 08 10:03:10 2010 -0600
@@ -59,16 +59,23 @@
"""
if uri.startswith('local:'):
- uri = uri.replace('local:', tg.config['pylons.package']+'.')
+ package = tg.config['pylons.package']
+ if relativeto:
10:31:10 AM Christopher Brown: You ever looked at the staff member stuff?
10:31:23 AM mvp-devs: Lee McFadden: no, i haven't.
10:32:59 AM Christopher Brown: Right now it's not very DRY, and I wanted to see what you guys thought of refactoring it.
10:33:09 AM mvp-devs: Lee McFadden: need another set of eyes on the code for something?
10:33:11 AM mvp-devs: Lee McFadden: ah.
10:33:48 AM Christopher Brown: Replace TeamStaff, ContestStaff, VenueStaff (and I think there's one other XStaff) with StaffPosition, which has a many to many on Resource.
10:34:07 AM Christopher Brown: Team, Contest, Venue are all Resources.
10:34:27 AM mvp-devs: Lee McFadden: that sounds pretty logical to me
10:35:04 AM Christopher Brown: Right now TeamStaff has a team_id field, Contest the same, Venue has a many2many on venues.
10:35:33 AM mvp-devs: Lee McFadden: would have to ask CP though for a definitive answer. it's more of a judgement call really. If refactoring is going to be a major benefit in flexibility then I say go for it.
#441 - 1 hr -
#445 - 20 hr - Large (new module). Need to discuss extensively before diving in.
#577 - 2 hr - 1/2 done. Other half will be quick.
#556 - XX hr - This needs a lot of explanation. Is the whole stats system going to be user configurable. This could be a huge ordeal in that case.
#422 - 2 hr - In place, need configurable settings to get around in tests / sites that don't want it.
#439 - 4 hr
#456 - 2 hr - Just like staff position checking but on a different model. Easy. Low priority -- I resurrected the ticket from a dontfix.
<h1>Resource</h1>
${tab_nav()}
<div id="content">
<div class="header-with-controls">
<h1>Resources <!-- filter / whatever goes inside the h1 --></h1>
</div>
<ol class="controls">
<li><!-- whatever control --></li>
<!-- more controls -->
</ol>
======================================================================
ERROR: mvp.testdemo.tests.test_model.test_school.TestSchoolPeriodStudentCount.test_exception_when_creating_duplicate
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/chbrown/work/mvp21/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/case.py", line 367, in tearDown
try_run(self.inst, ('teardown', 'tearDown'))
File "/Users/chbrown/work/mvp21/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/util.py", line 487, in try_run
return func()
File "/Users/chbrown/work/mvp21/mvp2.1/mvp.testdemo/mvp/testdemo/tests/test_model/test_school.py", line 152, in teardown
self.session.commit()
def prepare(self):
if not self.value or not self.value['end_datetime']:
self.children.end_datetime.value = datetime.now() + timedelta(hours=1)
self.children.program_owners.options = DBSession.query(ProgramOwner.program_owner_id, ProgramOwner.name).all()
self.children.venues.options = DBSession.query(Venue.venue_id, Venue.name).all()
self.children.users.options = [(u.user_id, u.fullname) for u in DBSession.query(User)]
# THIS PART -v
validatables = [self.children.program_owners, self.children.venues, self.children.users]
#!/usr/bin/env ruby
require ENV['TM_SUPPORT_PATH'] + '/lib/ui'
lines = STDIN.readlines()
selected_text = ENV.member?("TM_SELECTED_TEXT")
block_top = 1
block_bottom = lines.length
// Creating an array of objects.
Mover[] movers = new Mover[20];
void setup() {
size(200,200);
smooth();
background(255);
// Initializing all the elements of the array
for (int i = 0; i < movers.length; i++) {
movers[i] = new Mover();
UseCSSTransforms = false;
ShowPivots = false;
M = {
rotation : function(rotation) {
return CanvasSupport.tRotationMatrix(rotation)
},
scaling : function(x, y) {
return CanvasSupport.tScalingMatrix(x, y)
@chbrown
chbrown / wait_list
Created July 1, 2011 00:11
Wait function for reading files async.
function wait(count, callback) {
return function() {
if (--count === 0) {
callback();
}
}
}
var list_of_files = ['a', 'b', 'c'];
var report = wait(list_of_files.length, function() {