首先在新浪微博的“微博小工具”内找到“微博秀”。然后根据自己的需要设置好样式和大小。
从下面的
单位招生项目,需要向MySQL灌入一些数据测试。因为原始数据都是DBF文件,就是foxpro数据库。
下面是用ruby代码实现的导入功能。
- require 'rubygems'
- require 'dbf'
- require 'mysql2'
- require 'iconv'
- @the_year="2011"
- @start_time=Time.now
- @major_list=[]
- client = Mysql2::Client.new(:host => "localhost", :username => "root",:password=>"dxzddp",:database=>"enroll")#创建数据库连接
- results = client.query("SELECT major_id FROM major WHERE the_year='#{@the_year}'", :as => :array)
- results.each do |row|
- @major_list.push(row[0])
- end
- p @major_list
- table = DBF::Table.new("d:/ss.dbf")
- table.each do |record|
- @sfzh=record.sfzh
- @name=Iconv.iconv("utf-8", "gb18030", record.xm)
- @sfzh=record.sfzh
- @ksh=record.ksh
- @major=@major_list.choice
- @major2=@major_list.choice
- @major2=@major_list.choice while @major2==@major
- @to_student_info="insert into student_info (student_no,access_pwd,the_year) VALUES ('#{@sfzh}','e10adc3949ba59abbe56e057f20f883e','#{@the_year}')"
- @to_candidate="insert into candidate (candidate_name,id_card_no,candidate_no,state,has_submitted,the_year) VALUES ('#{@name}','#{@sfzh}','#{@ksh}','A','Y','#{@the_year}')"
- @to_candidate_ideal="insert into candidate_ideal (candidate_id,first_major,second_major,allow_adjustment,is_living_in_college) VALUES (last_insert_id(),'#{@major}','#{@major2}','Y','Y')"
- @to_candidate_score="insert into candidate_score (candidate_id) VALUES (last_insert_id())"
- @to_contact_info="insert into contact_info (candidate_id) VALUES (last_insert_id())"
- @to_school_info="insert into school_info (candidate_id) VALUES (last_insert_id())"
- begin
- client.query(@to_student_info)
- client.query(@to_candidate)
- client.query(@to_candidate_ideal)
- client.query(@to_candidate_score)
- client.query(@to_contact_info)
- client.query(@to_school_info)
- rescue Mysql2::Error=>e
- puts e.to_s
- end
- end
- client=nil if client
- p Time.now-@start_time
根据国务院文件,5.19-5.21为全国哀悼日,在此期间,全国和各驻外机构下半旗志哀,停止公共娱乐活动,外交部和我国驻外使领馆设立吊唁簿。5月19日14时28分起,全国人民默哀3分钟,届时汽车、火车、舰船鸣笛,防空警报鸣响。 Admin5与很多草根网站都将整站换成素装。并建议中国所有站点更换为素装。
为方便站点哀悼,特提供css滤镜代码,以表哀悼。以下为全站CSS代码。
- html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
使用方法:这段代码可以变网页为黑白,将代码加到CSS最顶端就可以实现素装。建议全国站长动起来。为在地震中遇难的同胞哀悼。
本文参考官方http://www.playframework.org/documentation/1.0/firstapp教程,基本上是翻译
在安装完playframework框架后,我们就可以编写一个helloworld程序来看看playframework框架是如何工作的了。
我是在C:盘的当前用户目录下,建立了一个playframework目录。在命令窗口,进入这个目录
在c:usersbaboplayframework目录下输入下面命令,创建项目
- play new helloworld
然后play框架会提示你输入程序的全名称,这里就输入helloworld即可
play new helloworld会在当前目录下,创建一个helloworld目录,用来保存项目的全部文件。
下面运行我们新创建的项目,进入项目的目录helloworld,输入play run
刚开始使用的bo-blog的时候也不知道如何加入google广告条,经过这几天的咕哝,现在已经成功在右边和下面加入。方法记录如下
右侧边栏加入google广告
进入后台管理->常规管理->模块配置
点击左侧的新建/编辑项目 如图






