An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| getRequest(url: string): Promise<any> { | |
| return new Promise<any>( | |
| function (resolve, reject) { | |
| const request = new XMLHttpRequest(); | |
| request.onload = function () { | |
| if (this.status === 200) { | |
| resolve(this.response); | |
| } else { | |
| reject(new Error(this.statusText)); | |
| } |
| <apex:page > | |
| <!-- download the jstree from jstree.com and upload the dist directory as a static resource --> | |
| <link href="{!URLFOR($Resource.jsTree, 'themes/default/style.min.css')}" rel="stylesheet" /> | |
| <script src="{!URLFOR($Resource.jsTree, 'libs/jquery.js')}"></script> | |
| <script src="{!URLFOR($Resource.jsTree, 'jstree.min.js')}"></script> | |
| <script src="{!URLFOR($Resource.jsTree, 'jstree.min.js')}"></script> | |
| <!-- | |
| Change the remoteObjectModel name="Account and |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>百度地图 JavaScript API 极速版自定义覆盖物</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" /> | |
| <style> | |
| body, | |
| html, | |
| #mapdemo { |
| // Based on algorithm given at http://wp.me/pWWz3-14 | |
| static string Convert15CharTo18CharId(string id) | |
| { | |
| if (string.IsNullOrEmpty(id)) throw new ArgumentNullException("id"); | |
| if (id.Length == 18) return id; | |
| if (id.Length != 15) throw new ArgumentException("Illegal argument length. 15 char string expected.", "id"); | |
| var triplet = new List<string> {id.Substring(0, 5), id.Substring(5, 5), id.Substring(10, 5)}; | |
| StringBuilder str = new StringBuilder(5); | |
| string suffix = string.Empty; |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| # /.idea | |
| /.idea/* |