View gist:2e86522765badb7682ef
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
# /Applications/Xcode6-Beta7.app/Contents/Developer/usr/bin/simctl | |
simctl erase C24126D7-51CD-4731-848A-267E711E1ECD |
View gist:16b407f17c81b384cfa1
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
Objective: {objective 0x79f56080: <750:560, 251:-24108, 250:384> + <251:1>*0x79f5aff0:IB auto generated at build time for view with fixed frame.marker{id: 84} + <251:1>*0x79f5b0a0:IB auto generated at build time for view with fixed frame.marker{id: 86} + <250:1>*0x79f5d690.marker{id: 225} + <250:1>*0x79f5dd60.marker{id: 227} + <250:1>*0x79f5ecc0.marker{id: 229} + <250:1>*0x79f5ecf0.marker{id: 231} + <250:1>*0x79f5f5c0.marker{id: 221} + <250:1>*0x79f5f5f0.marker{id: 223} + <251:1>*0x79f611d0.marker{id: 122} + <251:1>*0x79f620f0.marker{id: 124} + <251:1>*0x79f62120.marker{id: 126} + <251:-1>*0x79f62150.marker{id: 128} + <251:-1>*0x79f621b0.marker{id: 132} + <251:-1>*0x79f621e0.marker{id: 135} + <251:-1>*0x79f62210.marker{id: 138} + <251:-1>*0x79f62240.marker{id: 140} + <250:1>*0x79f62430.marker{id: 146} + <750:1>*0x79f62460.marker{id: 148} + <250:-1>*0x79f62490.marker{id: 150} + <250:-1>*0x79f624c0.marker{id: 152} + <750:1>*0x79f624f0.marker{id: 154} + <251:1>*0x79f62820.marker{id: 163} + <251:1>*0x79f63430.mar |
View FHC1.swift
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 Foundation | |
let location = "~/input.in".stringByExpandingTildeInPath | |
let content = String(contentsOfFile: location, encoding: NSUTF8StringEncoding, error: nil)! | |
var lines = split(content, { $0 == "\n"}, maxSplit: Int.max, allowEmptySlices: false) | |
let cases = lines.removeAtIndex(0) | |
for (i, n) in enumerate(lines) { | |
let digits = map(n) { String($0).toInt()! } |
View ReactNative.js
This file has been truncated, but you can view the full file.
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
__SSTOKENSTRING = "@generated SignedSource<<dbe928e1275c495c1922c1bf063ffb70>>"; | |
! function(e) { | |
function t(e) { | |
function t() { | |
var t = Array.prototype.map.call(arguments, function(e) { | |
if (null == e) return null === e ? "null" : "undefined"; | |
if ("string" == typeof e) return '"' + e + '"'; | |
try { | |
return JSON.stringify(e) | |
} catch (t) { |
View Alumno.java
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; |
View AES-RSA.java
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... |
View OCR.java
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; |
View gist:3191095
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(); |
View gist:3242465
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)) ) | |
{ |
View gist:3248993
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]) |
OlderNewer