package test3; public class Sort{ /** * 冒泡排序 * @param array */ public void bubbleSort(int[] array) { for (int i = 1; i array[j + 1]) //判断相邻两个元素的大小 { i... ...
分类:
编程语言 时间:
2017-10-14 17:02:56
阅读次数:
188
1、编写一个方法,使用算法生成指定数目(比如1000个)的随机整数 import java.util.Scanner; import java.util.Random; public class RandomInt { /** * @param args */ public static void ...
分类:
其他好文 时间:
2017-10-14 01:23:23
阅读次数:
136
对应struts1,需要两个配置文件,即web.xml,struts-config.xmlweb.xml:对应一个应用,注意配置项如下:context-param,设置servlet的上下文参数,可被listener或者servlet使用,使用方法是ServletContext.getInitParameter获取context-param中定义的参数listener,监听器,系..
分类:
其他好文 时间:
2017-10-13 22:37:50
阅读次数:
130
1.阶乘 import java.math.BigInteger;import java.util.Scanner; public class CalculateN { /** * @param args */ public static void main(String[] args) { Sys ...
分类:
编程语言 时间:
2017-10-13 21:27:13
阅读次数:
284
Sort a linked list using insertion sort. Sort a linked list using insertion sort. Sort a linked list using insertion sort. Example Given 1->3->2->0->n ...
分类:
其他好文 时间:
2017-10-13 14:06:23
阅读次数:
154
$.ajax({ type: "post", dataType:"text", url: "sugController_toAjax", contentType: "application/x-www-form-urlencoded; charset=utf-8", data: "index="+i ...
分类:
Web程序 时间:
2017-10-13 14:03:27
阅读次数:
121
最近在学习处理自然语言处理,就发现LTP的(哈工大语言云),这个比我最先使用的jieba分词更好,词库更大,功能也更强大。 这里介绍两种方法:1、调用LTP的API,2、使用pyltp,这里的方法基于python,对于其它语言的使用的请大家了解这里:LTP 3.3文档 1、调用LTP的API ①进入 ...
分类:
编程语言 时间:
2017-10-13 13:55:33
阅读次数:
359
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any ...
分类:
其他好文 时间:
2017-10-13 10:11:47
阅读次数:
121
1.随机数函数 函数源代码 public class RandomTest { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub java.util.Ran ...
分类:
其他好文 时间:
2017-10-13 10:06:23
阅读次数:
135
索引操作 索引在客户端非常容易。因为关联数组很容易转换为JSON文档,索引文档只是提供正确和结构性的关联数组和调用方法。 单文档索引 当你索引你个文档时,可以自己提供一个ID,也可以让elasticsearch 为你生成一个ID。 提供一个ID值 $params = array(); $params ...
分类:
Web程序 时间:
2017-10-12 19:24:21
阅读次数:
251