This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | echo 'LATEST_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep '"'"'tag_name'"'"' | sed -E '"'"'s/.*"v([^"]+)".*/\1/'"'"') && \ | |
| sudo curl -L "https://github.com/docker/compose/releases/download/v$LATEST_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ | |
| sudo chmod +x /usr/local/bin/docker-compose' > docker-compose-latest.sh | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Hello, this is my Gist content! | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | let json = [ | |
| { | |
| id: '1', | |
| name: '节点1', | |
| children: [ | |
| { | |
| id: '1-1', | |
| name: '节点1-1', | |
| children: [ | |
| { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ! | |
| " | |
| # | |
| $ | |
| % | |
| & | |
| ' | |
| ( | |
| ) | |
| * | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ! | |
| " | |
| # | |
| $ | |
| % | |
| & | |
| ' | |
| ( | |
| ) | |
| * | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ! | |
| " | |
| # | |
| $ | |
| % | |
| & | |
| ' | |
| ( | |
| ) | |
| * | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class DeviceSerializer(serializers.ModelSerializer): | |
| """ | |
| 设备序列化 | |
| """ | |
| cabinet = serializers.SerializerMethodField() | |
| def get_cabinet(self, obj): | |
| cabinets = Cabinet.objects.filter(id=obj.cabinet_id) | |
| if cabinets is not None and len(cabinets) > 0: | |
| return CabinetSerializer(cabinets[0]).data | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | axios({ | |
| url: 'http://localhost:5000/static/example.pdf', | |
| method: 'GET', | |
| responseType: 'blob', // important | |
| }).then((response) => { | |
| const url = window.URL.createObjectURL(new Blob([response.data])); | |
| const link = document.createElement('a'); | |
| link.href = url; | |
| link.setAttribute('download', 'file.pdf'); | |
| document.body.appendChild(link); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // 两者有啥区别呢?容易看出,用时执行模式,每次在创建一个新的matchEmail2时候,都会新建一个闭包,和创建一个新的 regx | |
| // 立即执行啥时候用呢? 一般是在封装的遍历在函数引用中都是有同一个时,如果不同情况需要使用多个,那么使用用时执行 | |
| // 很显然,我们如果想要创建一个对象系统的话,需要用用时执行模式 | |
| var Events = function() { | |
| var handlers = {}; | |
| var subscribe = function(type, handler) { | |
| if (!handlers[type]) { | |
| handlers[type] = []; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <template> | |
| <div class="container"> | |
| <div class="large-12 medium-12 small-12 cell"> | |
| <label>File | |
| <input type="file" id="file" ref="file" v-on:change="handleFileUpload()"/> | |
| </label> | |
| <button v-on:click="submitFile()">Submit</button> | |
| </div> | |
| </div> | |
| </template> | 
NewerOlder