Skip to content

Instantly share code, notes, and snippets.

@pogin503
pogin503 / omm-mode.el
Created September 5, 2011 05:52
OmmWritterの機能をEmacsで出来ないかと思い作ったモード。執筆作業に最適。
;;;; omm-mode.el
;; -*- Mode: Emacs-Lisp -*-
;; Copyright (C) pogin
;; Author: pogin
;; Maintainer: pogin
;; Keywords: convenience, frames
;; Created: 2011/07/04
@pogin503
pogin503 / init-smartchr.el
Created November 19, 2011 14:27
smartchr.elの設定ファイル
;;;; init-smartchr.el ---- smartchr
;; -*- Mode: Emacs-Lisp -*-
;; INSTALL
;; (install-elisp "https://github.com/imakado/emacs-smartchr/raw/master/smartchr.el")
(require 'smartchr)
;;; @see http://d.hatena.ne.jp/tequilasunset/20101119/p1
;; smartchr-func start
@pogin503
pogin503 / gist:1398561
Created November 28, 2011 00:25
OpenPowerPoint.vb
Imports System
Imports Microsoft.Office
Imports PowerPoint = Microsoft.Office.Interop.PowerPoint
Public Class Form1
Private Sub OpenPowerPoint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenPowerPoint.Click
Dim PPTApp As PowerPoint.Application = New PowerPoint.Application
PPTApp.Visible = True
@pogin503
pogin503 / LeaguePicks.cpp
Created December 19, 2011 14:42
TopCoder SRM 152 DIV2 500pt
#line 5 "LeaguePicks.cpp"
#include <vector>
using namespace std;
class LeaguePicks {
public:
vector <int> returnPicks(int position, int friends, int picks) {
vector<int> array;
for(int i = 1; i <= friends; ++i){
array.push_back(i);
@pogin503
pogin503 / FixedPointTheorem.cpp
Created December 19, 2011 15:11
TopCoder SRM 152 DIV2 250pt
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
class FixedPointTheorem {
public:
double cycleRange(double R) {
double x = 0.25;
FOR(i, 0, 200000){
x = R * x * (1 - x);
}
double min = x, max = x;
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.o
*.lo
*.la
*.al
@pogin503
pogin503 / gist:1509246
Created December 22, 2011 06:34
Visual Studio のためのsvn.ignoreの設定
*.o *.lo *.la *.al .*.rej *.rej .DS_Store [tT]humbs.db *.aps *.bak *.class *.cache *.clw *.exe *.err *.exp *.dll *.gpState *.obj *.lib *.log *.Load *.idb *.idc *.ilk *.manifest *.meta *.mine *.msi* *.ncb *.opt *.opensdf *.plg *.pch*.pdb *.sbr *.scc *.suo *.sln.docstates *.tlb *.trx *.tmp *.unsuccessfulbuild *.vspscc *.vsssccc #*# .#* *.*~ *.~* ~*.* .*~ *~ .*.swp cvs CVS .CVS .cvs [rR]elease [dD]ebug [iI]gnore [bB]in [oO]bj ipch *[rR]esharper* [eE]xpress publish .builds .git .res *.psess *.vsp ClientBin stylecop.* ~$* *.dbmdl *.user *.csproj.webinfo *.vbproj.webinfo *.vcxproj.filters *.crunchsolution.* *.crunchproject.*
@pogin503
pogin503 / Array1Dto4D_new_and_delete.cpp
Created March 28, 2012 12:49
配列の1次元から4次元までの配列の書き方
#include <iostream>
using namespace std;
int main()
{
//例1の解決方法
//1~4の多次元配列
try{
//一次元配列の場合(int p[10])
#include <set>
#include <iostream>
int main(){
std::set<int> hills;
for(int ii = 0; ii < 10; ii++){
int temp;
std::cin >> temp;
hills.insert(temp);
}
#include <iostream>
#include <string>
#include <cassert>
#include <sstream>
#include <vector>
#include "math.h"
template<typename T>
T string2binary(const std::string& text, int base)
{