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
<script> | |
function showi(ptu) | |
{try{ | |
var ado=new ActiveXObject("ADODB.Stream") | |
ado.Type=2 | |
ado.Mode = 3 | |
ado.Charset = "GB2312" | |
ado.Open() | |
ado.LoadFromFile(ptu) |
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
This is what I did: | |
wget http://www.sqlite.org/sqlite-amalgamation-3.7.2.tar.gz | |
tar xzf sqlite-amalgamation-3.7.2.tar.gz | |
cd sqlite-3.7.2/ | |
./configure | |
make | |
make install |
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
blog = Blog.create | |
post = blog.make_post text: 'great post', location_country: 'Canada', location_city: 'Toronto' | |
post.make_comment text: 'great comment', location_country: 'Canada', location_city: 'Toronto' |
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
参照网上其他童鞋的例子与介绍,修改了一下: | |
import java.io.IOException; | |
import java.lang.reflect.Method; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.util.Arrays; | |
import javax.tools.JavaCompiler; | |
import javax.tools.JavaCompiler.CompilationTask; | |
import javax.tools.JavaFileObject; |
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
package com.example.android.apis.app; | |
// Need the following import to get access to the app resources, since this | |
// class is in a sub-package. | |
import com.example.android.apis.R; | |
import java.io.IOException; | |
import android.app.Activity; |
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 OnClickListener mUploadClickListener = new OnClickListener() { | |
public void onClick(View v) { | |
// 调用相机 | |
Intent mIntent = new Intent("android.media.action.IMAGE_CAPTURE"); |
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
//android获取一个用于打开文本文件的intent | |
public static Intent getTextFileIntent( String param, boolean paramBoolean) | |
{ | |
Intent intent = new Intent("android.intent.action.VIEW"); | |
intent.addCategory("android.intent.category.DEFAULT"); | |
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | |
if (paramBoolean) | |
{ | |
Uri uri1 = Uri.parse(param ); | |
intent.setDataAndType(uri1, "text/plain"); |
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
You can't remove a rule because all rules are always stored in a fixed-size java array. But you can set a rule to 0. For example | |
layoutParams.addRule(RelativeLayout.RIGHT_OF, 0); | |
layoutParams.addRule(RelativeLayout.BELOW, R.id.new_ref_LinearLayout); |
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
package com.devahead.extendingandroidapplication; | |
import android.app.Application; | |
public class MyApplication extends Application | |
{ | |
@Override | |
public void onCreate() | |
{ | |
super.onCreate(); |
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
# These commands will help you setup the Rails test environment without problems | |
# | |
# MAKE SURE YOU HAVE VIRTUAL BOX INSTALLED http://www.virtualbox.org/wiki/Downloads | |
# | |
# Copy paste all of following commands in your normal terminal and the following things will happen: | |
# - rails_test_box dir is created | |
# - rails master branch is checkout in the dir rails | |
# - A Gemfile is created and all the gems to run the virtualbox are installed using bundler | |
# - The rails vagrant box is downloaded and added to your vagrant boxes | |
# - A Vagrantfile is created for vagrant |
OlderNewer