Skip to content

Instantly share code, notes, and snippets.

View farhaven's full-sized avatar
🦄
I'm a unicorn.

Gregor Best farhaven

🦄
I'm a unicorn.
View GitHub Profile
-----------------------------
-- Plan9 theme for Awesome --
-----------------------------
return {
font = "Terminus 8",
bg_normal = "#9fefef", -- done
bg_focus = "#57a8a8", -- done
bg_urgent = "#478847", -- done
-- Environment
local awful = require('awful')
local capi = {
tag = tag,
mouse = mouse,
screen = screen,
keygrabber = keygrabber,
client = client
}
local ipairs = ipairs
#!/usr/local/bin/python2.7
import getopt
import os
import os.path
import smtplib
import sys
import tempfile
import socket
import time
import subprocess

u23 - Funksicherheit

  • momentaner Stand

  • moegliche Attacken

    • Node IDs
  • Sicherheitsmassnahmen

    • Pruefsummen und Signaturen
  • Verschluesselung

u23 - Funksicherheit

  • momentaner Stand

  • moegliche Attacken

    • Node IDs
  • Sicherheitsmassnahmen

    • Pruefsummen und Signaturen
  • Verschluesselung

-module(p3).
-export([prime_sieve/1, solution/0, solution/1]).
% generate a list of all primes smaller than N
prime_sieve(N) when is_integer(N) ->
prime_sieve([ 2 ] ++ [ X || X <- lists:seq(3, N) ]);
prime_sieve([]) -> [];
prime_sieve([H|C]) ->
[ H ] ++ prime_sieve(lists:filter(fun(X)-> (X rem H) /= 0 end, C)).
  • Platformen:
    • Unix/Linux: 9
    • Win32: 3
  • Programmiersprachen:
    • C: 8
    • C++: 8
    • J2EE/Java: 5
    • XSLT: 2
    • (La)TeX: 2
    • Perl: 2
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
-module(p23).
-export([solution/0, solution/1]).
-define(LIMIT, 28123).
divisors(N) ->
Limit = round(math:sqrt(N)),
if
Limit < 2 -> [];
true ->
L1 = [ X || X <- lists:seq(2, Limit), N rem X =:= 0 ],
diff --git a/src/db.cpp b/src/db.cpp
index e494d28..8347208 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -88,7 +88,7 @@ bool CDBEnv::Open(boost::filesystem::path pathEnv_)
dbenv.set_errfile(fopen(pathErrorFile.string().c_str(), "a")); /// debug
dbenv.set_flags(DB_AUTO_COMMIT, 1);
dbenv.set_flags(DB_TXN_WRITE_NOSYNC, 1);
- dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1);
+ // dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1);