[vb]使用vb统计.java的行数
工作需要,针对java文件,作了一个行数统计的工具。统计的主要代码如下:
Set srcIn = fso.OpenTextFile(fileNm, ForReading)
Do While Not srcIn.AtEndOfStream
buf = srcIn.ReadLine
'java总行数
allLinex = allLinex + 1
'java空白行
If Not flg And Trim(Replace(buf, vbTab, "")) = "" Then
'Debug.Print fileNm & ":" & allLinex
blankLinex = blankLinex + 1
End If
'java注释行
If flg Then
If InStr(buf, "*/") > 0 Then
flg = False
End If
commentLinex = commentLinex + 1
ElseIf InStr(Trim(Replace(buf, vbTab, "")), "//") = 1 Then
commentLinex = commentLinex + 1
End If
If InStr(Trim(Replace(buf, vbTab, "")), "/*") = 1 Then
flg = True
commentLinex = commentLinex + 1
End If
If flg An
相关文档:
2009-08-18 15:49
////设置居中(注意,要在设置窗体大小下面设置该句)
this.setLocationRelativeTo(null);
********************
String[] kecheng = {"Java","英语","数学"};
JComboBox jComboBox3 = new JComboBox(kecheng);
JComboBox jComboBox2 = new JComboBox();
******* ......
本案例是使用SQLSERVER2005作为数据源,使用TOMCAT6.0
第一步,把以下代码拷贝到tomcat的安装目录conf文件夹context.xml文件下。
数据库连接请修改
<Resource name="jdbc/demo"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.j ......
Sun公司一名员工自己创作的歌,关于Java EE 5,虽然不怎么好听,但歌词很有意思,程序员业余生活也可以这么丰富,羡慕!
Ladies and gentlemen, this is Java EE 5!
One, two, three, four, five
There’s a technology I use day and night
For my application with a web frontend
They told me to use .Net
......
选择了java,也就是选择了一条光明而坎坷的道路。说他光明是因为应用的地方日益广泛,全球有很大的开发群体在为之忙碌,开源项目应有尽有;说他坎坷,是因为随着java的发展,现在有了太多的分支技术j2ee 13种技术,太多的框架(从底层到页面)如果要掌握还真不是件容易的事情,而且开源的东西永无止尽的在升级,在推陈 ......
23.编程实现序列化的Student(sno,sname)对象在网络上的传输
package com.softeem.demo;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.net.ServerSocket;
import java.net.Socket;
class Student implem ......