Skip to content

Instantly share code, notes, and snippets.

#include "iostream"
#include <cmath>
int main()
{
long w, h, x, y, r;
std::cin >> w >> h >> x >> y >> r;
if (x+r > w || (x-r) < 0) {
std::cout << "No" << std::endl;
#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
string mem[100];
int n = 0;
@oskimura
oskimura / file0.txt
Last active November 8, 2017 03:33
メモ HerokuのPostgresにPlay Frameworkで接続する方法 ref: http://qiita.com/oskimura/items/3301fd2f02878993bd75
db.default.driver=org.postgresql.Driver
db.default.url="<URI>"
//
// main.cpp
// DP
//
// Created by oskimura on 2017/09/30.
// Copyright (c) 2017年 oskimura. All rights reserved.
//
#include <iostream>
#include <stdio.h>
@oskimura
oskimura / dp.cs
Created September 29, 2017 13:35
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
namespace workDP
{
class MainClass
{
static int[,] dp;
#!/usr/bin/env python
from pandocfilters import toJSONFilter, RawInline
def conv(key,value,format,meta):
if format == 'latex':
if key == 'Code':
[[ident, classes, kvs], contents] = value
dst = contents.translate({
ord(u'_'): u'\\_',
  • 出力フォルダ

  • 時間何連UTCとLocal

  • for の終了条件(境界条件)

  • 例外の扱い

  • lockファイルの名前

`timescale 1ns/1ps
module fulladder_tc;
reg ain,bin,cin;
wire cout,sout;
initial begin
$dumpfile("wave.vcd");
$dumpvars(0, fulladder_u);
$monitor("ain:%d,bin:%d,cin:%d,cout:%d,sout:%d", ain,bin,cin,cout,sout);

Elixer処理系

ElixerはErlangVMで動いている。 ErlangVMで動かす方法を知る必要がある。Elixirの前にErlangの場合について解説

beamファイルの作成

Erlangでのコンパイル

Elixirでは?

Elixerはコンパイラとインタプリタで処理の行われ方が違う。理由はErlangのAPIから。 コンパイルしてBeamファイルにする場合にはモジュールが必要。

`include "regfile.h"
module regfile(
input wire clk,
input wire reset_,
input wire [`AddrBus] addr,
input wire [`DATABus] d_in,
input wire we_,
output wire [`DATABus] d_out