iOS绘图教程
- - (void) drawRect: (CGRect) rect {
- UIBezierPath* p = [UIBezierPathbezierPathWithOvalInRect:CGRectMake(0,0,100,100)];
- [[UIColor blueColor] setFill];
- [p fill];
- }
- - (void) drawRect: (CGRect) rect {
- CGContextRef con = UIGraphicsGetCurrentContext();
- CGContextAddEllipseInRect(con, CGRectMake(0,0,100,100));
- CGContextSetFillColorWithColor(con, [UIColor blueColor].CGColor);
- CGContextFillPath(con);
- }
- @interface MyLayerDelegate : NSObject
- @end
- @implementation MyLayerDelegate
- - (void)drawLayer:(CALayer*)layer inContext:(CGContextRef)ctx {
- UIGraphicsPushContext(ctx);
- UIBezierPath* p = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0,0,100,100)];
- [[UIColor blueColor] setFill];
- [p fill];
- UIGraphicsPopContext();
- }
- @end
- @interface MyView () {
- MyLayerDelegate* _layerDeleagete;
- }
- @end
- MyView *myView = [[MyView alloc] initWithFrame: CGRectMake(0, 0, 320, 480)];
- CALayer *myLayer = [CALayer layer];
- _layerDelegate = [[MyLayerDelegate alloc] init];
- myLayer.delegate = _layerDelegate;
- [myView.layer addSublayer:myLayer];
- [myView setNeedsDisplay]; // 调用此方法,drawLayer: inContext:方法才会被调用。
- - (void)drawLayer:(CALayer*)lay inContext:(CGContextRef)con {
- CGContextAddEllipseInRect(con, CGRectMake(0,0,100,100));
- CGContextSetFillColorWithColor(con, [UIColor blueColor].CGColor);
- CGContextFillPath(con);
- }
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(100,100), NO, 0);
- UIBezierPath* p = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0,0,100,100)];
- [[UIColor blueColor] setFill];
- [p fill];
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(100,100), NO, 0);
- CGContextRef con = UIGraphicsGetCurrentContext();
- CGContextAddEllipseInRect(con, CGRectMake(0,0,100,100));
- CGContextSetFillColorWithColor(con, [UIColor blueColor].CGColor);
- CGContextFillPath(con);
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- UIImage* mars = [UIImage imageNamed:@"Mars.png"];
- CGSize sz = [mars size];
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(sz.width*2, sz.height), NO, 0);
- [mars drawAtPoint:CGPointMake(0,0)];
- [mars drawAtPoint:CGPointMake(sz.width,0)];
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- UIImageView* iv = [[UIImageView alloc] initWithImage:im];
- [self.window.rootViewController.view addSubview: iv];
- iv.center = self.window.center;

- UIImage* mars = [UIImage imageNamed:@"Mars.png"];
- CGSize sz = [mars size];
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(sz.width*2, sz.height*2), NO, 0);
- [mars drawInRect:CGRectMake(0,0,sz.width*2,sz.height*2)];
- [mars drawInRect:CGRectMake(sz.width/2.0, sz.height/2.0, sz.width, sz.height) blendMode:kCGBlendModeMultiply alpha:1.0];
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();

- UIImage* mars = [UIImage imageNamed:@"Mars.png"];
- CGSize sz = [mars size];
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(sz.width/2.0, sz.height), NO, 0);
- [mars drawAtPoint:CGPointMake(-sz.width/2.0, 0)];
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();

- UIImage* mars = [UIImage imageNamed:@"Mars.png"];
- // 抽取图片的左右半边
- CGSize sz = [mars size];
- CGImageRef marsLeft = CGImageCreateWithImageInRect([mars CGImage],CGRectMake(0,0,sz.width/2.0,sz.height));
- CGImageRef marsRight = CGImageCreateWithImageInRect([mars CGImage],CGRectMake(sz.width/2.0,0,sz.width/2.0,sz.height));
- // 将每一个CGImage绘制到图形上下文中
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(sz.width*1.5, sz.height), NO, 0);
- CGContextRef con = UIGraphicsGetCurrentContext();
- CGContextDrawImage(con, CGRectMake(0,0,sz.width/2.0,sz.height), marsLeft);
- CGContextDrawImage(con, CGRectMake(sz.width,0,sz.width/2.0,sz.height), marsRight);
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- // 记得释放内存,ARC在这里无效
- CGImageRelease(marsLeft);
- CGImageRelease(marsRight);
- CGImageRef flip (CGImageRef im) {
- CGSize sz = CGSizeMake(CGImageGetWidth(im), CGImageGetHeight(im));
- UIGraphicsBeginImageContextWithOptions(sz, NO, 0);
- CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, sz.width, sz.height), im);
- CGImageRef result = [UIGraphicsGetImageFromCurrentImageContext() CGImage];
- UIGraphicsEndImageContext();
- return result;
- }
- CGContextDrawImage(con, CGRectMake(0,0,sz.width/2.0,sz.height), flip(marsLeft));
- CGContextDrawImage(con, CGRectMake(sz.width,0,sz.width/2.0,sz.height), flip(marsRight));
- UIImage* mars = [UIImage imageNamed:@"Mars.png"];
- CGSize sz = [mars size];
- // 转换CGImage并使用对应的CGImage尺寸截取图片的左右部分
- CGImageRef marsCG = [mars CGImage];
- CGSize szCG = CGSizeMake(CGImageGetWidth(marsCG), CGImageGetHeight(marsCG));
- CGImageRef marsLeft = CGImageCreateWithImageInRect(marsCG,CGRectMake(0,0,szCG.width/2.0,szCG.height));
- CGImageRef marsRight = CGImageCreateWithImageInRect(marsCG, CGRectMake(szCG.width/2.0,0,szCG.width/2.0,szCG.height));
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(sz.width*1.5, sz.height), NO, 0);
- //剩下的和之前的代码一样,修复倒置问题
- CGContextRef con = UIGraphicsGetCurrentContext();
- CGContextDrawImage(con, CGRectMake(0,0,sz.width/2.0,sz.height),flip(marsLeft));
- CGContextDrawImage(con, CGRectMake(sz.width,0,sz.width/2.0,sz.height),flip(marsRight));
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- CGImageRelease(marsLeft);
- CGImageRelease(marsRight);
- UIImage* mars = [UIImage imageNamed:@"Mars.png"];
- CGSize sz = [mars size];
- CGImageRef marsCG = [mars CGImage];
- CGSize szCG = CGSizeMake(CGImageGetWidth(marsCG), CGImageGetHeight(marsCG));
- CGImageRef marsLeft = CGImageCreateWithImageInRect(marsCG, CGRectMake(0,0,szCG.width/2.0,szCG.height));
- CGImageRef marsRight = CGImageCreateWithImageInRect(marsCG, CGRectMake(szCG.width/2.0,0,szCG.width/2.0,szCG.height));
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(sz.width*1.5, sz.height), NO, 0);
- [[UIImage imageWithCGImage:marsLeft scale:[mars scale] orientation:UIImageOrientationUp] drawAtPoint:CGPointMake(0,0)];
- [[UIImage imageWithCGImage:marsRight scale:[mars scale] orientation:UIImageOrientationUp] drawAtPoint:CGPointMake(sz.width,0)];
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- CGImageRelease(marsLeft); CGImageRelease(marsRight);
- UIImage* moi = [UIImage imageNamed:@"Mars.jpeg"];
- CIImage* moi2 = [[CIImage alloc] initWithCGImage:moi.CGImage];
- CIFilter* grad = [CIFilter filterWithName:@"CIRadialGradient"];
- CIVector* center = [CIVector vectorWithX:moi.size.width / 2.0 Y:moi.size.height / 2.0];
- // 使用setValue:forKey:方法设置滤镜属性
- [grad setValue:center forKey:@"inputCenter"];
- // 在指定滤镜名时提供所有滤镜键值对
- CIFilter* dark = [CIFilter filterWithName:@"CIDarkenBlendMode" keysAndValues:@"inputImage", grad.outputImage, @"inputBackgroundImage", moi2, nil];
- CIContext* c = [CIContext contextWithOptions:nil];
- CGImageRef moi3 = [c createCGImage:dark.outputImage fromRect:moi2.extent];
- UIImage* moi4 = [UIImage imageWithCGImage:moi3 scale:moi.scale orientation:moi.imageOrientation];
- CGImageRelease(moi3);

- - (void)drawRect:(CGRect)rect {
- CGContextRef ctx = UIGraphicsGetCurrentContext();
- CGContextSaveGState(ctx);
- {
- // 绘图代码
- }
- CGContextRestoreGState(ctx);
- }

- CGContextRef con = UIGraphicsGetCurrentContext();
- CGContextSetFillColorWithColor(con, [UIColor blueColor].CGColor);
- CGContextFillRect(con, rect);
- CGContextClearRect(con, CGRectMake(0,0,30,30));

- CGContextRef con = UIGraphicsGetCurrentContext();
- // 绘制一个黑色的垂直黑色线,作为箭头的杆子
- CGContextMoveToPoint(con, 100, 100);
- CGContextAddLineToPoint(con, 100, 19);
- CGContextSetLineWidth(con, 20);
- CGContextStrokePath(con);
- // 绘制一个红色三角形箭头
- CGContextSetFillColorWithColor(con, [[UIColor redColor] CGColor]);
- CGContextMoveToPoint(con, 80, 25);
- CGContextAddLineToPoint(con, 100, 0);
- CGContextAddLineToPoint(con, 120, 25);
- CGContextFillPath(con);
- // 从箭头杆子上裁掉一个三角形,使用清除混合模式
- CGContextMoveToPoint(con, 90, 101);
- CGContextAddLineToPoint(con, 100, 90);
- CGContextAddLineToPoint(con, 110, 101);
- CGContextSetBlendMode(con, kCGBlendModeClear);
- CGContextFillPath(con);
- UIBezierPath* p = [UIBezierPath bezierPath];
- [p moveToPoint:CGPointMake(100,100)];
- [p addLineToPoint:CGPointMake(100, 19)];
- [p setLineWidth:20];
- [p stroke];
- [[UIColor redColor] set];
- [p removeAllPoints];
- [p moveToPoint:CGPointMake(80,25)];
- [p addLineToPoint:CGPointMake(100, 0)];
- [p addLineToPoint:CGPointMake(120, 25)];
- [p fill];
- [p removeAllPoints];
- [p moveToPoint:CGPointMake(90,101)];
- [p addLineToPoint:CGPointMake(100, 90)];
- [p addLineToPoint:CGPointMake(110, 101)];
- [p fillWithBlendMode:kCGBlendModeClear alpha:1.0];
- - (void)drawRect:(CGRect)rect {
- CGContextRef ctx = UIGraphicsGetCurrentContext();
- CGContextSetStrokeColorWithColor(ctx, [UIColor blackColor].CGColor);
- CGContextSetLineWidth(ctx, 3);
- UIBezierPath *path;
- path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(100, 100, 100, 100) byRoundingCorners:(UIRectCornerTopLeft |UIRectCornerTopRight) cornerRadii:CGSizeMake(10, 10)];
- [path stroke];
- }

- CGContextRef con = UIGraphicsGetCurrentContext();
- // 在上下文裁剪区域中挖一个三角形状的孔
- CGContextMoveToPoint(con, 90, 100);
- CGContextAddLineToPoint(con, 100, 90);
- CGContextAddLineToPoint(con, 110, 100);
- CGContextClosePath(con);
- CGContextAddRect(con, CGContextGetClipBoundingBox(con));
- // 使用奇偶规则,裁剪区域为矩形减去三角形区域
- CGContextEOClip(con);
- // 绘制垂线
- CGContextMoveToPoint(con, 100, 100);
- CGContextAddLineToPoint(con, 100, 19);
- CGContextSetLineWidth(con, 20);
- CGContextStrokePath(con);
- // 画红色箭头
- CGContextSetFillColorWithColor(con, [[UIColor redColor] CGColor]);
- CGContextMoveToPoint(con, 80, 25);
- CGContextAddLineToPoint(con, 100, 0);
- CGContextAddLineToPoint(con, 120, 25);
- CGContextFillPath(con);

- CGContextRef con = UIGraphicsGetCurrentContext();
- CGContextSaveGState(con);
- // 在上下文裁剪区域挖一个三角形孔
- CGContextMoveToPoint(con, 90, 100);
- CGContextAddLineToPoint(con, 100, 90);
- CGContextAddLineToPoint(con, 110, 100);
- CGContextClosePath(con);
- CGContextAddRect(con, CGContextGetClipBoundingBox(con));
- CGContextEOClip(con);
- //绘制一个垂线,让它的轮廓形状成为裁剪区域
- CGContextMoveToPoint(con, 100, 100);
- CGContextAddLineToPoint(con, 100, 19);
- CGContextSetLineWidth(con, 20);
- // 使用路径的描边版本替换图形上下文的路径
- CGContextReplacePathWithStrokedPath(con);
- // 对路径的描边版本实施裁剪
- CGContextClip(con);
- // 绘制渐变
- CGFloat locs[3] = { 0.0, 0.5, 1.0 };
- CGFloat colors[12] = {
- 0.3,0.3,0.3,0.8, // 开始颜色,透明灰
- 0.0,0.0,0.0,1.0, // 中间颜色,黑色
- 0.3,0.3,0.3,0.8 // 末尾颜色,透明灰
- };
- CGColorSpaceRef sp = CGColorSpaceCreateDeviceGray();
- CGGradientRef grad = CGGradientCreateWithColorComponents (sp, colors, locs, 3);
- CGContextDrawLinearGradient(con, grad, CGPointMake(89,0), CGPointMake(111,0), 0);
- CGColorSpaceRelease(sp);
- CGGradientRelease(grad);
- CGContextRestoreGState(con); // 完成裁剪
- // 绘制红色箭头
- CGContextSetFillColorWithColor(con, [[UIColor redColor] CGColor]);
- CGContextMoveToPoint(con, 80, 25);
- CGContextAddLineToPoint(con, 100, 0);
- CGContextAddLineToPoint(con, 120, 25);
- CGContextFillPath(con);
- CGColorSpaceRef sp2 = CGColorSpaceCreatePattern(NULL);
- CGContextSetFillColorSpace (con, sp2);
- CGColorSpaceRelease (sp2);
- CGPatternCallbacks callback = {0, &drawStripes, NULL };
- CGAffineTransform tr = CGAffineTransformIdentity;
- CGPatternRef patt = CGPatternCreate(NULL,CGRectMake(0,0,4,4), tr, 4, 4, kCGPatternTilingConstantSpacingMinimalDistortion, true, &callback);
- CGFloat alph = 1.0;
- CGContextSetFillPattern(con, patt, &alph);
- CGPatternRelease(patt);
- void drawStripes (void *info, CGContextRef con) {
- // assume 4 x 4 cell
- CGContextSetFillColorWithColor(con, [[UIColor redColor] CGColor]);
- CGContextFillRect(con, CGRectMake(0,0,4,4));
- CGContextSetFillColorWithColor(con, [[UIColor blueColor] CGColor]);
- CGContextFillRect(con, CGRectMake(0,0,4,2));
- }

- - (void)drawRect:(CGRect)rect {
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(40,100), NO, 0.0);
- CGContextRef con = UIGraphicsGetCurrentContext();
- CGContextSaveGState(con);
- CGContextMoveToPoint(con, 90 - 80, 100);
- CGContextAddLineToPoint(con, 100 - 80, 90);
- CGContextAddLineToPoint(con, 110 - 80, 100);
- CGContextMoveToPoint(con, 110 - 80, 100);
- CGContextAddLineToPoint(con, 100 - 80, 90);
- CGContextAddLineToPoint(con, 90 - 80, 100);
- CGContextClosePath(con);
- CGContextAddRect(con, CGContextGetClipBoundingBox(con));
- CGContextEOClip(con);
- CGContextMoveToPoint(con, 100 - 80, 100);
- CGContextAddLineToPoint(con, 100 - 80, 19);
- CGContextSetLineWidth(con, 20);
- CGContextReplacePathWithStrokedPath(con);
- CGContextClip(con);
- CGFloat locs[3] = { 0.0, 0.5, 1.0 };
- CGFloat colors[12] = {
- 0.3,0.3,0.3,0.8,
- 0.0,0.0,0.0,1.0,
- 0.3,0.3,0.3,0.8
- };
- CGColorSpaceRef sp = CGColorSpaceCreateDeviceGray();
- CGGradientRef grad = CGGradientCreateWithColorComponents (sp, colors, locs, 3);
- CGContextDrawLinearGradient (con, grad, CGPointMake(89 - 80,0), CGPointMake(111 - 80,0), 0);
- CGColorSpaceRelease(sp);
- CGGradientRelease(grad);
- CGContextRestoreGState(con);
- CGColorSpaceRef sp2 = CGColorSpaceCreatePattern(NULL);
- CGContextSetFillColorSpace (con, sp2);
- CGColorSpaceRelease (sp2);
- CGPatternCallbacks callback = {0, &drawStripes, NULL };
- CGAffineTransform tr = CGAffineTransformIdentity;
- CGPatternRef patt = CGPatternCreate(NULL,CGRectMake(0,0,4,4),tr,4,4,kCGPatternTilingConstantSpacingMinimalDistortion,true, &callback);
- CGFloat alph = 1.0;
- CGContextSetFillPattern(con, patt, &alph);
- CGPatternRelease(patt);
- CGContextMoveToPoint(con, 80 - 80, 25);
- CGContextAddLineToPoint(con, 100 - 80, 0);
- CGContextAddLineToPoint(con, 120 - 80, 25);
- CGContextFillPath(con);
- UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
- con = UIGraphicsGetCurrentContext();
- [im drawAtPoint:CGPointMake(0,0)];
- for (int i=0; i<3; i++) {
- CGContextTranslateCTM(con, 20, 100);
- CGContextRotateCTM(con, 30 * M_PI/180.0);
- CGContextTranslateCTM(con, -20, -100);
- [im drawAtPoint:CGPointMake(0,0)];
- }
- }

- CGContextTranslateCTM(con, 0, theHeight);
- CGContextScaleCTM(con, 1.0, -1.0);
- CGContextTranslateCTM(con, 0, sz.height); // sz为[mars size]
- CGContextScaleCTM(con, 1.0, -1.0);
- CGContextDrawImage(con, CGRectMake(0, 0, sz.width/2.0, sz.height), marsLeft);
- CGContextDrawImage(con, CGRectMake(b.size.width-sz.width/2.0, 0, sz.width/2.0, sz.height),marsRight);
- con = UIGraphicsGetCurrentContext();
- CGContextSetShadow(con, CGSizeMake(7, 7), 12);
- [im drawAtPoint:CGPointMake(0,0)];
- con = UIGraphicsGetCurrentContext();
- CGContextSetShadow(con, CGSizeMake(7, 7), 12);
- CGContextBeginTransparencyLayer(con, NULL);
- [im drawAtPoint:CGPointMake(0,0)];
- for (int i=0; i<3; i++) {
- CGContextTranslateCTM(con, 20, 100);
- CGContextRotateCTM(con, 30 * M_PI/180.0);
- CGContextTranslateCTM(con, -20, -100);
- [im drawAtPoint:CGPointMake(0,0)];
- }
- // 在调用了CGContextEndTransparencyLayer函数之后,
- // 图层内容会在应用全局alpha和上下文阴影状态之后被合成到上下文中
- CGContextEndTransparencyLayer(con);


- CGContextFillRect(con, CGRectMake(100,0,1.0/self.contentScaleFactor,100));
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- self.window.rootViewController = [UIViewController new];
- MyView* mv =[[MyView alloc] initWithFrame:CGRectMake(0, 0, self.window.bounds.size.width - 50, 150)];
- mv.center = self.window.center;
- [self.window.rootViewController.view addSubview: mv];
- mv.opaque = NO;
- mv.tag = 111; // so I can get a reference to this view later
- [self performSelector:@selector(resize:) withObject:nil afterDelay:0.1];
- self.window.backgroundColor = [UIColor whiteColor];
- [self.window makeKeyAndVisible];
- return YES;
- }

iOS绘图教程的更多相关文章
- iOS绘图教程 (转,拷贝以记录)
本文是<Programming iOS5>中Drawing一章的翻译,考虑到主题完整性,在翻译过程中我加入了一些书中没有涉及到的内容.希望本文能够对你有所帮助. 转自:http://www ...
- IOS 绘图教程Quartz2D
http://www.cocoachina.com/industry/20140115/7703.html http://www.cnblogs.com/wendingding/p/3803020.h ...
- iOS绘图框架CoreGraphics分析
由于CoreGraphics框架有太多的API,对于初次接触或者对该框架不是十分了解的人,在绘图时,对API的选择会感到有些迷茫,甚至会觉得iOS的图形绘制有些繁琐.因此,本文主要介绍一下iOS的绘图 ...
- iOS开发--绘图教程
本文是<Programming iOS5>中Drawing一章的翻译,考虑到主题完整性,翻译版本中加入了一些书中未涉及到的内容.希望本文能够对你有所帮助. 本文由海水的味道翻译整理,转载请 ...
- [[iso教程]] 《4个月ios实体教程》全网最新、最全ios视频教程
全网最新.最全ios视频教程 内容简介 <ios实体教程>主要介绍如何使用iOS提供的强大工具集创建iOS应用.全视频对iOS操作系统做了全面的介绍,首先讲解如何构建应用程序的用户界面,涵 ...
- fir.im Weekly - 给女朋友的 iOS 开发教程
俗话说:技多不压身,功到自然成.本期 fir.im Weekly 收集的热度资源,大部分关于Android.iOS 开发工具和源码,还有一些有关设计的 Tips ,希望对你有帮助. 给女朋友的 iOS ...
- 论文第4章:iOS绘图平台的实现
面向移动设备的矢量绘图平台设计与实现 Design and Implementation of Mobile Device-oriented Vector Drawing Platform 引用本论文 ...
- IOS绘图
#import "ViewController.h" #import "DrawView.h" @interface ViewController () @pr ...
- IOS 学习教程
IOS 学习教程http://www.gaixue.com/course/236#### 讲课http://wenku.baidu.com/view/6786064fe518964bcf847c63. ...
随机推荐
- asp.net cookie和session的详细使用
cookie使用代码: //设置Cookie HttpCookie setCookie = new HttpCookie("test"); setCookie.Values.Add ...
- RHEL-resolv.conf文件修改后重启被还原
修改resolve.conf文件之后,reboot或service restart network时,修改的内容被还原.关闭NetworkManager即可.# chkconfig |grep Net ...
- 安装VMware Sphere ESXi 5.5
安装VMware Sphere ESXi 5.5 1.准备 待安装ESXi 5.5的机器需要大于2GB以上内存,并且支持64位和虚拟化. 下载:VMware-VMvisor-Installer-5.5 ...
- ewebeditor下利用ckplayer增加html5 (mp4)全平台的支持
学校数字化平台富文本编辑器一直用的ewebeditor,应该说非常的好,支持常用office文档的直接导入,极大的方便了老师们资料的上传,最近在规划整个数字化校园向全平台改版,框架采用bootstra ...
- MySql安装与卸载
win2003下MySql的配置 准备相关组件 1.MySql安装包 mysql-installer-commercial- 5.6.14.0.msi 2.Microsoft .NETFramewor ...
- (四)CodeMirror - API
内容相关 cm.getValue() cm.setValue() cm.getRange() editor.getRange({line:1},{line:2}) // 获取内容块字符 cm.repl ...
- 后缀自动机/回文自动机/AC自动机/序列自动机----各种自动机(自冻鸡) 题目泛做
题目1 BZOJ 3676 APIO2014 回文串 算法讨论: cnt表示回文自动机上每个结点回文串出现的次数.这是回文自动机的定义考查题. #include <cstdlib> #in ...
- Kendo Web UI Grid里时间格式转换
我和大家分享一下我的kendo的学习心得.如果不好的地方多多包含或者给我留言请看图 kendo里时间格式如图Oder Date列里的格式.但是我们想把时间转换成中国人习惯的格式.如Shipped Da ...
- jquery navi
/// <reference path="../global.js" /> /********************************************* ...
- linux 文件查找和压缩工具
文件查找 1,which命行查找可执行文件,which 只会搜索系统$PATH目录 2,whereis,查找可执行文件,并显示出此文件的man page文件,并且可以查找到系统的库目录 3,locat ...