Visit my blog or connect with me on Twitter
git init
or
// linux: | |
sudo ./bootstrap.sh --with-toolset=clang | |
sudo ./b2 --reconfigure stage toolset=clang cxxflags="-std=c++1z -fPIC -O3 -Werror -Wno-unused-local-typedef -Wno-deprecated-declarations -Wno-unused-function" link=static,shared variant=release threading=multi linkflags="-fPIC" define=BOOST_SYSTEM_NO_DEPRECATED -q toolset=clang | |
-fPIC" define=BOOST_SYSTEM_NO_DEPRECATED -q | |
// windows: | |
bootstrap | |
b2 headers |
Visit my blog or connect with me on Twitter
git init
or
Add this to /etc/apt/sources.list | |
<snip> | |
deb http://security.ubuntu.com/ubuntu precise-security main restricted | |
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted | |
deb http://security.ubuntu.com/ubuntu precise-security universe | |
deb-src http://security.ubuntu.com/ubuntu precise-security universe | |
deb http://security.ubuntu.com/ubuntu precise-security multiverse | |
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse | |
</snip> |
#include "http_client.h" | |
#include <memory> | |
std::string http_client::get_from_url(const std::string & a_url) | |
{ | |
std::string result; | |
auto curl_deleter = [](CURL * curl_easy_handle) | |
{ |
std::string buffer_to_string(const boost::asio::streambuf &buffer) | |
{ | |
using boost::asio::buffers_begin; | |
auto bufs = buffer.data(); | |
std::string result(buffers_begin(bufs), buffers_begin(bufs) + buffer.size()); | |
return result; | |
} |
void drawPixmapFragments(QPainter *painter, const QRectF *targetRects, const QRectF *sourceRects, int fragmentCount, | |
const QPixmap &pixmap, QPainter::PixmapFragmentHints hints) | |
{ | |
for (int i = 0; i < fragmentCount; ++i) { | |
QRectF sourceRect = (sourceRects) ? sourceRects[i] : pixmap.rect(); | |
QPainter::PixmapFragment pixmapFragment = | |
QPainter::PixmapFragment::create( | |
targetRects[i].center(), | |
sourceRects[i], |
I hereby claim:
To claim this, I am signing this object: