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
import ui | |
class CustomSlider(ui.View): | |
def __init__(self,*args,**kwargs): | |
super().__init__(*args, **kwargs) | |
@property | |
def value(self): | |
return self.__value | |
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
import ui | |
class MoveView(ui.View): | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.current_location = None | |
self.image = ui.Image('test:Mandrill') | |
self.iv = ui.ImageView(image=self.image) | |
self.add_subview(self.iv) | |
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
import ui | |
questions = [('Which is the smallest planet in the solar system?', | |
('mercury', 'mars', 'saturn'), 0), | |
('which one is the moon of the saturn?', | |
('io', 'enceladus', 'europa'), 1), | |
('Which is the largest planet in the solar system?', | |
('mercury', 'mars', 'jupiter'), 2)] | |
class QuizDialog(object): |
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
''' | |
A very simple drawing 'app' that demonstrates | |
custom views and saving images to the camera roll. | |
''' | |
import ui | |
import photos | |
import console | |
# The PathView class is responsible for tracking |
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
import scene | |
import random | |
import ui | |
import sound | |
class Block(scene.SpriteNode): | |
for effect in ['Click_1', 'Click_2', 'Coin_2', 'Coin_5']: | |
sound.load_effect(effect) | |
w, h = (96, 96) # (64, 64) |
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).ready(function() { | |
$('a.moreorless').click(function() { | |
var $firstPara = $('p:eq(1)'); | |
$firstPara.slideToggle('slow'); | |
var $link = $(this); | |
if ( $link.text() == "read more" ) { | |
$link.text('read less'); | |
} else { | |
$link.text('read more'); | |
} |
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
[ | |
{ | |
"class" : "View", | |
"attributes" : { | |
"background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)", | |
"tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)", | |
"enabled" : true, | |
"border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)", | |
"flex" : "" | |
}, |
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
#!python3 | |
#original code https://gist.github.com/omz/fb180c58c94526e2c40b | |
#bosco added changes dropbox 2 functionality | |
#minor edits done to run in python3 | |
#see forum post https://forum.omz-software.com/topic/4425/dropbox-file-picker-needs-update | |
# IMPORTANT SETUP INSTRUCTIONS: | |
# | |
# 1. Go to http://www.dropbox.com/developers/apps (log in if necessary) | |
# 2. Select "Create App" | |
# 3. Select the following settings: |