repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
darcros/polimi-082746-fondamenti-informatica | esercizi/crucipuzzle/crucipuzzle.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int cols, rows; // Qui può avere senso che siano variabili globali...!!
char** leggiTabella(FILE* fp) {
// carico la tabella di caratteri
char** tabella = malloc(rows * sizeof(char));
for (int i = 0; i < rows; i++) {
// devo fare questa menata di a... |
darcros/polimi-082746-fondamenti-informatica | esercizi/concatenazione-parsimoniosa/concatenazione-parsimoniosa.c | <gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* conc_pars(char* s1, char* s2) {
int l1 = strlen(s1);
int l2 = strlen(s2);
// +1 per lasciare spazio per il \0 finale
char* concat = (char*)malloc(l1 + l2 + 1);
memcpy(concat, s1, l1);
memcpy(concat + l1, s2, l2);
return concat... |
darcros/polimi-082746-fondamenti-informatica | esercizi/bisestile/bisestile.c | <gh_stars>0
#include <stdio.h>
int main() {
int anno;
printf("Quale anno ti interessa? ");
scanf("%d", &anno);
if (anno < 1582) {
printf("Anno NON bisestile");
} else {
if ((anno % 4 == 0 && anno % 100 != 0) || anno % 400 == 0) {
printf("Anno bisestile\n");
} else {
printf("Anno NON... |
darcros/polimi-082746-fondamenti-informatica | esercizi/allaccia-parole/allaccia-parole.c | <filename>esercizi/allaccia-parole/allaccia-parole.c<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define OVERLAPMINIMO 1
/* Restituisce 1 se p e q sono sovrapponibili con un suffisso/prefisso
di esattamente n caratteri, 0 altrimenti */
int SovrapponibiliConNcaratteri(char* p, char* q, int... |
darcros/polimi-082746-fondamenti-informatica | esercizi/conversione-binario/conversione-binario.c | #include <stdio.h>
/*
Esercizio: leggere un numero in formato decimale e stamparlo in formato binario.
*/
int main() {
int decimale;
do {
printf("inserisci un numero positivo: ");
scanf("%d", &decimale);
} while (decimale < 0);
// calcolo il numero di cifre di cui avrò bisogno
int cifre = 0;
int... |
darcros/polimi-082746-fondamenti-informatica | esercizi/mie-liste/mie-liste.h | <filename>esercizi/mie-liste/mie-liste.h
#include <stdio.h>
#include <stdlib.h>
typedef int TipoElemento;
typedef struct EL {
TipoElemento info;
struct EL* prox;
} ElemLista;
typedef ElemLista* ListaDiElem;
/*************************************************************
PROTOTIPI
********... |
darcros/polimi-082746-fondamenti-informatica | esercizi/sottosequenze-ordinate/sottosequenze-ordinate.c | <reponame>darcros/polimi-082746-fondamenti-informatica<filename>esercizi/sottosequenze-ordinate/sottosequenze-ordinate.c
#include <stdio.h>
/*
Esercizio: Scrivere un programma che legge da stdin una sequenza (di lunghezza a
priori illimitata) di numeri interi positivi, terminata da 0, e indica, alla
fine della sequenz... |
darcros/polimi-082746-fondamenti-informatica | esercizi/file-cambio-base/file-cambio-base.c | <reponame>darcros/polimi-082746-fondamenti-informatica
#include <stdio.h>
#include <string.h>
/*
ESERCIZIO:
Un file testuale memorizza ”a parole” una sequenza di interi positivi, con la
seguente convenzione:
- Ogni riga rappresenta un intero, le cui cifre sono espresse "a parole" - Ogni
riga `e terminata dalla stringa... |
darcros/polimi-082746-fondamenti-informatica | esercizi/numeri-affiatati/numeri-affiatati-a/numeri-affiatati-a.c | <reponame>darcros/polimi-082746-fondamenti-informatica<gh_stars>0
#include <stdbool.h>
#include <stdio.h>
int digit_product(int n) {
int product = 1;
// printf("number: %d\n", n);
do {
int digit = n % 10;
// printf("\tdigit: %d\n", digit);
product *= digit;
n /= 10;
} while (n > 0);
// pri... |
darcros/polimi-082746-fondamenti-informatica | esercizi/tabelline-tutte/tabelline-tutte.c | <filename>esercizi/tabelline-tutte/tabelline-tutte.c
#include <stdio.h>
/*
Esercizio: Scrivere un programma (per il "ripasso globale" delle tabelline) che
riceve da stdin due interi, n e k, e stampa la «tabellona» di tutte le tabelline
da 2 a n, limitandosi al k-esimo valore.
*/
int main() {
int n, k;
printf("ins... |
darcros/polimi-082746-fondamenti-informatica | esercizi/numeri-amicabili-speed/numeri-amicabili-speed.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
/*
ESE: Trovare tutti i numeri amicabili minori di MAX nel minor tempo possibile.
*/
#define MAX_DEFAULT 10000000
int main(int argc, char* argv[]) {
int max;
if (argc == 2) {
max = atoi(argv[1]);
// se la conversione non avviene con successo atoi... |
darcros/polimi-082746-fondamenti-informatica | esercizi/parola-in-frase/parola-in-frase.c | <reponame>darcros/polimi-082746-fondamenti-informatica<gh_stars>0
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define NF 200
#define NP 30
int startsWith(char* s1, char* s2) {
int i = 0;
while (s2[i] != '\0') {
// Se la prima stringa è più corta della seconda
if (s1[i] == '\0')
return ... |
darcros/polimi-082746-fondamenti-informatica | esercizi/triangoli-e-rettangoli/triangoli-e-rettangoli.c | <reponame>darcros/polimi-082746-fondamenti-informatica
#include <stdbool.h>
#include <stdio.h>
/*
Margine di tolleranza per il controllo di uguaglianza sui float
*/
#define FLOAT_EPSILON 0.0001
/*
Un punto sul piano cartesiano, definito dalle coordinate x e y
*/
typedef struct {
float x;
float y;
} point;
/*... |
darcros/polimi-082746-fondamenti-informatica | esercizi/scomposizione-fattori-primi/scomposizione-fattori-primi.c | #include <stdbool.h>
#include <stdio.h>
int main() {
int n;
printf("Inserisci un numero n: ");
scanf("%d", &n);
for (int fattore = 2; fattore < n; fattore++) {
// filtro solo numeri primi
int primo = 1;
for (int i = 2; i < fattore && primo; i++) {
if (fattore % i == 0) {
primo = 0;
... |
darcros/polimi-082746-fondamenti-informatica | esercizi/merge-sort-dynamic/merge-sort-dynamic.c | <reponame>darcros/polimi-082746-fondamenti-informatica<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#define ARR_SIZE 9
/*
Implementazione del merge sort.
La funzione sort() è uguale a `esercizi/merge-sort`. La funzione merge() è
reimplementata per utilizzare meno tempo, utilizza la memoria dinamica per
creare u... |
darcros/polimi-082746-fondamenti-informatica | esercizi/moltiplicazione-stringhe/moltiplicazione-stringhe.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
// versione che SOSTITUISCE DIRETTAMENTE la stringa passata per indirizzo
void strmul(char** s, int n) {
char* newStr = (char*)malloc(strlen(*s) * n + 1);
newStr[0] = '\0'; // metto '/0' così newStr è stringa vuota
for (int i = 0; i < n; i++) {
str... |
darcros/polimi-082746-fondamenti-informatica | esercizi/tabelline/tabelline.c | <gh_stars>0
#include <stdio.h>
int main() {
int n;
printf("Inserisci un numero da 1 a 12: ");
scanf("%d", &n);
for (int i = 0; i <= 10; i++) {
printf("%d x %d = %d\n", n, i, n * i);
}
return 0;
}
|
darcros/polimi-082746-fondamenti-informatica | esercizi/indice-parole/indice-parole.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SEPARATORS " .,;:+*-/!?'()\t\n\"\\<>"
/* L'indice si costruisce in memoriasotto forma di una lista di parole
che conserva anche il numero di occorrenze trovate di ogni parola */
typedef struct st_Elem {
char wor[30]; /* La parola */
int occ; ... |
darcros/polimi-082746-fondamenti-informatica | esercizi/palindromi-trasporto/palindromi-trasporto.c | <reponame>darcros/polimi-082746-fondamenti-informatica
#include <stdio.h>
#include <string.h>
#define N 30
/*
Da copiare e incollare invece di ridigitarle ogni volta:
La banana assomiglia assai alla patata ma poco all' ananas .
Tutti sapevano che anna aveva otto radar ma pochi la onorarono !
Tutti sapevano c... |
darcros/polimi-082746-fondamenti-informatica | esercizi/alfabeto-farfallino/alfabeto-farfallino.c | <gh_stars>0
#include <stdio.h>
int main() {
char c;
do {
scanf("%c", &c);
// to lower case
if (c >= 'A' && c <= 'Z')
c += 'a' - 'A';
switch (c) {
case 'a':
printf("afa");
break;
case 'e':
printf("efe");
break;
case 'i':
printf("if... |
darcros/polimi-082746-fondamenti-informatica | esercizi/bilanciamento-parentesi/bilanciamento-parentesi.c | #include <stdio.h>
#include <stdlib.h>
/********************************************
Definizione della pila e delle sue funzioni
*********************************************/
typedef struct sNode {
char simbolo;
struct sNode* nextPtr;
} StackNode;
typedef StackNode* StackNodePtr;
/* In questa versione, la pi... |
darcros/polimi-082746-fondamenti-informatica | esercizi/parola-in-frase-ricorsivo/parola-in-frase-ricorsivo.c | <gh_stars>0
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#define NF 200
#define NP 30
// Controlla se la prima stringa inizia con la seconda stringa
int startsWith(char* s1, char* s2) {
// caso base: tute le stringhe iniziano con la stringa vuota
if (*s2 == '\0')
return 1;
// caso base: abbiam... |
soerenbnoergaard/maetning | src/maetning/sat2.h | // Modeled after Camel Crusher DistTube
#define SAT2_COEFFS_LENGTH 101
const float sat2_coeffs[][4] = {
{ 1, -0.000207935, 0.999713, -9.81884e-05 },
{ 1.048, 1.993, 4.17732, 1.18892 },
{ 1.08, 1.73605, 3.74991, 1.02497 },
{ 1.12095, 1.47375, 3.30412, 0.851922 },
{ 1.16548, 1.25079, 2.91563, 0.69909... |
soerenbnoergaard/maetning | src/maetning/sat3.h | // Modeled after Camel Crusher DistMech
#define SAT3_COEFFS_LENGTH 101
const float sat3_coeffs[][3] = {
{ 1, 1.00007, 5.38307e-05 },
{ 1.12, 0.675717, -0.24321 },
{ 1.2, 0.55556, -0.333334 },
{ 1.30236, 0.452608, -0.410546 },
{ 1.41369, 0.376696, -0.467477 },
{ 1.51623, 0.326275, -0.505295 },
... |
soerenbnoergaard/maetning | src/maetning/sat0.h | <reponame>soerenbnoergaard/maetning<gh_stars>1-10
#define SAT0_COEFFS_LENGTH 101
const float sat0_coeffs[][5] = {
{ 1.00381, 1.00378, -0.654707, 1.00384, 0.67912 },
{ 1.0075, 1.00712, 0.275586, 1.00651, -0.404481 },
{ 1.01765, 1.01605, 0.36706, 1.01238, -0.351478 },
{ 1.03332, 1.026, 0.477473, 1.02124, ... |
soerenbnoergaard/maetning | src/maetning/sat5.h | #define SAT5_COEFFS_LENGTH 101
const float sat5_coeffs[][10] = {
{ 1.00987,0.0021846,0.00629453,-0.0229679,0,0,0,0,0,0},
{ 1.00967,0.0022674,0.00694615,-0.0239854,0,0,0,0,0,0},
{ 1.00947,0.0024156,0.00759309,-0.0250449,0,0,0,0,0,0},
{ 1.00927,0.00252419,0.0083483,-0.0261478,0,0,0,0,0,0},
{ 1.00906,... |
soerenbnoergaard/maetning | src/maetning/sat1.h | <gh_stars>1-10
#define SAT1_COEFFS_LENGTH 101
const float sat1_coeffs[][3] = {
{ -2.15876e-05,0.996228,-5.16094e-05},
{ 0.000661507,0.992408,5.95507e-05},
{ 0.00353305,0.981808,0.000776531},
{ 0.00947247,0.965313,0.0018432},
{ 0.015526,0.945412,0.00313824},
{ 0.0289555,0.92006,0.00522701},
{... |
soerenbnoergaard/maetning | src/maetning/sat4.h | <gh_stars>1-10
#define SAT4_COEFFS_LENGTH 101
const float sat4_coeffs[][10] = {
{ 1.01098,0.00124656,0.00152633,-0.0125889,0,0,0,0,0,0},
{ 1.01092,0.00126871,0.0017335,-0.0131634,0,0,0,0,0,0},
{ 1.01087,0.00130091,0.00194251,-0.0137629,0,0,0,0,0,0},
{ 1.01081,0.00134579,0.00215439,-0.0143882,0,0,0,0,0,... |
shravanshetty1/cosmos-rust-wallet | packages/crw-wallet/ffi-binding.h | /***
* @brief This C header file exposes the FFI defined inside the ffi crate.
*/
#include <stdint.h>
typedef struct wallet wallet_t;
/**
* @brief Struct that represents a signature.
*/
typedef struct {
/**
* @brief The length of the signature.
*/
uint32_t len;
/**
* @brief The data signature.
... |
tcl-mirror/spotoconf | examples/tjext/generic/tjext.c | <reponame>tcl-mirror/spotoconf
/*
* Copyright (c) 2019 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVID... |
tcl-mirror/spotoconf | examples/jimext/generic/jimext.c | /*
* Copyright (c) 2019 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL... |
tcl-mirror/spotoconf | examples/tclext_c/generic/tclext_c.c | /*
* Copyright (c) 2019 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL... |
tcl-mirror/spotoconf | examples/tkext/generic/tkext.c | /*
* Copyright (c) 2019 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL... |
qlcchain/Confidant-Station | source/inc/tox.h | /*
* The Tox public API.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
... |
qlcchain/Confidant-Station | source/src/crc32.c | <reponame>qlcchain/Confidant-Station
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "crc32.h"
unsigned short crc16_ccitt_table[256] =
{
0x0000, 0x7f33, 0xfe66, 0x8155, 0x2111, 0x5e22, 0xdf77, 0xa044,
0x4222, 0x3d11, ... |
qlcchain/Confidant-Station | source/src/TCP_server.c | <filename>source/src/TCP_server.c<gh_stars>1-10
/*
* Implementation of the TCP relay server part of Tox.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2014 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or... |
qlcchain/Confidant-Station | source/inc/sql_db.h | <filename>source/inc/sql_db.h
#ifndef SQL_DB_H
#define SQL_DB_H
#include <stdio.h>
#include <net/if.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sqlite3.h>
#include <common_lib.h>
#include "pn_imserver.h"
#include "cfd_route.h"
#define S... |
qlcchain/Confidant-Station | source/src/DHT.c | /*
* An implementation of the DHT as seen in docs/updates/DHT.md
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU... |
qlcchain/Confidant-Station | source/src/ping.c | /*
* Buffered pinging using cyclic arrays.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
* Copyright © 2013 plutooo
*
* This file is part of Tox, the free peer to peer instant messenger.
* This file is donated to the Tox Project.
*
* Tox is free software: you can redistribute... |
qlcchain/Confidant-Station | source/src/multicastsrv.c | <reponame>qlcchain/Confidant-Station
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "common_lib.h"
#include <errno.h>
#include <openssl/aes.h>
#include <time.h>
#include <sys/ioctl.h>
#include <linux/if.h>... |
qlcchain/Confidant-Station | source/src/crypto_core.c | <reponame>qlcchain/Confidant-Station
/*
* Functions for the core crypto.
*
* NOTE: This code has to be perfect. We don't mess around with encryption.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox i... |
qlcchain/Confidant-Station | source/src/tox.c | /*
* The Tox public API.
*/
/*
* Copyright ? 2016-2018 The TokTok team.
* Copyright ? 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
... |
qlcchain/Confidant-Station | source/inc/onion.h | /*
* Implementation of the onion part of docs/Prevent_Tracking.txt
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the G... |
qlcchain/Confidant-Station | source/src/tox_seg_msg.c | #include "tox_seg_msg.h"
#include "common_lib.h"
struct list_head g_tox_msg_send_list = LIST_HEAD_INIT(g_tox_msg_send_list);
pthread_rwlock_t g_tox_msg_send_lock = PTHREAD_RWLOCK_INITIALIZER;
/*****************************************************************************
函 数 名 : tox_seg_msg_process
功能描述 : ... |
qlcchain/Confidant-Station | source/src/misc_tools.c | /* misc_tools.c
*
*
* Copyright (C) 2014 Toxic All Rights Reserved.
*
* This file is part of Toxic.
*
* Toxic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
... |
qlcchain/Confidant-Station | source/inc/state.h | /**
* The state module is responsible for parsing the Tox save data format and for
* saving state in that format.
*
* This module provides functions for iterating over serialised data sections
* and reading/writing numbers in the correct format (little endian).
*
* Note that unlike the Tox network protocol, the ... |
qlcchain/Confidant-Station | source/inc/TCP_connection.h | <filename>source/inc/TCP_connection.h
/*
* Handles TCP relay connections between two Tox clients.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2015 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify... |
qlcchain/Confidant-Station | source/src/common_lib.c | <gh_stars>1-10
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include <time.h>
#include <arpa/inet.h>
#include <common_lib.h>
#include <curl/curl.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <pthread.h... |
qlcchain/Confidant-Station | source/src/nTox.c | /*
* Textual frontend for Tox.
*/
/*
* Copyright 漏 2016-2017 The TokTok team.
* Copyright 漏 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as publish... |
qlcchain/Confidant-Station | source/inc/TCP_client.h | <gh_stars>1-10
/*
* Implementation of the TCP relay client part of Tox.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2014 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of ... |
qlcchain/Confidant-Station | source/inc/version.h | <filename>source/inc/version.h
#ifndef __VERSION_H
#define __VERSION_H
#define PNR_SERVER_TOPVERSION "%t"
#define PNR_SERVER_MIDVERSION "%m"
#define PNR_SERVER_LOWVERSION "%l"
#define PNR_SERVER_BUILD_TIME "%T"
#define PNR_SERVER_BUILD_HASH "%G"
#endif
|
qlcchain/Confidant-Station | source/src/state.c | #include "state.h"
#include <string.h>
/* state load/save */
int state_load(const Logger *log, state_load_cb *state_load_callback, void *outer,
const uint8_t *data, uint32_t length, uint16_t cookie_inner)
{
if (state_load_callback == nullptr || data == nullptr) {
LOGGER_ERROR(log, "state_lo... |
qlcchain/Confidant-Station | source/inc/util.h | /*
* Utilities.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
* Copyright © 2013 plutooo
*
* This file is part of Tox, the free peer to peer instant messenger.
* This file is donated to the Tox Project.
*
* Tox is free software: you can redistribute it and/or modify
* it und... |
qlcchain/Confidant-Station | source/inc/friend_requests.h | /*
* Handle friend requests.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2014 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published... |
qlcchain/Confidant-Station | source/inc/misc_tools.h | <reponame>qlcchain/Confidant-Station
/* misc_tools.c
*
*
* Copyright (C) 2014 Toxic All Rights Reserved.
*
* This file is part of Toxic.
*
* Toxic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation,... |
qlcchain/Confidant-Station | source/src/Messenger.c | /*
* An implementation of a simple text chat only messenger on the tox network core.
*/
/*
* Copyright ? 2016-2018 The TokTok team.
* Copyright ? 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under ... |
qlcchain/Confidant-Station | source/src/http_post.c | /************************************************************************
> File Name: https_post.c
> Author: willcao
> Created Time: 2018年08月29日 星期三 16时42分21秒
***********************************************************************/
#include <fcntl.h>
#include <netdb.h>
#include <stdio.h>
#incl... |
qlcchain/Confidant-Station | source/src/multicastcli.c | <filename>source/src/multicastcli.c
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#if 0
#define MCAST_PORT 18000
#define MCAST_ADDR "172.16.31.10"
#define BUFF_SIZE 256
#define MCAST_INTERVAL ... |
qlcchain/Confidant-Station | source/src/util.c | /*
* Utilities.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
* Copyright © 2013 plutooo
*
* This file is part of Tox, the free peer to peer instant messenger.
* This file is donated to the Tox Project.
*
* Tox is free software: you can redistribute it and/or modify
* it und... |
qlcchain/Confidant-Station | source/src/sql_db.c | <filename>source/src/sql_db.c
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <curl/curl.h>
#include <syslog.h>
#include "common_lib.h"
#include "cfd_route.h"
#include "sql_db.h"
#include "pn_imserver.h"
sqlite3 *g_db_handle = NULL;
sqlite3 *g_friendsdb_handle... |
qlcchain/Confidant-Station | source/inc/net_crypto.h | /*
* Functions for the core network crypto.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public Licen... |
qlcchain/Confidant-Station | source/inc/nTox.h | <reponame>qlcchain/Confidant-Station
/*
* Textual frontend for Tox.
*/
/*
* Copyright ? 2016-2017 The TokTok team.
* Copyright ? 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the ... |
qlcchain/Confidant-Station | source/src/friend_requests.c | /*
* Handle friend requests.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published... |
qlcchain/Confidant-Station | source/inc/pn_imserver.h | /*************************************************************************
*
* pn im server 头文件
*
*
*
*
*
*
*
*
*
*
*
*
*
*************************************************************************/
#ifndef PN_IM_SERVER_HEADER
#define PN_IM_SERVER_HEADER
#include "common_lib.h"
#include <libwebsockets.h>
#i... |
qlcchain/Confidant-Station | source/inc/mono_time.h | #ifndef C_TOXCORE_TOXCORE_MONO_TIME_H
#define C_TOXCORE_TOXCORE_MONO_TIME_H
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MONO_TIME_DEFINED
#define MONO_TIME_DEFINED
/**
* The timer portion of the toxcore event loop.
*
* We update the time exactly once per tox_iterate cal... |
qlcchain/Confidant-Station | source/inc/logger.h | /*
* Logger abstraction backed by callbacks for writing.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General... |
qlcchain/Confidant-Station | source/src/cfd_route.c | /*************************************************************************
*
* confidant 寻址接口
*
*
*
*
*
*
*
*
*
*
*
*
*
*************************************************************************/
#include <string.h>
#include <cJSON.h>
#include "common_lib.h"
#include "sql_db... |
qlcchain/Confidant-Station | source/inc/ping_array.h | /*
* Implementation of an efficient array to store that we pinged something.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the term... |
qlcchain/Confidant-Station | source/inc/onion_announce.h | /*
* Implementation of the announce part of docs/Prevent_Tracking.txt
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of th... |
qlcchain/Confidant-Station | source/src/mono_time.c | <filename>source/src/mono_time.c
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
#if !defined(OS_WIN32) && (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
#define OS_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#ifdef __APPLE__
#include <mach/clock.h>
#include <mach/mach.h>
#endif
#... |
qlcchain/Confidant-Station | source/src/bootstrap.c | /* bootstrap.c
*
*
* Copyright (C) 2016 Toxic All Rights Reserved.
*
* This file is part of Toxic.
*
* Toxic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
... |
qlcchain/Confidant-Station | source/src/network.c | <reponame>qlcchain/Confidant-Station<gh_stars>1-10
/*
* Functions for the core networking.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it ... |
qlcchain/Confidant-Station | source/inc/curl_util.h | /* curl_util.h
*
*
* Copyright (C) 2016 Toxic All Rights Reserved.
*
* This file is part of Toxic.
*
* Toxic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
... |
qlcchain/Confidant-Station | source/inc/crc32.h | <reponame>qlcchain/Confidant-Station
#ifndef _LINUX_CRC32_H
#define _LINUX_CRC32_H
#include <linux/types.h>
unsigned int crc32(unsigned int crc, unsigned char * buffer, unsigned int size);
unsigned short crc16(unsigned char *message, unsigned int len);
void init_crc_table(void);
unsigned short gen_crc16(const unsigne... |
qlcchain/Confidant-Station | source/inc/upload.h | #ifndef UPLOAD_H
#define UPLOAD_H
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <errno.h>
#include <libwebsockets.h>
#include "common_lib.h"
#include "cJSON.h"
#include "md5.h"
#define UPLOAD_FILENAME_MAXLEN 256
#define PNR_MAX_SENDFILE_NUM 50 /* 最大同时发送文件数... |
qlcchain/Confidant-Station | source/src/pn_imserver.c | <reponame>qlcchain/Confidant-Station
/*************************************************************************
*
* im server文件
*
*
*
*
*
*
*
*
*
*
*
*
*
*************************************************************************/
#include <libwebsockets.h>
#include <string.h>
#include <cJSON.h... |
qlcchain/Confidant-Station | source/inc/common_lib.h | <gh_stars>1-10
#ifndef COMMON_LIB_H
#define COMMON_LIB_H
#include <stdio.h>
#ifndef OK
#define OK 0
#endif
#ifndef ERROR
#define ERROR 1
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typede... |
qlcchain/Confidant-Station | source/src/ping_array.c | /*
* Implementation of an efficient array to store that we pinged something.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2014 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the term... |
qlcchain/Confidant-Station | source/inc/LAN_discovery.h | <filename>source/inc/LAN_discovery.h
/*
* LAN discovery implementation.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of ... |
qlcchain/Confidant-Station | source/src/base64.c | #include "base64.h"
#include <openssl/pem.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
int base64_encode(char *in_str, int in_len, char *out_str)
{
BIO *b64, *bio;
BUF_MEM *bptr = NULL;
size_t size = 0;
if (in_str == NULL || out_str == NULL)
return -1;
b64 = BIO_new(BIO_f_base64... |
qlcchain/Confidant-Station | source/inc/list.h | /*
* Simple struct with functions to create a list which associates ids with data
* -Allows for finding ids associated with data such as IPs or public keys in a short time
* -Should only be used if there are relatively few add/remove calls to the list
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © ... |
qlcchain/Confidant-Station | source/inc/base64.h | #ifndef BASE64_H
#define BASE64_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int base64_encode(char *in_str, int in_len, char *out_str);
int base64_decode(char *in_str, char *out_str);
#endif
|
qlcchain/Confidant-Station | source/src/TCP_connection.c | <filename>source/src/TCP_connection.c
/*
* Handles TCP relay connections between two Tox clients.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2015 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify... |
qlcchain/Confidant-Station | source/inc/group.h | <filename>source/inc/group.h
/*
* Slightly better groupchats implementation.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2014 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the term... |
qlcchain/Confidant-Station | source/inc/friend_connection.h | /*
* Connection to friends.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2014 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published ... |
qlcchain/Confidant-Station | source/inc/DHT.h | <reponame>qlcchain/Confidant-Station
/*
* An implementation of the DHT as seen in docs/updates/DHT.md
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or mo... |
qlcchain/Confidant-Station | source/inc/tox_seg_msg.h | #ifndef __TOX_SEG_MSG_H
#define __TOX_SEG_MSG_H
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/select.h>
#include <semaphore.h>
#include <stdarg.h>
#include <pthread.h>
#include <signal.h>
#include <time.h>
#include <sys/param.h>
#include <getopt.h>
#include... |
qlcchain/Confidant-Station | source/inc/bootstrap.h | /* bootstrap.h
*
*
* Copyright (C) 2016 Toxic All Rights Reserved.
*
* This file is part of Toxic.
*
* Toxic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
... |
qlcchain/Confidant-Station | source/src/curl_util.c | /* curl_util.c
*
*
* Copyright (C) 2016 Toxic All Rights Reserved.
*
* This file is part of Toxic.
*
* Toxic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
... |
qlcchain/Confidant-Station | source/inc/Messenger.h | /*
* An implementation of a simple text chat only messenger on the tox network
* core.
*/
/*
* Copyright ? 2016-2018 The TokTok team.
* Copyright ? 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it und... |
qlcchain/Confidant-Station | source/src/LAN_discovery.c | <reponame>qlcchain/Confidant-Station
/*
* LAN discovery implementation.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of ... |
qlcchain/Confidant-Station | source/src/main.c | /*************************************************************************
*
* main文件
*
*
*
*
*
*
*
*
*
*
*
*
*
*************************************************************************/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#if defined(_WIN32) || defined(__WIN32__) || defined (W... |
qlcchain/Confidant-Station | source/src/upload.c | <filename>source/src/upload.c
#include "upload.h"
#include "pn_imserver.h"
static const char * const param_names[] = {
"Action",
"FromId",
"ToId",
"FileName",
"FileSize",
"MD5"
};
enum enum_param_names {
EPN_ACTION,
EPN_FID,
EPN_TID,
EPN_FNAME,
EPN_FSIZE,
EPN_MD5
};
extern int im_pushmsg_callback(int ind... |
qlcchain/Confidant-Station | source/src/logger.c | <reponame>qlcchain/Confidant-Station
/*
* Text logging abstraction.
*/
/*
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2013,2015 Tox project.
*
* This file is part of Tox, the free peer to peer instant messenger.
*
* Tox is free software: you can redistribute it and/or modify
* it under the terms of... |
Stan-en-Tim/Solarboat | VEDirect/src/VEDirect.h | <gh_stars>0
/******************************************************************
VEDirect Arduino
Copyright 2018, 2019, <NAME>
Distributed under MIT license - see LICENSE.txt
See README.md
File: VEDirect.h
- Class / enums / API
Updates:
- 2019-07-14:
- Rewrite of read - cleaner.
- Target labels ext... |
sutra/chia-plotter | include/chia/DiskSort.h | /*
* DiskSort.h
*
* Created on: May 23, 2021
* Author: mad
*/
#ifndef INCLUDE_CHIA_DISKSORT_H_
#define INCLUDE_CHIA_DISKSORT_H_
#include <chia/buffer.h>
#include <chia/ThreadPool.h>
#include <vector>
#include <string>
#include <cstdio>
#include <cstddef>
#include <memory>
#include <functional>
template<... |
sutra/chia-plotter | include/chia/phase3.h | /*
* phase3.h
*
* Created on: May 30, 2021
* Author: mad
*/
#ifndef INCLUDE_CHIA_PHASE3_H_
#define INCLUDE_CHIA_PHASE3_H_
#include <chia/phase2.h>
namespace phase3 {
struct entry_kpp {
uintkx_t pos[2]; // 2x 32-bit position / 2x 35-bit
uintkx_t key; // 32-bit (sort_key) / 35 bit
};
struct entry_lp ... |
sutra/chia-plotter | include/chia/buffer.h | <reponame>sutra/chia-plotter<filename>include/chia/buffer.h
/*
* buffer.h
*
* Created on: Jun 7, 2021
* Author: mad
*/
#ifndef INCLUDE_CHIA_BUFFER_H_
#define INCLUDE_CHIA_BUFFER_H_
#include <chia/settings.h>
template<typename T>
struct byte_buffer_t {
size_t count = 0;
const size_t capacity;
uint8_t* ... |
sutra/chia-plotter | include/chia/phase2.h | /*
* phase2.h
*
* Created on: May 29, 2021
* Author: mad
*/
#ifndef INCLUDE_CHIA_PHASE2_H_
#define INCLUDE_CHIA_PHASE2_H_
#include <chia/chia.h>
#include <chia/phase1.h>
#include <chia/DiskSort.h>
#include <chia/bitfield.hpp>
#include <array>
#include <vector>
#include <cstdio>
#include <cstdint>
#include... |
sutra/chia-plotter | include/chia/copy.h | <filename>include/chia/copy.h
/*
* copy.h
*
* Created on: Jun 8, 2021
* Author: mad
*/
#ifndef INCLUDE_CHIA_COPY_H_
#define INCLUDE_CHIA_COPY_H_
#include <chia/settings.h>
#include <string>
#include <vector>
#include <stdexcept>
#include <cstdio>
#include <cstdint>
#include <cstring>
#include <errno.h>
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.