• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
在北京的四川小伙
一切不以结婚为目的的恋爱,都是耍流氓 -----爱因斯坦●涛
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 2 3 4 下一页
2015年6月16日
log4j.properties配置文件示例+注释说明
摘要: 1 # An example log4j configuration file that outputs to System.out. The output information consists of relative time, 2 # log level, thread name, log... 阅读全文
posted @ 2015-06-16 14:40 在北京的四川小伙 阅读(508) 评论(0) 推荐(0)
java获得真实IP代码
摘要: 在有代理服务器的情况下,需要通过X-FORWARDED-FOR http头来获得真实的用户ip: 1 public final class HTTPUtils { 2 3 private static final String HEADER_X_FORWARDED_FOR = 4 ... 阅读全文
posted @ 2015-06-16 14:38 在北京的四川小伙 阅读(133) 评论(0) 推荐(0)
java 实现快速排序
摘要: 1 public static int partition(int[] a, int f, int b) { 2 int pivot = a[f]; 3 while (f = pivot) { 5 b--; 6 ... 阅读全文
posted @ 2015-06-16 14:37 在北京的四川小伙 阅读(69) 评论(0) 推荐(0)
插入排序
摘要: 1 void insertionSort(int[] arr) { 2 int i, j, newValue; 3 for (i = 1; i 0 && arr[j - 1] > newValue) { 7 arr[j] = arr[j - 1]; 8 ... 阅读全文
posted @ 2015-06-16 14:36 在北京的四川小伙 阅读(72) 评论(0) 推荐(0)
java检测端口是否被占用
摘要: 1 import java.net.*; 2 import java.io.*; 3 4 public class Main { 5 public static void main(String[] args) { 6 Socket Skt; 7 String ho... 阅读全文
posted @ 2015-06-16 14:35 在北京的四川小伙 阅读(536) 评论(0) 推荐(0)
合并排序
摘要: 1 public static void main(String a[]){ 2 int i; 3 int array[] = {12,9,4,99,120,1,3,10}; 4 System.out.println("\n\n RoseIndia\n\n"); 5 Sys... 阅读全文
posted @ 2015-06-16 14:34 在北京的四川小伙 阅读(77) 评论(0) 推荐(0)
读取bmp图片数据
摘要: 1 public void getBMPImage(String source) throws Exception { 2 3 clearNData(); //清除数据保存区 4 FileInputStream ... 阅读全文
posted @ 2015-06-16 14:32 在北京的四川小伙 阅读(794) 评论(0) 推荐(0)
java 实现冒泡排序
摘要: public void bubbleSort(int[] arr) { boolean swapped = true; int j = 0; int tmp; while (swapped) { swapped = false; j++; for (in... 阅读全文
posted @ 2015-06-16 14:25 在北京的四川小伙 阅读(158) 评论(0) 推荐(0)
Java图片转换为base64格式
摘要: /** * @Descriptionmap 将图片文件转化为字节数组字符串,并对其进行Base64编码处理 * @author temdy * @Date 2015-01-26 * @param path 图片路径 * @return */public static String imageToBa... 阅读全文
posted @ 2015-06-16 14:23 在北京的四川小伙 阅读(579) 评论(0) 推荐(0)
2015年4月13日
android 上拉加载数据下拉更新数据操作
摘要: android 上拉加载数据下拉更新数据操作先上图:主要代码MainActivity package com.listviewaddheader.ui;import java.util.ArrayList;import java.util.List;import android.app.Activi... 阅读全文
posted @ 2015-04-13 16:32 在北京的四川小伙 阅读(386) 评论(0) 推荐(0)
上一页 1 2 3 4 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3