Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ye Lin Aung yelinaung

🏠
Working from home
View GitHub Profile
@yelinaung
yelinaung / tutorial.md
Created Jul 20, 2018 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API
View tutorial.md

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

View keybase.md

Keybase proof

I hereby claim:

  • I am yelinaung on github.
  • I am yelinaung (https://keybase.io/yelinaung) on keybase.
  • I have a public key ASATtA1d5QNT3Nu0q73LRZiQLFrmVi5vgAfbNdqvaZeiBwo

To claim this, I am signing this object:

@yelinaung
yelinaung / tree.md
Created Dec 28, 2017 — forked from hrldcpr/tree.md
one-line tree in python
View tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

View commandline.md

Bash shortcuts

Command Description
Ctrl + a To the beginning of the line
Ctrl + e To the end of the line
Alt + b One word back
Alt + f One word forward
Ctrl + k Delete to the end of the line
Ctrl + u Delete to the beginning of the line
View mm.go
package main
import "fmt"
import "unicode/utf8"
func main() {
str1 := "ခ"
str2 := "a"
str3 := "界"
View Frequent.java
public static int getFreq(List<Integer> list) {
int mostFreq = 0;
//System.out.println("list is " + list);
Map<Integer, Integer> map = new HashMap<>();
for (int i : list) {
int freq = Collections.frequency(list, i);
map.put(i, freq);
}
View gist:8d50fc737168ca2f2bb0
When I open "My Location" button, the app crashes. Here are the logs
```
Google Maps Android API I Google Play services package version: 7899438
msg D first lat long : 16.8049667 96.1374455
AndroidRuntime D Shutting down VM
E FATAL EXCEPTION: main
E Process: org.maepaysoh.maepaysoh, PID: 5192
E java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.gson.JsonArray org.maepaysoh.maepaysohsdk.models.Geometry.getCoordinates(
)' on a null object reference
View VoterCall.java
String voterName = "အောင်ဆန်းစုကြည်";
String voteDob = "1945-06-19";
Map<String, String> params = new HashMap<>();
params.put("dateofbirth", voteDob);
params.put("nrcno", null);
params.put("father_name", null); // optional
Call<Voter> voterCall = checkVoterService.searchVoter(voterName, params);
voterCall.enqueue(new Callback<Voter>() {
@Override public void onResponse(Response<Voter> response) {
View activity_mail.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="org.mmaug.checkvoterlist.MainActivity">
View Retrofit.java
String BASE_URL = "https://checkvoterlist.uecmyanmar.org/";
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
CheckVoterService checkVoterService = retrofit.create(CheckVoterService.class);
You can’t perform that action at this time.