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
private static OkHttpClient getUnsafeOkHttpClient() { | |
try { | |
// Create a trust manager that does not validate certificate chains | |
final TrustManager[] trustAllCerts = new TrustManager[] { | |
new X509TrustManager() { | |
@Override | |
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { | |
} | |
@Override |
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 SomeFragment extends Fragment { | |
MapView mapView; | |
GoogleMap map; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
View v = inflater.inflate(R.layout.some_layout, container, false); | |
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
/** | |
* 초성 검색 알고리즘을 위한 클래스 이다. | |
* @author roter | |
* | |
*/ | |
public class SoundSearcher | |
{ | |
private static final char HANGUL_BEGIN_UNICODE = 44032; // 가 | |
private static final char HANGUL_LAST_UNICODE = 55203; // 힣 | |
private static final char HANGUL_BASE_UNIT = 588;//각자음 마다 가지는 글자수 |
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
// Watcha's connection: | |
- (void)connection:(NSURLConnection __unused *)connection | |
didReceiveData:(NSData *)data | |
{ | |
self.totalBytesRead += [data length]; | |
if ([self.outputStream hasSpaceAvailable]) { | |
const uint8_t *dataBuffer = (uint8_t *) [data bytes]; | |
[self.outputStream write:&dataBuffer[0] maxLength:[data length]]; | |
} |
NewerOlder