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 | |
| # -*- coding: UTF-8 -*- | |
| def subString(str, s, e): | |
| sPos = str.find(s) | |
| if sPos == -1: | |
| return None | |
| sLen = len(s) | |
| ePos = str.find(e, sPos + sLen) | |
| print sPos, ePos |
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
| # pgrep -f "ssh -qTfnN" | |
| NET=$(netstat -an | grep "7070") | |
| NET_ST=$? | |
| if [[ ${NET_ST} != 0 ]]; then | |
| echo "ssh never opened" | |
| else | |
| echo "ssh opened" |
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.xxx.view.adpter; | |
| import java.util.List; | |
| /** | |
| * 可变的的内容 | |
| * @author holmes | |
| * | |
| * @param <T> | |
| */ |
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.xxx.view.adpter; | |
| import java.util.List; | |
| import android.content.Context; | |
| import android.view.LayoutInflater; | |
| import android.widget.BaseAdapter; | |
| /** | |
| * 可变内容的Adapter<br> |
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 class StructureTest { | |
| public static void main(String[] args) { | |
| ABCC abc = new ABCC(); | |
| System.out.println(abc.getCC()); | |
| } | |
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
| private class ScreenDetailAdapter extends PagerAdapter{ | |
| ImageDownloaderEx mImageDownloaderEx; | |
| String[] mUrls; | |
| public ScreenDetailAdapter(String[] urls) { | |
| // TODO Auto-generated constructor stub | |
| DisplayMetrics dm = getResources().getDisplayMetrics(); | |
| SizeInfo sizeInfo = new SizeInfo(dm.widthPixels, dm.heightPixels); | |
| sizeInfo.forDetail = true; | |
| mImageDownloaderEx = new ImageDownloaderEx(thisInstance, sizeInfo); |
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 class SearchAppAdapter extends PagerAdapter{ | |
| public static final int DEFAULT_MAX_ITEM_SIZE = 4; | |
| /** | |
| * 全部数据集 | |
| */ | |
| private List<AppInfo> data; | |
| private Context mContext; | |
| private int mMaxItemSize = DEFAULT_MAX_ITEM_SIZE; | |
| /** |
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 function getLocation(_arg1:String):String{ | |
| var startvar:*; | |
| var blockCont:* = Number(_arg1.charAt(0)); | |
| var realString:* = _arg1.substring(1); | |
| var blockLength:* = Math.floor((realString.length / blockCont)); | |
| var remainLength:* = (realString.length % blockCont); | |
| var pool:* = new Array(); | |
| var currentIndex:* = 0; | |
| while (currentIndex < remainLength) { | |
| if (pool[currentIndex] == undefined){ |
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.example.imagetext.view; | |
| import android.content.Context; | |
| import android.graphics.drawable.Drawable; | |
| import android.util.AttributeSet; | |
| import android.widget.ImageView; | |
| public class FixImageView extends ImageView{ | |
| private int mFixWidth = -1; |
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.buy.apps.view; | |
| import android.os.Handler; | |
| import android.view.View; | |
| /** | |
| * 自动重试的Runnable, 用于等待UI完成一定程度后触发 | |
| * @author holmes | |
| * | |
| */ |
OlderNewer