femto's space_°Ù¶È¿Õ¼ä
°Ù¶È¿Õ¼ä | °Ù¶ÈÊ×Ò³ 
 
ÎÄÕÂÁбí
 
2010-01-13 13:21
1.RJB Ruby Java Bridge http://rjb.rubyforge.org/
 
2010-01-08 12:04
mvn test -Dmaven.test.failure.ignore=true mvn install assembly:assembly javax.servlet servlet-api 2.4 provided javax.servlet.jsp jsp-api 2.0 provided
 
2009-09-25 10:37

git daemon --base-path=. --export-all

#alias ci to commit

git config --global alias.ci commit

 
2009-08-03 15:44
·¢ÏÖÒ»¸öScreen scraping¿ò¼ÜScrAPI,¿´ÆðÀ´Í¦²»´íµÄ£¬ http://blog.labnotes.org/2006/07/11/scraping-with-style-scrapi-toolkit-for-ruby/£¬ ¼ÇÏÂÀ´ÒÔºó¿´¡£
 
2009-03-17 06:20

How to becoming a great hacker

http://giraffesoft.ca/blog/2009/03/10/4-core-competencies-of-great-hackers.html

At giraffesoft we do a lot of pair-programming collaborative development, both internally and when hired to coach or audit teams. After working closely with dozens of programmers, it's time to draw some conclusions.

Here are 4 traits that appear to be universal amongst great hackers:

Typing over 60 wpm

Thousands of hours spent on IM and IRC make you a faster typist. It's a skill that can be learned in school or with specialized software in 20 to 40 hours. So why are so many programmers glancing at their keyboards for common symbols?

Bringing up typing speed in conversation meets some resistance amongst some programmers. I've tried arguing that the micro-interruptions to your programming can knock you out of your flow and kill your productivity. For those that do not listen, I offer the example of people that google hotmail. It seems noobish, doesn't it?

Owning the command-line

Some developers need a pretty GUI or IDE to wrap every command-line utility. During one audit at a consulting company I saw a programmer wrestle with his IDE for 10 minutes in front of two CTOs. Verdict? His IDE didn't yet have support for the last version of Ruby on Rails, which we needed for specific functionality (ActiveResource). He was stuck.

In contrast, every great hacker we know has a customized environment, and they routinely compose unix commands. Even those stuck on Windows because of corporate policy still run Linux at home or on their servers.

Knowing your editor

Let's not pick editor fights: the only 3 editors we know to be used by great hackers are TextMate, vim and emacs. The most productive hackers will often customize their editor heavily.

We haven't met a single great hacker that relied on an IDE, although we hear they exist.

Reading code: owning your tools

We've noticed more people ignoring documentation and going straight to the source code. It's a great start.

Diving into a large code base to quickly understand what it does is a skill that can be practiced. People do get much faster at it with a little bit of practice. So fast that using a debugger to step through code seems slow by comparison; I've been chided by one hacker for using a debugger. "It's slow and it doesn't help you understand the code." Ouch.

Most hackers we know routinely read the source of plugins and frameworks before using them. By choosing better architected tools it's easier to add new functionality or discover security flaws. They also appear rather nonchalant about modifying framework code. They understand what it does, and feel free to modify it as if it was their code.

But, but...

The list isn't final or perfect, just the result of observations and discussions. A check-list for self-improvement.

I don't pretend to fit the description of "great hacker" that I've offered up: I don't read enough code, haven't done much work customizing my editor and barely know some CLI utilities like awk or sed. While I won't claim that learning these 4 skills will make you a great hacker, it seems unlikely you can become one without them.

 
2009-02-20 21:25

×î½üÔÚÑо¿PEÎļþ¸ñʽ(Ò²¾ÍÊÇExeÎļþµÄ¸ñʽ)

typedef struct _IMAGE_DOS_HEADER { // DOSµÄ.EXEÍ·²¿
  USHORT e_magic; // ħÊõÊý×Ö
  USHORT e_cblp; // Îļþ×îºóÒ³µÄ×Ö½ÚÊý
  USHORT e_cp; // ÎļþÒ³Êý
  USHORT e_crlc; // ÖØ¶¨ÒåÔªËØ¸öÊý
  USHORT e_cparhdr; // Í·²¿³ß´ç£¬ÒÔ¶ÎÂäΪµ¥Î»
  USHORT e_minalloc; // ËùÐèµÄ×îС¸½¼Ó¶Î
  USHORT e_maxalloc; // ËùÐèµÄ×î´ó¸½¼Ó¶Î
  USHORT e_ss; // ³õʼµÄSSÖµ£¨Ïà¶ÔÆ«ÒÆÁ¿£©
  USHORT e_sp; // ³õʼµÄSPÖµ
  USHORT e_csum; // УÑéºÍ
  USHORT e_ip; // ³õʼµÄIPÖµ
  USHORT e_cs; // ³õʼµÄCSÖµ£¨Ïà¶ÔÆ«ÒÆÁ¿£©
  USHORT e_lfarlc; // ÖØ·ÖÅä±íÎļþµØÖ·
  USHORT e_ovno; // ¸²¸ÇºÅ
  USHORT e_res[4]; // ±£Áô×Ö
  USHORT e_oemid; // OEM±êʶ·û£¨Ïà¶Ôe_oeminfo£©
  USHORT e_oeminfo; // OEMÐÅÏ¢
  USHORT e_res2[10]; // ±£Áô×Ö
  LONG e_lfanew; // ÐÂexeÍ·²¿µÄÎļþµØÖ·
} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
ÉÔ΢дÁËÒ»¸ö½Å±¾²é¿´
$: << File.join(File.dirname(__FILE__), "..", "lib")
#require "dynamic-struct"
require 'core-ext'
 
#class DynamicStruct
# class_inheritable_accessor :fields_spec
#end
#DynamicStruct.fields_spec ||= []

class DynamicStruct
attr_accessor :fields
module ClassMethods
    attr_accessor :fields_spec
    def u2(symbol, options=nil)
       @fields_spec ||= []
       @fields_spec << [:u2, symbol, options ]
    end
    alias :USHORT :u2
      def u4(symbol, options=nil)
      @fields_spec ||= []
      @fields_spec << [:u4, symbol, options ]
    end
    alias :ULONG :u4
end
extend ClassMethods
def read(file)
    @fields ||= []
      #puts self.class.fields_spec.inspect
    self.class.fields_spec.each do |field_spec|
    options = field_spec[2]
        options||={}
       if field_spec[0] == :u2
          value = file.sysread(2)
          value = value.unpack("s")[0] unless options[:format] == :string
          @fields << [value, field_spec] #options
       elsif field_spec[0] == :u4
          value = file.sysread(4)
          value = value.unpack("i")[0] unless options[:format] == :string
          @fields << [value, field_spec] #options
       end
    end
end
def to_s(format=nil)
    result = ""
    if(format.nil?)
      @fields.each do |value, field_spec|
        #puts "converting #{value.inspect}"
      result << "#{field_spec[1]}:#{value.to_s}\n"
      end
    end
    result
end

end

class Image_Dos_Header < DynamicStruct
u2 :e_magic, :format=>:string;
u2 :e_cblp; #// Îļþ×îºóÒ³µÄ×Ö½ÚÊý
u2 :e_cp; #// ÎļþÒ³Êý
u2 :e_crlc; #// ÖØ¶¨ÒåÔªËØ¸öÊý
u2 :e_cparhdr; #// Í·²¿³ß´ç£¬ÒÔ¶ÎÂäΪµ¥Î»
u2 :e_minalloc; #// ËùÐèµÄ×îС¸½¼Ó¶Î
u2 :e_maxalloc; #// ËùÐèµÄ×î´ó¸½¼Ó¶Î
u2 :e_ss; #// ³õʼµÄSSÖµ£¨Ïà¶ÔÆ«ÒÆÁ¿£©
u2 :e_sp; #// ³õʼµÄSPÖµ
u2 :e_csum; #// УÑéºÍ
u2 :e_ip; #// ³õʼµÄIPÖµ
u2 :e_cs; #// ³õʼµÄCSÖµ£¨Ïà¶ÔÆ«ÒÆÁ¿£©
u2 :e_lfarlc; #// ÖØ·ÖÅä±íÎļþµØÖ·
u2 :e_ovno; #// ¸²¸ÇºÅ
u2 :e_res_0; #// ±£Áô×Ö
u2 :e_res_1; #// ±£Áô×Ö
u2 :e_res_2; #// ±£Áô×Ö
u2 :e_res_3; #// ±£Áô×Ö
u2 :e_oemid; #// OEM±êʶ·û£¨Ïà¶Ôe_oeminfo£©
u2 :e_oeminfo; #// OEMÐÅÏ¢
u2 :e_res2_0; #// ±£Áô×Ö
u2 :e_res2_1; #// ±£Áô×Ö
u2 :e_res2_2; #// ±£Áô×Ö
u2 :e_res2_3; #// ±£Áô×Ö
u2 :e_res2_4; #// ±£Áô×Ö
u2 :e_res2_5; #// ±£Áô×Ö
u2 :e_res2_6; #// ±£Áô×Ö
u2 :e_res2_7; #// ±£Áô×Ö
u2 :e_res2_8; #// ±£Áô×Ö
u2 :e_res2_9; #// ±£Áô×Ö
u4 :e_lfanew; #// ÐÂexeÍ·²¿µÄÎļþµØÖ·
#field_type :image_dos_header
end
class PEFile < DynamicStruct
#image_dos_header :dos_header

end
file = ARGV[0] || "shake.exe"
f = File.new(file, "rb")
#pefile=PEFile.new
dos_header = Image_Dos_Header.new
#dos_header.read(f)
#pefile.read(f)
f.seek 0x108
puts f.sysread(4)
class Image_File_Header < DynamicStruct
USHORT :Machine;
USHORT :NumberOfSections;
ULONG :TimeDateStamp;
ULONG :PointerToSymbolTable;
ULONG :NumberOfSymbols;
USHORT :SizeOfOptionalHeader;
USHORT :Characteristics;
end
r = Image_File_Header.new
r.read(f)
puts r
f.close
#puts dos_header.to_s
Êä³ö£º
PE
Machine:332
NumberOfSections:4
TimeDateStamp:1083547367
PointerToSymbolTable:0
NumberOfSymbols:0
SizeOfOptionalHeader:224
Characteristics:271
 
 
2009-02-14 19:20

×î½üÔÚ¿´Ã÷³¯ÄÇЩʶù£¬¿´µ½

'ÔÚÈ˵ÄÒ»ÉúÖУ¬ÖÁÉÙÓÐÄÇôһÁ½¼þÊ£¬Ó¦¸Ã²»Í×Э£¬ÖÁÉÙÒ»Á½¼þ¡£ÒòΪ²»Í×Э¡¢¼á³ÖËäÈ»²»ÏÖʵ£¬ºÜûºÃ´¦£¬È´ÊÇÕýÈ·µÄ'

Êǰ¡£¬ÖÁÉÙÓÐÄÇôһÁ½¼þÊÂ,Ó¦¸Ã²»Í×Э¡£

»¹ÓÐÃ÷ÔÂ˵µÄ'ÎÄÃ÷µÄÃð¾øÊÇÕý³£µÄ£¬ÒòΪÂ鷳̫¶à£¬ÌìÔÖÈË»ö¡¢ÄÚ¶·Íâ¶·£¬ËùÒÔËÄ´óÎÄÃ÷ÃðÁËÈý¸ö£¬Ö»ÓÐÖйúÎÄÃ÷Á÷´«ÖÁ½ñ£¬ÊµÔÚÌ«²»ÈÝÒ×'

ºÇºÇ¡£

¸Ù³£Íò¹Å£¬½ÚÒåǧÇÌìµØÖªÎÒ£¬¼ÒÈËÎÞÓÇ

 
2009-02-13 23:31
Ô­À´UbuntuÊÇÄϷǵİ¡?Õâôţ±Æ?
 
2009-01-14 20:31
½ñÌìÍæÁËÒ»»ïqt,Ê×ÏÈ£¬Ð´Ò»¸öhello.cpp #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel *label = new QLabel("Hello Qt!"); label->show(); return app.exec(); } È»ºó qmake -project qmake make ¾Í¿ÉÒÔÁË£¬³öÀ´Ò»¸öqtµÄwindow,ÏÔʾһ¸öQLabel, Hello Qt, ÖµµÃ×¢ÒâµÄÊÇ,QLabelÊÇÖ§³ÖhtmlµÄ, ËùÒÔ¿ÉÒÔ°Ñ×Ö·û´®¸Ä³É ("

Hello " "Qt!

"); Ö±½ÓÏÔʾ£¬Í¦ÓÐÒâ˼µÄ¡£
 
2008-12-18 10:08
C:\ruby\bin\ruby.exe -e "STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift)" F:/rails-project/proxying/script/server default -p 3000 -b 127.0.0.1 -e development
C:/LAN/ruby-1.9.0-0/lib/ruby/gems/1.9.0/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require': too short escaped multibyte character: /\A(?: (SyntaxError)
                     [\x00-\x7f]                                     |
                     [\xc2-\xdf] [\x80-\xbf]                         |
                     \xe0        [\xa0-\xbf] [\x80-\xbf]             |
                     [\xe1-\xef] [\x80-\xbf] [\x80-\xbf]             |
                     \xf0        [\x90-\xbf] [\x80-\xbf] [\x80-\xbf] |
                     [\xf1-\xf3] [\x80-\xbf] [\x80-\xbf] [\x80-\xbf] |
                     \xf4        [\x80-\x8f] [\x80-\xbf] [\x80-\xbf]
                    )*\z/x
C:/LAN/ruby-1.9.0-0/lib/ruby/gems/1.9.0/gems/activesupport-2.2.2/lib/active_support/multibyte/chars.rb:85: too short escaped multibyte character: /\A(?:
                     [\x00-\x7f]                                     |
                     [\xc2-\xdf] [\x80-\xbf]                         |
                     \xe0        [\xa0-\xbf] [\x80-\xbf]             |
                     [\xe1-\xef] [\x80-\xbf] [\x80-\xbf]             |
                     \xf0        [\x90-\xbf] [\x80-\xbf] [\x80-\xbf] |
   from C:/LAN/ruby-1.9.0-0/lib/ruby/gems/1.9.0/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `block in require'
 
     
 
 
¸öÈ˵µ°¸
 
femtowin
ÄÐ
ÉϴεǼ£º
19Сʱǰ
¼ÓΪºÃÓÑ
 
   
 
×îÐÂÕÕÆ¬
 
   
 
×îÐÂÆÀÂÛ
 
     
 
×î½ü·Ã¿Í
 
 

knightfantasy

HSN»ÆÈüÄÐ

colder

Äþ¾²Ö®¶¨

nanshanzhulin

dai19900525

hellozhuzi

sYubang
     
 
¶©ÔÄÎҵĿռä
 
ÒÑÓÐÈ˴ηÃÎʱ¾¿Õ¼ä
 
¶©ÔÄRSS  Ê²Ã´ÊÇRSS£¿

ÄúÒ²ÏëÓµÓÐÕâÑùµÄ¿Õ¼ä£¿Çëµã´ËÉêÇë¡£
     


©2010 Baidu