iOS clang 编译 oc 代码
clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk xxxxx.m
编译完xx.m以后,截取部分,如下:
extern "C" unsigned long OBJC_IVAR_$_ViewController$_testStr;
extern "C" unsigned long OBJC_IVAR_$_ViewController$_atestStr;
struct ViewController_IMPL {
struct UIViewController_IMPL UIViewController_IVARS;
NSString *_testStr;
NSString *_atestStr;
}; /* @end */ #ifndef _REWRITER_typedef_NotificationVO
#define _REWRITER_typedef_NotificationVO
typedef struct objc_object NotificationVO;
typedef struct {} _objc_exc_NotificationVO;
#endif struct NotificationVO_IMPL {
struct NSObject_IMPL NSObject_IVARS;
}; /* @end */ // @interface ViewController ()
// @property (nonatomic,strong) NSString * testStr;
// @property (atomic,strong) NSString * atestStr;
/* @end */ // @implementation ViewController static void _I_ViewController_viewDidLoad(ViewController * self, SEL _cmd) {
((void (*)(__rw_objc_super *, SEL))(void *)objc_msgSendSuper)((__rw_objc_super){(id)self, (id)class_getSuperclass(objc_getClass("ViewController"))}, sel_registerName("viewDidLoad"));
((void (*)(id, SEL, NSString *))(void *)objc_msgSend)((id)self, sel_registerName("setTestStr:"), (NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_0);
UITapGestureRecognizer * tap = ((UITapGestureRecognizer *(*)(id, SEL, id _Nullable, SEL _Nullable))(void *)objc_msgSend)((id)((UITapGestureRecognizer *(*)(id, SEL))(void *)objc_msgSend)((id)objc_getClass("UITapGestureRecognizer"), sel_registerName("alloc")), sel_registerName("initWithTarget:action:"), (id _Nullable)self, sel_registerName("tapFunc"));
((void (*)(id, SEL, BOOL))(void *)objc_msgSend)((id)((UIView *(*)(id, SEL))(void *)objc_msgSend)((id)self, sel_registerName("view")), sel_registerName("setUserInteractionEnabled:"), ((bool)1));
((void (*)(id, SEL, UIGestureRecognizer *))(void *)objc_msgSend)((id)((UIView *(*)(id, SEL))(void *)objc_msgSend)((id)self, sel_registerName("view")), sel_registerName("addGestureRecognizer:"), (UIGestureRecognizer *)tap); ((void (*)(id, SEL))(void *)objc_msgSend)((id)self, sel_registerName("dotest1")); int a = 5;
for (int i = 0; i < 5; i++) {
a = a + i;
}
} struct __ViewController__dotest1_block_impl_0 {
struct __block_impl impl;
struct __ViewController__dotest1_block_desc_0* Desc;
__ViewController__dotest1_block_impl_0(void *fp, struct __ViewController__dotest1_block_desc_0 *desc, int flags=0) {
impl.isa = &_NSConcreteStackBlock;
impl.Flags = flags;
impl.FuncPtr = fp;
Desc = desc;
}
};
static void __ViewController__dotest1_block_func_0(struct __ViewController__dotest1_block_impl_0 *__cself) { NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_3);
} static struct __ViewController__dotest1_block_desc_0 {
size_t reserved;
size_t Block_size;
} __ViewController__dotest1_block_desc_0_DATA = { 0, sizeof(struct __ViewController__dotest1_block_impl_0)}; struct __ViewController__dotest1_block_impl_1 {
struct __block_impl impl;
struct __ViewController__dotest1_block_desc_1* Desc;
__ViewController__dotest1_block_impl_1(void *fp, struct __ViewController__dotest1_block_desc_1 *desc, int flags=0) {
impl.isa = &_NSConcreteStackBlock;
impl.Flags = flags;
impl.FuncPtr = fp;
Desc = desc;
}
};
static void __ViewController__dotest1_block_func_1(struct __ViewController__dotest1_block_impl_1 *__cself) { NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_2);
dispatch_sync(dispatch_get_main_queue(), ((void (*)())&__ViewController__dotest1_block_impl_0((void *)__ViewController__dotest1_block_func_0, &__ViewController__dotest1_block_desc_0_DATA)));
NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_4);
} static struct __ViewController__dotest1_block_desc_1 {
size_t reserved;
size_t Block_size;
} __ViewController__dotest1_block_desc_1_DATA = { 0, sizeof(struct __ViewController__dotest1_block_impl_1)}; static void _I_ViewController_dotest1(ViewController * self, SEL _cmd) {
NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_1);
dispatch_async(dispatch_get_global_queue(0, 0), ((void (*)())&__ViewController__dotest1_block_impl_1((void *)__ViewController__dotest1_block_func_1, &__ViewController__dotest1_block_desc_1_DATA)));
NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_5);
} static void _I_ViewController_dotest2(ViewController * self, SEL _cmd) {
NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_6);
} struct __ViewController__tapFunc_block_impl_0 {
struct __block_impl impl;
struct __ViewController__tapFunc_block_desc_0* Desc;
ViewController *self;
__ViewController__tapFunc_block_impl_0(void *fp, struct __ViewController__tapFunc_block_desc_0 *desc, ViewController *_self, int flags=0) : self(_self) {
impl.isa = &_NSConcreteStackBlock;
impl.Flags = flags;
impl.FuncPtr = fp;
Desc = desc;
}
};
static void __ViewController__tapFunc_block_func_0(struct __ViewController__tapFunc_block_impl_0 *__cself) {
ViewController *self = __cself->self; // bound by copy ((void (*)(id, SEL, NSString *))(void *)objc_msgSend)((id)self, sel_registerName("setTestStr:"), (NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_9);
NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_10,((NSString *(*)(id, SEL))(void *)objc_msgSend)((id)self, sel_registerName("testStr")));
}
static void __ViewController__tapFunc_block_copy_0(struct __ViewController__tapFunc_block_impl_0*dst, struct __ViewController__tapFunc_block_impl_0*src) {_Block_object_assign((void*)&dst->self, (void*)src->self, 3/*BLOCK_FIELD_IS_OBJECT*/);} static void __ViewController__tapFunc_block_dispose_0(struct __ViewController__tapFunc_block_impl_0*src) {_Block_object_dispose((void*)src->self, 3/*BLOCK_FIELD_IS_OBJECT*/);} static struct __ViewController__tapFunc_block_desc_0 {
size_t reserved;
size_t Block_size;
void (*copy)(struct __ViewController__tapFunc_block_impl_0*, struct __ViewController__tapFunc_block_impl_0*);
void (*dispose)(struct __ViewController__tapFunc_block_impl_0*);
} __ViewController__tapFunc_block_desc_0_DATA = { 0, sizeof(struct __ViewController__tapFunc_block_impl_0), __ViewController__tapFunc_block_copy_0, __ViewController__tapFunc_block_dispose_0}; struct __ViewController__tapFunc_block_impl_1 {
struct __block_impl impl;
struct __ViewController__tapFunc_block_desc_1* Desc;
ViewController *self;
__ViewController__tapFunc_block_impl_1(void *fp, struct __ViewController__tapFunc_block_desc_1 *desc, ViewController *_self, int flags=0) : self(_self) {
impl.isa = &_NSConcreteStackBlock;
impl.Flags = flags;
impl.FuncPtr = fp;
Desc = desc;
}
};
static void __ViewController__tapFunc_block_func_1(struct __ViewController__tapFunc_block_impl_1 *__cself) {
ViewController *self = __cself->self; // bound by copy ((void (*)(id, SEL, NSString *))(void *)objc_msgSend)((id)self, sel_registerName("setTestStr:"), (NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_11);
NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_12,((NSString *(*)(id, SEL))(void *)objc_msgSend)((id)self, sel_registerName("testStr")));
}
static void __ViewController__tapFunc_block_copy_1(struct __ViewController__tapFunc_block_impl_1*dst, struct __ViewController__tapFunc_block_impl_1*src) {_Block_object_assign((void*)&dst->self, (void*)src->self, 3/*BLOCK_FIELD_IS_OBJECT*/);} static void __ViewController__tapFunc_block_dispose_1(struct __ViewController__tapFunc_block_impl_1*src) {_Block_object_dispose((void*)src->self, 3/*BLOCK_FIELD_IS_OBJECT*/);} static struct __ViewController__tapFunc_block_desc_1 {
size_t reserved;
size_t Block_size;
void (*copy)(struct __ViewController__tapFunc_block_impl_1*, struct __ViewController__tapFunc_block_impl_1*);
void (*dispose)(struct __ViewController__tapFunc_block_impl_1*);
} __ViewController__tapFunc_block_desc_1_DATA = { 0, sizeof(struct __ViewController__tapFunc_block_impl_1), __ViewController__tapFunc_block_copy_1, __ViewController__tapFunc_block_dispose_1}; struct __ViewController__tapFunc_block_impl_2 {
struct __block_impl impl;
struct __ViewController__tapFunc_block_desc_2* Desc;
ViewController *self;
__ViewController__tapFunc_block_impl_2(void *fp, struct __ViewController__tapFunc_block_desc_2 *desc, ViewController *_self, int flags=0) : self(_self) {
impl.isa = &_NSConcreteStackBlock;
impl.Flags = flags;
impl.FuncPtr = fp;
Desc = desc;
}
};
static void __ViewController__tapFunc_block_func_2(struct __ViewController__tapFunc_block_impl_2 *__cself) {
ViewController *self = __cself->self; // bound by copy NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_13,((NSString *(*)(id, SEL))(void *)objc_msgSend)((id)self, sel_registerName("testStr")));
}
static void __ViewController__tapFunc_block_copy_2(struct __ViewController__tapFunc_block_impl_2*dst, struct __ViewController__tapFunc_block_impl_2*src) {_Block_object_assign((void*)&dst->self, (void*)src->self, 3/*BLOCK_FIELD_IS_OBJECT*/);} static void __ViewController__tapFunc_block_dispose_2(struct __ViewController__tapFunc_block_impl_2*src) {_Block_object_dispose((void*)src->self, 3/*BLOCK_FIELD_IS_OBJECT*/);} static struct __ViewController__tapFunc_block_desc_2 {
size_t reserved;
size_t Block_size;
void (*copy)(struct __ViewController__tapFunc_block_impl_2*, struct __ViewController__tapFunc_block_impl_2*);
void (*dispose)(struct __ViewController__tapFunc_block_impl_2*);
} __ViewController__tapFunc_block_desc_2_DATA = { 0, sizeof(struct __ViewController__tapFunc_block_impl_2), __ViewController__tapFunc_block_copy_2, __ViewController__tapFunc_block_dispose_2}; static void _I_ViewController_tapFunc(ViewController * self, SEL _cmd) {
((void (*)(id, SEL, NSNotificationName, id _Nullable))(void *)objc_msgSend)((id)((NSNotificationCenter *(*)(id, SEL))(void *)objc_msgSend)((id)objc_getClass("NSNotificationCenter"), sel_registerName("defaultCenter")), sel_registerName("postNotificationName:object:"), (NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_7, (id _Nullable)__null);;
NSLog((NSString *)&__NSConstantStringImpl__var_folders_05_lgchbchj0bs9m_wy5dlkgc580pdxk1_T_ViewController_95586e_mi_8);
dispatch_queue_t q1 = dispatch_queue_create("com.qiye.q1", (&(_dispatch_queue_attr_concurrent)));
dispatch_async(q1, ((void (*)())&__ViewController__tapFunc_block_impl_0((void *)__ViewController__tapFunc_block_func_0, &__ViewController__tapFunc_block_desc_0_DATA, self, 570425344))); dispatch_queue_t q2 = dispatch_queue_create("com.qiye.q2", (&(_dispatch_queue_attr_concurrent)));
dispatch_async(q2, ((void (*)())&__ViewController__tapFunc_block_impl_1((void *)__ViewController__tapFunc_block_func_1, &__ViewController__tapFunc_block_desc_1_DATA, self, 570425344))); dispatch_queue_t q3 = dispatch_queue_create("com.qiye.q3", (&(_dispatch_queue_attr_concurrent)));
dispatch_async(q3, ((void (*)())&__ViewController__tapFunc_block_impl_2((void *)__ViewController__tapFunc_block_func_2, &__ViewController__tapFunc_block_desc_2_DATA, self, 570425344)));
} static void _I_ViewController_didReceiveMemoryWarning(ViewController * self, SEL _cmd) {
((void (*)(__rw_objc_super *, SEL))(void *)objc_msgSendSuper)((__rw_objc_super){(id)self, (id)class_getSuperclass(objc_getClass("ViewController"))}, sel_registerName("didReceiveMemoryWarning")); } static NSString * _I_ViewController_testStr(ViewController * self, SEL _cmd) { return (*(NSString **)((char *)self + OBJC_IVAR_$_ViewController$_testStr)); }
static void _I_ViewController_setTestStr_(ViewController * self, SEL _cmd, NSString *testStr) { (*(NSString **)((char *)self + OBJC_IVAR_$_ViewController$_testStr)) = testStr; } static NSString * _I_ViewController_atestStr(ViewController * self, SEL _cmd) { return (*(NSString **)((char *)self + OBJC_IVAR_$_ViewController$_atestStr)); }
static void _I_ViewController_setAtestStr_(ViewController * self, SEL _cmd, NSString *atestStr) { (*(NSString **)((char *)self + OBJC_IVAR_$_ViewController$_atestStr)) = atestStr; }
// @end extern "C" __declspec(dllimport) struct objc_cache _objc_empty_cache;
#pragma warning(disable:4273) extern "C" unsigned long int OBJC_IVAR_$_ViewController$_testStr __attribute__ ((used, section ("__DATA,__objc_ivar"))) = __OFFSETOFIVAR__(struct ViewController, _testStr);
extern "C" unsigned long int OBJC_IVAR_$_ViewController$_atestStr __attribute__ ((used, section ("__DATA,__objc_ivar"))) = __OFFSETOFIVAR__(struct ViewController, _atestStr); static struct /*_ivar_list_t*/ {
unsigned int entsize; // sizeof(struct _prop_t)
unsigned int count;
struct _ivar_t ivar_list[2];
} _OBJC_$_INSTANCE_VARIABLES_ViewController __attribute__ ((used, section ("__DATA,__objc_const"))) = {
sizeof(_ivar_t),
2,
{{(unsigned long int *)&OBJC_IVAR_$_ViewController$_testStr, "_testStr", "@\"NSString\"", 3, 8},
{(unsigned long int *)&OBJC_IVAR_$_ViewController$_atestStr, "_atestStr", "@\"NSString\"", 3, 8}}
}; static struct /*_method_list_t*/ {
unsigned int entsize; // sizeof(struct _objc_method)
unsigned int method_count;
struct _objc_method method_list[9];
} _OBJC_$_INSTANCE_METHODS_ViewController __attribute__ ((used, section ("__DATA,__objc_const"))) = {
sizeof(_objc_method),
9,
{{(struct objc_selector *)"viewDidLoad", "v16@0:8", (void *)_I_ViewController_viewDidLoad},
{(struct objc_selector *)"dotest1", "v16@0:8", (void *)_I_ViewController_dotest1},
{(struct objc_selector *)"dotest2", "v16@0:8", (void *)_I_ViewController_dotest2},
{(struct objc_selector *)"tapFunc", "v16@0:8", (void *)_I_ViewController_tapFunc},
{(struct objc_selector *)"didReceiveMemoryWarning", "v16@0:8", (void *)_I_ViewController_didReceiveMemoryWarning},
{(struct objc_selector *)"testStr", "@16@0:8", (void *)_I_ViewController_testStr},
{(struct objc_selector *)"setTestStr:", "v24@0:8@16", (void *)_I_ViewController_setTestStr_},
{(struct objc_selector *)"atestStr", "@16@0:8", (void *)_I_ViewController_atestStr},
{(struct objc_selector *)"setAtestStr:", "v24@0:8@16", (void *)_I_ViewController_setAtestStr_}}
}; static struct _class_ro_t _OBJC_METACLASS_RO_$_ViewController __attribute__ ((used, section ("__DATA,__objc_const"))) = {
1, sizeof(struct _class_t), sizeof(struct _class_t),
(unsigned int)0,
0,
"ViewController",
0,
0,
0,
0,
0,
}; static struct _class_ro_t _OBJC_CLASS_RO_$_ViewController __attribute__ ((used, section ("__DATA,__objc_const"))) = {
0, __OFFSETOFIVAR__(struct ViewController, _testStr), sizeof(struct ViewController_IMPL),
(unsigned int)0,
0,
"ViewController",
(const struct _method_list_t *)&_OBJC_$_INSTANCE_METHODS_ViewController,
0,
(const struct _ivar_list_t *)&_OBJC_$_INSTANCE_VARIABLES_ViewController,
0,
0,
}; extern "C" __declspec(dllimport) struct _class_t OBJC_METACLASS_$_UIViewController;
extern "C" __declspec(dllimport) struct _class_t OBJC_METACLASS_$_NSObject; extern "C" __declspec(dllexport) struct _class_t OBJC_METACLASS_$_ViewController __attribute__ ((used, section ("__DATA,__objc_data"))) = {
0, // &OBJC_METACLASS_$_NSObject,
0, // &OBJC_METACLASS_$_UIViewController,
0, // (void *)&_objc_empty_cache,
0, // unused, was (void *)&_objc_empty_vtable,
&_OBJC_METACLASS_RO_$_ViewController,
}; extern "C" __declspec(dllimport) struct _class_t OBJC_CLASS_$_UIViewController; extern "C" __declspec(dllexport) struct _class_t OBJC_CLASS_$_ViewController __attribute__ ((used, section ("__DATA,__objc_data"))) = {
0, // &OBJC_METACLASS_$_ViewController,
0, // &OBJC_CLASS_$_UIViewController,
0, // (void *)&_objc_empty_cache,
0, // unused, was (void *)&_objc_empty_vtable,
&_OBJC_CLASS_RO_$_ViewController,
};
static void OBJC_CLASS_SETUP_$_ViewController(void ) {
OBJC_METACLASS_$_ViewController.isa = &OBJC_METACLASS_$_NSObject;
OBJC_METACLASS_$_ViewController.superclass = &OBJC_METACLASS_$_UIViewController;
OBJC_METACLASS_$_ViewController.cache = &_objc_empty_cache;
OBJC_CLASS_$_ViewController.isa = &OBJC_METACLASS_$_ViewController;
OBJC_CLASS_$_ViewController.superclass = &OBJC_CLASS_$_UIViewController;
OBJC_CLASS_$_ViewController.cache = &_objc_empty_cache;
}
#pragma section(".objc_inithooks$B", long, read, write)
__declspec(allocate(".objc_inithooks$B")) static void *OBJC_CLASS_SETUP[] = {
(void *)&OBJC_CLASS_SETUP_$_ViewController,
};
static struct _class_t *L_OBJC_LABEL_CLASS_$ [1] __attribute__((used, section ("__DATA, __objc_classlist,regular,no_dead_strip")))= {
&OBJC_CLASS_$_ViewController,
};
static struct IMAGE_INFO { unsigned version; unsigned flag; } _OBJC_IMAGE_INFO = { 0, 2 };
iOS clang 编译 oc 代码的更多相关文章
- clang 编译 OC
clang -fobjc-arc -framework Foundation helloworld.m -o helloworld.out OVERVIEW: clang LLVM compiler ...
- Unity3D研究院之IOS全自动编辑framework、plist、oc代码
Unity打IOS时会先生成一个Xcode工程,如果你需要增加一些第三方的framework那么需要手动一条一条的添加,这太烦了..而且可能你还需要修改Plist文件,甚至还可能要修改unity自动生 ...
- iOS 使用UIWebView把oc代码和javascript相关联
首先请参看一篇文章,作者写的很明白,请参看原地址 http://blog.163.com/m_note/blog/static/208197045201293015844274/. 其实,oc和js的 ...
- iOS开发——实战OC篇&环境搭建之纯代码(玩转UINavigationController与UITabBarController)
iOS开发——实战OC篇&环境搭建之纯代码(玩转UINavigationController与UITabBarController) 这里我们就直接上实例: 一:新建一个项目singleV ...
- IOS开发-OC学习-常用功能代码片段整理
IOS开发-OC学习-常用功能代码片段整理 IOS开发中会频繁用到一些代码段,用来实现一些固定的功能.比如在文本框中输入完后要让键盘收回,这个需要用一个简单的让文本框失去第一响应者的身份来完成.或者是 ...
- 使用OClint进行iOS项目的静态代码扫描
使用OClint进行iOS项目的静态代码扫描 原文链接:http://blog.yourtion.com/static-code-analysis-ios-using-oclint.html 最近需要 ...
- iOS: FFMpeg编译和使用问题总结
iOS: FFmpeg编译和使用问题总结 折磨了我近一周多时间的FFmpeg库编译问题终于解决了,必须得把这一段时间来遇到过的坑全写出来.如果急着解决问题,编译最新版本的FFmpeg库请直接看第二部分 ...
- iOS谋职之OC面试题
iOS谋职之OC面试题 iOS求职之OC面试题 IOS求职之OC面试题 1.Objective-C的类可以多重继承么?可以采用多个协议么? 答:不可以多重继承,可以采用多个协议. 2.#import和 ...
- 李洪强iOS开发之OC语言前期准备
OC语言前期准备 一.OC简介 Oc语言在c语言的基础上,增加了一层最小的面向对象语法,完全兼容C语言,在OC代码中,可以混用c,甚至是c++代码. 可以使用OC开发mac osx平台和ios平台的应 ...
随机推荐
- 推荐linux命令在线查,简约而不简单
1.相关介绍: 网址:http://blog.51yip.com/linux/1518.html#more-1518 2.Linux 命令在线sce 网址:http://linux.51yip.com ...
- 【转】msxml 操作xml
转自http://blog.csdn.net/dai_jing/article/details/8393392,原始出处不详. 1.简介 在.NET平台,微软为C#或托管C++程序员提供了丰富的类库, ...
- openwrt U盘启动
参考链接: http://m.blog.csdn.net/blog/zcynical/44892785
- hadoop入门学习整理
技术性网站 1.http://dongxicheng.org/ 2.http://www.iteblog.com/ 3.http://www.cnblogs.com/shishanyuan/p/414 ...
- 《ASP.NET 1200例》ref关键字与out关键字
REF关键字 ref 关键字会导致通过引用传递的参数,而不是值. 通过引用传递的效果是在方法中对参数的任何改变都会反映在调用方的基础参数中. 引用参数的值与基础参数变量的值始终是一样的. 不要将“通过 ...
- 赢在面试之Java多线程(十一)
121,什么是线程? 线程是操作系统能够进行运算调度的最小单位,它被包含在进程之中,是进程中的实际运作单位.程序员可以通过它进行多处理器编程,你可以使用多线程对运算密集型任务提速.比如,如果一个线程完 ...
- label 两次点击 事件冒泡 使用时间戳的解决方案
情况描述:在页面中input 和 label 通过for banding 然后点击input 或者label的时候都要执行一个方法 但是在点击label的时候有两次执行两次的情况,及监听到的cli ...
- 将list集合,元素随机打乱
for循环+随机数 实现相同位置的元素交换 public <T> void shuffle(List<T> list) { int size = list.size(); Ra ...
- SQLSERVER 创建索引实现代码
是SQL Server编排数据的内部方法.它为SQL Server提供一种方法来编排查询数据 什么是索引 拿汉语字典的目录页(索引)打比方:正如汉语字典中的汉字按页存放一样,SQL Server中的数 ...
- 解决scalac Error: bad option -make:transitive
关闭idea 打开项目所在位置并cd .idea 修改scala_compiler.xml文件 删除掉参数行包含-make:transitive 保存后退出编辑并重启idea打开项目