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
// Copyright 2019 Brian Knapp<knappador@gmail.com> | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTIO |
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
Log.i("BackgroundRealmActivity", "MainThread Id: " + Thread.currentThread().getId()); | |
PublishSubject<Integer> intSubject = PublishSubject.create(); | |
Observable<Integer> ints = intSubject.asObservable(); | |
intSubject.subscribe((Integer i) -> { | |
Log.i("BackgroundRealmActivity emitted", Integer.toString(i)); | |
}); | |
ints.flatMap((Integer i) -> { |
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
... | |
:app:compileFullDebugAndroidTestSources UP-TO-DATE | |
:app:proguardFullDebugAndroidTest | |
Note: there were 12 duplicate class definitions. | |
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass) | |
Warning: org.hamcrest.integration.EasyMock2Adapter: can't find superclass or interface org.easymock.IArgumentMatcher | |
Warning: org.hamcrest.integration.JMock1Adapter: can't find superclass or interface org.jmock.core.Constraint | |
Warning: library class android.test.AndroidTestCase extends or implements program class junit.framework.TestCase | |
Warning: library class android.test.AndroidTestRunner extends or implements program class junit.runner.BaseTestRunner | |
Warning: library class android.test.InstrumentationTestCase extends or implements program class junit.framework.TestCase |
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 PropertyMultiplexer(EventDispatcher): | |
select = ListProperty() | |
def __init__(self, rule_sets, **kwargs): | |
super(PropertyMultiplexer, self).__init__(**kwargs) | |
self.rule_sets = rule_sets | |
default = rule_sets.default | |
# there must be a default in rule_sets and it | |
# must define a default for each possible property |
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
''' This module contains a list of all "styles" where each more specific | |
style will override the more general one all the way to the default. Any | |
attribute type can be used and will be available on the DimensionController | |
instance, d_ctl inside the kv file. Importing the d_ctl into the kv | |
namespace allows the entire kv file to recieve any property updates | |
resulting from UI rotation or resizeing dynamically.''' | |
''' currently this implementation has no support for nesting | |
so the namespace could become cluttered on complex UI's. What is the |
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
# meanwhile in some widget tree I create an instance and | |
# set the property in that specific tree for the specific ColorSel instance | |
ColorSel: | |
title: 'high color' | |
# passing in the attribute that will be bound inside kv | |
bind_color: 'ebbh' | |
<ColorSel@RelativeLayout>: |
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
from kivy.event import EventDispatcher | |
from kivy.properties import NumericProperty | |
class Eoo(EventDispatcher): | |
new_value = NumericProperty() | |
def __init__(self, **kwargs): | |
self.old_value = None | |
super(Eoo, self).__init__(**kwargs) | |
self.bind(new_value=self.recall) |
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
[INFO ] [Window ] using <pygame> as window provider | |
[INFO ] [GL ] OpenGL version <4.3.0 NVIDIA 319.23> | |
[INFO ] [GL ] OpenGL vendor <NVIDIA Corporation> | |
[INFO ] [GL ] OpenGL renderer <GeForce GTX 660M/PCIe/SSE2> | |
[INFO ] [GL ] Shading version <4.30 NVIDIA via Cg compiler> | |
[INFO ] [GL ] Texture max size <16384> | |
[INFO ] [GL ] Texture max units <32> |
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
Reading symbols from /home/knapper/projects/libCello/demos/a.out...done. | |
(gdb) run | |
Starting program: /home/knapper/projects/libCello/demos/a.out | |
warning: Could not load shared library symbols for linux-vdso.so.1. | |
Do you need "set solib-search-path" or "set sysroot"? | |
Type: 'Int' | |
Type: 'Real' | |
Type: 'String' | |
Price of a 'Pear' is 55 | |
Price of "Apple" is 12 |