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 "stdio.h" | |
| #include "stdlib.h" | |
| long int parse() | |
| { | |
| long int bytes; | |
| char str[4096]; | |
| int indexes[10]; | |
| char* c; | |
| char* pat = "RX bytes:"; |
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 "stdio.h" | |
| #include "stdlib.h" | |
| long int parse() | |
| { | |
| long int bytes; | |
| char str[4096]; | |
| int indexes[10]; | |
| char* c; | |
| FILE* f = fopen( "output", "r"); |
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
| read_stdin_to_list() -> | |
| case io:fread("","~d") of | |
| {ok,[A]} -> [ A | read_stdin_to_list() ]; | |
| _ -> [] | |
| 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
| print_list([]) -> true; | |
| print_list(A) -> | |
| [ Head | Tail ] = A, | |
| io:fwrite("~p~n", [Head]), | |
| print_list(Tail). |
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
| read_stdin_to_list() -> | |
| case io:fread("","~d") of | |
| {ok,[A]} -> [ A | read_stdin_to_list() ]; | |
| _ -> [] | |
| end. | |
| print_list([]) -> true; | |
| print_list(A) -> | |
| [ Head | Tail ] = 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
| #include "stdio.h" | |
| #include "stdlib.h" | |
| #include "math.h" | |
| #define N 5000000L | |
| float rand_1() | |
| { | |
| float x = (float)rand()/(float)(RAND_MAX/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
| module fulladder(A, B, Cin, S, Cout); | |
| input A, B, Cin; | |
| output S, Cout; | |
| assign S = (A^B)^C; | |
| assign Cout = ((A^B)&C) | (A&B); | |
| endmodule | |
| module two_bit_fulladder(A, B, Cin, S, Cout); | |
| input [1:0] A, B; | |
| input Cin; |
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 logging | |
| from telegram.ext import Updater, CommandHandler, MessageHandler, Filters | |
| from telegram import Bot | |
| # Enable logging | |
| logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', | |
| level=logging.INFO) | |
| logger = logging.getLogger(__name__) |
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
| # only for cmake --version >= 3.5.1 | |
| cmake_minimum_required(VERSION 3.5.1) | |
| # project name | |
| project(learncpp) | |
| # creates the variable EXEC as executable name | |
| set(EXEC learncpp) | |
| # set the C++ standard |