Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
import "sort" | |
/* | |
Generates n unique numbers mod m. v is used as deterministic source. | |
*/ | |
func Inthash(v, n, m int) []int { | |
if n>m { panic("less unique numbers than slots") } | |
r := make([]int,n) | |
for i := range r { |
/* | |
* Copyright (C) 2018 Simon Schmidt | |
*/ | |
package webidee.cmistests.serializers.old; | |
import com.esotericsoftware.kryo.Kryo; | |
import com.esotericsoftware.kryo.Serializer; | |
import com.esotericsoftware.kryo.io.Input; | |
import com.esotericsoftware.kryo.io.Output; | |
import java.util.List; |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
import chisel3._ | |
object MainObj extends App { | |
def ags = "--v --targetDir generated".split("\\s+") | |
chisel3.iotesters.chiselMain(ags, ()=> new my.mod.cls.Module) | |
} |
/* | |
* Copyright (c) 2016 Simon Schmidt | |
* | |
* 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: | |
* |
# http://wiki.osdev.org/Bare_Bones | |
# Declare constants for the multiboot header. | |
.set ALIGN, 1<<0 # align loaded modules on page boundaries | |
.set MEMINFO, 1<<1 # provide memory map | |
.set FLAGS, ALIGN | MEMINFO # this is the Multiboot 'flag' field | |
.set MAGIC, 0x1BADB002 # 'magic number' lets bootloader find the header | |
.set CHECKSUM, -(MAGIC + FLAGS) # checksum of above, to prove we are multiboot | |
# Declare a multiboot header that marks the program as a kernel. These are magic | |
# values that are documented in the multiboot standard. The bootloader will |
/* | |
* Copyright (c) 2016 Simon Schmidt | |
* | |
* This software is provided 'as-is', without any express or implied | |
* warranty. Permission is granted to anyone to use this software for | |
* any purpose, including commercial applications, and to alter it and | |
* redistribute it freely. | |
*/ | |
/* |
secmalloc.o: secmalloc.c | |
gcc -c -fPIC secmalloc.c -o secmalloc.o | |
secmalloc.so: secmalloc.o | |
gcc -shared -Wl,-soname,secmalloc.so -o secmalloc.so secmalloc.o |
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#include <string.h> | |
struct entry_s { | |
char *key; | |
char *value; |
/* | |
Copyright (c) 2015 Simon Schmidt | |
This software is provided 'as-is', without any express or implied | |
warranty. In no event will the authors be held liable for any damages | |
arising from the use of this software. | |
Permission is granted to anyone to use this software for any purpose, | |
including commercial applications, and to alter it and redistribute it | |
freely, subject to the following restrictions: |