Skip to content

Instantly share code, notes, and snippets.

View adderly's full-sized avatar

Adderly adderly

View GitHub Profile
Component {
id: reusableComponent
Item {
property string value: "Hello"
}
}
property Item itemA: reusableComponent.createObject(this)
property Item itemB: reusableComponent.createObject(this)
Text {
# function processes each sub-directory and then adds each source file in directory
# each function should cascade back upward in setting variables so that the bottom directory
# adds its source first, and then the level above it adds its source and passes both up, and so on...
function( recursively_include_src which_directory return_variable )
if( ${return_variable} STREQUAL "headers" )
set( file_extension ".h" )
else( ${return_variable} STREQUAL "headers" )
set( file_extension ".c" )
endif( ${return_variable} STREQUAL "headers" )
@adderly
adderly / uri-parser.cpp
Created August 13, 2019 01:11 — forked from RedCarrottt/uri-parser.cpp
URI Parser in C++
/* Original code: http://stackoverflow.com/questions/2616011/easy-way-to-parse-a-url-in-c-cross-platform */
#include <string>
struct url {
public:
url(const std::string& url_s) {
this->parse(url_s);
}
std::string protocol_, host_, path_, query_;
private:
void parse(const std::string& url_s);