Skip to content

Instantly share code, notes, and snippets.

#:kivy 1.5.1
FloatLayout:
size_hint: (1,1)
bookcover: bookcover
Carousel:
pos_hint: {'center_x': 0.5, 'top': app.booky}
size_hint: (1,1)
id: bookcover
@KristerV
KristerV / main.py
Last active December 14, 2015 11:09
bug report for kivy - ScrollView.bind(scroll_y=x)
from kivy.lang import Builder
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.scrollview import ScrollView
from kivy.uix.label import Label
from kivy.clock import Clock
class TestApp(App):
from kivy.lang import Builder
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.scrollview import ScrollView
from kivy.uix.label import Label
from kivy.clock import Clock
class TestApp(App):
from random import random
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.button import Button
from kivy.graphics import Color, Ellipse, Line
class MyPaintWidget(Widget):
def on_touch_down(self, touch):
from kivy.app import App
from kivy.metrics import Metrics
class TestApp(App):
def build(self):
print Metrics.density()
if __name__ == '__main__':
'''
Image auto_reload test
======================
Testing ground for auto_reload
'''
import kivy
kivy.require('1.8.0')
file 1 the commands I used for packaging
file 2 adb logcat when starting app
as far as I can tell, everything installed correctly
note: everything done as non-root, a.k.a. normal user.
UserProfile = React.createClass({
componentWillMount() {
loadFilePicker()
},
filepicker(e) {
console.log("filepicker event",e)
},
@KristerV
KristerV / js-fps
Last active September 1, 2016 10:44
var last = new Date();
function go() {
console.log(100000 / (new Date() - last));
last = new Date();
setTimeout(go, 1000)
}
go();
import javafx.animation.AnimationTimer;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyCode;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;