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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/alexjlockwood/gcm" | |
| ) | |
| func main() { | |
| // Create the message to be sent. | |
| data := map[string]interface{}{"push_id": "10131233", "time": "2016-02-23T06:43:13.265Z", "data": "{'title':'test'}"} regIDs := []string{"device-token-y5g"} |
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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/SlyMarbo/rss" | |
| "github.com/julianshen/go-readability" | |
| "github.com/parnurzeal/gorequest" | |
| "github.com/yanyiwu/gojieba" | |
| ) |
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
| package main | |
| import ( | |
| "crypto/md5" | |
| "encoding/json" | |
| "errors" | |
| "fmt" | |
| "io" | |
| "log" | |
| "regexp" |
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
| // | |
| // ViewController.swift | |
| // mapanitest | |
| // | |
| // Created by Julian Shen on 2016/10/4. | |
| // Copyright © 2016年 cowbay.wtf. All rights reserved. | |
| // | |
| import UIKit | |
| import MapKit |
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
| function isPrime(n) { | |
| if(isNaN(n) || !isFinite(n) || n%1 || n<2) { | |
| return false; | |
| } | |
| if(n%2==0) return (n==2); | |
| if(n%3==0) return (n==3); | |
| var m = Math.sqrt(n); | |
| for(var i = 5 ; i < m; i++) { |
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
| function _strstr(str1, str2){ | |
| var i = 0; | |
| for(var c of str2) { | |
| if(str1[i++] != c) { | |
| return false; | |
| } | |
| } | |
| return true; | |
| } |
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
| package main | |
| import ( | |
| "fmt" | |
| "image/jpeg" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "os" | |
| "path/filepath" |
OlderNewer