首页 > 2015年12月11日 > 全部分享
关于实现qsort函数,回调函数
qsort函数原型voidqsort(void*base,size_tnum,size_twidth,int(*compare)(constvoid*elem1,constvoid*elem2));其中compare为比较函数的函数指针width为字节大小elem1和elem2分别为两个需要比较的元素地址num为比较的元素个数1.快速排序整形数组#include<stdio.h> #includ..
分类:其他   时间:2015-12-11 06:57:04    收藏:0  评论:0  赞:0  阅读:287
管理交换空间
管理交换空间一、概念:交换空间是可与Linux内核内存管理子系统配合使用的磁盘区域。用于通过保存不活动的内存页来补充系统RAM。(系统RAM与交换空间组合在一起称为虚拟内存)注:当系统内存不足时系统会调用虚拟内存,但由于交换空间位于磁盘上,读写性能相对内存太差,因此当..
分类:其他   时间:2015-12-11 06:56:54    收藏:0  评论:0  赞:0  阅读:214
不使用临时变量 依次交换两个已知数组的值
刚开始编写中间使用了一个临时数组!!浪费空间!后面优化到只使用一个临时变量!最后到不使用临时变量!#include<stdio.h>intmain(){ intarr1[]={1,2,3}; intarr2[]={4,5,6}; inti=0; intsz=sizeofarr1/sizeofarr1[0]; for(i=0;i<sz;i++) { arr1[i]=arr1[i]^arr2[i]..
分类:编程语言   时间:2015-12-11 06:56:34    收藏:0  评论:0  赞:0  阅读:264
折半查找算法的实现
算法设计思想如下:(1)设置初始区间,low=1;high=length。(2)当low>high时,返回查找失败信息。(3)取中点,low<=high,mid=(low+high)/2。a.若kx<a[mid],查找改在左半区进行,high=mid-1;转向步骤(2)。b.若kx>a[mid],查找改在右半区进行,low=mid+1;转向..
分类:编程语言   时间:2015-12-11 06:56:24    收藏:0  评论:0  赞:0  阅读:321
简述CCNode和Sprite的渲染过程
Sprite创建时,加载纹理,产生纹理id。Sprite重写(override)Node中的drawvoidSprite::draw(Renderer*renderer,constMat4&transform,uint32_tflags){//Don‘tdocalculatethecullingifthetransformwasnotupdated_insideBounds=(flags&FLAGS_TRANSFORM_DIRTY)?renderer->..
分类:其他   时间:2015-12-11 06:56:14    收藏:0  评论:0  赞:0  阅读:174
MySQL存储引擎
1、简介mysql使用插件式存储引擎,支持第三方存储引擎,数据库的很多特性都有存储引擎决定存储引擎是表级别的概念也称为表类型,在创建表中可以单独定义,同一个数据库不建议使用多个存储引擎mysql在5.1及之前的版本默认的存储引擎是MyISAM,现在是InnoDB,最大的区别就是InnoDB..
分类:数据库技术   时间:2015-12-11 06:55:44    收藏:0  评论:0  赞:0  阅读:206
jquery点击toggle并改变图片src
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/><ti..
分类:Web开发   时间:2015-12-11 06:55:34    收藏:0  评论:0  赞:0  阅读:181
CentOS7 root 密码破解
输出时间:2015年12月11日星期五root密码破解01.按e进入菜单编辑模式02.在linux6字段,找到ro字符,将其改为rord.breakenforcing=003.ctrl+x保存重启,进入单用户模式04.进入系统根分区#chroot/sysroot05.修改root密码#passwdroot06.根目录下创建隐藏文件.autorelabel(前面第二..
分类:其他   时间:2015-12-11 06:55:24    收藏:0  评论:0  赞:0  阅读:269
VMware创建虚拟机教程详解及问题解决
关于VMware WorkstationPro虚拟机创建教程,本教程主要详细描述使用软件VMwareWorkstation Pro建虚拟系统过程中步骤详解,以及个人安装时所出现部分问题的解决方案。VMwareWorkstation 虚拟机是采用虚拟化技术的模拟器一、操作环境描述硬件:联想小新v4000笔记本软件:VMware W..
分类:系统服务   时间:2015-12-11 06:55:14    收藏:0  评论:0  赞:0  阅读:189
Cocos2D-Android-1之源码详解:22.TileMapTest
packageorg.cocos2d.tests;importjava.util.HashMap;importjavax.microedition.khronos.opengles.GL10;importorg.cocos2d.actions.base.CCRepeatForever;importorg.cocos2d.actions.instant.CCCallFuncN;importorg.cocos2d.actions.interval.CCFadeIn;importorg.cocos2d.action..
分类:移动平台   时间:2015-12-11 06:55:05    收藏:0  评论:0  赞:0  阅读:297
参观移动公司机房感想
12月10日,我们参加了老男孩老师组织的参观北京昌平区移动园区的某公司机房活动,收获也不少,所以也是很感谢老男孩老师和北京中国移动园区所有相关的工作人员对我们这些学生所做的帮助。早上,我们一起步行走到北京昌平区中国移动园区,路上阳光灿烂,同学们有说有笑的,心情..
分类:移动平台   时间:2015-12-11 06:54:54    收藏:0  评论:0  赞:0  阅读:219
加班到底有什么用
给程序员施加高压,以期他们能够很快地完成某项工作,这种做法已经被证明是最差的策略……...
分类:其他   时间:2015-12-11 06:52:34    收藏:0  评论:0  赞:0  阅读:105
[lintcode medium]3 sum
3SumGiven an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum...
分类:其他   时间:2015-12-11 06:52:04    收藏:0  评论:0  赞:0  阅读:132
[lintcode medium]4 sum
4SumGiven an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target?Find all unique quadruplets in the array w...
分类:其他   时间:2015-12-11 06:51:54    收藏:0  评论:0  赞:0  阅读:171
284. Peeking Iterator
题目:Given an Iterator class interface with methods:next()andhasNext(), design and implement a PeekingIterator that support thepeek()operation -- it ess...
分类:其他   时间:2015-12-11 06:51:44    收藏:0  评论:0  赞:0  阅读:471
C#如何在DataGridViewCell中自定义脚本编辑器
上一篇博文探讨了如何自定义DataGridViewColumn实现一个TreeViewColumn来在DataGridView控件中显示TreeView控件,其实我们还可以继续发挥想象,自定义其他的列类型,下面介绍一个脚本编辑器列类型,我这里取名ScriptTextEditorColumn,当用户单...
分类:Windows开发   时间:2015-12-11 06:51:34    收藏:0  评论:0  赞:0  阅读:368
[lintcode medium]Divide Two Integers
Divide Two IntegersDivide two integers without using multiplication, division and mod operator.If it is overflow, return 2147483647ExampleGiven divide...
分类:其他   时间:2015-12-11 06:51:24    收藏:0  评论:0  赞:0  阅读:140
[lintcode medium] Two sum
Two SumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the...
分类:其他   时间:2015-12-11 06:51:14    收藏:0  评论:0  赞:0  阅读:190
字符串定长顺序存储表示模板
1 ///page71 2 ///测试样例:nihao 3 ///output 4 /*5 5 5 nihao 6 0 7 10 nihaonihao 8 4 aoni 9 4 10 14 nihaoaoninihao 11 9 noninihao 12 13 nombx...
分类:其他   时间:2015-12-11 06:51:04    收藏:0  评论:0  赞:0  阅读:265
支线任务-6
Max Points on a LineGivennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.题目简洁易懂,给二维平面上的 n 个点,要找出一条包含最多点的直线...
分类:其他   时间:2015-12-11 06:50:54    收藏:0  评论:0  赞:0  阅读:230
2039条   上一页 1 ... 87 88 89 90 91 ... 102 下一页
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!