I decided to organize my life.
Google Calendar (calendar) and rememberthemilk.com (todo) should do the trick.
I was also able to suck the BYU calendars off there site. I had to do a little snooping to find the URL, but here it is...
http://byunews.byu.edu/calendar/icalmulti.aspx?month=11/23/2007&alumni=false&type=academic
Wednesday, November 28, 2007
Wednesday, October 24, 2007
Search and Replace
Search and Replace (and destroy!) for file in *.*; do sed 's/Procedures.html/Procedures.php/g' $file > tmp.$file; [ -s tmp.$file ] && mv tmp.$file $file; done
Or superior:
find ./ -type f -exec sed -i ’s/string1/string2/’ {} \;
Or superior:
find ./ -type f -exec sed -i ’s/string1/string2/’ {} \;
Thursday, August 23, 2007
Cougareat Fusion
In case my work gets somehow lost or deleted....
- I created a custom content containing the certifications for each of the restaurants: Scoreboard, Teriyaki, Subway, etc....
- I clicked the checkbox indicating use in NodeProfile
- I created a relation in NodeFamily (I'm unsure of the need for this)
- Create a view for user
- Created a view for teriyaki certs
- then used views fusion to join
Monday, July 23, 2007
Druapl Mania
I'm working on getting Drupal to work as a CMS for BYU. I've learned a lot in the last few weeks of work. Right now I'm working on the menuing system. We want drop down menus. I built one from scratch using the yui, but alas, it wasn't cross-browser compatible, which really stinks. So now I'm trying out using yui's menu class as the base. I'm over-ridding some of Drupal's themeing functions to get it to work. Here's what I have so far:
/**
* Generate the HTML for a menu tree.
*
* @param $pid
* The parent id of the menu.
*
* @ingroup themeable
*/
function byu1_menu_tree($pid = 1, $level = 0) {
if ($tree = byu1_menu_tree_improved($pid, $level)) {
return "\n\n\n\n";\n". $tree ."\n
\n
}
}
/**
* Returns a rendered menu tree.
*
* @param $pid
* The parent id of the menu.
*/
function byu1_menu_tree_improved($pid = 1, $level = 0) {
$menu = menu_get_menu();
$output = '';
if (isset($menu['visible'][$pid]) && $menu['visible'][$pid]['children']) {
$num_children = count($menu['visible'][$pid]['children']);
for ($i=0; $i < $num_children; ++$i) { $i == 0 ? $level++ : ''; $mid = $menu['visible'][$pid]['children'][$i]; $type = isset($menu['visible'][$mid]['type']) ? $menu['visible'][$mid]['type'] : NULL; $children = isset($menu['visible'][$mid]['children']) ? $menu['visible'][$mid]['children'] : NULL; $extraclass = $i == 0 ? 'first' : ($i == $num_children-1 ? 'last' : ''); $output .= theme('menu_item', $mid, menu_in_active_trail($mid) || ($type & MENU_EXPANDED) ? theme('menu_tree', $mid, $level) : '', count($children) == 0, $extraclass, $level); $i == $num_children - 1 ? $level-- : ''; } } return $output; } /** * Generate the HTML output for a single menu item. * * @param $mid * The menu id of the item. * @param $children * A string containing any rendered child items of this menu. * @param $leaf * A boolean indicating whether this menu item is a leaf. * * @ingroup themeable */ function byu1_menu_item($mid, $children = '', $leaf = TRUE, $extraclass = '', $level) { return ''. menu_item_link($mid, TRUE, $extraclass) . $children ." \n";
}
Thursday, July 19, 2007
Cannot Find NoniGPSPlot
I was getting the "cannot find NoniGPSPlot" error on the mio. It was remedied by downloading http://hautil.free.fr/bm/PackDll2006.zip and placing it's contents in the program's folder.
Tuesday, June 26, 2007
Inheritance
Say you have an Employee "class" and a Manager "class" (which will inherit from Employee). First, create a constructor function with the definition of the employee, and likewise for the Manager. To create the inheritance link, set the prototype property of the Manger's constructor function to an employee object:
function Manager () {
this.reports = [];
}
Manager.prototype = new Employee;
Javascript Object Constructors
A constructor is a function that you intend to use to create objects. In the following example, car is the constructor and mycar is the object:
function car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
mycar = new car("Eagle", "Talon TSi", 1993);
Subscribe to:
Posts (Atom)