This file contains 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
// | |
// ILViewController.h | |
// ILViewController | |
// | |
// Created by ∞ on 07/04/10. | |
// | |
// The contents of this file are in the public domain. | |
#import <UIKit/UIKit.h> |
This file contains 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
// | |
// MvrInertia.h | |
// Mover-iPad | |
// | |
// Created by ∞ on 30/03/10. | |
// Copyright 2010 __MyCompanyName__. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
This file contains 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
// somethign in here is broken | |
- (void)layoutSubviews { | |
[super layoutSubviews]; | |
self.textLabel.frame = CGRectInset(self.contentView.bounds, kHPadding, kVPadding); | |
BrandTableItem* item = self.object; |
This file contains 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
#!/usr/bin/env ruby | |
STDIN.read.each do |line| | |
line.sub!(/^(\t+)/) { |c| ' ' * c.length } | |
line.sub!(/(\s+)$/, "\n") | |
puts line | |
end |
This file contains 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
class Time | |
def to_js # to javascript, ie: "2007-06-09T14:23:11+0000", usage: new Date("<%= Time.now.to_js %>") | |
self.strftime("%Y-%m-%dT%H:%M:%S") | |
end | |
end |
This file contains 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
import java.util.ArrayList; | |
import org.apache.mahout.classifier.sgd.AdaptiveLogisticRegression; | |
import org.apache.mahout.classifier.sgd.L1; | |
import org.apache.mahout.classifier.sgd.L2; | |
import org.apache.mahout.classifier.sgd.OnlineLogisticRegression; | |
import org.apache.mahout.math.RandomAccessSparseVector; | |
import org.apache.mahout.math.Vector; | |
import org.apache.mahout.vectorizer.encoders.TextValueEncoder; |
This file contains 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
convert -density 150 -quality 100 -resize 800x "file.pdf" "result.jpg" |
This file contains 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
From guy I worked with: | |
http://www.felixbruns.de/iPod/firmware/ | |
“You can’t downgrade to iOS4.0 once you’ve upgraded to iOS4.1 so be careful.” |
This file contains 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
SVN repository backup and restore | |
Simplest way to backup & restore SVN repository: | |
SVN backup: | |
svnadmin dump "C:\SvnData\MyProject" > "C:\BackupMyProject.dump" | |
SVN restore (to new empty repository): | |
svnadmin load "C:\SvnData\MyProject2" < "C:\BackupMyProject.dump" | |
This file contains 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
// The presenting view controller method | |
- (void)showMyModal { | |
NSLog(@"is landscape : %d",UIInterfaceOrientationIsLandscape(self.interfaceOrientation)); // prints 'YES' | |
UIViewController* lvc = [[SampleViewController alloc] initWithNibName:nil bundle:nil]; | |
self.modalNavController =[[UINavigationController alloc] initWithRootViewController:lvc]; | |
self.modalNavController.modalPresentationStyle = UIModalPresentationFormSheet; | |
self.modalNavController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; |
OlderNewer