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
| int n = 0; | |
| void foo() { | |
| void* x = nullptr; | |
| printf("%d\n", ++n); | |
| if (n >= 100) { | |
| exit(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
| #include <iostream> | |
| #include <vector> | |
| #include <stdio.h> | |
| #include <random> | |
| #include <chrono> | |
| class Point { | |
| public: | |
| double x, y; |
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
| module Du1 where | |
| import Prelude hiding (length, zip, zipWith, reverse, min) | |
| -- 1. length of a list | |
| length :: [t] -> Int | |
| length [] = 0 | |
| length (x:xs) = 1 + length xs | |
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
| String[][] tabulka = new String[15][5]; | |
| try (BufferedReader br = new BufferedReader(new FileReader("pocasi.csv"))) | |
| { | |
| String s; | |
| int radek = 0; | |
| while ((s = br.readLine()) != null) | |
| { | |
| tabulka[radek++] = s.split(";"); | |
| } |
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 <iostream> | |
| void for1(int x) | |
| { | |
| int* arr = new int[x]; | |
| for (int i = 0; i < x; i++) | |
| { | |
| arr[i] = i; | |
| } |
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
| template <typename T, unsigned int S> | |
| void convolution(cv::Mat& original, cv::Mat& resultImg, T kernel[S][S]) | |
| { | |
| original.copyTo(resultImg); | |
| int offset = S / 2; | |
| T scale = 0; | |
| for (int i = 0; i < S; i++) | |
| { | |
| for (int j = 0; j < S; j++) |
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 <iostream> | |
| class A | |
| { | |
| public: | |
| void fn() & { | |
| std::cout << "A" << std::endl; | |
| } | |
| void fn() && { | |
| std::cout << "B" << std::endl; |
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
| void generate(int index, int wordSize, int alphabetSize, char* result, char base = 0) | |
| { | |
| for (int i = wordSize - 1; i >= 0; i--) | |
| { | |
| int toSkip = std::pow(alphabetSize, i); | |
| char c = index / toSkip; | |
| result[wordSize - i - 1] = base + c; | |
| index = index % toSkip; | |
| } | |
| } |
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
| str_hodnota = function(v, p) | |
| { | |
| sum(v * p); | |
| } | |
| rozptyl = function(v, p) | |
| { | |
| str_hodnota(v ** 2, p) - str_hodnota(v, p) ** 2 | |
| } | |
| var_koeficient = function(v, p) | |
| { |
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
| str_hodnota = function(v, p) | |
| { | |
| sum(v * p); | |
| } | |
| rozptyl = function(v, p) | |
| { | |
| str_hodnota(v ** 2, p) - str_hodnota(v, p) ** 2 | |
| } | |
| var_koeficient = function(v, p) | |
| { |
OlderNewer