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
<?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> |
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 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; | |
} |
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 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); |
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
<?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 |
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' | |
apply plugin: 'com.android.databinding' | |
android { | |
compileSdkVersion 22 | |
buildToolsVersion "23.0.0 rc2" | |
defaultConfig { | |
applicationId "org.mmaug.simpledatabinding" | |
minSdkVersion 15 |
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
// 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" |
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
λ ~: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] "အံ", |
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
// 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 |
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
{ | |
"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", |
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
function power(base,expo) { | |
switch(expo) { | |
case 0: return 1; | |
case 1: return base; | |
default: expo--;return base*power(base,expo); | |
} | |
} |