import java.util.Arrays;public class Merge_sort {public static void main(String[] args){ int[] nums={ 2, 7, 8, 3, 1, 6, 9, 0, 5, 4 }; sort(nums,0,nums...
分类:
编程语言 时间:
2015-03-27 22:07:29
阅读次数:
176
static void Main(string[] args) { while (true) { string a; int b; Console.Write("请输入您的姓名:"); a = Console.ReadLine(); Console.Write("请输入您的分数:"); b = C....
分类:
其他好文 时间:
2015-03-27 22:04:25
阅读次数:
131
using System;namespace Frank{ public class Sample { public static void Main(string[] args) { Console.WriteLine("第一个C#程序...
选择排序法: 1 class Sort{ 2 public static void main(String[] args) { 3 int[] array = {3, 9, 10, 5, 48, -23};//创建并初始化数组 4 selectSort(arr...
分类:
编程语言 时间:
2015-03-27 22:01:21
阅读次数:
157
{ static void Main(string[] args) { while (true) { int x, y; string a, b;//首先先随机生成三个数,然后将0,1,2变成剪刀石头布,利用switch case达到,在比较的时候注意当x为0,y为2的时候,出x的获胜。即先判断这....
分类:
其他好文 时间:
2015-03-27 22:00:06
阅读次数:
195
写一个翻转函数,使字符串倒叙 先把整个句子翻转 然后以空格为split,分割字符串 对单个字符再进行翻转,然后重新组合 package reverseSentence42; public class ReverseSentence42 { static String reverse(String s...
分类:
其他好文 时间:
2015-03-27 21:53:43
阅读次数:
194
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:
其他好文 时间:
2015-03-22 10:40:52
阅读次数:
321
什么是格式化字符串攻击?format string attackhttps://www.owasp.org/index.php/Format_string_attack首先攻击发生在 格式化字符串所涉及的函数(例如 printf), 其次用户输入字符串提交后作为格式化字符串参数执行。攻击者可以执行代...
分类:
其他好文 时间:
2015-03-22 10:31:58
阅读次数:
208
一:根据某种规则缩短字符串
/*
* 根据规则缩短字符串
*/
public class Dome07 {
public static void main(String[] args) {
String str = "C:\\Windows\\Resources\\Themes\\aero";
while (true) {
System.out.println(str);
...
分类:
编程语言 时间:
2015-03-22 09:17:57
阅读次数:
158
package cn.jdk.foreach;
import java.util.HashMap;
import java.util.Map;
public class ForEachTest {
public static void main(String[] args) {
int[] arr = {1,2,3};
for(int a:arr){
System.out.pr...
分类:
编程语言 时间:
2015-03-22 09:14:08
阅读次数:
254