当前位置:  编程技术>移动开发
本页文章导读:
    ▪Activity(1)        Activity(一) How to start an Intent? Intent intent = new Intent(this, SignInActivity.class); startActivity(intent); Intent Intent = new Intent(); Intent.setComponent(new ComponentName(pkgName, activityName)); Intent Intent = new Intent(); Intent.se.........
    ▪ 升级Xcode失败的解决办法        升级Xcode失败的解决方法 以前一直用的Xcode 3.2.5,现在准备升级到Xcode 4.3.1,在官网上下载了Xcode 4.3.1的安装包,公司电脑的系统是Lion 10.7.3,安装一切顺利,回到家后,同样的安装包,同样.........
    ▪ fedora之ssh配备       fedora之ssh配置 1) 安装openssh-server[root@localhost ~]# yum install openssh-server2) 查看是否已成功安装openssh-server[root@localhost ~]# rpm -qa | grep openssh-serveropenssh-server-5.3p1-19.fc12.i686[root@localhost ~]#3) 修改ssh.........

[1]Activity(1)
    来源: 互联网  发布时间: 2014-02-18
Activity(一)
How to start an Intent?
Intent intent = new Intent(this, SignInActivity.class);
startActivity(intent);

Intent Intent = new Intent();
Intent.setComponent(new ComponentName(pkgName, activityName));

Intent Intent = new Intent();
Intent.setClassName(String pkgName, String activityName);

//Activity Send
Intent intent = new Intent(Intent.ACTION_SEND);
Intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.putExtra("apkpath", "/mnt/sdcard/apkinstall");
startActivity(intent);

//Activity Receive
Intent intent = getIntent();
intent.hasExra("apkpath");
String recevieValue = intent.getStringExtra("apkpath");

File file = new File(recevieValue);
if(file.exists()){
  Toast.makeText(this, "OK", Toast.LENGTH_SHORT).show();
}


//Send
static final private int GET_CODE = 0;
startActivityForResult(intent, GET_CODE);
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {

    if (requestCode == GET_CODE){
        if (resultCode == RESULT_CANCELED){}
        else {System.out.println("data.getData() " + data.getAction());}
    }
}

//Receive
setResult(RESULT_OK, (new Intent()).setAction("Corky!"));




Saving activity state

There's no guarantee that onSaveInstanceState() will be called before your activity is destroyed,  If the system calls onSaveInstanceState(), it does so before onStop() and possibly before onPause().

Because the default implementation of onSaveInstanceState() helps save the state of the UI, if you override the method in order to save additional state information, you should always call the superclass implementation of onSaveInstanceState() before doing any work. Likewise, you should also call the supercall implementation of onRestoreInstanceState() if you override it, so the default implementation can restore view states.

A good way to test your application's ability to restore its state is to simply rotate the device so that the screen orientation changes.

    
[2] 升级Xcode失败的解决办法
    来源: 互联网  发布时间: 2014-02-18
升级Xcode失败的解决方法

以前一直用的Xcode 3.2.5,现在准备升级到Xcode 4.3.1,在官网上下载了Xcode 4.3.1的安装包,公司电脑的系统是Lion 10.7.3,安装一切顺利,回到家后,同样的安装包,同样的系统,安装报错,提示必须先安装Mobile Device Framework。

 

双击安装包,出来下面的界面:


 

右键显示包内容,然后按照下面的路径找到MobileDevice.pkg,双击安装即可:Contents->Resources->Packages->MobileDevice.pkg

 

或者到官网下载xcode_432_lion.dmg,直接安装即可。

 

最简单的方法:直接在App Store里进行安装。


    
[3] fedora之ssh配备
    来源: 互联网  发布时间: 2014-02-18
fedora之ssh配置
1) 安装openssh-server

[root@localhost ~]# yum install openssh-server
2) 查看是否已成功安装openssh-server

[root@localhost ~]# rpm -qa | grep openssh-server


openssh-server-5.3p1-19.fc12.i686
[root@localhost ~]#
3) 修改ssh服务的配置文件

配置ssh服务的运行参数, 是通过修改配置文件/etc/ssh/ssh_config实现的. /etc/ssh/ssh_config文件的配置选项非常多, 但大部分都已经用"#"注释掉了.

#Port 22                   

#Protocol 2,1                     

配置完保存配置文件, 不过如果没什么特殊的要求这都不用配置.

4) 重启SSH服务

[root@localhost ~]# /etc/rc.d/init.d/sshd restart
可能没有
service sshd restart
ssh localhost

Stopping sshd:                                     [ OK ]

Starting sshd:                                     [ OK ]
5) 如果开启了防火墙, 我们需要允许TCP协议的22端口通过.

[root@localhost ~]# iptables -I INPUT -p tcp --dport 22 -j ACCEPT
6) 如果想让ssh服务开机就运行, 需要使用# ntsysv命令打开开机服务选项卡. 选中sshd后按"OK".

[root@localhost ~]# ntsysv

为了开机启动打开

vim /etc/profile
最后一行
/sbin/service sshd start
/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
7) 到这里所有工作都完成了, 可以尝试从客户端SSH登陆Fedora. 我用的是PUTTY, 一款非常好用的软件, 支持Telnet, SSH
-------------yum---------
http://mirrors.163.com/.help/fedora.html

代理
http://www.cnblogs.com/ncturtle/archive/2011/11/24/2262051.html

每行加
proxy=http://web-proxy.什么什么.com:8080
office2007破解
http://wenku.baidu.com/view/a0973911cc7931b765ce15eb.html


wget也需要代理
vim .wgetrc
http-proxy=web-proxy.什么什么.com:8080
ftp-proxy=web-proxy.什么什么.com:8080

    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3