当前位置:  编程技术>移动开发
本页文章导读:
    ▪jinkins怎么集成git        jinkins如何集成git http://computercamp.cdwilson.us/jenkins-git-clone-via-ssh-on-windows-7-x64     Download and install Git for Windows from http://code.google.com/p/msysgit/downloads/list?can=3 Download and install Jenkins for Windows from http:.........
    ▪ width跟height对weight的影响        width和height对weight的影响 weight是比重,在线性布局中用来分配各组件的空间.由于方向要么是竖直要么是水平,以竖直为例来分开说明三个属性的互相影响.假设有一个竖直排列的线性布局,其.........
    ▪ 在ListView中增多HeaderView和FootView       在ListView中增加HeaderView和FootView 在开发新浪微博的时候我使用了android中的ListView中的FootView来增加一个更多项来动态添加数据。但是我在开发的时候却遇到这个问题就是我添加了这个FootView.........

[1]jinkins怎么集成git
    来源: 互联网  发布时间: 2014-02-18
jinkins如何集成git

http://computercamp.cdwilson.us/jenkins-git-clone-via-ssh-on-windows-7-x64

 

 

Download and install Git for Windows from http://code.google.com/p/msysgit/downloads/list?can=3

Download and install Jenkins for Windows from http://mirrors.jenkins-ci.org/windows/latest

Install the Git plugin:

  • Go to “Manage Jenkins” –> “Manage Plugins” –> “Available”

  • Check the box next to “Git Plugin”

  • Click “Download now and install after restart”

  • After the message “Downloaded Successfully…” check the box “Restart Jenkins…”

  • Click the link “ENABLE AUTO REFRESH” in the top right of the page

Now we need to configure Jenkins to know where the git cmd is located.

Go to “Manage Jenkins” –> “Configure System”

Under “git” change “Path to Git executable” to C:\Git\cmd\git.cmd (NOT C:\Git\bin\git.exe)

Click the “Save” button

By default, the Jenkins installer sets up Jenkins to run as a service, which runs as the “Local System account”, NOT your user account. Since the “Local System account” does not have SSH keys or known_hosts set up, “git clone” will fail.

We need to add your Jenkins build SSH keys (id_rsa and id_rsa.pub) to the “Local System account” and we need to populate the known_hosts file with the remote server info.

First, copy your Jenkins build SSH keys into C:\Git\.ssh so that ssh.exe can find them.

Open a normal cmd.exe shell and type the following:

c:\>"C:\Git\bin\ssh.exe" -T git@your.git.server

You should get a response that looks like:

The authenticity of host 'your.git.server (xxx.xxx.xxx.xxx)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)?

Type yes and you should see something like:

Warning: Permanently added 'git.sfo.archrock.com,172.27.164.249' (RSA) to the list of known hosts.
...

This has added the remote server to C:\Git\.ssh\known_hosts

Next, copy C:\Git\.ssh to C:\Windows\SysWOW64\config\systemprofile\.ssh (the “Local System account” home).

Now set up a new Jenkins job and you should be able to clone via SSH!

If you want to actually test running git commands AS the “Local System account”, you need to run cmd.exe as the “Local System account”, which requires PsTools.

Download and extract PsTools from http://download.sysinternals.com/Files/PsTools.zip

Open a normal cmd shell and run:

c:\>PsTools/PsExec.exe -i -s cmd.exe

This should open a new cmd prompt running as the “Local System account” and any SSH commands you run in this account will use the keys in C:\Windows\SysWOW64\config\systemprofile\.ssh

You can now test Git commands running as the same user as Jenkins.


    
[2] width跟height对weight的影响
    来源: 互联网  发布时间: 2014-02-18
width和height对weight的影响
weight是比重,在线性布局中用来分配各组件的空间.
由于方向要么是竖直要么是水平,以竖直为例来分开说明三个属性的互相影响.

假设有一个竖直排列的线性布局,其中有两个组件,A和B

1.若要A和B严格按照weight比例分配空间,则必须设置两个的height都为0或者都为fillparent.

2.若其中有一个为wrapcontent,且weight设为0,则不管其他组件weight怎样,至少要将该组件显示完全.

3.wrapcontent时,weight数值越大,空间越大.
fillparent时,weight数值越大,空间越小.


暂时发现就这些....
我觉得其中wrapcontent情况下使用weight比较有用.不管父组件如何,总能给组件留下一个位置.
省去了使用相对布局来布置界面,毕竟相对布局没有线性布局兼容性高.

    
[3] 在ListView中增多HeaderView和FootView
    来源: 互联网  发布时间: 2014-02-18
在ListView中增加HeaderView和FootView
在开发新浪微博的时候我使用了android中的ListView中的FootView来增加一个更多项来动态添加数据。但是我在开发的时候却遇到这个问题就是我添加了这个FootView的时候我通过在后台去下载数据比如:图片和一下文字信息的时候当后台有了数据过个通过消息机制来通知主线程去刷新UI(这里需要注意的是我们在开发当中所有的UI刷新必须在主线程去刷新界面,因为android中UI线程是不安全的其他我也不多说了网上有许多的资料啦...)回到问题当接收到了后台的消息过后我们要去刷新界面(主线程中)这是我们会调用
:((homeActivityBaseAdapter)listView.getAdapter
()).notifyDataSetChanged();这个方法去刷新界面。简单的介绍一下homeActivityBaseAdapter这个是我自定义的继承于BaseAdapter的适配器,这是系统会跑出异常:java.lang.ClassCastException:android.widget.HeaderViewListAdapter这时我们可以看到这个.HeaderViewListAdapter这个关键词,通过这个可以知道
:android.widget.HeaderViewListAdapter 不能强转为listview的异常信息,这是因为当向listview中加入headerview或者footviwer时,调用ListView的setAdapter方法会将adapter转化为headerviewlistadapter
解决方法:
HeaderViewListAdapter listAdapter = (HeaderViewListAdapter) listView.getAdapter(); 
homeActivityBaseAdapter adapter = (homeActivityBaseAdapter)listAdapter.getWrappedAdapter(); 
adapter.notifyDataSetChanged();
。。。。希望对你有帮助哈!!!
1 楼 aaa6287152 2012-04-03  
楼主能把添加headview的方法填一下吗,最近在研究网易新闻的时候想把首页的大图和下面的listview结合到一起,结果一直报错,上面的大图,我用的viewflpper来切换图片,或者能去这里替我做个解答吗 http://www.eoeandroid.com/thread-164408-1-1.html
先表示感谢了

    
最新技术文章:
▪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