- 博客(10)
- 资源 (4)
- 收藏
- 关注
原创 IOS - 页面跳转及返回 (push-pop,modal-dismiss)
ViewController之间常用的有以下2种: 1.UINavigationController 采用压栈和出栈的方式对 ViewController进行管理。 1)跳转 pushViewController SettingViewController *settingVC = [[SettingViewController alloc]init]; [self
2015-05-20 17:47:25
1823
原创 苹果键盘对应PC键盘-苹果键 option command control
学习 XCode 时遇到,记录一下command(苹果键) 对应 Windows 键option 对应 Altcontrol 对应 Ctrl
2015-03-31 17:34:20
15424
原创 Android 获取手机IMEI (串号) 手机唯一标识
Context context = getWindow().getContext(); TelephonyManager telephonemanage = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); try { Toas
2015-03-20 10:06:09
2496
原创 Android 中使用 Application
Application 配置全局Context第一步、写一个全局的单例模式的MyApplication继承自Application 覆盖onCreate ,在这个方法里面实例化Application第二步、配置全局的Context application android:name="com.appstore.service.MyApplication"
2014-12-10 17:58:55
732
原创 关于byte最高位为1时,为负数
在剖析该问题前请看如下代码public static String bytes2HexString(byte[] b) {String ret = "";for (int i = 0; i String hex = Integer.toHexString(b[ i ] & 0xFF);if (hex.length() == 1) {hex = '0' + hex;}
2014-11-19 16:47:21
7048
3
原创 限制double类型的小数点位数
有时候我们需要控制double类型小数点后的位数,下面简单介绍一下: 假如现在想把某一个double的值限制在小数点后的4位,可以这样做:
2014-11-18 17:00:37
9718
原创 Android禁止横竖屏切换或禁止横竖屏切换时重启Activity
Android禁止横竖屏切换或禁止横竖屏切换时重启Activity我们做项目的时候可能由于某种原因(比如,只做了横屏或竖屏的布局适配)而不想让Android屏幕进行切换。还有时候我们允许Android屏幕进行切换但不想让该界面的操作(如获取网络数据)在横竖屏切换时再重复执行。我们可以通过在AndroidManifest.xml文件中对相应的Activity设置相应的属性即可。下面介绍这两种情况
2014-11-08 12:53:22
722
转载 android 显示全屏
//隐去标题栏(应用程序的名字) this.requestWindowFeature(Window.FEATURE_NO_TITLE); //隐去状态栏部分(电池等图标和一切修饰部分) this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
2014-10-30 18:03:38
471
转载 NumberFormatException异常
parseInt转换会触发NumberFormatException异常。 int id=Integer.parseInt(request.getParameter("xxid")); 这种异常,一般是当request.getParameter("xxid")包含非数字字符,或为null的时候出现。你输出一下request.getParameter("xxid")的值是什么。-
2014-10-30 14:45:47
58784
转载 读取sd卡下图片,由图片路径转换为bitmap
读取sd卡下图片,由图片路径转换为bitmap 01 public Bitmap convertToBitmap(String path, int w, int h) { 02 BitmapFactory.Options pts = new BitmapFactory.Options(); 03 // 设置为tur
2014-10-30 14:05:52
2153
PDO---PHP数据对象(数据抽象层) 学习笔记
2015-02-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人