Skip to content

Instantly share code, notes, and snippets.

View FrankWu100's full-sized avatar

Frank Wu FrankWu100

View GitHub Profile
@FrankWu100
FrankWu100 / FWJSONPrint.h
Last active August 29, 2015 13:56
NSDictionary or NSArray(NSDictionary) or another print JSON text
//
// FWJSONPrint.h
// ClassComment
//
// Created by FrankWu on 2014/2/11.
// Copyright (c) 2014年 FrankWu. All rights reserved.
//
#import <Foundation/Foundation.h>
@FrankWu100
FrankWu100 / PCCUYYM.h
Last active August 29, 2015 13:56
PCCU YYM Objective-C
//
// PCCUYYM.h
// ClassComment
//
// Created by FrankWu on 2014/2/17.
// Copyright (c) 2014年 FrankWu. All rights reserved.
//
#import <Foundation/Foundation.h>
@FrankWu100
FrankWu100 / PCCUYYM.cs
Last active August 29, 2015 14:00
PCCU YYM C#
using System;
using System.Globalization;
namespace CoreLib
{
public class PCCUYYM
{
string _YYM = "";
public static PCCUYYM Now {
#include <iostream>
#include <sstream>
using namespace std;
string itos(int n)
{
stringstream ss;
ss << n;
return ss.str();
@FrankWu100
FrankWu100 / .gitignore
Last active August 29, 2015 14:07 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.3
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@FrankWu100
FrankWu100 / 自動撥打暴雪安全鎖+啟動Battle.net.scpt
Created October 9, 2015 14:41
自動用 Handoff 撥打暴雪安全鎖, 成功後再自動啟動 Battle.net
tell application "System Events"
if button "結束" of window 1 of application process "FaceTime" exists then
click button "結束" of window 1 of application process "FaceTime"
end if
end tell
try
do shell script "killall FaceTime"
end try
- (NSString *)analysisTitle:(NSString *)theDate
{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS"];
//[formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS"];
//yyyy-MM-dd HH:mm:ss
NSDate *date = [NSDate date];
date = [formatter dateFromString:theDate];
// NSLog(@"Date:%@", [formatter stringFromDate:date]);
tell application "System Events"
if button "結束" of window 1 of application process "FaceTime" exists then
click button "結束" of window 1 of application process "FaceTime"
end if
end tell
try
do shell script "killall FaceTime"
end try
using System;
class Untitled
{
static void Main(string[] args)
{
int _count = 15;
int countA = 0, countB= 0;
bool win = false;
bool needReInput = false;
@FrankWu100
FrankWu100 / AESEnDecryption.java
Last active December 20, 2015 18:09
AES Encryption/Decryption on Java (Not support Android)
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import javax.crypto.spec.IvParameterSpec;
import java.security.MessageDigest;
import java.security.spec.AlgorithmParameterSpec;
import javax.xml.bind.DatatypeConverter;
public class AESEnDecryption {