随着Ruby on Rails的流行,Ruby正在Web开发领域体现出它独特的魅力,和其他语言相比选择Ruby有什么优势?Ruby的运行效率高吗?Ruby能用来做网游充值这样“Mission Critical”的事情吗?Ruby能用来开发游戏吗?Ruby程序员难找吗?本主题将会和大家分享在网游运营平台开发的一些心得。
Brief introduction of Nashorn on JDK 8. Delivered at ADC 2013 (http://adc.alibabatech.org/), on July 14, 2013. Full version of slides coming soon.
Wrapper induction construct wrappers automatically to extract information f...George Ang
Wrapper induction is a technique to automatically generate wrappers to extract information from web sources. It involves learning extraction rules from labeled examples to construct a wrapper as a finite state machine or set of delimiters. Two main wrapper induction systems are WIEN, which defines wrapper classes including LR, and STALKER, which uses a more expressive model with extraction rules and landmarks to handle structure hierarchically. Remaining challenges include selecting informative examples, generating label pages automatically, and developing more expressive models.
This document summarizes a tutorial given by Bing Liu on opinion mining and summarization. The tutorial covered several key topics in opinion mining including sentiment classification at the document and sentence level, feature-based opinion mining and summarization, comparative sentence extraction, and opinion spam detection. The tutorial provided an overview of the field of opinion mining and abstraction as well as summaries of various approaches to tasks such as sentiment classification using machine learning methods and feature scoring.
The document provides an overview of Huffman coding, a lossless data compression algorithm. It begins with a simple example to illustrate the basic idea of assigning shorter codes to more frequent symbols. It then defines key terms like entropy and describes the Huffman coding algorithm, which constructs an optimal prefix code from the frequency of symbols in the data. The document discusses how the algorithm works, its advantages in achieving compression close to the source entropy, and some limitations. It also covers applications of Huffman coding like image compression.
Do not crawl in the dust different ur ls similar textGeorge Ang
The document describes the DustBuster algorithm for discovering DUST rules - rules that transform one URL into another URL that contains similar content. The algorithm takes as input a list of URLs from a website and finds valid DUST rules without requiring any page fetches. It detects likely DUST rules based on a large support principle and small buckets principle. It then eliminates redundant rules and validates the remaining rules using a sample of URLs to identify rules that transform URLs with similar content. Experimental results on logs from two websites show that DustBuster is able to discover DUST rules that can help improve crawling efficiency.
The document discusses techniques for optimizing front-end web performance. It provides examples of how much time is spent loading different parts of top websites, both with empty caches and full caches. The "performance golden rule" is that 80-90% of end-user response time is spent on the front-end. The document also outlines Yahoo's 14 rules for performance optimization, which include making fewer HTTP requests, using content delivery networks, adding Expires headers, gzipping components, script and CSS placement, and more.
17. Ruby 语言 : 简洁和优美的程序语言 (1)
# define a class
class Company; end
# use the class Company
ibm = Company.new
ibm.methods
18. Ruby 语言 : 简洁和优美的程序语言 (2)
# define a class Company
class Company
attr_accessor :id
def name; @name; end
def name=(name); @name=name; end
end
# use the class Company
ibm = Company.new
ibm.id = 11; ibm.name = 'IBM'
19. Ruby 语言 : 一切事情都是对象
( Everything is an object )
“有、无相生” “天下万物生于有,有生于无” – 老子
ibm.class
=> Company
ibm.class.superclass
=> Object
ibm.class.superclass.superclass
=> nil
nil.class
=> NilClass
27. JRuby 与 Java 项目: JRuby 实例演示 (2)
# Create a button for the frame
button = javax.swing.JButton.new(" 点击
我 !")
# Add the button to the frame
frame.get_content_pane.add(button)
frame.visible = true
28. JRuby 与 Java 项目: JRuby 实例演示 (3)
# Add an action for the button
button.add_action_listener do |evt|
javax.swing.JOptionPane.showMessageDialog(nil,
<<EOS)
<html> 来自 <b><u>JRuby</u></b> 问候! <br>
Button '#{evt.getActionCommand()}' clicked.
EOS
end
37. Rails 实例演示 (1)
# create rails application in system shell
rails demo && cd demo
./script/generate scaffold blog title:string body:text
rake db:migrate
./script/server
# use the rails application in browser
open http://0.0.0.0:3000
# debug, test and use the rails application in rails shell
./script/console
38. Rails 实例演示 (2)
# install rails edge current version 2.3
mkdir -p myapp/vendor && cd myapp
git clone git://github.com/rails/rails.git vendor/rails
ruby vendor/rails/railties/bin/rails -v
# create a rails generator file: rails_template.rb
generate(:scaffold, "blog title:string body:text")
rake("db:migrate")
# create rails 2.3 application with rails template
ruby vendor/rails/railties/bin/rails . -m rails_template.rb