`
文章列表
自定义的tableviewcell没有显示 需要在tableview列表的m文件的viewDidLoad方法中加载 [你的tableview registerNib:[UINib nibWithNibName:@"你的自定义cell" bundle:nil] forCellReuseIdentifier:@"定义的cell字符串标示"];

IOS视图切换

    博客分类:
  • ios
iPhone开发中从一个视图跳到另一个视图有三种方法: 引用1、self.view addSubView:view 、self.window addSubView,需要注意的是,这个方法只是把页面加在当前页面。此时在用self.navigationControler.pushViewController和 pushViewController 是不行的。要想使用pushViewController和popViewController进行视图间的切换,就必须要求当前视图是个NavigationController。 2、就是使用self.navigationControler pushView ...
webview加载html的代码 NSString *htmContent = [NSString stringWithFormat:@"<html></html>" 图片太大怎么办? 有一种方法,通过js修改图片的样式 http://zxs19861202.iteye.com/blog/1853102 另一种方法: 第一步:服务端返回的html代码中把img的样式去掉,rails中使用这个帮助方法 Sanitize.clean(text, remove_contents: [' ...
Mac下创建新的Android项目出错 设置过程 下载了java7 安装,下载了eclipse安装,在eclipse里选择了adt插件安装 具体症状如下: 可以导入项目并运行,创建项目如果选择了create activity就会报错,如果跳过这一步,无法创建actviity 解决方案: 下载java6 http://supportdownload.apple.com/download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/Mac_OS_X/downloads/031-03190.20140529.Pp3r4/Ja ...
修改数据库密码: mysqladmin -u root -p password 输入旧密码 然后输入新密码 修改密码成功之后,要进入mysql做一些用户密码重置,否则会访问报错 mysql -u root -p 输入密码 use mysql; UPDATE user SET Password=PASSWORD('你的新密码') where USER='root'; FLUSH PRIVILEGES;
resert到某一个 比较暴力的方法 git reset --hard <commit-id> git push <reponame> -f # 这样会消除截止到回溯版本的历史记录 比较温柔的做法 # Reset the index to the desired tree git reset 56e05fced # Move the branch pointer back to the previous HEAD git reset --soft HEAD@{1} git commit -m "Revert to ...
在用户目录的.bashrc中添加一一堆alias命令,但是每次重新ssh练上去都不能生效,每次都要source一下,应该是ssh启动session加载的时候,没有加载bashrc造成的,找了一下资料,可以 /etc/profile中添加如下对bashrc的加载 if [ -f ~/.bashrc ]; then . ~/.bashrc fi
1、使用DataTable来对页面上的table排序默认会有一些效果不太需要,比如查询,分页等怎么去掉呢? $('.sort_table').dataTable({ "bPaginate": false, "bFilter": false, "bInfo": false, ...
当前时间第几周(从零开始计数的) # 20140812 Time.now.strftime("%Y%W") => "201432" 当前时间周的开始日期,结束日期( 需要注意的是第二个参数 与上面产生的值差一) # 周一 Date.commercial( 2014, 33, 1 ).to_time => 2014-08-11 00:00:00 +0800 # 周日 Date.commercial( 2014, 33, 7 ).to_time => 2014-08-17 00:00:00 +0800
Linux判断CC攻击命令详解 2011年12月23日 ⁄ 安全 ⁄ 暂无评论 查看所有80端口的连接数 netstat -nat|grep -i '80'|wc -l 对连接的IP按连接数量进行排序 netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n 查看TCP连接状态 netstat -nat |awk '{print $6}'|sort|uniq -c|sort -rn netstat -n | awk '/^tcp/ {++S[$NF]};END {for(a in S) p ...
Asynchronous Http Client是android中非常好的异步请求工具 除了异步之外还有很多封装比如json的处理,cookie的处理 引用 Persistent Cookie Storage with PersistentCookieStore This library also includes a PersistentCookieStore which is an implementation of the Apache HttpClient CookieStore interface that automatically saves cookies to Shared ...
// this need android:minSdkVersion="11" getActionBar().setDisplayHomeAsUpEnabled(true); @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { finish();// finish your activity } ...

Ruby中HmacMD5加密

    博客分类:
  • ruby
跟Java方面做接口,中间有一个HmacMD5的加密算法需要我们来实现 so,so结果如下 gem install ruby-hmac require 'hmac-md5' HMAC::MD5.new("test_key").update("test_string").hexdigest.upcase() ruby的输出结果 引用 => "3FD9B6B4901DAF25BFB9DAA0718B3698" package com.study; import java.io.IOExce ...
添加github的项目源之后,项目在产品模式下报错,使用的是passenger来启动的项目 It looks like Bundler could not find a gem. This is probably because your application is being run under a different environment than it's supposed to. Please check the following: * Is this app supposed to be run as the `***此处省略***` user? * Is ...
页面加载图片404的怎么办,图片监听onerror事件,如下操作 onerror: "$(this).attr('src', 'notfound.jpg')"
Global site tag (gtag.js) - Google Analytics