- 博客(7)
- 收藏
- 关注
原创 ul、li显示图片标记
ul{ list-style-type: none; padding: 0px; margin: 0px;}ul li{ background-image: url(sqpurple.gif); background-repeat: no-repeat; background-position: 0px 5px; padding-l
2016-12-01 15:01:58 2191
原创 打印出所有的"水仙花数",所谓"水仙花数"是指一个三位数,其各位数字立方和等于该数本身
package com.lbm;public class NarcissisticNumber { public static void main(String[] args) { for(int i=101;i<=999;i++){ int hundreds = i/100; int decade = (i%100)/10; int unit = (i%100)%1
2016-11-28 18:15:03 813
原创 判断101-200之间有多少个素数,并输出所有素数
package com.lbm;public class prime_num { public static void main(String[] args) { for(int i=101;i<=200;i++){ boolean prime = true; int sqrt = (int)Math.sqrt(i); for(int j=2;j<sqrt+1;
2016-11-28 17:37:59 375
原创 古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?
package com.lbm;public class rabbit { public static void main(String[] args) throws InterruptedException{ int rabbitBaby1 = 1; int rabbitBaby2 = 0; int rabbitBaby3 = 0; boolean flag = true;
2016-11-28 16:47:40 680
原创 eclipse 导入项目后中文乱码问题
导入项目后,中文注释乱码,项目右键——properties——Resource——Text file encoding ——other——中选utf-8单击确定。
2015-08-07 11:12:45 362
原创 Eclipse 导入web项目后 报 The type javax.servlet.http.HttpServletRequest cannot be resolved.
导入公司项目后各种报错,本来以为为这个菜鸟又要各处问了,结果百度了一下,发现网上说的都是 classpath确实jar包的原因,后来自己分析了一下这几个缺的jar包都是tomcat实现的,可能是自己导入的时候没有配置tomcat Server。报错图1报错图2解决方法:项目右键——build Path——configure build Path选择Add L
2015-07-29 16:16:51 3989
原创 样式表写法
外部样式表:<head> <link rel="stylesheet" type="text/css" href="mystyle.css"></head>内部样式表:<head> <style type="text/css"> body {background-color: red} p {margin-left: 20px} </styl
2015-07-22 13:56:04 343
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人