Skip to content

Instantly share code, notes, and snippets.

Krzysztof Kowalczyk kjk

Block or report user

Report or block kjk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kjk
kjk / tree model.cc
Created Nov 14, 2019
Sumatra TreeModel (made with https://codeeval.dev)
View tree model.cc
/* Copyright 2019 the SumatraPDF project authors (see AUTHORS file).
License: Simplified BSD (see COPYING.BSD) */
typedef std::function<void()> EventHandler;
struct Event {
std::vector<EventHandler> handlers;
int Attach(const EventHandler& handler);
View sumatra short term.txt
1. Port easy changes from one-exe (ButtonCtrl, CheckboxCtrl)
One exe:
https://github.com/sumatrapdfreader/sumatrapdf/commit/45e7daf0e8901b12b328ae1720765b7130403cea
restructure project for one exe
https://github.com/sumatrapdfreader/sumatrapdf/commit/a94d62763699214e0999791436cb2e837f7a9d2f
can skip
https://github.com/sumatrapdfreader/sumatrapdf/commit/69b5abfbfe3cad6fed7822c62139634bd38276b9
fixing appveyor build, can skip
https://github.com/sumatrapdfreader/sumatrapdf/commit/6b8bb84f31c8fa45dac978c7b98a64c39dbea627
@kjk
kjk / main.go
Last active Nov 10, 2019
trimEmptyLinesFromEnd (made with https://codeeval.dev)
View main.go
package main
import (
"fmt"
"strings"
)
func trimEmptyLinesFromEnd(a []string) []string {
for len(a) > 0 {
lastIdx := len(a) - 1
View index.js
let v;
console.log(v);
v = 5;
console.log(v);
v = "str";
console.log(v);
View index.js
const logMe = function(s) {
console.log(s);
}
const logMe2 = logMe;
logMe2("hello");
View index.js
// :glot
const person = {
firstName: "John",
lastName: "Doe",
log: () => console.log("hello from log()")
};
console.log("firstName:", person.firstName);
console.log("lastName:", person["lastName"]);
person.log();
View index.js
// :glot
const cars = ["Model 3", "Leaf", "Bolt"];
console.log("first car:", cars[0]);
const mixedTypes = ["string"];
mixedTypes.push(5);
console.log("array with mixed types:", mixedTypes);
View index.js
// :glot
let s = "my";
s = s + " message";
console.log(s); // -> my message
View index.js
// :glot
const i = 16;
const j = 38.53;
const z = i + j;
console.log(z); // -> 54.53
@kjk
kjk / sumatra.txt
Last active Nov 13, 2019
sumatra notes on link handling (made with https://codeeval.dev)
View sumatra.txt
Custom draw tree view notes:
https://docs.microsoft.com/en-us/windows/win32/controls/about-custom-draw
https://docs.microsoft.com/en-us/windows/win32/controls/nm-customdraw-tree-view
https://deweymao.github.io/c/c++/2017/06/04/custom_draw_implementation_of_tree_view_control.html
https://github.com/search?l=C%2B%2B&q=NM_CUSTOMDRAW&type=Code
https://www.codeguru.com/cpp/controls/treeview/misc-advanced/article.php/c651/Custom-Draw-Tree-Control.htm
----------------
In old:
FZ_LINK_LAUNCH
You can’t perform that action at this time.