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
| Lambda.Server.register(Test2, :wait) | |
| task = fn(pid, seconds) -> | |
| result = Lambda.Server.run(Test2, :wait, [seconds*1000]) | |
| IO.puts 'result' | |
| IO.inspect result | |
| IO.puts 'send to' | |
| IO.inspect pid | |
| send(pid, result) | |
| end |
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
| #!/bin/bash | |
| draw_symbols(){ | |
| for k in $(seq $1 -1 0) | |
| do | |
| echo -n "$2" | |
| done | |
| } | |
| symbol='*' | |
| space=' ' | |
| for i in $(seq $1 -1 1) |
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 unittest | |
| from *filename* import shape_of | |
| class TestBodyMassIndex(unittest.TestCase): | |
| def test_shape_of(self): | |
| self.assertEqual(shape_of(14, 1), 'тежко недохранване') | |
| self.assertEqual(shape_of(15, 1), 'тежко недохранване') | |
| self.assertEqual(shape_of(15.1, 1), 'средно недохранване') |
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 class UICalculator implements UICalculatorInterface { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| } | |
| @Override | |
| public void inputTwoNumbers() { | |
| System.out.println("Please enter two numbers and an operation:"); |
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 interface UICalculatorInterface { | |
| void inputTwoNumbers(); | |
| void invalidArgument(String number, boolean first); | |
| void invalidArguments(String numberFirst, String numberSecond); | |
| void zeroDivision(); | |
| void outOfRange(int number); | |
| } |
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
| dividedDiff[nodes_, values_] := ( | |
| If[Length[nodes] == 1, | |
| values[[1]], | |
| (dividedDiff[nodes[[2 ;; Length[nodes]]], | |
| values[[2 ;; Length[nodes]]] ] - | |
| dividedDiff[nodes[[1 ;; Length[nodes] - 1]], | |
| values[[1 ;; Length[nodes] - 1]]])/(nodes[[ Length[nodes]]] - | |
| nodes[[1]]) | |
| ] | |
| ) |
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
| #include "Game.h" | |
| #include "Player.h" | |
| #include "Peasant.h" | |
| #include "Footman.h" | |
| #include "Archer.h" | |
| #include "Griffon.h" | |
| #include <iostream> | |
| #include <string> | |
| #include <algorithm> | |
| #include <vector> |