自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (18)
  • 收藏
  • 关注

原创 C/C++中的日期和时间问题专栏(转载。。。)

本文从介绍基础概念入手,探讨了在C/C++中对日期和时间操作所用到的数据结构和函数,并对计时、时间的获取、时间的计算和显示格式等方面进行了阐述。本文还通过大量的实例向你展示了time.h头文件中声明的各种函数和数据结构的详细使用方法。关键字:UTC(世界标准时间),Calendar Time(日历时间),epoch(时间点),clock tick(时钟计时单元)1.概念在C/C++中,对字

2007-11-05 23:24:00 648 1

原创 关于mac开发过程中碰到的小坑

1. 在keychain中试图导出CertificateSigningRequest文件时老是提示“The user name or passphrase you entered is not correct”错误,解决方法是锁定 login keychain,如下图:2. mac开发在苹果后台添加设备的 uuid ,有的同学可能不知道去哪里找:就在关于本机->System Report.....

2018-07-14 17:10:56 1120

转载 MySQL添加新用户、为用户创建数据库、为新用户分配权限

https://blog.csdn.net/piaocoder/article/details/53704126

2018-07-14 17:03:03 259

原创 关于阿里云MySQL远程连接问题

step1:1、修改user表:MySQL>update user set host = '%' where user = 'root'; 2、授权主机访问:MySQL>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '你的密码' WITH GRANT OPTION; 3、刷新权限:MySQL>FLUSH PRIVI...

2018-07-14 16:20:11 229

转载 用第三方dylib,在XCode下编译Cocoa程序

所谓dylib,就是bsd风格的动态库。基本可以认为等价于windows的dll和linux的so。mac基于bsd,所以也使用的是 dylib。本文介绍用第三方dylib,在XCode下编译Cocoa程序的方法。 所谓dylib,就是bsd风格的动态库。基本可以认为等价于windows的dll和linux的so。mac基于bsd,所以也使用的是 dylib。如果你需要引用一个第三方的dylib,在xcode下编译出cocoa程序,在本机上运行是不会出问题的。但是发布出来,给其他用户用,就可能出

2010-09-13 23:46:00 1180

转载 mac framework

在Mac OS X的当前版本中,框架是“版本化”的束,因为它们不同的内在结构反映了它们为版本化动态共享库进行的配

2010-09-13 23:41:00 2229

转载 Leopard Linking: making relocatable libraries

Leopard Linking: making relocatable librariesSometimes developers find it is necessary to pack up a few extra dylib shared libraries inside an application bundle. In that case, it becomes necessary to do some fancy linking so that your application is rel

2010-09-11 18:00:00 702

OPENGL SOURCE

OPENGL SOURCE BOOK glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); glMaterialf(GL_FRONT, GL_SHININESS, 50.0); glLightfv(GL_LIGHT0, GL_POSITION, light_position); glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lm_ambient);

2010-05-07

Beginning+OpenGL+Game+Programming+Source+Code.rar

OpenGL Game Programming Source Code,和书对应的源代码,对学OPENGL 游戏编程比较有用

2010-05-06

tcp,ip编程实类

tcp ip 编程,集合了几个常用的类,封装了SOCKET编程里面常用的协议,tcp,ip,http等,可以看下,值得参考哦

2010-03-17

cocoa something related

int i; > > //initialize the threadLock with the number of thread > > [threadLock lock]; > [threadLock unlockWithCondition:count]; > > NSPort *mainPort = [NSMachPort port]; > if (!mainPort) > { > return; > } > > [mainPort setDelegate:self]; > > [[NSRunLoop currentRunLoop] addPort:mainPort > forMode:NSDefaultRunLoopMode]; > > NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; > [parameters setObject:mainPort forKey:@"port"]; > > // start the secondary threads > // loop starts at 1 because the main thread is also used (see below) > > for (i=0;i<count;i++) { > [NSThread detachNewThreadSelector:@selector(runJobs:) > toTarget:self > withObject:parameters]; > } > > //wait until done, ie until the count of threads in threadLock is > down to 0 > > [threadLock lockWhenCondition:0]; > [threadLock unlock]; > }

2009-09-16

cocoa animation examples

// // MyView.m // CustomAnimationTiming // // Created by Bill Dudney on 12/18/07. // Copyright 2007 Gala Factory. All rights reserved. // #import "MyView.h" @implementation MyView //START:code.MyView.setup -(void)setupMover { NSRect bounds = self.bounds; NSRect moverFrame = NSInsetRect(bounds, NSWidth(bounds) / 4.0f, NSHeight(bounds) / 4.0f); moverFrame.origin.x = 0.0f; mover = [[NSImageView alloc] initWithFrame:moverFrame]; [mover setImageScaling:NSScaleToFit]; [mover setImage:[NSImage imageNamed:@"photo.jpg"]]; [self addSubview:mover]; } - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { [self setupMover]; } return self; } //END:code.MyView.setup //START:code.MyView.move - (CABasicAnimation *)moveAnimation { if(nil == moveAnimation) { moveAnimation = [CABasicAnimation animation]; moveAnimation.duration = 2.0f; moveAnimation.timingFunction = [[CAMediaTimingFunction alloc] initWithControlPoints:0.5 :1.0 :0.5 :0.0]; } return moveAnimation; } - (void)move { NSDictionary *animations = [NSDictionary dictionaryWithObject:[self moveAnimation] forKey:@"frameOrigin"]; [mover setAnimations:animations]; NSPoint origin = mover.frame.origin; origin.x += NSWidth(mover.frame); [mover.animator setFrameOrigin:origin]; } //END:code.MyView.move //START:code.MyView.events - (BOOL)acceptsFirstResponder { return YES; } - (void)keyDown:(NSEvent *)event { [self move]; } //END:code.MyView.events @end

2009-09-14

COCOA相关资料(XML解析).rar

#pragma mark UIAlertSheet delegation - (void)alertSheet: (UIAlertSheet *)sheet buttonClicked: (int)button { [sheet dismiss]; [sheet release]; switch (button) { case 1: [_pushr openURL: [self authURL]]; break; default: [_pushr terminate]; break; } } #pragma mark XML helper functions - (BOOL)sanityCheck: (id)responseDocument error: (NSError *)err { NSXMLNode *rsp = [[responseDocument children] objectAtIndex: 0]; if (![[rsp name] isEqualToString: @"rsp"]) { NSLog(@"This is not an <rsp> tag! Bailing out."); return FALSE; } id element = [[NSClassFromString(@"NSXMLElement") alloc] initWithXMLString: [rsp XMLString] error: &err]; if (![[[element attributeForName: @"stat"] stringValue] isEqualToString: @"ok"]) { NSLog(@"The status is not 'ok', and we have no error recovery."); [element release]; return FALSE; } [element release]; return TRUE; }

2009-09-01

cocoa 相关资料

cocoa 相关资料 NSApplicationMain() 函数,其实功能如下: void NSApplicationMain(int argc, char *argv[]) { [NSApplication sharedApplication]; [NSBundle loadNibNamed:@"MainMenu" owner:NSApp]; [NSApp run]; }

2009-08-31

COCOA DOCUMENT

If the application you create is useful, you will want to share it with all the people of the world. Unfortunately, we don't all speak the same language. Suppose that you wish to make your RaiseMan application available to French speakers. We would say, "You are going to localize RaiseMan for French speakers." If you are creating an application for the world, you should plan on localizing it for at least the following languages: English, French, Spanish, German, Dutch, Italian, and Japanese. Clearly, you do not want to have to rewrite the entire app for each language. In fact, our goal is to ensure that you don't have to rewrite any Objective-C code for each language. That way, all the nations of the world can use a single executable in peace and harmony. Instead of creating multiple executables, you will localize resources and create string tables. Inside your project directory, an English.lproj directory holds all the resources for English speakers: nib files, images, and sounds. To localize the app for French speakers, you will add a French.lproj directory. The nibs, images, and sounds in this directory will be appropriate for French speakers. At runtime, the app will automatically use the version of the resource appropriate to the user's language preference.

2009-07-29

cocoaFrameworkProjectPrograming

Framework bundles use a bundle structure different from the bundle structure used by applications. The structure for frameworks is based on an earlier bundle format, and allows for multiple versions of the framework code and header files to be stored inside the bundle. This type of bundle is known as a versioned bundle. Supporting multiple versions of a framework allows older applications to continue running even as the framework binary continues to evolve.

2009-07-27

关于VC,MFC的好的学术文章,资料篇

自己网上收集的文章,拿来和大家分享。。。

2008-11-05

rc资源文件rc资源文件

哈哈资源文件rc资源文件rc资源文件rc资源文件

2008-10-22

图书管理系统(附文档)

自己刚做的课程设计,拿上来和大家分享,在网上也找过类似的东西,但VC和SQL2000组合的系统不多,所以自己做了个。里面包含了系统源码和7个文档(详细设计,用户手册,需求分析,数据库设计,可行性研究,软件开发计划,系统测试)。6分是我综合软件质量和我的付出给出的,绝对不多!如果你下载了觉得好,请帮忙顶下,谢谢了!注:内容绝对真实!

2008-05-31

C语言词法分析器

编译作业!C语言写的简单的C语言词法分析器,实现了单词识别,预处理(DEFINE),符号表,常数表,关键字表的创建。希望对您的学习有帮助。

2008-05-28

树,时钟,三元组

这里面的源程序都是关于树的遍历,用的各种算法遍历(其中包含了一个三元组的转置的,一起给弄上来了。呵呵)。这里的程序我都在VC++6.0环境运行通过,打开里面的工程文件(即扩展名为 dsw 的文件就可以打开一个工程,直接编译运行就OK了。 1.矩阵快速转置: 核心算法是函数FastTransposeTSMatrix,把这个函数看懂就Ok了。。。思想是输入矩 阵(当然得先输入行值和列值),然后扫描里面的非零元素,把相应信息存进三元组的数据结构里 ( 如行值,列值,非零元素值等。。),转置时一次到位,同志们自己好好看看算法哦 2.类实现快速转置:就是把上面的用C++里面的类的方法实现了下,基本算法是一样的,只是用到的类和 对象的概念。 3.树的递归遍历:用递归的思想创建和遍历二叉树(包括先序,中序和后序)。、 4.树遍历的非递归算法:用非递归算法遍历二叉树,主要是栈的应用。(有两种数据结构,自己看哦) 5.类实现层次遍历二叉树:用类和对象的方法实现按层次遍历二叉树。 把里面的东西简单介绍下,很简单的东西,剩下的自己看,呵呵,我们的数据结构就学到了树这章,就发这么多吧,以 后会继续把自己写的东西发上来的,希望大家多支持我,多多交流,永远的朋友。。。有问题,可以和我留言。。。 再加个用MFC写的时钟程序吧,呵呵,就是一个定时器的使用。。。clock 都是很基础的东西啊,应为本人也很基础,希望对大家会有帮助!!!

2007-11-10

用栈实现表达式求值

输入一个表达式,以'#'号结束输入,可以有+,-,*,/,和括号,比如12-4*(5+2)# 算出来的结果为-16,结果和操作数的范围都在整型数范围内.主要用栈的思想,还应用了一些小技巧,看源程序对初学者应该是很有帮助的.

2007-10-14

迷宫问题解决

压缩文件里包含了实现迷宫问题的原代码,用到了WINDOWS画图,入栈,出栈,还有有关VC++里有关资源的应用,当然是很简单的应用,本人也是WINDOWS编程的初学者,希望大家多指点!<br> 本程序在VC++6.0环境中运行通过

2007-10-12

魔王语言的实现

问题描述:魔王总是使用自己的一种非常精练而抽象的语言讲话,没人能听懂,但他的语言是可逐步解释成人能听懂的语言,因为他的语言是由以下两种形式的规则由人的语言逐步抽象上去的:-----------------------------------------------------------1)a---> (B1)(B2)....(Bm)2)[(op1)(p2)...(pn)]---->[o(pn)][o(p(n-1))].....[o(p1)o]-----------------------------------------------------------在这两种形式中,从左到右均表示解释.试写一个魔王语言的解释系统,把他的话解释成人能听得懂的话.###########################################################基本要求:用下述两条具体规则和上述规则形式(2)实现.设大写字母表示魔王语言的词汇; 小写字母表示人的语言的词汇;希腊字母表示可以用大写字母或小写字母代换的变量.魔王语言可含人的词汇.1) B --> tAdA2) A --> sae############################################################测试数据:B(ehnxgz)B 解释成 tsaedsaeezegexenehetsaedsae若将小写字母与汉字建立下表所示的对应关系,则魔王说的话是:"天上一只鹅地上一只鹅鹅追鹅赶鹅下鹅蛋鹅恨鹅天上一只鹅地上一只鹅".---------------------------------------------------| t | d | s | a | e | z | g | x | n | h |---------------------------------------------------| 天 | 地 | 上 | 一只| 鹅 | 追 | 赶 | 下 | 蛋 | 恨 |---------------------------------------------------#############################################################实现提示:将魔王的语言自右至左进栈,总是处理栈顶字符.若是开括号,则逐一出栈,将字母顺序入队列,直至闭括号出栈,并按规则要求逐一出队列再处理后入栈.其它情形较简单.应首先实现栈和队列的基本操作.#############################################################选作内容:1)由于问题的特殊性,可实现栈和队列的顺序存储空间共享2)代换变量的数目不限,则在程序开始运行时首先读入一组第一种形式的规则,而不是把规则固定在程序中(第二种形式的规则只能固定在程序中). 本程序在VC++上运行通过

2007-10-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除