This file contains 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
public class Account extends Product { | |
private String owner; | |
Account(String owner) { | |
System.out.println("Create account: " + owner); | |
this.owner = owner; | |
} | |
public void use() { |
This file contains 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
public abstract class AbstractDisplay { | |
public abstract void open(); | |
public abstract void print(); | |
public abstract void close(); | |
//Template Method | |
public final void display() { | |
open(); | |
for (int i =0; i < 3; i++) { | |
print(); | |
} |
This file contains 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
import java.io.*; | |
public interface FileIo { | |
public void readFromFile(String filename) throws IOException; | |
public void writeToFile(String filename) throws IOException; | |
public void setValue(String key, String value); | |
public String getValue(String key); | |
} |
This file contains 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
public interface Aggregate { | |
public abstract Iterator iterator(); | |
} |
This file contains 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
$ git mv -f file.js File.js |
This file contains 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
textField.backgroundColor = [UIColor clearColor]; |
This file contains 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
shadowButton.layer.cornerRadius = 15; | |
shadowButton.layer.shadowOffset = CGSizeMake(0.0f, 0.0f); | |
shadowButton.backgroundColor = [UIColor clearColor]; | |
CGFloat w = 6.0f; | |
CGFloat wh = w / 2; | |
CGFloat sw = shadowButton.frame.size.width; | |
CGFloat sh = shadowButton.frame.size.height; | |
CGFloat c = shadowButton.layer.cornerRadius; |
This file contains 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
import "ViewController.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController | |
- (void)viewDidLoad | |
{ |
NewerOlder