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.cobaem.domain; | |
import java.io.Serializable; | |
import java.lang.reflect.Type; | |
import java.math.BigDecimal; | |
import java.util.Date; | |
import java.util.HashSet; | |
import java.util.Set; | |
import javax.persistence.CascadeType; |
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
public static void main(String[] args) { | |
String plainText = "Very secret data"; | |
AES aesClient = new AES("client"); | |
SecretKey AESKey = aesClient.getEncodedSecret(); | |
RSA rsaClient = new RSA(); | |
byte[] RSAcipher = rsaClient.EncryptSecretKey(AESKey); | |
String cipherData = aesClient.encryptAndSerialize(plainText); | |
// Assume that client sends the cipherData and RSAcipher to the server... |
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
public class OCR { | |
private static final String INPUT = "C:/captcha/ex.png"; | |
private static final String OUTPUT = "C:/captcha/captcha-out.png"; | |
private static final String TESSERACT_BIN = "C:/Program Files/Tesseract-OCR/tesseract.exe"; | |
private static final String TESSERACT_OUTPUT = "C:/captcha/out.txt"; | |
private static final int WHITE = 0x00FFFFFF, BLACK = 0x00000000; | |
public static void main(String... args) throws Exception { | |
BufferedImage image = ImageIO.read(new FileInputStream(INPUT)); | |
int average = 0; |
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
public class OCR { | |
private static final String INPUT = "C:/captcha/ex.png"; | |
private static final String OUTPUT = "C:/captcha/captcha-out.png"; | |
private static final String TESSERACT_BIN = "C:/Program Files/Tesseract-OCR/tesseract.exe"; | |
private static final String TESSERACT_OUTPUT = "C:/captcha/out.txt"; | |
private static final int WHITE = 0x00FFFFFF, BLACK = 0x00000000; | |
public static void main(String... args) throws Exception { | |
BufferedImage image = ImageIO.read(new FileInputStream(INPUT)); | |
int average = 0; |
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
public class OCR { | |
private static final String INPUT = "C:/captcha/ex.png"; | |
private static final String OUTPUT = "C:/captcha/captcha-out.png"; | |
private static final String TESSERACT_BIN = "C:/Program Files/Tesseract-OCR/tesseract.exe"; | |
private static final String TESSERACT_OUTPUT = "C:/captcha/out.txt"; | |
private static final int WHITE = 0x00FFFFFF, BLACK = 0x00000000; | |
public static void main(String... args) throws Exception { | |
BufferedImage image = ImageIO.read(new FileInputStream(INPUT)); | |
int average = 0; |
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
CGContextRef currentContext = UIGraphicsGetCurrentContext(); | |
CGGradientRef glossGradient; | |
CGColorSpaceRef rgbColorspace; | |
size_t num_locations = 2; | |
CGFloat locations[2] = { 0.0, 1.0 }; | |
CGFloat components[8] = { 1.0, 1.0, 1.0, 1, | |
0.95, 0.95, 0.95, 1 }; | |
rgbColorspace = CGColorSpaceCreateDeviceRGB(); |
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
BOOL switchObject(id anObject, ...) | |
{ | |
va_list args; | |
va_start(args, anObject); | |
id value = nil; | |
BOOL matchFound = NO; | |
while ( (value = va_arg(args,id)) ) | |
{ |
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
- (BOOL)emptyTextFields:(id)toCompare, ... | |
{ | |
va_list args; | |
va_start(args, toCompare); | |
id value = nil; | |
BOOL match = NO; | |
while ((value = va_arg(args,id))) | |
if([toCompare isKindOfClass:[NSString class]] && [value isKindOfClass:[UITextField class]]) | |
if([[(UITextField *)value text] isEqualToString:toCompare]) |
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
import java.awt.AWTException; | |
import java.awt.Robot; | |
import java.awt.event.KeyEvent; | |
public class GoogleDoodle { | |
static { | |
try { | |
Robot r = new Robot(); | |
Thread.sleep(2000); | |
int b[]={1,5,4,4,1,3,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
import java.awt.AWTException; | |
import java.awt.Robot; | |
import java.awt.event.KeyEvent; | |
public class GoogleDoodle { | |
static { | |
try { | |
Robot r = new Robot(); | |
Thread.sleep(2000); | |
int b[]={1,5,4,4,1,3,2}; |
OlderNewer