`
shenjichao2009
  • 浏览: 94612 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
// WriteFile.cpp : 定义控制台应用程序的入口点。// #include "stdafx.h"#include <iostream>#include <fstream>using namespace std; /** *功能:将26个数字和字母读取,该方法为将文件每行内容存储到字符串中,再输出字符串*@author 超仔 **/ void main(){ char buffer[256]; fstream out;//主要用来写文件 out.open("D:\\disk\\file.txt",ios::in); ...
// File.cpp : 定义控制台应用程序的入口点。// #include "stdafx.h"#include <iostream>#include <fstream>using namespace std; /** *功能:将26个数字和字母写入到磁盘文件中*@author 超仔 **/ void main(){ ofstream in;//主要用来写文件 in.open("D:\\disk\\file.txt",ios::trunc);//ios::trunc表示在打开文件前将文件清空,当文件不存在时则创建 in ...
甭闲长。看完你肯定想看第二遍。         (个人认为:女人看了是自省,男人看了是激励!) 我认为最经典的话: 要是我的男人真的就没那本事,我就忍了,弄不好他有了本事,我就没了他呢。他没逼我长成曼玉嘉 ...
extern "C" _declspec(dllexport)int getLogicDiskInfo(){ int DType; int si = 0; BOOL result; unsigned _int64 i64FreeBytesToCaller; unsigned _int64 i64TotalBytes; unsigned _int64 i64FreeBytes; float totalSize;//总空间 float usableSize;//可用空间 int DSLength = GetLogicalDriveStrings(0,NULL);//通 ...
  /** * 将控制台的信息写入到文件中 */ public static void writeDiskInfo() { String dirName = "D:\\disk\\"; String fileName = "磁盘信息.txt"; File file = new File(dirName + fileName); // 当文件目录不存在时 if (!file.getParentFile().exists()) { file.getParentFile().mkdirs();// 创建文件目录 } try ...
package com.duoguo.android; import android.app.Activity;import android.os.Bundle;import android.widget.CheckBox;import android.widget.CompoundButton;import android.widget.RadioButton;import android.widget.RadioGroup;import android.widget.Toast; /** * 1、CheckBox的使用; 2、RadioButton的使用; 3、Toast的使用。 *   ...
/** * */package com.duoguo.usb; import java.io.File;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map; import javax.swing.filechooser.FileSystemView; import org.apache.log4j.Logger; import com.duoguo.Service.SocketServer;import com.duoguo.Service.po.R ...
package com.duoguo.android; import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.view.View.OnClickListener;import android.widget.Button;import android.widget.TextView; /** * @author Administrator *  */public class FirstActivity e ...

JNI学习入门指南

    博客分类:
  • JNI
<1>建立一个Java Project项目工程,编写相应的代码如下: /** *  */package com.duoguo.jni; /** * @author shyboy(897948924@qq.com) *  */public class TestNative {  private native void hello();  static {  System.loadLibrary("NativeCode"); }  /**  * @param args  */ public static void main(String[] args) { ...
/** * */package com.duoguo.button; import java.awt.BorderLayout;import java.awt.FlowLayout;import java.awt.GridLayout;import java.awt.event.ItemEvent;import java.awt.event.ItemListener;import java.awt.event.KeyEvent;import java.net.URL; import javax.swing.ImageIcon;import javax.swing.JCheckBox;imp ...
/** * */package com.duoguo.button; import java.awt.BorderLayout;import java.awt.FlowLayout;import java.awt.GridLayout;import java.awt.event.ItemEvent;import java.awt.event.ItemListener;import java.awt.event.KeyEvent;import java.net.URL; import javax.swing.ImageIcon;import javax.swing.JCheckBox;imp ...
/** * */package com.duoguo.util; import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.PrintWriter;import java.net.Socket;import java.util.LinkedList;import java.util.List; /** * @author shyboy(chao.shen@duoguo.cn) * */p ...

Java中多线程服务

    博客分类:
  • Java
/** * */package com.duoguo.socket; import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.PrintWriter;import java.net.Socket;import java.net.UnknownHostException; /** * @author shyboy(chao.shen@duoguo.cn) * */public class Client { private String ...

Java中URL的使用

    博客分类:
  • Java
/** * */package com.duoguo.url; import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.net.MalformedURLException;import java.net.URL;import java.net.URLConnection; /** * @author shyboy(chao.shen@duoguo.cn) * */public class URLClient { StringBuilder ...
package com.baosight.menu;   import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.view.ContextMenu; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ContextMenu.ContextMenuInfo; import an ...
Global site tag (gtag.js) - Google Analytics