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
/*HEADER********************************************************************** | |
* Copyright (c) 2013 Freescale Semiconductor; | |
* | |
* Copyright 2008 Freescale Semiconductor, Inc. | |
* Copyright 1989-2008 ARC International | |
* | |
* This software is owned or controlled by Freescale Semiconductor. | |
* Use of this software is governed by the Freescale MQX RTOS License | |
* distributed with this Material. | |
* See the MQX_RTOS_LICENSE file distributed for more details. |
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
/* Header file with all the essential definitions for a given type of MCU */ | |
#include "MK60D10.h" | |
/* Macros for bit-level registers manipulation */ | |
#define GPIO_PIN_MASK 0x1Fu | |
#define GPIO_PIN(x) (((1)<<(x & GPIO_PIN_MASK))) | |
/* Constants specifying delay loop duration */ | |
#define DELAY_T 200000 |
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
news.bbc.co.uk. CNAME newswww.bbc.net.uk. 2 | |
newswww.bbc.net.uk. A 212.58.244.56 1 | |
newswww.bbc.net.uk. A 212.58.246.80 1 | |
www.bbc.co.uk. CNAME www.bbc.net.uk. 2 | |
www.bbc.net.uk. A 212.58.246.95 2 | |
www.bbc.net.uk. A 212.58.244.71 2 | |
static.bbci.co.uk. CNAME static-bbci.bbc.net.uk. 2 | |
static-bbci.bbc.net.uk. CNAME static.bbci.co.uk.edgekey.net. 2 | |
static.bbci.co.uk.edgekey.net. CNAME e3891.g.akamaiedge.net. 2 | |
e3891.g.akamaiedge.net. A 104.123.225.99 18 |
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
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock |
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
/* | |
* \brief Checks if the current token is the expected one. | |
* If it is. It either frees the token and its memory | |
* or just moves on. In case of EOF, the function gets | |
* blocked for futher token getting. Just prints the error message. | |
* \param expected_token_type The expected token by syntax | |
* \return bool value, wether the token was found or not | |
* | |
* @TODO refactor a bit | |
*/ |
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
#ifndef TOKEN_H | |
#define TOKEN_H | |
/* | |
+ ---------------------------- + | |
| TOKEN DATA STRUCTURE def. | | |
+ --------------------------- + | |
*/ | |
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
#ifndef ERRORCODES_H | |
#define ERRORCODES_H | |
/* | |
+ ---------------------------- + | |
| temporary macro error codes | | |
+ --------------------------- + | |
as defined in ifj2017.pdf |
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
/* | |
* IPS domaca uloha 1. | |
* Paralelni GREP | |
* 2016/17 | |
* xmarko15 | |
* xnanoa00 | |
* | |
* @TODO osetrit chyby | |
* @TODO vycistit kod | |
* @TODO otestovat |
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 bubble_sort(std::vector<int> &v) | |
{ | |
while(1) | |
{ | |
bool swapped = false; | |
for(int i = 0; i < v.size() - 1; ++i) | |
{ | |
if (v[i] > v[i + 1]) | |
{ | |
std::swap(v[i], v[i + 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
bool isPrime(int &n) { | |
if (n < 2) { return false; } | |
if (n == 2) { return true; } | |
// this can be optimized, no need to check for multiples of 2 | |
// condition in for loop can be a sqrt of n | |
for (int i=2; i <= n / 2; ++i) | |
if (n % i == 0) | |
return false; |
NewerOlder