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
/// <summary> | |
/// environment : jenkins, dotnet | |
/// jenkins plugin : junit, mstest | |
/// </summary> | |
import hudson.tasks.test.AbstractTestResultAction | |
import hudson.model.Actionable | |
def webhook = "" // set your webhook url |
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
// Public-domain code by Darel Rex Finley, 2006. | |
// http://alienryderflex.com/shortest_path | |
// javascript code by keicoon, 2019. | |
'use strict'; | |
function pointInPolygonSet(testX, testY, allPolys) { | |
let oddNodes = false; | |
let polyI, i, j; |
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
new Promise((resolve, reject) => { | |
var apiKey = GetGoogleSecret(); | |
var { source, target } = GetRegion(text); | |
var apiurl = "https://www.googleapis.com/language/translate/v2?key=" + apiKey + "&source=" + source + "&target=" + target + "&q="; | |
$.ajax({ | |
url: apiurl + encodeURIComponent(text), | |
dataType: 'jsonp', | |
success: function(data) { | |
var result = data.data.translations[0].translatedText; |
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
new Promise((resolve, reject) => { | |
var xhr = new XMLHttpRequest(); | |
xhr.open("POST", 'https://openapi.naver.com/v1/papago/n2mt'); | |
var myHeader = Object.assign({ 'Content-Type': 'application/x-www-form-urlencoded' }, GetPapagoSecert()); | |
for (var key in myHeader) { | |
xhr.setRequestHeader(key, myHeader[key]); | |
} | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4) { |
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
new Promise((resolve, reject) => { | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", `https://endic.naver.com/searchAssistDict.nhn?query=${text}`, true); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4) { | |
const content_word = /<div class="box_a">((.|\n)*?)<\/div>/g | |
const filter_word = /<span class="fnt_k20"><strong>(.+)<\/strong><\/span>/g | |
const body = xhr.responseText; | |
let words = []; |
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
DataFlow in TPL | |
https://docs.microsoft.com/ko-kr/dotnet/standard/parallel-programming/dataflow-task-parallel-library | |
MagicOnion | |
https://github.com/Cysharp/MagicOnion | |
configuration-builder | |
https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.configuration.configurationbuilder?view=aspnetcore-2.2 |
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
function matMul(a, b, transposeA = false, transposeB = false) { | |
if (a.shape.length == b.shape.length | |
&& (transposeA ? a.shape[a.shape.length - 2] : a.shape[a.shape.length - 1] | |
== transposeB ? b.shape[b.shape.length - 1] : b.shape[b.shape.length - 2])) { | |
const shapeA = a.shape; | |
const shapeB = b.shape; | |
const arrA = a.dataSync(); | |
const arrB = b.dataSync(); |
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
* ASCII text | |
"use strict"; | |
function NormalizeVector(v) { | |
const l = 1 / (v.x * v.x + v.y + v.y); | |
v.x *= l; v.y *= l; | |
return v; | |
} | |
function GetAngleBetweenVectors(pre, cur) { |
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
//####################################### | |
// Selector Promise | |
class Selector extends Task { | |
run() { | |
let index = 0, length = this.children.length | |
return new Promise((resolve, reject) => { | |
const tick = () => { | |
this.children[index].run().then( | |
() => { | |
resolve() |