码迷,mamicode.com
首页 > 全部
Html 5 新语义标签
HTML5新标签======================================================================1.DOCTYPE<!DOCTYPEhtml>2.<meta>---字符编码方式<metacharset="utf-8">3.<link><linkrel="stylesheet"href="file.css">4.<script><scriptsrc="fil..
分类:Web程序   时间:2016-05-13 05:16:04    阅读次数:220
new和alloc
[XXXXnew]其实等同[[XXXXalloc]init]建议使用后者
分类:其他好文   时间:2016-05-13 05:13:43    阅读次数:113
保存图片
保存到文件//**************存图片*******************NSArray*paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);NSString*filePath=[[pathsobjectAtIndex:0]stringByAppendingPathComponent:[NSStringstringWithFormat:@"%@.png",@"jiet..
分类:其他好文   时间:2016-05-13 05:13:21    阅读次数:97
iOS图像处理之裁剪
两行代码而已CGRectcutRect=CGRectMake(originImage.size.width/2,originImage.size.height/2,originImage.size.width/2,originImage.size.height/2);UIImage*cutImage=[UIImagep_w_picpathWithCGImage:CGImageCreateWithImageInRect([originImageCGImage],cutRect)];
分类:移动开发   时间:2016-05-13 05:14:39    阅读次数:152
iOS图像处理之绘制直线
-(void)drawLine:(CGPoint)fromPnttoPoint:(CGPoint)toPnt{floatxScale=theImageView.p_w_picpath.size.width/theImageView.frame.size.width;floatyScale=theImageView.p_w_picpath.size.height/theImageView.frame.size.height;UIGraphicsBeginImageContext(theImageView.p_w..
分类:移动开发   时间:2016-05-13 05:12:32    阅读次数:239
iOS图片的压缩
1.压缩质量UIImageJPEGRepresent2.压缩分辨率-(UIImage*)scaleToSize:(UIImage*)imgsize:(CGSize)size{//创建一个bitmap的context//并把它设置成为当前正在使用的contextUIGraphicsBeginImageContext(size);//绘制改变大小的图片[imgdrawInRect:CGRectMake(0,0,size.width,size..
分类:移动开发   时间:2016-05-13 05:12:05    阅读次数:301
iOS textview排版
-(IBAction)changeText:(id)sender{NSMutableParagraphStyle*paragraphStyle=[[NSMutableParagraphStylealloc]init];paragraphStyle.alignment=NSTextAlignmentCenter;paragraphStyle.paragraphSpacing=12.0f;NSMutableDictionary*attributes=[NSMutableDictionarydictionary];..
分类:移动开发   时间:2016-05-13 05:13:53    阅读次数:268
iOS EGORefreshTableHeaderView使用方法
废话不多说,直接上传代码说明1.把EGORefreshTableHeaderView.h和EGORefreshTableHeaderView.m文件拉入到工程2.viewcontroller文件添加引用#import"EGORefreshTableHeaderView.h"和协议<</span>EGORefreshTableHeaderDelegate>3.定义对象EGORefreshTableHeaderView..
分类:移动开发   时间:2016-05-13 05:12:56    阅读次数:187
iOS表示图下拉刷新控件
UIRefreshControl用的是这个控件。UITableViewController中有refreshControl这个属性。表格的初始化和数据设置与常规一致。1:初始化UIRefreshControl控件,并绑定下拉事件//添加下拉刷新控件UIRefreshControl*rc=[[UIRefreshControlalloc]init];rc.attributedTitle=[[NSAttrib..
分类:移动开发   时间:2016-05-13 05:11:31    阅读次数:207
Python基础01-20160510
1、数据类型1.1整型1.2浮点型1.3布尔类型功能:判断真假 >>>0==False True >>>1==False False1.4字符串2、列表>>>name_list[‘alex‘,‘65brother‘,‘tenglan‘,‘lanyulei‘,‘lanyulei‘,‘lanyulei‘,‘lanyulei‘]>>>foriinrange(name_list.count(‘..
分类:编程语言   时间:2016-05-13 05:12:46    阅读次数:154
iOS NSArray,结构体
添加结构体,用nsvlue类typedefstruct{NSUIntegerline;NSUIntegerrow;}TileLocation;//转换为NSValueNSValue*value=[NSValuevalueWithBytes:&tileLocobjCType:@encode(TileLocation)];//转换回结构体TileLocationloc;[valuegetValue:&loc];CGRectrect1=CGRectMake(0,0,..
分类:移动开发   时间:2016-05-13 05:12:11    阅读次数:246
【DAY1】Java的运行机制
以代码为例publicclassHelloWorld{ publicstaticvoidmain(String[]args){ System.out.println("helloworld"); } }编译之后,得到了HelloWorld.class然后让虚拟机器来执行这个HelloWorld。1.虚拟机会在classpath中找到HelloWorld.class。2.虚拟机中的解释器会把HelloWorld.class..
分类:编程语言   时间:2016-05-13 05:11:18    阅读次数:152
zabbix监控nginx
1.在nginx中开启状态模板[root@web03~]#vim/usr/local/nginx-1.8.0/conf/nginx.conflocation/stat{stub_statuson;access_logoff;allow本机的IP地址;#只允许本机访问denyall;}2.写出监控nginx的脚本[root@web03~]#vim/home/shell/nc_nginx_check.sh#!/bin/bash#Scripttofetchngi..
分类:其他好文   时间:2016-05-13 05:13:18    阅读次数:245
DNS脚本
#!/bin/bash serviceiptablesstop setenforce0 read-p"inputyourip:"IP echo$IP>/tmp/ip awk-F\.-vOFS=‘.‘‘{print$3,$2,$1}‘>>/tmp/ip2/tmp/ip ZIP=`cat/tmp/ip2` awk-F\.-vOFS=‘.‘‘{print$4}‘>>/tmp/ip3/tmp/ip LIP=`cat/tmp/ip3` NET=/etc/sysconfig/network..
分类:其他好文   时间:2016-05-13 05:11:56    阅读次数:194
zabbix客户端安装
Zabbix客户端安装1.下载安装包官网下载:http://www.zabbix.com/download.php2.安装[root@localhostmedia]#tarzxvfzabbix-3.0.0beta1.tar.gz[root@localhostmedia]#cdzabbix-3.0.0beta1[root@localhostzabbix-3.0.0beta1]#./configure--enable-agent[root@localhostzabbix-3.0...
分类:其他好文   时间:2016-05-13 05:12:50    阅读次数:116
简单堆的创建和操作
回顾前面的知识,我们学了二叉树,而二叉树有很多种存储方式,比如一维数组存储,链表存储,在刚刚学习建立二叉树的时候,我们用的是链表存储的方式,也就是利用结构体定义一个二叉树节点,然后将这些节点连接起来。现在为了更好地存储二叉树,我们学习了堆,即将二叉树存储在..
分类:其他好文   时间:2016-05-13 05:12:46    阅读次数:138
Linux(一)
Linux一,计算机计算机五大单元:1,输入单元:包括键盘,鼠标,扫描仪,手写板等。2,中央处理器(CPU):含有算数逻辑,控制,记忆等单元。3,输出单元:显示器,打印机等。计算机处理过程:冯诺依曼体系结构存储器指内存,CPU读取的数据都是从内存中来的,CPU处理完成的数据..
分类:系统相关   时间:2016-05-13 05:11:00    阅读次数:296
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!