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.handheldgroup.fullfocus; | |
| import android.app.Activity; | |
| import android.app.ActivityManager; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.view.KeyEvent; | |
| import java.lang.reflect.Method; |
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
| StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace(); | |
| StackTraceElement e = stacktrace[4];// maybe this number needs to be corrected | |
| String methodName = e.getMethodName(); | |
| String className = e.getClassName(); |
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
| final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this.getContext()); | |
| final Drawable wallpaperDrawable = wallpaperManager.getDrawable(); |
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
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath 'com.android.tools.build:gradle:0.4' | |
| } | |
| } | |
| apply plugin: 'android' |
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
| 1.CentOS 6.3 | |
| #yum install make gcc | |
| #cd /opt | |
| $wget http://redis.googlecode.com/files/redis-2.x.xx.tar.gz | |
| $tar zxf redis-2.x.xx.tar.gz | |
| $cd redis-2.x.xx | |
| $make | |
| $make install | |
| ////// |
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
| wget = Popen(['wget', url,'-O',wget_out_file], stdout=PIPE, stderr=STDOUT) | |
| while True: | |
| line = wget.stdout.readline() | |
| if not line: break | |
| print line | |
| wget.wait() |
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
| wget = Popen(['wget', url,'-O',wget_out_file], stdout=PIPE, stderr=STDOUT) | |
| while True: | |
| line = wget.stdout.readline() | |
| if not line: break | |
| print line | |
| wget.wait() |
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 <QuartzCore/QuartzCore.h> | |
| UIView *shadowView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenWidth)]; | |
| shadowView.layer.shadowColor = [UIColor blackColor].CGColor; | |
| shadowView.layer.shadowOpacity = 0.5; | |
| shadowView.layer.shadowOffset = CGSizeMake(0, 2); | |
| shadowView.layer.shadowPath = [UIBezierPath bezierPathWithRect:shadowView.frame].CGPath; | |
| shadowView.layer.shadowRadius = 2.0f; | |
| shadowView.layer.masksToBounds = NO; | |
| [self.view addSubview:shadowView]; |
NewerOlder