This file contains 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
cmake_minimum_required(VERSION 3.16) | |
project(linklib_example LANGUAGES CXX) | |
set(CMAKE_AUTOMOC ON) | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core ) |
This file contains 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
typedef union{ | |
uint16_t u16; | |
uint8_t u8s[2]; | |
}uint8_16_t; | |
const uint8_16_t val= {.u8s={0xAA, 0xBB}}; |
This file contains 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> | |
int main() | |
{ | |
uint16_t ttt= (((uint16_t)0x00 & 0x7F)<<8 | (uint16_t)(int8_t)0xA7); | |
printf("%u", ttt); | |
return 0; | |
} |
This file contains 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
//return result of (a-b) without sign | |
#define myAbsSub(a,b) (a)>(b)? ((a)-(b)) : ((b)-(a)) |
This file contains 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> | |
using namespace std; | |
#include <cstdlib> | |
#include <string> | |
#include <vector> | |
unsigned char parse_hex(char c) | |
{ | |
if ('0' <= c && c <= '9') return c - '0'; |
This file contains 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
sudo journalctl --since="- 2 minutes" |
This file contains 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
#define elmof(arr) ( sizeof(arr[0])==0? 0 : sizeof(arr)/sizeof(arr[0]) ) |
This file contains 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
std::vector<char*> varguments; | |
{ | |
varguments.push_back(argv[0]); | |
// Source | |
varguments.push_back("./big_buck_bunny_short.mp4 "); | |
// Destination | |
varguments.push_back("./big_buck_bunny_short-processed.mp4"); | |
} |
This file contains 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 <stdint.h> | |
#include <string.h> | |
int main() | |
{ | |
char str[] = {"43074401014501014601014701014807314900044A004B019303FC07E7080C07F203DA087802E34C01014C756D69722D54312043756265536174202F2044657369676E6564206279204C756D69722853656F2053616E4A756E2C4C6565204A756E2C5061726B204A756E546165292020202020202020202020202020000020C24D"}; | |
if(strlen(str) % 2 == 0){ | |
printf("uint8_t arr[%lu]= { 0x", strlen(str)/2); | |
uint32_t i=0; |
This file contains 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 | |
# there are FFmpeg_fixing/build and FFmpeg_fixing/src folders | |
# $ cd FFmpeg_fixing/build/ | |
# $ ../src/configure >> conflog.txt | |
# copy part of conflog.txt to demuxers.txt | |
# since (exclude) "Enabled demuxers:" | |
cd /home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_config/ | |
rm -f new.txt |
NewerOlder