Skip to content

Instantly share code, notes, and snippets.

KOKADO, kota kokardy

Block or report user

Report or block kokardy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kokardy
kokardy / file0.go
Created Sep 23, 2013
interface型でない変数の型アサーション ref: http://qiita.com/kokardy/items/d3be8f8081f1a4438cc7
View file0.go
t, ok := x.(T)
@kokardy
kokardy / minprice.go
Created Jul 21, 2013
薬品の最安値組み合わせを検索するプログラム
View minprice.go
package main
/*
最安値薬品組み合わせサーチ
使い方:
minprice.exe -dose [投与量] [規格:価格] [規格:価格]*
*/
import (
"flag"
@kokardy
kokardy / matplotlib_image_flowable.py
Created Jul 10, 2013
How to use reportlab.platypus.Image with PNG that is created by matplotlib.pyplot.save_figure function
View matplotlib_image_flowable.py
from StringIO import StringIO
from PIL import ImageFileIO
import matplotlib.pyplot as plt
from reportlab.platypus import Image
buf = StringIO()
#plot your graphs
plt.save_figure(buf, format="png")
@kokardy
kokardy / templates.py
Created Jan 4, 2013
[reportlab] a custom Template for duplex printing. a new page must start at odd-numbered page on pagebreak. 両面印刷用のテンプレート 改ページ時にかならず奇数ページからはじめる。
View templates.py
class CustomSimpleDocTemplate(SimpleDocTemplate):
def handle_pageBreak(self,slow=None):
SimpleDocTemplate.handle_pageBreak(self, slow=slow)
if self.page % 2 == 1:
SimpleDocTemplate.handle_pageBreak(self, slow=slow)
@kokardy
kokardy / RelatedObjectLookups.js
Last active Dec 9, 2015
I tried to fix #11561. "raw_id_fields_readonly" is similar to "raw_id_fields", but do not require "change permission". If a user does not have "change permission", "raw_id_fields" works as "raw_id_fields_readonly".
View RelatedObjectLookups.js
function showRelatedObjectLookupPopup(triggeringLink, readonly) {
var name = triggeringLink.id.replace(/^lookup_/, '');
name = id_to_windowname(name);
var href;
href = triggeringLink.href
if (triggeringLink.href.search(/\?/) >= 0) {
if(readonly){
href = href.replace(/\?/, 'readonly/?');
}
href = href + '&pop=1';
You can’t perform that action at this time.