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
@implementation UITabBar (CustomImage) | |
- (void)drawRect:(CGRect)rect{ | |
[super drawRect:rect]; | |
UIImage *image = [UIImage imageNamed:@"TabBar.png"]; | |
[image drawInRect:rect]; | |
} | |
@end |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Page Title</title> | |
<script type="text/javascript" charset="utf-8" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ |
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
NSManagedObjectContext *managedObjectContext = [(AppDelegate_Shared*)[UIApplication sharedApplication].delegate managedObjectContext]; | |
NSFetchRequest *request = [[NSFetchRequest alloc] init]; | |
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Log" inManagedObjectContext:managedObjectContext]; | |
[request setEntity:entity]; | |
// Specify that the request should return dictionaries. | |
[request setResultType:NSDictionaryResultType]; | |
// Create an expression for the key path. |
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
processor : 0 | |
vendor_id : AuthenticAMD | |
cpu family : 15 | |
model : 37 | |
model name : AMD Opteron(tm) Processor 246 | |
stepping : 1 | |
cpu MHz : 2010.241 | |
cache size : 1024 KB | |
fpu : yes | |
fpu_exception : yes |
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
git clone git://github.com/ry/node.git | |
cd node | |
./configure | |
make | |
sudo make install |
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
grep '2010-02-17' error.log |
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
require 'rubygems' | |
require 'active_record' | |
require 'robots' | |
dbconfig = YAML::load(File.open("db.yml")) | |
ActiveRecord::Base.establish_connection(dbconfig) | |
ActiveRecord::Base.logger = Logger.new(STDERR) | |
class DomainName < ActiveRecord::Base | |
end |
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
public function postUpdate($event) | |
{ | |
$profile = Zend_Registry::getInstance()->get("role"); | |
$currentRecord = $this->getTable()->find($event->getInvoker()->id); | |
$profile->steps = $profile->steps - $currentRecord->steps + | |
$event->getInvoker()->steps; | |
$profile->save(); | |
} | |
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
public function findLeadersBySchool($schoolId = 1, $limit = 3) | |
{ | |
return $this->findLeadersBaseQuery() | |
->leftJoin('u.Assignment_Assignee a ON u.id = a.assigned_entity_id ') | |
->addWhere('a.assigned_entity_type = ?', User_Model_Student::ENTITY_TYPE) | |
->addWhere('a.assignee_entity_type = ?', Plan_Model_Classroom::ENTITY_TYPE) | |
->addWhere('a.assignee_entity_id = ?', $schoolId) | |
//->limit($limit) | |
->execute(); | |
} |