第36个标记 » 2007 » July

     喜马拉雅的天空

存档: July, 2007

BB的Microsoft Visual Studio插件到货了

在一个月前的一文章2个BlackBerry新开发用品 中介绍了即将发布的Microsoft Visual Studio的plugin,目的就是为了更好的整合企业服务.当时该插件还没有提供下载,可能是正在开发中.不过令人高兴的是该插件已经提供下载.你可以到去http://na.blackberry.com/eng/developers/downloads/mvsplugin.jsp下载.该插件够大的,居然有200多M,这帮人也是够狠的,看来我的硬盘又要整理了.先试用一把,如果可能的话,贴出使用心得.非常期待它会给我们带来惊喜.注意,目前对于中国大陆用户不支持下载. 当你提交你的信息之后,它会提示IP的国家不支持.这是BlackBerry下载的惯例,早已习以为常了.据说连欧洲的同仁们也不可以下载,同病相怜.至于如何下载,自己想办法吧.哈哈!

继续阅读 →

  

Confach发表于 July 31, 2007 5:57 pm | 留言(2) |Blackberry 

笔记零碎

公司的专业化 人才来源于贫困地区学校,忠诚度,崇尚名校的做法有待商榷 忍耐力特别强的人 四季花园,看起来是万科独爱的名字 1234 招商银行,平安保险,中集集团,华侨城,远大空调,蒙牛,联想,万象 当王石登上珠峰时,居然有个71岁的日本人,足以证明日本这个民族的上升力 当在图书馆的取水处看见一位七十多岁的老爷爷在换桶装水时,周围的年轻小伙子和MM们居然等着这位先生换,这是一种极其不道德的行为.最后还是我帮着换了.(这是真实发生的) 还是竞争力,技术,能力等 惺惺相惜, 登山是希望挑战自己,希望给自己一个很好的身体,给自己的生活一个平衡 一笑泯恩仇,哈哈 消费时代的产物,互联网,短信,多媒体和互动,造成了一个客观上的互动平台,社会现象 品牌的一大作用就是使你的事业具备一种防御能力,从而让你在市场沉浮,技术盛衰以及竞争对手的残酷的商场中始终立于不败之地.

继续阅读 →

  

Confach发表于 July 28, 2007 2:53 pm | 留言 |闲情逸致 

Rails关联Model的验证

这也恐怕是第一篇关于Rails的纯粹的技术文章.这篇文章很简单,就是Rails的验证问题. 问题 假如有一个User model,而这个User又带有一个Profile model. User和Profile的代码分别为: User 代码 class User < ActiveRecord::Base     has_one :profile     validates_presence_of :password, n => :create,:message =>"Password can’t be empty!"     validates_presence_of :password_confirmation, n => :create,:message =>"Please re-type password!"     validates_format_of :email, n => :create,:message => "Email is invalid!",:with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i     validates_uniqueness_of :email,  n => :create     validates_length_of :password,:password_confirmation, :minimum => 4,:message=>"Password must be 4-40 characters or digits! "   end   User包含email,以及密码 Profile代码 class Profile < ActiveRecord::Base     belongs_to :user     validates_presence_of :firstname,:message=>"First name is required"     validates_presence_of :lastname,:message=>"Last name is required"   end   Profile仅有first name和last name. User对应的Controller是UserController,而Profile没有对应的Controller,所有操作都在UserController里完成,当然包括editprofile,以及updateprofile. ruby 代码   class UsersController < ApplicationController         def editprofile       current_user.profile    end      def updateprofile       if current_user.profile.nil?         @profile = Profile.new(params[:profile])         @profile.user = current_user         begin          @profile.save!         rescue           redirect_to :back           return         end       else         @profile = current_user.profile         unless @profile.update_attributes(params[:profile])           redirect_to :back           return         end   [...]

继续阅读 →

  

Confach发表于 July 27, 2007 12:52 pm | 留言 |一技之长 

下一页