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
<?php | |
$difference = 1.0; | |
$i = 0; | |
while(1.0 + $difference != 1.0) | |
{ | |
if ($i % 5 == 0) | |
printf("%4.0f | %16.8e | unequal 1\n", $i, $difference); |
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
difference = 1 | |
i = 0 | |
while 1 + difference != 1 | |
puts "#{i} | #{sprintf('%16.8e', difference)} | unequal 1" | |
difference = difference / 2.0 | |
i += 1 | |
end |
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
$http.get(url, { | |
headers: | |
Authorization: 'Bearer ' + authenticationService.getToken() | |
responseType: 'arraybuffer' | |
}) | |
.success((data) -> | |
image = new Image() | |
reader = new FileReader() | |
blob = new Blob([data]) |
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
<dom-module id="element-name"> | |
<style> | |
/* CSS rules for your element */ | |
</style> | |
<template> | |
<!-- local DOM for your element --> | |
<div>{{greeting}}</div> <!-- data bindings in local DOM --> | |
</template> | |
</dom-module> |
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
render() { | |
return ( | |
<GoogleMaps | |
containerProps={{ | |
style: { | |
height: "100%" | |
} | |
}} | |
ref="map" |
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
Api.with(getActivity()).request() | |
.authors() | |
.subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.map(authorJsonArray -> authorJsonArray.data) | |
.subscribe(authors -> { | |
realm.beginTransaction(); | |
realm.copyToRealmOrUpdate(authors); | |
realm.commitTransaction(); | |
}); |
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
package main | |
import ( | |
"github.com/tucnak/telebot" | |
"log" | |
"time" | |
) | |
var ( | |
bot *telebot.Bot |
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
<?php | |
$a = array(1 => 'a', true => 'b', 'c', "2" => 'd', 2 => "e", 0x1 => "g", 2e0 => "h"); | |
echo(count($a)); | |
var_dump($a); |
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
// Subtract deals with subtraction of all types of number. | |
func Subtract(left interface{}, right interface{}) interface{} { | |
var rleft, rright int64 | |
var fleft, fright float64 | |
var isInt = true | |
switch left.(type) { | |
case int: | |
rleft = int64(left.(int)) | |
case int8: | |
rleft = int64(left.(int8)) |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
// https://github.com/golang/go/tree/master/misc/wasm | |
func main() { |
OlderNewer