Javaѧϰ±Ê¼Ç£¨2£©ÌåÑéÔƼÆËã
ÏÖÔÚ£¬Ì¸ÔƼÆËãµÄ¿É¶àÁË£¬²»¹ý£¬Ò»°ã±È½Ï¹Ø×¢µÄÊÇGoogleºÍAmazonµÄÔÆ·þÎñ¡£´Ó´ó·¶Î§À´¿´£¬Ò²Ö»ÓÐÕâÁ½¼Ò»ñµÃÁ˹«Öڵĸü¶à¹Ø×¢¡£±ÈÈ磬ÎÒ¸öÈ˺ܸÐÐËȤµÄ£¬¾ÍÊÇGoogleµÄApp EngineʹÓû§Äܹ»ÔÚGoogle»ù´¡ÉèÊ©ÉϹ¹½¨ºÍÍÐ¹Ü Web Ó¦ÓóÌÐò¡£ÖÁÓÚAmazon£¬ËüµÄAmazonWeb Services»¹°üÀ¨Elastic Cloud Compute (EC2)¼ÆËãWeb·þÎñ£¬¸Ã·þÎñ¿ÉÒÔÔÚAmazonµÄ»ù´¡ÉèÊ©ÉÏÍйÜÓ¦ÓóÌÐò¡£ÖÁÓÚMicrosoft®µÄ Azure£¬Sun Microsystems£¬ÎÒÃÇ´ó¼ÒµÈ×Å¿´ÈÈÄÖ°É¡£ÒÔAmazonµÄS3²úƷΪÀý¡£AmazonSimple Storage Service (S3)ÊÇÒ»¸ö¹«¿ªµÄ·þÎñ£¬WebÓ¦ÓóÌÐò¿ª·¢ÈËÔ±¿ÉÒÔʹÓÃËü´æ´¢Êý×Ö×ʲú£¬°üÀ¨Í¼Æ¬¡¢ÊÓƵ¡¢ÒôÀÖºÍÎĵµ¡£S3Ìṩһ¸ö RESTful APIÒÔ±à³Ì·½Ê½ÊµÏÖÓë¸Ã·þÎñµÄ½»»¥¡£¹ËÃû˼Ò壬ÕâÊÇÒ»¸ö¹«¿ªµÄ·þÎñ£¬Ê¹ Web ¿ª·¢ÈËÔ±Äܹ»´æ´¢Êý×Ö×ʲú(ÈçͼƬ¡¢ÊÓƵ¡¢ÒôÀÖºÍÎĵµµÈ)£¬ÒÔ±ãÔÚÓ¦ÓóÌÐòÖÐʹÓá£Ê¹ÓÃS3ʱ£¬Ëü¾ÍÏñÒ»¸öλÓÚ Internet µÄ»úÆ÷£¬ÓÐÒ»¸ö°üº¬Êý×Ö×ʲúµÄÓ²ÅÌÇý¶¯¡£
1.Ò»¸öJavaµÄÑÝʾÀý×Ó
ÏÂÃ棬×öÒ»¸ö²âÊÔµÄÀý×Ó£¬ÌåÑéһϓÔÆ”µÄ¸Ð¾õ£¬¿´µ½µ×»á²»»á·¢ÔΣ¡
ÀíÂÛÉÏ£¬S3ÊÇÒ»¸öÈ«Çò´æ´¢ÇøÓòÍøÂç(SAN)£¬Ëü¿´ÉÏÈ¥ÏñÒ»¸ö³¬´óµÄÓ²ÅÌ¡£´æ´¢¶ÎÔÚS3ÖÐÊÇURIµÄ¸ù¡£Ò²¾ÍÊÇ˵£¬´æ´¢¶ÎµÄÃû³Æ½«ÊÇÖ¸ÏòS3ÖÐij¸ö¶ÔÏóµÄURIµÄÒ»²¿·Ö¡£ÀýÈ磬Èç¹ûÎÒÓÐÒ»¸öÃûΪ agdocs µÄ´æ´¢¶ÎÒÔ¼°Ò»¸öÃûΪ whitepaper.pdf µÄ¶ÔÏó£¬URI½«ÊÇ£ºhttp://agdocs.s3.amazonaws.com/whitepaper.pdf ¡£Ê¹Óñà³ÌÊÖ¶Îͨ¹ý JetS3t µÇ¼S3¿ÉÒÔ·ÖΪÁ½²½¡£Ê×ÏÈ£¬±ØÐë´´½¨Ò»¸ö AWSCredentials ¶ÔÏó£¬È»ºó½«Ëü´«µÝµ½ S3Service ¶ÔÏó¡£AWSCredentials ¶ÔÏó·Ç³£¼òµ¥¡£Ëü½«·ÃÎÊÃÜÔ¿ºÍÃØÃÜÃÜÔ¿ÊÓΪ String¡£S3Service ¶ÔÏóʵ¼ÊÉÏÊÇÒ»¸ö½Ó¿ÚÀàÐÍ¡£ÒòΪS3ͬʱÌṩRESTful APIºÍÒ»¸ö SOAP API£¬JetS3t ¿â¿ÉÒÔÌṩÁ½ÖÖʵÏÖÀàÐÍ£ºRestS3Service ºÍ SoapS3Service¡£¾Í±¾ÎĶøÑÔ(°üÀ¨´ó²¿·ÖS3ÊÂÎñ)£¬RESTful APIµÄ¼ò½àÐÔÈÃËü³ÉΪһ¸öºÜºÃµÄÑ¡Ôñ¡£
´´½¨Ò»¸öÁ¬½ÓµÄ RestS3Service ʵÀýºÜ¼òµ¥£¬ÈçÇåµ¥ 1 Ëùʾ£º
²½Öè 1. ´´½¨Ò»¸ö JetS3t µÄ RestS3Service ʵÀý
def awsAccessKey = "blahblah"
def awsSecretKey = "blah-blah"
def awsCredentials = new AWSCredentials(awsAccessKey, awsSecretKey)
def s3Service = new RestS3Service(awsCredentials)
ÏÖÔÚ¿ÉÒÔÖ´ÐÐһЩÓÐȤµÄ²Ù×÷ÁË£ºÀýÈ磬´´½¨´æ´¢¶Î¡¢Ìí¼ÓÒ»¸öӰƬ£¬È»ºó»ñÈ¡Ò»¸öÓÐʱ¼äÏÞÖƵÄURL ¡£Êµ¼ÊÉÏ£¬
Ïà¹ØÎĵµ£º
Ò»¡¢
ÏÈ¿´Ò»¸ö³ÌÐò
#include <stdio.h>
int main()
{
const int a = 5;
int b[a];
return 0;
}
ÔÚvc6.0ÖÐÃüÃûΪ.cÎļþ£¬±àÒë»á³ö´í£¬ÊÇint b[a]ÕâÒ»ÐУºexpected constant expression
ÃüÃûΪ.cppÎļþ£¬Ã»ÎÊÌâ¡£
ÔÚcodeblocks(Ò»¸öÃâ·Ñ¿ªÔ´µÄ±àÒëÆ÷)ÖбàÒ붼à ......
public class FindPrime {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int num = 100;
String s = "100ÒÔÄÚµÄËØÊý£º";
for (int i = 1; i <= num; i++) {
int count = 0;
for (int j = 1; j <= (int) Math.s ......
public class Fibonacci {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
NumOfFibonacci(9);
}
public static int MyFibonacci(int i){
if(i>0) {
if(i == 1)return 1;
if(i == 2)return 1;
else return MyFibonacc ......
/**
* this¹Ø¼ü×ÖÓ÷¨
*/
public class Flower {
int petalCount = 0;
String s = "initial value";
Flower(int petals){
petalCount = petals;
System.out.println("Constructor with one int arg");
}
Flower(String ss){
System.out.println("Constr ......
JAVA¿ÉÒÔͨ¹ýJNI½Ó¿Ú·ÃÎʱ¾µØµÄ¶¯Ì¬Á¬½Ó¿â£¬´Ó¶øÀ©Õ¹JAVAµÄ¹¦ÄÜ¡£Ê¹ÓÃJAVA JNI½Ó¿ÚÖ÷Òª°üÀ¨ÒÔϲ½Ö裺
(1)±àдJAVA´úÂ룬עÃ÷Òª·ÃÎʵı¾µØ¶¯Ì¬Á¬½Ó¿âºÍ±¾µØ·½·¨£»
(2)±àÒëJAVA´úÂëµÃµ½.classÎļþ£»
(3)ʹÓÃjavah -jni Éú³É¸ÃÀà¶ÔÓ¦µÄCÓïÑÔ.hÎļþ£»
(4)ʹÓÃC/C++ʵÏÖ£¨3£©Éú³ÉµÄ.hÎļþÖÐÉùÃ÷µÄ¸÷º¯Êý£»
(5)±àÒëC/ ......