`
yanzilee9292
  • 浏览: 529419 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论
文章列表
the simplest way is to call by windows command: system '"%ProgramFiles%\Windows Media Player\wmplayer.exe" C:\Users\lee\Downloads\爱情闯进门.mp3'  

成都市租房合同

见附件  
在rails3的项目里,运行thin start的时候报错: >> Using rack adapter >> Thin web server (v1.4.1 codename Chromeo) >> Maximum connections set to 1024 >> Listening on 0.0.0.0:3000, CTRL+C to stop C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.4.1/lib/thin/backends/tcp_server.rb:16:in `conne ...
出现这个错误的原因是由于coffee没有编译成普通的css和js文件,解决问题有两种方法。   1 修改配置文件,让production环境也可以编译 # config/environments/production.rb ... config.assets.compile = true ...   2 运行之前,在命令行手动编译一次 bundle exec rake assets:precompile  
获取代码精确的执行时间: using System.Diagnostics;//引用相关的命名空间 Stopwatch st=new Stopwatch ();//实例化类 st. Start();//开始计时 //需要统计时间的代码段 st.Stop();//终止计时 Response.Write(st.ElapsedMilliseconds.ToString());//输出时间。输出运行时间:Elapsed,带毫秒的时间:ElapsedMilliseconds //Response.Write是asp .net中使用的输出  
rrr "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\svcutil.exe" http://test.com/test.svc?wsdl  

C#的map

    博客分类:
  • C#
C#没有map这个类,相似功能的是Dictionary。 Dictionary<String, String> d = new Dictionary<String, String>(); d.Add("a","aaa"); d["b"]="bbb"; Console.WriteLine(d["a"]); Console.WriteLine(d["b"]);    
 运行一下就知道时间cost在哪了。   public static void test() { DateTime t1 = DateTime.Now; PerformanceCounter cpuCounter = new PerformanceCounter(); cpuCounter.CategoryName = "Processor"; cpuCounter.CounterName = "% Processor Time"; cpuCounter.Instanc ...
假设从server返回的response xml字符串为: <?xml version="1.0" encoding="UTF-8"?> <users> <user> <col name="personid">人员编号</col> <col name="idcard">身份证号</col> <col name="card_n">卡号</col ...

ruby静态方法hook

    博客分类:
  • ruby
 静态方法和实例方法的实现方式不一样,代码如下:   class M class << self def save(tt,a) #puts "save #{tt} #{t3}" puts "save #{tt} #{a}" end # def reload(flag) # puts "reloaded" # end def __create_rule_before( method, comment = '', & ...
1 简述 通过研究selenium-webdriver的源码,笔者发现其实webdriver的实现原理并不高深莫测无法揣度。在这里以webdriver ruby binding的firefox-webdriver实现为例,简单介绍一下webdriver的工作原理。 当测试脚本启动firefox的时候,selenium-webdriver 会首先在新线程中启动firefox浏览器。如果测试脚本指定了firefox的profile,那么就以该profile启动,否则的话就新启1个profile,并启动firefox; firefox一般是以-no-remote的方法启动,启动后s ...
1 在项目的目录下创建一个XML文件,命名为App.config:   <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="sky" value="lby"/> </appSettings> </configuration>   2 在项目里添加引用: 选择项目->右键->添加 ...

Ruby的优雅(C#版)

    博客分类:
  • C#
相比于C#,ruby显得灰常的优雅。   设计上的: 1 不需要引用必须依赖的包 C#的using System,在ruby的世界里是不存在的,没有必要反复强调这些规则。   2 非核心依赖包不需要重复引用 如果有2个类A和B,都依赖于C,C#必须在A ...
不太明白visual studio的设计者是怎么想的,为何非要把所有功能都定义成有快捷键。按2次确实可以满足需求了,但很多常用功能都得按2次了~~ 和eclipse对比来看,visual studio的快捷键就是一个S+B。     1 格式化代码 Ctrl+E,再按Ctrl+D 格式化全部代码 Ctrl+E,再按Ctrl+F 格式化选中的代码   2 运行调试 F5调试 Ctrl+F5运行   3 注释 Ctrl+K,再按Ctrl+C 格式化全部代码 Ctrl+K,再按Ctrl+U 格式化选中的代码   4 删除行 Shift+Delete
Global site tag (gtag.js) - Google Analytics