锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产成人一区二区三区,91天堂素人精品系列全集亚洲,亚洲国产成人乱码精品女人久久久不卡 http://m.tkk7.com/jacky9881/zh-cnSun, 11 May 2025 04:56:02 GMTSun, 11 May 2025 04:56:02 GMT60Backbone瀛︿範絎旇涓?/title><link>http://m.tkk7.com/jacky9881/archive/2016/04/04/429958.html</link><dc:creator>絎戠湅浜虹敓</dc:creator><author>絎戠湅浜虹敓</author><pubDate>Mon, 04 Apr 2016 09:40:00 GMT</pubDate><guid>http://m.tkk7.com/jacky9881/archive/2016/04/04/429958.html</guid><wfw:comment>http://m.tkk7.com/jacky9881/comments/429958.html</wfw:comment><comments>http://m.tkk7.com/jacky9881/archive/2016/04/04/429958.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/jacky9881/comments/commentRss/429958.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/jacky9881/services/trackbacks/429958.html</trackback:ping><description><![CDATA[榪欓儴鍒嗕粙緇嶅浣曞垎瑙嗗浘鏄劇ず鍓嶉潰璁茬殑琛ㄦ牸鍐呭錛孊ackbone涓鍥懼彲浠ュ祵濂楁樉紺猴紝渚嬪鍓嶉潰渚嬪瓙涓暣涓〉闈㈠彲浠ョ敤涓涓鍥炬潵娓叉煋錛宼able琛ㄦ牸鍙互鐢ㄤ竴涓鍥炬潵娓叉煋錛岃〃鏍間腑鐨勪竴琛屽彲浠ョ敤涓涓鍥炬潵娓叉煋錛岃繖鏍峰氨鐢ㄤ笁灞傝鍥撅紝鍙鍦ㄤ互鍓嶇殑渚嬪瓙涓婄◢浣滀慨鏀瑰氨鍙互瀹炵幇榪欐晥鏋溿? <div><br />   <div>棣栧厛瀹氫箟鏈閲屽眰鐨勮鍥撅紝琛ㄦ牸涓殑琛屻傞氳繃tagName鎴愬憳鍙橀噺鎸囧畾璇ヨ鍥懼搴旂殑html鍏冪礌錛宺ender鏂規硶涓寚瀹歵r鍏冪礌涓樉紺虹殑鍐呭銆傚綋鐒朵篃鍙互鎸囧畾鎴愬憳鍙橀噺className鐨勫鹼紝鏉ユ寚瀹歵r鍏冪礌鏄劇ず鐨勫紡鏍楓?/div> <div><br /> </div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->     var StudentView = Backbone.View.extend({<br />          <br />          tagName: 'tr',<br />          <br />          render: function() {<br />              $(this.el).html(_.map([<br />                  this.model.get('id'),<br />                 this.model.get('name'),<br />                 this.model.get('age')<br />              ],function(val, key){<br />                  return '<span style="color: #0000FF; "><</span><span style="color: #800000; ">td</span><span style="color: #0000FF; ">></span>' + val + '<span style="color: #0000FF; "></</span><span style="color: #800000; ">td</span><span style="color: #0000FF; ">></span>';<br />              }))<br />             <br />             return this;<br />          }<br />      })</div> </div> <div><br /> </div> <div>鍏舵鏄劇ず琛ㄦ牸鐨勮鍥俱?/div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->     var StudnetCollectionView = Backbone.View.extend({<br />          <br />          tagName: 'table',<br />          <br />          render: function() {<br />             $(this.el).empty();<br />             <br />               $(this.el).append($('<span style="color: #0000FF; "><</span><span style="color: #800000; ">tr</span><span style="color: #0000FF; ">></</span><span style="color: #800000; ">tr</span><span style="color: #0000FF; ">></span>')).html(_.map([<br />                   '瀛﹀彿','濮撳悕','騫撮緞'<br />               ],function(val, key){<br />                   return '<span style="color: #0000FF; "><</span><span style="color: #800000; ">th</span><span style="color: #0000FF; ">></span>' + val + '<span style="color: #0000FF; "></</span><span style="color: #800000; ">th</span><span style="color: #0000FF; ">></span>';<br />               }));<br />             <br />               $(this.el).append(_.map(this.collection.models,<br />                 function(model, key){<br />                       return new StudentView({<br />                           model: model<br />                       }).render().el;<br />               }));<br />             <br />             return this;<br />          }<br />      });</div> </div> <div><br /> </div> <div>鏈鍚庢樉紺烘暣涓〉闈㈢殑瑙嗗浘銆?/div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->     var StudnetPageView = Backbone.View.extend({<br />          render: function() {<br />              $(this.el).html(new StudnetCollectionView({<br />                  collection: this.collection<br />              }).render().el);<br />          }<br />      })</div> </div> <div><br /> </div> <div>鍚屾椂淇敼涓涓嬫樉紺洪儴鍒嗙殑浠g爜銆?/div> <div><br /> </div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->    var studentPageView = new StudnetPageView({<br />              collection: studentCollection,<br />              el: 'body'<br />          });<br />  <br />          studentPageView.render();</div> </div> <div><br /> </div> <div>鏁翠釜main.js鐨勪唬鐮佸涓嬶細</div> <div><br /> </div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->  (function($){<br />       $(document).ready(function(){<br />           <br />           var student1 = new Student({<br />               id: 10000,<br />               name: '鐜嬪皬浜?,<br />               age: 30<br />           });<br />           <br />          var student2 = new Student({<br />              id: 20000,<br />              name: '濮氭晱',<br />              age: 26<br />          });<br />          <br />          var student3 = new Student({<br />              id: 30000,<br />              name: '縐戞瘮',<br />              age: 24<br />          });<br />          <br />          var studentCollection = new StudentCollection([<br />              student1,<br />              student2,<br />              student3<br />          ]);<br />          <br />          var studentPageView = new StudnetPageView({<br />              collection: studentCollection,<br />              el: 'body'<br />          });<br />  <br />          studentPageView.render();<br />          <br />      });<br />      <br />      //set model<br />      var Student = Backbone.Model.extend({<br />          //set default values.<br />          defaults: {<br />              id: 0,<br />              name: '',<br />              age: 0<br />          }<br />      });<br />      <br />      var StudentCollection = Backbone.Collection.extend({<br />          model: Student<br />      });<br />      <br />      var StudentView = Backbone.View.extend({<br />          <br />          tagName: 'tr',<br />          <br />          render: function() {<br />              $(this.el).html(_.map([<br />                  this.model.get('id'),<br />                 this.model.get('name'),<br />                 this.model.get('age')<br />              ],function(val, key){<br />                  return '<span style="color: #0000FF; "><</span><span style="color: #800000; ">td</span><span style="color: #0000FF; ">></span>' + val + '<span style="color: #0000FF; "></</span><span style="color: #800000; ">td</span><span style="color: #0000FF; ">></span>';<br />              }))<br />             <br />             return this;<br />          }<br />      })<br /> <br />      //set view<br />      var StudnetCollectionView = Backbone.View.extend({<br />          <br />          tagName: 'table',<br />          <br />          render: function() {<br />             $(this.el).empty();<br />             <br />               $(this.el).append($('<span style="color: #0000FF; "><</span><span style="color: #800000; ">tr</span><span style="color: #0000FF; ">></</span><span style="color: #800000; ">tr</span><span style="color: #0000FF; ">></span>')).html(_.map([<br />                   '瀛﹀彿','濮撳悕','騫撮緞'<br />               ],function(val, key){<br />                   return '<span style="color: #0000FF; "><</span><span style="color: #800000; ">th</span><span style="color: #0000FF; ">></span>' + val + '<span style="color: #0000FF; "></</span><span style="color: #800000; ">th</span><span style="color: #0000FF; ">></span>';<br />               }));<br />             <br />               $(this.el).append(_.map(this.collection.models,<br />                 function(model, key){<br />                       return new StudentView({<br />                           model: model<br />                       }).render().el;<br />               }));<br />             <br />             return this;<br />          }<br />      });<br />      <br />      var StudnetPageView = Backbone.View.extend({<br />          render: function() {<br />              $(this.el).html(new StudnetCollectionView({<br />                  collection: this.collection<br />              }).render().el);<br />          }<br />      })<br />      <br />  })(jQuery);<br /> </div> </div> <div><br /> </div> </div><img src ="http://m.tkk7.com/jacky9881/aggbug/429958.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/jacky9881/" target="_blank">絎戠湅浜虹敓</a> 2016-04-04 17:40 <a href="http://m.tkk7.com/jacky9881/archive/2016/04/04/429958.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Backbone瀛︿範絎旇浜?/title><link>http://m.tkk7.com/jacky9881/archive/2016/04/02/429942.html</link><dc:creator>絎戠湅浜虹敓</dc:creator><author>絎戠湅浜虹敓</author><pubDate>Sat, 02 Apr 2016 04:06:00 GMT</pubDate><guid>http://m.tkk7.com/jacky9881/archive/2016/04/02/429942.html</guid><wfw:comment>http://m.tkk7.com/jacky9881/comments/429942.html</wfw:comment><comments>http://m.tkk7.com/jacky9881/archive/2016/04/02/429942.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/jacky9881/comments/commentRss/429942.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/jacky9881/services/trackbacks/429942.html</trackback:ping><description><![CDATA[@import url(http://m.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 鍦ㄥ涔犵瑪璁頒竴涓紝涓涓鍥炬覆鏌撲竴涓猄udent瀵硅薄錛屽鏋滃瓨鍦ㄥ涓猄tudent瀵硅薄鎬庝箞鍔烇紝 <div>鍦╦ava涓彲浠ラ氳繃ArrayList鏉ヤ繚瀛橈紝姣斿List<Student> students = new ArrayList<>();</div> <div>鍦˙ackbone涓紝涔熸湁綾諱技浜嶢rrayList鐨勫疄鐜幫紝鍙渶瑕佹柊寤轟竴涓被錛岀戶鎵緾ollection灝卞彲浠ヤ簡錛屽疄鐜頒唬鐮佸涓嬶細</div> <div>鎴愬憳鍙橀噺model鎸囧畾闆嗗悎涓瓨鏀懼璞$殑綾誨瀷錛岀被浼間簬java涓寖鍨嬨?/div> <div><br /> </div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080; ">1</span>     var StudentCollection = Backbone.Collection.extend({<br /> <span style="color: #008080; ">2</span>         model: Student<br /> <span style="color: #008080; ">3</span>     });</div> </div> <div><br /> </div> <div>瀵瑰涔犵瑪璁頒竴縐嶄唬鐮佺◢鍔犱慨鏀癸紝淇敼浠g爜濡備笅錛?/div> <div>鏂板緩涓変釜Student瀵硅薄錛屾妸榪欎笁涓璞″姞鍏?span style="font-size: 13px; background-color: #eeeeee;">studentCollection瀵硅薄涓?/span></div> <div><span style="font-size: 13px; background-color: #eeeeee;"><br /> </span></div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080; "> 1</span>         var student1 = new Student({<br /> <span style="color: #008080; "> 2</span>             id: 10000,<br /> <span style="color: #008080; "> 3</span>             name: '鐜嬪皬浜?,<br /> <span style="color: #008080; "> 4</span>             age: 30<br /> <span style="color: #008080; "> 5</span>         });<br /> <span style="color: #008080; "> 6</span>         <br /> <span style="color: #008080; "> 7</span>         var student2 = new Student({<br /> <span style="color: #008080; "> 8</span>             id: 20000,<br /> <span style="color: #008080; "> 9</span>             name: '濮氭晱',<br /> <span style="color: #008080; ">10</span>             age: 26<br /> <span style="color: #008080; ">11</span>         });<br /> <span style="color: #008080; ">12</span>         <br /> <span style="color: #008080; ">13</span>         var student3 = new Student({<br /> <span style="color: #008080; ">14</span>             id: 30000,<br /> <span style="color: #008080; ">15</span>             name: '縐戞瘮',<br /> <span style="color: #008080; ">16</span>             age: 24<br /> <span style="color: #008080; ">17</span>         });<br /> <span style="color: #008080; ">18</span>         <br /> <span style="color: #008080; ">19</span>         var studentCollection = new StudentCollection([<br /> <span style="color: #008080; ">20</span>             student1,<br /> <span style="color: #008080; ">21</span>             student2,<br /> <span style="color: #008080; ">22</span>             student3<br /> <span style="color: #008080; ">23</span>         ]);</div> </div> <div><br /> </div> <div>鑷蟲闆嗗悎妯″瀷宸茬粡鏂板緩瀹屾瘯錛岄偅涔堝浣曢氳繃瑙嗗浘鏉ユ樉紺鴻繖涓泦鍚堟ā鍨嬨?/div> <div><br /> </div> <div>瀛︿範絎旇涓涓柊寤虹殑StudentView綾葷殑render鏂規硶鍋氫慨鏀癸紝鍚屾椂鍦ㄦ瀯寤鴻繖涓被瀵硅薄鏃訛紝紼嶄綔淇敼錛屼慨鏀瑰涓嬶細</div> <div>鎶婂師鏉ョ粦瀹歮odel鐨勪唬鐮佹敼鎴愮粦瀹歝ollection銆?/div> <div><br /> </div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080; ">1</span> var studentCollectionView = new StudnetCollectionView ({<br /> <span style="color: #008080; ">2</span>             collection: studentCollection<br /> <span style="color: #008080; ">3</span>  });</div> </div> <div><br /> </div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080; "> 1</span>     var StudnetCollectionView = Backbone.View.extend({<br /> <span style="color: #008080; "> 2</span>         <br /> <span style="color: #008080; "> 3</span>         el: 'body',<br /> <span style="color: #008080; "> 4</span>         <br /> <span style="color: #008080; "> 5</span>         render:function(){<br /> <span style="color: #008080; "> 6</span>             var html = '';<br /> <span style="color: #008080; "> 7</span>             _.each(this.collection.models,function(model,index,obj){<br /> <span style="color: #008080; "> 8</span>                 var tmp = '瀛﹀彿: ' + model.get('id') + '.' +<br /> <span style="color: #008080; "> 9</span>                           '濮撳悕: ' + model.get('name') + '.' +<br /> <span style="color: #008080; ">10</span>                           '騫撮緞: ' + model.get('age');<br /> <span style="color: #008080; ">11</span>                 <br /> <span style="color: #008080; ">12</span>                 html = html + '<span style="color: #0000FF; "><</span><span style="color: #800000; ">li</span><span style="color: #0000FF; ">></span>' + tmp + '<span style="color: #0000FF; "></</span><span style="color: #800000; ">li</span><span style="color: #0000FF; ">></span>'; <br /> <span style="color: #008080; ">13</span>             });<br /> <span style="color: #008080; ">14</span>             <br /> <span style="color: #008080; ">15</span>             html = '<span style="color: #0000FF; "><</span><span style="color: #800000; ">ul</span><span style="color: #0000FF; ">></span>' + html + '<span style="color: #0000FF; "></</span><span style="color: #800000; ">ul</span><span style="color: #0000FF; ">></span>';<br /> <span style="color: #008080; ">16</span>             $(this.el).html(html);<br /> <span style="color: #008080; ">17</span>         }<br /> <span style="color: #008080; ">18</span>     });</div> </div> <div><br /> </div> <div>瀹屾暣鐨刴ain.js鍐呭濡備笅錛? </div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080; "> 1</span> (function($){<br /> <span style="color: #008080; "> 2</span>     $(document).ready(function(){<br /> <span style="color: #008080; "> 3</span>         <br /> <span style="color: #008080; "> 4</span>         var student1 = new Student({<br /> <span style="color: #008080; "> 5</span>             id: 10000,<br /> <span style="color: #008080; "> 6</span>             name: '鐜嬪皬浜?,<br /> <span style="color: #008080; "> 7</span>             age: 30<br /> <span style="color: #008080; "> 8</span>         });<br /> <span style="color: #008080; "> 9</span>         <br /> <span style="color: #008080; ">10</span>         var student2 = new Student({<br /> <span style="color: #008080; ">11</span>             id: 20000,<br /> <span style="color: #008080; ">12</span>             name: '濮氭晱',<br /> <span style="color: #008080; ">13</span>             age: 26<br /> <span style="color: #008080; ">14</span>         });<br /> <span style="color: #008080; ">15</span>         <br /> <span style="color: #008080; ">16</span>         var student3 = new Student({<br /> <span style="color: #008080; ">17</span>             id: 30000,<br /> <span style="color: #008080; ">18</span>             name: '縐戞瘮',<br /> <span style="color: #008080; ">19</span>             age: 24<br /> <span style="color: #008080; ">20</span>         });<br /> <span style="color: #008080; ">21</span>         <br /> <span style="color: #008080; ">22</span>         var studentCollection = new StudentCollection([<br /> <span style="color: #008080; ">23</span>             student1,<br /> <span style="color: #008080; ">24</span>             student2,<br /> <span style="color: #008080; ">25</span>             student3<br /> <span style="color: #008080; ">26</span>         ]);<br /> <span style="color: #008080; ">27</span>         <br /> <span style="color: #008080; ">28</span>         var studentCollectionView = new StudnetCollectionView({<br /> <span style="color: #008080; ">29</span>             collection: studentCollection<br /> <span style="color: #008080; ">30</span>         });<br /> <span style="color: #008080; ">31</span> <br /> <span style="color: #008080; ">32</span>         studentCollectionView.render();<br /> <span style="color: #008080; ">33</span>         <br /> <span style="color: #008080; ">34</span>     });<br /> <span style="color: #008080; ">35</span>     <br /> <span style="color: #008080; ">36</span>     //set model<br /> <span style="color: #008080; ">37</span>     var Student = Backbone.Model.extend({<br /> <span style="color: #008080; ">38</span>         //set default values.<br /> <span style="color: #008080; ">39</span>         defaults: {<br /> <span style="color: #008080; ">40</span>             id: 0,<br /> <span style="color: #008080; ">41</span>             name: '',<br /> <span style="color: #008080; ">42</span>             age: 0<br /> <span style="color: #008080; ">43</span>         }<br /> <span style="color: #008080; ">44</span>     });<br /> <span style="color: #008080; ">45</span>     <br /> <span style="color: #008080; ">46</span>     var StudentCollection = Backbone.Collection.extend({<br /> <span style="color: #008080; ">47</span>         model: Student<br /> <span style="color: #008080; ">48</span>     });<br /> <span style="color: #008080; ">49</span>     <br /> <span style="color: #008080; ">50</span>     //set view<br /> <span style="color: #008080; ">51</span>     var StudnetCollectionView = Backbone.View.extend({<br /> <span style="color: #008080; ">52</span>         <br /> <span style="color: #008080; ">53</span>         el: 'body',<br /> <span style="color: #008080; ">54</span>         <br /> <span style="color: #008080; ">55</span>         render:function(){<br /> <span style="color: #008080; ">56</span>             var html = "<table border='1'><tr><th>瀛﹀彿</th><th>濮撳悕</th><th>騫撮緞</th></tr>";<br /> <span style="color: #008080; ">57</span>             _.each(this.collection.models, function(model,index,obj){<br /> <span style="color: #008080; ">58</span>                 var tmp = '<tr><td>' + model.get('id') + '</td>' +<br /> <span style="color: #008080; ">59</span>                           '<td>' + model.get('name') + '</td>' +<br /> <span style="color: #008080; ">60</span>                           '<td> ' + model.get('age') + '</td></tr>';<br /> <span style="color: #008080; ">61</span>                           <br /> <span style="color: #008080; ">62</span>                           <br /> <span style="color: #008080; ">63</span>                 html = html = html + tmp;<br /> <span style="color: #008080; ">64</span>             });<br /> <span style="color: #008080; ">65</span>             <br /> <span style="color: #008080; ">66</span>             html = html + '</table>';<br /> <span style="color: #008080; ">67</span>             $(this.el).html(html);<br /> <span style="color: #008080; ">68</span>         }<br /> <span style="color: #008080; ">69</span>     });<br /> <span style="color: #008080; ">70</span>     <br /> <span style="color: #008080; ">71</span> })(jQuery);<br /> <span style="color: #008080; ">72</span> </div> </div> <div><br /> </div> <div><br /> </div><img src ="http://m.tkk7.com/jacky9881/aggbug/429942.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/jacky9881/" target="_blank">絎戠湅浜虹敓</a> 2016-04-02 12:06 <a href="http://m.tkk7.com/jacky9881/archive/2016/04/02/429942.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Backbone瀛︿範絎旇涓http://m.tkk7.com/jacky9881/archive/2016/04/02/429941.html絎戠湅浜虹敓絎戠湅浜虹敓Sat, 02 Apr 2016 02:06:00 GMThttp://m.tkk7.com/jacky9881/archive/2016/04/02/429941.htmlhttp://m.tkk7.com/jacky9881/comments/429941.htmlhttp://m.tkk7.com/jacky9881/archive/2016/04/02/429941.html#Feedback0http://m.tkk7.com/jacky9881/comments/commentRss/429941.htmlhttp://m.tkk7.com/jacky9881/services/trackbacks/429941.html瀛︿範浣撲細鎬葷粨涓涓嬶紝浠ヤ究鍚庨潰鏌ヨ銆?/div>

Backbone鏄竴涓熀浜嶮VC妯″紡鐨勫墠绔疛avaScript妗嗘灦錛岀敤浜庡墠绔〉闈㈠紑鍙戙?/div>
鍙互浠巋ttp://backbone.js涓婁笅杞藉搴旂殑鐗堟湰銆?/div>

浣跨敤Backbone錛岄渶瑕佷緷璧栧叾浠栦竴浜沯s搴撱?/div>
jQuery  http://jquery.com
Underscore http://underscorejs.org

欏甸潰鐨刪ead鍏冪礌鍐呭澶т綋濡備笅錛?/div>
1 <script src="lib/jquery-2.2.2.js"></script>
2 <script src="lib/underscore-2.js"></script>
3 <script src="lib/backbone.js"></script>

Backbone鏄竴涓狹VC妗嗘灦錛岄氳繃V鏉ュ睍紺篗鐨勫唴瀹癸紝C鎺ュ彈鐢ㄦ埛鐨勮姹傦紝鏇存柊妯″瀷錛岀劧鍚庡埛鏂癡銆?/div>

涓嬮潰浠ヤ竴涓緥瀛愶紝鏉ヨ鏄庢庝箞寤虹珛涓涓畝鍗曠殑Backbone搴旂敤銆?/div>

棣栧厛瀹氫箟涓涓狹odel綾籗tudent, 闇瑕佺戶鎵?span style="font-size: 13px; background-color: #eeeeee;">Backbone.Model錛岃繖涓被鏈変笁涓垚鍛樺彉閲忥紝id錛宯ame錛宎ge錛屽鐢╦ava涓殑鍙硶錛屽叾瀹炲彲鑳?/span>
涓嶅簲璇ヨ繖涔堢О鍛箋?/span>

1     var Student = Backbone.Model.extend({
2         //set default values.
3         defaults: {
4             id: 0,
5             name: '',
6             age: 0
7         }
8     });


鐒跺悗瀹氫箟涓涓猇iew綾籗tudentView錛岄渶瑕佺戶鎵?span style="font-size: 13px; background-color: #eeeeee;">Backbone.View, 緇欒繖涓被鐨勬垚鍛樺彉閲廵l璧嬪?body錛屾寚鏄庡湪欏甸潰鐨刡ody鍏冪礌涓覆鏌撹鍥撅紝
鍚屾椂閲嶅啓浜嗘覆鏌撴柟娉時ender錛屾寚鏄庡浣曟覆鏌擄紝浠ヤ笅浠g爜搴旂敤jQuery鐨勮娉曪紝鍦╡l鎸囧畾鐨勫厓绱犲唴錛屾樉紺烘寚瀹氱殑鍐呭銆?/span>
姣忎釜瑙嗗浘緇戝畾涓涓狹odel錛屽湪View鐨勬墍鏈夋柟娉曚腑鍙互鐩存帴璋冪敤this.model鑾峰彇褰撳墠View緇戝畾鐨凪odel瀵硅薄錛屽涓嬩緥瀛?/span>
this.model.get('id'),娉ㄦ剰鑾峰彇model灞炴у兼椂錛屼笉鑳界洿鎺ヤ嬌鐢╰hi.model.id

 1     var StudnetView = Backbone.View.extend({
 2         
 3         el: 'body',
 4         
 5         render:function(){
 6             var html = '瀛﹀彿: ' + this.model.get('id') + '.' +
 7                        '濮撳悕: ' + this.model.get('name') + '.' +
 8                        '騫撮緞: ' + this.model.get('age');
 9     
10             $(this.el).html(html);
11         }
12     });

瀹氫箟瀹屾ā鍨嬪拰瑙嗗浘綾諱箣綾伙紝鎺ヤ笅鏉ュ氨鏄垱寤烘ā鍨嬬被鍜岃鍥劇被瀵硅薄錛屽垱寤烘柟娉曠被浼間簬java涓垱寤哄璞°?
鏂板緩涓涓猰odel瀵硅薄student錛岀粰瀵硅薄灞炴ф寚瀹氬箋?/div>
鏂板緩涓涓獀iew瀵硅薄錛屽茍涓旀寚瀹氳view緇戝畾鐨刴odel瀵硅薄銆?/div>
璋冪敤view鐨勬覆鏌撴柟娉曘?/div>

 1     var student = new Student({
 2             id: 10000,
 3             name: '鐜嬪皬浜?,
 4             age: 30
 5      });
 6         
 7         
 8     var studnetView = new StudnetView({
 9             model: student
10     });
11 
12     studnetView.render();

鑷蟲Backbone鐨勪唬鐮佸氨鍏ㄩ儴鍐欏畬浜嗭紝鍙鎶婅繖浜涙柊寤篗odel鍜孷iew鐨勪唬鐮佹斁鍒拌嚜瀹氫箟鐨刯s鏂囦歡涓紝
鍦ㄩ〉闈㈠姞杞芥椂璋冪敤鍗沖彲錛岃繖閲岃嚜瀹氫箟js鏂囦歡鍚嶄負main.js,鍐呭濡備笅錛?/div>

 1 (function($){
 2     $(document).ready(function(){
 3         
 4         var student = new Student({
 5             id: 10000,
 6             name: '鐜嬪皬浜?,
 7             age: 30
 8         });
 9         
10         
11         var studnetView = new StudnetView({
12             model: student
13         });
14 
15         studnetView.render();
16         
17     });
18     
19     //set model
20     var Student = Backbone.Model.extend({
21         //set default values.
22         defaults: {
23             id: 0,
24             name: '',
25             age: 0
26         }
27     });
28     
29     //set view
30     var StudnetView = Backbone.View.extend({
31         
32         el: 'body',
33         
34         render:function(){
35             var html = '瀛﹀彿: ' + this.model.id + '.'
36                        '濮撳悕: ' + this.model.name + '.'
37                        '騫撮緞: ' + this.model.age;
38     
39             $(this.el).html(html);
40         }
41     });
42     
43 })(jQuery);

鐒跺悗鍐嶆柊寤轟竴涓猧ndex.html,鍐呭濡備笅錛?/div>

 1 <!DOCTYPE html>
 2 <html>
 3     <head>
 4         <meta charset="utf-8">
 5         <title>Backbone.js 1</title>
 6         <script src="lib/jquery-2.2.2.js"></script>
 7         <script src="lib/underscore-2.js"></script>
 8         <script src="lib/backbone.js"></script>
 9         <script src="js/main.js"></script>
10     </head>
11     <body>
12         
13     </body>
14 </html>

鏈鍚庯紝鍦ㄦ祻瑙堝櫒涓墦寮榪欎釜鏂囦歡錛屽氨鍙互鐪嬪埌鏁堟灉浜嗐?



]]>閰嶇疆Nginx 緙撳瓨鏈嶅姟鍣?/title><link>http://m.tkk7.com/jacky9881/archive/2016/03/08/429552.html</link><dc:creator>絎戠湅浜虹敓</dc:creator><author>絎戠湅浜虹敓</author><pubDate>Tue, 08 Mar 2016 12:29:00 GMT</pubDate><guid>http://m.tkk7.com/jacky9881/archive/2016/03/08/429552.html</guid><wfw:comment>http://m.tkk7.com/jacky9881/comments/429552.html</wfw:comment><comments>http://m.tkk7.com/jacky9881/archive/2016/03/08/429552.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/jacky9881/comments/commentRss/429552.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/jacky9881/services/trackbacks/429552.html</trackback:ping><description><![CDATA[@import url(http://m.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); @import url(http://m.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); <br /> <div><br /> </div> 鍙傜収浠ヤ笅緗戝潃錛屽湪CentOS涓婂畨瑁匩ginx<br /> <div>http://m.tkk7.com/jacky9881/archive/2016/02/19/429375.html</div> <div><br /> </div> <div>1.棣栧厛鏂板緩浠ヤ笅涓や釜鐩綍錛岀敤浜庡瓨鏀劇紦瀛樻枃浠訛紱</div> <div>   [root@localhost nginx]# mkdir -p /data/nginx/proxy_temp_path</div> <div>   [root@localhost nginx]# mkdir -p /data/nginx/proxy_cache_path</div> <div><br /> </div> <div>2.緙栬緫nginx.conf鏂囦歡</div> <div>  鍦╤ttp妯″潡澧炲姞濡備笅鍐呭錛屾寚瀹氱紦瀛樻枃浠剁殑瀛樻斁璺緞錛?/div> <div>  <span style="font-size: 13px; background-color: #eeeeee;">proxy_temp_path /data/nginx/proxy_temp_path;</span></div> <div><span style="font-size: 13px; background-color: #eeeeee;">  proxy_cache_path /data/nginx/proxy_cache_path levels=1:2 keys_zone=cache_one:20m inactive=1d max_size=3g ;</span>  </div> <div><br /> </div> <div>娉細閫氳繃<span style="font-size: 13px; background-color: #eeeeee;">keys_zone鏉ユ寚瀹氱紦瀛樺尯鐨勫悕瀛楋紝鍦ㄦ帴涓嬫潵鐨刲ocation妯″潡閰嶇疆涓渶瑕佺敤鍒幫紱</span></div> <div><span style="font-size: 13px; background-color: #eeeeee;">      20m鏄寚瀹氱敤浜庣紦瀛樼殑鍐呭瓨澶у皬錛堢敱浜庢湰浜鴻櫄鎷熸満鍐呭瓨鍘熷洜錛岃緗簡20M錛岀敓浜х幆澧冧腑鍙互璁劇疆澶т竴浜涳紝姣斿1G錛夛紱</span></div> <div><span style="font-size: 13px; background-color: #eeeeee;">      </span><span style="font-size: 13px; background-color: #eeeeee;">inactive=1d,浠h〃緙撳瓨鐨勬暟鎹鏋滆秴榪囦竴澶╂病鏈夎璁塊棶鐨勮瘽錛屽垯鑷姩娓呴櫎錛?/span></div> <div><span style="font-size: 13px; background-color: #eeeeee;">      max_size=3g鏄寚瀹氱敤浜庣紦瀛樼殑紜洏澶у皬</span><span style="font-size: 13px; background-color: #eeeeee;">錛堢敱浜庢湰浜鴻櫄鎷熸満鍐呭瓨鍘熷洜錛岃緗簡3g錛岀敓浜х幆澧冧腑鍙互璁劇疆澶т竴浜涳紝姣斿50G錛夛紱</span></div> <div>      <span style="font-size: 13px; background-color: #eeeeee;">levels=1:2 </span><span style="color: #333333; font-family: verdana, Arial, Helvetica, sans-serif; line-height: 25px; background-color: #ffffff;">鎸囧畾璇ョ紦瀛樼洰褰曚腑鏈変袱灞俬ash鐩綍錛岀涓灞傜洰褰曚負1涓瓧姣嶏紝絎簩灞備負2涓瓧姣嶏紝鍏朵腑絎竴灞傜洰褰曞悕涓虹紦瀛樻暟鎹甅D5緙栫爜鐨勫掓暟絎竴涓?/span></div> <div><span style="color: #333333; font-family: verdana, Arial, Helvetica, sans-serif; line-height: 25px; background-color: #ffffff;">     瀛楁瘝錛岀浜屽眰鐩綍鍚嶄負緙撳瓨鏁版嵁MD5緙栫爜鐨勫掓暟2錛?涓や釜瀛楁瘝錛?/span></div> <div><span style="color: #333333; font-family: verdana, Arial, Helvetica, sans-serif; line-height: 25px; background-color: #ffffff;"><br /> </span></div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --> upstream local_tomcats {<br />        server 192.168.8.132:8080;<br />        server 192.168.8.130:8080;<br /> }</div> </div> <div><br /> </div> <div> 淇敼location妯″潡</div> <div> <span style="font-size: 13px; background-color: #eeeeee;"> location ~ \.(jsp|do)$ {</span></div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;">            proxy_pass http://local_tomcats;<br />  }        <br />         <br />   location / {<br /> <br />             proxy_cache cache_one;</div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;">            錛冨畾涔塰ttp榪斿洖鍊間負200鍜?04錛岀紦瀛樻椂闂?2灝忔椂錛屽鏋?2灝忔椂鍚庯紝娌℃湁琚闂紝鍒欒嚜鍔ㄨ鍒犻櫎錛?/div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;">            錛?00琛ㄧず <span style="color: #333333; font-family: Arial; font-size: 14px; line-height: 26px; background-color: #ffffff;">鏈嶅姟鍣ㄥ凡鎴愬姛澶勭悊浜嗚姹傦紝304琛ㄧず </span><span style="color: #333333; font-family: Arial; font-size: 14px; line-height: 26px; background-color: #ffffff;">鑷粠涓婃璇鋒眰鍚庯紝璇鋒眰鐨勭綉欏墊湭淇敼榪?/span><br />             proxy_cache_valid 200 304 12h ;<br />             proxy_cache_valid 301 302 1m ;<br />             proxy_cache_valid any 10m ;<br />            <span style="color: red;"> proxy_cache_key $host$uri$is_args$args;</span><br /> <br />             proxy_ignore_headers X-Accel-Expires Expires  Set-Cookie Cache-Control;<br />             proxy_hide_header Cache-Control;<br />             proxy_hide_header Set-Cookie;               <br />             <span style="color: red;">proxy_pass http://local_tomcats; 錛冭繖涓璁懼畾錛屽惁鍒欏ソ鍍忕敓鎴愪笉浜嗙紦瀛樻枃浠?/span><br /> <br />     }<br /> 錛冪敤浜庢竻闄ょ紦瀛?br />  location ~ /purge(/.*) {<br />             allow 127.0.0.1;<br />             allow 192.168.8.132;<br />             deny all ;<br />             proxy_cache_purge cache_one $host$1$is_args$args ;<br /> </div> <div><span style="font-size: 13px; background-color: #eeeeee;">   }</span>  </div> <div><br /> </div> <div>鍦ㄦ祻瑙堝櫒鍦板潃鏍忚緭鍏ワ細http://www.hw.com/tomcat.png </div> <div>鏌ョ湅緙撳瓨鐩綍</div> <div> <div>[root@localhost nginx]# ls /data/nginx/proxy_cache_path/7/8a</div> <div>b12ee1366ed4307aa6408a16286658a7</div> </div> <div><br /> </div> <div>鍙互鐪嬪埌錛岀紦瀛樻枃浠跺凡緇忕敓鎴愶紝娉ㄦ剰緙撳瓨鏂囦歡鍚嶆渶鍚庝笁浣嶅拰緙撳瓨鏂囦歡澶圭殑鍏崇郴銆?/div> <div><br /> </div> <div>鍦ㄦ祻瑙堝櫒鍦板潃鏍忚緭鍏ワ細http://www.hw.com/purge/tomcat.png</div> <div>欏甸潰鏄劇ず濡備笅淇℃伅錛屾彁紺虹紦瀛樻枃浠跺凡緇忚娓呴櫎銆?/div> <div><br /> </div> <div> <div>Successful purge</div> <div><br /> </div> <div><span style="color: red;">Key : www.hw.com/tomcat.png</span></div> <div>Path: /data/nginx/proxy_cache_path/<span style="color: red;">7/8a</span>/b12ee1366ed4307aa6408a1628665<span style="color: red;">8a7 </span></div> </div> <div><br /> </div> <div>娉ㄦ剰榪欓噷鐨凨ey錛屽氨鏄厤緗枃浠朵腑瀹氫箟 <span style="font-size: 13px; background-color: #eeeeee;">proxy_cache_key </span> </div> <div><br /> </div> <div>鏌ョ湅緙撳瓨鍛戒腑鐜? </div> <div>鍦?span style="font-size: 13px; background-color: #eeeeee;">location / 妯″潡錛屽鍔犲涓嬩唬鐮?/span></div> <div><span style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 18px; background-color: #fafafa;">add_header  Nginx-Cache </span><span id="b9h9n7p" class="string" style="color: red; font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 18px;">"$upstream_cache_status"</span><span style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 18px; color: red;">; </span></div> <div><span style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 18px;"><br /> </span></div> <div><span style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 18px;">鍚屾椂鍦╤ttp妯″潡鎵撳紑ngnix鐨勬棩蹇楀姛鑳斤紝榛樿鏄叧闂姸鎬併?/span></div> <div><span style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 18px;"><br /> </span></div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '<br />                       '$status $body_bytes_sent "$http_referer" '<br />                       '"$http_user_agent" "$http_x_forwarded_for"'</div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;">                       <span style="color: red;">'"</span><span style="color: red; font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 18px;">$upstream_cache_status</span><span style="color: red;">"';</span><br />     access_log  logs/access.log  main;</div> </div> <div><span style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; line-height: 18px;"> </span></div> <div><span style="font-size: 13px; background-color: highlight;"><br /> </span></div> <div>[root@localhost nginx]# ./sbin/nginx -s reload</div> <div><br /> </div> <div>鍦ㄦ祻瑙堝櫒鍦板潃鏍忚緭鍏ワ細http://www.hw.com/tomcat.png</div> <div>閲嶅鍒鋒柊鍑犳錛屾墦寮鏃ュ織鏂囦歡 logs/access.log,鍙互鐪嬪埌HIT鐨勫瓧鏍鳳紝鎰忓懗鐫緙撳瓨鍛戒腑銆?/div> <div><span style="font-size: 13px; background-color: highlight;"><br /> </span></div> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->192.168.8.132 - - [08/Mar/2016:20:48:38 +0800] "GET /tomcat.png HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" "-""<span style="color: red;">HIT"</span><br /> 192.168.8.132 - - [08/Mar/2016:20:48:40 +0800] "GET /tomcat.png HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" "-""<span style="color: red;">HIT"</span><br /> 192.168.8.132 - - [08/Mar/2016:20:48:42 +0800] "GET /tomcat.png HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" "-""<span style="color: red;">HIT"</span></div> </div> <div><span style="font-size: 13px; background-color: highlight;"><br /> </span></div> <div><span style="font-size: 13px; background-color: highlight;"><br /> </span></div><img src ="http://m.tkk7.com/jacky9881/aggbug/429552.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/jacky9881/" target="_blank">絎戠湅浜虹敓</a> 2016-03-08 20:29 <a href="http://m.tkk7.com/jacky9881/archive/2016/03/08/429552.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浣跨敤MyCat瀹炵幇MySQL鐨勫垎鐗囧鐞嗗拰璇誨啓鍒嗙http://m.tkk7.com/jacky9881/archive/2016/02/27/429458.html絎戠湅浜虹敓絎戠湅浜虹敓Sat, 27 Feb 2016 07:28:00 GMThttp://m.tkk7.com/jacky9881/archive/2016/02/27/429458.htmlhttp://m.tkk7.com/jacky9881/comments/429458.htmlhttp://m.tkk7.com/jacky9881/archive/2016/02/27/429458.html#Feedback1http://m.tkk7.com/jacky9881/comments/commentRss/429458.htmlhttp://m.tkk7.com/jacky9881/services/trackbacks/429458.html闃呰鍏ㄦ枃

]]>
MySQL涓諱粠澶嶅埗閰嶇疆http://m.tkk7.com/jacky9881/archive/2016/02/23/429403.html絎戠湅浜虹敓絎戠湅浜虹敓Tue, 23 Feb 2016 12:41:00 GMThttp://m.tkk7.com/jacky9881/archive/2016/02/23/429403.htmlhttp://m.tkk7.com/jacky9881/comments/429403.htmlhttp://m.tkk7.com/jacky9881/archive/2016/02/23/429403.html#Feedback0http://m.tkk7.com/jacky9881/comments/commentRss/429403.htmlhttp://m.tkk7.com/jacky9881/services/trackbacks/429403.html 涓繪湇鍔″櫒  OS錛欳entOS   IP錛?92.168.8.130
 浠庢湇鍔″櫒  OS錛欳entOS   IP錛?92.168.8.131

鍦ㄤ富錛屼粠鏈嶅姟鍣ㄤ笂瀹夎MySQL錛屽畨瑁呮柟娉曞涓嬶細
[root@localhost Desktop]$ rpm -qa | grep mysql
   mysql-libs-5.1.73-5.el6_6.x86_64
[root@localhost Desktop]# rpm -e mysql-libs-5.1.73-5.el6_6.x86_64 --nodeps
[root@localhost Desktop]# yum -y install mysql-server mysql mysql-devel

鍚姩MySQL
[root@localhost Desktop]# service mysqld start

錛冨彲浠ヨ緗甅ySQL寮鏈哄惎鍔紝榪愯鍛戒護chkconfig mysqld on

#緇檙oot璐﹀彿璁劇疆瀵嗙爜
[root@localhost Desktop]# mysqladmin -u root password 'root'
[root@localhost Desktopps]# mysql -u root -p
緇欎粠鏈嶅姟鍣?192.168.8.131)鎺堟潈錛屽茍涓旂粰浠庢湇鍔″櫒鍒涘緩璁塊棶涓繪湇鍔″櫒鐨勮處鍙峰拰瀵嗙爜 admin
mysql> grant replication slave on *.* to 'admin'@'192.168.8.131' identified by 'admin';
鍒涘緩鏁版嵁搴揷ontract
mysql> create database contract;
mysql>quit錛?/div>

澶嶅埗MySQL鏁版嵁搴撻厤緗ā鐗堣鐩?etc/my.cnf
[root@localhost Desktopps]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf   
[root@localhost Desktopps]#vi /etc/my.cnf
璁劇疆浠ヤ笅涓変釜鍊?/div>

log-bin=mysql-bin   錛冩寚瀹氫粠鏈嶅姟鍣ㄨ鍙栫殑鏃ュ織鏂囦歡
server-id = 1        錛冧富鏈嶅姟鍣ㄥ繀欏昏瀹氫負1錛屼粠鏈嶅姟鍣ㄧ殑鍊?gt;1
binlog-do-db=contract 錛冨contract鏁版嵁搴撶殑鎿嶄綔鏃ュ織浼氳褰曞埌mysql-bin

錛冨師鐞嗭細MySQL涓諱粠澶嶅埗鐨勫師鐞嗘槸涓繪湇鍔″櫒鎶婂鎸囧畾鏁版嵁搴撴搷浣滅殑鏃ュ織鍐欏埌鎸囧畾鐨勬棩蹇楁枃浠朵腑錛屼粠鏈嶅姟鍣?/div>
            璇誨彇榪欎釜鏃ュ織鏂囦歡錛屽啓鍒頒粠鏈嶅姟鍣ㄧ殑鎸囧畾鏃ュ織鏂囦歡涓紝鐒跺悗鍦ㄤ粠鏈嶅姟鍣ㄩ噸鏂版墽琛屾棩蹇楁枃浠躲?/div>

閰嶇疆瀹屼箣鍚庯紝閲嶅惎MySQL
[root@localhost Desktopps]#service mysqld restart
Stopping mysqld:                                          [  OK  ]
Starting mysqld:                                           [  OK  ]

[root@localhost Desktopps]# mysql -u root -p
鏌ョ湅涓繪湇鍔″櫒鐨勭姸鎬?/div>
mysql> show master status\G;
*************************** 1. row ***************************
                    File: mysql-bin.000005
              Position: 106
     Binlog_Do_DB: contract
Binlog_Ignore_DB: 
1 row in set (0.00 sec)

榪欓噷璁板ソFile鍜孭osition鐨勫鹼紝閰嶇疆浠庢湇鍔″櫒鐨勬椂鍊欓渶瑕佺敤鍒般侳ile灝辨槸浠庢湇鍔″櫒闇瑕佽鍙栫殑鏃ュ織鏂囦歡錛孭osition琛ㄧず浠庢棩蹇楁枃浠剁殑浠涔堜綅緗紑濮嬭璧楓?/div>

 涓嬮潰寮濮嬮厤緗粠鏈嶅姟鍣?/div>
[root@localhost Desktop]# mysqladmin -u root password 'root'
[root@localhost Desktopps]# mysql -u root -p
鍒涘緩鏁版嵁搴揷ontract
mysql> create database contract;
mysql>quit錛?/div>
[root@localhost Desktopps]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf   
[root@localhost Desktopps]#vi /etc/my.cnf
璁劇疆浠ヤ笅涓や釜鍊?/div>

log-bin=mysql-bin   錛冩寚瀹氫富鏈嶅姟鍣ㄨ鍙栫殑鏃ュ織鏂囦歡
server-id = 2       錛冧富鏈嶅姟鍣ㄥ繀欏昏瀹氫負1錛屼粠鏈嶅姟鍣ㄧ殑鍊?gt;1

[root@localhost Desktopps]# mysql -u root -p
mysql> CHANGE MASTER TO MASTER_HOST='192.168.8.130', MASTER_PORT=3306,
            MASTER_USER='admin', MASTER_PASSWORD='admin',
            MASTER_LOG_FILE='mysql-bin.000005'MASTER_LOG_POS=106; 
鍚姩浠庢湇鍔″櫒鍚屾
mysql>start slave;
mysql>show slave status\G;

Slave_IO_Running: YES
Slave_SQL_Running: YES

濡傛灉杈撳嚭浠ヤ笂鍐呭錛屽垯琛ㄧずMySQL涓諱粠澶嶅埗閰嶇疆鎴愬姛銆?/div>

楠岃瘉
鍦ㄤ富鏈嶅姟鍣ㄤ笂榪愯 
[root@localhost Desktopps]# mysql -u root -p
mysql> use contract;
Database changed
mysql> show tables;
Empty set (0.04 sec)

鍦ㄤ粠鏈嶅姟鍣ㄤ笂榪愯
[root@localhost Desktopps]# mysql -u root -p
mysql> use contract;
Database changed
mysql> show tables;
Empty set (0.04 sec)

紜畾涓諱粠鏈嶅姟鍣ㄧ殑鏁版嵁搴揷ontract鐨勪笅闈㈤兘娌℃湁琛ㄣ?/div>
鍦ㄤ富鏈嶅姟鍣ㄤ笂榪愯寤鴻〃鍛戒護錛屽茍寰琛ㄩ噷鎻掑叆涓鏉¤褰曪細
 mysql> create table `user` (`id` int not null auto_increment,`name` varchar (60),`password` varchar (20),`role` int not null,`email` varchar (30),`alertday` int,primary key (`id`));
Query OK, 0 rows affected (0.36 sec)
 mysql> insert into `user` (`name`,`password`,`role`,`email`,`alertday`) values('admin','admin',0,'xxxx@xxx.com',30);
Query OK, 1 row affected (0.08 sec)

鍦ㄤ粠鏈嶅姟鍣ㄤ笂榪愯鏌ヨ璇彞銆?/div>
mysql> select * from user;
+----+-------+----------+------+--------------+----------+
| id | name  | password | role | email        | alertday |
+----+-------+----------+------+--------------+----------+
|  1 | admin | admin    | 0    | xxxx@xxx.com |       30 |
+----+-------+----------+------+--------------+----------+
1 row in set (0.01 sec)

浠庤緭鍑虹粨鏋滃彲浠ョ湅鍑猴紝涓繪湇鍔″櫒涓婄殑鏁版嵁琚悓姝ュ埌浠庢湇鍔″櫒涓婁簡銆?/div>

閫氳繃鎼緩MySQL涓諱粠澶嶅埗緇撴瀯錛屽彲浠ユ彁楂樻暟鎹殑瀹夊叏鎬э紝鍚屾椂鍙互瀹炵幇璇誨啓鍒嗙錛岃鍐欐搷浣滃湪涓繪湇鍔″櫒涓婅繘琛岋紝
璇繪搷浣滃湪浠庢湇鍔″櫒涓婅繘琛岋紝鍙互鍒嗘媴涓繪湇鍔″櫒鐨勮礋鎷呫備絾鏄鏋滃綋涓繪湇鍔″櫒瀹曟満涔嬪悗錛屾暟鎹簱灝卞彧鑳芥彁渚?/div>
璇繪搷浣滀簡錛屼笉鑳藉仛鍒版晠闅滆漿縐伙紝榪欐椂鍊欙紝涓諱富澶嶅埗灝卞簲榪愯岀敓浜嗭紝鏈夋椂闂存暣鐞嗕竴涓嬩富涓誨鍒剁殑閰嶇疆銆?/div>




@import url(http://m.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>centOS涓婂畨瑁匤DK錛孴omcat鍜孨ginxhttp://m.tkk7.com/jacky9881/archive/2016/02/19/429375.html絎戠湅浜虹敓絎戠湅浜虹敓Fri, 19 Feb 2016 11:43:00 GMThttp://m.tkk7.com/jacky9881/archive/2016/02/19/429375.htmlhttp://m.tkk7.com/jacky9881/comments/429375.htmlhttp://m.tkk7.com/jacky9881/archive/2016/02/19/429375.html#Feedback0http://m.tkk7.com/jacky9881/comments/commentRss/429375.htmlhttp://m.tkk7.com/jacky9881/services/trackbacks/429375.html鍦–entOS涓婂畨瑁匤DK7錛孴omcat7鍜孨ginx1.9鎵嬮『

1.涓嬭澆 jdk-7u79-linux-x64.rpm錛屼笅杞藉湴鍧濡備笅錛?/div>
  http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-downloads-1880260.html

  [root@localhost java]#rpm -qa | grep jdk
  [root@localhost java]#cp /home/huangwei/Downloads/jdk-7u79-linux-x64.rpm .
  [root@localhost java]# chmod 755 jdk-7u79-linux-x64.rpm 
  [root@localhost java]# rpm -ivh jdk-7u79-linux-x64.rpm 
  [root@localhost java]# vi /etc/profile

       #set java enviromet
       JAVA_HOME=/usr/java/jdk1.7.0_79
       PATH=$PATH:$JAVA_HOME/bin
       CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
       export JAVA_HOME PATH CLASSPATH
  [root@localhost java]# source /etc/profile
  [root@localhost java]# java -version
       java version "1.7.0_79"
       Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
       Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
  [root@localhost lib]# rpm -qa | grep jdk
       jdk-1.7.0_79-fcs.x86_64



2.涓嬭澆 apache-tomcat-7.0.68.zip錛屼笅杞藉湴鍧濡備笅錛?/div>
  http://tomcat.apache.org/download-70.cgi
  unzip apache-tomcat-7.0.68.zip to /usr/
  [root@localhost bin]# cd /usr/apache-tomcat-7.0.68/bin
  [root@localhost bin]# chmod +x *.sh
  [root@localhost bin]# ./startup.sh 
Using CATALINA_BASE:   /usr/apache-tomcat-7.0.68
Using CATALINA_HOME:   /usr/apache-tomcat-7.0.68
Using CATALINA_TMPDIR: /usr/apache-tomcat-7.0.68/temp
Using JRE_HOME:        /usr/java/jdk1.7.0_79
Using CLASSPATH:       /usr/apache-tomcat-7.0.68/bin/bootstrap.jar:/usr/apache-tomcat-7.0.68/bin/tomcat-juli.jar
Tomcat started.

  鍦ㄦ祻瑙堝櫒涓緭鍏ttp://localhost:8080/ 錛屽鏋滆兘姝e父鎵撳紑Tomcat鐨勪富欏碉紝璇存槑Tomcat瀹夎鎴愬姛銆?/div>

3.涓嬭澆 nginx-1.9.11.tar.gz錛屼笅杞藉湴鍧濡備笅錛?/div>
  http://nginx.org/en/download.html
  [root@localhost usr]# rpm -qa | grep gcc
gcc-4.4.7-16.el6.x86_64
libgcc-4.4.7-16.el6.x86_64
  [root@localhost usr]# rpm -qa | grep openssl
openssl-1.0.1e-42.el6.x86_64
  [root@localhost usr]# rpm -qa | grep zlib
zlib-1.2.3-29.el6.x86_64
  [root@localhost usr]# rpm -qa | grep pcre
pcre-7.8-7.el6.x86_64
  [root@localhost usr]# tar -zxvf nginx-1.9.11.tar.gz 
  [root@localhost usr]# cd nginx-1.9.11/
  [root@localhost nginx-1.9.11]# yum -y install pcre-devel
  [root@localhost nginx-1.9.11]# yum -y install zlib-devel
  [root@localhost nginx-1.9.11]# ./configure --prefix=/usr/nginx
  [root@localhost nginx-1.9.11]# make && make install
  [root@localhost nginx-1.9.11]# cd /usr/nginx/sbin/
  [root@localhost sbin]# ./nginx -t
nginx: the configuration file /usr/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/nginx/conf/nginx.conf test is successful
  [root@localhost sbin]# ./nginx

  
鍦ㄦ祻瑙堝櫒涓緭鍏ttp://localhost/ 錛屽鏋滆兘姝e父鎵撳紑Nginx鐨勪富欏碉紝璇存槑Nginx瀹夎鎴愬姛銆?/div> @import url(http://m.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>浣跨敤Redis瀹炵幇session鍏變韓http://m.tkk7.com/jacky9881/archive/2016/01/31/429261.html絎戠湅浜虹敓絎戠湅浜虹敓Sun, 31 Jan 2016 05:10:00 GMThttp://m.tkk7.com/jacky9881/archive/2016/01/31/429261.htmlhttp://m.tkk7.com/jacky9881/comments/429261.htmlhttp://m.tkk7.com/jacky9881/archive/2016/01/31/429261.html#Feedback0http://m.tkk7.com/jacky9881/comments/commentRss/429261.htmlhttp://m.tkk7.com/jacky9881/services/trackbacks/429261.html闃呰鍏ㄦ枃

]]>
nginx tomcat鐜session涓嶅叡浜満鏅?/title><link>http://m.tkk7.com/jacky9881/archive/2016/01/28/429243.html</link><dc:creator>絎戠湅浜虹敓</dc:creator><author>絎戠湅浜虹敓</author><pubDate>Thu, 28 Jan 2016 12:13:00 GMT</pubDate><guid>http://m.tkk7.com/jacky9881/archive/2016/01/28/429243.html</guid><wfw:comment>http://m.tkk7.com/jacky9881/comments/429243.html</wfw:comment><comments>http://m.tkk7.com/jacky9881/archive/2016/01/28/429243.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/jacky9881/comments/commentRss/429243.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/jacky9881/services/trackbacks/429243.html</trackback:ping><description><![CDATA[     鎽樿: @import url(http://m.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 鍙傜収涓涓嬪湴鍧錛屾惌寤簄ginx tomcat鐨勮礋杞藉潎琛$幆澧? Nor...  <a href='http://m.tkk7.com/jacky9881/archive/2016/01/28/429243.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/jacky9881/aggbug/429243.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/jacky9881/" target="_blank">絎戠湅浜虹敓</a> 2016-01-28 20:13 <a href="http://m.tkk7.com/jacky9881/archive/2016/01/28/429243.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Ngnix+Tomcat閰嶇疆璐熻澆鍧囪 http://m.tkk7.com/jacky9881/archive/2016/01/28/429242.html絎戠湅浜虹敓絎戠湅浜虹敓Thu, 28 Jan 2016 11:45:00 GMThttp://m.tkk7.com/jacky9881/archive/2016/01/28/429242.htmlhttp://m.tkk7.com/jacky9881/comments/429242.htmlhttp://m.tkk7.com/jacky9881/archive/2016/01/28/429242.html#Feedback0http://m.tkk7.com/jacky9881/comments/commentRss/429242.htmlhttp://m.tkk7.com/jacky9881/services/trackbacks/429242.html闃呰鍏ㄦ枃

]]>
主站蜘蛛池模板: 久久久久久久国产免费看| 鲁大师在线影院免费观看| 亚洲综合图色40p| 99免费观看视频| 亚洲AV成人精品日韩一区| 亚洲男人的天堂一区二区| 一级毛片全部免费播放| 亚洲av综合日韩| 亚洲av成人无码久久精品| 精品国产一区二区三区免费看| 黄色视屏在线免费播放| 色偷偷女男人的天堂亚洲网| 久久亚洲AV永久无码精品| 午夜性色一区二区三区免费不卡视频| 国产99久久亚洲综合精品| 亚洲天堂中文字幕| avtt亚洲天堂| 久久久久久久91精品免费观看| 福利免费在线观看| 亚洲精品av无码喷奶水糖心| 亚洲第一精品在线视频| 人人狠狠综合久久亚洲高清| 国产精品久久永久免费| 中国一级特黄的片子免费 | 久久精品国产亚洲av品善| 国产精品亚洲片在线观看不卡| 免费精品一区二区三区在线观看| 免费国产在线视频| 一级特黄aaa大片免费看| 亚洲色大情网站www| 久久精品国产亚洲AV麻豆网站| 亚洲熟伦熟女新五十路熟妇 | 亚洲国产精品无码一线岛国| 国产传媒在线观看视频免费观看| 7723日本高清完整版免费| 国产免费一区二区视频| 亚洲一区二区三区免费| 亚洲日本一线产区和二线| 亚洲欧洲国产视频| 久久精品国产亚洲AV麻豆王友容 | 免费无码看av的网站|