小编kee*_*imi的帖子

Chef无法运行,因为无法访问cookbooks文件夹

我正试图从这个框中使用Vagrant启动实例,然后开始我的厨师食谱.Vagrant文件:

Vagrant::Config.run do |config|
  config.vm.box = "sausy64"
  config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/20131113/saucy-server-cloudimg-amd64-vagrant-disk1.box"

  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "."
    chef.add_recipe "test"
  end
end
Run Code Online (Sandbox Code Playgroud)

跑完后vagrant up我得到:

[default] Importing base box 'sausy64'...
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This …
Run Code Online (Sandbox Code Playgroud)

ubuntu virtualbox chef-infra vagrant

6
推荐指数
1
解决办法
1010
查看次数

Nanoc编译时间长

我正在使用nanoc为我的项目生成文档。我已经创建了几个文件(〜50个)和布局,但是目前我正在处理一个文件。奇怪的是,它在不到一秒钟的时间内即可编译出一个文件,而不是花费超过20秒的时间来完成!

Loading site data…
Compiling site…
      update  [0.71s]  output/docs/js/getData/index.html

Site compiled in 22.96s.
Run Code Online (Sandbox Code Playgroud)

当我中止该过程之后:

      update  [0.71s]  output/docs/js/getData/index.html
Run Code Online (Sandbox Code Playgroud)

用CTRL + C行,并且nanoc view我的文件编译良好。您是否知道如何加快流程?nanoc在做什么20秒?

ruby erb nanoc

2
推荐指数
1
解决办法
309
查看次数

将指针指向两个指针的按位OR

我正在remove用C++ 实现二进制搜索树的方法.在其中一个案例中,我确信树node只有一个孩子:node->left或者node->right我需要修改它的父母指向那个孩子.正如我的一个前面提到的node->leftnode->rightNULL.这是一个片段:

} else { // One children
  if (node->parent->left == node) {
    node->parent->left = node->left | node->right;
    node->parent->left->parent = node->parent;
  } else {
    node->parent->right = node->left | node->right;
    node->parent->right->parent = node->parent;
  }
}
Run Code Online (Sandbox Code Playgroud)

不幸的是,编译器返回错误.我知道它可能不是优雅的但我只是好奇如何去做.

c c++ pointers

-3
推荐指数
1
解决办法
107
查看次数

标签 统计

c ×1

c++ ×1

chef-infra ×1

erb ×1

nanoc ×1

pointers ×1

ruby ×1

ubuntu ×1

vagrant ×1

virtualbox ×1