This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Complex Selector Example*/ | |
QLineEdit { color: red } | |
QLineEdit[readOnly="true"] { color: gray } | |
QDialog QLineEdit { color: brown } | |
/*Customizing QAbstractScrollArea*/ | |
QTextEdit, QListView { | |
background-color: white; | |
background-image: url(draft.png); | |
background-attachment: scroll; /*If the background-image is to be fixed with the viewport: scroll or fixed*/ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_config(config_path): | |
# Parse Config | |
# ============ | |
config = ConfigParser.RawConfigParser() | |
config.read(config_path) | |
config_dict = dict() | |
for section in config.sections(): | |
config_dict[section] = dict() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cartesian_product(X): | |
"""直積を求める | |
直積とは A={a, b, c}, B={d, e}のような2つの集合が与えられたとすると | |
A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)} | |
""" | |
import itertools | |
Y = list(itertools.product(*X)) | |
# >> [(11, 21, 31), (11, 21, 32), (11, 21, 33), (11, 22, 31), (11, 22, 32), (11, 22, 33), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! coding:utf-8 | |
""" | |
Created by 0160929 on 2016/08/10 8:11 | |
""" | |
import os | |
import sys | |
from PySide.QtGui import * | |
from PySide.QtCore import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!coding:utf-8 | |
""" | |
spotify_bs.py | |
https://spotifycharts.com/regionalから小さいサムネイル画像の取得・保存するスクリプト | |
もじBeautifullSoupがなければインストールしてください | |
pip install bs4 # ??? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://code.createjs.com/easeljs-0.8.2.min.js"></script> | |
<script src="https://code.createjs.com/tweenjs-0.6.2.min.js"></script> | |
<script src="https://code.createjs.com/preloadjs-0.6.2.min.js"></script> | |
</head> | |
<body onload="init();"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('helloWorld').innerHTML = 'Hello, World!'; | |
var g = 9.8; | |
var L = 9.8; | |
var w = 100; | |
var PI = 3.14159265; | |
function dprint(s){ | |
document.getElementById('helloWorld').innerHTML += "<p>" +s+"</p>\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload = function() { | |
function ColorModel(code) { | |
var self = this; | |
self.code = ko.observable(code); | |
} | |
// This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI | |
function ColorViewModel() { | |
var self = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> --> | |
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> --> | |
<title>Type it Yourself</title> | |
<!-- CSS --> | |
<link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Knockout.js</title> | |
<link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css"> | |
<script src="./js/jquery.min.js"></script> | |
<script src="./bootstrap/js/bootstrap.min.js"></script> | |
<script src="./js/knockout.min.js"></script> | |
<script src="./js/user-script.js"></script> |