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
    
  
  
    
  | """ | |
| 毕式音律的算法 | |
| 初始条件:从C开始,C的长度为1 | |
| 计算方式: | |
| 1. 两个五度音程之间的比例是2/3,五度音程对应了7个半音的跨度,所以下面都是用7进行计算 | |
| 2. 如果超出了一个8度,那么需要缩放回来;缩放的方式是利用两个8度之间的比例是1/2来实现 | |
| 终止条件:一个8度内的所有的半音都被计算完毕,也就是计算11次 | |
| """ | |
| key = ('C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B') | |
| print('==== 毕式音律 ===') | 
  
    
      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
    
  
  
    
  | // ==UserScript== | |
| // @name GetDownloadUrl | |
| // @namespace http://zhouchao.me/ | |
| // @version 1.0 | |
| // @description for getting dygod download url | |
| // @author chao | |
| // @match http://www.dygod.net/html/tv/hytv/20150901/106785.html | |
| // @require http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js | |
| // @require https://cdn.rawgit.com/zenorocha/clipboard.js/v1.5.5/dist/clipboard.min.js | |
| // @grant none | 
  
    
      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
    
  
  
    
  | var colorGroups = document.querySelectorAll('section.color-group'); | |
| /* | |
| * https://www.google.com/design/spec/style/color.html#color-color-palette | |
| */ | |
| var forEach = Array.prototype.forEach; | |
| var md_color_items = []; | |
| forEach.call(colorGroups, function(group) { | |
| var colors = group.querySelectorAll("li.color"); | |
| if(colors.length < 5){ | |
| return;// black white color ignore | 
  
    
      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
    
  
  
    
  | public static int dip2px(Context context, float dpValue) { | |
| float scale = context.getResources().getDisplayMetrics().density; | |
| return (int)(dpValue * scale + 0.5F); | |
| } | 
  
    
      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
    
  
  
    
  | // ==UserScript== | |
| // @name UESTC自动评教脚本 | |
| // @namespace http://zhouchao.me/ | |
| // @version 1.0 | |
| // @description 适用于UESTC自动评教 | |
| // @author chace | |
| // @match http://eams.uestc.edu.cn/eams/evaluateStd!search.action?semester.id=* | |
| // @require http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js | |
| // @grant none | |
| // ==/UserScript== | 
  
    
      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
    
  
  
    
  | // ==UserScript== | |
| // @name UESTC自动填充密码插件 | |
| // @namespace http://zhouchao.me/ | |
| // @version 1.1 | |
| // @description 还在为每次都要输入信息门户账号密码而烦恼?本插件能解放你,让你有更多的时间享受生活的乐趣。 | |
| // @author Chace | |
| // @match https://uis.uestc.edu.cn/amserver/UI/Login?goto=* | |
| // @grant none | |
| // ==/UserScript== | 
  
    
      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
    
  
  
    
  | // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |