Skip to content

Instantly share code, notes, and snippets.

View nhoxbypass's full-sized avatar
🐧
I come from Earth

Tam H. Doan nhoxbypass

🐧
I come from Earth
View GitHub Profile
package com.demo.thanh.locationdemoapp;
import android.Manifest;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
@nhoxbypass
nhoxbypass / ThreadAsyncTaskTestingActivity.java
Last active November 1, 2017 13:55
Example gist to understand how threads and AsyncTasks run with Executor and ThreadPool
package iceteaviet.com.threadpool;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
//ReactJs
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
ReactDOM.render(<HelloMessage name="Hieu Tam" />, mountNode);
//React Native
class HelloMessage extends Component {
using System;
using System.Text;
namespace OverrideAndNew
{
class Program
{
static void Main(string[] args)
{
BaseClass bc = new BaseClass();
<Button
android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/check"/>
<Button
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<Button
android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/check"/>
<Button
android:id="@id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
class Base
{
public Base()
{
Console.WriteLine("Base 0 constructor called");
}
}
class Child : Base
{
class Base
{
public Base()
{
Console.WriteLine("Base 0 constructor called");
}
public Base(int i)
{
Console.WriteLine("Base " + i + " constructor called");
// access modifiers, accessors và constructors được bỏ qua cho ngắn gọn
public class HCMUSDeveloper implements Serializable
String name;
int yearsOfExperience;
List skillSet;
float favoriteFloat;
static class Skill implements Serializable {
String name;