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
#coding=utf8 | |
import Image | |
import math | |
import os | |
import re | |
import glob | |
class image: | |
watermarkfile_default = '~/warter.png' | |
def __init__(self,watermark=''): |
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
CGFloat decelerationRate = UIScrollViewDecelerationRateFast +(UIScrollViewDecelerationRateNormal - UIScrollViewDecelerationRateFast) * INT16_MAX; | |
[_tableView setValue:[NSValue valueWithCGSize:CGSizeMake(decelerationRate,decelerationRate)] forKey:@"_decelerationFactor"]; |
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
//发送通知 | |
UILocalNotification *notification=[[UILocalNotification alloc] init]; | |
if (notification!=nil) { | |
NSDate *now=[NSDate new]; | |
notification.fireDate=[now dateByAddingTimeInterval:10];//10秒后通知 | |
notification.repeatInterval=0;//循环次数,kCFCalendarUnitWeekday一周一次 | |
notification.timeZone=[NSTimeZone defaultTimeZone]; | |
notification.applicationIconBadgeNumber=1; //应用的红色数字 | |
notification.soundName= UILocalNotificationDefaultSoundName;//声音,可以换成alarm.soundName = @"myMusic.caf" | |
//去掉下面2行就不会弹出提示框 |
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
sudo mount -u -w /Volumes/ntfs_volume_name |
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/sh | |
FILE_NAME='empty' | |
if [ $1 ! = ''] && [$1 = '-f' ] && [$2 != ''];then | |
FILE_NAME = $2 | |
else | |
echo '=====================================================' | |
echo 'cleana.sh -f filename ' | |
echo ' set the file name,if not,default name is '$FILE_NAME | |
echo '=====================================================' | |
fi |
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/sh | |
#check 2x file | |
FILE_PAR='*@2x.*' | |
file_res=$(find . -name "$FILE_PAR") | |
#echo $file_res | |
for f in $file_res | |
do |
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 | |
flist=`find . -name "*.h"` | |
#echo $flist | |
for f in $flist | |
do | |
echo $f | |
`sed -i "" '/@interface.*/{s/@interface/__attribute__ ((deprecated))\'$'\n@interface/g;}' $f` | |
`sed -i "" "/-.*;/{s/;/ __attribute__ ((deprecated));/g;}" $f` |
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
sudo apt-get install language-pack-en-base | |
edit: | |
/etc/environment | |
append this: | |
LANGUAGE="en_US.UTF-8" | |
LC_ALL="en_US.UTF-8" |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00 |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex: |
OlderNewer