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
<html lang="ja"> <head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<title>test</title> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript" src="map.js"></script> | |
</head> | |
<body onload="initialize()"> | |
<div id="control" style="width: 100%; height: 10%"> | |
<input type="button" value="clear" onclick="clear_markers()"> |
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
Index: Makefile | |
=================================================================== | |
--- Makefile (revision 1322) | |
+++ Makefile (working copy) | |
@@ -69,7 +69,7 @@ | |
endif | |
LDFLAGS := -L$(shell $(CC) -print-file-name=w32api) -static-libgcc | |
-LDLIBS := -mwindows -lcomctl32 -limm32 -lwinspool -lole32 -luuid | |
+LDLIBS := -mwindows -lcomctl32 -limm32 -lwinspool -lole32 -luuid -lshlwapi |
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
(function() { | |
function show_visits(url, tbody) | |
{ | |
var visit_keys = [ "id", "visitId", "visitTime", "referringVisitId", "transition" ]; | |
chrome.history.getVisits({ | |
"url": url, | |
}, function(visits) { | |
// clear previous result | |
while(tbody.firstChild) { |
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
s = [Array.new(24){rand(256).chr}.join].pack('m').chomp until /^\w+$/ =~ s | |
puts s |
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
fn fizzbuzz() { | |
for x in 1..100 { | |
if x % 3 == 0 { | |
print!("Fizz "); | |
} else if x % 5 == 0 { | |
print!("Buzz "); | |
} else if x % 3 == 0 && x % 5 == 0 { | |
print!("FizzBuzz "); | |
} else { | |
print!("{} ", x); |
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
fn sort(data: &mut Vec<i32>) { | |
for i in 0..data.len() { | |
for j in i..data.len() { | |
if data[i] > data[j] { | |
data.swap(i, j); | |
} | |
} | |
} | |
} |
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
use std::collections::HashMap; | |
use std::any::Any; | |
fn main() { | |
let funcs: Option<HashMap<isize, &Any>> = Some(HashMap::new()); | |
// expected expression, found keyword `fn` | |
let func = funcs.map(|v| (*v.get(0)).downcast_ref<fn(n: isize)>()); | |
} |
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
struct Foo { | |
pub foo: Vec<isize>, | |
} | |
impl Foo { | |
pub fn get_foo(&self) -> &Vec<isize> { | |
return &self.foo; | |
} | |
pub fn get_foo_mut(&mut self) -> &mut Vec<isize> { |
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 barcodeDetector = new BarcodeDetector({formats: ['qr_code']}); | |
const bodyElement = document.getElementById('body'); | |
bodyElement.ondragover = (event) => { | |
event.stopPropagation(); | |
event.preventDefault(); | |
event.dataTransfer.dropEffect = 'copy'; | |
}; |
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
<html> | |
<head> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core"></script> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-converter"></script> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgl"></script> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/pose-detection"></script> | |
</head> | |
<body> | |
<img id="image" src="./image.jpg"> |