#import "ViewController.h"#import "cal.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UILabel *calrusult; @end float i=10.0;@i...
分类:
其他好文 时间:
2014-07-14 09:40:03
阅读次数:
282
JNI事实上是Java Native Interface的简称,也就是java本地接口。它提供了若干的API实现了和Java和其它语言的通信(主要是C&C++)。或许不少人认为Java已经足够强大,为什么要须要JNI这样的东西呢?我们知道Java是一种平台无关性的语言,平台对于上层的java代码来说...
分类:
其他好文 时间:
2014-07-14 09:08:01
阅读次数:
268
建三个UIViewController 的子控制器,其中一个为根控制器,另外两个控制器的视图作为切换对象AppDelegate中代码//AppDelegate.h中代码#import @interface AppDelegate : UIResponder @property (retain, no...
分类:
其他好文 时间:
2014-07-13 23:15:04
阅读次数:
284
1.修改redhat enterprise5 语言
问题描述:切换语言
cd /etc/sysconfig
vi i18n
将LANG=en_US.UTF-8
改成LANG=zh_CN.gb2312
2.bash: ifconfig: command not found
问题描述:
切换到root用户下
[root@localhost /]$ ifconfig
依然提示:“bash: ifconfig: command not found”
whereis ifconfig 看一下这个命令在...
分类:
系统相关 时间:
2014-07-12 22:56:34
阅读次数:
416
#import "ViewController.h"
@interface ViewController ()
@property (strong,nonatomic) NSArray *bj;
@property (strong, nonatomic)NSArray *gd;
@end
@implementation ViewController
- (void)viewDidLoad...
分类:
其他好文 时间:
2014-07-12 22:22:54
阅读次数:
286
经验:支持”编译依存性最小化“的一般构想是:相依于声明式,不要相依于定义式。
基于此构想的两个手段是 Handle classes 和 Interface classes.
示例:相依于定义式
#include
#include "date.h"
#include "address.h"
class Person{
public:
Person(const std::string &name, const Data &birthday, const Address &addr);
st...
分类:
编程语言 时间:
2014-07-12 19:39:46
阅读次数:
347
上一次我们讲的例子原角色只有一个,这时我们只需要继承即可。如果有多个实现类呢,Java不支持多重继承,那么我们就重新写一个实现类,然后把其他的类通过引用过来即可,举例来说明:
package adapter.demo;
public interface IUserInfo {
//获得用户姓名
public String getUserName();
//获得家庭地址
public S...
分类:
其他好文 时间:
2014-07-12 17:56:21
阅读次数:
143
iOS开发项目篇—24字典转模型一、直接使用字典转模型1.微博数据转模型示意图:2.字典转模型查询字段:新建需要的数据模型:字典转模型相关的代码:YYUserModel.h文件 1 // 2 // YYUserModel.h 3 // 4 5 #import 6 7 @interface Y...
分类:
移动开发 时间:
2014-07-12 15:36:54
阅读次数:
188
直接调用代理类,用代理类访问目标类。package Pak;public interface Sourceable { public void method();} 1 package Pak; 2 3 public class Source implements Sourceabl...
分类:
编程语言 时间:
2014-07-12 15:34:03
阅读次数:
194
1,引入文件,#import IOS7 中可以这样写@import Foundation;2,在.h文件引入的是公用的,在.m文件里面引用的是本类私有的。私有属性声明@interface Card()//在这里面声明@property (strong) NSString *contents;@end...
分类:
移动开发 时间:
2014-07-12 14:51:30
阅读次数:
260