This file contains 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
import gpxpy.gpx | |
gpx_file_r = open('input.gpx', 'r') | |
gpx = gpxpy.parse(gpx_file_r) | |
speed = [] | |
pick = True | |
data = [] | |
for track in gpx.tracks: |
This file contains 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 boolean isDebug(Context context){ | |
try { | |
Class<?> clazz = Class.forName(context.getPackageName() + ".BuildConfig"); | |
Field field = clazz.getField("DEBUG"); | |
return (Boolean) field.get(null); | |
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) { | |
e.printStackTrace(); | |
} | |
return false; | |
} |
This file contains 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
private void checkRxJavaOnError() { | |
String[] urls = {"https://www.google.co.jp/?gws_rd=ssl", | |
"http://techium.hatenablog.com/", | |
"http://localhost/"}; | |
Observable | |
.from(urls) | |
.subscribeOn(Schedulers.newThread()) | |
.map(new Func1<String, Boolean>() { |
This file contains 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 Botkit = require('botkit'); | |
var controller = Botkit.slackbot({ | |
debug: false | |
}); | |
controller.spawn({ | |
token: process.env.token | |
}).startRTM(); |
This file contains 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 Botkit = require('botkit'); | |
var controller = Botkit.slackbot({ | |
debug: false | |
}); | |
controller.spawn({ | |
token: process.env.token | |
}).startRTM(); |
This file contains 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> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var main = require("remote").require("./main"); | |
function notificationMainProcess() { | |
main.notificationMainProcess(); | |
} |
This file contains 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> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
function notification() { | |
new Notification("Hello World"); | |
} | |
</script> |
This file contains 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> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var main = require("remote").require("./main"); | |
// functionを引数に設定し、MainProcess側で実行する | |
function exampleRemoteArgsFunc() { | |
console.log("exampleRemoteArgsFunc"); |
This file contains 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> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var main = require("remote").require("./main"); | |
// 引数を設定し、MainProcess側に値を渡す | |
function exampleRemoteArgsText() { | |
console.log("exampleRemoteArgsText"); |
This file contains 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> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var main = require("remote").require("./main"); | |
// remoteでMainProcessのメソッドを呼び出す。 | |
function exampleRemote() { | |
console.log("exampleRemote"); |
NewerOlder