A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| /** | |
| * 创建一个圆角的Layout, 且不影响该Layout的background | |
| */ | |
| public class RoundConnerViewGroup extends ViewGroup { | |
| private Path path; | |
| private static final CONNER_RADIUS = <whatever_you_want>; | |
| @Override |
| #!/bin/bash | |
| #auto install python2.7.8 to /usr/local directory! | |
| #and install some libs for python. | |
| #for Centos6.5 | |
| #owner:rocky | |
| #date:2015.01.26 | |
| # | |
| #mkdir for python software. |
| #!/bin/bash | |
| #This is a script to initialize the centos7 system,just for my flavor,you can modifiy it according your need. | |
| #install epel-release and update. | |
| yum install epel-release -y && yum update -y | |
| #install/update some basic software. | |
| yum install gcc gcc gcc-c++ make autoconf openssl-devel bison patch unzip ncurses-devel axel | |
| #disable selinux |
| git init # 初始化本地git仓库(创建新仓库) | |
| git config --global user.name "xxx" # 配置用户名 | |
| git config --global user.email "[email protected]" # 配置邮件 | |
| git config --global color.ui true # git status等命令自动着色 | |
| git config --global color.status auto | |
| git config --global color.diff auto | |
| git config --global color.branch auto | |
| git config --global color.interactive auto | |
| git config --global --unset http.proxy # remove proxy configuration on git | |
| git clone git+ssh://[email protected]/VT.git # clone远程仓库 |
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| /* | |
| * Copyright (C) 2006 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 The Android Open Source Project | |
| ~ | |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
| ~ you may not use this file except in compliance with the License. | |
| ~ You may obtain a copy of the License at | |
| ~ | |
| ~ http://www.apache.org/licenses/LICENSE-2.0 | |
| ~ | |
| ~ Unless required by applicable law or agreed to in writing, software |
| import android.content.Context; | |
| import android.os.Debug; | |
| import java.io.File; | |
| public class OomExceptionHandler implements Thread.UncaughtExceptionHandler { | |
| private static final String FILENAME = "out-of-memory.hprof"; | |
| public static void install(Context context) { | |
| Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); |