This file contains hidden or 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
| cursor.execute("""SELECT lastname FROM people WHERE firstname = ? AND age = ?""", (name, age)) |
This file contains hidden or 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
| ;; Contract(契約): area-of-ring : number number -> number | |
| ;; Purpose(目的): ドーナツ型の面積を計算する | |
| ;; 外側の円の半径をouter、内側の穴の半径をinnerとする | |
| ;; Example(例): (area-of-ring 5 3) は 50.24 を返す | |
| ;; Definition(定義): [何かマシな事をここに書く] | |
| (define (area-of-ring outer inner) | |
| (- (area-of-disk outer) |
This file contains hidden or 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
| from Tkinter import * |
This file contains hidden or 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
| action = lambda e, x = ch, s = self: s.display(x) |
This file contains hidden or 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
| class Wine: | |
| """This class represents all the wine information""" | |
| def __init__(self, wine = "", winery = "", grape = "", year = ""): | |
| self.wine, self.winery, self.grape, self.year = wine, winery, grape, year | |
| # end of class Wine |
This file contains hidden or 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
| self.enWine = self.wTree.get_widget("enWine") | |
| self.enWine.set_text(self.wine.wine) | |
| self.wine.wine = self.enWine.get_text() |
This file contains hidden or 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
| # Add all ot the List Columns to the wineView | |
| [self.wineView.InsertColumn(cs.index(heading), heading) for heading in cs] |
This file contains hidden or 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
| import wx |
This file contains hidden or 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 editConfig(self, keyword, replaceString, configPath): | |
| print keyword | |
| print replaceString | |
| # ファイルをオープン | |
| f = open(configPath, 'r') | |
| # 新しい書き込み用リストを生成 | |
| cnf = [txt.strip().find(keyword) >= 0 and replaceString + '\n' or txt \ | |
| for txt in [line for line in f.readlines()]] | |
| f.close() |