首页 软件开发 代码片段 ( Page 578 )

代码片段 8064

#Python
有道词典导出的xml生词本文件提取出单词

import xml.sax import os,sys class WordsHandler(xml.sax.ContentHandler): def __init__(self…

#Objective-C
iOS相应触屏事件代码

//在一个函数里面(初始化等)里面添加要识别触摸事件的范围 infoView=[[UIView alloc] initWithFrame:CGRectMake(20, 100,22…

2015-01-20 549

#Objective-C
iOS文件操作的代码

NSData *condata = responseObject; //设置编码格式,这种编码格式可以正常读取中文 NSStringEncoding enc = CFStringC…

2015-01-20 292

#Objective-C
iOS应用中网络等待Loading的实现方法

UIWebView加载Loading…两种方法 第一种方法:使用UIView and UIActivityIndicatorView //创建UIWebView Web…

2015-01-20 594

#Objective-C
iOS视图翻页过渡效果

CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:…

2015-01-20 537

#Java
MD5加密Java工具类

import java.security.MessageDigest; public class MD5 { //公盐 private static final String PU…

2015-01-20 341

#Objective-C
iOS通过http post上传图片

//ASIFormDataRequest方式 POST上传图片 -(NSDictionary *)addPicWithDictionary:(NSDictionary *)suge…

2015-01-20 895

#Objective-C
iOS常用的几个动画代码

使用前 需引入QuartzCore.framework, 并在相关文件中加入 #import "QuartzCore/QuartzCore.h" 定义 shak…

2015-01-20 669

#PHP
一个自定义php错误函数

<?php //自定义的错误函数 function error_fun($error_no,$error_msg){ $error_lev=''; switch ($erro…

php
2015-01-20 381

#Java
Android处理网络和图片的工具类

1:网络的底层环境 采用apache 的httpClient 链接池框架 2:图片缓存采用基于LRU 的算法 3:网络接口采用监听者模式 4 包含图片的OOM 处理(及时回收处理技…

2015-01-20 582

#SQL
oschina-过年动弹抽奖sql

SELECT DISTINCT(u.id) FROM osc_opt_logs l, osc_users u WHERE l.user=u.id AND l.obj_type=10…

sql
2015-01-20 246

#Objective-C
iOS应用发送SMS短消息代码

//Import the MessageUI Framework into your project and //#import the header file into the …

2015-01-20 880