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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
/* eslint-disable */ | |
module.exports = { | |
name: "@yarnpkg/plugin-entrypoint-lockfiles", | |
factory: function (require) { | |
var plugin;(()=>{var e={490:e=>{const t="win32"===process.platform,n=t?"\\\\+":"\\/",i=t?"\\\\":"/",o=`((?:[^${i}]*(?:${i}|$))*)`,r=`([^${i}]*)`;e.exports=function(e,{extended:t=!1,globstar:i=!1,strict:s=!1,filepath:l=!1,flags:a=""}={}){let c="",f="",p={regex:"",segments:[]},u=!1,g=!1;const d=[];function w(e,{split:t,last:i,only:o}={}){"path"!==o&&(c+=e),l&&"regex"!==o&&(p.regex+="\\/"===e?n:e,t?(i&&(f+=e),""!==f&&(a.includes("g")||(f=`^${f}$`),p.segments.push(new RegExp(f,a))),f=""):f+=e)}let y,x;for(let n=0;n<e.length;n++)if(y=e[n],x=e[n+1],["\\","$","^",".","="].includes(y))w("\\"+y);else if("/"!==y)if("("!==y)if(")"!==y)if("|"!==y)if("+"!==y)if("@"===y&&t&&"("===x)d.push(y);else if("!"!==y)if("?"!==y)if("["!==y)if("]"!==y)if("{"!==y)if("}"!==y)if(","!==y)if("*"!==y)w(y);else{if("("===x&&t){d.push(y);continue}let s=e[n-1],l=1;for(;"*"===e[n+1];)l++,n++;let a=e[n+1];if(i){l>1&&("/"===s||void 0 |
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
fun add(first: String, second: String): String { | |
return intToRoman(romanToInt(first) + romanToInt(second)) | |
} | |
// It's important to keep it descending order | |
private val romanMap = linkedMapOf( | |
"M" to 1000, | |
"CM" to 900, | |
"D" to 500, | |
"CD" to 400, |
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 * as rx from "rxjs"; | |
import * as fs from "fs-promise"; | |
import * as path from "path"; | |
function readdir(dir) { | |
return rx.Observable.create((observer: rx.Observer<string>) => { | |
fs.readdir(dir).then(async files => { | |
for (const file of files) { | |
let fullPath = path.join(dir, file); |
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
// --- DOES NOT WORK | |
var repaint = function () { | |
wrappedPaint(buf.byteOffset, w, h); | |
imageData.data.set(buf); | |
ctx.putImageData(imageData, 0, 0); | |
window.requestAnimationFrame(repaint); | |
}; | |
init(); | |
repaint(true); |
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 codingdojo; | |
import com.google.common.base.Splitter; | |
public class Wrapper { | |
public static String wrap(String text, int chunkSize) { | |
return String.join("\n", Splitter.fixedLength(chunkSize).split(text)); | |
} | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Xunit; | |
using Xunit.Extensions; | |
namespace CodingDojo | |
{ | |
public class Dojo | |
{ |
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
(ns rps.core | |
(:use clojure.core.match)) | |
(defn get-rps-winner [choice-1, choice-2] | |
(match [choice-1, choice-2] | |
[choice-2, choice-1] :draw | |
[:rock :paper] :paper | |
[:paper :rock] :paper | |
[:rock :scissors] :rock | |
[:scissors :rock ] :rock |
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
class Article { | |
... | |
public function saveArticle() { | |
... | |
} | |
} | |
// Takhle taky NE! :) |
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
00:15:30 | |
Kompilátory - zkušební test (3 otázky mají 2 správné odpovědi) | |
1 | |
Kompilátory | |
19 | |
Kompilátor se koncepčně skládá z dvou základních etap: | |
° | |
1 Analýza a syntéza. | |
0 Analýza a optimalizace kódu. | |
0 Lexikální a syntaktická analýza. |
NewerOlder