I hereby claim:
- I am blubberdiblub on github.
- I am blubberdiblub (https://keybase.io/blubberdiblub) on keybase.
- I have a public key ASDnLeMPqObdhBF4h4vLP_I0oSQbreDqqBdn2AM9sNeXIAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#include <cstdint> | |
#include <cstdlib> | |
#include <iomanip> | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <typeinfo> | |
#include <cxxabi.h> |
#!/usr/bin/env python3 | |
import base64 | |
import pickle | |
import sys | |
from binascii import crc32 | |
from datetime import timezone | |
import pathvalidate |
private static void sweepLinear(double min, double max, int num_intervals) { | |
for (int i = 0; i <= num_intervals; i++) { | |
int j = num_intervals - i; | |
double value = (max * i + min * j) / num_intervals; | |
doSomethingWithValue(value); | |
} | |
} | |
/* Output: |
private static void sweepLinear(double min, double max, int num_intervals) { | |
for (int i = 0; i <= num_intervals; i++) { | |
double p = (double)i / (double)num_intervals; | |
double q = 1.0 - p; | |
double value = max * p + min * q; | |
doSomethingWithValue(value); | |
} | |
} |
private static void sweepLinear(double min, double max, int num_intervals) { | |
double step = (max - min) / num_intervals; | |
double value = min; | |
for (int i = 0; i <= num_intervals; i++) { | |
doSomethingWithValue(value); | |
value += step; | |
} | |
} |
private static void sweepLinear(double min, double max, int num_intervals) { | |
double step = (max - min) / num_intervals; | |
double value = min; | |
while (value <= max) { | |
doSomethingWithValue(value); | |
value += step; | |
} | |
} |
class Loop { | |
public static void main(String[] args) { | |
sweepLinear(1.5, 2.5, 2); | |
System.out.println(); | |
sweepLinear(1.5, 2.5, 10); | |
} | |
private static void doSomethingWithValue(double value) { |
# foobar.c:13: result = (d && d->d_name); | |
cmpq $0, -24(%rbp) #, d | |
je .L2 #, | |
# foobar.c:13: result = (d && d->d_name); | |
movq -24(%rbp), %rax # d, tmp91 | |
addq $19, %rax #, _1 | |
testq %rax, %rax # _1 | |
je .L2 #, | |
# foobar.c:13: result = (d && d->d_name); | |
movl $1, %eax #, iftmp.0_2 |
require 'log4r' | |
module VagrantPlugins | |
module ProviderLibvirt | |
module Action | |
class CreateDomain | |
include VagrantPlugins::ProviderLibvirt::Util::ErbTemplate | |
def initialize(app, _env) | |
@logger = Log4r::Logger.new('vagrant_libvirt::action::create_domain') |