Hbase单机安装配置

Hbase单机安装配置

http://blogxinxiucan.sh1.newtouch.com/2017/07/27/Hbase单机安装配置/

准备再把css三好好回想一下的时候,看到有CSSDesk实时期码效果展现的网址,就想去模仿一下,看看它的代码。。。那里就记录一下,下次想找还足以找到

下载Hbase

Hbase官网下载地址

http://www.apache.org/dyn/closer.cgi/hbase/

CSSDesk网站: http://cssdesk.com/

解压

tar -zvxf hbase-0.94.27.tar.gz
cd hbase-0.94.27

图片 1


配置

cd conf/
vi hbase-site.xml

<configuration>

  <property>
    <name>hbase.rootdir</name>
    <value>file:///usr/local/webserver/hbase-0.94.27/logs/site</value>
  </property>
  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>


</configuration>

用到的东西

启动hbase

./bin/start-hbase.sh

图片 2

  1. ACE jsPlugin

  2. Jquery UI Resi

查看Hbase

浏览器访问:http://localhost:60010/

图片 3

插件的利用形式

操作Hbase Shell

./bin/hbase shell

图片 4

图片 5

http://www.cnblogs.com/wangxinsheng/articles/3809048.html


效果图:

图片 6


代码:

html

  1 <!DOCTYPE html>
  2 <html>
  3 <head>
  4     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5     <title>TestPlantform @ [TP] by WangXinsheng</title>
  6     <meta content="a Test Plantform which is used to Test CSS and JS and HTML" name="description">
  7     <script charset="utf-8" src="js/jquery-1.11.1.min.js" type="text/javascript"></script>
  8     <script src="js/jquery-ui-1.10.4.min.js"></script>
  9     <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.4.custom.min.css">
 10     <link rel="stylesheet" type="text/css" href="css/style.css" />
 11     <style>
 12     </style>
 13 </head>
 14 <body>
 15     <!--headerBar-->
 16     <header>
 17         <h1>
 18             TEST Plantform <em>ß</em>
 19         </h1>
 20         <nav>
 21             <ul>
 22                 <li class="reset"><a href="#" class="reset-link">Reset</a> Resetthe
 23                     code to the default </li>
 24                 <li class="downloader"><a href="#" id="download">Download</a> 
 25                     Download this code as a file </li>
 26             </ul>
 27         </nav>
 28     </header>
 29     <div class="shadow">
 30     </div>
 31     <!--DeskTop-->
 32     <div id="desk">
 33     </div>
 34     <!--html and css box-->
 35     <section id="controls">
 36         <a class="toggleLink" href="#">« </a>
 37         <div id="htmlbox">
 38             <div class="title-bar">
 39                 <h3>
 40                     HTML
 41                 </h3>
 42             </div>
 43             <div class="content" id="html">
 44                 <!--<div id="html">
 45                 </div>-->
 46             </div>
 47         </div>
 48         <div id="cssbox" class="ui-resizable" style="position: absolute; left: 0px; width: 100%; height: auto;">
 49             <div class="title-bar">
 50                 <h3>
 51                     CSS
 52                 </h3>
 53             </div>
 54             <div class="content" id="css">
 55                 <!--<div id="css">
 56                 </div>-->
 57             </div>
 58         </div>
 59     </section>
 60     <footer>
 61     </footer>
 62     
 63     <!-- load ace -->
 64     <script src="js/ace/ace.js"></script>
 65     <!-- load ace language tools -->
 66     <script src="js/ace/ext-language_tools.js"></script>
 67 
 68     <script>
 69     var defaults = {
 70         html: "<div>Hello World!</div>",
 71         css: "body {\n  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n  padding: 100px;\n  font-size: 13px;\n}\n\ndiv {\n  background: #fff;\n  margin: 0 auto;\n  width: 200px;\n  padding: 100px;\n  text-align: center;\n  /* border-radius */\n  -webkit-border-radius: 5px;\n  -moz-border-radius: 5px;\n  border-radius: 5px;\n  /* box-shadow */\n  -webkit-box-shadow: rgba(0,0,0,0.2) 0px 1px 3px;\n  -moz-box-shadow: rgba(0,0,0,0.2) 0px 1px 3px;\n  box-shadow: rgba(0,0,0,0.2) 0px 1px 3px;\n}"
 72     };
 73     var doc,$body, $head, $style;
 74     var htmlEditor,cssEditor;
 75     var oldAllH;
 76     var oldHtmlboxH;
 77     var oldCssboxH;
 78     $(function(){
 79         $frame = $('<iframe id="frame">');
 80         $frame.addClass("blueprint");
 81         $("#desk").html($frame);
 82         setTimeout(function() {
 83             doc = $frame[0].contentWindow.document;
 84             $body = $("body", doc);
 85             $head = $("head", doc);
 86             $style = $("<style type='text/css'/>");
 87             $style[0].type = "text/css";
 88             $head.append($style);
 89             push();
 90         },
 91         1);
 92 
 93         enableHighlighting();
 94 
 95         oldAllH = $("#controls").height();
 96         $("#cssbox,#htmlbox").height($("#controls").height()/2);
 97         oldHtmlboxH = $("#htmlbox").height();
 98         oldCssboxH = $("#cssbox").height();
 99         $("#cssbox .content").css("height", $("#cssbox").height() - 22);
100         $("#htmlbox .content").css("height", $("#htmlbox").height() - 22);
101         
102         htmlEditor.resize();
103         cssEditor.resize();
104 
105         $("#cssbox").css("top", $("#htmlbox").height() + "px");
106         $("#controls").resizable({
107             handles: "e",
108             resize: function(d, c) {
109                 $("#desk").css("left", c.size.width + "px");
110                 $("#controls").width(c.size.width);
111                 
112                 cssEditor.resize();
113                 htmlEditor.resize();
114             },
115             alsoResize: "#cssbox, #htmlbox"
116         });
117         $("#cssbox").resizable({
118             handles: "n",
119             resize: function(d, c) {
120                 $("#htmlbox").css("bottom", c.size.height + "px");
121                 $("#cssbox, #htmlbox").css("height", "auto");
122                 $("#cssbox .content").css("height", $("#cssbox").height() - 22);
123                 $("#htmlbox .content").css("height", $("#htmlbox").height() - 22);
124                 
125                 $("#cssbox").css("top", $("#htmlbox").height() + "px");
126                 $("#cssbox").css("height", c.size.height);
127                 
128                 htmlEditor.resize();
129                 cssEditor.resize();
130                 
131                 oldHtmlboxH = $("#htmlbox").height();
132                 oldCssboxH = $("#cssbox").height();
133             },
134             containment: "#controls",
135             maxHeight: $("#controls").height() - 20,
136             minHeight: 22
137         });
138         $(window).resize(function() {
139             var newHtmlboxH = $("#controls").height() * (oldHtmlboxH / oldAllH);
140             var newCssboxH = $("#controls").height() * (oldCssboxH / oldAllH);
141             var newAllH = $("#controls").height();
142             newHtmlboxH    = (newHtmlboxH<20?20:(newCssboxH<20?newAllH - 20:newHtmlboxH));
143             newCssboxH = (newHtmlboxH<20?newAllH - 20:(newCssboxH<20?20:newCssboxH));
144             $("#controls").css("top","33px");
145             $("#cssbox, #htmlbox").css("height", "auto");
146             $("#htmlbox").css("height", newHtmlboxH);
147             $("#cssbox").css("height", newCssboxH);
148             
149             //console.log("old",oldAllH,oldCssboxH,oldHtmlboxH);
150             //console.log("new",newAllH,newCssboxH,newHtmlboxH);
151             $("#htmlbox").css("bottom", newCssboxH + "px");
152             $("#cssbox").css("top", newHtmlboxH + "px");
153             $("#cssbox .content").css("height", $("#cssbox").height() - 22);
154             $("#htmlbox .content").css("height", $("#htmlbox").height() - 22);
155             
156             htmlEditor.resize();
157             cssEditor.resize();
158 
159             $( "#cssbox" ).resizable( "option", "maxHeight", $("#controls").height() - 20 );
160             oldAllH = $("#controls").height();
161             oldHtmlboxH = $("#htmlbox").height();
162             oldCssboxH = $("#cssbox").height();
163         });
164         $(".toggleLink").data("state", "open").click(function() {
165             if ($(this).data("state") == "open") {
166                 hideCode()
167             } else {
168                 showCode()
169             }
170             return false
171         });
172         $(".reset-link").click(function(e){
173             resetCode();
174         });
175     });
176     
177     function hideCode() {
178         var c = $("#controls");
179         var b = $("#desk");
180         var a = c.width();
181         c.animate({
182             left: "-" + a + "px"
183         },
184         "easeOutQuad",
185         function() {
186             $(".toggleLink").data("state", "closed").text("»").toggleClass("collapsed")
187         });
188         b.animate({
189             left: 0
190         },
191         "easeOutQuad")
192     }
193     function showCode() {
194         var c = $("#controls"),
195         b = $("#desk"),
196         a = c.width();
197         c.animate({
198             left: 0
199         },
200         "easeInQuad",
201         function() {
202             $(".toggleLink").data("state", "open").text("«").toggleClass("collapsed")
203         });
204         b.animate({
205             left: a + "px"
206         },
207         "easeInQuad")
208     }
209 
210     function push() {
211         /*html = highlight ? htmlEditor.getSession().getValue() : $("#html").val();
212         style = highlight ? cssEditor.getSession().getValue() : $("#css").val();*/
213         html = htmlEditor.getValue();
214         style = cssEditor.getValue();
215         $body.html(html);
216         addCss(style);
217     }
218     function addCss(a) {
219         if ($style[0].styleSheet) {
220             $style[0].styleSheet.cssText = a;
221         } else {
222             $style.html(a);
223         }
224     }
225     function enableHighlighting() {
226         /*$(".editor").each(function() {
227             var c = $(this).val(),
228             e = $(this).attr("id"),
229             d = $("<div class='highlighted-editor' id=" + e + "></div>");
230             d.text(c);
231             $(this).replaceWith(d)
232         });*/
233         htmlEditor = ace.edit("html");
234         htmlEditor.session.setMode("ace/mode/html");
235         htmlEditor.setTheme("ace/theme/tomorrow");
236         htmlEditor.setOptions({
237             enableBasicAutocompletion: true,
238             enableSnippets: true,
239             enableLiveAutocompletion: false
240         });
241         
242         cssEditor = ace.edit("css");
243         cssEditor.session.setMode("ace/mode/css");
244         cssEditor.setTheme("ace/theme/tomorrow");
245         cssEditor.setOptions({
246             enableBasicAutocompletion: true,
247             enableSnippets: true,
248             enableLiveAutocompletion: false
249         });
250 
251         resetCode();
252 
253         htmlEditor.on("change",function(e){
254             setTimeout(
255                 function(){
256                     if($("#html").find(".ace_error").length<=0)push();
257                 },500);
258         });
259         cssEditor.on("change",function(e){
260             setTimeout(
261                 function(){
262                     if($("css").find(".ace_error").length<=0)push();
263                 },500);
264         });
265     }
266     function resetCode() {
267         htmlEditor.getSession().setValue(defaults.html);
268         cssEditor.getSession().setValue(defaults.css);
269     }
270     </script>
271 </body>
272 </html>

CSDN下载地址:(可单机械运输转)

http://download.csdn.net/detail/wangxsh42/7552091

发表评论

电子邮件地址不会被公开。 必填项已用*标注