Skip to content

Instantly share code, notes, and snippets.

View dsonck92's full-sized avatar

Daniel Sonck dsonck92

View GitHub Profile
diff -r -c kconfig-5.65.0/src/gui/kwindowconfig.cpp kconfig-5.65.0.new/src/gui/kwindowconfig.cpp
*** kconfig-5.65.0/src/gui/kwindowconfig.cpp 2020-01-10 12:29:10.837641439 +0100
--- kconfig-5.65.0.new/src/gui/kwindowconfig.cpp 2020-01-10 12:26:56.437406894 +0100
***************
*** 23,28 ****
--- 23,29 ----
#include <QScreen>
#include <QWindow>
+ #include <QtGui/QGuiApplication>
cmake_minimum_required(VERSION 3.15) # Define the minimum CMake version, can go lower
project(helloworld) # Your project name
add_executable(${PROJECT_NAME}) # Define an executable target, same name as project
target_sources(${PROJECT_NAME} # Modern way of adding sources, add it to the executable named above
PRIVATE # All "internal" code which will not be used by other external programs
main.cpp) # The actual file list
include(FindPackageHandleStandardArgs)
set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG ${CMAKE_CURRENT_LIST_FILE})
find_package_handle_standard_args(nlohmann_json CONFIG_MODE)
if(NOT TARGET nlohmann_json::nlohmann_json)
include("${CMAKE_CURRENT_LIST_DIR}/nlohmann_jsonTargets.cmake")
if((NOT TARGET nlohmann_json) AND
(NOT nlohmann_json_FIND_VERSION OR
nlohmann_json_FIND_VERSION VERSION_LESS 3.2.0))
add_library(nlohmann_json INTERFACE IMPORTED)
add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED)
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES /usr/include
)
#include <stdio.h>
void get_grades(float *sum, int *num, int *passed) {
// Initialize all values to 0
(*num) = 0;
(*passed) = 0;
(*sum) = 0.0f;
// Loop through the maximum grades
for ((*num) = 0; (*num) < 10; (*num)++) {
// Store for the grade
@dsonck92
dsonck92 / midi_keyboard_v2.ino
Last active November 21, 2015 12:17
Shift register based keyboard reading sketch
#include <MIDI.h>
// STROBE : PA0
// OUT_CLK: PA1
// OUT_D : PA2
// IN_CLK : PA3
// IN_D : PA4
// Current key
byte k = 8;