repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
TheBadZhang/OJ
usx/special/60/6058.c
#include <string.h> #include <stdio.h> #include <ctype.h> int main () { int n; char str[100]; char sstr [300] = { '\0' }; while (gets(sstr)) { int l = strlen (sstr); int i = 0; int inWord = 0; int words = 0; char maxword[100] = {0}; char word[100] = {0}; for (n = 0; n <= l; n++) { if (isalpha (ss...
TheBadZhang/OJ
usx/special/60/6055.c
#include <stdio.h> void strcpy (char* dst, char* src) { while (*dst++ = *src++); } int main () { char str [100]; char dst_str [100]; while (gets (str) != NULL) { strcpy (dst_str, str); printf ("%s\n", dst_str); } }
TheBadZhang/OJ
usx/special/91/9115.c
#include <stdio.h> int main () { int a; scanf ("%d", &a); printf ("%d", (1+a)*a/2); return 0; }
TheBadZhang/OJ
usx/special/60/6007.c
#include <stdio.h> #include <math.h> #define min(a,b) (a<b?a:b) int main () { int a, b, c, d, e; while (~scanf("%d%d%d%d%d", &a, &b, &c, &d, &e)) { printf ("%d\n", min(a,min(b,min(c,min(d,e))))); } return 0; }
TheBadZhang/OJ
usx/special/60/6053.c
<reponame>TheBadZhang/OJ<filename>usx/special/60/6053.c #include <stdio.h> int main () { int n, m; double s[11][8]; int a, b; while (~scanf("%d%d", &a, &b)) { double sum = 0; int maxn = 0, maxm = 1; for (n = 0; n < a; n++) { scanf ("%lf", &s[n][0]); for (m = 1; m < b+1; m++) { scanf ("%lf", &s[n][...
TheBadZhang/OJ
usx/special/60/6050.c
#include <stdio.h> #include <string.h> int main () { char str[100]; while (gets(str)) { int i, l = strlen (str); char ch; scanf ("%c\n", &ch); for (i = 0; i < l; i++) { if (str[i] != ch) printf ("%c", str[i]); } printf ("\n"); } return 0; }
TheBadZhang/OJ
usx/special/60/6027.c
#include <stdio.h> int main () { int n, a, b, t; double s = 0.0; double ar [22]; for (a = 2, b = 1, n = 0; n<20;++n) { s += (double)a/(double)b; ar [n] = s; t = a; a += b; b = t; } while (~scanf("%d", &n)) { printf ("%.6lf\n", ar[n-1]); } return 0; }
TheBadZhang/OJ
usx/special/92/9201.c
#include <stdio.h> int main () { int i; while (~scanf ("%d", &i)) { if (i > 0) { printf ("+\n"); } else { printf ("-\n"); } } return 0; }
TheBadZhang/OJ
usx/special/60/6080.c
<filename>usx/special/60/6080.c<gh_stars>1-10 #include <stdio.h> #include <string.h> void substr (char *str, int pos) { int i = 0, size = strlen (str); for (i = 0; i < size; i++) { if (pos+i <= size) { putchar (str[pos-1+i]); } else { break; } } putchar ('\n'); } int main () { char str[160]; int i...
TheBadZhang/OJ
usx/special/60/6026.c
#include <stdio.h> int main () { int i, t, s; for (i = 2; i < 10000; ++i) { for (s = 0, t = 1; t < i; t++) { if (i%t == 0) { s += t; } } if (i == s) { printf ("%d its factors are ", i); printf ("1"); for (s = 0, t = 2; t < i; t++) { if (i%t == 0) { printf (",%d", t); } } ...
TheBadZhang/OJ
usx/special/60/6008.c
#include <stdio.h> #include <float.h> int main () { int i; float min=FLT_MIN, t; while (~scanf ("%f", &min)) { for (i = 0; i < 9; ++i) { scanf ("%f", &t); if (t > min) { min = t; } } printf ("%.6f\n", min); } return 0; }
TheBadZhang/OJ
usx/special/92/9213.c
#include <stdio.h> void swap (int* a, int* b) { int t = *a; *a = *b; *b = t; } int main () { int a, b, c, d; while (~scanf ("%d %d %d %d", &a, &b, &c, &d)) { if (a > b) swap (&a, &b); if (a > c) swap (&a, &c); if (a > d) swap (&a, &d); if (b > c) swap (&b, &c); if (b > d) swap (&b, &d); if (c > d) sw...
TheBadZhang/OJ
usx/special/60/6037.c
#include <stdio.h> int main () { double max, min, t; int n, i; double list [100]; while (~scanf ("%d", &n)) { // 处理多组输入 for (i = 0; i < n; i ++) { scanf ("%lf", &list[i]); // 输入数据到数组 } max = min = list [0]; for (i = 0; i < n; i ++) { // 遍历数组 if (list[i] > max) { ma...
TheBadZhang/OJ
usx/special/60/6017.c
#include <stdio.h> int main () { unsigned int N [60] = { 1, 1, 1 }; int i; for (i = 3; i < 30; i++) { N [i] = N [i-1] + N [i-3]; } while (~scanf("%d", &i)) { printf ("%d\n", N[i-1]); } return 0; }
TheBadZhang/OJ
usx/special/92/9204.c
<filename>usx/special/92/9204.c #include <stdio.h> void swap (int* a, int* b) { int t = *a; *a = *b; *b = t; } int main () { int a, b, c; while (~scanf ("%d%d%d", &a, &b, &c)) { if (a > b) { swap (&a, &b); } if (a > c) { swap (&a, &c); } if (b > c) { swap (&b, &c); } printf ("%d %d %d\n",...
TheBadZhang/OJ
usx/special/60/6061.c
<gh_stars>1-10 #include <stdio.h> int main () { int n; while (~scanf ("%d", &n)) printf ("%d\n", n); return 0; }
TheBadZhang/OJ
usx/special/60/6020.c
#include <stdio.h> #include <math.h> char isPrim (int a) { if (a&1) { int i; for (i = 3; i <= sqrt (a); ++i) { if (a%i == 0) { return 0; } } return 1; } else { return 0; } } int main () { int n; for (n = -39; n <= 40; ++n) { if (!isPrim(n*n-n+41)) { printf ("NO\n"); return 0; } } ...
TheBadZhang/OJ
usx/special/60/6067.c
<gh_stars>1-10 #include <stdio.h> #include <string.h> #include <ctype.h> int hex2oct (char ch) { int number; if (isdigit (ch)) { number = ch - '0'; } else { number = ch - 'A' + 10; } return number; } int main () { char str[10]; while (~scanf ("%s", str)) { int number = 0; int negtive = 1; int i, s...
TheBadZhang/OJ
usx/special/60/6048.c
#include <stdio.h> int main () { int n; while (~scanf ("%d", &n)) { // 处理多组输入 int i, j; int matrix[100][100]; // 定义一个矩阵(二维数组) for (i = 0; i < n; i ++) { for (j = 0; j < n; j ++) { scanf ("%d", &matrix[i][j]); // 向矩阵输入数据 } } int mainSum = 0, sideSum = 0; ...
TheBadZhang/OJ
usx/special/60/6071.c
<filename>usx/special/60/6071.c #include <stdio.h> void swap (int** pa, int** pb) { int* pt = *pa; *pa = *pb; *pb = pt; } int main () { int a, b, c; while (~scanf ("%d %d %d", &a, &b, &c)) { int *max = &a, *mid = &b, *min = &c; if (*max < *mid) swap (&max, &mid); if (*max < *min) swap (&max, &min); if ...
TheBadZhang/OJ
usx/special/92/9220.c
#include <stdio.h> int main () { int n, c; while (~scanf ("%d", &n)) { c = 0; while (n>0) { if (n%10 == 4) c ++; n /= 10; } printf ("%d\n", c); } return 0; }
TheBadZhang/OJ
usx/special/60/6090-2.c
<gh_stars>1-10 #include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct { char id[20]; double salary; } employer; int main () { int n, i; char id[20]; employer em[100]; while (~scanf ("%d", &n)) { for (i=0; i < n; i++) { scanf ("%s %lf", em[i].id, &em[i].salary); } scanf ("%s", id);...
TheBadZhang/OJ
usx/special/91/9110.c
#include <stdio.h> int main () { int a = 50, b = 43, c = 13; // scanf ("%d %d %d", &a, &b, &c); b += a/3; c += a/3; a = a/3+a%3; a += b/3; c += b/3; b = b/3+b%3; a += c/3; b += c/3; c = c/3+c%3; printf ("%d %d %d", a, b, c); return 0; }
TheBadZhang/OJ
usx/special/92/9219.c
<gh_stars>1-10 #include <stdio.h> #include <math.h> int main () { int m, n, i, flag, a, b, c; while (~scanf ("%d %d", &m, &n)) { flag = 0; for (i = m; i <= n; i++) { a = i/100; b = (i/10)%10; c = i%10; if (i == a*a*a+b*b*b+c*c*c) { flag = 1; printf ("%d,", i); } } if (!flag) { printf ("n...
TheBadZhang/OJ
hdu/2000/20xx/2032.c
#include <stdio.h> unsigned long long int list [600]; // 放在全局变量可以自动初始化为 0 int main () { int i, j, k, n, d; for (i = 1, j = 2; i < 600; i += j, j++) { list [i] = 1; list [i-1] = 1; // 将杨辉三角的两边的 1 初始化 for (k = i + 1; k < i+j; k++) { list [k] = list[k-j] + list[k-j+1]; // 计算杨辉三角...
TheBadZhang/OJ
usx/special/60/6077.c
#include <stdio.h> void swap (int* a, int* b) { int c = *a; *a = *b; *b = c; } void change (int* l, int n) { int min = 0, max = 0, i; for (i = 0; i < n; i++) { if (l[i] > l[max]) max = i; if (l[i] < l[min]) min = i; } if (max == 0 && min == n-1) { swap (&l[max], &l[min]); } else if (max == 0) { max = mi...
TheBadZhang/OJ
usx/special/60/6022.c
<reponame>TheBadZhang/OJ #include <stdio.h> #include <ctype.h> int space, chars, number, other; void count (char ch) { if (isdigit(ch)) { number ++; } else if (isalpha (ch)) { chars ++; } else if (ch == ' ') { space ++; } else { other ++; } } int main () { char ch, a[128]; int i, l; // while (~scanf...
TheBadZhang/OJ
usx/special/91/9105.c
<reponame>TheBadZhang/OJ #include <stdio.h> int main () { double ch, math, en, sci, sum; scanf ("%lf %lf %lf %lf", &ch, &math, &en, &sci); sum = ch+math+en+sci; printf ("%.1lf\n%.2lf", sum, sum/4); return 0; }
TheBadZhang/OJ
usx/special/60/6060.c
<filename>usx/special/60/6060.c #include <stdio.h> #include <math.h> int isPrime (int n) { if (n == 2) return 1; if (n&1) { int i; for (i = 3; i <= sqrt (n); i++) { if (n % i == 0) return 0; } return 1; } else return 0; } int main () { int n; while (~scanf ("%d", &n)) { int i = 2; int flag = 0; ...
TheBadZhang/OJ
usx/special/60/6003.c
<filename>usx/special/60/6003.c #include <stdio.h> #include <math.h> int main () { printf ("%.4f\n%.4f\n%.4f\n", cos(3.5678), log10(90), exp(2.567)); return 0; }
TheBadZhang/OJ
usx/special/60/6062.c
<gh_stars>1-10 #include <stdio.h> int gcd (int m, int n) { return m%n?gcd(n,m%n):n; } int lcm (int m, int n) { return m*n/gcd(m,n); } int main () { int n, m; while (~scanf ("%d %d", &n, &m)) { printf ("%d %d\n", gcd (m,n), lcm(m,n)); } return 0; }
TheBadZhang/OJ
usx/special/60/6063.c
#include <stdio.h> #include <math.h> int main () { double a, b, c; while (~scanf ("%lf %lf %lf", &a, &b, &c)) { double delta = b*b - 4 * a * c; if (fabs(delta) < 1e-6) { printf ("x=%.6lf\n", -b/2/a); } else if (delta < 0) { printf ("x1=%.6lf%+.6lfi x2=%.6lf%-.6lfi\n", -b/2/a, sqrt(-delta)/2/a,-b/2/a...
TheBadZhang/OJ
usx/special/60/6009.c
#include <stdio.h> int main () { float a, b, c, t; while (~scanf ("%f%f%f", &a, &b, &c)) { if (a > b) { t = a; a = b; b = t; } if (a > c) { t = a; a = c; c = t; } if (b > c) { t = b; b = c; c = t; } printf ("%.6f %.6f %.6f\n", a, b, c); } return 0; }
TheBadZhang/OJ
usx/special/60/6015-2.c
<filename>usx/special/60/6015-2.c #include <stdio.h> int main () { printf (" 1 2 3 4 5 6 7 8 9\n"); printf (" 1 1\n"); printf (" 2 2 4\n"); printf (" 3 3 6 9\n"); printf (" 4 4 8 12 16\n"); printf (" 5 5 10 15 20 25\n"); printf (" 6 6 12 18 24 30 ...
TheBadZhang/OJ
usx/special/92/9221.c
<reponame>TheBadZhang/OJ #include <stdio.h> int main () { int w, h, i, j, f = 0; char c; while (~scanf ("%d %d", &w, &h)) { c = 'a'; if (f) printf ("\n\n"); f = 1; for (i = 0; i < h; i++) { if (i>0) printf ("\n"); for (j = 0; j < w; j++) { printf ("%c", c++); } } } return 0; }
TheBadZhang/OJ
usx/special/60/6006.c
<gh_stars>1-10 #include <stdio.h> int main () { int i, c = 0; for (i = 1; i <= 100; ++i) { if (i%2 == 0) { c += i; } } printf ("%d\n", c); return 0; }
TheBadZhang/OJ
usx/special/91/9103.c
<gh_stars>1-10 #include <stdio.h> #include <math.h> int main () { float a, b, c, p; while (~scanf("%f%f%f", &a, &b, &c)) { if (a + b > c && a + c > b && b + c > a) { p = (a+b+c)/2.0; printf ("%.2f\n", sqrt (p*(p-a)*(p-b)*(p-c))); } } return 0; }
TheBadZhang/OJ
usx/special/92/9208.c
<filename>usx/special/92/9208.c<gh_stars>1-10 #include <stdio.h> int main () { int a, sum; while (~scanf ("%d", &a)) { sum = 0; while (a > 0) { sum += (a%10)*(a%10); a /= 10; } printf ("%d\n", sum); } return 0; }
TheBadZhang/OJ
usx/special/60/6035.c
<filename>usx/special/60/6035.c #include <stdio.h> int money [6] = { 1, 2, 5, 10, 20, 50 }; #define for2(v,end) for(v=0;v<=end;v++) int main () { int i, j, k, l, m, n, s = 0; for2(n,2)for2(m,5)for2(l,10)for2(k,20)for2(j,50)for2(i,100) if (i+2*j+5*k+10*l+20*m+50*n==100) { s ++; } printf ("%d\n", s); return...
TheBadZhang/OJ
usx/special/92/9210.c
#include <stdio.h> int main () { int a; while (~scanf ("%d", &a)) { if (a%400==0 || a%100!=0&&a%4==0) { printf ("Yes\n"); } else { printf ("No\n"); } } return 0; }
TheBadZhang/OJ
usx/special/60/6043.c
#include <stdio.h> int main () { int n, a[50], i; while (~scanf ("%d",&n)) { for (i = 0; i < n; i++) { scanf ("%d", &a[i]); } for (i = 0; i < n; i++) { printf ("%3d", a[n-i-1]); } printf ("\n"); } return 0; }
TheBadZhang/OJ
usx/special/91/9117.c
#include <stdio.h> int main () { int a, b, c, d; scanf ("%d %d %d %d", &a, &b, &c, &d); printf ("%.2f\n%.2f", 1.0/(1.0/a+1.0/b), 1.0/(1.0/a+1.0/b+1.0/c+1.0/d)); return 0; }
TheBadZhang/OJ
usx/special/60/6021-2.c
#include<stdio.h> main(){puts("119");}
TheBadZhang/OJ
usx/special/60/6048-2.c
<reponame>TheBadZhang/OJ #include <stdio.h> int main () { int n; while (~scanf ("%d", &n)) { // 处理多组输入 int i, j, num; int mainSum = 0, sideSum = 0; // 主对角线和副对角线和 for (i = 0; i < n; i ++) { for (j = 0; j < n; j ++) { scanf ("%d", &num); // 输入数据 if (j == i) mainSum += ...
TheBadZhang/OJ
usx/special/60/6083.c
#include <stdio.h> #include <string.h> #include <stdlib.h> // 和 6054 完全一样 int cmp (const void* a, const void* b) { return strcmp ((char*)a, (char*)b); } int main() { int n; char c[20][20]; while (~scanf("%d\n", &n)) { int i; for (i = 0; i < n; i++) { gets(c[i]); // getchar (); } qsort (c, n, sizeof (...
TheBadZhang/OJ
usx/special/92/9211.c
#include <stdio.h> #include <math.h> int main () { double a, b, c, delta; while (~scanf ("%lf %lf %lf", &a, &b, &c)) { delta = b*b-4*a*c; if (delta == 0.0) { printf ("%.2f\n", -b/2/a); } else if (delta > 0) { delta = sqrt(delta); printf ("%.2f %.2f\n", (-b+delta)/2/a, (-b-delta)/2/a); } else { p...
TheBadZhang/OJ
usx/special/92/9212.c
<gh_stars>1-10 #include <stdio.h> int main () { int score; while (~scanf ("%d", &score)) { if (score >= 90) { printf ("outstanding\n"); } else if (score >= 60) { printf ("satisfactory\n"); } else { printf ("unsatisfactory\n"); } } }
TheBadZhang/OJ
usx/special/60/6072.c
#include <stdio.h> void swap (int* a, int* b) { int c = *a; *a = *b; *b = c; } void reverse (int* l, int ns, int n) { int i; for (i = 0; i < n/2; i++) { swap (&l[ns+i-1], &l[ns+n-2-i]); } } int main () { int n, i; int arr [25]; int n1, n2; while (~scanf ("%d", &n)) { for (i = 0; i < n; i++) { scan...
TheBadZhang/OJ
usx/special/92/9217-2.c
<reponame>TheBadZhang/OJ #include <stdio.h> #include <string.h> int main () { char str[1024]; while (~scanf ("%s", str)) { printf ("%d\n", strlen(str)); } }
TheBadZhang/OJ
usx/special/60/6030-2.c
<filename>usx/special/60/6030-2.c #include<stdio.h> main(){puts("2.085481");}
coup-de-foudre/teensy-interruptor
interocitor/midi_constants.h
// Midi note LUT (period, us) uint32_t midi_period_us[128] = { /* C C# D D# E F F# G G# A A# B */ /* -1 */ 122312, 115447, 108967, 102849, 97079, 91630, 86487, 81633, 77051, 72727, 68645, 64792, /* 0 */ 61156, 57723, 54483, 5...
coup-de-foudre/teensy-interruptor
interocitor/entropy.h
uint32_t _rng_state = millis(); #define RNG_MAGIC 75380540 // Roughly: https://en.wikipedia.org/wiki/Xorshift inline void _permute_rng_state() { uint32_t x = _rng_state; x ^= x << 13; x ^= x >> 17; x ^= x << 5; _rng_state = x; } void init_rng() { _rng_state = RNG_MAGIC - millis(); for (int i=0; i<101; i++) ...
coup-de-foudre/teensy-interruptor
interocitor/util.h
enum SYS_MODE { SM_MIDI_USB, SM_MIDI_JACK, SM_FREQ_FIXED, SM_FREQ_PINK }; struct MidiNote { uint8_t channel; uint8_t pitch; uint8_t velocity; uint32_t phase_us; uint32_t period_us; uint32_t start_ms; }; enum MUSIC_STATE { SM_NEXT, SM_WAIT, SM_PULSE, };
coup-de-foudre/teensy-interruptor
interocitor/display.h
#include <LiquidCrystal.h> // 1 will have pulse readout in ms, 0 is hz #define READOUT_MS 0 #define DEBUG_BEND false LiquidCrystal vfd(3, 4, 5, 6, 7, 2); // (RS, Enable, D4, D5, D6, D7) void init_display() { vfd.begin(2, 20); // Give time for LCD to init delay(10); vfd.clear(); } void update_top_display_lin...
speckdude/ESP32-Phone
PhoneStart/PhoneLibrary/phone_debug.h
<filename>PhoneStart/PhoneLibrary/phone_debug.h /*Copyright(c) 2021 speckdude ///Permission is hereby granted, free of charge, to any person obtaining a copy ///of this softwareand associated documentation files(the "Software"), to deal ///in the Software without restriction, including without limitation the rights ///...
speckdude/ESP32-Phone
PhoneStart/PhoneLibrary/textMessages.h
<reponame>speckdude/ESP32-Phone /*Copyright(c) 2021 speckdude ///Permission is hereby granted, free of charge, to any person obtaining a copy ///of this softwareand associated documentation files(the "Software"), to deal ///in the Software without restriction, including without limitation the rights ///to use, copy, mo...
speckdude/ESP32-Phone
PhoneStart/PhoneLibrary/modemCommunications.h
<filename>PhoneStart/PhoneLibrary/modemCommunications.h /*Copyright(c) 2021 speckdude ///Permission is hereby granted, free of charge, to any person obtaining a copy ///of this softwareand associated documentation files(the "Software"), to deal ///in the Software without restriction, including without limitation the ri...
speckdude/ESP32-Phone
PhoneStart/PhoneLibrary/modem.h
/*Copyright(c) 2021 speckdude ///Permission is hereby granted, free of charge, to any person obtaining a copy ///of this softwareand associated documentation files(the "Software"), to deal ///in the Software without restriction, including without limitation the rights ///to use, copy, modify, merge, publish, distribute...
speckdude/ESP32-Phone
PhoneStart/PhoneLibrary/modemManager.h
<filename>PhoneStart/PhoneLibrary/modemManager.h<gh_stars>0 /*Copyright(c) 2021 speckdude ///Permission is hereby granted, free of charge, to any person obtaining a copy ///of this softwareand associated documentation files(the "Software"), to deal ///in the Software without restriction, including without limitation th...
UnaNancyOwen/OpenCVDNNSample
sample/Object Detection/MTCNN/mtcnn/pnet.h
/* Acknowledgements ---------------- This mtcnn implementation based on the implementation by <NAME> (@ksachdeva). Thank you for your great implementation! https://github.com/ksachdeva/opencv-mtcnn */ #ifndef __MTCNN_PNET__ #define __MTCNN_PNET__ #include "face.h" #include <opencv2/dnn.hpp> namespace mtcnn { ...
UnaNancyOwen/OpenCVDNNSample
sample/Object Detection/MTCNN/mtcnn/helpers.h
/* Acknowledgements ---------------- This mtcnn implementation based on the implementation by <NAME> (@ksachdeva). Thank you for your great implementation! https://github.com/ksachdeva/opencv-mtcnn */ #ifndef __MTCNN_HELPERS__ #define __MTCNN_HELPERS__ #include <cmath> #include <algorithm> #include <opencv2/core...
UnaNancyOwen/OpenCVDNNSample
sample/Object Detection/MTCNN/mtcnn/face.h
<gh_stars>10-100 /* Acknowledgements ---------------- This mtcnn implementation based on the implementation by <NAME> (@ksachdeva). Thank you for your great implementation! https://github.com/ksachdeva/opencv-mtcnn */ #ifndef __MTCNN_FACE__ #define __MTCNN_FACE__ #include <numeric> #include <opencv2/opencv.hpp> ...
UnaNancyOwen/OpenCVDNNSample
sample/Depth Estimation/MiDaS/util.h
<gh_stars>10-100 #ifndef __UTIL__ #define __UTIL__ #include <vector> #include <string> #include <fstream> #include <opencv2/dnn.hpp> #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> // Get Output Layers Name std::vector<std::string> getOutputsNames( const cv::dnn::Net& net ) { static std::vector<std::st...
UnaNancyOwen/OpenCVDNNSample
sample/Object Detection/MTCNN/mtcnn/onet.h
/* Acknowledgements ---------------- This mtcnn implementation based on the implementation by <NAME> (@ksachdeva). Thank you for your great implementation! https://github.com/ksachdeva/opencv-mtcnn */ #ifndef __MTCNN_ONET__ #define __MTCNN_ONET__ #include "face.h" #include <opencv2/dnn.hpp> namespace mtcnn { ...
UnaNancyOwen/OpenCVDNNSample
sample/Object Detection/MTCNN/mtcnn/detector.h
<filename>sample/Object Detection/MTCNN/mtcnn/detector.h /* Acknowledgements ---------------- This mtcnn implementation based on the implementation by <NAME> (@ksachdeva). Thank you for your great implementation! https://github.com/ksachdeva/opencv-mtcnn */ #ifndef __MTCNN_DETECTOR__ #define __MTCNN_DETECTOR__ #...
TBSniller/tv-native-apis
libgm/include/gm.h
<gh_stars>1-10 #pragma once #include <stddef.h> #include <stdint.h> typedef struct GM_SURFACE_T { uint32_t dummy0; uint8_t* framebuffer; uint32_t dummy1[4 + 0x101]; uint32_t surfaceID; uint32_t dummy3[2]; } GM_SURFACE; int GM_CreateSurface(uint32_t width, uint32_t height, uint32_t dummy, GM_SURFA...
TBSniller/tv-native-apis
samples/gm/capture/capture.c
<filename>samples/gm/capture/capture.c<gh_stars>1-10 #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <gm.h> GM_SURFACE surfaceInfo; unsigned short nativeWidth = 0; unsigned short nativeHeight = 0; int captureWidth = 1920; int captureHeight = 1080; int fram...
TBSniller/tv-native-apis
libhalgal/src/halgal.c
#include "halgal.h" int HAL_GAL_CreateSurface(uint32_t width, uint32_t height, uint32_t pixelFormat, HAL_GAL_SURFACE* surface_info) { return -1; } int HAL_GAL_DestroySurface(HAL_GAL_SURFACE* surface_info) { return -1; } int HAL_GAL_CaptureFrameBuffer(HAL_GAL_SURFACE* surface_info) { return -1; } int HAL_GAL_FillRectan...
TBSniller/tv-native-apis
lgncapi/include/lgnc_system.h
<filename>lgncapi/include/lgnc_system.h #pragma once #include <stddef.h> #include <linux/input.h> #include "lgnc_openapi_types.h" #define LGNC_REMOTE_PRESS 272 #define LGNC_REMOTE_RED 398 #define LGNC_REMOTE_GREEN 399 #define LGNC_REMOTE_YELLOW 400 #define LGNC_REMOTE_BLUE 401 #define LGNC_REMOTE_CH_UP 402 #define L...
TBSniller/tv-native-apis
libhalgal/include/halgal.h
<filename>libhalgal/include/halgal.h #pragma once #include <stddef.h> #include <stdint.h> typedef struct HAL_GAL_SURFACE_T { uint32_t offset; uint32_t *physicalAddress; uint16_t pitch; uint16_t bpp; uint16_t width; uint16_t height; uint16_t pixelFormat; uint32_t paletteInfo[257]; u...
TBSniller/tv-native-apis
libvtcapture/src/vtCaptureApi_c.c
#include "vtcapture/vtCaptureApi_c.h" VT_DRIVER *vtCapture_create() { VT_DRIVER *thi; return thi; } int vtCapture_init(VT_DRIVER *driver, const VT_CALLER_T *caller_id, VT_CLIENTID_T *clientid) { return -1; } int vtCapture_preprocess(VT_DRIVER *driver, VT_CLIENTID_T *clientid, _LibVtCaptureProperties *props) {...
TBSniller/tv-native-apis
libvtcapture/include/vtcapture/vtCaptureApi_c.h
#pragma once #include <stddef.h> #include <stdint.h> typedef char VT_CALLER_T; typedef char VT_CLIENTID_T; typedef int32_t VT_STATUS_T; typedef int32_t VT_DUMP_T; typedef int32_t VT_BUF_T; typedef int32_t VT_FRAMERATE_T; typedef struct VT_DRIVER_T { uint32_t *ms_currentBuffIndex; int *ms_mutex; //p_thread_m...
TBSniller/tv-native-apis
libgm/src/gm.c
#include "gm.h" int GM_CreateSurface(uint32_t width, uint32_t height, uint32_t dummy, GM_SURFACE* surface_info) { return -1; } int GM_DestroySurface(uint32_t surfaceID) { return -1; } int GM_CaptureGraphicScreen(uint32_t surfaceID, uint32_t* width, uint32_t* height) { return -1; } int GM_GetGraphicResolution(uint16_t ...
TBSniller/tv-native-apis
libgm-wayland/include/gm-wayland/gmw_c.h
<filename>libgm-wayland/include/gm-wayland/gmw_c.h<gh_stars>1-10 #pragma once #include <stddef.h> #include <stdint.h> typedef int32_t HAL_GAL_PIXEL_FORMAT_T; typedef int32_t HAL_GAL_DRAW_FLAGS_T; typedef struct HAL_GAL_DRAW_SETTINGS { int32_t blend1, blend2, blend3; }HAL_GAL_DRAW_SETTINGS_T; typedef struct HAL_...
TBSniller/tv-native-apis
samples/vtcapture/capture/capture.c
<reponame>TBSniller/tv-native-apis #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <jpeglib.h> #include <signal.h> #include <vtcapture/vtCaptureApi_c.h> #define CRLF() fwrite("\r\n", 1, 2, stdout) const VT_CALLER_T caller[24] = "com.web...
TBSniller/tv-native-apis
samples/halgal/capture/capture_withVideo.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdbool.h> #include <signal.h> #include <unistd.h> #include <pthread.h> #include <string.h> #include <sys/mman.h> #include <jpeglib.h> #include <halgal.h> #include <vtcapture/vtCaptureApi_c.h> #define CRLF() f...
TBSniller/tv-native-apis
samples/gm-wayland/capture/capture.c
<filename>samples/gm-wayland/capture/capture.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <jpeglib.h> #include <signal.h> #include <gm-wayland/gmw_c.h> #define CRLF() fwrite("\r\n", 1, 2, stdout) int isrunning = 0; HAL_GAL_SURFACE_...
TBSniller/tv-native-apis
libgm-wayland/src/gmw_c.c
<filename>libgm-wayland/src/gmw_c.c #include "gm-wayland/gmw_c.h" int GM_CreateSurface(int16_t width, int16_t height, int32_t pixfmt, HAL_GAL_SURFACE_INFO_T *info) { return -1; } int GM_FillRectangle(HAL_GAL_SURFACE_INFO_T *info, HAL_GAL_RECT_T *surfacereturn, int32_t dummy, HAL_GAL_DRAW_FLAGS_T *drawflags, HAL_GAL_DR...
tizenorg/framework.api.location-manager
test/location_test.c
/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tizenorg/framework.api.location-manager
include/location_bounds.h
<reponame>tizenorg/framework.api.location-manager /* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apach...
tizenorg/framework.api.location-manager
src/location_preference.c
/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tizenorg/framework.api.location-manager
include/location_preference.h
/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tizenorg/framework.api.location-manager
src/locations.c
/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tizenorg/framework.api.location-manager
TC/testcase/utc_location_location_manager_callback.c
/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tizenorg/framework.api.location-manager
src/location_bounds.c
/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tizenorg/framework.api.location-manager
TC/testcase/utc_location_preference.c
/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tizenorg/framework.api.location-manager
include/locations.h
/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tizenorg/framework.api.location-manager
TC/testcase/utc_location_location_manager.c
<gh_stars>0 /* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
tizenorg/framework.api.location-manager
TC/testcase/utc_location_gps_status.c
<filename>TC/testcase/utc_location_gps_status.c /* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 * * http://www.apache....
Neo-Desktop/bare-metal-pi
src/includes/kernel/util.h
/** arm-016-util.h */ #ifndef RPI_UTIL_H #define RPI_UTIL_H #define SCREEN_WIDTH 640 #define SCREEN_HEIGHT 480 #define SCREEN_DEPTH 24 /* 16 or 32-bit */ #define COLOUR_DELTA 0.05 /* Float from 0 to 1 incremented by this amount */ #include <math.h> #include <stdlib.h> typedef struct { float...
Neo-Desktop/bare-metal-pi
src/includes/kernel/util.c
<filename>src/includes/kernel/util.c /** util.c */ #include "util.h" void setColor(volatile unsigned char* fb, colour_t pixel, long x, long y, long pitch) { int pixel_offset = ( x * ( SCREEN_DEPTH >> 3 ) ) + ( y * pitch ); int r = (int)( pixel.r * 0xFF ) & 0xFF; int g = (int)( pixel.g * 0xFF ) & 0xFF; in...
OwenGranot/Anomaly-Detector
anomaly_detection_util.h
// Returns the variance of X and Y float var(float* x, int size); // Returns the Covariance of X and Y float cov(float* x, float* y, int size); // Returns the Pearson correlation coeffiecient of X and Y float pearson(float* x, float* y, int size); class Line{ public: const float a,b; Line(float a...
Erik-Koning/Arduino_Core_STM32
variants/Generic_L151C8x/PinNamesVar.h
/* SYS_WKUP */ #ifdef PWR_WAKEUP_PIN1 SYS_WKUP1 = PA_0, #endif #ifdef PWR_WAKEUP_PIN2 SYS_WKUP2 = PC_13, #endif #ifdef PWR_WAKEUP_PIN3 SYS_WKUP3 = NC, #endif #ifdef PWR_WAKEUP_PIN4 SYS_WKUP4 = NC, #endif #ifdef PWR_WAKEUP_PIN5 SYS_WKUP5 = NC, #endif #ifdef PWR_WAKEUP_PIN6 SYS_WKUP6 = NC, #endif #ifde...
friniax/Practica01
Main.c
#include <stdio.h> int main () { int aux,a,b,c; int n=10,Arr[n]; for (a=0; a<n; a++) { printf("dame el dato numero: %d \n",a+1); printf("dame el dato numero: %d \n",a+1); scanf("%d",&Arr); } for (a=0;a<n;a++) { for (b=0;b<n-a;b++) { if (Arr[b]>=Arr[b+1]) { aux=Arr[b]; Arr[...
schmitzn/node-packer
node/deps/icu-small/source/common/hash.h
<reponame>schmitzn/node-packer<gh_stars>1000+ // © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ****************************************************************************** * Copyright (C) 1997-2014, International Business Machines * Corporation and...
schmitzn/node-packer
node/deps/libautoupdate/tests/main.c
<filename>node/deps/libautoupdate/tests/main.c /* * Copyright (c) 2017 <NAME> <<EMAIL>> * * This file is part of libautoupdate, distributed under the MIT License * For full terms see the included LICENSE file */ #include "autoupdate.h" #include "autoupdate_internal.h" #include <limits.h> #include <assert.h> #inc...
schmitzn/node-packer
node/deps/icu-small/source/i18n/unicode/numsys.h
<filename>node/deps/icu-small/source/i18n/unicode/numsys.h<gh_stars>1-10 // © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * Copyright (C) 2010-2014, International Business Ma...
schmitzn/node-packer
node/deps/icu-small/source/i18n/numparse_affixes.h
// © 2018 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html #include "unicode/utypes.h" #if !UCONFIG_NO_FORMATTING #ifndef __NUMPARSE_AFFIXES_H__ #define __NUMPARSE_AFFIXES_H__ #include "cmemory.h" #include "numparse_types.h" #include "numparse_symbols.h" #include...
schmitzn/node-packer
node/deps/icu-small/source/common/unicode/localebuilder.h
<filename>node/deps/icu-small/source/common/unicode/localebuilder.h // © 2018 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html#License #ifndef __LOCALEBUILDER_H__ #define __LOCALEBUILDER_H__ #include "unicode/locid.h" #include "unicode/stringpiece.h" #include "unico...
schmitzn/node-packer
node/deps/icu-small/source/i18n/rbt.h
<reponame>schmitzn/node-packer // © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ********************************************************************** * Copyright (C) 1999-2007, International Business Machines * Corporation and others. All Rights Re...