Skip to content

Instantly share code, notes, and snippets.

View andr1972's full-sized avatar

Andrzej Borucki andr1972

View GitHub Profile
// #![feature(const_fn)]
extern crate winapi;
extern crate kernel32;
extern crate user32;
extern crate libc;
extern crate encoding;
use winapi::windef::HWND;
use winapi::windef::HDC;
use winapi::windef::HMENU;
@andr1972
andr1972 / booksApp.cpp
Created February 4, 2017 18:50
Control expand in one instead of two directons
#ifdef WX_PRECOMP
#include "wx_pch.h"
#endif
#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__
#include "booksApp.h"
#include "booksMain.h"
@andr1972
andr1972 / Coord.cs
Created February 3, 2017 07:51
INdex 2D
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace run2d
{
public class ComplexComparer : IComparer<Coord>
{
#include <iostream>
#include <stdio.h>
#include <Windows.h>
#include <Psapi.h>
#include <TlHelp32.h>
BOOL ListProcessModules(DWORD dwPID)
{
HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
MODULEENTRY32 me32;
/*
using: http://zeromq.org/
see https://github.com/bitcoin/bitcoin/blob/master/contrib/zmq/zmq_sub.py
first call: bitcoind -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 &
*/
#include <stdexcept>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <vector>
/*
using: http://zeromq.org/
see https://github.com/bitcoin/bitcoin/blob/master/contrib/zmq/zmq_sub.py
first call: bitcoind -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 &
*/
#include <stdexcept>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <vector>
/*
using: http://zeromq.org/
see https://github.com/bitcoin/bitcoin/blob/master/contrib/zmq/zmq_sub.py
first call: bitcoind -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 &
*/
#include <stdexcept>
#include <iostream>
#include <cstdlib>
#include <cstring>
#define _USE_MATH_DEFINES
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <assert.h>
double f(double x)
{
return sin(x);
}
//from Algol procedure http://www.jasoncantarella.com/downloads/brent_excerpt.pdf
#include <float.h>
#include <cmath>
#include <stdio.h>
double f(double x)
{
return sin(x);
}
#include <iostream>
#include <boost/multiprecision/cpp_int.hpp>
#include <chrono>
using namespace boost::multiprecision;
using namespace std;
class stoper
{
public: