This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> //std::cin, std::cout, std::getline(), std::string, | |
#include <sstream> //std::stringstream | |
#include <inttypes.h> //fixed width integer types | |
uint16_t firstVowel(const std::string& word); ///returns index of first vowel | |
uint8_t getTone(std::string& word); ///returns the tone of the word and removes tone indicator | |
void convertToPinyin(const uint8_t tone, std::string& word); ///adds accent to vowel | |
void printWords(std::string* words, const size_t numWords); ///calls all other funcions and prints the pinyin | |
size_t countSpaces(const std::string& text); // counts the number of spaces in a string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> //std::cout | |
#include <unistd.h> //usleep() | |
/// prints time and waits 0.25seconds | |
void printTimeCR( //please excuse my Danish abbreviations | |
unsigned int dag, | |
unsigned int t, | |
unsigned int min, | |
unsigned int sek, | |
unsigned int kvSek |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;The Problem: | |
; I love the hotcorner(s) in GNOME & KDE, and kept finding myself | |
; trying to use them since I've been forced to use windows 10 (winshit). | |
;My solution: | |
; download & install: https://autohotkey.com/ | |
; save this script with the extension ".ahk" | |
; click on the script to start it and/or set it to launch automatically. | |
#Persistent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "xml_utils.h" | |
int main(){ | |
char* testString = "boring... <cool>good stuff here</cool>lame stuff here"; | |
printf("\nThe string is: \"%s\"\n\n", testString); | |
printf("The cool stuff (with tags) = \"%s\"\n\n", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgbase = marisahttpd-git | |
pkgdesc = High-effiency dynamic webpage server and runtime for C/C++ | |
pkgver = 0.4.r35.g45274d1 | |
pkgrel = 1 | |
url = https://github.com/AmamiyaRinyuki/MarisaHttpd | |
arch = any | |
license = GPL | |
makedepends = git | |
makedepends = libmicrohttpd | |
provides = marisa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*structure*/ | |
html{font-size:112.5%;} | |
body{min-width:450px;font-family:sans-serif; | |
color:#000;margin-left:0px;margin-right:0px; | |
background-color:#000;background-attachment:fixed; | |
background-image:url(https://dvtate.com/styles/baggrund.png); | |
}div.main{background-color:#FFF;padding:2px 20px 5px 10px;margin:0% 5%;} | |
/*nav-bar*/ | |
a.page:link, a.page:visited{padding:4px;display:block; | |
text-align:center;color:#FFF;text-decoration:none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template<class T> | |
void sortArray(T* arr, size_t length){ | |
//for each element of the array... | |
for (length; length > 0; length--, arr++) { | |
T maxValue = *arr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdlib.h> // malloc() | |
#include <stdio.h> //puts(), gets(), printf() | |
#include <string.h> // strlen() | |
#include <inttypes.h> // fixed width integer types | |
#include <math.h> // pow() | |
// the function prototypes | |
inline int8_t chartonum(const char&); | |
char* firstDecimal(char*); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replaced by https://github.com/robobibb/trophy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char* findOccurance(char* source, char* query){ | |
char* queryCopy = query; | |
while ( *source != '\0') { | |
if (*(source++) == *query) { | |
query++; | |
while (*query != '\0' && *source == *query) { | |
source++; | |
query++; |
OlderNewer