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 | |
| $fileName = $_POST["fileName"]; | |
| // here, search for the file recursively in all folders down from this level | |
| // and print the file path if found | |
| // otherwise, print OMG A BEAR! FILE NOT FOUND. | |
| ?> | |
| <html> | |
| <head> | |
| <title>File Search</title> |
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 | |
| /** | |
| * Basic interface that represents a single view (HTML page) | |
| */ | |
| interface IView { | |
| /** | |
| * Renders and displays the HTML. | |
| * For example - should work like $smarty->display("some.tpl") |
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 | |
| $v = new View(); // some class that implements the IView inteface | |
| $v->setTitle("Use case for the homework"); | |
| $v->setJavascriptFolder("js"); | |
| $v->setCSSFolder("styles"); | |
| $v->addJavascriptFiles(array("jquery.js", "custom.js")); | |
| $v->addCSSFiles(array("jquery.css", "custom.css")); | |
| $v->assignTemplateVariable("message", "Hello!"); |
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
| <html> | |
| <head> | |
| <title>Use case for the homework</title> | |
| <link rel="stylesheet" href="styles/jquery.css" type="text/css" media="screen" /> | |
| <link rel="stylesheet" href="styles/custom.css" type="text/css" media="screen" /> | |
| <script src="js/jquery.js" type="text/javascript" language="javascript" charset="utf-8"></script> | |
| <script src="js/custom.js" type="text/javascript" language="javascript" charset="utf-8"></script> | |
| </head> | |
| <body> |
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
| import Data.List | |
| -- Фунцкията проверява дали между двата списъка има поне 1 общ елемент | |
| -- пример - между [1,2,3] и [4,5,6] няма да има общ елемент и няма да съвпада с условието на задачата | |
| -- функцинята nub връща списък от уникални елементи | |
| containsOneElement :: Eq a => [a] -> [a] -> Bool | |
| containsOneElement a b = (length (a ++ b) /= length (nub (a ++ b))) | |
| -- фунцията проверява дали check изпълнява условието с всеки един от подсписъците на [[a]] | |
| checkEach :: Eq a => [a] -> [[a]] -> Bool |
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 TODO List</title> | |
| <link rel="stylesheet" type="text/css" href="main.css"> | |
| </head> | |
| <body> | |
| <div id="todoListContainer"> | |
| <ul id="todoListBody"> |
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 | |
| header('Content-Type: application/json; charset=utf-8'); | |
| $id = 1; | |
| $allNames = array( | |
| array("name" => "Ivan Ivanov", "id" => $id++), | |
| array("name" => "Radoslav Georgiev", "id" => $id++), | |
| array("name" => "Мартин Йорданов", "id" => $id++), | |
| array("name" => "Мартин Анев", "id" => $id++), | |
| array("name" => "Петър Събев", "id" => $id++), | |
| array("name" => "Виктория Христова", "id" => $id++), |
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
| { | |
| "bachelor" : { | |
| "label" : "Бакалавър", | |
| "Informatics" : { | |
| "label" : "Информатика", | |
| "year1" : { | |
| "label" : "1ви курс", | |
| "flows" : [ | |
| { | |
| "monday" : { |
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
| ; в този вариант, функцията compose връща директно резултата | |
| ; като изпълниш (f (g x)) - ако x е число, накрая просто ще ти върне някакъв резултат | |
| (define (compose-first f g x) | |
| (g (f x))) | |
| ; например това извикване ще ти даде директно резултат 2 | |
| (compose-first (lambda (x) (+ x 1)) (lambda (x) (- x 1)) 2) | |
| ; този compose, не ти връща директно скаларен резултат |
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
| /* global module, console */ | |
| module.exports = function(http, port) { | |
| 'use strict'; | |
| var routes = {}; | |
| var exportMethods = {}; | |
| var middlewares = []; | |
| ['get', 'post', 'put', 'delete'].forEach(function(method) { | |
| routes[method] = routes[method] || {}; |
OlderNewer