iOS-Icon and Image Sizes guideline

Icon and Image Sizes guideline

https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html

Read More

X-Code bugs

Xcode - error: pathspec ‘…’ did not match any file(s) known to git

The chosen answer is too specific to his own question and gives zero insight on the actual cause. The problem is indeed, as mentioned before the changing of a filename’s case. For me personally this is because of my Macbook/OSX. Apparently Windows has the same ‘thing’.

Read More

iOS-Analysis of Card Game project

Card.h

1
2
@property (strong, nonatomic) NSString *contents; 
//generate getters and setters for the properties

Read More

iOS-View Controller Lifecycle

5

Do not put geometry related code in viewDidLoad()

viewWillAppear()
synchronise
ok to put geometry

Read More

iOS-Foundation and Attribute Strings

Extension of iOS-Objective-C and Java. Dive into iOS Foundation and Attribute Strings.

Creating Objects

  • create objects with alloc and init

    1
    NSMutableArray *cards = [[NSMutableArray alloc] init];
    CardMatchingGame *game = [[CardMatchingGame alloc] initWithCardCount:12 usingDeck:d];

Read More

gymnote

gymnote

This is an app to jot your training data.

To help fitter know how his/her performance improve.

Read More

Compare Objective-C syntax with Java syntax

Hello World

  • Objective-C
1
2
3
4
#include <Foundation/Foundation.h>
NSLog(@"Hello World");
NSLog(@"myInt = %li", (long)myInt);
NSLog(@"This is %@", str);
  • Java
1
2
3
4
5
import java.io.*;
import java.util.*;
System.out.println("Hello World");
System.out.println("myInt = " + Integer.tostring(myInt));
System.out.println("This is " + str);

Read More

Design Note for iOS

IOS design

Core Philosophies

  • deference
  • clarity
  • depth

Your content should be the hero, everything else is secondary

  • Simplify

    • focus on functional colors, harmonious gradients, and beautiful typography
  • Maximize content

    • The content should take the whole screen, giving maximum space to its inner elements.
  • Color

    • Use a prominent color to show that an element is tappable or that it’s highlighted.

Read More

部分题思路

10 Regular Expression Match

  • Back Tracking
    • boundary condition: sLen == 0 || pLen == 0
    • then deal with p.charAt(1) == '*' and other
1
2
3
4
5
6
7
8
if(pLen == 0) return sLen == 0; // pLen = a*? ;
if(sLen == 0) return pLen == 0 || pLen > 1 && p.charAt(1) == '*' && isMatch(s, p.substring(2));
if(pLen > 1 && p.charAt(1) == '*') {
return (isMatch(s, p.substring(2)) || ((sLen > 0 && (s.charAt(0) == p.charAt(0)) || p.charAt(0) == '.') && isMatch(s.substring(1), p))); // when try to get s.charAt(0) make sure s is not empty
}
else {
return (sLen > 0 && (s.charAt(0) == p.charAt(0) || p.charAt(0) == '.') && isMatch(s.substring(1), p.substring(1)));
}

Read More

CSE 6341 Implement Lisp Interpreter with Java, Part 1

Overview

The overall goal of this sequence of projects is to build an interpreter for the version of LISP presented in class.

Project 1

For the first project, I build a lexical analyzer, a parser, and a printer. The input language for my parser is defined by the following grammar.

Read More