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.annotation.SuppressLint; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import java.util.HashMap; | |
import java.util.Map; | |
import androidx.annotation.Nullable; | |
import androidx.recyclerview.widget.LinearLayoutManager; |
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.annotation.SuppressLint; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import java.util.HashMap; | |
import java.util.Map; | |
import androidx.recyclerview.widget.LinearLayoutManager; | |
import androidx.recyclerview.widget.RecyclerView; |
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); | |
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
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
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
<?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
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
//成都理工课表转换为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
#!/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 |
NewerOlder