Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ruby Bignum Dir ѧϰ

Bignum
+        ¼Ó
-        ¼õ
*        ³Ë
/        ³ý
**        Ö¸Êý²Ù×÷2**2 Òâ˼ÊÇ2µÄƽ·½
<=>        ´óÓÚ,µÈÓÚ,СÓÚ 1,0,-1
==        ÅжÏÏàµÈ
abs        ¾ø¶ÔÖµ
Continuation     ÔÝʱ²»ÖªµÀÔõôÓÃ
Dir
chdir        Çл»Â·¾¶(µ±Ç°ÊǽøÈëirbµÄ·¾¶)
pwd        ¸ùĿ¼
delete        ɾ³ýĿ¼,Ŀ¼²»ÊÇ¿ÕÅ×SystemCallErrorÒì³£
entriesÏî,Ìõ    ·µ»Ø¸ø¶¨Ä¿Â¼ÖÐËùÓÐÎļþÃû×é³ÉµÄÊý×é,Èç¹ûĿ¼²»´æÔÚÅ×ÉÏÃæµÄÒì³£¡£ÆäÖаüº¬Îļþ¼ÐµÄ»°1:Îļþ¼Ðû¶«Î÷·µ»ØÃû×Ö£¬ÓÐÒ»¸öÎļþ·µ»Ø‘.’,Óжà¸öÎļþ·µ»Ø'..'
foreach        ¶Ô¸ø¶¨Ä¿Â¼ÖеÄÿ¸öÏîµ÷ÓÃblock
getwd        ·µ»Ø·ûºÅÁ´½ÓµÄÕæÕýµØÖ·
glob []        Æ¥ÅäÎļþ£¡³¬¸´ÔÓ£¬»ØÍ·×Ðϸ¿´¿´
mkdir        ´´½¨Îļþ¼Ð¡£¿ÉÓÐȨÏÞ²Ù×÷£¬Òª»ØÍ·¿´¿´¡£Ö÷ÒªÊǶÔlinux²»ÊìϤ
new        ΪÏÖÓеÄĿ¼newÒ»¸öDirʵÀý,¿ªÊ¼ÒÔΪûʲôÓ㬺óÀ´ÏëÏë²»¿ÉÄÜÒ»Ö±ÓÃdirÀ´Çл»Â·¾¶°É
open        ²»´øblock²ÎÊýʱÓÚnewÒ»Ñù£¬´ø²ÎÊý¾Í´«µÝdirΪblock²ÎÊý¡£²Ù×÷Ϊ·Ç¸Ä¸Ä¼Ó¼Ó
rmdir        ÒƳýij·¾¶,ÓëdeleteͬÒå
close        ¹Ø±ÕĿ¼Á÷,²»´ò¿ªµÄ»°ÈκηÃÎʶ¼Å×IOErrorÒì³£
each        Ñ­»·±éÀúÊý×é
path        Êä³ö·¾¶,ʲô²ÎÊý¾Íʲô·¾¶
rewind        Öض¨Î»µ½dirµÄµÚÒ»Ïî
seek        Öض¨Î»µ½Ö¸¶¨Î»ÖÃ,ÓвÎÊý
tell        Öض¨Ïòµ½µ±Ç°Î»ÖÃ


Ïà¹ØÎĵµ£º

Rubyʵ¼ù—HelloWorld

¿ª·¢»·¾³
OS£ºWindowsXP
Ruby: Ruby1.9.1
Rails: Rails2.3.5
IDE: RubyMine2.0.1
1¡¢´´½¨Rails¹¤³Ì
2¡¢ÐÞ¸Ä /config/database.yml
×Ô¶¯´´½¨µÄ¹¤³ÌÖÐĬÈÏÊý¾Ý¿âÁ¬½ÓµÄÊÇsqlite£¬Èç¹ûûÓа²×°´ËÊý¾Ý¿â£¬ÐèÒªÐ޸ĸÃÅäÖ㨱¾ÀýÖÐʹÓõÄÊÇmysql£©
# Mysql Version 5.1.46
development:
adapter: mysql
database: ......

ruby on rails Ò»²½²½¿ªÊ¼(2)·ÖÒ³ºÍ¼òµ¥²éѯ

ʹÓà will_paginate ½øÐзÖÒ³ºÍ¼òµ¥²éѯ
ÔÚÃüÁîÐÐÏÂʹÓà gem install will_paginate ÃüÁ³öÏÖÏÂÃæ½á¹û°²×°³É¹¦
´ò¿ª books_controller.rb (Äã×Ô¼ºµÄ¿ØÖÆÆ÷)
×¢Ê͵ô²éÕÒÈ«²¿µÄ·½·¨£¬Ê¹ÓÃÏÂÃæµÄ·½·¨£¬ÒѾ­¼¯³É¸ù¾Ýtitle½øÐвéѯ
Ruby´úÂë
#@books = Book.all   
@books = Book.pagina ......

ʹÓÃrubyÓëMS AccessÊý¾Ý¿â½»»¥

ruby³£¹æ·ÃÎÊaccessÊý¾Ý¿âµÄ·½·¨Ó¦¸ÃÊÇʹÓÃDBI¿â
£º
require 'dbi'

DBI.connect("DBI:ADO:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;")

¿ÉÊÇ
¼òµ¥³¢ÊÔÖ®ºóûÄܳɹ¦£¬ÌáʾÕÒ²»µ½Çý¶¯Æ÷ADO,ÀÁµÃÔÙÊÔ£¬ËìÕÒÆäËû·½·¨¡£
Ò»·¬ËÑË÷Ö®ºó£¬·¢ÏÖ¿ÉÒÔÓÃWIN32OLEÀ´·ÃÎÊaccess,дһ¸ö¼òµ¥µÄÀà°ü×°Ö®: ......

rubyÔÚwindows 7 cmd ÖÐÏÔʾ²ÊÉ«ÎÄ×Ö

ÏÈ·ÅÉÏÒ»¸öʵÀýµÄbatÎļþ,ÒªÇó¹ÜÀíÔ±ÌØȨÔËÐÐ:
@echo off
::CMDÀïÏÔʾ²ÊÉ«ÎÄ×Ö
chcp 437>nul&&graftabl 936>nul
if not exist CONFIG.NT copy %WinDir%\System32\CONFIG.NT CONFIG.NT
@cls
echo DEVICE=%WinDir%\System32\ANSI.SYS /x >%WinDir%\System32\CONFIG.NT
@echo.
command /cecho 
com ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ