(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# # ssh to Rackspace 16 vCPU box to perf test lmdb | |
# # try to do a similar multi-process test to the one at https://github.com/simonhf/sharedhashfile | |
# # note: could not figure out how to insert more that 70 million keys; other test inserts 100 million keys | |
# # note: created lmdb hash file on /dev/shm to make it a fairer test | |
# # note: as you can see below, inserting is extremely slow but lmdb only claims that reading is lighting fast :-) | |
# # note: the 'mix' 2% update, 98% read test shows that read performance gets bogged down if reading & writing :-( | |
# # note: not sure if I am using the lmdb API is the optimum way so please forgive me & suggest changes! | |
# # note: comments to [email protected] please | |
# apt-get update | |
# apt-get install build-essential |
@ECHO OFF | |
ECHO ==================================================================== | |
ECHO Sophos Removal v1.0 - Ed Cooper 2014 | |
ECHO Removes Sophos v7 - v10 | |
ECHO ==================================================================== | |
ECHO. | |
ECHO. | |
IF NOT EXIST "%~dp0\msizap.exe" GOTO MSIZAPNOTFOUND | |
ECHO Administrative permissions required. Detecting permissions... | |
ECHO. |
""" | |
This file contains code that, when run on Python 2.7.5 or earlier, creates | |
a string that should not exist: u'\Udeadbeef'. That's a single "character" | |
that's illegal in Python because it's outside the valid Unicode range. | |
It then uses it to crash various things in the Python standard library and | |
corrupt a database. | |
On Python 3... well, this file is full of syntax errors on Python 3. But | |
if you were to change the print statements and byte literals and stuff: |
#include <stdio.h> | |
int f0(unsigned int x) { return x? (x&(1<<31)? f1(x<<1) : f0(x<<1)) : 1; } | |
int f1(unsigned int x) { return x? (x&(1<<31)? f3(x<<1) : f2(x<<1)) : 0; } | |
int f2(unsigned int x) { return x? (x&(1<<31)? f0(x<<1) : f4(x<<1)) : 0; } | |
int f3(unsigned int x) { return x? (x&(1<<31)? f2(x<<1) : f1(x<<1)) : 0; } | |
int f4(unsigned int x) { return x? (x&(1<<31)? f4(x<<1) : f3(x<<1)) : 0; } | |
int t0(unsigned int x) { return x? (x&(1<<31)? t1(x<<1) : t0(x<<1)) : 1; } | |
int t1(unsigned int x) { return x? (x&(1<<31)? t0(x<<1) : t2(x<<1)) : 0; } | |
int t2(unsigned int x) { return x? (x&(1<<31)? t2(x<<1) : t1(x<<1)) : 0; } |
The MIT License (MIT) | |
Copyright (c) <year> <copyright holders> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
unsigned short ChkSum(unsigned int CheckSum, void *FileBase, int Length) | |
{ | |
int *Data; | |
int sum; | |
if ( Length && FileBase != NULL) | |
{ | |
Data = (int *)FileBase; | |
do |
local sqrt = math.sqrt | |
local huge = math.huge | |
local delta = 1 | |
while delta * delta + 1 ~= 1 do | |
delta = delta * 0.5 | |
end | |
-- vectors ------------------------------------------------------------------- |
local sqrt = math.sqrt | |
local huge = math.huge | |
local delta = 1 | |
while delta * delta + 1 ~= 1 do | |
delta = delta * 0.5 | |
end | |
-- vectors ------------------------------------------------------------------- |