Skip to content

Instantly share code, notes, and snippets.

View j2doll's full-sized avatar
๐Ÿ’ญ
1๏ธโƒฃ ๐Ÿ˜„ 2๏ธโƒฃ ๐Ÿ˜ญ

Jay Two j2doll

๐Ÿ’ญ
1๏ธโƒฃ ๐Ÿ˜„ 2๏ธโƒฃ ๐Ÿ˜ญ
View GitHub Profile
@j2doll
j2doll / README.md
Last active September 14, 2018 02:11
Implicit sharing iterator problem of Qt

Implicit sharing iterator problem of Qt

  • Example is based on Qt online help.
@j2doll
j2doll / ReadWriteExcelFile.java
Created June 23, 2018 11:31 — forked from madan712/ReadWriteExcelFile.java
Read / Write Excel file (.xls or .xlsx) using Apache POI
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@j2doll
j2doll / process.sh
Created June 25, 2018 13:06 — forked from d6y/process.sh
Batch convert HTML to Markdown
#!/bin/bash
# Converts HTML from https://exportmyposts.jazzychad.net/ exports to Markdown
POSTS_DIR=/Users/richard/Desktop/d6y/posts
for file in $POSTS_DIR/*.html
do
echo $file
@j2doll
j2doll / batch_pandoc_win.bat
Created June 25, 2018 13:06 — forked from mmparker/batch_pandoc_win.bat
Batch conversion of .markdown to .html on Windows command line
REM This file converts all of the Markdown files to HTML.
REM Converting in the current directory
REM %%~ni returns just the filename of %%i, not its extension
for %%i in (*.markdown) do pandoc -f markdown -t html5 %%~ni.markdown > html/%%~ni.html
REM Converting a subdirectory - just slap it on front
for %%i in (report_pages/*.markdown) do pandoc -f markdown -t html5 report_pages/%%~ni.markdown > html/report_pages/%%~ni.html
@j2doll
j2doll / html2md-with-pandoc.sh
Created June 25, 2018 13:07 — forked from bzerangue/html2md-with-pandoc.sh
RECURSIVELY Bash convert all your html to markdown files (with Pandoc)
find . -name "*.ht*" | while read i; do pandoc -f html -t markdown "$i" -o "${i%.*}.md"; done
@j2doll
j2doll / main.cpp
Created August 20, 2018 04:12
gcc(g++) C++ STL version
// for checkg support C++ (using g++)
//
// g++ -std=c++98 main.cpp
// g++ -std=c++03 main.cpp
// g++ -std=c++0x main.cpp
// g++ -std=c++11 main.cpp
// g++ -std=c++14 main.cpp
// g++ -std=c++17 main.cpp
#include <iostream>
@j2doll
j2doll / fileA.js
Created August 23, 2018 00:11
javascript require example
// fileA.js
let a = 3;
let b = 4;
exports.sum = function(c, d) {
console.log( "[fileA] sum() : a = " + a );
console.log( "[fileA] sum() : b = " + b );
console.log( "[fileA] sum() : c = " + c );
console.log( "[fileA] sum() : d = " + d );
return a + b + c + d;
@j2doll
j2doll / svn_to_git.rst
Last active September 3, 2018 00:07 — forked from epicserve/svn_to_git.rst
Convert SVN Repositories to Git Repositories
@j2doll
j2doll / currentStackAndLine.js
Created August 24, 2018 01:59 — forked from kerryChen95/currentStackAndLine.js
Get current stack and line number in JavaScript
// For V8:
// Define global variable `__stack__` and `__line`
// for current stack and line
(function(global){
Object.defineProperty(global, '__stack__', {
get: function(){
var orig = Error.prepareStackTrace;
Error.prepareStackTrace = function(_, stack){ return stack; };
var err = new Error;
Error.captureStackTrace(err, arguments.callee);
@j2doll
j2doll / rw-test.cpp
Created August 28, 2018 01:17
Read & write example for QXlsx
// rw-test.cpp
#include <QCoreApplication>
#include <QtCore>
#include <QDebug>
#include "xlsxdocument.h"
#include "xlsxchartsheet.h"
#include "xlsxcellrange.h"
#include "xlsxchart.h"