update 30.1.2012
- 42 R44
- 34 R22
- 8 EC135
- 5 Schweizer 269
- 4 BO105
- 4 MI2
- 3 EC120
- 3 Bell206
- 3 Bell427
- 3 AS355
- 3 MI8
- 2 Bell407
- 1 HU369
- 1 MD500N
pokud něco chybí, uvítám komentář.
Weird ruby/rails error. I was soo crazy about that. And solution is pretty simple.
CHECK your YAML files for error. As I’ve changed my ruby version other than 1.9.2p180 (higher) and as YAML has changed since then, this could make crazy and hidden errors like that one.
using rails 3.0.1 and cucumber-rails (~>1.1.0).. and got this weird error message:
dyld: lazy symbol binding failed: Symbol not found: _yajl_set_static_value Referenced from: ~/.rvm/gems/ruby-1.9.3-p0/gems/yajl-ruby-1.0.0/lib/yajl/yajl.bundle Expected in: flat namespace dyld: Symbol not found: _yajl_set_static_value Referenced from: ~/.rvm/gems/ruby-1.9.3-p0/gems/yajl-ruby-1.0.0/lib/yajl/yajl.bundle Expected in: flat namespace Trace/BPT trap: 5
so.. working solution is:
~/.rvm/gems/ruby-1.9.3-p0/gems/yajl-ruby-1.0.0/ext/yajl)
yajl_ext.h and yajl_ext.c and change “inline void” to “static void“yajl.bundle in lib/static void yajl_check_and_fire_callback(void * ctx); static void yajl_set_static_value(void * ctx, VALUE val);
@implementation UINavigationBar (UINavigationBarCustomDraw)
- (void) drawRect:(CGRect)rect {
[self setTintColor:[UIColor colorWithRed:0.5f
green: 0.5f
blue:0
alpha:1]];
if ([self.topItem.title length] > 0 && ![self.topItem.title isEqualToString:@"Back to ..."]) {
[[UIImage imageNamed:@"Header_1px.png"] drawInRect:rect];
CGRect frame = CGRectMake(0, 0, 320, 44);
UILabel *label = [[[UILabel alloc] initWithFrame:frame] autorelease];
[label setBackgroundColor:[UIColor clearColor]];
label.font = [UIFont boldSystemFontOfSize: 20.0];
label.shadowColor = [UIColor colorWithWhite:0.0 alpha:1];
label.textAlignment = UITextAlignmentCenter;
label.textColor = [UIColor whiteColor];
label.text = self.topItem.title;
self.topItem.titleView = label;
} else {
[[UIImage imageNamed:@"Header.png"] drawInRect:rect];
self.topItem.titleView = [[[UIView alloc] init] autorelease];
}
}
@end
source: http://www.developers-life.com/custom-uinavigationbar-with-image-and-back-button.html
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
cell.selectedBackgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"SelectedCellBackground.png"]] autorelease];
}
// configure the cell
}
it’s simple :)
if (window.devicePixelRatio >= 2) { alert('retina found'); };