- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-(BOOL)isForEvenNumberPage
{
return self.pageNumber % 2 == 0;
}
-(BOOL)isForOddNumberPage
{
return [self isForEvenNumberPage] == NO;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 5
−405
-(BOOL)isForEvenNumberPage
{
return self.pageNumber % 2 == 0;
}
-(BOOL)isForOddNumberPage
{
return [self isForEvenNumberPage] == NO;
}
Один очень крупный проект от заокеанского заказчика
−407
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSInteger rows;
if (tableView == self.tableView) {
rows = [self numberOfRowsInSectionDishes:section];
} else {
rows = [self numberOfRowsInSectionSearch:section];
}
return rows;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell;
if (tableView == self.tableView) {
cell = [self cellForRowAtIndexPathDishes:indexPath];
} else {
cell = [self cellForRowAtIndexPathSearch:indexPath];
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (tableView == self.tableView) {
[self didSelectRowAtIndexPathDishes:indexPath];
} else {
[self didSelectRowAtIndexPathSearch:indexPath];
}
}
Genius!
−407
//
// @property (nonatomic, strong) NSString *name; @property (nonatomic, strong) NSString *name;.m
// Govnocode
//
// Created by Khrishna on 28/03/14.
// Copyright (c) 2014 Khrishna Ravi. All rights reserved.
//
#import "@property (nonatomic, strong) NSString *name; @property (nonatomic, strong) NSString *name;.h"
@implementation _property__nonatomic__strong__NSString__name___property__nonatomic__strong__NSString__name_
@end
Безжалостные русские индусы
−349
- (void)willDismissViewControllerWithCity:(NSNumber *)city_id
open:(BOOL)open
oneDollar:(BOOL)oneDollar
twoDollars:(BOOL)twoDollars
threeDollars:(BOOL)threeDollars
cuisineName:(NSString *)cuisineName
cuisine:(NSNumber *)cuisine_id
vegetarian:(BOOL)vegetarian
neighborhoodName:(NSString *)neighborhoodName
neighborhood:(NSNumber *)neighborhood_id
trophy:(BOOL)trophy
eaten:(BOOL)eaten
notEaten:(BOOL)notEaten
planned:(BOOL)planned
{
self.filterByOpen = open;
self.filterByOneDollar = oneDollar;
self.filterByTwoDollars = twoDollars;
self.filterByThreeDollars = threeDollars;
self.filterByCuisine = cuisineName;
self.filterByVegetarian = vegetarian;
self.filterByNeighborhood = neighborhoodName;
self.filterByTrophy = trophy;
self.filterByEaten = eaten;
self.filterByNotEaten = notEaten;
self.filterByPlanned = planned;
self.cuisine_id = cuisine_id;
self.neighborhood_id = neighborhood_id;
if (self.city_id != city_id) {
self.searchBar.text =@"";
[self.searchBar resignFirstResponder];
[[LocationManager sharedInstance] changeCurrentCity:city_id];
self.city_id = city_id;
}
[self setupFilterLabel];
[self updateContent];
}
Индусы, такие индусы...
+74
public class test {
class Oper
{
int a, b, x,y;
int sum (int x) {
x = a+b;
return x;
}
int dif (int y)
{
y = a-b;
return y;
}
}
public static void main(String[] args)
{
Oper op = new Oper();
op.a = 6;
op.b = 7;
System.out.println("Сумма=" + op.sum());
System.out.println("Разность=" + op.dif());
}