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 org.sazabi.lib.preference; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.drawable.Drawable; | |
import android.preference.Preference; |
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
def java_string_hashcode(s): | |
h = 0 | |
for c in s: | |
h = (31 * h + ord(c)) & 0xFFFFFFFF | |
return ((h + 0x80000000) & 0xFFFFFFFF) - 0x80000000 |
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
/* | |
File: HIToolbox/Events.h | |
Contains: Event Manager Interfaces. | |
Copyright: © 1985-2008 by Apple Computer, Inc., all rights reserved | |
Bugs?: For bug reports, consult the following page on | |
the World Wide Web: | |
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
{"status":0,"message":null,"data":[{"id":"12acad12","imageUrl":"https://mis.hujiang.com/project/picture/spic/u32794313.jpg","summary":"双语文章及学习经验,提升语言修养","title":"阅读"},{"id":"11ccc11","imageUrl":"https://mis.hujiang.com/project/picture/spic/u32794313.jpg","summary":"培养语感,锻炼语言总体把控能力","title":"听力"},{"id":"11123ddd333","imageUrl":"https://mis.hujiang.com/project/picture/spic/u32794313.jpg","summary":"逐句听与练,夯实听力基础","title":"听写"},{"id":"44ssssrrrrf","imageUrl":"https://mis.hujiang.com/project/picture/spic/u32794313.jpg","summary":"教学练测体系化学习课程","title":"课程"}]} |
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 for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |
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 for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
wd=`pwd` | |
# Setup your working directory. Edit 'work' to your working directory. | |
working_dir=`ls -1d ~/work/$1 | head -n1` | |
# were we given a directory? | |
if [ -d "$1" ]; then |
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
@implementation LogProvider | |
+(void)writeLogFile:(NSString* )message { | |
NSString *applicationCacheDirectory = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]; | |
NSDateFormatter* formate = [[NSDateFormatter alloc] init]; | |
[formate setDateFormat:@"yyyy-MM-dd"]; | |
NSString* logFolder = [applicationCacheDirectory stringByAppendingPathComponent:@"SKPhotoCloudUploadLog"]; | |
NSString* finalPath = [logFolder stringByAppendingPathComponent: [NSString stringWithFormat:@"%@.log",[formate stringFromDate:[NSDate new]]]]; | |
NSFileHandle *output = [NSFileHandle fileHandleForWritingAtPath:finalPath]; | |
if(output == nil) { | |
if (![[NSFileManager defaultManager] fileExistsAtPath:logFolder]) { |
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
on run | |
set myVar to do shell script "defaults read com.apple.finder AppleShowAllFiles 2>/dev/null" | |
if myVar is "1" then | |
#display dialog "cuttent is show. will hide it" | |
do shell script "defaults write com.apple.finder AppleShowAllFiles 0" | |
do shell script "killall Finder" | |
else | |
#display dialog "current hidden. will show it" | |
do shell script "defaults write com.apple.finder AppleShowAllFiles 1" |
OlderNewer