2013年2月16日
摘要: Java代码 import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; /** * * 文件,byte[],HexString 之间的转换 * */ public class FileDataConve. 阅读全文
posted @ 2013-02-16 19:35 蜜雪薇琪 阅读(595) 评论(0) 推荐(0) 编辑
摘要: Java代码 #ifndef AESENCRYPT_H #define AESENCRYPT_H #include "device.h" #include <string.h> #include <cstdlib> #include <iostream> #include <string> #include <fstream> #include <CL/opencl.h> class AESEncrypt:public Device { public: //CL Objects and memory b 阅读全文
posted @ 2013-02-16 19:34 蜜雪薇琪 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Java代码 #include "device.h" #include <math.h> //Class Timer member function implementation int Timer::createTimer() { _start = 0; _clocks = 0; #ifdef _WIN32 QueryPerformanceFrequency((LARGE_INTEGER* )&_freq); #else _freq = (long long)1.0E3; #endif return SDK_SUCCESS; } //Start the 阅读全文
posted @ 2013-02-16 19:34 蜜雪薇琪 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Java代码 #ifndef DEVICE_H #define DEVICE_H #include <string.h> #include <cstdlib> #include <iostream> #include <string> #include <fstream> #include <time.h> #include <CL/opencl.h> #ifdef _WIN32 #include <windows.h> #else #include <sys/time.h> #incl 阅读全文
posted @ 2013-02-16 19:31 蜜雪薇琪 阅读(302) 评论(0) 推荐(0) 编辑
摘要: Java代码 DEPTH = ../../../../.. include $(DEPTH)/make/openclsdkdefs.mk #### # # Targets # #### OPENCL = 1 SAMPLE_EXE = 1 EXE_TARGET = Advanced-Multi-GPU EXE_TARGET_INSTALL = Advanced-Multi-GPU #### # # C/CPP files # #### FILES = device\ AESEncrypt CLFILES = Advanced-Multi-GPU_Kernels.cl include $(DEP. 阅读全文
posted @ 2013-02-16 19:31 蜜雪薇琪 阅读(101) 评论(0) 推荐(0) 编辑
摘要: WebWork的EL-对象图导航语言(Object Graph Navigation Language, 缩写为OGNL)是作为Web页面脚本的最佳选择。一. 基本特性1. 访问bean属性根据JavaBean的规范,bean属性使用诸如getXxx(), setXxx(), isXxx()或者hasXxx()这样标准形式的getter方法或setter方法。其中, isXxx()和hasXxx()形式用于boolean属性。在WebWork中,访问这些属性(不管是获取数据还是设置数据)都使用形式为xxx的属性引用。示例:a. actionpackage ch8;import ch4.User 阅读全文
posted @ 2013-02-16 19:31 蜜雪薇琪 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 需求: 在JS中向后台传递数组参数 分析: JS中的数组是弱类型的可以放任何类型(对象、基本类型),但是如果数组中放的是对象类型,传递到后台是显示的只能是对象字符串--[object Object],原因如下:在后台接收的时候,只能用request来接收,request.getParameterValues()方法返回的是一个String[],所以,应该是在前台传输的时候调用了对象的toString()方法,那么如果依然想传递对象怎么办?凉拌!但是可以使用JSON字符串来实现,在后台把JSON字符串解析成JAVA对象。 也许,你要说如果是复合对象怎么办,比如如下: Java代码 public. 阅读全文
posted @ 2013-02-16 19:30 蜜雪薇琪 阅读(498) 评论(0) 推荐(0) 编辑
摘要: Java代码 import java.io.File; import com.drew.imaging.ImageMetadataReader; import com.drew.metadata.Directory; import com.drew.metadata.Metadata; import com.drew.metadata.exif.ExifIFD0Directory;import com.drew.metadata.exif.ExifSubIFDDirectory;public class TestExif {/** * @param args * @throws Except. 阅读全文
posted @ 2013-02-16 19:30 蜜雪薇琪 阅读(799) 评论(0) 推荐(0) 编辑
摘要: Java中的Preferences的基本使用方法:Java代码 import java.util.prefs.Preferences; public class PreferencesDemo {public static void main(String[] args) throws Exception { Preferences prefs = Preferences.userNodeForPackage(PreferencesDemo.class);prefs.put("Location", "Oz");prefs.put("Footwe 阅读全文
posted @ 2013-02-16 19:30 蜜雪薇琪 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 最近项目用到oracle_ADF 从SAP/BO 上调用 水晶报表,资料比较少,我做一个简单的分享,给和我一样的新手 提供更多的便利。首先,我是尝试用JAVA JSP 去访问的。官方API:http://devlibrary.businessobjects.com/BusinessObjectsxi/en/en/BOE_SDK/boesdk_java_api_doc/doc/boesdk_java_apiRef/index.html文档:http://scn.sap.com/docs/DOC-27465官方例子:http://wiki.sdn.sap.com/wiki/display/BOBJ 阅读全文
posted @ 2013-02-16 19:29 蜜雪薇琪 阅读(247) 评论(0) 推荐(0) 编辑