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
const express = require('express') | |
const app = express() | |
const port = 3000 | |
app.get('/', (req, res) => res.send('Hello World!')) | |
app.listen(port, () => console.log(`Example app listening on port ${port}!`)) |
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
const express = require('express') | |
const fs = require('fs') | |
const app = express() | |
const port = 3000 | |
const hostname = '192.168.43.137' | |
const https = require('https') | |
app.listen(port,hostname,() => console.log(`Example app listening on https://${hostname}!`)) | |
var options = { |
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'> | |
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | |
<title>GeoAR.js TEST Project</title> | |
<script src='https://aframe.io/releases/0.9.2/aframe.min.js'></script> | |
<script src='https://raw.githack.com/jeromeetienne/AR.js/master/aframe/build/aframe-ar.min.js'></script> | |
<script src='https://rawgit.com/donmccurdy/aframe-extras/master/dist/aframe-extras.loaders.min.js'></script> | |
<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
function getLocation() { | |
if (navigator.geolocation) { // GPS를 지원하면 | |
navigator.geolocation.getCurrentPosition(function(position) { | |
alert(position.coords.latitude + ' ' + position.coords.longitude); | |
}, function(error) { | |
console.error(error); | |
}, { | |
enableHighAccuracy: false, | |
maximumAge: 0, | |
timeout: Infinity |
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
🌞 Morning 82 commits ███████▍░░░░░░░░░░░░░ 35.7% | |
🌆 Daytime 41 commits ███▋░░░░░░░░░░░░░░░░░ 17.8% | |
🌃 Evening 2 commits ▏░░░░░░░░░░░░░░░░░░░░ 0.9% | |
🌙 Night 105 commits █████████▌░░░░░░░░░░░ 45.7% |
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 getPosition(point){ | |
// point is geolocation, point = {latitude:'123.xx',longitude:'37.xx'} | |
const camera = document.querySelector('[gps-camera]').components['gps-camera']; | |
let position = { x: 0, y: 0, z: 0 }; | |
// update position.x | |
let dstCoords = { | |
longitude: point.longitude, | |
latitude: camera.currentCoords.latitude, | |
}; |
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 glob | |
import os | |
from PIL import Image | |
def combineImage(full_width,full_height,image_key,image_list,index): | |
canvas = Image.new('RGB', (full_width, full_height), 'white') | |
output_height = 0 | |
for im in image_list: |
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
#ifndef NSAttributedString_Extension_h | |
#define NSAttributedString_Extension_h | |
NS_ASSUME_NONNULL_BEGIN | |
@interface NSAttributedString (Extension) | |
+ (NSAttributedString *)stringWithFormat:(NSAttributedString *)format, ... NS_REQUIRES_NIL_TERMINATION; | |
@end | |
NS_ASSUME_NONNULL_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
@property BOOL isKeyboardLoaded; | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillChange:) | |
name:UIKeyboardWillChangeFrameNotification | |
object:nil]; | |
} |
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
@property CGFloat keyboardHeight; | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
_keyboardHeight = 0; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillChange:) | |
name:UIKeyboardWillChangeFrameNotification | |
object:nil]; | |
} |
OlderNewer