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
BOOL InitInstance() | |
{ | |
m_hMutex = ::CreateMutex(NULL, FALSE, APP_MUTEX_NAME); | |
if (NULL == m_hMutex) | |
{ | |
Suicide(); | |
return FALSE; | |
} |
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.sencloud.redis.test; | |
import redis.clients.jedis.Jedis; | |
public class Test | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println("hellow"); |
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 static String uploadFileV2(Context context, String RequestURL) throws JSONException | |
{ | |
String BOUNDARY = UUID.randomUUID().toString(); // 边界标识 随机生成 | |
String CONTENT_TYPE = "multipart/form-data"; // 内容类型 | |
try | |
{ | |
URL url = new URL(RequestURL); | |
HttpURLConnection conn = (HttpURLConnection) url.openConnection(); | |
conn.setReadTimeout(TIME_OUT); |
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
<script type="text/javascript"> | |
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { | |
var timer = setInterval(function(){ | |
clearInterval(timer); | |
var a=document.getElementById("ipa"); | |
var dispatch = document.createEvent("HTMLEvents"); | |
dispatch.initEvent("click", true, true); | |
a.dispatchEvent(dispatch); | |
}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
//判断访问终端 | |
var browser={ |
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 <Foundation/Foundation.h> | |
@interface BarA : NSObject | |
//- (void) fun1; | |
//- (void) fun2; |
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
- (void)captureOutput1:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection | |
{ | |
if (_finished) { | |
NSLog(@"Enter captureOutput:didOutputSampleBuffer, but return because finished"); | |
return; | |
} | |
_zxcount ++; | |
// NSLog(@"Enter captureOutput:didOutputSampleBuffer %lu", (unsigned long)_zxcount); | |
@autoreleasepool { |
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
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; |
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 <CommonCrypto/CommonDigest.h> | |
- (NSString *)md5HexDigest:(NSString*)password | |
{ | |
const char *original_str = [password UTF8String]; | |
unsigned char result[CC_MD5_DIGEST_LENGTH]; | |
CC_MD5(original_str, strlen(original_str), result); | |
NSMutableString *hash = [NSMutableString string]; | |
for (int i = 0; i < 16; i++) | |
{ |