- 博客(63)
- 收藏
- 关注
转载 mac被锁有pin码的解锁方法
停用规律:错误5次密码停用1分钟再错误3次停用5分钟在错误1次就停用15分钟再错误1次就是60分钟了,而且还没输入框了,这时候我们要通过按 option,commond这2个按钮来唤起输入框说明一下,我是一次按了这2个按钮,就弹出了输入框,具体是按这2个的哪一个就不知道了,凑巧发现按这2个就弹出了大家可以试试,转载于:https://www...
2019-08-04 12:05:00
5468
转载 Mac 配置vscode调试PHP
Mac系统版本:MacOS Mojave 10.14.5vscode:1.36.0MacOS Mojave 10.14.5 系统自带PHP 7.1.231、开启phpsudo vim /etc/apache2/httpd.conf找到#LoadModulephp7_module libexec/apache2/libphp7.so,去掉注释(删除前面的井...
2019-07-05 15:52:00
2879
转载 oc 执行shell 脚本
-(id) InvokingShellScriptAtPath :(NSString*) shellScriptPath{ NSTask *shellTask = [[NSTask alloc]init]; [shellTask setLaunchPath:@"/bin/sh"]; NSString *shellStr = [NSString ...
2019-05-24 01:30:00
1144
转载 MBProgressHUD 设置透明背景
MBProgressHUD 默认使用MBProgressHUDBackgroundStyleBlur 类型MBProgressHUDBackgroundStyleBlur使用了毛玻璃效果,我们要把把它选择设为MBProgressHUDBackgroundStyleSolidColor再设置color,// 设置字体颜色 hud.contentColor ...
2019-03-26 11:13:00
649
转载 oc 阿拉伯数字转中文数字
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; formatter.numberStyle = NSNumberFormatterSpellOutStyle; NSString *string = [formatter stringFromNumber:[NSNumber numberWithI...
2018-04-20 13:07:00
295
转载 std::vector<char> 转 const char
std::stringstream oss;for(unsigned int i=0;i < buffer->size();i++){oss<<(*buffer)[i];}string temp=oss.str();const char * buf=temp.c_str();转载于:https://www.cnblogs.com/Xujg/p/70...
2017-06-20 16:04:00
819
转载 cocos2d-x类型转换(CCstring int string char UTF-8互转)
http://www.cnblogs.com/leehongee/p/3642308.html//int 转 CCstringint num=5; CCString* ns=CCString::createWithFormat("%d",num); //CCstring 转 intint px = ns->intValue();//将CCStri...
2017-06-14 12:59:00
106
转载 js Array.prototype.join.call(arguments,",") 理解
prototype 属性使您有能力向对象添加属性和方法。join() 方法:把数组的所有元素放入一个字符串。元素通过指定的分隔符进行分隔。call()方法可以用来代替另一个对象调用一个方法。Array.prototype.join.call(arguments,",")拆机理解var fn =Array.prototype.join;//把方法添加为属性...
2017-03-23 15:15:00
538
转载 在需要隐藏navigationController控制器
- (void)viewWillAppear:(BOOL)animated {[super viewWillAppear:animated];[self.navigationController setNavigationBarHidden:YES animated:animated];}- (void)viewWillDisappear:(BOOL)animated {...
2017-02-10 15:30:00
125
转载 升级macOS Sierra系统 导致错误 app: resource fork, Finder information, or similar detritus not allowed...
前几天刚升级了macOS Sierra系统,顿时感觉入坑了,本来好好的项目报如下错误: app: resource fork, Finder information, or similar detritus not allowed在网上找了很多方法,都不使用我的项目,或者说网上的说法太模糊,现给出解决办法: (1)关闭Xcode,打开终端; (2)把...
2017-02-08 22:33:00
297
转载 mac 使用apache开启https功能,实现ios局域网内测(二)
二、创建app.plist1、<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist ver...
2016-11-18 13:04:00
206
转载 mac 使用apache开启https功能,实现ios局域网内测(一)
笔者尝试了网上各种办法最后还是找到了方法解决了一系列局域网内测的问题,随手做个笔记记录下,亲测可行。一、先生成证书1、进入apache web 的根目录处理证书命令cd /Library/WebServer/Documents/ios基于/Library/WebServer/Documents/ios 根目录下处理命令:a-生成私钥,命令: sudo op...
2016-11-18 13:03:00
210
转载 mac 安装2个xcode 时会导致找不到xcodebuild
mac 安装2个xcode 时会导致找不到xcodebuild解决方案:sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer转载于:https://www.cnblogs.com/Xujg/p/6072500.html...
2016-11-17 09:32:00
376
转载 Cocos2dx3.0过渡篇 globalZOrder()与localZOrder()
这篇博客的标题本想叫“...3.0新的渲染...介绍”,最后还是拉不下这个脸。为啥?觉得自己对渲染的认识还是过于表面,谈不上理解。当然了,这并不影响这篇博客继续写下去。下面看一段3.0Release Notes 对于新渲染器的一段介绍:Node 增加了新的函数 setGlobalZOrder() / getGlobalZOrder(),之前的旧函数 setZOrder() / get...
2016-11-11 10:59:00
139
转载 duplicate symbols 错误解决方案
duplicate symbols for architecture arm64 after xCode 8.0 update升级xcode 8以后提示有的变量重复了,只要在Build settings->enable testability 设置为no因为xcode 8 默认开启了可测试性构建设置,把他关了,旧项目就可以运行了转载于:https:...
2016-10-18 10:56:00
866
转载 自定义ios NSLog
#ifdef DEBUG#define MyLog(FORMAT, ...) fprintf(stderr,"Time:%s\t File:%s\t Methods:%s\t Line:%d\t Info:%s", __TIME__,[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String],__...
2016-08-15 14:41:00
128
转载 ios 调试过程捕获异常Stack 信息
在AppDelegate,定义方法void catchExceptionHandler(NSException *exception) { NSLog(@"CRASH: %@", exception); NSLog(@"Stack Trace: %@", [exception callStackSymbols]);}在- (BOOL)appli...
2016-07-14 14:15:00
114
转载 oc block 遍历数组及字典
原遍历数组NSArray * lines = ...for (NSString * line in lines) { // ...}for (int i = 0; i < lines.count; ++i) { NSString * s = [lines objectAtIndex:i]; ...}原遍历字典NSDictionary * dict = … ...
2016-07-13 10:09:00
159
转载 Cocos2dx报OpenGL error 0x0506错误
近期做第三方sdk接入时,发现iOS8系统下,进行银联充值后,返回游戏有很大几率会报OpenGL error 0x0506............之类的绘制问题,游戏卡死,花了很长时间,一直没有头绪最终找到这篇文章:http://blog.lessfun.com/blog/2014/09/24/ios8-issue-keyboard-orientation-and-idletim...
2016-07-11 16:46:00
206
转载 oc自定义不定参数函数
-(void)getValueFormConfig:(NSString *)key,...or-(void)getValueFormConfig:(NSString *)key,...NS_REQUIRES_NIL_TERMINATION;-(void)getValueFormConfig:(NSString *)key,...{ NSMutabl...
2016-06-21 15:52:00
355
转载 __block 和__weak 区别及使用
API Reference对__block变量修饰符有如下几处解释://A powerful feature of blocks is that they can modify variables in the same lexical scope. You signal that a block can modify a variable using the __block...
2016-06-20 14:51:00
141
转载 ios 自动布局水平跟垂直居中
[view addConstraint:[NSLayoutConstraint constraintWithItem:segment attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:view attribute:NSLayoutAttributeCe...
2016-06-15 11:04:00
746
转载 ios 中尝试多次请求
-(void)tryRun{ tryTimes++; id obj = [ASODataManager getAppleAccount]; if (obj) { __block FirstViewController* sf = self; //有账号,可以开始获取数据 [[ASODataManage...
2016-05-28 08:39:00
139
转载 swift 中的问号跟感叹号
?: 变量在使用过程中可能存在空值,则需要用?标记,否则赋空值会报错?12var mustNoNilValue: String = "Swift"var canNilValue: String? = nil!: 感叹号和问号是配套使用的,用问号标记的变量,在调用方法...
2016-05-20 14:41:00
170
转载 获取bundle文件下的资源
NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle].resourcePath stringByAppendingPathComponent:@"bundleName"]]; UIImage* img = [UIImage imageWithContentsOfFile:[bundle pathFo...
2016-05-07 15:38:00
1035
转载 xcode 项目证书跟签名都正确的时候,还报证书错误
原因,安装证书错误,导致无法匹配证书,方案:删除原来的证书,重新安装打开终端1、cd Library/2、cd MobileDevice/3、open Provisioning\ Profiles/每个项目的bundle id 都会有对应的PROVISIONING_PROFILE(project.pbxproj 文件),这个值跟Provisioning Profi...
2016-04-27 09:10:00
326
转载 oc 经常用到弹出view的方法
#pragma mark 弹出view-(void)exChangeOut:(UIView *)changeOutView dur:(CFTimeInterval)dur{ CAKeyframeAnimation * animation; animation = [CAKeyframeAnimation animationWithKeyPath:@"trans...
2016-04-01 16:44:00
351
转载 oc 把view添加到rootcontrollerview控制的view
在当前活跃的window 添加一个view[[[[[UIApplication sharedApplication] keyWindow] rootViewController] view] addSubview:myview];转载于:https://www.cnblogs.com/Xujg/p/5345441.html
2016-04-01 16:43:00
367
转载 oc 跳转控制方法
1、presentViewController- (void)presentViewController:(UIViewController *)viewControllerToPresent animated: (BOOL)flag completion:(void (^ __nullable)(void))completion NS_AVAILABLE_IOS(5_0);2、...
2016-04-01 16:38:00
342
转载 ios 不通过import 调用其他控制器的方法
ios 开发过程中在不通过import 调用其他类的方法//获取类名Class controller = NSClassFromString(@"controller"); //不允许为空 if (controller) { //是否实现了该方法 if ([[controller alloc] respondsToSelecto...
2016-04-01 16:31:00
328
转载 关于清理 mac 其他文件的的方法
mac 用于开发使用时间长硬盘会越来越小,速度越来越慢的,亦是花了几分钟研究怎么清理系统的缓存,方法:1,到 https://www.omnigroup.com/more/ 安装 OmniDiskSweeper ;2.安装该应用程序,并选择双击你的硬盘3.从最大的文件开始查找,(有使用xcode ,该~/Library/Developer/Xcode/DerivedD...
2016-03-29 09:30:00
1386
转载 对数组中的字典进行排序
原来字典NSArray *arr = @[@{@"index" : @"3", @"key" : @"value"}, @{@"index" : @"4", @"key" : @"value"}, @{@"index" : @"1", @"key" : @"value"}, @{@...
2016-03-27 10:29:00
424
转载 ios 从url字符串中获取图片名字
NSString *str = @"http://pic92.nipic.com/file/20160323/22486259_160209631000_2.jpg";NSLog(@"lastPathComponent = %@",[str lastPathComponent]);通过NSURLSessionDownloadTask下载图片获取服务器上存储路...
2016-03-26 22:54:00
348
转载 ios 缩放图片(平铺)
//缩放图片(平铺)- (UIImage *)resizeImage:(NSString *)imgName{ UIImage *bgImage = [UIImage imageNamed:imgName]; //缩放图片 bgImage = [bgImage stretchableImageWithLeftCapWidth:bgImage.siz...
2016-02-25 23:40:00
126
转载 百度js 获取定位城市名称
首先引用百度 script<script type="text/javascript" src="http://api.map.baidu.com/api?type=quick&ak=百度密钥&v=1.0"></script>然后js<script type="text/javascript"> var geolo...
2015-07-02 14:30:00
318
转载 Asp.net MVC 插件式应用框架
Asp.net MVC 插件式应用框架2013年05月13日 10:16供稿中心: 互联网运营部摘要:这几年来做了很多个网站系统,一直坚持使用asp.net mvc建站,每次都从头开始做Layout,CSS,做权限管理等等,有点恼火,将这几年的代码好好整理了一下,准备搭建一个框架。这几年来做了很多个网站系统,一直坚持使用asp.net mvc建站,每次都从头开始做L...
2015-04-15 15:37:00
149
转载 mvc Ajax 跨域请求
js端:$.ajax({ type : "get", async : false, url :url, data: 'bid=0&xingming=' + uName + '&phone=' + uTel + '&BName=' + uLP + '&sex=0&renshu=1', ...
2015-03-19 14:23:00
87
转载 discuz密码生成
Discuz的密码加密算法其实就是两次MD5加密,首先用明文进行一次加密,之后随机生成一个salt,再把第一次的密文后面添加salt作为明文再进行一次MD5加密。salt保存在uc_members表里,可以通过用户名进行获取。像这样:MD5(MD5(明文)+salt)下面是.net的实现代码:代码如下复制代码string GetDiscu...
2015-02-26 17:01:00
161
转载 IIS5.1、IIS6.0、IIS7.5中安装配置MVC 3
本文主要介绍在IIS5.1、IIS6.0、IIS7.5中安装配置MVC 3的具体办法!正文:IIS5.11. 安装Microsoft .net FrameWork 4.0安装包;2. 安装ASP.NET MVC 3;3. 在IIS中发布网站,创建虚拟目录,ASP.NET版本选择4.0.30196;4. 添加MVC的解析:右击IIS中的虚拟目录选择“属性”-“虚...
2015-01-07 15:31:00
148
转载 MvcPager 分页示例 — 应用CSS样式
123456789101112131415@model PagedList<string><h5>Digg style:</h5>@Html.Pager(Model,new PagerOptions{PageIndexParameter...
2014-12-04 12:27:00
234
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人