This file contains hidden or 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
| // // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/) | |
| import java.net.URI; | |
| import org.apache.http.HttpEntity; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.client.HttpClient; | |
| import org.apache.http.client.methods.HttpGet; | |
| import org.apache.http.client.utils.URIBuilder; | |
| import org.apache.http.impl.client.HttpClients; | |
| import org.apache.http.util.EntityUtils; |
This file contains hidden or 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 static Bitmap convertViewToBitmap(View v){ | |
| v.setDrawingCacheEnabled(true); | |
| Bitmap bitmap = Bitmap.createBitmap(v.getDrawingCache()); | |
| // 这时会把 cache 的 bitmap 回收 | |
| v.setDrawingCacheEnabled(false); | |
| return bitmap; | |
| } | |
| // 重新 measure/layout 获取 cache |
This file contains hidden or 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
| $(document).ready(function() { | |
| // 所有的 jQuery 代码都写在这里 | |
| console.log('start here'); | |
| var access_token = ""; | |
| var app_key = "2989424062"; | |
| $('#wb_login').click(function() { | |
| console.log('clicked'); | |
| if(WB2.checkLogin()){ |
This file contains hidden or 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
| <html xmlns:wb="http://open.weibo.com/wb"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=2989424062&debug=true" type="text/javascript" charset="utf-8"></script> | |
| <meta http-equiv="Access-Control-Allow-Origin" content="*" /> | |
| </head> | |
| <body> | |
| <button class="btn btn-info" type="button" id="wb_login">登录微博</button> | |
| </body> |
This file contains hidden or 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
| PIN_URL="https://login.sina.com.cn/cgi/pin.php" | |
| timestamp=$(echo $((`date +%s`*1000))) | |
| curl "https://login.sina.com.cn/sso/prelogin.php?entry=openapi&callback=sinaSSOController.preloginCallBack&su=MjQ1OTc2NTUxJTQwcXEuY29t&rsakt=mod&checkpin=1&client=ssologin.js(v1.4.18)&_=1497452980684"|cut -d '(' -f2|cut -d')' -f1|json_pp > prelogin.json | |
| PCID=`cat prelogin.json |grep pcid|cut -d'"' -f4` | |
| NONCE=`cat prelogin.json |grep nonce|cut -d'"' -f4` | |
| SERVERTIME=`cat prelogin.json |grep server|sed 's/ //g'|cut -d':' -f2|cut -d',' -f1` | |
| r=`echo $(($(date +%s)%100000000))` |
This file contains hidden or 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
| function SSOController() { | |
| var undefined; | |
| var me = this; | |
| var updateCookieTimer = null; | |
| var updateCookieTimeHardLimit = 1800; | |
| var cookieExpireTimeLength = 3600 * 24; | |
| var crossDomainForward = null; | |
| var crossDomainTimer = null; | |
| var crossDomainTime = 3; | |
| var autoLoginCallBack2 = null; |
This file contains hidden or 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.content.Context; | |
| import android.support.v4.view.ViewPager; | |
| import android.util.AttributeSet; | |
| import android.view.MotionEvent; | |
| import android.view.ViewConfiguration; | |
| public class SelfishViewPager extends ViewPager { | |
| int mScaledTouchSlop = 0; | |
| public SelfishViewPager(Context context) { | |
| super(context); |
This file contains hidden or 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
| package com.sctdroid.app.uikit; | |
| import android.animation.ValueAnimator; | |
| import android.graphics.Bitmap; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.ColorFilter; | |
| import android.graphics.Paint; | |
| import android.graphics.Path; | |
| import android.graphics.PorterDuff; |
This file contains hidden or 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
| package com.sctdroid.app.uikit; | |
| import android.animation.ValueAnimator; | |
| import android.graphics.Bitmap; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.ColorFilter; | |
| import android.graphics.LinearGradient; | |
| import android.graphics.Paint; | |
| import android.graphics.Point; |
This file contains hidden or 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/env python | |
| # -*- encoding: utf-8 -*- | |
| # Created on 2017-07-31 03:00:45 | |
| # Project: meizitu_new | |
| from pyspider.libs.base_handler import * | |
| import time | |
| class Handler(BaseHandler): | |
| crawl_config = { |
OlderNewer