Skip to content

Instantly share code, notes, and snippets.

View vdonchev's full-sized avatar

mr.d vdonchev

View GitHub Profile
@vdonchev
vdonchev / validHtml.txt
Created February 23, 2017 17:02
Valid HTML Tags in Array
["!DOCTYPE", "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1 to h6", "head", "header", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]
<?php
$arr = preg_split('/\s+/', trim(fgets(STDIN)));
$input = trim(fgets(STDIN));
while ($input != 'print') {
$tokens = preg_split('/\s+/', $input);
$command = $tokens[0];
array_shift($tokens);
switch ($command) {
case 'add':
<?php
$str = strtolower(trim(fgets(STDIN)));
for ($i = 0; $i < strlen($str); $i++) {
if (ctype_alpha($str[$i])) {
$pos = letterPosition($str[$i]);
echo "{$str[$i]} -> {$pos}\n";
}
}
function letterPosition($letter)
function KOR() {
// hardKORs the answer
$('#root').append($('<form>'));
$('#root').append($('<ul>').append($('<li>').text('Sofia'), $('<li>').text('Belgrad'), $('<li>').text('Athens')))
}
class Pc {
constructor(type) {
this.id = Pc.getId();
this.type = type;
}
static getId() {
if (!Pc.id) {
Pc.id = 0;
}
namespace _01.SecondNatureV2
{
using System;
using System.Collections.Generic;
using System.Linq;
public static class Program
{
private static List<int> secondNatureFlowers = new List<int>();
namespace _01.JediMeditation
{
using System;
using System.Collections.Generic;
using System.Linq;
public static class JediMeditation
{
private static readonly List<List<string>> OrderedJedis = new List<List<string>>();
private static bool yodaExists;
namespace _05.CalculateSequenceWithQueue
{
using System;
using System.Collections.Generic;
using System.Numerics;
public static class CalculateSequenceWithQueue
{
public static void Main()
{
using System;
using System.Collections.Generic;
namespace Shits
{
public static class Shits
{
public static void Main()
{
var elements = new Stack<int>();
namespace Medenka
{
using System;
using System.Text;
public static class Medenka
{
private static StringBuilder result = new StringBuilder();
static void Main(string[] args)