`
codespace
  • 浏览: 26643 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
<script type="text/javascript"> var newObject=new Array("red","green","blue"); document.write(newObject); //output red,green,blue //Array拥有栈结构的特征 newObject.pop(); document.write("<br>"+newObject); //output red,green newObject.push ...
<script language="javascript"> var message="标题栏打字效果" var message=message+"" i="0" var temp="" var speed="150" function titler(){ if(!document.all && !document.getElementById) return document.title=temp+message.charAt(i) temptit ...
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; public class ReadUrlToTxt { private URL url = null; public R ...
由一个Imge转化成BufferedImage,源码如下: //covert Image object to BufferedImage object //pic (Image type) private BufferedImage convertImageToBuffer(){ BufferedImage bufferedImage = new BufferedImage(pic .getWidth(null), pic.getHeight(null), BufferedImage.TYPE_INT_RGB); Graphics g = buffered ...
public class ShowImage extends JPanel implements ActionListener { private JButton open ; private String filePath; private BufferedImage image; private static ShowImage show; public static ShowImage singleton(){ if(show==null) show=new ShowImage(); return show; } privat ...
Filter滤镜 参数: Alpha(Opacity-? ,FinishOpacity=? ,Style=?,StartX=?,StartY=?(渐变透明效果的开始坐 标),FinishX,FinishY) BlendTrans(Duration=?) Blur(Add=?,Direction(值45的整数倍,0表示垂直向上),Strength) Chroma(Color=(要过滤掉的某种颜色) DropShadow(Color,Offx,OffY,Positive,) FilpH FlipV Gray Invert Light(光源在物体上的投影效果) Xray Glow(Color Str ...
设置css的几种方式 1.内联样式表(INLINE STYLES) <meta http-equiv="Content-Style-Type" content="text/css"> 2.嵌入样式表(Embeded style sheets) <head> <style type="text/css" media="screen,projection"> <!--(注释标签,支持style标签的浏览器会自动忽略,否则相反) P{FONT-SIZE:20pt;COLOR:bl ...
import java.awt.*; import java.util.*; import javax.swing.*; public class GenerateBmp extends JFrame { public GenerateBmp(){ init(); } private void init(){ JPanel panel=new JPanel(); setContentPane(panel); panel.setLayout(new GridLayout(2,1)); // ImageIcon icon= ...
html全局架构标签: <html> <head> <title>….</title> </head> <body> …….. </body> <html> 注释:<!- -       - -> 格式标签: 段落:<p> </p> 换行:<br> 空格:&nbsp; 无序列表:<ul          <li>  </li>          </ul> 有序列表:<ol          & ...
public class Node { int id; // 索引值 int data; Node leftNode; Node rightNode; Node(){ } } package tree; public class BiTree { private static Node root; public BiTree(){ root=null; } public Node insertNode(int index,int val){ Node newNode=new Nod ...
package sort; public class MergeSortDemo { private int[] arr1={1,2,3,4}; private int[] arr2={0,6,7,8}; private int[] arr3=new int[8]; public MergeSortDemo(){ } public void mergeSort(){ int a1=0; int a2=0; int a3=0; while(a1<4&&a2<4){ if(arr1[ ...
public class NodeDemo { int data; public NodeDemo next; NodeDemo(){ } public NodeDemo(int data){ this.data=data; next=null; } } public class LinkListDemo { private NodeDemo p; LinkListDemo(){ p=null; } public void showList(){ NodeDemo p ...
public class SortDemo{ private int[] sortArray; public SortDemo(){ sortArray=new int[8]; } public void swap(int i,int j){ int t=sortArray[i]; sortArray[i]=sortArray[j]; sortArray[j]=t; } public void insertArray(int pos,int val){ sortArray[pos]=val; ...
读取和在JTextArea显示文件: // read file public File readFileTxt(){ String str=String.valueOf(DevideText.singleObject().text.getText()); try{ if(str==null) throw new Exception(); file=new File(str); } catch (Exception e){ e.printStackTrace(); } return file; } //show the f ...
Global site tag (gtag.js) - Google Analytics