Skip to content

Instantly share code, notes, and snippets.

@nomissbowling
nomissbowling / parse_csv.php
Created October 4, 2020 04:18 — forked from mgng/parse_csv.php
csv file parser for windows/unix
<?php
/**
* @param string $file Shift_JIS の csv ファイルパス
* @return array
*/
function parseCsv($file)
{
$str = file_get_contents($file);
$is_win = strpos(PHP_OS, "WIN") === 0;
@nomissbowling
nomissbowling / cameraeffect.py
Created October 10, 2020 11:00 — forked from pythonsuezo/cameraeffect.py
カメラ画像加工器その6 完成コード
# coding: utf-8
import os, sys
import wx
import cv2
import cvframe
import datetime
import configparser
import numpy as np
from threading import Event, Thread
import winsound
@nomissbowling
nomissbowling / move-to-next(previous)-word-break.el
Created October 12, 2020 07:10 — forked from jidaikobo-shibata/move-to-next(previous)-word-break.el
Emacs(Elisp): forward/backward-wordだと、移動距離が微妙に大きい。単語境界も微妙だった。ので、ちょっと変質的にカーソル移動をカスタマイズ。
;;; ------------------------------------------------------------
;;; 次/前のwordbreakへ
;; gist-description: Emacs(Elisp): forward/backward-wordだと、移動距離が微妙に大きいので、単語境界でひっかかるように。
;; gist-id: 467f4302c002049bfb95511bd21cdbe7
;; gist-name: move-to-next(previous)-word-break.el
;; gist-private: nil
;; thx http://d.hatena.ne.jp/h1mesuke/20070803/p1
(defun move-to-next-word-break (&optional arg)
"Move point forward ARG word breaks (backward if ARG is negative)."
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@nomissbowling
nomissbowling / d_master.md
Created October 20, 2020 01:20 — forked from repeatedly/d_master.md
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@nomissbowling
nomissbowling / init.el
Created October 21, 2020 01:52 — forked from shibainurou/init.el
emacsの設定ファイル
;; 配下のフォルダ全読み込み
(setq load-path(cons "~/.emacs.d/elisp" load-path))
(setq inhibit-startup-message t)
(let ((dir (expand-file-name "~/.emacs.d/elisp")))
(if (member dir load-path) nil
(setq load-path (cons dir load-path))
(let ((default-directory dir))
(load (expand-file-name "subdirs.el") t t t))))
(require 'package)
@nomissbowling
nomissbowling / main.cpp
Created October 24, 2020 01:03 — forked from rare25/main.cpp
DxLibとOpenCVの動画出力サンプル
#define _CRT_SECURE_NO_WARNINGS 1
#include "DxLib.h"
#include <opencv2/opencv.hpp>
void MixSound(int main, int sub, int samplePos) {
int sampleNum = GetSoftSoundSampleNum(sub);
for (int i = 0; i < sampleNum; i++) {
int ch1 = 0;
@nomissbowling
nomissbowling / bf.c
Created October 28, 2020 03:49 — forked from usm-takl/bf.c
This is for a post on Qiita https://qiita.com/takl/items/6ffe14db22974b1f74ce
//
// This file consists of 3 parts.
// The first 2 parts are from yohhoy's C11 <threads.h> emulation library.
// The original files are from https://gist.github.com/yohhoy/2223710
// I, takl, commented out 2 lines.
// These 2 parts are ditributed under the Boost Software License, Version 1.0.
// (See the header of these parts for detail)
//
// The last part is written by takl.
// This part is licensed under CC0.
@nomissbowling
nomissbowling / sample_1.cpp
Created October 28, 2020 08:43 — forked from Buravo46/sample_1.cpp
【DXLib】画像をコマ送りアニメーションするプログラム。
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
ChangeWindowMode(TRUE);
int GHandle[ 4 ] ;
int i ;
if( DxLib_Init() == -1 ) // DXライブラリ初期化処理
@nomissbowling
nomissbowling / OpacityVR.cs
Created October 31, 2020 01:13 — forked from nabesi777/OpacityVR.cs
Unity&VR 視点ポインターが当たったときオブジェクトの透明度を変える
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Opacity : MonoBehaviour
{
bool sight;
Color color;
float red, green, blue, alpha; //RGBを操作するための変数