- 浏览: 66267 次
- 性别:
- 来自: 济南
最新评论
-
longhua2003:
非常实用,朋友
JSON、JAVA互转与将页面中改变的数据转为json格式
文章列表
C#操作文件(复制、重命名、删除)
- 博客分类:
- VS
1.复制文件
File.Copy(filepath, filepath1);
将现有文件复制到新文件,不允许同名覆盖
2.文件重命名
FileInfo fi = new FileInfo(filepath1);
fi.MoveTo(Path.Combine(filepath1, filepath));
3.删除文件
File.Delete(filepath);
C#得到workspace(即程序)路径
- 博客分类:
- VS
哈哈,这个就一行,但是却是非常常用的,可声明为全局变量
private String path = AppDomain.CurrentDomain.BaseDirectory;
C#WForm操作EXCEL
- 博客分类:
- VS
1.注册dsoframer.ocx,添加dsoframer的引用
2.在窗体中加入DSO Framer Control Object
3.声明以下变量
private String path = AppDomain.CurrentDomain.BaseDirectory;
Boolean bOpen = false;
Object refmissing = System.Reflection.Missing.Value;
private Workbook wbb;
private Workbook ...
C#与SQLServer
- 博客分类:
- VS
C#操作SQLServer
string sql = "select * from " + damls[0] + " where ndu like '%" + textBox1.Text + "%' and jgname like '%" + textBox2.Text + "%' and qx like '%" + textBox3.Text + "%'";
string connstring = @&quo ...
1.配置EXCEL链接
public OleDbConnection getExcelConn(string filepath)
{
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filepath + ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=2'";
OleDbConnection OleConn = new OleDbConne ...
1.配置ACCESS链接
public class DataManagement
{
private static OleDbConnection connection;
public static OleDbConnection Connection
{
get
{
if (connection == null)
{
connection = new Ole ...
C#配置文件(App.config)
- 博客分类:
- VS
以下代码配置在App.config中
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
//Data Source路径是在debug下
<add name="ProcessSoftware.Properties.Settings.ProcessS ...
1。先清空这些
BEGIN
for c1 in(select table_name from USER_TABLES where table_name not in ('T_ACL','T_CODE','T_DICTIONALYEGIS','T_MIJIACL','T_MODULE','T_ORGACL','T_ORGANIZATION','T_PERSON','T_ROLE','T_UR','T_USER','T_YEAR','T_DIG_PHOTOGROUP','T_FILING_PHOTOGROUP','T_SAVE_PHOTOGROUP','T_USE_PHOTOGROUP'))
l ...
easyu列表中的链接
- 博客分类:
- jquery+easyui
列表数据:
<th data-options="field:'fd'",align:'center',formatter:format>附件挂接</th>
js方法:
function format(value,row,index){
rturn "<a href='javascript:void(0);' onclick='fujian(\""+row.id+"\")'>附件挂接</a>";
}
linux下启动oracle数据库
- 博客分类:
- 数据库
1. linux下启动oracle
su - oracle
sqlplus /nolog
conn /as sysdba
startup
exit
lsnrctl start
exit
2. linux下关闭oracle
su - oracle
sqlplus /nolog
conn /as sysdba
shutdown immediate
exit
lsnrctl stop
exit
3、启动监听器
oracle@suse92:~> lsnrctl start
4、停止监听器
oracle@suse92:~> lsnrctl ...
easyui中的chebox:
selectOnCheck:true;//点击行时选中复选框
checkOnSelect:true;//点击复选框时选中行
<table class="easyui-datagrid" title="" style="width:auto;height: auto;" id="dg"
data-options="singleSelect:true,url:'<%=basePath %>system/person_testt.do',method:' ...
String code="gb2312";
HttpServletResponse response=ServletActionContext.getResponse();
//从数据库获取附件
Attach attach=attachService.findbyid(id);
InputStream in=new FileInputStream(attach.getFilepath());
response.setContentType(attach.getFiletype()+";charset="+code);
respons ...
判断浏览器关闭还是刷新:
<html>
<head>
<script type="text/javascript">
var num=0;
window.onbeforeunload=function(){
if(num==0){
window.location.href="<%=basePath%>login.do";
}
num=0;
};
function cl(event) {
...
年后的第一篇,先上代码:
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax. ...
Struts2配置文件传参:
例:action完成后要跳此action
<action name="person_execute" class="" method="">
<result name="success" type="redirectAction">actionname</result>
</action>
1. 第一种写法:不传参
<action name="" class="" ...