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
before: | |
list.append('<div class="one-fourth" style="margin-top:15px;"><a href="'+h+'" '+s.attr+' title="'+photo['title']+'" target="_blank"><img src="'+t+'" alt="'+photo['title']+'" /></a></div>'); | |
after: | |
var element = $('<div class="one-fourth" style="margin-top:15px;"><a href="'+h+'" '+s.attr+' title="'+photo['title']+'" target="_blank"><img src="'+t+'" alt="'+photo['title']+'" /></a></div>'); | |
if(i % 4 === 0){ | |
element.addClass('column-first'); | |
}else if(i % 4 === 3){ | |
element.addClass('column-last'); | |
} |
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
- (void)viewDidLoad{ | |
[super viewDidLoad]; | |
tabBarController_ = [[UITabBarController alloc] init]; | |
tabBarController_.delegate = self; | |
tabBarController_.viewControllers = [NSArray arrayWithObjects:a, b, c, nil]; | |
tabBarController_.selectedViewController = a; | |
tabBarController_.view.frame = self.view.bounds; | |
[self.view addSubview:tabBarController_.view]; | |
} |
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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ | |
static NSString *CellIdentifier = @"Cell"; | |
CustomeCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
NSDictionary *d = _dataSource[indexPath.row]; | |
if ([d[@"count"] intValue] == 0) { | |
cell.nameLabel.hidden = YES; | |
}else{ | |
cell.nameLabel.hidden = NO; | |
} | |
return cell; |
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
class Test{ | |
public static void main(String args[]){ | |
int n[][] = {{1, 2, 3, 4}, {10, 11, 12, 13}}; | |
System.out.println(n[0].length); | |
int m[] = n[0]; | |
System.out.println(m.length); // n[0].lengthと一緒 | |
} | |
} |