This file contains hidden or 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 SimpleRandom extends javax.swing.JFrame { | |
Thread auto; | |
public SimpleRandom() { | |
initComponents(); | |
auto = new Thread() { | |
@Override | |
public void run() { | |
while(true) { | |
try { | |
sleep(1000); |
This file contains hidden or 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 ListViewActivity extends ListActivity { | |
String[] players = new String[] | |
{ "Leonel Messi", | |
"Zinedine Zidane", | |
"Diego Maradona", | |
"Marco Van Basten", | |
"Ronaldinho", | |
"Steven Gerrard", | |
"Cristiano Ronaldo", |
This file contains hidden or 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 CustomAdapter extends ArrayAdapter<String> { | |
private final Context context; | |
private final String[] values; | |
public CustomAdapter(Context context, String[] values) { | |
super(context, R.layout.team_list, values); | |
this.context = context; | |
this.values = values; | |
} |
This file contains hidden or 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 CustomBaseAdapter extends BaseAdapter { | |
Activity activity; | |
String[] values; | |
public CustomBaseAdapter(Activity context, String[] nameList) { | |
this.activity = context; | |
this.values = nameList; | |
} | |
This file contains hidden or 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 Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
Button btnClick = (Button) findViewById(R.id.btnClick); | |
btnClick.setOnClickListener(new View.OnClickListener() { | |
public void onClick(View view) { | |
Toast.makeText(getApplicationContext(), "Clicked!", Toast.LENGTH_LONG).show(); |
This file contains hidden or 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 JFreeChart createPieChart() { | |
DefaultPieDataset dataset = new DefaultPieDataset(); | |
dataset.setValue("ส้มตำ", 34); | |
dataset.setValue("กระเพาะไก่", 87); | |
dataset.setValue("น้ำตกหมู", 72); | |
dataset.setValue("ข้าวต้มปลา", 52); | |
dataset.setValue("กุ้งเผา", 61); | |
JFreeChart chart = ChartFactory.createPieChart("อาหารที่ชื่นชอบ", dataset, |
This file contains hidden or 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
<?php get_count_facebook(); ?> |
This file contains hidden or 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
<meta-data | |
android:name="com.facebook.sdk.ApplicationId" | |
android:value="@string/app_id"/> |
This file contains hidden or 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
<div class="leftmenu"> | |
</div> |
This file contains hidden or 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 LoopExample6 { | |
public static void main(String[] args) { | |
for(int i=1; i<=5; i++){ | |
for(int j=1; j<=(5-i); j++){ | |
System.out.print(" "); | |
} | |
for(int k=1; k<i; k++){ | |
System.out.print("* "); |
OlderNewer