This file contains 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
#!/usr/bin/python | |
# -*-encoding:utf-8 -*- | |
#CDUT teacher rating script | |
from urllib import urlencode | |
import urllib2, cookielib, re | |
data = { |
This file contains 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
#!/bin/bash | |
echo | |
echo "成都理工协同拨号路由破解脚本" | |
echo "算法来源:http://fyscu.com/forum.php?mod=viewthread&tid=1104" | |
echo "本脚本仅适用于ddwrt、openwrt、tomato的路由" | |
echo "使用前请确认已经在路由设置页面上调整之为PPPoE拨号模式,并最好备过份。" | |
echo "截至2014年2月,对CD028XXXXX@96301类型的帐号有效,对使用本脚本后的任何意外本人无力负责。" | |
echo |
This file contains 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
#!/bin/bash | |
#subset=`ifconfig en0 | grep 'inet ' | cut -d" " -f2 | cut -d"." -f1-3` | |
#echo "nmap -sP $subset.1/24" | |
#nmap -sP $subset.1/24 | |
#echo | |
while true; do | |
read -p "dst IP: " dstip | |
if ! [ -z $dstip ]; then |
This file contains 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
//成都理工课表转换为Google Claendar兼容的csv | |
//登录后选择「我的课表」并将html文件另存,然后用本脚本转换,即可导入Google Calendar。 | |
//2014秋测试有效。 | |
//依赖包就cheerio一个,用的时候请酌情修改filePath。 | |
//用法: node ./index.js > 课表.csv | |
var cheerio = require('cheerio'); | |
var fs = require('fs'); | |
var filePath = "./StuProductionSchedule.aspx.html"; |
This file contains 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
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix. | |
All Clickable Views: | |
----------- | |
* ripple effect (Lollipop only) -- "colorControlHighlight" | |
Status Bar: | |
------------ | |
* background (Lollipop only) - "colorPrimaryDark" |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="red_500_main">#f44336</color> | |
<color name="red_50">#ffebee</color> | |
<color name="red_100">#ffcdd2</color> | |
<color name="red_200">#ef9a9a</color> | |
<color name="red_300">#e57373</color> | |
<color name="red_400">#ef5350</color> | |
<color name="red_500">#f44336</color> | |
<color name="red_600">#e53935</color> |
This file contains 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
Intent i = new Intent("com.catchingnow.icebox.FREEZE_APP") | |
.putExtra("broadcast_action", 0) // 0 冻结,1 解冻,2 解冻并运行 | |
.putExtra("broadcast_package_name_set", {}); // String Array, action 为运行时,size 必须为 1,其余无限制 | |
context.sendBroadcast(i); |
This file contains 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 android.graphics.Color; | |
import android.support.annotation.ColorInt; | |
import android.support.v7.graphics.Palette; | |
/** | |
* Created by heruoxin on 16/4/15. | |
*/ | |
public class ColorUtil { |
This file contains 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 MainActivity extends BaseActivity { | |
private ActivityMainBinding mBinding; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
mBinding = DataBindingUtil.setContentView(this, R.layout.activity_main); | |
mBinding.setInsets(new WindowInsetsBindingAdapter.WindowInset()); |
This file contains 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
// 读列表 | |
pm.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES) | |
// 读到之后需要过滤掉双开/访客账户的 app | |
boolean installed = (applicationInfo.flags | ApplicationInfo.FLAG_INSTALLED == applicationInfo.flags); | |
OlderNewer