变量引用是变量的别名,常量引用要加const,引用与被引用的东西是同一样。#include #include #include #include #include // using declarations states our intent to use these names fro...
                            
                            
                                分类:
编程语言   时间:
2014-08-15 22:24:09   
                                阅读次数:
294
                             
                    
                        
                            
                            
                                1:命名空间2:C与C++字符串的区别和基本操作3:枚举类型命名空间#include #include #include #include #include // using declarations states our intent to use these names from t...
                            
                            
                                分类:
编程语言   时间:
2014-08-15 17:44:19   
                                阅读次数:
312
                             
                    
                        
                            
                            
                                BicoloringIn 1976 the ``Four Color Map Theorem" was proven with the assistance of a computer. This theorem states that every map can be colored using....
                            
                            
                                分类:
其他好文   时间:
2014-08-15 14:23:23   
                                阅读次数:
195
                             
                    
                        
                            
                            
                                现在终于开始学习salt的api了,有些小激动啊,我们执行命令的时候,后台到底是如何处理的,发生什么了事情,我对着一切有着强烈的好奇心埃这些是saltstack命令对应的api:salt		--->salt.client.LocalClient	
salt-cp	--->salt.cli.cp.SaltCP			
salt-key	--->salt.key..
                            
                            
                         
                    
                        
                            
                            
                                遇到这个问题,只需要在eclipse中的Project选项菜单中选择clean,选中当前的项目。clean之后就不会报错了。如图:Clean will discard all build problems and built states。The projects will be rebuilt f...
                            
                            
                                分类:
移动开发   时间:
2014-08-14 10:28:58   
                                阅读次数:
374
                             
                    
                        
                            
                            
                                Salt和PuppetChef一样可以让你同时在多台服务器上执行命令也包括安装和配置软件。Salt有两个主要的功能:配置管理和远程执行。(我个人很喜欢的一个功能)salt也分为Salt-master(类似于puppet的master)和salt-minion(client)本文主机:centos6.5x64ip:192.168.28.133本机充..
                            
                            
                                分类:
其他好文   时间:
2014-08-14 04:03:18   
                                阅读次数:
377
                             
                    
                        
                            
                            
                                runners是由salt-run命令调用的,一般我用的到就是jobs和manage模块。源代码是在./site-packages/salt/runners/下的。当然我们可以自定义runners。先谈谈jobs模块。包含active、lookup_jid、list_job、list_jobs、print_job五种方法。salt-runjobs.active->返回正在执行状态..
                            
                            
                                分类:
其他好文   时间:
2014-08-12 17:43:25   
                                阅读次数:
325
                             
                    
                        
                            
                            
                                #salt ?‘*‘ ?state.sls ? httpd 这个命令会先在目录/srv/salt下找httpd.sls(yml语法格式编写的)文件,若:有就安装文件内容执行,若没有的话就继续找/srv/salt/httpd目录下init.sls,找到了安装文件内容执行,没...
                            
                            
                                分类:
其他好文   时间:
2014-08-08 13:00:46   
                                阅读次数:
288
                             
                    
                        
                            
                            
                                apache:
??pkg:
????-?installed
??service:
????-?running
????-?watch:
??????-?pkg:?apache
??????-?file:?/etc/httpd/conf/httpd.conf
??????-?user:?apache
??...
                            
                            
                                分类:
其他好文   时间:
2014-08-06 19:34:42   
                                阅读次数:
285
                             
                    
                        
                            
                            
                                本来不想打算写安装ruby的,但看几个puppet的群里有人对安装ruby比较茫然,所以这里简单介绍一下如何安装ruby。ps:话说现在也就gitlab、capistrano、puppet等软件使用ruby,最新2010年的软件好的都是python了,比如ansible、salt等。下面是安装ruby的信息:ruby_version:1.9.3..
                            
                            
                                分类:
其他好文   时间:
2014-08-05 03:10:39   
                                阅读次数:
400