/** @param args*/public static void copy(File a,File b){try {FileInputStream fis = new FileInputStream("a.mp3");FileOutputStream fos = new FileOutputS ...
分类:
其他好文 时间:
2016-05-08 14:56:43
阅读次数:
118
#include<iostream>#include<cstdio>using namespace std;struct data{ int l,r,sum; bool tag;}tr[8500001];int n,m;void build(int k,int s,int t){ tr[k].l=s ...
分类:
其他好文 时间:
2016-05-08 11:58:58
阅读次数:
182
import java.awt.;import java.util.;import javax.swing.;import java.awt.event.;public class GUI {JTextArea t = new JTextArea();public static void main( ...
分类:
其他好文 时间:
2016-05-08 11:37:18
阅读次数:
134
package com.hanqi; import java.util.Scanner; public class Lianxiti{ public static void main(String[] args) { // TODO 自动生成的方法存根 //题目一:打印出所有的 "水仙花数 ",所谓 ...
分类:
编程语言 时间:
2016-05-08 11:36:14
阅读次数:
310
#include<cstdio> #include<cstring> #include<iostream> using namespace std; #define M (250000) #define maxn (1000000+5) int N,n,m; int st[4*maxn]; void ...
分类:
其他好文 时间:
2016-05-08 10:18:27
阅读次数:
120
最近在看《How Tomcat Works》这本书,其中有这样一句代码:
public void parse() {
// Read a set of characters from the socket
StringBuffer request = new StringBuffer(2048);
int i;
byte[] buffer = new ...
分类:
其他好文 时间:
2016-05-08 06:52:12
阅读次数:
138
//NDK 使用技巧和多线程调用注意
//http://www.ibm.com/search/csass/search/?q=ndk&sn=dw&lang=zh&cc=CN&en=utf&hpp=20&dws=cndw&lo=zh
void demo(JNIEnv* env, jobject thiz) {
//这JNI接口指针可以存储,但只在当前线程仍然是有效的。
/*
A JNI en...
分类:
编程语言 时间:
2016-05-08 06:47:39
阅读次数:
433
#include
using namespace std;
/*对象链表(new/delete)*/
#define LEN sizeof(stu)
//定义单向链表结点的数据类型
class stu
{
public:
char name[20];
int age;
int sex;
stu * Next;
};
void CreateList(int, stu **);
void ...
分类:
编程语言 时间:
2016-05-08 06:45:53
阅读次数:
184
public static void main(String args[]){ for(int i=1;i<10;i++){ for(int j=i;j<10;j++){ System.out.print(i+"*"+j+"="+i*j +'\t'); }System.out.println(); ...
分类:
其他好文 时间:
2016-05-08 06:36:19
阅读次数:
109
一.线程安全前面提到过线程的同步与互斥,也就是当两个线程同时访问到同一个临界资源的时候,如果对临界资源的操作不是原子的就会产生冲突,使得结果并不如最终预期的那样,比如如下的程序:#include<stdio.h>
#include<pthread.h>
intg_val=0;
void*fun(void*ar..
分类:
编程语言 时间:
2016-05-08 01:25:42
阅读次数:
323