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 os | |
import shutil | |
def list_type_files(path, types, flag): | |
files = [] | |
if os.path.isdir(path) is False: | |
print("路径错误!") | |
return | |
for f in os.listdir(path): |
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
/* | |
* Copyright (C) 2014 skyfish.jy@gmail.com | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
// ==UserScript== | |
// @name JavlibrarySearch | |
// @namespace JavlibrarySearch | |
// @description Add search function for Javlibrary | |
// @include http://www.javlibrary.com/*/?v=* | |
// @include *://www.13vlib.com/*/?v=* | |
// @version 3 | |
// @grant none | |
// ==/UserScript== |
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
package com.thoughtmonkeys.pitstop; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.graphics.RectF; | |
import android.os.Build; | |
import android.text.Layout.Alignment; | |
import android.text.StaticLayout; | |
import android.text.TextPaint; |
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
<receiver | |
android:name="com.talentstech.mediaboardusbupdate.DiskMountReceiver"> | |
<intent-filter > | |
<action android:name="android.intent.action.MEDIA_MOUNTED"/> | |
<action android:name="android.intent.action.MEDIA_BAD_REMOVAL"/> | |
<action android:name="android.intent.action.MEDIA_EJECT"/> | |
<action android:name="android.intent.action.MEDIA_REMOVED"/> | |
<data android:scheme="file"/> | |
</intent-filter> | |
</receiver> |
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
把 1.txt 从 gbk 转成 utf-8 并保存为 2.txt | |
iconv -f gbk -t utf-8 1.txt > 2.txt |
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
/** | |
* 文件大小格式转换 | |
* @param fileS 文件大小 | |
* @return 文件大小 | |
*/ | |
public static String FormatFileSize(long fileS) | |
{ | |
// 转换文件大小 | |
DecimalFormat df = new DecimalFormat("#.00"); | |
String fileSizeString = ""; |
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
要特别注意的是,dialog.show(),一定要放在dialog.setContentView()的前面 |
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
/**解析音乐标签 | |
* 测试发现无法解析wma音乐文件 | |
* 可解析mp3 ma4等 | |
* Created by junny on 12/17/13. | |
*/ | |
public class MusicParseUtil { | |
public static String getAlbum(String filePath){ | |
String album; |
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
MovieBannerView.clearAnimation(); | |
TranslateAnimation TransAnim; | |
TransAnim = new TranslateAnimation(0.0f, 0.0f, banner_h, 0.0f); | |
TransAnim.setDuration(bannerAnimTime); | |
MovieBannerView.startAnimation(TransAnim); |
NewerOlder