- 博客(93)
- 资源 (8)
- 收藏
- 关注
转载 ubuntu 安装多套 gcc 和版本切换
参考:Configure multiple GCC versions on ubuntusudo add-apt-repository -y ppa:ubuntu-toolchain-r/testsudo apt updatesudo update-alternatives --remove-all gccsudo update-alternatives --remove-all g++sud
2017-10-18 18:34:31
2285
原创 android 7.1.1 开始 Prevent apps to overlay other apps via toast windows
细节参考:https://android.googlesource.com 内容如下:Prevent apps to overlay other apps via toast windowsIt was possible for apps to put toast type windowsthat overlay other apps which toast winodws aren'trem
2017-08-18 13:02:40
556
原创 chromium 57 中有趣的代码
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl
2017-05-02 18:11:03
507
原创 下载 m3u8 视频脚本
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!直接上代码,python 的:#!/usr/bin/env python# -*- coding:utf-8 -*-# Copyright 2016 lzy0168@gmail.comimport contextlibimport osimport sysimport urllib2import
2017-04-07 11:43:51
5894
原创 android 手机通过 usb 共享电脑网络
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!参考:How to set up reverse tethering over USB?1、Connect Android device via USB.2、Enable USB tethering. To do so, go to Settings → More... → Tetherin
2017-03-15 16:04:06
1715
1
原创 读取 android /system/build.prop 的最简单方法
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!import java.io.File;import java.io.FileInputStream;import java.io.IOException;import java.util.Properties;class BuildProperties { private final Propert
2017-02-22 11:18:14
8989
2
原创 android webview sdk app tutorial 01 界面
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!界面效果如下:完全使用代码实现:import android.app.Activity;import android.content.Context;import android.graphics.Color;import android.os.Bundle;import android.v
2016-11-30 14:55:38
387
原创 android 那些坑爹的 bug
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!android android 4.1.x 设亮度为 0 会锁屏(效果相当于按电源键),三星手机甚至让人觉得是死机的效果。
2016-11-17 11:51:57
380
原创 android 6.0 以下的 MediaPlayer 居然不能携带 http headers Referer
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!今天测试 android MediaPlayer,发现居然发出的 http 请求不能携带 Referer,测试代码如下: Uri uri = Uri.parse("http://100.84.44.221:8001/12418.mp4"); HashMap headers = n
2016-11-16 14:51:02
2603
原创 用 python 脚本,把当前目录及子目录下的 wav 音频文件转换为 flac 格式
用 python 脚本,把当前目录及子目录下的 wav 音频文件转换为 flac 格式import os, subprocessfor d,sd,files in os.walk('.'): for f in files: src = os.path.join(d, f) (prefix, sep, suffix) = src.rpartition('.') if suf
2016-10-12 21:25:10
3783
1
原创 android activity 全屏非全屏切换
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!android app 通过代码,在全屏和非全屏之间切换import android.app.Activity;import android.content.pm.ActivityInfo;import android.os.Build;import android.view.WindowManager;
2016-06-15 14:39:56
1747
原创 ubuntu astah 对话框中文字体乱码(方框)
ubuntu astah 对话框中文字体乱码(方框)原因,jre 关联的 awt 字体无效,解决办法:sudo apt-get install fonts-arphic-uming*
2016-05-05 11:45:09
1694
原创 避免直接依赖 android log 库
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!#include #include /* dlsym */typedef int (*log_print_fun)(int, const char*, const char*, ...);static log_print_fun log_print = (log_print_fun) dls
2016-05-04 15:21:17
555
原创 gradle for android 自动找当前环境当前最高版本的 sdk 和 build tools
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!文件 androidVersion.gradle//---------------------------// tools function// see: http://www.egeek.me/2013/12/07/gradle-auto-detect-android-sdk-and-build-tools
2016-04-23 11:06:07
1827
原创 eclipse 的开发人员的 android studio 手册
用户 eclipse 的开发人员,如果计划使用 android studio 看这份文档最合适https://www.airpair.com/android/android-studio-vs-eclipse
2016-04-20 13:52:59
478
原创 ubuntu 添加 vdpau 支持(intel)
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!cling 1.0.5 中文乱码解决参考:Enable Hardware Acceleration on Intel Graphics Cards in Ubuntusudo add-apt-repository ppa:nilarimogard/webupd8sudo apt-get upd
2016-04-16 14:46:51
4568
原创 android bringAppToTop
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!/** * some android system util for ucmedia */public class SystemUtil { private static final String TAG = LogStrategy.PRE + "SystemUtil"; private s
2016-04-01 17:48:39
1221
原创 ubuntu apt-get install locales 失败处理
失败信息:apt-get install locales正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列【新】软件包将被安装: locales升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 15 个软件包未被升级。需要下载 3,954 kB 的软件包。解压缩后会消耗掉 16.3 MB
2016-03-31 10:31:01
4030
转载 使用 python 创建最简单的 https 服务器
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!#!/usr/bin/env python# taken from https://gist.github.com/dergachev/7028596# # generate server.xml with the following command:# openssl req -new -x
2016-03-24 12:56:40
13269
原创 cling bug 处理
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!core/src/main/java/org/teleal/cling/transport/impl/apache/StreamClientImpl.java242,243c242< responseMessage.setBody(UpnpMessage.BodyType
2016-03-03 15:33:39
762
原创 android 按原始数据读出资源
res/drawable/listview_selector.xml 的内容如下: 打包到 apk 后,如果需要按 raw 格式读取,代码如下:InputStream is = ctx.getResources().openRawResource(R.drawable.listview_selector);byte[] rawdata = new byte[is.a
2015-12-01 13:54:12
491
原创 android 资源读取
最重要的2个文件是:frameworks/base/include/androidfw/ResourceTypes.hframeworks/base/libs/androidfw/ResourceTypes.cpp - status_t ResXMLTree::setTo(...)如果尝试直接从 xml 字符串创建 view / drawable 对象,需要用到未公开类 Xml
2015-12-01 13:46:54
1041
原创 ant release proguard StackOverflowError
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!ant java 项目,执行到 proguard 阶段发生 StackOverflowError 错误,错误类似下面:build.xml:339: java.lang.StackOverflowError at proguard.classfile.ProgramClass.constantPoolEntry
2015-08-30 16:55:31
1073
转载 linux shell test manual
see: test, [, [[SYNOPSIStest expression[ expression ][[ expression ]]DESCRIPTIONThe test command checks for various properties of files, strings and integers. It produces no outp
2015-05-07 17:24:00
528
原创 android 开发环境准备 eclipse 篇
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!1、下载 Eclipse IDE for Java Developersaria2c http://ftp.yz.yamagata-u.ac.jp/pub/eclipse//technology/epp/downloads/release/luna/SR2/eclipse-java-luna-SR2-l
2015-03-10 15:17:06
924
原创 android MediaMetadataRetriever 获取视频宽高及时长例子
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!android.media.MediaMetadataRetriever mmr = new android.media.MediaMetadataRetriever();try { if (mUri != null) { HashMap headers = mHeaders;
2015-02-06 17:17:40
22869
2
原创 在 android monitor View Hierarchy 的 View 树上显示你的类名
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!class YouClass extends View{ @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibil
2015-01-12 17:43:26
1555
原创 牛逼代码收藏
1. void set_bit(int &input_output, bool to_set, int left_shift). (来自 linzj)第一个参数是目标整数,输入输出;第二个参数表示是设置这一位还是清空它;第三个参数表示那个位的位置,也就是左移动多少位。input_output ^= (input_output & (1
2015-01-09 10:01:20
1198
原创 android bluetooth service uuid
#管理ServiceDiscoveryServerServiceClassID_UUID = '{00001000-0000-1000-8000-00805F9B34FB}' BrowseGroupDescriptorServiceClassID_UUID = '{00001001-0000-1000-8000-00805F9B34FB}' PublicBrowseGroupServi
2014-09-25 14:50:27
1919
原创 ubuntu 安装网络打印机(hp laserjet 3055 pcl5)
System Settings -> Printers -> Add -> LPD/LPR Host or Printer -> lpd://10.1.34.51
2014-09-18 10:14:52
1518
原创 计算 md5 值
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!linux shell commandpython code
2014-09-05 14:04:37
600
原创 2014.5.7 W3C Media Capture and Stream 草案添加了 “4.3.5 MediaTrackConstraints”
参考 2014.5.7 W3C Media Capture and Stream 草案添加了 “4.3.5 MediaTrackConstraints”
2014-05-14 11:53:32
1393
转载 sublime text 3 build 3059 for Linux x64 crack
see: youtube1. use hexeditor open sublime_text2. goto offset 0x81E23. change "0F 94" to "0F 95" and save4. all done!
2014-03-11 16:27:40
1856
原创 java 反编译资料
CFR - another java decompilerProcyon (Java metaprogramming tools)Krakatau Bytecode Tools (Python)Anatomy of a Java DecompilerSoot: a Java Optimization Framework
2014-02-07 11:47:03
773
原创 用 sed 给 java 所有静态变量加 final 关键字
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!sed '/^\s*\/\//!{/(/!{/\bfinal\b/!{s/\bstatic\b/final static/}}}' foo.java解释:/^\s*\/\//!不是注释代码/(/!没有 '(',意思就是不是函数/\bfinal\b/!没
2014-01-23 14:05:54
854
WordSR v0.2 在多个Word文件中批量查找替换
2012-01-05
WordSR 在多个Word文件中批量查找替换
2011-04-30
Imperfect C++ Practical Solutions for Real-Life Programming
2010-01-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人