这里我们拿 Android 上一款开源的播客播放器 AntennaPod 举例。
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 Bitmap Draw(Color subjectCol, string subjectStr, Color statusCol, string statusStr) { | |
| var fullHeight = 0; | |
| var fullWidth = 0; | |
| var padding = 8; | |
| var shadowOffset = 5; | |
| var font = new Font("Segoe UI", 100, GraphicsUnit.Pixel); | |
| var maxWidth = (subjectStr.Length + statusStr.Length) * 100 + 4 * padding; | |
| Bitmap bitmap = new Bitmap(maxWidth, 200); | |
| using (Graphics g = Graphics.FromImage(bitmap)) |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>d3.tip.js - Tooltips for D3</title> | |
| <meta charset="utf-8" /> | |
| <title>Bar Chart</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script> | |
| <script type="text/javascript" src="../index.js"></script> | |
| <script type="text/javascript"> | |
| data = [{"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, |
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 query = { | |
| url: 'http://stackoverflow.com/questions/31095166/angular-mocha-tests-fail-when-i-add-multiple-controllers-to-the-same-module', | |
| type: 'html', | |
| map: { | |
| title: { | |
| selector: "#question-header h1 a", | |
| extract: "text" | |
| }, | |
| description: { | |
| selector: ".question .postcell .post-text", |
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
| interface PromiseState { | |
| status: number; | |
| } | |
| class Promise { | |
| $$state: PromiseState; | |
| constructor() { | |
| this.$$state = { status : 0 }; | |
| } | |
| then(onFulfilled, onRejected, progressBack) { | |
| var result = new Deferred(); |
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
| input { | |
| file { | |
| type => "IISLog" | |
| path => "C:/inetpub/logs/LogFiles/W3SVC*/*.log" | |
| start_position => "beginning" | |
| } | |
| } | |
| filter { |
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 test = ` | |
| {"results":[{"extensions":[{"publisher":{"publisherId":"a5c25faf-bf60-4941-81b9-9a852b96c5fb","publisherName":"ms-vscode","displayName":"ms-vscode","flags":"none"},"extensionId":"c3c225bf-758d-4db6-9341-00952baff6dd","extensionName":"node-debug","displayName":"Node Debug","flags":"validated, public","lastUpdated":"2016-04-26T16:14:04.087Z","publishedDate":"2015-11-22T07:57:09.457Z","shortDescription":"%extension.description%","versions":[{"version":"0.0.2","flags":"validated","lastUpdated":"2016-04-26T16:14:04.557Z","assetUri":""},{"version":"0.0.1","flags":"validated","lastUpdated":"2015-11-22T07:57:09.79Z","assetUri":""}],"categories":["Debuggers"],"tags":["vscode"],"statistics":[{"statisticName":"install","value":1574},{"statisticName":"trendingdaily","value":7.013358778625954},{"statisticName":"trendingmonthly","value":90.17175572519083},{"statisticName":"trendingweekly","value":38.57347328244275}]},{"publisher":{"publisherId":"a5c25faf-bf60-4941-81b9-9a852b96c5fb","publisherName":"rebornix", |
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
| <?xml version="1.0"?> | |
| <root> | |
| <item> | |
| <name>For Topre REALFORCE 87u Users</name> | |
| <devicevendordef> | |
| <vendorname>TopreCorporation</vendorname> | |
| <vendorid>0x0853</vendorid> | |
| </devicevendordef> | |
| <item> | |
| <name>Fix FN + F1..F12 and functional keys</name> |
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
| #!/bin/sh | |
| pass=true | |
| RED='\033[1;31m' | |
| GREEN='\033[0;32m' | |
| NC='\033[0m' | |
| echo "Running Linters:" | |
Open a TypeScript project, or whatever project whose language supports it. Move cursor to a symbol which is defined elsewhere, press F12, move hjkl to see if the cursor is positioned correctly.
- Open the same file in two Group Editors by clicking
Split Editorbutton. Switching between these two windows by pressing<C-w> hlor using Mouse. After switching window, presshjklto see the cursor position is updated correctly. - Open different files in two Group Editors. Other steps are the same as above.
Make sure visual selection still works by pressing "go to matching brace" % command.


