repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
qinxiaoxin/resident | resident/resident/ResidentDetailViewController.h | //
// ResidentDetailViewController.h
// resident
//
// Created by <NAME> on 2/6/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ResidentDetailViewController : UIViewController
@property (nonatomic, strong) NSDictionary *residentDic;
@end
|
qinxiaoxin/resident | resident/resident/Entity.h | //
// Entity.h
// resident
//
// Created by <NAME> on 2/6/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Entity : NSObject
@property (nonatomic, strong) NSString *cnname;
@property (nonatomic, strong) NSString *jpname;
@property (nonatomic, strong) NSString... |
qinxiaoxin/resident | resident/resident/ResidentMainArrayService.h | <filename>resident/resident/ResidentMainArrayService.h<gh_stars>0
//
// ResidentMainArrayService.h
// resident
//
// Created by <NAME> on 2/6/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ResidentMainArrayService : NSObject
+ (NSArray *)fetchResidentMainAr... |
qinxiaoxin/resident | resident/resident/ResidentCoverViewController.h | <reponame>qinxiaoxin/resident
//
// ResidentCoverViewController.h
// resident
//
// Created by <NAME> on 2/7/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ResidentCoverViewController : UIViewController
@property (nonatomic, strong) UIImage *coverImage;
@end
|
qinxiaoxin/resident | resident/resident/AppDelegate.h | <filename>resident/resident/AppDelegate.h
//
// AppDelegate.h
// resident
//
// Created by <NAME> on 2/6/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWin... |
qinxiaoxin/resident | resident/resident/XHLoadingNavigationItemTitleView/UIViewController+XHLoadingNavigationItemTitle.h | <reponame>qinxiaoxin/resident
//
// UIViewController+XHLoadingNavigationItemTitle.h
// XHNavigationItemLadingTitleView
//
// Created by qtone-1 on 14-4-10.
// Copyright (c) 2014年. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "XHLoadingNavigationItemTitleView.h"
@interface UIViewController (XHLoadingNav... |
qinxiaoxin/resident | resident/resident/TableViewCell.h | //
// TableViewCell.h
// resident
//
// Created by <NAME> on 2/6/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TableViewCell : UITableViewCell<UIGestureRecognizerDelegate>
@property (weak, nonatomic) IBOutlet UILabel *cnLabel;
@property (weak, nonatomic) IBOutlet UI... |
GikkiAres/GATextView | GATextView/GATextView/GATextView/GATextView.h | <reponame>GikkiAres/GATextView
//
// GATextView.h
// GATextView
//
// Created by GikkiAres on 9/23/16.
// Copyright © 2016 GikkiAres. All rights reserved.
//
#import <UIKit/UIKit.h>
@class GATextView;
@protocol GATextViewDelegate <NSObject>
- (void)GATextViewHeightHasChanged:(GATextView *)textView;
@end
IB_D... |
GikkiAres/GATextView | GATextView/GATextView/ViewController.h | //
// ViewController.h
// GATextView
//
// Created by GikkiAres on 9/23/16.
// Copyright © 2016 GikkiAres. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
iOScontiue/runtime-kvo | KVONatureSearch/KVONatureSearch/Person.h | <reponame>iOScontiue/runtime-kvo<gh_stars>0
//
// Person.h
// KVONatureSearch
//
// Created by 卢育彪 on 2018/12/29.
// Copyright © 2018年 luyubiao. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface Person : NSObject
{
@public
int _age;
}
//@property (nonatomic, as... |
yuquanshan/personal-stash | toolbox/source/NestPrinter.h | #include <memory>
#include <vector>
template <typename T>
struct TreeNode {
TreeNode(T v): value_(v) {};
std::vector<std::shared_ptr<TreeNode>> children_;
T value_;
};
|
andersix/ipyxact | golden/out.h | #define SOME_REGISTER_MAP_CHIP_ID_REG 0x00000000
#define SOME_REGISTER_MAP_CHIP_ID_REG_REV_NUM_MASK 0x0000000F
#define SOME_REGISTER_MAP_CHIP_ID_REG_PART_NUM_MASK 0xFFFFFFF0
#define SOME_REGISTER_MAP_LINK_STATUS 0x00000004
#define SOME_REGISTER_MAP_LINK_STATUS_PORT0_MASK 0x0000000F
#define SOME_REGISTER_MAP_LINK_STA... |
khairul169/gdsqlite | gdsqlite.h | <gh_stars>100-1000
/* gdsqlite.h */
#ifndef GDSQLITE_H
#define GDSQLITE_H
#include "reference.h"
#include "ustring.h"
#include "map.h"
#include "sqlite/sqlite3.h"
class SQLite : public Reference {
GDCLASS(SQLite,Reference);
protected:
static void _bind_methods();
public:
SQLite();
int open(String path);
v... |
khairul169/gdsqlite | register_types.h | <reponame>khairul169/gdsqlite
/* register_types.h */
void register_gdsqlite_types();
void unregister_gdsqlite_types();
|
Martijnve23/catapult | tracing/tracing/value/diagnostics/reserved_infos.h | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Keep any values in here in sync with reserved_infos.py.
namespace catapult {
extern const char kStoriesDiagnostic[];
}
|
Martijnve23/catapult | tracing/tracing/value/running_statistics.h | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <cmath>
#include <limits>
namespace catapult {
class RunningStatistics {
public:
RunningStatistics()
: count_(0), mean_(0.0),
... |
DanielSantDev/Projects-with-C-- | Teatro/Teatro.h | <filename>Teatro/Teatro.h
#ifndef TEATRO_H_INCLUDED
#define TEATRO_H_INCLUDED
#include <iostream>
/****************************
CODIFICADO POR <NAME>
*****************************/
using namespace std;
struct Teatro{
unsigned Linhas;
unsigned Colunas;
unsigned Vendas;
bool *Assentos;
Teatro(){... |
DanielSantDev/Projects-with-C-- | Containers/Container.h | #ifndef CONTAINER_H_INCLUDED
#define CONTAINER_H_INCLUDED
template <typename Tipo>
class Pilha {
private:
Tipo *v;
unsigned tamanho;
int topo;
public:
Pilha(unsigned tam) {
tamanho = tam;
v = new Tipo[tamanho];
topo = -1;
}
~Pilha() {
delete []v;
}
void... |
DanielSantDev/Projects-with-C-- | Fila de Hospital/filaalocacaosequencial.h | <reponame>DanielSantDev/Projects-with-C--<gh_stars>0
#ifndef FILAALOCACAOSEQUENCIAL_H_INCLUDED
#define FILAALOCACAOSEQUENCIAL_H_INCLUDED
template <typename Tipo>
class Fila{
private:
int fim, inic;
unsigned qtde;
unsigned tamanho;
Tipo *v;
public:
Fila(unsigned tam){
fim=-1;
inic=0;... |
L2Gui/Bebop2cpp | include/Drone.h | <gh_stars>1-10
#ifndef BEBOP_DRONE_H
#define BEBOP_DRONE_H
extern "C" {
#include <libARSAL/ARSAL.h>
#include <libARController/ARController.h>
#include <libARDiscovery/ARDiscovery.h>
#include <libARNetwork/ARNetwork.h>
#include <libARController/ARCONTROLLER_Frame.h>
#include <libARController/ARCONTROLLER_Dictionary.h>
... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/unixsocket.h | #ifndef UNIXSOCKET_H
#define UNIXSOCKET_H
void unixsocket_example(void);
#endif
|
zzApotheosis/Personal-Projects | coding_practice/C/shared_libraries/foo.c | #include <stdio.h>
#include <stdlib.h>
int sharedFunction() {
int i = 1336;
printf("This is a big pog inside libfoo!\n");
return ++i;
}
|
zzApotheosis/Personal-Projects | coding_practice/C/oop/main.c | #include <stdlib.h>
#include <stdio.h>
#include "main.h"
int main(int argc, char** argv) {
struct Point* p1 = Point_new(2, 3);
struct Point* p2 = Point_new(4, 5);
struct Point* p3 = Point_new(-4, 20);
fprintf(stdout, "Point 1, x=%d, y=%d\n", Point_getX(p1), Point_getY(p1));
fprintf(stdout, "Po... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 4/Lab4.X/OneWire.c | /*
* File: OneWire.c
* Author: <NAME>
*
* Created on March 19, 2014, 10:15 AM
*/
#include <xc.h>
#include "OneWire.h"
unsigned char lastDiscrepancy;
unsigned char lastDevice;
OWRomCode OWSearchRomCode;
void OWInit(void) {
OWPowerOff();
DQHigh();
}
unsigned char OWReset(void) {
char presence;
... |
zzApotheosis/Personal-Projects | keygen/src/main.c | <reponame>zzApotheosis/Personal-Projects
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include "main.h"
int main(int argc, char** argv) {
srand(time(NULL));
int i = 0;
int limit = 16;
char* str = malloc(limit * sizeof(char) + 1);
for (i = 0; i < limit; i++) {
... |
zzApotheosis/Personal-Projects | testing/gnu_autotools/src/foo.h | <gh_stars>1-10
#ifndef FOO_H
#define FOO_H
void testFunction(void);
#endif
|
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 6/usb_lab/mouse.c | /********************************************************************
FileName: mouse.c
*///*****************************************************************
#ifndef USBMOUSE_C
#define USBMOUSE_C
/** INCLUDES *******************************************************/
#include "usb.h"
#include "HardwareProfile.h"... |
zzApotheosis/Personal-Projects | coding_practice/C/testing/src/main.c | <filename>coding_practice/C/testing/src/main.c
#include <stdlib.h>
#include <stdio.h>
#include "main.h"
int main(int argc, char** argv) {
// Ligma
struct LinkedList* test = linkedlist_new();
linkedlist_append(test, util_int_to_heap(1337));
fprintf(stdout, "Value = %d\n", *(int*)linkedlist_value_at(test... |
zzApotheosis/Personal-Projects | coding_practice/C/arguments/args.h | <reponame>zzApotheosis/Personal-Projects<filename>coding_practice/C/arguments/args.h
#ifndef ARGS_H
#define ARGS_H
void parseArgs(int, char**);
#endif
|
zzApotheosis/Personal-Projects | sysloglistener/C/src/project.c | <reponame>zzApotheosis/Personal-Projects
#include <stdlib.h>
#include <stdio.h>
#include "project.h"
/* Global variables */
char* project_name = NULL;
/* Project Name */
void project_set_name(char* new_name) {
if (project_name != NULL) free(project_name);
slutil_strcpy(&project_name, new_name);
}
char* projec... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/server.h | #ifndef SERVER_H
#define SERVER_H
/* Includes */
#include "logger.h"
#include "unixsocket.h"
#include "slutil.h"
#include "project.h"
#endif
|
zzApotheosis/Personal-Projects | coding_practice/C/libgcrypt/main.h | <filename>coding_practice/C/libgcrypt/main.h
#ifndef MAIN_H
#define MAIN_H
#define NEED_LIBGCRYPT_VERSION "1.9.3"
gcry_error_t init_gcry(void);
gcry_error_t version_check(void);
int printhex(void*, int);
#endif
|
zzApotheosis/Personal-Projects | coding_practice/C/oop/main.h | #ifndef MAIN_H
#define MAIN_H
#include "point.h"
#endif
|
zzApotheosis/Personal-Projects | coding_practice/C/signals/main.c | <reponame>zzApotheosis/Personal-Projects<filename>coding_practice/C/signals/main.c
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
void sigint_handler(int);
int main(int argc, char** argv) {
signal(SIGINT, sigint_handler);
fprintf(stdout, "Press Ctrl-C to exit\n");
whi... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_08/main.c | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char** argv) {
// Define function variables
char bigNum[] =
"73167176531330624919225119674426574742355349194934"
"96983520312774506326239578318016984801869478851843"
"85861560789112949495459501737958331952853208805511"
"12540698747158523... |
zzApotheosis/Personal-Projects | coding_practice/C/testing/random.c | <reponame>zzApotheosis/Personal-Projects
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(int argc, char** argv) {
srand(time(0));
for (int i = 0; i < 10; i++) {
fprintf(stdout, "%d\n", rand() % 10);
}
return EXIT_SUCCESS;
}
|
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 1/Lab1.X/usart.c | #include <xc.h>
#include "LCD.h"
#if defined __18F8722
#pragma config OSC=HSPLL
#pragma config WDT=OFF
#pragma config LVP=OFF
#pragma config XINST=OFF
#elif defined __18F87J11
#pragma config FOSC=HSPLL
#pragma config WDTEN=OFF
#pragma config XINST=OFF
#else
#error Invalid processor selection
#endif
void InitPins(vo... |
zzApotheosis/Personal-Projects | testing/journald_vs_syslog/syslog.c | <filename>testing/journald_vs_syslog/syslog.c
#include <stdlib.h>
#include <stdio.h>
#include <syslog.h>
int main(int argc, char** argv) {
setlogmask(LOG_UPTO(LOG_NOTICE));
openlog("syslog", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
syslog(LOG_NOTICE, "Hello, world! From syslog.c");
syslog(LOG_INFO... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/server.c | #include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include "server.h"
/* Forward declarations */
void server_init(void);
void sigint_handler(int);
/* Main */
int main(int argc, char** argv) {
/* Define function variables */
char* project_name = NULL;
char* s = NULL;
/... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/test.h | <gh_stars>1-10
#ifndef TEST_H
#define TEST_H
/* Includes */
#include "slutil.h"
#endif
|
zzApotheosis/Personal-Projects | coding_practice/C/gtk4/basic.c | #include <stdlib.h>
#include <stdio.h>
#include <gtk/gtk.h>
static void activate(GtkApplication* app, gpointer user_data) {
}
int main(int argc, char** argv) {
GtkApplication* app = NULL;
int status = 0;
return status;
}
|
zzApotheosis/Personal-Projects | coding_practice/C/libgcrypt/main.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <gcrypt.h>
#include "main.h"
int main(int argc, char **argv) {
// Define function variables
int status = 0;
char passphrase[] = "<PASSWORD> ";
char *key = NULL;
int keysize = 0;
int blklen = 0;
size_t size_... |
zzApotheosis/Personal-Projects | coding_practice/C/arguments/linkedlist.c | <reponame>zzApotheosis/Personal-Projects
#include <stdlib.h>
#include <stdio.h>
#include "linkedlist.h"
struct Node {
void* key;
void* value;
struct Node* next;
};
struct LinkedList {
struct Node* head;
int size;
};
void a
|
zzApotheosis/Personal-Projects | coding_practice/C/lkm/lkm.c | <filename>coding_practice/C/lkm/lkm.c
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("<NAME>");
MODULE_DESCRIPTION("A simple Linux module example.");
MODULE_VERSION("0.01");
static int __init lkm_init(void) {
printk(KERN_INFO "Hello, World!\n");
... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_04/palindrome.c | <gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
int isPalindrome(int n) {
// Define method variables
int reversed = 0;
int temp = 0;
// Reverse the order of the input
temp = n;
while (temp) {
reversed = 10 * reversed + (temp % 10);
temp /= 10;
}
// Determine ... |
zzApotheosis/Personal-Projects | keygen/src/charset.h | #ifndef CHARSET_H
#define CHARSET_H
/* Charset Sizes */
#define CHARSET_LC_SIZE 26
#define CHARSET_UC_SIZE 26
#define CHARSET_NM_SIZE 10
#define CHARSET_SY_SIZE 32
/* Charset Arrays */
extern const char charset_lc[];
extern const char charset_uc[];
extern const char charset_nm[];
extern const char charset_sy[];
#end... |
zzApotheosis/Personal-Projects | coding_practice/C/unix_sockets/client.c | <gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
char* socket_path = "\0hidden";
int main(int argc, char** argv) {
struct sockaddr_un addr;
char buf[100];
int fd, rc;
if (argc > 1) socket_path = argv[1];
if ((fd = socket(AF_UNI... |
zzApotheosis/Personal-Projects | coding_practice/C/arguments/main.c | <reponame>zzApotheosis/Personal-Projects<filename>coding_practice/C/arguments/main.c
#include <stdlib.h>
#include <stdio.h>
#include "args.h"
int main(int argc, char** argv) {
parseArgs(argc, argv);
return EXIT_SUCCESS;
}
|
zzApotheosis/Personal-Projects | coding_practice/C/testing/main.c | <filename>coding_practice/C/testing/main.c
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char** argv) {
fprintf(stdout, "LIGMA\n");
getchar();
return EXIT_SUCCESS;
}
|
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 2/Part 2/SPIMaster.c | <gh_stars>1-10
#include <xc.h>
#include <stdio.h>
#include "LCD.h"
#if defined __18F8722
#pragma config OSC=HSPLL
#pragma config WDT=OFF
#pragma config LVP=OFF
#pragma config XINST=OFF
#elif defined __18F87J11
#pragma config FOSC=HSPLL
#pragma config WDTEN=OFF
#pragma config XINST=OFF
#else
#error Invalid pro... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/slutil.c | #include <stdlib.h>
#include <stdio.h>
#include "slutil.h"
/* Utility function to copy a string into another memory location */
void slutil_strcpy(char** dest, char* src) {
// Define function variables
int l = 1;
char* ptr = src;
// Check for null pointer
if (src == NULL) {
return;
}
... |
zzApotheosis/Personal-Projects | coding_practice/C/util/src/node.c | <reponame>zzApotheosis/Personal-Projects
#include <stdlib.h>
#include <stdio.h>
#include "include/util.h"
/* Begin Class Structure */
struct Node {
void* value;
struct Node* next;
};
// Constructor
static void NodeInit(struct Node* self, void* value) {
self->value = value;
self->next = NULL;
}
// Al... |
zzApotheosis/Personal-Projects | coding_practice/C/shared_libraries/test.c | <gh_stars>1-10
#include <stdio.h>
#include <stdlib.h>
#include "foo.h"
int main(int argc, char* argv[]) {
int exitCode = 0;
printf("This is inside main!\n");
sharedFunction();
return exitCode;
}
|
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_06/main.c | #include <stdlib.h>
#include <stdio.h>
#include <gmp.h>
int main(int argc, char** argv) {
// Define variables
unsigned long int llim = 1lu;
unsigned long int ulim = 100lu;
unsigned long int power = 2lu;
mpz_t soe; // Sum of exponent
mpz_t eos; // Exponent of sum
mpz_t sum;
mpz_t diff;
... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_04/palindrome.h | #ifndef PALINDROME_H
#define PALINDROME_H
int isPalindrome(int);
#endif
|
zzApotheosis/Personal-Projects | coding_practice/C/oop/point.h | <reponame>zzApotheosis/Personal-Projects
#ifndef POINT_H
#define POINT_H
/* Class structure */
struct Point;
struct Point* Point_new(int, int);
void Point_destroy(struct Point*);
/* Setters */
int Point_getX(struct Point*);
int Point_getY(struct Point*);
/* Getters */
void Point_setX(struct Point*, int);
void Point_... |
zzApotheosis/Personal-Projects | coding_practice/C/function_pointers/main.c | <filename>coding_practice/C/function_pointers/main.c<gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
struct point {
int x;
int y;
void (*print)(const struct point*);
};
void print_x(const struct point* p) {
fprintf(stdout, "x=%d\n", p->x);
}
void print_y(const struct point* p) {
fprintf(stdo... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/slutil.h | <reponame>zzApotheosis/Personal-Projects<filename>sysloglistener/C/src/slutil.h
#ifndef SLUTIL_H
#define SLUTIL_H
/* Functions */
void slutil_strcpy(char**, char*);
size_t slutil_strlen(char*);
#endif
|
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 3/Lab 3MASTER.X/I2CMaster.c | <reponame>zzApotheosis/Personal-Projects<filename>academic/Interface Techniques/Lab 3/Lab 3MASTER.X/I2CMaster.c
#include <xc.h>
#include <stdio.h>
#include "LCD.h"
#pragma config FOSC=HSPLL
#pragma config WDTEN=OFF
#pragma config XINST=OFF
/*
Connections:
Master RD5 <-> Slave RD5
Master RD6 <-> Slave ... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 4/Lab4.X/DS18x20.c | <filename>academic/Interface Techniques/Lab 4/Lab4.X/DS18x20.c<gh_stars>1-10
/*
* File: DS18x20.c
* Author: <NAME>
*
* Created on March 20, 2014, 9:48 PM
*/
#include <xc.h>
#include <stdlib.h>
#include "DS18x20.h"
//#include "Oscillator.h"
double ReadDS18S20(OWRomCode *rc) {
DS18S20Scratchpad sp;
OWRe... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/unixsocket.c | <reponame>zzApotheosis/Personal-Projects
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
char* socket_path = "socket";
// char* socket_path = "\0hidden";
void unixsocket_example() {
struct sockaddr_un addr; // sockaddr_un is a UNIX socket address
char buf... |
zzApotheosis/Personal-Projects | testing/atkins/test.c | #include <stdio.h>
#include <stdlib.h>
#include "sieve.h"
int main(int argc, char** argv) {
// Define method variables
int exitCode = 0;
unsigned char* temp;
unsigned long int limit = 10000;
// Test
temp = satkins(limit);
for (int i = 0; i < limit; i++) {
if (temp[i]) {
... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_16/main.c | <reponame>zzApotheosis/Personal-Projects<gh_stars>1-10
#include <stdio.h>
#include <stdlib.h>
#include <gmp.h>
int main(int argc, char* argv) {
// Define method variables
int exitCode = 0;
mpz_t base;
unsigned long int power = 1000;
mpz_t num;
mpz_t sum;
mpz_t digit;
// Initialize ... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 4/Lab4.X/DS18x20.h | /*
* File: DS18x20.h
* Author: <NAME>
*
* Created on March 20, 2014, 9:48 PM
*/
#ifndef DS18X20_H
#define DS18X20_H
#include "OneWire.h"
typedef union {
struct {
int temperature;
unsigned char TH;
unsigned char TL;
int reserved;
unsigned char countRemain;
u... |
zzApotheosis/Personal-Projects | testing/atkins/sieve.h | <reponame>zzApotheosis/Personal-Projects
#ifndef SIEVE_H
#define SIEVE_H
#include <math.h>
unsigned char* satkins(unsigned long int);
#endif
|
zzApotheosis/Personal-Projects | testing/gnu_autotools/src/main.c | #include <stdio.h>
#include <stdlib.h>
#include "foo.h"
int main(int argc, char** argv) {
int exitCode = 0;
fprintf(stdout, "Hello, world!\n");
testFunction();
return exitCode;
}
|
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_02/main.c | <reponame>zzApotheosis/Personal-Projects<gh_stars>1-10
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv) {
// Define method variables
int exitCode = 0;
int limit = 4000000;
int previous = 0;
int temp = 0;
int sum = 0;
int index = 1;
// Solve
while (index < l... |
zzApotheosis/Personal-Projects | testing/journald_vs_syslog/journald.c | <gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
#include <systemd/sd-journal.h>
int main(int argc, char** argv) {
sd_journal_print(LOG_INFO, "Hello, world! From journald.c");
}
|
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_01/main.c | <gh_stars>1-10
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv) {
// Define method variables
int exitCode = 0;
int limit = 1000;
int sum = 0;
// Do code
for (int i = 0; i < limit; i++) {
if (i % 3 == 0 || i % 5 == 0) {
sum += i;
}
}
... |
zzApotheosis/Personal-Projects | coding_practice/C/util/src/linkedlist.c | #include <stdlib.h>
#include <stdio.h>
#include "include/util.h"
/* Forward declare static functions */
static void LinkedListRecursiveDestroy(struct Node*);
/* Class structure */
struct LinkedList {
struct Node* head;
};
static void LinkedListInit(struct LinkedList* self) {
self->head = NULL;
}
struct Link... |
zzApotheosis/Personal-Projects | testing/atkins/sieve.c | #include <stdio.h>
#include <stdlib.h>
#include "sieve.h"
unsigned char* satkins(unsigned long int limit) {
// Define method variables
unsigned long int wlimit;
unsigned long int i, j, x, y, z;
unsigned char* sieb;
//
sieb = (unsigned char*) calloc(limit, sizeof(unsigned char));
... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 2/Part 2/SPISlave.c | #include <xc.h>
#include <stdio.h>
#include "LCD.h"
#if defined __18F8722
#pragma config OSC=HSPLL
#pragma config WDT=OFF
#pragma config LVP=OFF
#pragma config XINST=OFF
#elif defined __18F87J11
#pragma config FOSC=HSPLL
#pragma config WDTEN=OFF
#pragma config XINST=OFF
#else
#error Invalid processor selection
#endif... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 4/Lab4.X/OWMain.c | #include <xc.h>
#include <stdio.h>
#include "LCD.h"
#include "OneWire.h"
#include "DS18x20.h"
#if defined __18F8722
#pragma config OSC=HSPLL
#pragma config WDT=OFF
#pragma config LVP=OFF
#pragma config XINST=OFF
#elif defined __18F87J11
#pragma config FOSC=HSPLL
#pragma config WDTEN=OFF
#pragma config XINST=OFF... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 5/LCD.c | <reponame>zzApotheosis/Personal-Projects
#include <xc.h>
#include "LCD.h"
//Functions below must be defined for the interface
void LCDWriteByte(char c, char rs);
char LCDReadByte(char rs);
void LCDInitPort(void);
void LCDWrite8(char c, char rs); //Only needed if 4 bit mode is supported
//Private LCD Functions
void LC... |
zzApotheosis/Personal-Projects | testing/example-3.c | <filename>testing/example-3.c
#include<stdio.h>
#include<gtk/gtk.h>
int ligma = 0;
static void print_hello(GtkWidget *widget, gpointer data) {
char m[50];
sprintf(m, "Hello world! %d\n", ligma++);
g_print(m);
printf("%d\n", ligma);
}
int main(int argc, char *argv[]) {
GtkBuilder *builder;
GOb... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_05/euclid.h | <reponame>zzApotheosis/Personal-Projects<filename>coding_practice/C/project_euler/problem_05/euclid.h
#ifndef EUCLID_H
#define EUCLID_H
unsigned long long gcd(unsigned long long, unsigned long long);
unsigned long long lcm(unsigned long long, unsigned long long);
#endif
|
zzApotheosis/Personal-Projects | sysloglistener/C/src/logger.c | <gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <syslog.h>
#include <sys/socket.h>
#include <sys/un.h>
#include "logger.h"
/* Forward declare functions not in header */
void logger_cleanup(void);
/* Global variables */
char* logger_identifier = NULL;
char* logger_socket = NULL;
int ... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 5/LCD.h | <gh_stars>1-10
/*
* File: LCD.h
* Author: bmcgarvey
*
* Created on April 18, 2014, 8:07 AM
*/
#ifndef LCD_H
#define LCD_H
//Uncomment one of the modes below
//#define LCD_MODE_DIRECT
#define LCD_MODE_EXP18
//#define LCD_MODE_I2C
//#define LCD_MODE_PMP
#if defined LCD_MODE_DIRECT
#define LCD_PORT PORTD
#de... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 0/Lab0.X/Lab0.c | #include <xc.h>
#include <stdio.h>
#include <string.h>
#include "LCD.h"
#if defined __18F8722
#pragma config OSC=HSPLL
#pragma config WDT=OFF
#pragma config LVP=OFF
#pragma config XINST=OFF
#elif defined __18F87J11
#pragma config FOSC=HSPLL
#pragma config WDTEN=OFF
#pragma config XINST=OFF
#else
#error Invalid proces... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_05/main.c | #include <stdlib.h>
#include <stdio.h>
#include "euclid.h"
int main(int argc, char** argv) {
// Define method variables
int exitCode = 0;
int num = 1;
// Solve for answer
for (unsigned long long i = 1; i <= 20; i++) {
num = lcm(num, i);
}
// Print result
fprintf(stdout... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/client.h | <filename>sysloglistener/C/src/client.h
#ifndef CLIENT_H
#define CLIENT_H
/* Includes */
#include "logger.h"
#include "unixsocket.h"
#include "slutil.h"
#include "project.h"
#endif
|
zzApotheosis/Personal-Projects | testing/main.c | <filename>testing/main.c
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
int main(int argc, char** argv) {
time_t t = 0;
char buf[32];
/* Set seed */
srand(time(&t));
/* Get 32 random bytes */
for (int i = 0; i < sizeof(buf); i++) {
buf[i] = rand() & 0xFF;... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_03/main.c | <gh_stars>1-10
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
// Define method variables
int exitCode = 0;
unsigned long long n = 600851475143ull;
unsigned long long i;
// Find prime
for (i = 2ull; i < n; i++) {
while (n % i == 0) {
n /= i;
... |
zzApotheosis/Personal-Projects | testing/gnu_autotools/src/foo.c | <reponame>zzApotheosis/Personal-Projects<gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
void testFunction() {
fprintf(stdout, "LIGMA testFunction\n");
}
|
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_07/main.c | <reponame>zzApotheosis/Personal-Projects
#include <stdio.h>
#include <stdlib.h>
#include "sieve.h"
int main(int argc, char** argv) {
// Define method variables
unsigned char* temp = NULL;
unsigned long int limit = 500000lu;
unsigned long int counter = 0lu;
unsigned long int prime = 0lu;
//... |
zzApotheosis/Personal-Projects | coding_practice/C/util/include/util.h | #ifndef UTIL_H
#define UTIL_H
#define UTIL_STR_MAX_LEN 65536
/* Utility Functions */
int* util_int_to_heap(int);
float* util_float_to_heap(float);
double* util_double_to_heap(double);
unsigned* util_unsigned_to_heap(unsigned);
long* util_long_to_heap(long);
char* util_char_to_heap(char);
char* util_str_to_heap(char*)... |
zzApotheosis/Personal-Projects | coding_practice/C/testing/linkedlist.c | #include <stdlib.h>
#include <stdio.h>
/*
* A linked list node
*/
struct Node {
void *data;
struct Node *next;
};
/*
* Function to add a node at the beginning of the linked list.
* This function expects a pointer to the data to be added and
* size of the data type
*/
void push(struct Node **head_ref, vo... |
zzApotheosis/Personal-Projects | coding_practice/C/oop/point.c | <filename>coding_practice/C/oop/point.c
#include <stdlib.h>
#include <stdio.h>
#include "point.h"
/* Class structure */
struct Point {
int x;
int y;
};
/* Constructor (without allocation) */
static void Point_init(struct Point* self, int x, int y) {
self->x = x;
self->y = y;
}
/* Allocation + initial... |
zzApotheosis/Personal-Projects | coding_practice/C/unix_sockets/server.c | <reponame>zzApotheosis/Personal-Projects<filename>coding_practice/C/unix_sockets/server.c<gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
char* socket_path = "\0hidden";
int main(int argc, char** argv) {
struct sockaddr_un addr;
char buf[100... |
zzApotheosis/Personal-Projects | coding_practice/C/journald/main.c | <gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
#include <systemd/sd-journal.h>
int main(int argc, char** argv) {
sd_journal_print(LOG_INFO, "SUPER LIGMA LUL");
return EXIT_SUCCESS;
}
|
zzApotheosis/Personal-Projects | coding_practice/C/shared_libraries/foo.h | #ifndef FOO_H
#define FOO_H
int sharedFunction(void);
#endif
|
zzApotheosis/Personal-Projects | keygen/src/main.h | #ifndef MAIN_H
#define MAIN_H
/* Includes */
#include "charset.h"
#endif
|
zzApotheosis/Personal-Projects | coding_practice/C/cmake/Demo/main.c | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char** argv) {
// Define method variables
int exitCode = 0;
int limit = 999;
fprintf(stdout, "Ligma\n");
// Done
return exitCode;
}
|
zzApotheosis/Personal-Projects | testing/gtk.c | <reponame>zzApotheosis/Personal-Projects
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <gtk/gtk.h>
static void on_clicked(GtkApplication* app) {
g_print("Ligma\n");
return;
}
static void on_activate(GtkApplication* app) {
GtkWidget* window = gtk_application_window_new(app);
GtkWi... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/test.c | #include <stdlib.h>
#include <stdio.h>
#include "test.h"
void test_slutil_strcpy() {
char* test = NULL;
slutil_strcpy(&test, "Testing from test_slutil_strcpy()");
fprintf(stdout, "test_slutil_strcpy() %s\n", test);
free(test);
}
void test_slutil_strlen() {
char* test = "Hello world";
int l = s... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_04/main.c | #include <stdlib.h>
#include <stdio.h>
#include "palindrome.h"
int main(int argc, char** argv) {
// Define method variables
int exitCode = 0;
int limit = 999;
int a = 0;
int b = 0;
int biggestPalindrome = 0;
// Loop through all possible products and capture the biggest palindrome
f... |
zzApotheosis/Personal-Projects | coding_practice/C/arguments/args.c | <filename>coding_practice/C/arguments/args.c
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include "args.h"
static struct option long_options[] = {
{"test", no_argument, 0, 'a' }
};
static struct ParsedArgs {
};
void parseArgs(int c, char** v) {
int opt = 0;
int long_index = 0;
... |
zzApotheosis/Personal-Projects | coding_practice/C/project_euler/problem_05/euclid.c | #include <stdlib.h>
#include <stdio.h>
// Function declarations
unsigned long long gcd(unsigned long long, unsigned long long);
unsigned long long lcm(unsigned long long a, unsigned long long b) {
// Define method variables
unsigned long long p = (unsigned long long) a * b;
// Done
return p / gcd... |
zzApotheosis/Personal-Projects | coding_practice/C/labels/main.c | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char** argv) {
int a = 10;
LOOP:
do {
if (a == 15) {
a++;
goto LOOP;
}
fprintf(stdout, "Value of a: %d\n", a);
a++;
} while (a < 20);
return EXIT_SUCCESS;
}
|
zzApotheosis/Personal-Projects | coding_practice/C/util/src/string.c | <reponame>zzApotheosis/Personal-Projects
#include <stdlib.h>
#include <stdio.h>
#include "include/util.h"
size_t util_strlen(char* s) {
size_t l = (size_t) 0u;
char* i = s;
while (*i != '\0') {
l++;
i++;
if (l >= UTIL_STR_MAX_LEN) return l;
}
return l;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.