Skip to content

Instantly share code, notes, and snippets.

@w4lle
w4lle / gist:be02fa087a6635a226ed
Created June 9, 2015 03:08
volley get 方法自动添加params
/**
* Created by w4lle on 15-4-14.
* Copyright (c) 2015 Boohee, Inc. All rights reserved.
*/
package com.thousandlotus.care.volley;
import android.text.TextUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
/**
* 用于记录和恢复ListView的滑动位置
* Created by ONEWateR on 2015/10/16.
*/
public class ListViewRecord {
private ListView mListView;
private int scrolledY;
@w4lle
w4lle / current_activity.sh
Created November 9, 2016 02:08 — forked from 109021017/current_activity.sh
A shell script log the current android top activity
oldActvity=""
displayName=""
currentActivity=`adb shell dumpsys window windows | grep -E 'mCurrentFocus'`
while true
do
if [[ $oldActvity != $currentActivity && $currentActivity != *"=null"* ]]; then
displayName=${currentActivity##* }
displayName=${displayName%%\}*}
echo $displayName
oldActvity=$currentActivity
@w4lle
w4lle / huoche.py
Created December 10, 2015 05:20
12306抢票
# -*- coding: utf-8 -*-
"""
@author: Akagi201
"""
from splinter.browser import Browser
from time import sleep
import traceback
###容错做的不好,考虑的情况也不够多,大家见谅
@w4lle
w4lle / MultipartRequest
Created November 28, 2016 13:32
Volley MultipartRequest
/*
* Created by w4lle 2016 .
* Copyright (c) 2016 Boohee, Inc. All rights reserved.
*/
package com.boohee.one.http.client;
import com.android.volley.AuthFailureError;
import com.boohee.one.http.JsonCallback;
import com.boohee.one.http.JsonParams;
/*
* Created by w4lle 2016 .
* Copyright (c) 2016 Boohee, Inc. All rights reserved.
*/
package com.boohee.myview;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;