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
const http = require("http"); | |
const urlParser = require("url"); | |
// GET, POST | |
// http://localhost:3000/kategoriler | |
// http://localhost:3000/?name=John&age=20 | |
// http://localhost:3000/ | |
http | |
.createServer((req, res) => { |
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
const fs = require("fs"); | |
const Promise = require("bluebird"); | |
Promise.config({ | |
cancellation: true, | |
}); | |
const TelegramBot = require("node-telegram-bot-api"); | |
const token = `TOKEN`; | |
const bot = new TelegramBot(token, { polling: 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
const calcGain = (values, period = 14) => { | |
var results = []; | |
var counter = 1; | |
var gainSum = 0; | |
var avgGain; | |
var gain; | |
for (let i = 1; i < values.length; i++) { | |
var currentValue = values[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
{% apply spaceless %} | |
<?xml version="1.0" encoding="utf-8"?> | |
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"> | |
<ext:UBLExtensions> | |
<ext:UBLExtension> | |
<ext:ExtensionContent/> | |
</ext:UBLExtension> | |
</ext:UBLExtensions> | |
<cbc:UBLVersionID>2.1</cbc:UBLVersionID> | |
<cbc:CustomizationID>TR1.2</cbc:CustomizationID> |
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
/** | |
* Calculate the center/average of multiple GeoLocation coordinates | |
* Expects an array of objects with .latitude and .longitude properties | |
* | |
* @url http://stackoverflow.com/a/14231286/538646 | |
*/ | |
function averageGeolocation(coords) { | |
if (coords.length === 1) { | |
return coords[0]; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Map</title> | |
<meta name="viewport" content="initial-scale=1.0"> | |
<meta charset="utf-8"> | |
<style> | |
/* Always set the map height explicitly to define the size of the div | |
* element that contains the map. */ | |
#map { |
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
<template> | |
<view class="container"> | |
<view class="top-container"><text>a</text> | |
</view> | |
<view class="bottom-container"> | |
<view class="container-content"> | |
<touchable-opacity class="content-button"> | |
<linear-gradient class="button-linear-gradient" :colors="['rgba(255,255,255,1)','rgba(237,237,237,1)']"> | |
<m-icon ios="ios-repeat" android="md-repeat" :size="34"/> |
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
<?php | |
class procces { | |
private $dir; | |
public function setDir($dir) { | |
$this->dir=$dir; | |
} | |
public function add($pidFileName, $outputFileName, $runningFileDir) { |