03 2014 档案
摘要:1 1 //jQuery实现同步异步请求: 2 $.ajax("baidu.com").done(function(data){//done()等价于旧版的success() 3 alert(data); 4 }).fail(function(xhr){//fail()等价于旧版的error() 5 alert("Error occurred:"+xhr.statusText); 6 }); 7 //jQuery默认就是Get和异步请求方式,如果要更改这些,则以下这种写法: 8 $.ajax({ 9 u...
阅读全文
摘要:查询你的数据库有没有被木马注入的可能!大家平时在使用mssql的时候,有没有注意自己的数据库有没有被木马注入的可能呢请使用以下代码,这个是查询所有字符字段的sql语句:DECLARE @T varchar(255), @C varchar(255) DECLARE Table_Cursor CURSOR FOR Select a.name,b.name from sysobjects a,syscolumns b where a.id=b.id and a.xtype= 'u ' and (b.xtype=99 or b.xtype=35 or b.xtype=231 or b
阅读全文
摘要:1 private void Form_Load(object sender, EventArgs e)2 {3 //取消默认选中行4 dataGridView1.ClearSelection();5 }
阅读全文
摘要:1、很多程序员,为了测试,创建用户时都喜欢用123为密码。在oracle里,密码不能以数字开头。密码前面加个字母就可以创建成功了。2、创建成功后,首先想到的就是试着连接一下呀,好了,又报错:要在sysdba里操作授权(conn /as sysdba)不然的话,会报“未连接”的错误。完整的授权语句一般是:grant connect,create session,resource,dba to test;3、如果您在创建用户时确认加上密码,连接也带上正确的密码,但还是出现以下错误的话(至于是什么原因,请看红色字体标示),就要用:alter user test identified by a123;
阅读全文
摘要:import javax.swing.*;import java.awt.event.*;public class Demo extends JFrame{ public Demo(String title){ this.setTitle(title);//设置窗体标题 this.setBounds(350,350,350,300);//设置窗体尺寸 this.setVisible(true);//显示窗体 this.addWindowListener(new WindowAdapter(){//添加窗体关闭事件 ...
阅读全文
摘要:Server端实现代码: 1 import java.net.*; 2 import java.io.*; 3 public class TCPServer 4 { 5 public static void main(String[]args){ 6 try{ 7 ServerSocket ss=new ServerSocket(8888);//实例化一个ServerSocket对象,监听在8888端口上 8 System.out.println("Server start...."); 9 whi...
阅读全文
摘要:《java开发实战》里的代码单向链表最简单的实现: 1 class Node //定义节点类 2 { 3 private String data; 4 private Node next; 5 //构造方法 6 public Node(String data){ 7 this.data=data; 8 } 9 10 //设置下一节点11 public void setNext(Node next){12 this.next=next;13 }14 //获取下一节点15 public ...
阅读全文

浙公网安备 33010602011771号