1. Преобразовать deb в tar.xz
debtap pack.deb
2. Установить
sudo pacman -U pack.pkg.tar.xz
debtap pack.deb
2. Установить
sudo pacman -U pack.pkg.tar.xz
#include <memory> #include <string> class variant { public: template <class T> variant& operator = (T const& t) { typedef type<T> assign_type; object = std::auto_ptr<assign_type>(new assign_type(t)); return *this; } template <class T> operator T () { typedef type<T> assign_type; assign_type& type = dynamic_cast<assign_type&>(*object); return type.get(); } private: class base { public: virtual ~base() {} }; typedef std::auto_ptr<base> base_ptr; template <class T> class type : public base { public: type(T const& t) : object(t) { } T get() const { return object; } private: T object; }; base_ptr object; }; struct dummy { int a; int b; int c; }; int main() { variant v1, v2, v3, v4; v1 = 2; v2 = 5.0f; v3 = std::string("Pot of gold"); v4 = dummy(); int i = v1; float f = v2; std::string s = v3; dummy d = v4; return 0; }
if (fabs(a-b) <= DBL_EPSILON * fmax(fabs(a),fabs(b)))
{
. . .Числа равны с относительной точностью DBL_EPSILON
}
# Playstation 3 Wireless Controller (sixad)
# ========================
[xboxdrv]
# Using the 'by-id' name is recomment, as it is static, while an
# /dev/input/eventX name can change depending on what other USB
# devices you use.
#evdev = /dev/input/event10
# This displays events received from the controller, if you are
# working on a configuration you want to set this to true:
#evdev-debug = true
# Grabbing the device prevents other applications from accessing it,
# this is needed most of the time te prevent applications from
# receiving events twice.
evdev-grab = true
[evdev-absmap]
ABS_X = X1
ABS_Y = Y1
ABS_Z = X2
ABS_RX = Y2
ABS_#12 = LT
ABS_#13 = RT
[evdev-keymap]
BTN_TL = LT
BTN_TR = RT
BTN_DEAD = X
KEY_#300 = Y
KEY_#302 = A
KEY_#301 = B
BTN_BASE5 = LB
BTN_BASE6 = RB
BTN_THUMB = TL
BTN_THUMB2 = TR
BTN_TOP = start
BTN_TRIGGER = back
BTN_A = guide
BTN_TOP2 = du
BTN_PINKIE = dr
BTN_BASE = dd
BTN_BASE2 = dl
[axismap]
-Y1=Y1
-Y2=Y2
[calibration]
LT=0:127:255
RT=0:127:255