This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //IOS device support fonts(source url: http://iphonedevelopment.blogspot.com/2010/08/fonts-and-font-families.html) | |
| for (NSString *family in [UIFont familyNames]) | |
| { | |
| NSLog(@"%@", family); | |
| for (NSString *font in [UIFont fontNamesForFamilyName:family]) | |
| { | |
| NSLog(@"\t%@", font); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Arrays; | |
| import java.util.List; | |
| public class WeixinQQFaceUtil { | |
| private static final String WEIXIN_QQ_IMG_URL_PATH = "https://wx.qq.com/zh_CN/htmledition/images/qqface/{index}.png";//微信QQ表情符号代码转换为真正的表情图片路径(0~99) | |
| private static final String IMG_FILL_PATH = "<img style=\"width:24px;height:24px;\" src=\"{IMG_PATH}\"/>"; | |
| public static final List<String> WEIXIN_QQ_FACE_LIST;//微信中的QQ表情符号代码 | |
| static{ | |
| // weixin_QQ_face(# - split char) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*获取url键值对*/ | |
| function getParamsFromUrl() { | |
| var url = decodeURI(location.search); //获取url中"?"符后的字串 | |
| var params = new Object(); | |
| if (url.indexOf("?") != -1) { | |
| var str = url.substr(1); | |
| const strs = str.split("&"); | |
| for(var i = 0; i < strs.length; i ++) { | |
| params[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PaiLieUtil{ | |
| private String[] strs;//传入数组 | |
| private int[] array; | |
| private int num; //从数组中选出n个数 | |
| private int[] result; //将选出的n个数存入数组 | |
| private Set<String> set = new HashSet<String>(); | |
| private int count = 0; | |
| /** | |
| * 枚举出所有组合值(从sum数中选出n个数) | |
| * @param sum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //裁剪图片并生成缩略图 | |
| ImageUtil imageUtil = new ImageUtil(x, y, width, height); | |
| imageUtil.setSrcName(imgFileName); | |
| imageUtil.setSrcFile(img); | |
| imageUtil.setDesName(filename); | |
| imageUtil.setPath(path); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mei.testlucene; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import org.apache.lucene.analysis.Analyzer; | |
| import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
| import org.apache.lucene.document.Document; | |
| import org.apache.lucene.document.Field; | |
| import org.apache.lucene.document.TextField; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package thp.transition.utils; | |
| import java.io.BufferedWriter; | |
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.OutputStreamWriter; | |
| import org.dom4j.DocumentFactory; | |
| import org.dom4j.Element; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mei.util; | |
| import android.content.Context; | |
| import android.database.sqlite.SQLiteDatabase; | |
| import android.database.sqlite.SQLiteOpenHelper; | |
| public class DBHelp extends SQLiteOpenHelper{ | |
| private static final String DATABASE_NAME = "mysqlitedb"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mei.sqlite.test; | |
| import java.util.List; | |
| import com.mei.dao.UserDao; | |
| import com.mei.entity.User; | |
| import android.test.AndroidTestCase; | |
| public class UserDaoTestCase extends AndroidTestCase{ |
NewerOlder