repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5-mod/src/message_queue/message_queue.c | <reponame>Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming<gh_stars>0
#include "message_queue.h"
mqd_t get_opened_message_queue(const char message_queue_name[])
{
printf("\t\"queue\": \"%s\" - открывается очередь\n", message_queue_name);
struct mq_attr mqAttr; ... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5/src/main.c | <filename>lab6/src/option5/src/main.c
#include <unistd.h> //fork()
#include <sys/types.h>
#include <stdio.h> //printf()
#include <signal.h> //SIGUSR1
#include <math.h> //sqrt()
#include "message_queue/message_queue.h"
#include "my_ftoa/my_ftoa.h"
void my_handler(int nsig);
void input_a_b_c(double* ... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5/src/my_ftoa/my_ftoa.h | #ifndef __MY_FTOA_H__
#define __MY_FTOA_H__
#include <stdio.h> //sprintf() printf()
#include <stdlib.h> //calloc() free()
#include <string.h> //strlen() strcpy()
// функция преобразует float в строку и возвращает её (её надо очищать)
char* my_ftoa(float number);
#endif |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab5/src/option5-part2/src/main.c | <gh_stars>0
// библиотеки
#include <stdio.h> //printf()
#include <unistd.h> //read()
#include <stdlib.h> //calloc(), free(), realloc(), rand()
#include <string.h> //strcmp(), strlen(), atoi(), strcat()
// прототипы
struct WordNode
{
char* word;
struct WordNode* left;
struct WordNode* right;
};
struct Wo... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab7/src/option5/one.c | #include <unistd.h>
#include <stdio.h> //printf()
#include <stdlib.h> //rand()
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <fcntl.h>
#include <semaphore.h>
#include <pthread.h>
#include <time.h> //time(), localtime
int get_random(int a, int b);
void print_real_t... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5-mod/src/app1.c | #include <stdio.h> // printf() scanf()
#include <stdlib.h> // free()
#include "message_queue/message_queue.h"
#include "my_ftoa/my_ftoa.h"
#include "print_real_time/print_real_time.h"
int main(void)
{
double a, b, c; // стороны треугольника
printf("a = ");
scanf("%lf"... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5-mod/src/print_real_time/print_real_time.c | <gh_stars>0
#include "print_real_time.h"
void print_real_time()
{
time_t now = time(0);
struct tm *ltm = localtime(&now);
printf(
"%02d:%02d:%02d\n",
1 + ltm->tm_hour, // часы
1 + ltm->tm_min, // минуты
1 + ltm->tm... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab5/src/example1/src/main.c | /* Программа, иллюстрирующая использование системных вызовов open(), write() и close() для записи информации в файл */
#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
int main(){
int fd;
size_t size;
char string[] = "Hello, world!";
/* Обнуляем маску создания файлов текущего процесса ... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5-mod/src/app2.c | <gh_stars>0
#include <math.h> // sqrt()
#include "message_queue/message_queue.h"
#include "my_ftoa/my_ftoa.h"
#include "print_real_time/print_real_time.h"
int main(void)
{
print_real_time();
mqd_t bbb = get_opened_message_queue("/abc"); // открываю очередь /abc
print_real_time();
char* msg_a ... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab4/src/kalkul2/app/calculate.c | <filename>lab4/src/kalkul2/app/calculate.c
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "calculate.h"
float Calculate(float Numeral, char Operation[4])
{
float SecondNumeral;
if( strncmp(Operation, "+", 1) == 0 )
{
printf("Второе слагаемое: ");
scanf("%f",&SecondNumera... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab5/src/option10-part3/src/main.c | <reponame>Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming
#include <stdio.h> //printf()
#include <stdlib.h> //calloc(), free()
#include <string.h> //strcpy()
int main(int argc, char* argv[])
{
if (argc <= 1)
{
printf("\nАргументы не переданы\n");
return 0;
... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5/src/message_queue/message_queue.h | <reponame>Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming
#ifndef __MESSAGE_QUEUE_H__
#define __MESSAGE_QUEUE_H__
#include <stdio.h> // printf()
#include <stdlib.h> // exit()
#include <string.h> // strlen()
#include <errno.h> // strerror() errno
#include <mque... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab4/src/kalkul2/app/calculate.h | <filename>lab4/src/kalkul2/app/calculate.h
#ifndef CALCULATE_H_
#define CALCULATE_H_
float Calculate(float Numeral, char Operation[4]);
#endif /* CALCULATE_H_ */
|
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5/src/my_ftoa/my_ftoa.c | <gh_stars>0
#include "my_ftoa.h"
char* my_ftoa(float number)
{
char* str = (char*) calloc(100, sizeof(char)); // выделяем память под строку
if (str == NULL) // выделилась память?
{
printf("Память не выделилась\n");
return NULL;
}
spri... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab4/src/kalkul2/app/main.c | #include <stdio.h>
#include "calculate.h"
int main(void)
{
float Numeral;
char Operation[4];
float Result;
printf("Число: ");
scanf("%f",&Numeral);
printf("Арифметическое действие (+,– ,*,/,pow,sqrt,sin,cos,tan): ");
scanf("%s",&Operation);
Result = Calculate(Numeral, Operation);
p... |
Pavel-Innokentevich-Galanin/BrSTU-4-sem_Operating-Systems-and-System-Programming | lab6/src/option5-mod/src/print_real_time/print_real_time.h | <filename>lab6/src/option5-mod/src/print_real_time/print_real_time.h
#ifndef __PRINT_REAL_TIME_H__
#define __PRINT_REAL_TIME_H__
#include <time.h> // time() localtime()
#include <stdio.h> // printf()
//функция печатает время: "чч:мм:сс\n"
void print_real_time();
#endif |
jetpropulsion/ComScan | Metrics.h | #pragma once
#include <cstdint>
#define MAX_CHARS_PER_1_UNSIGNED_BYTE 3 //255
#define MAX_CHARS_PER_2_UNSIGNED_BYTES 5 //65,535
#define MAX_CHARS_PER_3_UNSIGNED_BYTES 8 //16,777,215
#define MAX_CHARS_PER_4_UNSIGNED_BYTES 10 //4,294,967,295
#define MAX_CHARS_PER_5_UNSIGNED_BYTES... |
jetpropulsion/ComScan | Format.h | #pragma once
#include "Metrics.h"
#include <ios>
#include <iomanip>
#define JETLIB_ALIGN_FORMAT std::left
#define JETLIB_MAX_ALIGN_FORMAT std::right
#define JETLIB_RESET_FORMATW JETLIB_ALIGN_FORMAT << std::dec << std::setw(0) << std::setfill(L' ') << std::setprecision(0)
#define JETLIB_0000_F... |
jetpropulsion/ComScan | CRC32.h | <reponame>jetpropulsion/ComScan
#pragma once
#include <cstdint>
#include "JetLib.h"
namespace JetLib
{
namespace Hash
{
class CRC32
{
public:
typedef enum CRC32Poly : uint32_t
{
ANSI = 0x04C11DB7, //ANSI X3.66, default
ANSI_Rev = 0xEDB88320, //ANSI X3.66, reversed poly
... |
jetpropulsion/ComScan | JetLib.h | <filename>JetLib.h
#pragma once
#include <cassert>
//Macro LINE_INFO can provide information about file and line where possible error occured
#define LINE_SEPARATOR ", "
#define LINE_INFO __FILE__ LINE_SEPARATOR _CRT_STRINGIZE(__LINE__)
//Macro WIN32_ASSERT(expression) provides single line Win32 A... |
BlightsteelColossus-dev/MapReduce-in-C | actual_mapping.c |
void* chunk_map(void* argument){
struct map_argument* arg = (struct map_argument*) argument;
for(int i = arg->from; i < arg->to; i++){
arg->results[i] = (*(arg->f))(arg->things[i]);
}
return NULL;
} |
BlightsteelColossus-dev/MapReduce-in-C | mapping_struct.c | <filename>mapping_struct.c
struct map_argument {
void** things;
void** results;
void* (*f)(void*);
int from;
int to;
}; |
BlightsteelColossus-dev/MapReduce-in-C | is_prime.c | // returns 1 if the number is a prime, 0 otherwise
void* naivePrime(void* number){
int n = *((int*) number);
int* res = malloc(sizeof(int));
*res = 1;
for(int i = 2; i < n; i++){
if(n%i==0){
*res=0;
return res;
}
}
return res;
}
int main(int argc, char** ... |
BlightsteelColossus-dev/MapReduce-in-C | map_single_thread.c | <gh_stars>0
// generic single-threaded map implementation using void* and pointer arithmetics.
void** map(void** things, void* (*f)(void*), int length){
void** results = malloc(sizeof(void*)*length);
for(int i = 0; i < length; i++){
void* thing = things[i];
void* result = (*f)(thing);
... |
BlightsteelColossus-dev/MapReduce-in-C | parallelizing_map.c | void** concurrent_map(void** things, void* (*f)(void*), int length,
int nthreads){
void** results = malloc(sizeof(void*)*length);
struct map_argument arguments[nthreads];
pthread_t threads[nthreads];
int chunk_size = length/nthreads;
for(int j = 0 ; j < nthreads; j++){
... |
BRonen/Playground | C/Structs.c | #include <assert.h>
struct Test{
int var1;
int var2;
int var3;
};
void compareAB(struct Test* a, struct Test* b){
assert(b->var1 == a->var1);
assert(b->var2 == a->var2);
assert(b->var3 == a->var3);
}
int main(){
struct Test a;
struct Test b;
a.var1 = 0;
a.var2 = 1;
a.var3 = 2;
... |
BRonen/Playground | C/BinarySearch.c | <gh_stars>0
#include <stdio.h>
#include <assert.h>
int binarySearch(int* array, int min, int max, int value){
//Symmetry is better than avoiding pleonasm
if( min < 0 || min > max || max < min || 0 > max ){
return -1;
}
int index = (min+max)/2;
int result = index;
if(array[index] > value){
result ... |
BRonen/Playground | C/BinaryTrees/BinaryTree.c | #include <stdio.h>
#include <assert.h>
#include "BinaryTree.h"
int main(){
struct Bst *bst = bstCreate(106);
bstInsert(bst, 729);
bstInsert(bst, 22);
bstInsert(bst, 62);
bstInsert(bst, 18);
bstInsert(bst, 52);
bstInsert(bst, 78);
bstInsert(bst, 9);
bstInsert(bst, 5);
bstInsert(bst, 92);
bstInse... |
BRonen/Playground | C/Queue/QueueLL.h | /* Queue implemented with linked list */
#include <stdio.h>
#include <stdlib.h>
struct Node{
int data;
struct Node *next;
};
struct QueueLL{
int length;
struct Node *head;
struct Node *tail;
};
struct QueueLL queueLLCreate(){
struct QueueLL queueLL;
queueLL.length = 0;
queueLL.head = NULL;
queue... |
BRonen/Playground | C/ArithmeticOperators.c | #include <assert.h>
int main(){
int num1 = 7, num2 = 8;
float sum, sub, div, mul;
sum = (float)num1 + num2,
sub = (float)num1 - num2,
div = (float)num1 / num2,
mul = (float)num1 * num2;
assert(sum == 15);
assert(sub == -1);
assert(div == 0.875);
assert(mul == 56);
return 0... |
BRonen/Playground | C/CommaOperator.c | #include <assert.h>
int test(){
int a = 1, b = 2, c = 3;
int d = (a += 3, a + c);
assert(d == 7);
return a, b, c, d;
}
void main(){
int a = 1, b = 0;
b = test(), a;
assert(b == test());
a = 1, b = 0;
b = (test(), a);
assert(b == a);
}
|
BRonen/Playground | C/Arrays.c | <filename>C/Arrays.c
#include <assert.h>
#define size 4
int main(){
int arr[size] = {0, 1, 2, 3};
int* ptr = arr;
assert(*ptr == arr[0]);
for(int i = 0; i <= size; i++){
assert(i == *ptr);
ptr++;
}
return 0;
}
|
BRonen/Playground | C/LinkedList/LinkedList.h | #include <stdio.h>
#include <stdlib.h>
struct Node{
int index;
int data;
struct Node *next;
};
struct List{
int index;
int length;
struct Node *head;
};
struct List listCreate(){
struct List list;
list.index = -1;
list.length = 0;
list.head = NULL;
return list;
}
void listClear(struct Li... |
BRonen/Playground | C/BinaryTrees/BinaryTree.h | #include <stdlib.h>
#include <limits.h>
struct Bst{
int value;
struct Bst *left;
struct Bst *right;
};
struct Bst* bstCreate(int value){
struct Bst *bst = malloc(sizeof(struct Bst));
bst->value = value;
bst->left = NULL;
bst->right = NULL;
return bst;
}
void bstFree(struct Bst *... |
BRonen/Playground | C/Pointers.c | <gh_stars>0
#include <assert.h>
void func1(int *a){
*a = 1;
}
void func2(int *a){
*a = 2;
}
//receive a pointer to a pointer to a function
void changeValue(void (**ptr)()){
//set pointer of pointer to func2
*ptr = &func2;
}
int main (){
int a = 0;
void (*ptr)(); //pointer to "void function()... |
BRonen/Playground | C/Queue/QueueAL.h | <reponame>BRonen/Playground
/* Queue implemented with fixed size arrays */
#include <stdio.h>
#include <stdlib.h>
struct QueueAL{
int* buffer;
int length;
int* head;
int* tail;
};
struct QueueAL queueALCreate(int size){
struct QueueAL queueAL;
queueAL.buffer = malloc(sizeof(int)*size);
queueAL.length =... |
BRonen/Playground | C/Queue/Queue.c | #include <assert.h>
#include "QueueLL.h"
#include "QueueAL.h"
int main() {
//tests of queue made with a linked list
struct QueueLL queueLL = queueLLCreate();
assert(queueLLIsEmpty(&queueLL) == 1);
queueLLPush(&queueLL, 43);
queueLLPush(&queueLL, 43);
queueLLPush(&queueLL, 43);
... |
BRonen/Playground | C/Overflow.c | #include <assert.h>
int main(){
int a = 2147483647;
assert(a == 2147483647);
assert(++a == -2147483648);
a = 4294967295;
assert(a == -1);
assert(++a == 0);
return 0;
}
|
BRonen/Playground | C/HashTable/HashTable.c | <gh_stars>0
#include <assert.h>
#include <string.h>
#include "HashTable.h"
int main() {
struct HashTable *hash = hashtableCreate(5);
//hashtableDump(hash);
hashtableInsert(hash, "hello", "world");
hashtableInsert(hash, "24323", "world");
hashtableInsert(hash, "&*@#)", "world");
hashtableInsert(hash, " ... |
BRonen/Playground | C/Vector/Vector.c | <reponame>BRonen/Playground
#include <assert.h>
#include "Vector.h"
int main(){
struct Vector vec = vectorCreate();
assert(vec.length == 0);
assert(vec.capacity == SIZE);
for(int i = 1; i<50; i++){
vectorPush(&vec, i);
}
for(int i = 1; i<45; i++){
assert(vectorPop(&vec) == 50-i);
... |
BRonen/Playground | C/HashTable/HashTable.h | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
static unsigned int hashCode(char *key, unsigned int hashSize) {
unsigned long hash = 5381;
unsigned int c;
while((c = *key++)) {
hash = ((hash << 5) + hash) + c; // hash * 33 + c
}
return hash % hashSize;
};
/* Node */
struct Node {
char *ke... |
BRonen/Playground | C/DynamicMemory.c | <reponame>BRonen/Playground
#include <stdlib.h>
#include <assert.h>
#define size 5
int main(){
int* ptr;
ptr = malloc(size * sizeof(int));
assert(!(ptr == NULL));
int i;
for (i = 0; i < size; i++) {
*ptr = i;
ptr++;
}
ptr -= i;
for (i = 0; i < size; i++) {
assert... |
BRonen/Playground | C/Vector/Vector.h | <gh_stars>0
#include <stdlib.h>
#define SIZE 4
struct Vector{
int* data;
int length;
int capacity;
int* ptr;
};
struct Vector vectorCreate(){
struct Vector vec;
vec.data = malloc(SIZE*sizeof(int));
vec.ptr = vec.data;
vec.capacity = SIZE;
vec.length = 0;
return vec;
}
int vectorSize(s... |
BRonen/Playground | C/LinkedList/LinkedList.c | <filename>C/LinkedList/LinkedList.c
#include <assert.h>
#include "LinkedList.h"
void main() {
struct List list = listCreate();
assert(listIsEmpty(&list) == 1);
listPushFront(&list, 189);
listPushFront(&list, 298);
listPushFront(&list, 376);
listPushFront(&list, 456);
listPushFront(&list, 545);
l... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/Base/LKEncoder.h | <gh_stars>1-10
/**
* file : LKEncoder.h
* author : Rex
* create : 2017-02-17 16:59
* func :
* history:
*/
#ifndef __LKENCODER_H_
#define __LKENCODER_H_
/*
编码器基类声明公共接口
*/
#include <stdio.h>
#include <_types.h>
#include "aw_all.h"
typedef enum {
AWEncoderErrorCodeVTSessionCreateFailed,
AWEncoderErrorC... |
jjzhang166/AWLive | clibs/libaw/pushStream/encoder/aw_sw_faac_encoder.c | /*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
#include "aw_sw_faac_encoder.h"
#include "aw_all.h"
//faac 实例
static aw_faac_context *s_faac_ctx = NULL;
static aw_faac_config *s_faac_config = NULL;
//debug使用
static int32_t audio_cou... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/HW/LKHWH264Encoder.h | /**
* file : LKHWH264Encoder.h
* author : Rex
* create : 2017-02-17 17:01
* func :
* history:
*/
#ifndef __LKHWH264ENCODER_H_
#define __LKHWH264ENCODER_H_
#include "LKVideoEncoder.h"
typedef struct lk_encoder_t lk_encoder_t;
class LKHWH264Callback{
public:
virtual void handleH264(const unsigned char* dat... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/Base/LKMP4Encoder.h | /**
* file : LKMP4Encoder.h
* author : Rex
* create : 2017-02-20 15:04
* func :
* history:
*/
#ifndef __LKMP4ENCODER_H_
#define __LKMP4ENCODER_H_
#include "mp4v2/mp4v2.h"
typedef struct _MP4ENC_NaluUnit
{
int type;
int size;
unsigned char *data;
}MP4ENC_NaluUnit;
typedef struct _MP4ENC_Metadata
{
... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/Base/LKVideoEncoder.h | <reponame>jjzhang166/AWLive
/**
* file : LKVideoEncoder.h
* author : Rex
* create : 2017-02-17 17:00
* func :
* history:
*/
#ifndef __LKVIDEOENCODER_H_
#define __LKVIDEOENCODER_H_
#include "LKEncoder.h"
class LKVideoEncoder: public LKEncoder{
public:
LKVideoEncoder(int width=720, int height=1280, float qu... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/SW/LKSWFaacEncoder.h | <filename>AWLive/PushStream/LKEncoder/SW/LKSWFaacEncoder.h
/**
* file : LKSWFaacEncoder.h
* author : Rex
* create : 2017-02-17 17:02
* func :
* history:
*/
#ifndef __LKSWFAACENCODER_H_
#define __LKSWFAACENCODER_H_
#endif
|
jjzhang166/AWLive | AWMedia/AWMedia.h | <reponame>jjzhang166/AWLive<filename>AWMedia/AWMedia.h
//
// AWMedia.h
// AWMedia
//
// Created by Visionin on 17/2/17.
//
//
#import <UIKit/UIKit.h>
//! Project version number for AWMedia.
FOUNDATION_EXPORT double AWMediaVersionNumber;
//! Project version string for AWMedia.
FOUNDATION_EXPORT const unsigned char... |
jjzhang166/AWLive | clibs/3th-party/jrtplib/include/rtpaddress.h | /*
This file is a part of JRTPLIB
Copyright (c) 1999-2011 <NAME>
Contact: <EMAIL>
This library was developed at the Expertise Centre for Digital Media
(http://www.edm.uhasselt.be), a research center of the Hasselt University
(http://www.uhasselt.be). The library is based upon work done for
my thesis a... |
jjzhang166/AWLive | clibs/libaw/bs_type.h | <filename>clibs/libaw/bs_type.h
/**
* @file bs_type.h
* @author bushaofeng(<EMAIL>)
* @date 2011/11/21 16:31:25
* @brief
*
**/
#ifndef __BS_TYPE_H_
#define __BS_TYPE_H_
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/stat.... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/RTP/LKRtpSession.h | <filename>AWLive/PushStream/LKEncoder/RTP/LKRtpSession.h
//
// LKRtpSession.hpp
// AWLive
//
// Created by Visionin on 17/3/13.
//
//
#ifndef LKRtpSession_hpp
#define LKRtpSession_hpp
#include <stdio.h>
#include "rtpsession.h"
class LKRtpSession: public jrtplib::RTPSession{
public:
LKRtpSession(int port, int ... |
jjzhang166/AWLive | clibs/libaw/pushStream/encoder/aw_sw_faac_encoder.h | <filename>clibs/libaw/pushStream/encoder/aw_sw_faac_encoder.h
/*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
#ifndef aw_sw_faac_encoder_h
#define aw_sw_faac_encoder_h
/*
使用faac进行软编码:aac软编码器。
*/
#include "aw_faac.h"
#include "aw_e... |
jjzhang166/AWLive | clibs/libaw/common/aw_utils.h | /*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
/*
utils log等便利函数
*/
#ifndef aw_utils_h
#define aw_utils_h
#include <stdio.h>
#include <string.h>
#include "aw_alloc.h"
#define AWLog(...) \
do{ \
printf(__VA_ARGS__); \
printf("\n... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/Base/LKAudioEncoder.h | /**
* file : LKAudioEncoder.h
* author : Rex
* create : 2017-02-17 16:59
* func :
* history:
*/
#ifndef __LKAUDIOENCODER_H_
#define __LKAUDIOENCODER_H_
#endif
|
jjzhang166/AWLive | clibs/3th-party/jrtplib/include/rtcprrpacket.h | /*
This file is a part of JRTPLIB
Copyright (c) 1999-2011 <NAME>
Contact: <EMAIL>
This library was developed at the Expertise Centre for Digital Media
(http://www.edm.uhasselt.be), a research center of the Hasselt University
(http://www.uhasselt.be). The library is based upon work done for
my thesis a... |
jjzhang166/AWLive | AWLive/PushStream/Encoder/Base/AWVideoEncoder.h | <reponame>jjzhang166/AWLive
/*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
/*
视频编码器基类,只声明接口,和一些公共转换数据函数。
*/
#import "AWEncoder.h"
@interface AWVideoEncoder : AWEncoder
@property (nonatomic, copy) AWVideoConfig *videoConfig;
//旋... |
jjzhang166/AWLive | clibs/libaw/pushStream/rtmp/aw_streamer.c | /*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
#include "aw_streamer.h"
#include "aw_utils.h"
#include "aw_rtmp.h"
#include "aw_encode_flv.h"
#include <unistd.h>
#include <inttypes.h>
#include "aw_thread_poll.h"
#include "aw_array.h"... |
jjzhang166/AWLive | clibs/3th-party/jrtplib/include/rtcppacketbuilder.h | <filename>clibs/3th-party/jrtplib/include/rtcppacketbuilder.h
/*
This file is a part of JRTPLIB
Copyright (c) 1999-2011 <NAME>
Contact: <EMAIL>
This library was developed at the Expertise Centre for Digital Media
(http://www.edm.uhasselt.be), a research center of the Hasselt University
(http://www.uhasse... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/HW/LKHWAACEncoder.h | /**
* file : LKHWAACEncoder.h
* author : Rex
* create : 2017-02-17 17:00
* func :
* history:
*/
#ifndef __LKHWAACENCODER_H_
#define __LKHWAACENCODER_H_
#endif
|
jjzhang166/AWLive | clibs/libaw/common/aw_dict.c | <gh_stars>1-10
/*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
#include "aw_dict.h"
#include "aw_utils.h"
extern aw_dict_element *alloc_aw_dict_element(){
aw_dict_element *ele = (aw_dict_element *)aw_alloc(sizeof(aw_dict_element)... |
jjzhang166/AWLive | clibs/libaw/common/aw_rtmp.h | /*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
/*
提供了librtmp的连接、断开、发送数据等操作,并提供完整的事件处理及回调,包括断线重连等机制
*/
#ifndef aw_rtmp_h
#define aw_rtmp_h
#include "rtmp.h"
#include "aw_alloc.h"
#include <string.h>
typedef enum aw_rtmp_state{
... |
jjzhang166/AWLive | clibs/3th-party/jrtplib/include/rtprawpacket.h | /*
This file is a part of JRTPLIB
Copyright (c) 1999-2011 <NAME>
Contact: <EMAIL>
This library was developed at the Expertise Centre for Digital Media
(http://www.edm.uhasselt.be), a research center of the Hasselt University
(http://www.uhasselt.be). The library is based upon work done for
my thesis a... |
jjzhang166/AWLive | clibs/3th-party/jrtplib/include/rtpsessionsources.h | /*
This file is a part of JRTPLIB
Copyright (c) 1999-2011 <NAME>
Contact: <EMAIL>
This library was developed at the Expertise Centre for Digital Media
(http://www.edm.uhasselt.be), a research center of the Hasselt University
(http://www.uhasselt.be). The library is based upon work done for
my thesis a... |
jjzhang166/AWLive | clibs/3th-party/jrtplib/include/rtpmemoryobject.h | <gh_stars>1-10
/*
This file is a part of JRTPLIB
Copyright (c) 1999-2011 <NAME>
Contact: <EMAIL>
This library was developed at the Expertise Centre for Digital Media
(http://www.edm.uhasselt.be), a research center of the Hasselt University
(http://www.uhasselt.be). The library is based upon work done for... |
jjzhang166/AWLive | AWLive/PushStream/Encoder/SW/AWSWFaacEncoder.h | <gh_stars>1-10
/*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
/*
aac软编码器(faac)
*/
#import "AWAudioEncoder.h"
@interface AWSWFaacEncoder : AWAudioEncoder
@end
|
jjzhang166/AWLive | clibs/libaw/pushStream/encoder/aw_sw_x264_encoder.h | /*
copyright 2016 wanghongyu.
The project page:https://github.com/hardman/AWLive
My blog page: http://blog.csdn.net/hard_man/
*/
#ifndef aw_sw_x264_encoder_h
#define aw_sw_x264_encoder_h
/*
使用x264进行软编码:h264软编码器
*/
#include "aw_x264.h"
#include "aw_encode_flv.h"
#ifdef __cplusplus
extern "C"{
#endif
//将采集... |
jjzhang166/AWLive | AWLive/PushStream/LKEncoder/SW/LKSWX264Encoder.h | /**
* file : LKSWX264Encoder.h
* author : Rex
* create : 2017-02-17 17:01
* func :
* history:
*/
#ifndef __LKSWX264ENCODER_H_
#define __LKSWX264ENCODER_H_
#endif
|
I-Iias/Explorer1632_dsPIC33EP | bsp/buttons.c | <gh_stars>0
/*******************************************************************************
Copyright 2016 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License... |
I-Iias/Explorer1632_dsPIC33EP | adc_dma.h | /*
* File: adc_dma.h
* Author: <NAME>
*
* Created on 20. Mai 2019, 19:33
*/
#ifndef ADC_DMA_H
#define ADC_DMA_H
#include "types.h"
#include <xc.h>
#define ADC_CHN_POTENTIOMETER 0
#define ADC_CHN_TEMPERATURE_SENSOR 1
#define NumSamples 128
extern uint16 BufferA[NumSamples];
extern uint16 BufferB[NumS... |
I-Iias/Explorer1632_dsPIC33EP | Tasks.h | /*
* File: Tasks.h
* Author: <NAME>
*
* Created on 22. April 2019, 13:44
*/
#ifndef TASKS_H
#define TASKS_H
#include "types.h"
void Task_scheduler(void);
void Task_1ms(void);
void Task_10ms(void);
void Task_50ms(void);
void Task_100ms(void);
void Task_500ms(void);
void Task_1s(void);
void Task_10s(void);
#en... |
I-Iias/Explorer1632_dsPIC33EP | Timer.c | /*
* File: Timer.c
* Author: Matthias
*
* Created on 23. April 2019, 23:16
*/
#include "xc.h"
#include "Timer.h"
#include "Tasks.h"
FUNCTION_HANDLER handle = NULL;
void INIT_Timer1(void)
{
T1CON = 0; //clear configuration register
T1CONbits.TCS = 0; //Internal peri... |
I-Iias/Explorer1632_dsPIC33EP | bsp/lcd_4bit.c | /*******************************************************************************
Copyright 2016 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
htt... |
I-Iias/Explorer1632_dsPIC33EP | bsp/print_lcd.h | <gh_stars>0
/*******************************************************************************
Copyright 2016 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License... |
I-Iias/Explorer1632_dsPIC33EP | Initialize.c | /*
* File: Initialize.c
* Author: <NAME>
*
* Created on 23. April 2019, 20:37
*/
#include <xc.h>
#include "types.h"
#include "Initialize.h"
#include "Timer.h"
//******************************************************************************
//Global Variables
//***********************************************... |
I-Iias/Explorer1632_dsPIC33EP | system.c | /*******************************************************************************
System Initialization File
File Name:
sys_init.c
Summary:
System Initialization.
Description:
This file contains source code necessary to initialize the system.
*******************************************************... |
I-Iias/Explorer1632_dsPIC33EP | Tasks.c | <reponame>I-Iias/Explorer1632_dsPIC33EP
/*
* File: Tasks.c
* Author: Matthias
*
* Created on 22. April 2019, 20:04
*/
#include "Tasks.h"
#include "io_mapping.h"
void Task_scheduler (void)
{
// function variables
static uint16 Cnt1ms = 0;
static uint16 Cnt10ms = 0;
static uint16 Cnt50ms = ... |
I-Iias/Explorer1632_dsPIC33EP | bsp/rtcc.c | /*******************************************************************************
Copyright 2016 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
htt... |
I-Iias/Explorer1632_dsPIC33EP | main.c | /*******************************************************************************
Copyright 2016 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
htt... |
I-Iias/Explorer1632_dsPIC33EP | Timer.h | /*
* File: Timer.h
* Author: <NAME>
*
* Created on 22. April 2019, 13:44
*/
#ifndef TIMER_H
#define TIMER_H
#include "types.h"
typedef void (*FUNCTION_HANDLER)(void);
void INIT_Timer1 (void);
void RequestFunction_Timer1 (FUNCTION_HANDLER handle_new);
#endif //TIMER_H |
I-Iias/Explorer1632_dsPIC33EP | types.h | <filename>types.h
/*
* File: types.h
* Author: <NAME>
*
* Created on 22. April 2019, 13:44
*/
#ifndef TYPES_H
#define TYPES_H
#ifndef TRUE
#define TRUE 1 ///< constant for TRUE
#endif
#ifndef FALSE
#define FALSE 0 ///< constant for FALSE
#endif
#ifndef NULL
#define NUL... |
I-Iias/Explorer1632_dsPIC33EP | Initialize.h | /*
* File: Initialize.h
* Author: <NAME>
*
* Created on 22. April 2019, 13:44
*/
#ifndef INITIALIZE_H
#define INITIALIZE_H
//******************************************************************************
// Functions
//************************************************************... |
I-Iias/Explorer1632_dsPIC33EP | EEPROM_emulation.c | <filename>EEPROM_emulation.c
/*
* File: EEPROM_emulation.c
* Author: Matthias
*
* Created on 21. Mai 2019, 21:09
*/
#include "EEPROM_emulation.h"
void Init_EEPROM (void)
{
DataEEInit();
dataEEFlags.val = 0;
}
boolean EEPROM_write(uint16 data, uint16 addr)
{
DataEEWrite(data,addr);
uint16 valu... |
I-Iias/Explorer1632_dsPIC33EP | bsp/rtcc.h | <reponame>I-Iias/Explorer1632_dsPIC33EP
/*******************************************************************************
Copyright 2016 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may ... |
I-Iias/Explorer1632_dsPIC33EP | bsp/power.h | /*******************************************************************************
Copyright 2016 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
htt... |
I-Iias/Explorer1632_dsPIC33EP | EEPROM_emulation.h | <filename>EEPROM_emulation.h<gh_stars>0
/*
* File: EEPROM_emulation.h
* Author: Matthias
*
* Created on 21. Mai 2019, 21:09
*/
#ifndef EEPROM_EMULATION_H
#define EEPROM_EMULATION_H
#include "libs\DEE_Emulation_16-bit.h"
#include "types.h"
#define EEPROM_addr_Pot 10
void Init_EEPROM (void);
boolean EEPROM_wr... |
ArjunaElins/arjuna | Software/MPU/include/nRF24L01.h | <reponame>ArjunaElins/arjuna<filename>Software/MPU/include/nRF24L01.h
/**
* Odroid nRF24L01 Library
*
* Copyright (c) 2015 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Sof... |
ArjunaElins/arjuna | Software/MPU/include/MidiEventList.h | //
// Programmer: <NAME> <<EMAIL>>
// Creation Date: Sat Feb 14 21:55:38 PST 2015
// Last Modified: Sat Feb 14 21:55:40 PST 2015
// Filename: midifile/include/MidiEventList.h
// Website: http://midifile.sapp.org
// Syntax: C++11
// vim: ts=3 expandtab
//
// Description: A class which st... |
ArjunaElins/arjuna | Software/MPU/include/ORF24.h | /**
* Odroid nRF24L01 Library
*
* Copyright (c) 2015 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* ... |
ArjunaElins/arjuna | Software/MPU/include/Setup.h | /**
* Arjuna: Alat Bantu Pembelajaran Piano untuk Tunanetra
*
* Developed by:
* <NAME>
* <NAME>
* <NAME>
*
* Elektronika dan Instrumentasi
* Universitas Gadjah Mada
*
* Copyright (c) 2015 Arjuna
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associ... |
ArjunaElins/arjuna | Software/MPU/include/Arjuna.h | <reponame>ArjunaElins/arjuna
/**
* Arjuna: Alat Bantu Pembelajaran Piano untuk Tunanetra
*
* Developed by:
* <NAME>
* <NAME>
* <NAME>
*
* Elektronika dan Instrumentasi
* Universitas Gadjah Mada
*
* Copyright (c) 2015 Arjuna
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
... |
ArjunaElins/arjuna | Software/MPU/include/MidiIO.h | <gh_stars>0
/**
* Arjuna: Alat Bantu Pembelajaran Piano untuk Tunanetra
*
* Developed by:
* <NAME>
* <NAME>
* <NAME>
*
* Elektronika dan Instrumentasi
* Universitas Gadjah Mada
*
* Copyright (c) 2015 Arjuna
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this softwar... |
ArjunaElins/arjuna | Software/MPU/include/WiringPiKeypad.h | <gh_stars>0
/**
* WiringPi Matrix Keypad Library
*
* Copyright (c) 2015 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limita... |
ArjunaElins/arjuna | Software/MPU/include/FingerData.h | /**
* Arjuna: Alat Bantu Pembelajaran Piano untuk Tunanetra
*
* Developed by:
* <NAME>
* <NAME>
* <NAME>
*
* Elektronika dan Instrumentasi
* Universitas Gadjah Mada
*
* Copyright (c) 2015 Arjuna
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associ... |
francisceioseph/C-MetodosNumericos01 | tr01-metodos/main.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#define EPSILON 0.00000001
//Metodos utilizados no Sistema Linear
double** alocaMatriz(int l, int c);
void imprimeMatriz(double **m, int l, int c);
void desalocaMatriz(double **m, int l);
void pivotacao(double **m, int n... |
remember17/WHDebugTool | WHDebugToolDemo/Pods/Target Support Files/WHDebugTool/WHDebugTool-umbrella.h | #ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "WHDebugConsoleLabel.h"
#import "WHDebugCpuMonitor.h"
#import "WHDebugFPSMonitor.h"
#import "WHDebugMemoryMonitor.h"
... |
remember17/WHDebugTool | WHDebugTool/WHDebugMonitor.h | <gh_stars>100-1000
//
// WHDebugMonitor.h
// Demo
//
// Created by wuhao on 2018/7/26.
// Copyright © 2018年 wuhao. All rights reserved.
// https://github.com/remember17/WHDebugTool
#define WHSingletonH() +(instancetype)sharedInstance;
#define WHSingletonM() static id _instance;\
+ (instancetype)sharedInstance {\
... |
kylegmaxwell/training | src/heapmerge.h | <filename>src/heapmerge.h
#pragma once
#include "unittest.h"
#include <vector>
#include <queue> // priority_queue
#include <cstdlib> // rand
#include <algorithm>
#include <unordered_map>
#include <memory>
/*!
* \brief The HeapMerge class solves the problem of merging sorted lists.
* The lists are said to be files c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.