上一页 1 ··· 8 9 10 11 12 13 14 下一页
摘要: 隐藏html的标签 我的虚拟网络 > > > > 阅读全文
posted @ 2014-09-15 22:52 juandx 阅读(2517) 评论(0) 推荐(0) 编辑
摘要: SSH分客户端openssh-client和openssh-server如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-get install openssh-client),如果要使本机开放SSH服务就需要安装openss... 阅读全文
posted @ 2014-09-14 20:26 juandx 阅读(1095) 评论(0) 推荐(0) 编辑
摘要: 碰到需要调用操作系统shell命令的时候,Ruby为我们提供了六种完成任务的方法:1.Exec方法:Kernel#exec方法通过调用指定的命令取代当前进程: 例子: $ irb >> exec 'echo "hello $HOSTNAME"' hello nate.local $值得注意的是,ex... 阅读全文
posted @ 2014-09-10 23:18 juandx 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 一篇看到的讲解得不错的文章 http://blog.csdn.net/clskkk2222/article/details/6735365这里还有一些例子:Rake DocumentationRails Rake TutorialUsing the Rake Building Language===... 阅读全文
posted @ 2014-09-10 22:12 juandx 阅读(1431) 评论(0) 推荐(0) 编辑
摘要: 在render中,即使有:action,那么也仅仅是取对应的view中的模板(html.erb)而已,所以这里即使浏览器中的url是/orders/xcreate,但是显示的界面是/app/views/orders/xshow的代码 def xcreate flash.now[:notice... 阅读全文
posted @ 2014-09-10 15:35 juandx 阅读(559) 评论(0) 推荐(0) 编辑
摘要: link_to和其对应要跳转的的url,用path和直接路由方法看看link_to "alert(1)"} %> 在rake routes中看到,定义好的路由是:C:\Users\Administrator\Desktop\lianxizhong\lianxi1_form_f... 阅读全文
posted @ 2014-09-09 17:32 juandx 阅读(1471) 评论(0) 推荐(0) 编辑
摘要: 原创,转载请注明http://www.cnblogs.com/juandx/p/3963023.htmlrails中path、url路径解析,routes信息,form_for剖析,link_to示例1、首先要了解routes中resources的member、collection、new的关系 =... 阅读全文
posted @ 2014-09-09 17:11 juandx 阅读(3410) 评论(0) 推荐(0) 编辑
摘要: http://rubyer.me/blog/583/Routes中:new, :collection和:member的区别RESTful风格的路由动词默认有7个(分别为:index, show, create, new, edit, update, destroy)。有时我们需要自定义路由,这时就要... 阅读全文
posted @ 2014-09-09 15:06 juandx 阅读(708) 评论(0) 推荐(0) 编辑
摘要: D3js技术文档概述 D3 allows you to bind arbitrary data to a Document Object Model (DOM), and then apply data-driven transformations to the document. For exam... 阅读全文
posted @ 2014-09-06 22:34 juandx 阅读(20587) 评论(14) 推荐(0) 编辑
摘要: d3js拓扑关系特效可视化展现在上一篇d3js文档http://www.cnblogs.com/juandx/p/3959900.html中讲了简单的d3js方法和效果,现在我做一个完整的演示,使用d3js来展现动态可视化的网络拓扑效果图,希望对大家有所帮助。 D3 Page Templa... 阅读全文
posted @ 2014-09-06 22:32 juandx 阅读(21239) 评论(0) 推荐(0) 编辑
摘要: 注意在代码中用/表示路径。。。windows中file才是\1、 x="0" y="0" height="30px" width="30px"/> (1)在html中科院直接用嵌入式的方式获得rails中的图片。比如这里的图片放在\app\assets\images\vnet\virtual_sw... 阅读全文
posted @ 2014-09-06 21:55 juandx 阅读(818) 评论(0) 推荐(0) 编辑
摘要: 用来写c++的http://www.codeblocks.org/downloads/26#windows 选择codeblocks-13.12mingw-setup.exe自带gnu gcc compiler安装后设置gcc compilersettings -> compiler -> 在顶上的... 阅读全文
posted @ 2014-09-06 15:55 juandx 阅读(233) 评论(0) 推荐(0) 编辑
摘要: arr = [1,2,3]1) arr2 = arr.each{|element| element = element * 2} #arr与arr2仍然都等于[1,2,3] each返回原数组 遍历内对元素的更改不会保存2) arr2 = arr.map{|element| element = el... 阅读全文
posted @ 2014-09-04 23:40 juandx 阅读(352) 评论(0) 推荐(0) 编辑
摘要: #虚拟网络拓扑的json数据 def topodata #@vnic = Vnic.all #flash.now[:notice] = 'Message sent!' #flash.now[:alert] = 'Message sent!' simple_json = { nodes:... 阅读全文
posted @ 2014-09-04 15:46 juandx 阅读(928) 评论(0) 推荐(0) 编辑
摘要: tASSOC means the => operator 阅读全文
posted @ 2014-09-04 12:19 juandx 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 实现json、做出提示框1、在controller中使用flash.now[:alert] = "str"方法来做printdef topodata #@vnic = Vnic.all #flash.now[:notice] = 'Message sent!' #flash.now[:aler... 阅读全文
posted @ 2014-09-04 00:25 juandx 阅读(453) 评论(0) 推荐(0) 编辑
摘要: class SwitchesController [:index, :show] def index end def show end #存储拓扑 def topo @vts = VmToSwitch.all @sts = SwitchToSwitch.all @st... 阅读全文
posted @ 2014-08-07 02:44 juandx 阅读(451) 评论(0) 推荐(0) 编辑
摘要: Click hereOr hereOr even here 阅读全文
posted @ 2014-08-06 01:05 juandx 阅读(5894) 评论(0) 推荐(0) 编辑
摘要: rails nameerror uninitialized constant classwill occur if your rails console is not loaded with configuration of the class file containing method bein... 阅读全文
posted @ 2014-08-05 22:24 juandx 阅读(770) 评论(0) 推荐(0) 编辑
摘要: 之前先在initializers 文件夹下建立了一个task.rb ,rails服务启动的时候执行,本地没问题,可是服务器上启动了3个进程,会执行3遍,解决方法是 把task.rb 放到 script/文件夹下,然后在项目根目录执行 ruby script/task.rb production &。... 阅读全文
posted @ 2014-08-05 21:53 juandx 阅读(370) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 下一页