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
| -- style.lua | |
| -- First, I tried altering `style.lua` to add `fscale` attribute and a function to update style. | |
| style.set_font = function() | |
| style.padding = { x = common.round(14 * style.fscale), y = common.round(7 * style.fscale) } | |
| style.divider_size = common.round(1 * style.fscale) | |
| style.scrollbar_size = common.round(4 * style.fscale) | |
| style.caret_width = common.round(2 * style.fscale) | |
| style.tab_width = common.round(170 * style.fscale) | |
| style.font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 14 * style.fscale) | |
| style.big_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 34 * style.fscale) |
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
| case (position - radius > first_page && position + radius <= last_page): | |
| pages = range_gen(position - radius, position + radius + 1, position); | |
| break; | |
| // - page is located near the left corner | |
| case (position >= first_page && position <= first_page + radius): | |
| pages = range_gen(first_page, first_page + (radius * 2) + 1, position); | |
| break; | |
| // - page is located near the right corner | |
| case (position >= last_page - radius && position <= last_page): | |
| pages = range_gen(last_page - (radius * 2), last_page + 1, position); |
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
| Backbone.View.extend({ | |
| // root view DOM-element | |
| tagName: "div", | |
| // events for root view DOM-element | |
| events: { | |
| "click .go_back": "back", | |
| "click .go_forward": "forward", | |
| "click .active a": "fire", |
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
| # http://www.csounds.com/journal/issue14/realtimeCsoundPython.html | |
| from csoundSession import * | |
| cs = CsoundSession("simple.csd") | |
| print cs.scoreEvent('e', ()) | |
| print cs.resetSession() | |
| print cs.scoreEvent('a', (0, 0, 6000)) | |
| print cs.GetScoreTime() |
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
| ITEM: ATOMS id type xs ys zs | |
| 1 1 0.0118308 0.969562 0.016362 | |
| 2 1 0.0206919 0.0223819 0.0382589 | |
| 3 1 0.0732507 0.980683 0.0472193 | |
| 4 1 0.963803 0.0565348 0.0858727 | |
| 5 1 0.0857903 0.970805 0.984728 | |
| 6 1 0.113903 0.0969731 0.00296579 | |
| 7 1 0.160026 0.0580469 0.0292498 | |
| 8 1 0.0988733 0.0396375 0.0322331 | |
| 9 1 0.203053 0.0349323 -0.00915381 |
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
| bl_info = { | |
| "name": "LAMMPS", | |
| "author": "6r1d", | |
| "blender": (2,6,7), | |
| "version": (0,0,1), | |
| "location": "File > Import-Export", | |
| "description": "Import LAMMPS data format", | |
| "category": "Import-Export" | |
| } | |
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import codecs | |
| # Open file and load lines | |
| with codecs.open('msg.txt', encoding='utf8') as f: | |
| lines = [line.strip() for line in f] |
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
| qx.Class.define("qx.ui.tabview.TabView", { | |
| extend: qx.ui.tabview.TabView, | |
| members: { | |
| // Select next tab | |
| next: function () { | |
| var size = this.getSelectables().length; | |
| var idx = this.getSelectables().indexOf(this.getSelection()[0]); | |
| if (idx < size - 1) { | |
| this.setSelection([this.getSelectables()[idx + 1]]); |
NewerOlder