import java.io.*;import java.util.*;public class ArraySort { public static void main(String[] args) { StringBuilder sb= new StringBuilder();...
分类:
编程语言 时间:
2015-05-13 14:30:57
阅读次数:
103
public static void testAppend() { StringBuffer sb = new StringBuffer("This is a StringBuffer!"); sb.append(1.23f); Syst...
分类:
移动开发 时间:
2015-05-13 11:56:15
阅读次数:
601
aspx:aspx.cs:protectedvoidPage_Load(objectsender,EventArgse) {StringBuildersb =newStringBuilder();//获取Repater控件的命名控件 sb.Append("Container:a"+ MyDataLi...
分类:
其他好文 时间:
2015-05-11 12:55:04
阅读次数:
129
正式是以补码表示的正数的补码是其本身:负数的补码:1.将该数的绝对值表示成二进制的形式2.按位取反(0变1变0)3.再加1正数类型int 4个字节short 2个字节long 8个字节最高位都表示符号位(0正数,1负数)uint 32位全部表示正数没有符号位(类似的还有ushort,ulong,sb...
//截取字符串长度(中文2个字节,半个中文显示一个) public String subTextString(String str,int len){ if(str.length()1?2:1; sb.append(ss[i]); if...
分类:
编程语言 时间:
2015-05-09 23:32:52
阅读次数:
210
public String readSIMCard() {
TelephonyManager tm = (TelephonyManager)this.getSystemService(TELEPHONY_SERVICE);//取得相关系统服务
StringBuffer sb = new StringBuffer();
switch(tm.getSimState()){ //getSimSta...
分类:
移动开发 时间:
2015-05-07 22:19:32
阅读次数:
192
在项目上点击右键->setting->C/C++->Preprocessor definitions
在里面加入自定义预编译头_SB2
测试代码:
include “stdafx.h”include include ifdef _SBprintf("调用了sb\n");
elif _SB2printf("调用了sb2\n");
elseprintf("Hello World!\n");
endifr...
分类:
其他好文 时间:
2015-05-05 12:35:56
阅读次数:
94
很多人看我推荐微软的东西,不屑一顾,这次推荐 VS Core,这是个跨平台、免费的代码编辑器,集成开发、调试、编译为一身。单成启动速度,资源占用,就已经赢了各大编辑器(什么 SB、N++之类)。以前觉得 VS 2015 是宇宙最强编辑器,可用来写前端真是高射炮打蚊子,这一次 Core 版,更像是精简...
分类:
其他好文 时间:
2015-04-30 15:56:01
阅读次数:
205
原题链接:http://www.tyvj.cn/p/1728这道题以前用c语言写的treap水过了,现在接触了c++用sbt重写一遍(速度比treap快一些)。。。sb树的一些基本操作都在里面了带垃圾回收,具体如下: 1 #include 2 #include 3 #include 4 #i...
分类:
其他好文 时间:
2015-04-24 18:24:57
阅读次数:
157
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=4417题意很简单,给定一个序列求一个区间[L, R,]中小于等于H的元素的个数。好像函数式线段树可解吧,可弱弱的沙茶一直没弄懂其精髓,只好用树套树暴力碾压了额树套树,线段树的每一个节点套一个sb树。当查询...
分类:
其他好文 时间:
2015-04-24 18:07:23
阅读次数:
127