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
img { | |
max-width: 100% | |
} | |
blockquote { | |
background-color:#F8FFA4; | |
border-bottom-color:black; | |
border-bottom-style:solid; | |
border-bottom-width:1px; | |
border-image:initial; |
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
<?php | |
$link = db_connect(); | |
$query = "SHOW tables"; | |
$result = mysql_query($query); | |
while($row = mysql_fetch_array($result)) | |
{ | |
$tbl = $row[0]; |
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
import android.content.Context; | |
import android.database.Cursor; | |
import android.support.v4.content.AsyncTaskLoader; | |
/** | |
* Used to write apps that run on platforms prior to Android 3.0. When running | |
* on Android 3.0 or above, this implementation is still used; it does not try | |
* to switch to the framework's implementation. See the framework SDK | |
* documentation for a class overview. | |
* |
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
import com.handmark.pulltorefresh.library.PullToRefreshListView; | |
import android.os.Bundle; | |
import android.support.v4.app.ListFragment; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ListView; | |
public class PullToRefreshListFragment extends ListFragment { |
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 NodeIndexProvider extends ClassContentProvider { | |
public static final Uri CONTENT_URI = Uri.parse("content://com.atami.mgodroid.provider/node_indices"); | |
public NodeIndexProvider() { | |
provideClass(NodeIndex.class); | |
} | |
} |
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
@Table(name = "node_indices") | |
@MimeType(company = "com.atami") | |
@Authority(name = "com.atami.mgodroid.provider") | |
public class NodeIndex { | |
@Column(name = "name") | |
String name; | |
@Column(name = "_id") | |
@PrimaryKey |
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
static String getDayOfMonthSuffix(final int n) { | |
if (n >= 11 && n <= 13) { | |
return "th"; | |
} | |
switch (n % 10) { | |
case 1: return "st"; | |
case 2: return "nd"; | |
case 3: return "rd"; | |
default: return "th"; | |
} |
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 AsyncBus extends Bus { | |
private final Handler mainThread = new Handler(Looper.getMainLooper()); | |
@Override public void post(final Object event) { | |
mainThread.post(new Runnable() { | |
@Override public void run() { | |
AsyncBus.super.post(event); | |
} | |
}); | |
} |
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
#!/usr/bin/python | |
''' | |
Copyright 2009, The Android Open Source Project | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.node_container); | |
mIsDualPane = getResources().getBoolean(R.bool.has_two_panes); | |
nid = getIntent().getIntExtra("nid", 0); | |
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |