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
| let toStringTuples (x:string) = | |
| x.Split(",") | |
| |> Array.map (fun y -> y.Split("-") |> Array.map int) | |
| |> Array.map (fun y -> [| for i in y[0] .. y[1] -> i |] ) | |
| |> fun x -> (x[0], x[1]) | |
| let containsArrayMembers (a:int[]) (b:int[]) = | |
| Array.length (Array.filter (fun x -> Array.contains x b) a) = Array.length a | |
| let mightContain (a,b) = containsArrayMembers a b || containsArrayMembers b a |
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
| $data = json_decode(file_get_contents($restRequest)); | |
| foreach($data->DepartureBoard->Departure as $dep) | |
| { | |
| $bookval = (isset($dep->booking)) ? "mustBook" : NULL; | |
| $main[] = array($dep->time, $bookval); | |
| } | |
| print json_encode($main); |
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
| <pre><?php | |
| //sandbox.php | |
| $ar = array("test", "hello"); | |
| if (isset($ar[0]) == "test") { print "test 1 ok\n"; } | |
| if (isset($ar[2]) == "hello") { print "test 2 ok\n"; } |
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
| <meta charset="UTF-8"> | |
| <pre><?php | |
| //sort like a whore | |
| //sortera efter antalet f i värdet, flest blir högst | |
| //sorteringsfunktionen kontrollerar varje gång hur många f det finns i varje värde och sedan väger de 2 värdena mot varandra. | |
| // flest f hamnar längst ner | |
| $pussy = array("fkofpoin+9g890f", "k09k98jf+9jpoacmoif","fffffoof","asdfmivff"); |
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 | |
| //uppgift 1-4, 1-5, 1-6 | |
| $age = 19; | |
| $area = "N2"; | |
| $derby = true; | |
| $adultsonly = false; | |
| $price = 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
| $(function() { | |
| $("#menu-mainmenu li>ul").each(function() { | |
| var submeny = $(this); | |
| if (submeny.parent().hasClass("current-menu-item") == false) { | |
| submeny.hide(); | |
| } | |
| }); |
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() { | |
| $("#menu-mainmenu li>ul").each(function() { | |
| var submeny = $(this); | |
| if (submeny.parent().hasClass("current-menu-item") == false) { | |
| submeny.hide(); | |
| } | |
| }); |