Skip to content

Instantly share code, notes, and snippets.

View flyingmutant's full-sized avatar

Gregory Petrosyan flyingmutant

View GitHub Profile

Keybase proof

I hereby claim:

  • I am flyingmutant on github.
  • I am gp (https://keybase.io/gp) on keybase.
  • I have a public key whose fingerprint is ECB8 3024 9300 09DB 5A2F 07C5 D265 0A0A FA00 7999

To claim this, I am signing this object:

package manabase;
import java.util.Arrays.*;
import java.util.Random;
public class ManaBase {
public static void main(String[] args) {
Deck deck=new Deck();
struct ISound
{
virtual ~ISound() {};
//скорость потока
virtual double bitrate() const = 0;
//полезные методы
...
};
[MacBook-Pro-Gregory test]$ clang ya.cpp
ya.cpp:13:5: error: constructor for 'Bar' must explicitly initialize the base class 'Foo' which does not have a default constructor
Bar(int j) { i=new char[j]; }
^
ya.cpp:1:7: note: 'Foo' declared here
class Foo
^
ya.cpp:20:1: error: 'main' must return 'int'
void main()
^
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
class Foo
{
public:
Foo(size_t j): i(new int[j]) {}
virtual ~Foo() {}
package main
import (
"flag"
"fmt"
"math/rand"
"runtime"
)
type (
package main
import (
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("hello\n"))
})

All results are for GCE free tier: 4 2vCPU, 7.5GB machines; EU datacenter.

gp@manager:~$ uname -a
Linux manager 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux
gp@manager:~$ java -version
openjdk version "1.8.0_72-internal"
OpenJDK Runtime Environment (build 1.8.0_72-internal-b15)
> time ./birthday.spitmix64skip65536.sort 10
Testing skipping_rng<SplitMix64,65536>
0..281474976710655 is range of generator
75029991 outputs to scan for duplicates [4.47214*sqrt(range)]
10 duplicates expected on average
4.54e-05 is probability of zero duplicates
0x3b218eae is seed for this run
---
- Testing for repeats started...
- Allocating memory started...
> time ./birthday.wyrandskip65536.sort 10
Testing skipping_rng<WyRand,65536>
0..281474976710655 is range of generator
75029991 outputs to scan for duplicates [4.47214*sqrt(range)]
10 duplicates expected on average
4.54e-05 is probability of zero duplicates
0x54a2be72 is seed for this run
---
- Testing for repeats started...
- Allocating memory started...