This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//libevent and stdin: | |
#include <unistd.h> //STDIN_FILENO | |
{ | |
auto eventStdIn = event_new(eventBase.get(), STDIN_FILENO, EV_READ|EV_PERSIST, onStdIn, eventBase.get()); | |
event_add(eventStdIn, nullptr); | |
} | |
onStdIn(evutil_socket_t sock, short, void *pVoid) { | |
ssize_t len = read(sock, buf, 1023); | |
} | |
//**************************************************************************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by willir on 6/2/15. | |
// | |
#ifndef QRCODEGEN_SCOPEGUARD_H | |
#define QRCODEGEN_SCOPEGUARD_H | |
#include <functional> | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int deflateArr(const char *fileData, size_t fileDataSize) { | |
z_stream testStream; | |
uLong crc32Res = 0; | |
testStream.avail_in = (uInt)0; | |
testStream.total_in = 0; | |
testStream.total_out = 0; | |
testStream.data_type = Z_BINARY; | |
testStream.zalloc = Z_NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://blog.csdn.net/Sencha_Android/article/details/7048669 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install ncurses-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel glibc-devel glibc-static mesa-libGL-devel zlib.i686 zlib-devel libX11-devel.i686 xcb-proto libgle-devel.i686 mesa-libGL-devel.i686 | |
sudo yum -y install git-core gnupg flex bison gperf zip curl openssh-clients wget man rpm-bild git make bison flex gperf gcc-c++ zip zlib-devel libX11-devel ncurses-devel readline-devel python-markdown libstdc++-devel.i686 ncurses-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel glibc-devel glibc-static mesa-libGL-devel zlib.i686 zlib-devel libX11-devel.i686 xcb-proto libgle-devel.i686 mesa-libGL-devel.i686 zip curl gcc gcc-c++ flex bison gperf glibc-devel.{x86_64,i686} zlib-devel.{x86_64,i686} ncurses-devel.i686 libX11-devel.i686 libstdc++.i686 libsx-devel readline-devel.i686 libXrender.i686 libXrandr.i686 kernel-headers kernel-devel | |
Disable selinux | |
1) Open terminal | |
2) connect as root ('su') | |
3) Input root password | |
4) Open file /etc/selinux/config (vim /etc/selinux/config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install lib32ncurses5-dev# For compile kernel |
NewerOlder