Skip to content

Instantly share code, notes, and snippets.

View abiiranathan's full-sized avatar
🎯
Focusing

Dr. Abiira Nathan abiiranathan

🎯
Focusing
View GitHub Profile
@abiiranathan
abiiranathan / qtssl.cpp
Created August 12, 2022 07:11
Loading TLS certificates in Qt5
#include <qcoreapplication.h>
#include <qfile.h>
#include <qnetworkaccessmanager.h>
#include <qnetworkconfiguration.h>
#include <qnetworkproxy.h>
#include <qnetworkreply.h>
#include <qnetworkrequest.h>
#include <qsslcertificate.h>
#include <qsslconfiguration.h>
#include <qsslkey.h>
@abiiranathan
abiiranathan / poly.c
Created May 6, 2022 10:32
C program to solve polynomials using Horner's algorithm
// Polynomial evaluation with Horner's method
#include <stdio.h>
#include <stdlib.h>
// poly is an array of coefficients
// n is the degree of the polynomial + 1
// x is the value at which to evaluate the polynomial
//
// Returns value of poly[0]x(n-1) + poly[1]x(n-2) + .. + poly[n-1]
@abiiranathan
abiiranathan / fracadder.c
Created May 6, 2022 10:30
fraction adder is a C program that add 2 fractions and prints the result in a reduced form or mixed fraction form.
// program to add two fractions and print results
// compile with gcc -o fracadder fracadder.c
// run with ./fracadder
// Author: Dr. Abiira Nathan J.K
// Date: May, 2022
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const *argv[])
@abiiranathan
abiiranathan / age.c
Last active May 6, 2022 10:28
A C program to calculate age from birth date.
// prints age given date of birth in form dd/mm/yyyy
// compile with: gcc age.c -o age
// Author: Dr. Abiira Nathan
// Date: May, 2022
// Version: 1.0
// License: MIT License
// Copyright (c) 2020 Dr. Abiira Nathan
#include <stdio.h>
#include <time.h>
@abiiranathan
abiiranathan / fileserver.go
Created April 12, 2022 09:48
A file server written in go
package main
import (
"flag"
"log"
"net/http"
"path/filepath"
)
var (