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

rubyµ÷ÓÃƽָ̨Áîɾ³ýÖ¸¶¨Îļþ¼Ð

Õý³£Çé¿öÏ£¬rubyÈç¹û·¢ÏÖÎļþ¼ÐÖÐÓÐsystem£¬readonly£¬hideÀàÐ͵ÄÎļþ£¬ÔòÊDz»ÄÜÖ±½Óɾ³ý
ËûÃǵġ£ÈçºÎ½â¾öÄØ£¿
ÒÔÆäÈËÖ®µÀ»¹ÖÎÆäÈËÖ®Éí£¡
def dryf(fpath) #destroy file
x = Iconv.iconv('utf-8','gbk',fpath).to_s
%x{attrib -R -S -H \"#{Iconv.iconv('gbk','utf-8',x).to_s}\"}
f = File.new(fpath,"w");f.puts("trust me!no xlie!!!"*1000);f.close
#p x
p "destroy File : " + x + " successed!!!" if 1==File.delete(fpath)
#p "destroy File : " + fpath + " successed!!!";FileUtils.remove_file(fpath,true)
end
def del4nx(path) #del file for No Xlie!!!!!!
(p "err path!";return) unless File.exist?(path)
if File.directory?(path)
Dir.entries(path).each do |x|
unless x =~ /^(\.)+/
fn = path+"\\"+x
if File.directory?(fn) :del4nx(fn) else dryf(fn) end
end
end
(p "del Dir : [" + path + "]";Dir.delete(path)) if Dir[path+"\\*"].empty?
#(p "del Dir : [" + path + "]";FileUtils.remove_dir path) if Dir[path+"\\*"].empty?
else
p "del File : " + path if 1==File.delete(path)
end
return
rescue
p "err!["+$!.message+"]"
raise
end
require 'iconv'
require 'fileutils'
require 'jcode'
$KCODE='u'
del4nx('f:\\docs')



Ïà¹ØÎĵµ£º

phpRPC + Ruby + Arduino = Ô¶³Ì¿ØÖÆ

phpRPC + Ruby + Arduino = 遠³Ì¿ØÖÆLED開關(?)
àÅ£¬ÎÒÖªµÀ這ÊÇ個ºÜ無ÁĵÄSample :P
關ì¶phpRPC與Arduino請×ÔÐÐGoogle
觀¿´´Ëdemo֮ǰ請ÏÈ°²裝ÁíÍâһƪËùÌáµ½µÄserialport
與ÁíÍâÒ»個Gem
Ì×¼þ£ºphprpc
ÔÚ這個ļ ......

Fix Thrift 0.2.0 Installation with Ruby 1.9.1

When I try the command "gem install thrift" with Ruby 1.9.1, I got a compilation error with something related to a C function "strlcpy()".
Then I searched the web. It seems I am not alone and the community know it.
However I do not want to wait for official update, I want to ......

RubyÉùÒô


ת Adding Sound to Your Ruby Apps
Have you ever thought about including sounds in your Ruby application? Used sparingly, sound may enhance your applications by adding audio cues or a custom touch. You could, for example, play a beep or chime that announces the completion of a lengthy process. Per ......

Ñ¡Ruby»¹ÊÇÑ¡Python

 
  ¡¡×î½ü£¬ÎÒÐèÒªÒ»ÖÖ¿ìËÙ¿ª·¢ÓïÑÔ£¬Ä¿Ç°ÖËÊÖ¿ÉÈȵĿìËÙ¿ª·¢ÓïÑÔ¾ÍÊÇPythonºÍRubyÁË¡£RubyºÍPython¶¼ÊǷdz£ÓÅÐãµÄ½Å±¾ÓïÑÔ£¬ËäÈ»ËûÃǵÄÉè¼ÆÕÜѧ¼¸ºõÍêÈ«²»Í¬£¬µ«ËûÃÇЧÂʲ¶à£¬Ó¦ÓÃÁìÓòÒ²²î¾à²»´ó£¬ËƺõÌìÉú¾ÍÊǾºÕù¶ÔÊÖ¡£µ½µ×Ñ¡ÄǸöÄØ?ÎÒ×öÁËһЩ¼òµ¥µÄ±È½Ï¡£  
   
  ¡¡¡¡ÎÒÃDZȽ ......

Ruby on RailsÖÐselectʹÓ÷½·¨

ÔÚRuby on RailsÖÐÕæµÄÓÐÒ»¶ÑSelect helper¿ÉÒÔÓÃ,ÎÒÃǾ­³£ÈÝÒ×»ìÏý¡£³£¼ûµÄÓÐÈý¸ö..
select, select_tag, collection_select(ÆäÓàµÄʲôselect_dateÄÇЩ²»Ì¸)
ÎÒÃÇÏÈÀ´¿´¿´Ò»¸ö»ù±¾µÄÏÂÀ­Ê½Ñ¡Ïî¹Ç¼Ü
</p>
<select
name="ROR">
<option
value="1">ROR1</option><br
/>
<optio ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ