在实际项目开发中,经常会存在浮点数四舍五入保留几位小数的问题,故收集了几种常用方法:直接上代码(保留两位小数)。Format.java:import java.math.BigDecimal;import java.text.DecimalFormat;import java.text.Number...
分类:
编程语言 时间:
2015-01-12 12:43:31
阅读次数:
196
工作目标 //javascript语句如下无法获取text控件里值!设置断点,在即时窗口里查看document.getElementById("txt_JobGoal")值为null.运行起来还会提示类似信息:document.getElementById()不是对象或值为空!原因:是T...
分类:
Web程序 时间:
2015-01-12 10:50:36
阅读次数:
116
http://msdn.microsoft.com/en-us/library/system.text.encodinginfo.getencoding%28v=vs.110%29.aspxusing System;using System.Text;public class SamplesEnco...
分类:
其他好文 时间:
2015-01-12 10:47:54
阅读次数:
160
这里只简单做了两个按钮的。首先是两个按钮的背景:res/drawable/seg_left.xmlres/drawable/seg_right.xml字体颜色:res/drawable/seg_text_color_selector.xml这几个是对选中状态进行设置。下面对LinearLayout进...
分类:
移动开发 时间:
2015-01-12 10:34:37
阅读次数:
169
a, a:link {
cursor: pointer;
/*使用箭头 掠过显示小手 ie5只认: cursor: hand;*/
color: #666;
line-height: 24px;
text-decoration: none;
/*无下划线*/
white-space: nowrap;
/*无空格 不换行*/...
分类:
Web程序 时间:
2015-01-12 09:33:28
阅读次数:
159
在viewA中有一个button,点击后跳转到另一个页面,用下面这段代码viewB会黑屏,什么都看不到。
-(void)login:(id)sender{
mainViewController *mainView=[[mainViewController alloc]init];
NSLog(@"%@",__name.text);
if([__name.text isEqualToStri...
分类:
移动开发 时间:
2015-01-12 09:26:56
阅读次数:
205
位移动画
public class MainActivity extends Activity implements OnClickListener {
private TextView tv_text;
private TranslateAnimation animation;
@Override
protected void onCreate(Bundle savedInstan...
分类:
移动开发 时间:
2015-01-12 06:50:32
阅读次数:
163
今天在帮我们学校做网站的时候,由于在css这里不是很擅长,过程中发现一个问题,a:hover的时候,字体的颜色不变.后来才发现将a和div的嵌套的问题,我的css代码为:.left_box .lb_wrap .lb_theme { color:#900; text-align:cente...
分类:
Web程序 时间:
2015-01-12 00:20:36
阅读次数:
2011
public static String filterOffUtf8Mb4_2(String text) throws UnsupportedEncodingException { byte[] bytes = text.getBytes("utf-8"); ByteBu...
分类:
其他好文 时间:
2015-01-12 00:20:18
阅读次数:
146
环境:在win7 上Vmware虚拟机环境中安装的ubuntu 14.04开发相关:ruby 2.2.0rails 4.2.0sublime text 3本文说明:所有的命令均在$ 之后,若$前边带有信息,只是为了方便你理解和与自己对照。安装过程中由于这样那样的原因,产生许多坑,所谓坑是对初学者来说...
分类:
系统相关 时间:
2015-01-12 00:18:40
阅读次数:
315