- 浏览: 182101 次
- 性别:
- 来自: 上海
-
文章分类
- 全部博客 (174)
- rails (25)
- js (15)
- ruby (30)
- webserver (5)
- mysql (13)
- security (5)
- thinking (5)
- common sense (2)
- linux (18)
- android (26)
- web browser (1)
- config and deploy (1)
- mac (5)
- css (2)
- db (8)
- version manager (1)
- editor (1)
- job (1)
- OOA (1)
- php (1)
- apache (2)
- mongrel (1)
- Mongodb (1)
- facebook (1)
- 架构 (1)
- 高并发 (1)
- twitter (1)
- Erlang (1)
- Scala (1)
- Lua (1)
- ubuntu (3)
- cache (1)
- 面试题 (2)
- android layout (2)
- android控件属性 (2)
- java (5)
- customize view (1)
- advanced (2)
- python (2)
- 机器学习 (5)
最新评论
添加svn到Netbeans:
Netbeans => 工具=> 选项 => 其他 => 版本控制
uninitialized constant ActiveSupport::Dependencies::Mutex
解决:
sudo gem update --system 1.3.7
netbeans中字体很小解决办法:
cd /usr/local/netbeans-6.9.1/etc
sudo gedit netbeans.conf
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true"
=>
netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true --fontsize 12 -J-Dawt.useSystemAAFontSettings=on"
gem list:
cgi_multipart_eof_fix (2.5.0)
chronic (0.2.3)
daemons (1.0.10)
fastthread (1.0.7)
ferret (0.11.6)
ffi (0.6.3)
gem_plugin (0.2.3)
hoe (2.6.1)
hpricot (0.8.2)
json_pure (1.4.3)
log4r (1.1.7)
mechanize (1.0.0)
mime-types (1.16)
mislav-will_paginate (2.3.11)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.8.1)
nokogiri (1.4.3.1)
oauth (0.4.2)
rack (1.0.1)
rails (2.3.4)
rake (0.8.7)
rest-client (1.6.1)
rmagick (2.13.1)
rmmseg (0.1.6)
ruby-hmac (0.4.0)
ruby-oci8 (1.0.7)
ruby-ole (1.2.10.1)
rubyforge (2.0.4)
spreadsheet (0.6.4.1)
ultrasphinx (1.11)
uuidtools (2.1.1)
whenever (0.4.2)
svn相关:
svn help status
svn checkout svn://192.168.6.10/project/Source_code/trunk/src
svn delete --force config/database.old.yml
svn revert app/views/api2/response_center.rxml ,撤销修改
svn up ,pull
svn st
svn log|more
svn ci -m "msg" path ,push
svn add file or dir
svn help st
svn add lib/tasks/pa/wz_city.rake
svn delete --force lib/tasks/pa/add_wz_city.rake
svn ci -m "m" lib/tasks/pa/
svn up
svn的配置文件
修改/root/.subversion目录下的config文件。
比如说修改svn所控制的文件类型,则可以修改config文件中的global-ignores参数,这个参数是指定了svn
版本控制忽略的文件类型,举例如下:
global-ignores = *.o *.lo *.la *.al .[0-9]* *.a *.pyc *.pyo
ignore environment.rb
表单提交:
document.forms['main'].submit();
document.getElementById('wz').submit();
soap:
If the vast majority of your consumers will be Rails developers then
maybe using ActiveResource compliant REST services might be the way to
go, but they will look pretty ugly to non-Rails consumers.
If you want any technology to be able to consume it, I would not use
ActiveResource, and would create XML (or JSON) that suits the data.
rails activeresource
rails webservices
SOA webservice CORBA XML (Web Services Definition Language,WSDL)
Web服务并不是实现 SOA 的惟一方式。前面刚讲的 CORBA 是另一种方式,这样就有了面向消息的中间
件(Message-Oriented Middleware)系统,比如 IBM 的 MQseries。但是为了建立体系结构模型,
您所需要的并不只是服务描述。您需要定义整个应用程序如何在服务之间执行其工作流。您尤其需要找到业务
的操作和业务中所使用的软件的操作之间的转换点。因此,SOA 应该能够将业务的商业流程与它们的技术流
程联系起来,并且映射这两者之间的关系。例如,给供应商付款的操作是商业流程,而更新您的零件数据库,
以包括进新供应的货物却是技术流程。因而,工作流还可以在 SOA 的设计中扮演重要的角色。
可复用以往的信息化软件。基于SOA的协同软件提供了应用集成功能,能够将ERP、CRM、HR等异构系统的数据集成。
soa vs web service
SOAP, WSDL, UDDI
SOA 不是Web服务
在理解SOA和Web服务的关系上,经常发生混淆。根据2003年4月的Gartner报道,Yefim V. Natis就这个问题是这样解释的:“Web服务是技术规范,而SOA是设计原则。特别是Web服务中的WSDL,是一个SOA配套的接口定义标准:这是 Web服务和SOA的根本联系。”从本质上来说,SOA是一种架构模式,而Web服务是利用一组标准实现的服务。Web服务是实现SOA的方式之一。用 Web服务来实现SOA的好处是你可以实现一个中立平台,来获得服务,而且随着越来越多的软件商支持越来越多的Web服务规范,你会取得更好的通用性。
api authorization
digital signature
MD5(message-digest algorithm 5)
http://api.map.baidu.com/api?key=6f5ba7bc29711cc8e97cdc693bd0c896&v=1.0&services=false
s1=CGI::escape("豫".utf8_to_gbk)
=> "%D4%A5"
>> s2=CGI::escape("豫")
=> "%E8%B1%AB"
#Iconv.iconv("utf8","GB18030","")[0]
#$0 = irb|script/server|/home/simon/NetBeansProjects/haohaoApi/lib/wz/shanghai_wz.rb| /usr/bin/rake
$0:top level execution
__FILE__:current level execution
if __FILE__ == $0
end
Warning: The database defined as "test" will be erased and
re-generated from your development database when you run "rake".
Do not set this db to the same as development or production.
when test cases are run, it deletes the data before
and after the test.
源的选择:
bjtu_sources.list
选择合适的源,有时候可能对方服务器出问题,更新源也会出错
sudo apt-get update
E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。
rm /var/lib/apt/lists/*
cd /var/lib/apt/lists/
mkdir partial
后再 apt-get update 就没问题了。
参考: http://ubuntuforums.org/archive/index.php/t-427.html
如何获取ruby的安装路径:
require "rbconfig"
puts File.join(Config::CONFIG["bindir"], Config::CONFIG["ruby_install_name"])
crontab:
crontab log
Redhat (RHEL)/Fedora Core/Cent OS Linux.
# /etc/init.d/crond start|stop|restart|reload
# /etc/rc.d/init.d/crond start
Debian or Ubuntu Linux.
$ sudo /etc/init.d/cron start|stop|restart|reload
$ sudo service cron start
start the service at boot time so that job can run w/o problems.
Redhat (RHEL)/Fedora Core/Cent OS Linux:
# chkconfig crond on
Debian or Ubuntu Linux:
$ sudo rcconf
$ sudo update-rc.d cron defaults
man service
service --status-all
sudo service SCRIPT COMMAND [OPTIONS]
sudo service cron start
The SCRIPT parameter specifies a System V init script, located in
/etc/init.d/SCRIPT. The supported values of COMMAND depend on the
invoked script, service passes COMMAND and OPTIONS it to the init
script unmodified. All scripts should support at least the start and
stop commands. As a special case, if COMMAND is --full-restart, the
script is run twice, first with the stop command, then with the start
command.
/etc/init.d containing System V init scripts.
业务规则 + 业务流程 + 业务内容 = 系统
维护HTTP连接状态客户端有三种方式:
COOKIE, URL回写, HIDDEN字段,
服务器可以通过session id追踪缓存的用户数据.
COOKIE的效果最好, 但有可能被禁用, URL回写会让URL的长度和可读性很难过.
HIDDEN字段在TAPESTRY里用的最多,但需要往复的传输和生成页面.
服务器端的话,需要占用内存,方案取舍就要看自己的项目实际情况了.
obj.valid?(context = nil)
Runs all the specified validations and returns true if no errors were added otherwise false.
user.errors.on("username")
Tempfile类方法
"original_filename", "fileno", "size", "type"
nil.id, true.id , false.id
inline GETCOLORARROUND(CxImage& img, int a1, int a2, int& q, int x, int y, int xmin, int xmax, int ymin, int ymax) {
int x1, y1;
x1 = x + a1; y1 = y + a2;
if (x1 >= xmin && x1 < xmax && y1 >= ymin && y1 < ymax)
{
RGBQUAD c = img.GetPixelColor(x1, y1);
if (RGB2GRAY(c.rgbRed, c.rgbGreen, c.rgbBlue) != 255)
q++;
}
}
void C1(CxImage& img, int k)
{
CxImage tmp(img, true, true, true);
long xmin, ymin, xmax, ymax;
xmin = ymin = 0;
xmax = img.GetWidth(); ymax= img.GetHeight();
RGBQUAD bk;
bk.rgbBlue = 0xff;
bk.rgbGreen = 0xff;
bk.rgbRed = 0xff;
bk.rgbReserved = 0xff;
for(long y=ymin; y<ymax; y++){
for(long x=xmin; x<xmax; x++){
int q = 0;
GETCOLORARROUND(img,1, 1, q, x, y, xmin, xmax, ymin, ymax);
GETCOLORARROUND(img,1, -1, q, x, y, xmin, xmax, ymin, ymax);
GETCOLORARROUND(img,1, 0, q, x, y, xmin, xmax, ymin, ymax);
GETCOLORARROUND(img,0, 1, q, x, y, xmin, xmax, ymin, ymax);
GETCOLORARROUND(img,0, -1, q, x, y, xmin, xmax, ymin, ymax);
GETCOLORARROUND(img,-1, 1, q, x, y, xmin, xmax, ymin, ymax);
GETCOLORARROUND(img,-1, -1, q, x, y, xmin, xmax, ymin, ymax);
GETCOLORARROUND(img,-1, 0, q, x, y, xmin, xmax, ymin, ymax);
if (q < k) {
tmp.SetPixelColor(x,y,bk);
}
}
}
img.Transfer(tmp);
}
上面的C1函数就是去掉指定了k值的噪音点,但是如果用k=3调用或者k=4调用,效果都不理想
但是像这样子调用
void convert(CxImage& img)
{
C1(img, 4);
C1(img, 3);
C1(img, 4);
C1(img, 3);
}
一下子就去掉了原图周围的黑边框,杂点,和线。
对吧,实际算法太简单了,只要愿意去想,就能有意想不到的效果。
str
=> "<div id=\"fuck\">hello</div><div id=\"game\">hello</div><div id=\"ok\">hello</div><div id=\"fine\">hello</div><div id=\"fine\">world</div>"
>> str.scan(/<div\sid="fine.*?>.+?<\/div>/im)
=> ["<div id=\"fine\">hello</div>", "<div id=\"fine\">world</div>"]
sed -n '/undefined/p' log/production.log
改变文本内容:
sed -i 's/chinaafcs/chinaafc_baks/g' chinaafc_baks.sql
不改变文本内容:
sed -e 's/chinaafcs/chinaafc_baks/g' chinaafc_baks.sql
一款互联网工具的“动词化”,通常意味着它成为一个被引爆的流行—比如Digg、Google和Twitter。现在最时髦的口号变成了“Let’s Instagram the world”。
在iPhone上可以使用的图片拍摄与分享工具,已在全球100多个国家和地区散布着超过1200万的用户,先后融资700万美元,团队成立刚满一年,迄今只有6个人
“Instagram首先是一个照片拍摄和分享的工具,然后是一个社交网络。”
今年1月,Instagram就向第三方开发者开放了应用程序接口(API),允许他们围绕Instagram本身开发各种扩展应用:比如InstaRader是一款基于地理位置查看Instagram照片的工具,可以帮你找到方圆5英里内用Instagram分享的照片,并在地图上标记出来;InstARgam是一款增强现实应用(Augmented Reality),根据用户的地理位置自动从Instagram社区搜索出相关照片并推送出来。而InstaDesk可以把Instagram的体验迁移到Mac电脑的桌面上—即便你没有iPhone也能获得Instagram的体验。
我从Facebook上学到的是:一个平台可以在保护用户隐私,让用户感觉更安全和舒服的同时实现开放。
谷歌今年6月推出了Google+服务,但当时仅针对普通用户开放,而不允许商业用户擅自在Google+网站上创建页面。谷歌上周宣布,已面向全球所有企业用户开放Google+,从而使各类品牌、产品、企业及其他机构能够在Google+创建相应页面。
百度第二季度在中国搜索市场收入的份额为75.9%,但正面临另外两个可能很强大的挑战者:阿里巴巴集团旗下的电子商务搜索引擎一淘网(Etao.com)、以及新浪公司的微博(Weibo.com)。
HTML5实现地理定位。也就是获得本机IP地址,然后判断出所在位置,并且显示在Google地图上
ActionController::InvalidAuthenticityToken, 422
Exception, 500
RuntimeError, 500
ActiveRecord::RecordNotFound, 400
ActionController::RoutingError, 400
ActionController::UnknownController, 400
ActionController::UnknownAction, 400
Ruby on Rails瞄准的则是另一个目标——中间级Web站点(Web sites in-between)。这些站点虽然难以大规模蔓延,每天还是有些访问量。但它们大量使用外部托管主机,如果Rails不能在这些站点上预先安装,就不会有多少戏唱。PHP不用伤这个脑筋,因为99%的网络提供商都支持它了。
数据安全:
昨天下午,记者在http://go.ipa100.com网站找到了“天涯4000万用户密码查询系统”。记者输入自己的天涯ID,立刻准确地跳出了用户名、密码和邮箱,随后拿部门同事的几个ID测试后发现,全部无误,有人惊呼赶紧改密码,也有人自我安慰“幸好银行卡密码不是这个”。
CSDN和天涯的数据库相继被黑客“攻陷”。此前网上就有消息称新浪微博、猫扑、17173、多玩网、人人网、嘟嘟牛、7k7k、178游戏网等多家网站的会员数据库均已被盗,但新浪微博和人人网都已出来辟谣。昨天,记者在登录自己的新浪微博时,第一时间收到了“你在新浪的账号密码与其他网站被盗账号密码一致,请立即更改密码”的温馨提示。
@topics = Topic.paginate :conditions=>conditions,
:joins=>joins||"",
:order=>"last_responsed_at desc",
:page =>params[:page],:per_page =>20
@topics.total_entries
topic has many replies
topic.replies.paginate :include=>[:response_text],:page=>page,:per_page=>per_page,:order=>"created_at desc"
Topic.paginate :joins=>"left join taggings on topics.id=taggings.taggable_id and taggings.taggable_type='Topic'"
####car has_many pics########
@pics = Pic.paginate :conditions=>["cars.is_deleted = 0"],
:joins=>'left join cars on pics.car_id = cars.id',
:order=>"pics.id",
:page =>params[:page]||1,:per_page =>10
Promotion.count(:conditions=>["biz_base_id = ? and start_date < ? and thru_date > ? and is_deleted = 0" , 13 , Time.now.chinese_format , Time.now.chinese_format])
BizBaseSysPropTypeCount.first(:select=>"sys_prop_type_id,max(counts)")
BizBaseGoods.update_all("status=1",["biz_base_id=13"])
CarPageContentTypeMapping.delete_all(["car_wz_city_id = ?", wc.id])
User.all(:offset=>13, :limit=>2)从第13条记录开始,而不是从id=13的记录开始
User.all(:offset=>600009,:limit=>20).map &:username
数据库同步问题(保存后马上去find会出错)
def export_data
redirect_to "/downloads/abcdef.csv"
end
屏蔽退格键: document.onkeydown=function(){if(event.keyCode==8)return false;};
解除:document.onkeydown=null;
################################
document.onkeydown=function(){if(event.keyCode==8)return false;};
Event.observe(window, 'load', function() {
if($('captcha')){
Event.observe($('captcha'), 'blur', function() {
document.onkeydown=function(){if(event.keyCode==8)return false;};
});
Event.observe($('captcha'), 'focus', function() {
document.onkeydown=null;
});
}
});
#################################################
API参数规范:
1. json格式的参数
url = "http://chinaafc.miit.gov.cn/asopCmsSearch/searchIndex.jsp?"
params = ""
params += "params=#{CGI::escape("{\"goPage\":"+ curr_page +",\"orderBy\":[{\"orderBy\":\"pl\",\"reverse\":false}],\"pageSize\":"+ page_size + ",\"queryParam\":[{\"shortName\":\"allRecord\",\"value\":\"1\"}]}")}"
params += "&callback=jsonp1324610198689&_=1324611151148"
url + params
2.xml格式的参数
http://www.def.com/api.json?args=<il><i n='method_name' v='2.0'><uid>1</uid><city_id>1</city_id></i></il>
3.经过对称加密的hash
http://del.icio.us/api/peej/bookmarks/a211528fb5108cddaa4b0d3aeccdbdcf
h={:error=>0,:url=>"/images/abc.png"}
h.to_json #"{\"error\":0,\"url\":\"/images/abc.png\"}"
=====================================
hash = {
"death" => [4, ["death", 9] ],
"pain" => [5, ["pain", 7 ] ],
"wonder" => [1, ["wonder", 23] ],
"ignore" => [2, ["ignore", 24] ],
"evil" => [3, ["evil", 22] ]
}
hash.sort { |a,b| a[1][0] <=> b[1][0] }.map {|e| e[0] }
=====================================
table_name.classify.constantize
Model.table_name
Search.search_goodses args
search=Ultrasphinx::Search.new({:class_names=>"BizBaseGoodsIndex",
:query=>"\"苹果\"",
:page=>1,
:filters=>
{:status=>2,
:distance=>0..6000000,
:is_show=>1},
:match_mode=>:boolean,
:per_page=>15,
:location=>{"lat"=>31.2307, "long"=>121.473},
:sort_mode=>"extended",
:weights=>{"goods_name"=>9.0},
:sort_by=>"distance asc"} )
goods=search.run #正常
goods=search.run.results #出错,undefined method `total_pages' for #<Array:0xb6e47bd4>
<%= will_paginate goods, :class => 'page_num_box', :previous_label => "上一页", :next_label => "下一页" %>
nslookup 域名(不带http://)
nslookup sslk.bjjtgl.gov.cn
dig sslk.bjjtgl.gov.cn
IE和firefox
document.forms["form_name"]; // 根据name属性值
document.forms[0]; // 根据索引号
document.form_name; // 直接根据name值获得对象
支持IE:
forms.action="/jgjww/wzcx/wzcx_yzm.jsp?flag=1";
forms.submit();
支持firefox:
document.forms.action="/jgjww/wzcx/wzcx_yzm.jsp?flag=1";
document.forms.submit();
新邮箱收件服务器地址是pop3.etouchgroup.com.cn
新邮箱发件服务器地址是smtp.etouchgroup.com.cn
ajax分页控件
日期选择
Start = [0x4E00].pack("U")
End = [0x9FA5].pack("U")
#将汉字的连续串筛选出来,返回数组
page.scan(/[\+ #{Start}-#{End}]+/)
arr.split(/\|\||\|/)
1.搜索自动完成 (Search Autocomplete)
2.快速进入标签(Go To Label)
3.添加附件提醒工具 (Forgotten Attachment Detector)
4.邮件中YouTube预览 (YouTube Previews)
5.自定义标签颜色 (Custom Label Colors)
6.假日时光 (Vacation Dates)
============================
windows:
我的电脑 => 属性 => 打开远程连接
设置administrator密码:123
ubuntu:
打开ubuntu 终端服务客户端,输入项:
计算机:188.188.1.102
协议:RDPv5
用户名:administrator
密码:123
客户端主机名:u904
=> 连接
js汉字的正则表达式: /[\u4e00-\u9fa5]/
代码复制的时候 格式,中文符号 也会带过来,最好手动再敲一遍
alert(/^[\u4e00-\u9fa5]{1}[a-zA-Z0-9]{6}$/.test("沪A12345"))
<table> <tbody></tbody> <tbody></tbody> <tbody></tbody> </table>
载入页面就加载并执行js有两种方式,1:window.onload,2:将代码直接写在script中
部分加载
################################
<%products.each do |product|%>
<a href="/supermarket/super_market/index?tab_id=2#<%=product.goods_id%>">
<img src="<%=product.small_pic%>" alt="" />
</a>
<%end%>
#################################
###############################
<%products.each do |product|%>
<a name="<%=product.goods_id%>"></a>
<div><img src="<%=product.big_pic%>" alt="" /></div>
<%end%>
<script type="text/javascript">
function set_bulletin_show(is_show){
if(is_show){
$('supermarket_bulletin').style.display = 'block'
}else{
$('supermarket_bulletin').style.display = 'none'
}
}
var show = "<%=SystemConfig.supermarket_bulletin_is_show[1]%>";
<%if params[:tab_id].to_i==2%>
set_bulletin_show(show);
setTab(2,1);
<%end%>
</script>
##################################
###################################
/index.rhtml
<div id="topics">
<img src="/images/ajax-loading.gif" />
</div>
<script type="text/javascript">
Event.observe(window, 'load', function() {
<%=remote_function(:url => {:action =>"topic_list" } )%>;
});
document.observe("dom:loaded", function() {
var container = $(document.body)
if (container) {
var img = new Image
img.src = '/images/ajax-loading.gif'
function createSpinner() {
return new Element('img', {
src: img.src,
'class': 'spinner'
})
}
container.observe('click', function(e) {
var el = e.element()
if (el.match('.pagination.ajax a')) {
<%#*el.up('.pagination.ajax').insert(createSpinner())%>
ajax_load('seo-list');
new Ajax.Request(el.href, {
method: 'get'
})
e.stop()
}
})
}
});
</script>
/topics/_topic_show.rhtml
<%topics.each do |t| %>
<span><a href="<%=t.url%>"><%=t.url%></a></span>
<%end%>
<%= will_paginate topics, :class => 'pagination ajax', :page_links => false, :previous_label => '< ', :next_label => ' >',:params => {:action => "topic_list"}%>
rails_root/app/controllers/topics_controller.rb
class TopicsController < ApplicationController
def topic_list
@topics = Topic.paginate(:all, :page => args[:page]||1, :per_page => args[:per_page]||10, :order => "created_at",:conditions =>["deleted = 0"])
render :update do |page|
page.replace_html "topics", :partial=>'/topics/topic_show' ,:locals => { :topics => @topics }
end
end
end
===============================
def index
@points = Tools.get_points(params[:MemberID])["points_left"] rescue 0
render :text=>"<html><body><script type='text/javaScript' charset='utf-8'>parent.display_points('#{@points}');</script></body></html>" , :layout=>false
end
index:
<iframe name="point" id="point" src="http://domain1回调domain2/index" style="display: none;">
</iframe>
<script type="text/javascript">
function display_points(points){
$("score").innerHTML = points;
}
</script>
===============================
https://maps.googleapis.com/maps/api/place/search/json?
location=-33.8670522,151.1957362&radius=500&types=food&
name=harbour&sensor=false&key=YOUR_GOOGLE_API_KEY
这里后的 location ,我已经提供 lat 长值。
然后,我将有提供 radius 的500 meters.
我在寻找 Food 类别。您可能需要的任何其他业务类别。名称搜索是 harbour 。供应键 YOUR_GOOGLE_API_KEY 。
以下是一个请求示例,展示了在以澳大利亚悉尼的一点为中心,半径 500
米的范围内搜索名称中包含“harbour”一词且类型为“food”的“地方”。
https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=food&
name=harbour&sensor=false&key=AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI
提取证书的认证指纹 (MD5)
./keytool -list -keystore /home/pingan/debug.jks
===================================
js加密 => ruby解密
java加密 => ruby解密
Session hijack
发表评论
-
7点关于RESTful规范的API接口设计的想法
2016-11-28 14:29 991转:https://segmentfault.co ... -
RESTful API 设计指南
2016-11-28 14:17 462转:http://www.ruanyifeng.com/bl ... -
rails笔记
2016-11-28 13:55 701电子商务系统restful API问卷调查系统考试系统文档 ... -
重构臃肿 ActiveRecord 模型的 7 种方式
2016-11-19 16:29 608转:http://ruby-china.org/topics ... -
Rails系统重构:从单一复杂系统到多个小应用集群
2016-11-17 22:32 486转:http://www.infoq.com/cn/arti ... -
FileUtils 基本文件操作
2016-11-14 21:38 1323FileUtils.cd( dir, *options ) ... -
Custom dialog for data-confirm in Rails
2016-10-11 17:24 852Every Rails developers might ... -
常用ruby gem
2016-10-01 12:34 1178常见gems:Devise用于快 ... -
sphinx-0.99 + ultrasphinx
2016-07-27 20:20 516一、Installing Sphinx 1.Extra ... -
rails3 simple captcha
2015-06-03 16:06 678安装: ruby script/plugin insta ... -
测试ruby代码高亮
2015-05-27 16:33 574# encoding: utf-8 require 'd ... -
ror websites
2014-03-04 11:29 653http://railscasts.com/ ht ... -
mutex
2014-03-02 16:31 695http://ruby-doc.org/core-1.9. ... -
Twitter相关
2012-05-22 20:54 713Twitter没有计划放弃ruby on rails,而且早就 ... -
安装RMagick
2012-05-05 02:57 1156download from http://rubygems.o ... -
rails mechanism
2012-03-09 18:13 784PHP/Python/Ruby的运行机制有一个本质区别:P ... -
ruby类库
2012-03-09 10:54 15731.require 'cgi' def self.esc ... -
rails开源项目
2012-01-13 11:48 2352Ruby on Rails 是一个 Web 应用程序框架, ... -
识别验证码
2011-11-18 17:20 1148用imagemagick和tesseract-ocr破解简单 ... -
图片处理
2011-11-18 17:17 2527ImageMagick 是一个用于 ...
相关推荐
不过这就需要你对vscode进行配置。... ... 二、安装完Git之后,如图配置好环境变量path路径的信息,一般会自动配置成功,配置完成后电脑就...三、要想在VS Code里面使用Git需要在编辑器内配置git.path 配置步骤:在编辑器的
├── code // 代码库 │ ├── demo // 代码演示demo │ └── utils 工具库 ├── document │ ├── encryptionAlgorithm // 加密算法 │ ├── frontEnd // 前端相关知识文档 │ ├── git // Git...
l_msg = '失败 status_CODE' && lv_i. RETURN. ENDIF. ``` #### 5. 获取并处理响应数据 当确认请求成功后,可以获取响应数据并进行处理。这部分代码展示了如何获取数据: ```abap lv_str = lo_...
l_msg = '失败 status_CODE' && lv_i. RETURN. ENDIF. lv_str = lo_http_client->response->get_data(); ``` 5. **保存文件**:最后,根据实际需求将响应数据保存到指定位置。 #### 异常处理与错误代码解析 ...
计算机二级公共基础知识模 拟试题及答案详解.pdf
内容概要:本文档详细介绍了语音发射机的设计与实现,涵盖了从硬件电路到具体元件的选择和连接方式。文档提供了详细的电路图,包括电源管理、信号处理、音频输入输出接口以及射频模块等关键部分。此外,还展示了各个引脚的功能定义及其与其他组件的连接关系,确保了系统的稳定性和高效性能。通过这份文档,读者可以全面了解语音发射机的工作原理和技术细节。 适合人群:对电子工程感兴趣的初学者、从事嵌入式系统开发的技术人员以及需要深入了解语音发射机制的专业人士。 使用场景及目标:适用于希望构建自己的语音发射设备的研究人员或爱好者,帮助他们掌握相关技术和实际操作技能。同时,也为教学机构提供了一个很好的案例研究材料。 其他说明:文档不仅限于理论讲解,还包括具体的实施步骤,使读者能够动手实践并验证所学知识。
内容概要:本文详细介绍了用易语言编写的单线程全功能注册机源码,涵盖了接码平台对接、滑块验证处理、IP代理管理以及料子导入等多个核心功能。文章首先展示了主框架的初始化配置和事件驱动逻辑,随后深入探讨了接码平台(如打码兔)的API调用及其返回数据的处理方法。对于滑块验证部分,作者分享了如何利用易语言的绘图功能模拟真实用户的操作轨迹,并提高了验证通过率。IP代理模块则实现了智能切换策略,确保代理的有效性和稳定性。此外,料子导入功能支持多种格式的数据解析和去重校验,防止脏数据污染。最后,文章提到了状态机设计用于控制注册流程的状态持久化。 适合人群:有一定编程基础,尤其是熟悉易语言的开发者和技术爱好者。 使用场景及目标:适用于希望深入了解易语言注册机开发的技术细节,掌握接码、滑块验证、IP代理等关键技术的应用场景。目标是帮助读者理解并优化现有注册机的功能,提高其稳定性和效率。 其他说明:文中提到的部分技术和实现方式可能存在一定的风险,请谨慎使用。同时,建议读者在合法合规的前提下进行相关开发和测试。
计算机绘图实用教程 第三章.pdf
计算机辅助设计—AutoCAD 2018中文版基础教程 各章CAD图纸及相关说明汇总.pdf
C++相关书籍,计算机相关书籍,linux相关及http等计算机学习、面试书籍。
计算机二级mysql数据库程序设计练习题(一).pdf
计算机发展史.pdf
计算机二级课件.pdf
计算机概论第三讲:计算机组成.pdf
内容概要:本文档由中国移动通信集团终端有限公司、北京邮电大学、中国信息通信研究院和中国通信学会共同发布,旨在探讨端侧算力网络(TCAN)的概念、架构、关键技术及其应用场景。文中详细分析了终端的发展现状、基本特征和发展趋势,阐述了端侧算力网络的定义、体系架构、功能架构及其主要特征。端侧算力网络通过整合海量泛在异构终端的算力资源,实现分布式多级端侧算力资源的高效利用,提升网络整体资源利用率和服务质量。关键技术涵盖层次化端算力感知图模型、资源虚拟化、数据压缩、多粒度多层次算力调度、现场级AI推理和算力定价机制。此外,还探讨了端侧算力网络在智能家居、智能医疗、车联网、智慧教育和智慧农业等领域的潜在应用场景。 适合人群:从事通信网络、物联网、边缘计算等领域研究和开发的专业人士,以及对6G网络和端侧算力网络感兴趣的学者和从业者。 使用场景及目标:适用于希望深入了解端侧算力网络技术原理、架构设计和应用场景的读者。目标是帮助读者掌握端侧算力网络的核心技术,理解其在不同行业的应用潜力,推动端侧算力网络技术的商业化和产业化。 其他说明:本文档不仅提供了端侧算力网络的技术细节,还对其隐私与安全进行了深入探讨
学习java的心得体会.docx
计算机二级考试(南开100题齐全).pdf
内容概要:本文详细介绍了计算机二级C语言考试的内容和备考方法。首先概述了计算机二级考试的意义及其在计算机技能认证中的重要性,重点讲解了C语言的基础语法,包括程序结构、数据类型、运算符和表达式等。接着深入探讨了进阶知识,如函数、数组、指针、结构体和共用体的应用。最后分享了针对选择题、填空题和编程题的具体解题技巧,强调了复习方法和实战演练的重要性。 适合人群:准备参加计算机二级C语言考试的学生和技术爱好者。 使用场景及目标:①帮助考生系统地掌握C语言的核心知识点;②提供有效的解题策略,提高应试能力;③指导考生制定合理的复习计划,增强实战经验。 其他说明:本文不仅涵盖了理论知识,还提供了大量实例代码和详细的解释,有助于读者更好地理解和应用所学内容。此外,文中提到的解题技巧和复习建议对实际编程也有很大帮助。
论文格式及要求.doc
内容概要:本文详细介绍了如何使用三菱FX3U PLC及其485BD通信板与四台台达VFD-M系列变频器进行通信的设置与应用。主要内容涵盖硬件连接注意事项、通信参数配置、RS指令的应用、CRC校验算法的实现以及频率给定和状态读取的具体方法。文中提供了多个实用的编程示例,展示了如何通过梯形图和结构化文本编写通信程序,并讨论了常见的调试技巧和优化建议。此外,还提到了系统的扩展性和稳定性措施,如增加温度传感器通信功能和应对电磁干扰的方法。 适合人群:从事工业自动化领域的工程师和技术人员,尤其是那些熟悉三菱PLC和台达变频器的使用者。 使用场景及目标:适用于需要实现多台变频器联动控制的工业应用场景,旨在提高生产效率和系统可靠性。通过学习本文,读者可以掌握如何构建稳定的RS485通信网络,确保变频器之间的高效协同工作。 其他说明:本文不仅提供了详细的理论指导,还包括了许多来自实际项目的经验教训,帮助读者避免常见错误并提升编程技能。