Skip to content

Instantly share code, notes, and snippets.

View yelinaung's full-sized avatar
🏠
Working from home

Ye Lin Aung yelinaung

🏠
Working from home
View GitHub Profile
@yelinaung
yelinaung / mmaug_simple_databinding_after_binding_layout.xml
Created June 18, 2015 06:07
MMAUG Simple Databinding - After binding activity_main.xml Layout
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="user"
type="org.mmaug.simpledatabinding.User"/>
</data>
@yelinaung
yelinaung / User.java
Created June 18, 2015 05:45
MMAUG Simple Databinding - User Object class
public class User {
public String name;
public String age;
public String address;
public User(String name, String age, String address) {
this.name = name;
this.age = age;
this.address = address;
}
@yelinaung
yelinaung / MainActivity.java
Created June 18, 2015 05:43
MMAUG Simple Databinding - Normal MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView userName = (TextView) findViewById(R.id.userName);
TextView userAge = (TextView) findViewById(R.id.userAge);
TextView userAddress = (TextView) findViewById(R.id.userAddress);
@yelinaung
yelinaung / mmaug_simple_databinding_normal_layout.xml
Last active August 29, 2015 14:23
MMAUG Simple Databinding - Normal activity_main.xml Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:padding="@dimen/activity_horizontal_margin"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
@yelinaung
yelinaung / mmaug_simple_databinding_app_build.gradle
Last active August 29, 2015 14:23
MMAUG Simple Databinding - app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
defaultConfig {
applicationId "org.mmaug.simpledatabinding"
minSdkVersion 15
@yelinaung
yelinaung / mmaug_simple_databinding_build.gradle
Last active August 29, 2015 14:23
Top-level build file where you can add configuration options common to all sub-projects/modules.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:1.3.0-beta2"
classpath "com.android.databinding:dataBinder:1.0-rc0"
λ ~:mm-sort gem install ffi-icu
λ ~:mm-sort irb
2.2.2 :001 > require 'ffi-icu'
true
2.2.2 :002 > collator = ICU::Collation::Collator.new("mm")
#<ICU::Collation::Collator:0x007ff982336610 @c=#<FFI::AutoPointer address=0x007ff9837e2610>>
2.2.2 :003 > collator.collate(["အို", "အ", "အေ", "အု", "အော်", "အော", "အံ"])
[
[0] "အ",
[1] "အံ",
@yelinaung
yelinaung / Converter.java
Created April 8, 2015 08:12
Generated Java converter from Paytan. License : GPL v3
// Zawgyi<>Unicode converter python module
// Based on rules from Parabaik Myanmar Text Converter
// Copyright (C) 2014 Ngwe Tun (Solveware Solution)
// Copyright (C) 2014 Ye Mon Kyaw
// This file is part of Paytan.
// Paytan is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
@yelinaung
yelinaung / 1989.json
Last active August 29, 2015 14:16
1989 in JSON
{
"artist": "Taylor Swift",
"album": "1989",
"desciption": "1989 is the fifth studio album by American singer-songwriter Taylor Swift. It was released on October 27, 2014, through Big Machine Records.",
"songs": [
{
"title": "Welcome To New York",
"artist": "Taylor Swift",
"album": "1989",
"composer": "Taylor Swift & Ryan Tedder",
@yelinaung
yelinaung / exp#1.js
Last active August 29, 2015 14:11
λ Lambda Camp (Responses). Event url : https://www.facebook.com/events/1498733757081658
function power(base,expo) {
switch(expo) {
case 0: return 1;
case 1: return base;
default: expo--;return base*power(base,expo);
}
}