摘要:
ylbtech_javareplace(oldStr,newStr) //把oldStr替换成newStr 阅读全文
posted @ 2014-07-06 23:50
ylbtech
阅读(185)
评论(0)
推荐(0)
摘要:
ylbtech_javajava是在1995年正式发布,前身Oak语言。 java是一种面向对象的网络编程语言。 java的特点:面向对象,与平台无关。java开发环境JDK1.6 jdk的主要组成 java虚拟机 java编译器 java的类库5 输入语句 i... 阅读全文
posted @ 2014-07-06 23:48
ylbtech
阅读(406)
评论(0)
推荐(0)
摘要:
ylbtech_javapackage dos;public class MyDemo{ public static void main(String args[]) { try { Runtime r = Runtime.getRunt... 阅读全文
posted @ 2014-07-06 23:44
ylbtech
阅读(122)
评论(0)
推荐(0)
摘要:
? 构造方法 Vector():构造一个空向量。 Vector(int initialCapacity):用指定的初始化容量构造一个空向量。 Vector(int initialCapacity, int capacityIncrement):用指定的初始化容量和容量增量构造一个空向量。 ? 常用的... 阅读全文
posted @ 2014-07-06 23:43
ylbtech
阅读(255)
评论(0)
推荐(0)
摘要:
ylbtech_javaJProgressBar pb = new JProgressBar();//进度条 //JProgressBarFile f1 = new File(txt1.getText()); File f2 = new File(txt2.get... 阅读全文
posted @ 2014-07-06 23:42
ylbtech
阅读(127)
评论(0)
推荐(0)
摘要:
list.setSelectedValue(bg,true);//默认选中的值 阅读全文
posted @ 2014-07-06 23:42
ylbtech
阅读(144)
评论(0)
推荐(0)
摘要:
ylbtech_javatry { //url网络资源地址 URL url = new URL("http://localhost/appserv/flag-english.png"); //打开url连接 ... 阅读全文
posted @ 2014-07-06 23:41
ylbtech
阅读(287)
评论(0)
推荐(0)
摘要:
1 数据库管理 create database 数据库名 drop database 数据库名 create database 数据库名 on ( name='文件名', filename='路径\文件名.mdf' ) log on ( name='文件名', ... 阅读全文
posted @ 2014-07-06 23:40
ylbtech
阅读(142)
评论(0)
推荐(0)
摘要:
int getClickCount():得到鼠标点击的次数:鼠标单击,返回整数值1;鼠标双击,返回整数值2。 阅读全文
posted @ 2014-07-06 23:39
ylbtech
阅读(129)
评论(0)
推荐(0)
摘要:
ylbtech_sqlserver--1、定义三个变量分别保存你的姓名,年龄和身高,然后赋值并且输出--DECLARE @name varchar(10) , @age int , @height floatDECLARE @name varchar(10)DECLARE @age intDECL... 阅读全文
posted @ 2014-07-06 23:34
ylbtech
阅读(365)
评论(0)
推荐(0)
摘要:
ylbtech_sqlservercreate database bankgouse bankgocreate table users( uid int primary key identity(1,1), uname varchar(10) not null, balance f... 阅读全文
posted @ 2014-07-06 23:11
ylbtech
阅读(277)
评论(0)
推荐(0)
摘要:
Date d = new Date();SimpleDateFormat adf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");String s = adf.format(d);txt.insert(s,txt.getSelectionStart());... 阅读全文
posted @ 2014-07-06 23:00
ylbtech
阅读(112)
评论(0)
推荐(0)
摘要:
? 数字变为字符串用如下方法转换相应类型的数字:Double.toString(double);Float.toString(float);Long.toString(float);Integer.toString(float);Short.toString(float);Byte.toString... 阅读全文
posted @ 2014-07-06 22:59
ylbtech
阅读(206)
评论(0)
推荐(0)
摘要:
package aaa;import java.awt.*;import java.awt.event.*;import javax.swing.*;public class PolyLine extends FreeShape{ public PolyLine(Color c,Stroke ... 阅读全文
posted @ 2014-07-06 22:58
ylbtech
阅读(223)
评论(0)
推荐(0)
摘要:
mu1.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,InputEvent.CTRL_DOWN_MASK));(KeyStroke.getKeyStroke(KeyEvent.VK_F5,InputEvent.BUTTON1_MASK)); 阅读全文
posted @ 2014-07-06 22:57
ylbtech
阅读(211)
评论(0)
推荐(0)
摘要:
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); String[] strName = env.getAvailableFontFamilyNames(); 阅读全文
posted @ 2014-07-06 22:56
ylbtech
阅读(140)
评论(0)
推荐(0)
摘要:
? 构造方法Hashtable():用默认的容量和加载因数构造一个新的空散列表。 Hashtable(int itialCapacity):用指定的初始的容量和默认的加载因数构造一个新的空散列表。 Hashtable(int itialCapacity, float loadFactory):用指定... 阅读全文
posted @ 2014-07-06 22:55
ylbtech
阅读(208)
评论(0)
推荐(0)
摘要:
package sam;import java.awt.*;import javax.swing.*;import java.awt.event.*;import java.beans.PropertyChangeListener;class MyFrame extends JFrame{ i... 阅读全文
posted @ 2014-07-06 22:54
ylbtech
阅读(183)
评论(0)
推荐(0)
摘要:
RuntimeException java.lang包中多数异常的基类 ArithmeticException 算术错误,如除以 0 IllegalArgumentException 方法收到非法参数 ArrayIndexOutOfBoundsException 数组下标出界 NullPoin... 阅读全文
posted @ 2014-07-06 22:53
ylbtech
阅读(174)
评论(0)
推荐(0)
摘要:
public Image ImageChangeSize(String imageName,int width,int height) { Image img = null; try { File f = new File("sr... 阅读全文
posted @ 2014-07-06 22:52
ylbtech
阅读(148)
评论(0)
推荐(0)
摘要:
package CSqlServer;import java.sql.*;//连接数据库封装类public class ASql{ private Connection conn = null; private Statement st = null; private Result... 阅读全文
posted @ 2014-07-06 22:51
ylbtech
阅读(39)
评论(0)
推荐(0)
摘要:
String sql = "select top 1 * from jobs" + " where job_id not in (select " + "top "+(index-1)+" job_id from jobs)";1,J#-分页.sqluse pubsgoselect * from a... 阅读全文
posted @ 2014-07-06 22:50
ylbtech
阅读(30)
评论(0)
推荐(0)
摘要:
rs.last();//将游标移动到最后一条记录 totalRow = rs.getRow();//当前行号(总记录数) rs.absolute(index);//定位游标 阅读全文
posted @ 2014-07-06 22:47
ylbtech
阅读(113)
评论(0)
推荐(0)
摘要:
JFileChooser fc = new JFileChooser("F:");int resultOpen = fc.showOpenDialog(this);if(resultOpen == 0){ try { File f = fc.getSelectedFile(... 阅读全文
posted @ 2014-07-06 22:42
ylbtech
阅读(26)
评论(0)
推荐(0)
摘要:
//利用存储器来调用create proc insert_news( @title varchar(20), @content varchar(200), @uname varchar(10))as insert into news values(@title, @content,default,@... 阅读全文
posted @ 2014-07-06 22:41
ylbtech
阅读(139)
评论(0)
推荐(0)
摘要:
/** * alter procedure myproc @bookId intasdelete from books where book_id=@bookIdgo */ CallableStatement cs = conn.prepareCall("exec myproc 9") ;int... 阅读全文
posted @ 2014-07-06 22:40
ylbtech
阅读(144)
评论(0)
推荐(0)
摘要:
try { /* InputStream is = System.in;//控制台输入字节流 InputStreamReader isr = new InputStreamReader(is);//将字节流,转换为字符流 BufferedReader br = new Buffer... 阅读全文
posted @ 2014-07-06 22:39
ylbtech
阅读(150)
评论(0)
推荐(0)
摘要:
package titleicon;import java.awt.*;import javax.swing.*;class MyFrame extends JFrame{ public MyFrame() { setTitle("窗口图标"); setSize(400,300); setLo... 阅读全文
posted @ 2014-07-06 22:38
ylbtech
阅读(17)
评论(0)
推荐(0)
摘要:
JFileChooser fc = new JFileChooser("F:");int resultSave = fc.showSaveDialog(this);if(resultSave == 0){ try { File f = fc.getSelectedFile(); Fi... 阅读全文
posted @ 2014-07-06 22:36
ylbtech
阅读(97)
评论(0)
推荐(0)
摘要:
sun公司美国SUN(Stanford University Network)公司,在中国大陆的正式中文名为“太阳计算机系统(中国)有限公司”,在台湾的正式中文名为“升阳电脑公司”。1982年,Sun Microsystems公司诞生于美国斯坦福大学校园。Sun公司1986年上市,在NASDAQ的标... 阅读全文
posted @ 2014-07-06 22:31
ylbtech
阅读(511)
评论(0)
推荐(0)
摘要:
2.访问字符串 int length():返回字符串的字符个数。 char charAt(int index):返回字符串中index位置上的字符,其中index 值的范围是0~length-1。 int indexOf(int ch):返回字符ch在字符串中出现的第一个位置。 int l... 阅读全文
posted @ 2014-07-06 22:28
ylbtech
阅读(51)
评论(0)
推荐(0)
摘要:
sql函数 1)数学函数 sqrt() //平方根 floor() //向下取整 ceiling() //向上取整 rand() //随机一个0--1之间的数 2)时间函数 getdate() //获取当前时间 year(date) //取date日期... 阅读全文
posted @ 2014-07-06 22:27
ylbtech
阅读(111)
评论(0)
推荐(0)
摘要:
//PreparedStatement ps = conn.prepareStatement("select * from books where book_id > ?");//操作类 //ps.setInt(1,bookId);//给问号赋值Class.forName("con.micros... 阅读全文
posted @ 2014-07-06 22:25
ylbtech
阅读(109)
评论(0)
推荐(0)
摘要:
Point point = lblBack.getLocation();//背景的位置 int x = point.x; int y = point.y; if(e.getKeyCode() == KeyEvent.VK_UP) { y+=5; }JLabel lblBack = ne... 阅读全文
posted @ 2014-07-06 22:24
ylbtech
阅读(95)
评论(0)
推荐(0)
摘要:
5.Math类Math类是一个最终类,它包含了常用的科学计算方法,如开方、指数运算、对数、三角函数等。这些方法都是静态方法,可以通过类名直接调用。public static final double E:自然数e。public static final double PI:π。public stat... 阅读全文
posted @ 2014-07-06 22:23
ylbtech
阅读(164)
评论(0)
推荐(0)
摘要:
C#和Java的不同1、导包import java.lang.*---->using System2、主函数main------>Main3、输入和输出System.out.println--->Console.WriteLineSystem.out.print---->Console.Write(... 阅读全文
posted @ 2014-07-06 22:22
ylbtech
阅读(294)
评论(0)
推荐(0)
摘要:
动态数组1 导入包:import java.util.*;2 定义动态数组对象ArrayList 数组名=new ArrayList();ArrayList 数组名=new ArrayList();3 动态数组对象常用方法size() //返回数组长度add(object o) ... 阅读全文
posted @ 2014-07-06 22:20
ylbtech
阅读(112)
评论(0)
推荐(0)
摘要:
ylbtech_silverlight一、DebugSilverlight应用程序的方法:第一种:1.Silverlight引用命名空间:System.Diagnostics;2.在程序必要的地方写:Debug.WriteLine("想要输出的内容");3.Debug的时候,在输出窗口就可以输出“想... 阅读全文
posted @ 2014-07-06 22:15
ylbtech
阅读(229)
评论(0)
推荐(0)
浙公网安备 33010602011771号