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 main | |
import () | |
func main() { | |
for i := 0; i < 50; i++ { | |
// fmt.Printf("i is %d and result is %d.\n", i, fibo(i)) | |
fibo(i) | |
} | |
} |
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) { | |
// odd/even into lists of 10 | |
Observable.range(1, 100).groupBy(n -> n % 2 == 0) | |
.flatMap(g -> { | |
return g.take(10).toList(); | |
}).forEach(System.out::println); | |
} |
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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
# ruby '2.1.1' | |
gem 'rails', '4.1.5' | |
# Use sqlite3 as the database for Active Record | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 4.0.3' | |
# Use Uglifier as compressor for JavaScript assets | |
gem 'uglifier', '>= 1.3.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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 20 | |
buildToolsVersion "20.0.0" | |
defaultConfig { | |
applicationId "com.poh.poh" | |
minSdkVersion 16 | |
targetSdkVersion 20 |
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 L { | |
private static final String LOG_PREFIX = "ys_"; | |
private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); | |
private static final int MAX_LOG_TAG_LENGTH = 23; | |
public L() { | |
} | |
public static String makeLogTag(String str) { | |
if (str.length() > MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH) { |
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 String TAG = makeLogTag(LoginActivity.class); | |
LOGD(TAG, "lat " + getLatLong()[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
String number = yourNumberBlahBlah + Uri.encode("#"); | |
Intent i = new Intent(android.content.Intent.ACTION_CALL, Uri.parse("tel:" + number )); |
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
// | |
// main.swift | |
// SwiftTest | |
// | |
// Created by Ye Lin Aung on ၁၄/၀၆/၁၀. | |
// Copyright (c) ၂၀၁၄ Ye Lin Aung. All rights reserved. | |
// | |
import Foundation |
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
def uni512zg1(input_text) | |
output_text = input_text | |
puts output_text | |
{% for rule in uni512zg1_rules -%} | |
output_text = output_text.gsub("{{rule.0}}","{{rule.1|replace("$","\\\\") }}") | |
{% endfor -%} | |
end | |
def zg12uni51(input_text) | |
output_text = input_text |
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
def uni512zg1(input_text) | |
output_text = input_text | |
output_text = output_text.gsub('\u104E\u1004\u103A\u1038','\u104E' ) | |
output_text = output_text.gsub('\u102B\u103A','\u105A' ) | |
output_text = output_text.gsub('\u102D\u1036','\u108E' ) | |
output_text = output_text.gsub('\u103F','\u1086' ) | |
output_text = output_text.gsub('(?<=\u102F)\u1037','\u1094' ) | |
output_text = output_text.gsub('(?<=\u102F\u1036)\u1037','\u1094' ) | |
output_text = output_text.gsub('(?<=\u1030)\u1037','\u1094' ) | |
output_text = output_text.gsub('(?<=\u1030\u1036)\u1037','\u1094' ) |