运行效果:
方法一
public void openDialog(View v) {
// 打开一个对话框
// 构建者对象
AlertDialog.Builder builder = new Builder(this);
// 构建者创建一个对话框
AlertDialog alertDialog = builder.create();
// 设置对话框的标题
...
分类:
移动开发 时间:
2014-06-07 01:14:00
阅读次数:
252
- (void)loadAssets {
// Initialise
_assets = [NSMutableArray new];
_assetLibrary = [[ALAssetsLibrary alloc] init];
// Run in the background as it takes a while to get a...
分类:
其他好文 时间:
2014-06-05 12:06:55
阅读次数:
215
一、引用命名空间
using System.Security.Cryptography;
二、核心代码
private void button1_Click(object sender, EventArgs e)
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] da...
分类:
其他好文 时间:
2014-06-05 09:56:00
阅读次数:
287
条款35 placement new
直接调用构造函数是行不通的,然而可以通过使用placement new来哄骗编译器调用构造函数:
void *operatornew(size_t, void* p) throw()
{ return p;}
placement new是operator new的一个标准的重载版本,也位于全局名字空间中,但和我们通常看到的operator new不同,...
分类:
编程语言 时间:
2014-06-05 09:20:32
阅读次数:
315
要翻转的时候,
首先响应的方法:
-(BOOL)shouldAutorotateToInterf
aceOrientation:(UIInterfaceOrientation)interfaceOrientation。
return YES则支持翻转,NO则不支持。
紧接着
-(void)willRotateToInterfaceOrientation:(UIInterfaceOr...
分类:
其他好文 时间:
2014-06-05 08:33:55
阅读次数:
142
#include
#include
using namespace std;
class jianli
{
public:
void getvalue()
{
cin>>name>>age>>sex>>major;
}
void display()
{
cout<<"name:"<<name<<en...
分类:
其他好文 时间:
2014-06-05 05:35:42
阅读次数:
235
根据java的多线程下载,我们将进行对java的多线程下载移植到android客户端。
java多线程在客户端的移植步骤
1.添加用户权限:发送网络请求,sd卡的读写
2.点击按钮触发访问网络请求的时间,必须开启一个线程,在线程中去启动主线程中不能发送网络请求
new Thread(){
@Override
public void run() {
}
}.start();...
分类:
移动开发 时间:
2014-06-05 05:10:09
阅读次数:
280
package com.beyole.util;
import java.awt.BorderLayout;
import java.awt.Button;
import javax.swing.JFrame;
public class test7 {
public static void main(String[] args) {
JFrame frame=new JFrame("C...
分类:
编程语言 时间:
2014-06-05 04:30:51
阅读次数:
285
问题RT,在程序中我使用了QT的监听事件,监听鼠标的位置,如果鼠标在按钮上就改变按钮的ICON,但是在Release版本中(Debug版本没问题),这些被监听的按钮都看不见了,于是开始了寻找答案的道路。
闲话少叙,直接上码:
void MainHomeForm::init()
{
//为按钮注册事件
ui->SystemSetButton->installEventFilter...
分类:
其他好文 时间:
2014-06-05 04:29:25
阅读次数:
537
腾讯微薄的分享与新浪的区别在于除了获取accessToken之外还需要获取openId
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.auth);
web = (WebView) findVi...
分类:
其他好文 时间:
2014-06-04 21:00:25
阅读次数:
354