Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="pCX-2V-Cdw">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
</dependencies>
<scenes>
<!--Card Game View Controller-->
<scene sceneID="RGL-OG-MdP">
<objects>
<viewController id="pCX-2V-Cdw" customClass="CardGameViewController" sceneMemberID="viewController">
NSCountedSet *nsCountedSet = [[NSCountedSet alloc] initWithArray:@[@"abc",@"abc",@"abc",@"abc",@"other"]];
NSUInteger maxDublication = 0;
NSUInteger actualCount = 0;
for(NSString *s in [nsCountedSet objectEnumerator]) {
actualCount = [nsCountedSet countForObject:s]; // unnecessary checking, I want just array/enumarator of amounts.
if(maxDublication < actualCount) {
maxDublication = actualCount;
}
//
// main.m
// NilTestCount
//
// Created by Paweł on 16/12/13.
// Copyright (c) 2013 Twigit. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
@interface Vehicle : NSObject
- (void) move;
@end;
@implementation Vehicle
- (void) move {
NSLog(@"I move");
NSString *s = @"xyz";
if([s isMemberOfClass:[NSString class]]) {
NSLog(@"It is NSString or it's derivative");
} else {
NSLog(@"It is not");
}
NSString *s = @"xyz";
if([s isMemberOfClass:[NSString class]]) {
NSLog(@"s i just NSString, it is not derivative of NSString, it is juts NSString");
} else {
NSLog(@"It is not");
}
// THIS IS IN ONE FILE
@interface Parent : NSString
@end
@implementation Parent
- (void) makeIce { // so this is anyway public ? Right ?
NSLog(@"I do ice");
}
@end
// THIS IS IN ONE FILE
@interface Parent : NSString
@end
@implementation Parent
- (void) makeIce { // so this is anyway public ? Right ?
NSLog(@"I do ice");
}
@end
id cardObject = [nsArrayThatImSureHaveOnlyCardOBject firstObject];
if([cardObject isKindOfClasss:[CardObject class]]) {
CardObject* castedCardObject = (CardObject *)cardObject; // Cast it ONLY FOR compiler and for hints in xcode.
/* following code, using CardObject instance methods, sure (sure more) that object could answer to that message */
}
ot@raspberrypi:~# motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.12 running, accepting connections
[1] Thread 1 started
[1] cap.driver: "spca561"
[0] motion-httpd: waiting for data on port TCP 8080
[1] cap.card: "Camera"