CºÍPython³ÌÐòÔ±µÄJavaScriptѧϰָÄÏ£¨Ò룩
write by ¾ÅÌìÑãôá(JTianLing) -- blog.csdn.net/vagrxie
ÌÖÂÛÐÂÎÅ×é¼°Îļþ
ÔÎÄÀ´×Ô£º¡¶JavaScript for C & Python programmers
¡·£¬¾¹ý×÷ÕßCanisÔÊÐíºó·Ò룬¼´Ê¹×ªÔØÇ븽´ø´ËÁ´½Ó¡£
Ç°ÑÔ£ººÜÉٸɷÒëµÄÊÂÇ飬ÀÛ£¬ÐÁ¿à£¬²»ÄÜ·¢»Ó£¬µäÐ͵ķÑÁ¦²»Ìֺã¬×î½üÎÞÁÄ£¬ÏëÔÚÍøÒ³ÉÏÏÔʾ¶¯»£¨ÒòΪCSDNÌùͼ²»ÊDz»ÈÃÌùÁËÂ£¬Java
appletËäÈ»ÒѾ¸ã¶¨ÁË£¬µ«ÊÇ×ܸоõÕâ²»ÊÇJavaµÄÊÀ½ç£¬ËùÒÔÏë´ó¸ÅѧϰһÏÂJavaScriptºóÔÙ×ö¾ö¶¨£¬(-_-!´ÓÃüÃûÉÏ¿´ÆäʵÏñÊÇ»»³ÉÁË
JavaµÄ½Å±¾-_-!£©ÍøÉÏÀàËÆJAVA for C++
programmersµÄÎÄÕºܶ࣬µ«ÊÇjsÀàËƵÄÎÄÕÂÈ´ºÜÉÙ£¬Ò»·½Ãæ¿ÉÄܵÄÈ·java¸ü¼ÓÁ÷ÐУ¬ÁíÒ»·½Ãæ¿ÉÄÜÒ»°ãµÄC/C++³ÌÐòÔ±ÓëjsµÄÁìÓò²îµÄÌ«
Ô¶£¬Ã»ÓдËÐèÇ󣬱¾ÎÄÒ²²»ÊÇΪC++³ÌÐòԱдµÄ£¬ÊÇΪcºÍpython³ÌÐòԱдµÄ¡£
·ÒëÍêºó£¬¾Í¸öÈ˸оõ£¬±¾ÎÄÉõÖÁ²»ÄÜËãÊÇÒ»¸ö½ÏºÃµÄÖ¸ÄÏ£¬´ó¸Å¿ÉÒÔ¿´×öÒ»¸öC,Python³ÌÐòԱѧϰ
JavaScriptʱµÄ±§Ô¹£¬È«ÎÄÓÐÌ«¶à×÷Õߵı§Ô¹£¬Õë¶ÔJavaScript²»Ñ°³£µÄÓï·¨Ìá³öÁ˺ܶ࿴·¨£¬Óñ¾ÎÄÀ´È«ÃæµÄÁ˽âJavascriptÊÇ
²»Ì«¿ÉÄܵģ¬µ«ÊÇÁ˽âÒ»ÏÂ×÷Ϊһ¸öC,Python³ÌÐòÔ±£¬Ñ§Ï°JavaScriptÓ¦¸Ã×¢ÒâÄÄЩÆæÌصĵط½£¬Ò²²»ÊÇûÓкô¦¡£
£¨ÒÔÏÂÎÒµÄ×¢ÊͶ¼Ìí¼Ó**¿ªÍ·£¬Ã»ÓÐÌí¼ÓµÄΪ×÷ÕßÔ×¢ÊÍ£©
ÒÔÏÂÊÇÒëÎÄ£º
CºÍPython³ÌÐòÔ±µÄJavaScriptѧϰָÄÏ
×÷ÕߣºCanis
µÚÒ»´Î·¢±í£º 2006ÄêÈýÔÂ
¸üÐÂ: 2008ÄêÆßÔ (Ìí¼ÓÁ˵½ JSLintµÄÁ´½Ó)
×îºóÒ»´Î¸üÐÂ: 2009ËÄÔ (¸üºÃµÄɾ³ýArray itemsµÄ·½Ê½)
±¾ÎÄÊǶÔJavaScriptµÄ¼òµ¥½éÉÜ¡£ÍøÉÏÓкܶàÀàËƵÄ×ÊÁÏ£¬µ«ÊǴ󲿷ֶ¼ÊÇÕë¶Ô·Ç³ÌÐòÔ±¶ÁÕߵģ¬½Ìµ¼Ò»Ð©javascriptµÄ¼òµ¥´úÂë¡£ÄÇÑùҲûÓÐʲô£¬ÒòΪºÜ¶à´ÓÀ´²»±à³ÌµÄÈË·¢ÏÖËûÃǵÄÍøÒ³ÐèҪһЩjs½Å±¾µÄʱºò»áÐèÒªÕâЩ¡£
ÕâƪÎÄÕÂÌṩÁËһЩÓйØJavaScriptµÄ¸üÉî²ã´ÎµÄÐÅÏ¢¡£ÎÒ¼ÙÉèÄãÍêÈ«²»¶®javascriptµ«ÊÇÒ²¼ÙÉèÄãÒѾÊÇÒ»¸ö³ÆÖ°µÄ³ÌÐòÔ±£¬ÊÇ"C-like"ÓïÑԵijÌÐòÔ±¸üºÃ£¬²¢ÇÒ¶®Ò»µãpython½«ºÜÓаïÖú£¨**˵µÄ²»¾ÍÊÇÎÒÂð£¿-_-!£©
ÎÒ½«Ì¸µ½ÈκÎÎÒÈÏΪjavascript²»ºÃµÄµØ·½¡££¨**ÔÎÄÓõ½object model Ö¸µÄµÄÊǶÔÏóÄ£ÐÍÂð£¿×÷ÕßÊÇÏë˵ÃæÏò¶ÔÏóÂð£¿ÎÒ¶¼Ã»ÓÐÔÚÎÄÕÂÖп´µ½£©
JS²»ÊÇJAVA
Ê×ÏÈ£¬Ò»¸ö³£¼ûµÄÎó½âÐèÒª³ÎÇ壬javascript´ÓÀ´ÓëJAVAûÓÐÈκιØϵ¡£JSÒÔÇ°ÉõÖÁ²»½Ð
Ïà¹ØÎĵµ£º
Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
&n ......
c:forEach vaStatus ÊôÐÔ
ÓÃc:forEach ÖÐvaStatusµÄÊôÐÔ¿ÉÒÔ»ñµÃµü´úµÄ×ÔÉí״̬£¬È磺
<c:forEach var="" items="" varStatus="status">
<c:out value="${status.index}"/> ´Ë´Îµü´úµÄË÷Òý
<c:out value="${status.count}"/> ÒѾµü´úµÄÊýÁ¿
<c:out value="${status.first}"/> ÊÇ·ñÊǵÚÒ» ......
ÔÚÉÏÃæµÄʾÀýÖУ¬ÎÒÃǶ¨ÒåÁËÁ½¸öÓï·¨¸Ê¶£¬Ò»¸öÊÇClass()º¯Êý£¬Ò»¸öÊÇNew()º¯Êý¡£Ê¹ÓÃClass()¸Ê¶£¬ÎÒÃÇÒѾ¿ÉÒÔÓ÷dz£ÓÅÑŵĸñʽ¶¨ÒåÒ»¸öÀà¡£ÀýÈçÇ°ÀýÖеģº
var
Employee
=
Class(Person,
//
ÅÉÉúÖÁPersonÀà
{
......
ÀûÓÃJNI¼¼Êõ£¬¿ÉÒÔ×öµ½C/C++ÓëJavaÖ®¼äµÄÏ໥µ÷Óá£
1¡¢Javaµ÷ÓÃC/C++½Ó¿Ú
Õâ¸öÊÇJNI×î»ù±¾µÄÓ¦Óã¬JNIÓкܶàÕâ·½ÃæµÄÀý×Ó´úÂë¡£Ò»°ã°ÑC/C++д³É¶¯Ì¬Á´½Ó¿â£»ÔÚJava³ÌÐòÔÚLoadLibrary£¬ÀûÓÃnative½Ó¿Ú£¬¼´¿ÉÍê³Éµ÷Óá£
2¡¢C/C++»Øµ÷Java½Ó¿Ú
ÕâÖÖÓ÷¨£¬JNIµÄÀý×ӱȽÏÉÙ¡£Æäʵ£¬Ò²±È½Ï¼òµ¥£¬JNIÒ²ÌṩÁËÕâÑùµÄ½Ó¿Ú¡ ......
C¡¢´«Í³ C++
#include <assert.h>¡¡¡¡¡¡¡¡
//É趨²åÈëµã
#include <ctype.h>¡¡¡¡¡¡¡¡
//×Ö·û´¦Àí
#include <errno.h>¡¡¡¡¡¡¡¡
//¶¨Òå´íÎóÂë
#include <float.h>¡¡¡¡¡¡¡¡
//¸¡µãÊý´¦Àí
#include <fstream.h>¡¡¡¡¡¡
//ÎļþÊäÈ룯Êä³ö
#include <iomanip.h>¡¡ ......