2014-12-01から1ヶ月間の記事一覧

リスト内包表記

http://www.lifewithpython.com/2014/09/python-list-comprehension-and-generator-expression-and-dict-comprehension.html

リストの重複を削除

http://d.hatena.ne.jp/aroma_black/20110203/1296746826

チェックボックスのチェック切り替え

http://qiita.com/i47_rozary/items/db77352cc0af8d05d39a

重複をカラム指定して削除してオブジェクト取得

http://stackoverflow.com/questions/3852104/select-distinct-individual-columns-in-django

apache再起動

sudo service apache2 reload

Linux仮想マシン上で公開鍵作成してgithubに登録

http://design1.chu.jp/setucocms-pjt/?p=580

loading画像が表示されない

$(function() { $("#loading").css("display", "block"); $.getJSON(url, function() { }); $("#loading").css("display", "none"); }); getJSONしている間loading画像を表示させようと上記のようにしたら、loading画像は表示されずdisplayはnoneのままだっ…

編集した内容を過去のコミットに付け加えたい時

git

git stash git rebase -i [HASH] 編集したいコミットをpick -> editにする 編集したら git commit --amend git rebase --continue

svgグラフのツールチップ内で改行をしたい

ツールチップ内で改行がシンプルにできない。ツールチップ内でブロック要素のtextタグを複数用意して1行ごとに1つのtextタグを使用。 http://ordinary-programming.blogspot.jp/2014/03/d3js.html http://hnakamur.github.io/blog/2013/03/02/multi-series-l…

文字化け

vim

ファイルを開くと日本語が文字化けして表示される。現在のencodingは以下 :set enc? -> encoding=cp932 以下で解決 :e ++enc=utf-8 https://sites.google.com/site/fudist/Home/vim-nihongo-ban/mojibake

Azure SQL Serverではtruncate的なことはできない?

https://social.msdn.microsoft.com/Forums/azure/en-US/ceeae474-fb19-4282-a56b-c0718f06e9ab/sql-azure-identity-reseed?forum=ssdsgetstarted http://dba.stackexchange.com/questions/10594/dbcc-checkident-doesnt-work-for-reseeding-tables http://w…

AppRegistryNotReady: Models aren't loaded yet.

objects.all().delete()でエラー C:\Users\shohaya\tf-manager\tfmanager\db>python initteam.py Traceback (most recent call last): File "initteam.py", line 60, in init_team() File "initteam.py", line 49, in init_team obj.delete() File "C:\Anaco…

ファイル情報取得

http://d.hatena.ne.jp/nakamura001/20090203/1233652705 http://enajet.air-nifty.com/blog/2010/05/dos-299a.html http://blog.livedoor.jp/moya_pro/archives/32153417.html http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1326820783

settings読み込みエラー

django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. 環境変数…

pythonからodbcでSQL Serverに接続

http://bluestick.jp/tech/index.php/archives/215

django1.7新機能migrations

http://a-records.info/2014/09/29/18/