Multiple plugins can be mounted into the key database (KDB). On every access to the key data base they are executed and thus can change the functionality and behavior.
Elektra has a wide range of different plugins. The plugin folders should contain a README.md with further information. (Or follow links below.) The plugins are:
Overview Plugins
C-Interface
All plugins implement the same interface:
kdbOpen()
calls elektraPluginOpen()
of every plugin to let them do their initialisation.
kdbGet()
requests elektraPluginGet()
of every plugin in the queried backends to return a key set.
kdbSet()
usually calls elektraPluginSet()
of every plugin in the queried backends to store the configuration.
kdbSet()
also calls elektraPluginError()
for every plugin when an error happens. Because of elektraPluginError()
, plugins are guaranteed to have their chance for necessary cleanups.
kdbClose()
makes sure that plugins can finally free their own resources in elektraPluginClose()
.
kdbCheckConfig()
can be called manually to ensure a plugin is configured properly.
kdbGenConfig()
can be called to produce all valid configurations of a plugin.
KDB-Interface
See also
For an easy introduction, see this tutorial how to write a storage plugin. For more background information of the plugins framework, continue here. Otherwise, you can visit the the API documentation.
Plugins
Resolver
Before configuration is actually written, the file name needs to be determined (resolvers will be automatically added by kdb mount):
- resolver uses advanced POSIX APIs to handle conflicts gracefully
- wresolver minimalistic resolver for non-POSIX systems
- noresolver does not resolve, but can act as one
- gitresolver checks out and commits files to a local git repository and afterwards the configuration file must be synced with harddisc (recommended to add at every kdb mount):
- curlget fetches configuration file from a remote host
- blockresolver resolves tagged blocks inside config files
- multifile
- sync uses POSIX APIs to sync configuration files with the hard disk
Storage
Are responsible for reading writing the configuration to configuration files.
Read and write everything a KeySet might contain:
- dini uses by default the ini plugin but has legacy support for dump
- ini supports a range of INI file formats.
- dump makes a dump of a KeySet in an Elektra-specific format
Read (and write) standard config files:
- augeas reads/writes many different configuration files using the augeas library
- hosts reads/writes hosts files
- line reads/writes any file line by line
- yajl reads/writes JSON.
Using semi-structured data for config files, mainly suitable for spec-namespace (put a focus on having nice syntax for metadata):
- ni parses INI files based on (including metadata) ni.
- tcl-like config files (including metadata).
Only suited for import/export:
- xerces uses XML (without a specific schema).
- xmltool uses XML (in Elektra's XML schema).
- simpleini line-based key-value pairs with configurable format (without sections)
- mini dependency free, line based key-value storage plugin.
Plugins that just show some functionality, (currently) not intended for productive use:
- fstab for fstab files.
- regexstore
- csvstorage for csv files
- passwd for passwd files
- dpkg reads /var/lib/dpkg/{available,status}
- mozprefs for Mozilla preference files
- c writes Elektra C-structures (
ksNew(.. keyNew(...
)
- file reads and writes a file from/to a single key
- camel reads and writes a very limited subset of YAML
- yamlcpp reads and writes data in the YAML format using yaml-cpp
System Information
Information compiled in Elektra:
- version is a built-in plugin directly within the core so that it cannot give wrong version information
- constants various constants, including version information
- desktop contains information which desktop is currently running
Providing information found on the system not available in persistent files:
- uname information from the uname syscall.
Filter
Filter plugins process keys and their values in both directions. In one direction they undo what they do in the other direction. Most filter plugins available now encode and decode values. Storage plugins that use characters to separate key names, values or metadata will not work without them.
- cachefilter stores filtered keys internally so that they do not get accidentally lost and can be written to the storage again without the user having to remember including them in the writeout
Encoding
Rewrite unwanted characters with different techniques:
- ccode using the technique from arrays in the programming language C
- hexcode using hex codes
- base64 using the Base64 encoding scheme (RFC4648)
Transformations:
Doing other stuff:
- crypto encrypts / decrypts confidential values
- fcrypt encrypts / decrypts entire backend files
- iconv makes sure the configuration will have correct character encoding
- hidden hides keys whose names start with a
.
.
- null takes care of null values and other binary specialities
Notification and Logging
Log/Send out all changes to configuration to:
- dbus sends notifications for every change via dbus
- dbusrecv receives notifications via dbus
- syslog logs key database changes to syslog
- journald logs key database changes to journald
- logchange prints the change of every key on the console
Notification of key changes:
Debug
Trace everything that happens within KDB:
Checker
Copies metadata to keys:
- spec copies metadata from spec namespace (the standard way)
- glob using globbing techniques (needed by some plugins)
- struct using a defined structure (may also reject configuration not conforming to that structure)
Plugins that check if values are valid based on metadata (typically copied by the spec
plugin just before):
Value Validation
- validation by using regex
- network by using network APIs
- ipaddr checks IP addresses using regular expressions
- path by checking files on file system
- type using run-time type checking (CORBA types/)
- enum compares the keyvalue against a list of valid values
- mathcheck by mathematical expressions using key values as operands
- conditionals by using if-then-else like statements
- required rejects non-required keys
- date validates date and time data
- range checks if a value is within a given range
Other Validation
Interpreter
These plugins start an interpreter and allow you to execute a script in an interpreted language whenever Elektra’s key database gets accessed. Note that they depend on the presence of the respective binding during run-time.
- jni java plugins started by jni, works with jna plugins
- python Python 3 plugins
- python2 Python 2 plugins (deprecated)
- ruby Ruby plugins
- lua Lua plugins
- shell executes shell commandos
- haskell used for linking haskell plugins and is a small example for such plugins itself
Others
- doc contains the documentation of the plugin interface
- error yields errors as described in metadata (handy for test purposes)
- template to be copied for new plugins
- list loads other plugins
- iterate iterate over all keys and run exported functions on tagged keys
- semlock a semaphore based global locking logic
- profile links profile keys
- simplespeclang simple configuration specification language


| Type |
Changes |
By |
|
Resolved generic parameter inconsistency for various static fields, e.g. BagUtils.EMPTY_BAG,
TruePredicate.INSTANCE and many others. All accessible static fields use raw types so that
they can be used directly without explicit casting. To avoid compiler warnings about unchecked
conversion and/or rawtypes use the corresponding factory methods, e.g. BagUtils.emptyBag(). Fixes COLLECTIONS-502. |
tn |
|
Renamed methods "V MultiKeyMap#remove(Object, Object, ...)" to
"V MultiKeyMap#removeMultiKey(Object, Object, ...)" to avoid future conflicts
with a default method of the Map interface in Java 8. Fixes COLLECTIONS-501. |
tn |
|
Renamed "V MultiMap#remove(K, V)" to "boolean MultiMap#removeMapping(K, V)"
to avoid future conflicts with a default method of the Map interface in Java 8. Fixes COLLECTIONS-500. |
tn |
|
Refactored the test framework for Bag implementations to extend from
"AbstractCollectionTest" by decorating the concrete Bag instance with
a CollectionBag or CollectionSortedBag. Fixes COLLECTIONS-499. |
tn |
|
"CollectionBag" will now also respect the contract of the decorated bag in case
a null argument is provided to either removeAll or retainAll. Fixes COLLECTIONS-498. |
tn |
|
Added bag decorator "CollectionSortedBag" which decorates a SortedBag to make it
comply with the Collection contract. Fixes COLLECTIONS-497. |
tn |
|
"UnmodifiableBoundedCollection" does now also implement the marker interface "Unmodifiable"
similar as all other unmodifiable decorators. Fixes COLLECTIONS-496. |
tn |
|
"UnmodifiableTrie#unmodifiableTrie(Trie)" will not decorate again an already
unmodifiable Trie. Also the return type has been changed to "Trie" to be consistent
with other Unmodifiable decorators. Fixes COLLECTIONS-495. |
tn |
|
Moved "Equator" interface to base package for consistency. Fixes COLLECTIONS-494. Thanks to Emmanuel Bourg. |
tn |
|
Added "CollectionsUtils#matchesAll(Iterable, Predicate)" to test if all elements
of a collection match a given predicate. Fixes COLLECTIONS-488. Thanks to Josh Cain. |
tn |
|
Accept wildcard input where possible, e.g. in copy-constructors, Unmodifiable* decorators
and iterators. Fixes COLLECTIONS-485. Thanks to Hollis Waite. |
tn |
|
No collision detection/resolution was performed when calling "CompositeSet#addComposited(...)"
with more than one Set as argument. Additionally use varargs parameters instead of arrays
in CompositeSet and CompositeCollection constructor and addComposited method. Fixes COLLECTIONS-481. Thanks to Hollis Waite. |
tn |
|
Narrow return type of "BidiMap#values()" to Set as the values are required to be unique. Fixes COLLECTIONS-480. Thanks to Hollis Waite. |
tn |
|
Fixed conversion of timeout parameters in "PassiveExpiringMap". Fixes COLLECTIONS-475. |
tn |
|
Exception in "ListOrderedMap#putAll" if map contains null values. Fixes COLLECTIONS-474. Thanks to Ning Chen. |
sebb |
|
Made field "collection" in class "AbstractCollectionDecorator" private and added
setter "setCollection(Collection)" with scope protected to set the decorated collection
during de-serialization. Fixes COLLECTIONS-473. Thanks to sebb. |
tn |
|
Improved performance of "AbstractMapBag#containsAll(Collection)" by returning immediately
after a difference has been found. Fixes COLLECTIONS-472. Thanks to Adrian Nistor. |
tn |
|
Renamed class "TransformedMap" in package "splitmap" to "TransformedSplitMap" to avoid
name clash with similar class in package "map". Fixes COLLECTIONS-470. Thanks to sebb. |
tn |
|
Added bag decorator "CollectionBag" which decorates a bag to make it comply with the
Collection contract. Fixes COLLECTIONS-468. |
tn |
|
Replaced "Collection" with "Iterable" for method arguments where applicable. Fixes COLLECTIONS-466. |
tn |
|
Added "PushbackIterator" decorator to support pushback of elements during iteration. Fixes COLLECTIONS-463. Thanks to Andy Seaborne, Claude Warren. |
tn |
|
Added "PeekingIterator" decorator to support one-element lookahead during iteration. Fixes COLLECTIONS-462. Thanks to Andy Seaborne, Claude Warren. |
tn |
|
Added additional clarification to javadoc of interface "Put" wrt return type of
"put(Object, Object)" method. Fixes COLLECTIONS-461. Thanks to Matt Benson, sebb. |
tn |
|
Changed "IteratorChain" to use internally a "Queue" instead of a "List". Iterators are
removed from the queue once used and can be garbage collected after being exhausted.
Additionally removed the methods "setIterator(Iterator)" and "getIterators()". Fixes COLLECTIONS-460. |
tn |
|
Removed method "setArray(Object)" in class ArrayIterator and method "setArray(Object[])"
in class ObjectArrayIterator and made fields array, startIndex and endIndex final. Fixes COLLECTIONS-459. Thanks to sebb. |
tn |
|
Removed unused class "AbstractUntypedCollectionDecorator<E, D>". Fixes COLLECTIONS-458. |
sebb |
|
Added methods "ListUtils#longestCommonSubsequence(...)" to get the longest common subsequence
of arbitrary lists or CharSequences. Fixes COLLECTIONS-456. |
tn |
|
Changed scope of fields to private where appropriate. Fixes COLLECTIONS-455. |
sebb |
|
An iterator over a "Flat3Map#entrySet()" will now return
independent Map.Entry objects that will not change anymore when
the iterator progresses. Fixes COLLECTIONS-454. |
tn |
|
Several closure and transformer implementations in the functors package
will now copy an array as input to their constructor (e.g. ChainedClosure). Fixes COLLECTIONS-453. |
tn |
|
Change base package to org.apache.commons.collections4. Fixes COLLECTIONS-452. |
tn |
|
The constructors for all Utils classes are now private to prevent instantiation. Fixes COLLECTIONS-451. |
tn |
|
Added methods "forAllButLastDo(Collection, Closure)" and "forAllButLastDo(Iterator, Closure)"
to class "CollectionUtils". Fixes COLLECTIONS-450. Thanks to J. Moldawski. |
tn |
|
Tree traversal with a TreeListIterator will not be affected anymore by
the removal of an element directly after a call to previous(). Fixes COLLECTIONS-447. Thanks to Jeffrey Barnes. |
tn |
|
Added method "CollectionUtils#isEqualCollection(Collection, Collection, Equator)". Fixes COLLECTIONS-446. Thanks to Matt Lachman. |
tn |
|
Adapt and/or ignore several unit tests when run on a IBM J9 VM (specification version 1.6.0)
due to a faulty "java.util.TreeMap" implementation. Fixes COLLECTIONS-445. |
tn |
|
SetUniqueList.set(int, E) now works correctly if the object to be inserted
is already placed at the given position. Fixes COLLECTIONS-444. Thanks to Thomas Vahrst, John Vasileff. |
tn |
|
MultiKeyMap.clone() now correctly calls super.clone(). Fixes COLLECTIONS-441. Thanks to Thomas Vahrst. |
tn |
|
Added "emptyIfNull" methods to classes "CollectionUtils", "ListUtils", "SetUtils"
and "MapUtils". Fixes COLLECTIONS-436. Thanks to Arman Sharif. |
tn |
|
Improve performance of "TreeList#addAll" and "TreeList(Collection)" by converting
the input collection into an AVL tree and efficiently merge it into the existing tree. Fixes COLLECTIONS-433. Thanks to Jeffrey Barnes. |
tn |
|
Replaced "Buffer" interface with "java.util.Queue". Kept "CircularFifoQueue"
as well as "Predicated", "Transformed" and "Unmodifiable" decorators. Fixes COLLECTIONS-432. |
tn |
|
Added method "CollectionUtils#containsAll(Collection, Collection)" with guaranteed
runtime complexity of O(n + m) and space complexity of O(n). This method may yield much
better performance than "Collection#containsAll(Collection)" depending on the use-case and
type of collection used. Fixes COLLECTIONS-429,COLLECTIONS-434. Thanks to Adrian Nistor, Mert Guldur. |
tn |
|
Fixed performance issue in "SetUniqueList#retainAll" method for large collections. Fixes COLLECTIONS-427. Thanks to Mert Guldur. |
brentworden |
|
Fixed performance issue in "ListOrderedSet#retainAll" method for large collections. Fixes COLLECTIONS-426. Thanks to Adrian Nistor. |
brentworden |
|
Improved performance of "ListOrderedMap#remove(Object)" method. Fixes COLLECTIONS-425. Thanks to Adrian Nistor. |
tn |
|
"CompositeSet" does not inherit from "CompositeCollection" anymore. The inner class
"SetMutator" has been updated accordingly. Fixes COLLECTIONS-424. Thanks to Michael Pradel. |
tn |
|
Added method "CollectionUtils#permutations(Collection)" and class "PermutationIterator"
to generate unordered permutations of a collection. Fixes COLLECTIONS-422. Thanks to Benoit Corne. |
tn |
|
Update javadoc for "ListUtils#lazyList()" and "ListUtils#fixedSizeList()". Fixes COLLECTIONS-421. Thanks to Benedikt Ritter. |
tn |
|
Added clarifying javadoc wrt runtime complexity of "AbstractDualBidiMap#retainAll". Fixes COLLECTIONS-419. Thanks to Adrian Nistor. |
tn |
|
Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#retainAll". Fixes COLLECTIONS-417. Thanks to Adrian Nistor. |
tn |
|
Added clarifying javadoc wrt runtime complexity of "AbstractLinkedList#removeAll". Fixes COLLECTIONS-415. Thanks to Adrian Nistor. |
tn |
|
Fixed several compilation issues with older Java 1.6 compilers. Fixes COLLECTIONS-414. |
tn |
|
Improved performance of "removeAll()" method for sets returned by "DualHashBidiMap#entrySet()". Fixes COLLECTIONS-413. Thanks to Adrian Nistor. |
tn |
|
Improved performance of "CollectionUtils#subtract" methods. Fixes COLLECTIONS-412. Thanks to Adrian Nistor. |
tn |
|
Fixed possible "IndexOutOfBoundsException" in "ListOrderedMap#putAll". Fixes COLLECTIONS-411. Thanks to Adrian Nistor. |
tn |
|
Improved performance of "SetUniqueList#addAll" method. Fixes COLLECTIONS-410. Thanks to Adrian Nistor. |
tn |
|
Improved performance of "ListOrderedSet#addAll" method. Fixes COLLECTIONS-409. Thanks to Adrian Nistor. |
tn |
|
Improved performance of "SetUniqueList#removeAll". Fixes COLLECTIONS-408. Thanks to Adrian Nistor. |
tn |
|
Improved performance of "ListOrderedSet#remove(Object)" in case the object is
not contained in the Set. Fixes COLLECTIONS-407. Thanks to Adrian Nistor. |
tn |
|
Improved performance of "ListUtils#subtract" method. Fixes COLLECTIONS-406. Thanks to Adrian Nistor. |
tn |
|
Added "ListUtils#select" and "ListUtils#selectRejected" methods. Fixes COLLECTIONS-405. Thanks to Adam Dyga. |
brentworden |
|
Added an implementation of Eugene Myers difference algorithm in package
o.a.c.c.sequence. Fixes COLLECTIONS-404. Thanks to Jordane Sarda. |
luc |
|
Added missing null check in "CollectionUtils#addIgnoreNull(Collection, Object)". Fixes COLLECTIONS-400. Thanks to Shin Hwei Tan. |
tn |
|
Added new method "get(int)" to "CircularFifoQueue". Fixes COLLECTIONS-399. Thanks to Sebb. |
tn |
|
Added "LazyIteratorChain" iterator. Fixes COLLECTIONS-396. Thanks to Jeff Rodriguez. |
tn |
|
Added "ListUtils#partition" method to split a List into consecutive sublists. Fixes COLLECTIONS-393. Thanks to Chris Shayan. |
tn |
|
Fixed javadoc for "MapUtils#toProperties(Map)". Fixes COLLECTIONS-391. Thanks to Shin Hwei Tan. |
tn |
|
Clarified javadoc for "TransformerUtils#mapTransformer" for null input. Fixes COLLECTIONS-389. Thanks to Shin Hwei Tan. |
tn |
|
Clarified javadoc for "FactoryUtils#prototypeFactory" for null input. Fixes COLLECTIONS-388. Thanks to Shin Hwei Tan. |
tn |
|
Fixed inconsistent javadoc for "MapUtils#synchronizedMap(Map)". Fixes COLLECTIONS-384. Thanks to Shin Hwei Tan. |
ggregory |
|
Added "CollectionUtils#forAllDo" implementation which takes an "Iterator" as input. Fixes COLLECTIONS-383. Thanks to Adrian Cumiskey. |
tn |
|
Change maven coordinates to "org.apache.commons.commons-collections4". Fixes COLLECTIONS-382. Thanks to Olivier Lamy. |
tn |
|
Move the project structure to a standard maven layout. Fixes COLLECTIONS-381. Thanks to Olivier Lamy. |
sebb |
|
Fixed infinite loop when calling "UnmodifiableBoundedCollection#unmodifiableBoundedCollection()". Fixes COLLECTIONS-380. Thanks to Dave Brosius. |
tn |
|
Fixed javadoc for several methods wrt expected NullPointerExceptions. Fixes COLLECTIONS-379. Thanks to Shin Hwei Tan. |
tn |
|
Added method "ListUtils#defaultIfNull(List, List)". Fixes COLLECTIONS-375. Thanks to Ivan Hristov. |
tn |
|
TransformingComparator now supports different types for its input/output values. Fixes COLLECTIONS-372. |
tn |
|
"DualTreeBidiMap" now uses the correct comparator for the reverse map during de-serialization. Fixes COLLECTIONS-364. |
sebb |
|
"TransformedMap" in the package "splitmap" can now be serialized. Fixes COLLECTIONS-363. |
sebb |
|
"CollectionUtils#filter(Iterable, Predicate)" will now return whether the collection
has been modified. Fixes COLLECTIONS-362. Thanks to Jean-Noel Rouvignac. |
brentworden |
|
Add method "CollectionUtils#filterInverse(Iterable, Predicate)". Fixes COLLECTIONS-361. Thanks to Jean-Noel Rouvignac. |
tn |
|
"FilterListIterator#hasNext" does not throw a NullPointerException anymore
to comply to the Java iterator specification. Fixes COLLECTIONS-360. Thanks to Sai Zhang. |
jochen |
|
"ListUtils#intersection(List, List)" will now also work correctly if there
are duplicate elements in the provided lists. Fixes COLLECTIONS-359. Thanks to Mark Shead. |
bayard |
|
"AbstractCollectionDecorator" will now use internally "decorated()" to access
the decorated collection. Fixes COLLECTIONS-352. Thanks to Adam Gent. |
bayard |
|
Removed features which are now supported by the JDK. Fixes COLLECTIONS-351. Thanks to Henri Yandell. |
bayard |
|
Removed debug output in "MapUtils#getNumber(Map)". Fixes COLLECTIONS-350. Thanks to Michael Akerman. |
bayard |
|
Fixed javadoc for all "transformedXXX(XXX)" methods in the respective Utils classes
to clarify that existing objects in the list are not transformed. Fixes COLLECTIONS-348. Thanks to Paul Benedict. |
brentworden |
|
Singleton classes in package "functors" are now correctly de-serialized. Fixes COLLECTIONS-343. Thanks to Goran Hacek. |
mbenson |
|
"NOPClosure" is now a final class. Fixes COLLECTIONS-341. Thanks to Goran Hacek. |
mbenson |
|
Removed broken methods "equals(Object)" and "hashCode()" in class "NOPClosure". Fixes COLLECTIONS-340. Thanks to Goran Hacek. |
mbenson |
|
Simplified exceptions as the cause is available from the parent. Fixes COLLECTIONS-336. Thanks to sebb. |
bayard |
|
Fixed cache assignment for "TreeBidiMap#entrySet". Fixes COLLECTIONS-335. Thanks to sebb. |
jochen |
|
Synchronized access to lock in "StaticBucketMap#size()". Fixes COLLECTIONS-334. Thanks to sebb. |
jochen |
|
Added clarification to javadoc of "ListOrderedMap" that "IdentityMap" and
"CaseInsensitiveMap" are not supported. Fixes COLLECTIONS-332. Thanks to Tom Parker. |
jochen |
|
Improve javadoc of "CollatingIterator" wrt the used "Comparator" and throw a
NullPointerException in "CollatingIterator#least" if no comparator is set. Fixes COLLECTIONS-331. Thanks to Michael Krkoska. |
jochen |
|
"LRUMap#keySet()#remove(Object)" will not throw a "ConcurrentModificationException" anymore. Fixes COLLECTIONS-330. Thanks to Joerg Schaible. |
mbenson |
|
Improved performance of "ListUtils#intersection(List, List)". Fixes COLLECTIONS-328. Thanks to Thomas Rogan, Jilles van Gurp. |
bayard |
|
Added serialVersionUID fields for "CompositeCollection", "CompositeSet",
"EmptyMapMutator", "EmptySetMutator". Fixes COLLECTIONS-327. Thanks to sebb. |
brentworden |
|
Fields transformer and decorated in class "TransformingComparator" are now final. Fixes COLLECTIONS-324. Thanks to sebb. |
tn |
|
Changed behavior of "CaseInsensitiveMap" constructor to be compliant with "HashMap"
in case the initial capacity is set to zero. Fixes COLLECTIONS-323. Thanks to Maarten Brak. |
jochen |
|
Added NodeListIterator and convenience methods in IteratorUtils to iterate over
a org.w3c.dom.NodeList. Fixes COLLECTIONS-322. Thanks to Thomas Vahrst. |
tn |
|
Improved performance of "StaticBucketMap#putAll(Map)" by iterating over the entry set. Fixes COLLECTIONS-320. Thanks to sebb. |
bayard |
|
Avoid redundant null check in "IteratorUtils#getIterator(Object)". Fixes COLLECTIONS-319. Thanks to sebb. |
bayard |
|
Use a private method to populate the object in "AbstractHashedMap(Map)". Fixes COLLECTIONS-317. Thanks to sebb. |
bayard |
|
Fixed javadoc of "LRUMap" wrt to the maxSize parameter of the constructor. Fixes COLLECTIONS-316. Thanks to ori. |
bayard |
|
Added new abstract class "CatchAndRethrowClosure" that re-throws any checked exception
as unchecked "FunctorException". Fixes COLLECTIONS-313. Thanks to David J. M. Karlsen. |
brentworden |
|
Use of final keyword where applicable, minor performance improvements by properly
initializing the capacity of newly created collections when known in advance. Fixes COLLECTIONS-312. Thanks to Peter Lawrey, Gary Gregory. |
tn |
|
"SetUniqueList#subList()" will now return an unmodifiable list as changes to it
may invalidate the parent list. Fixes COLLECTIONS-307. Thanks to Christian Semrau, Thomas Vahrst. |
tn |
|
"SetUniqueList#subList()#contains(Object)" will now correctly check the subList
rather than the parent list. Fixes COLLECTIONS-307. Thanks to Christian Semrau. |
bayard |
|
Added method "CollectionUtils#subtract(Iterable, Iterable, Predicate)". Fixes COLLECTIONS-306. Thanks to Chris Shayan. |
brentworden |
|
"SetUniqueList#set(int, Object)" will now correctly enforce the uniqueness constraint. Fixes COLLECTIONS-304. Thanks to Rafał Figas,Bjorn Townsend. |
bayard |
|
Improved javadoc for "Unmodifiable*" classes wrt behavior when the users tries
to modify the collection. Fixes COLLECTIONS-303. Thanks to Emmanuel Bourg. |
bayard |
|
Calling "CollectionUtils#sizeIsEmpty(null)" will now return true. Fixes COLLECTIONS-298. Thanks to Benjamin Bentmann. |
bayard |
|
Added methods "CollectionUtils#collate(...)" to merge two sorted Collections
into a sorted List using the standard O(n) merge algorithm. Fixes COLLECTIONS-296. Thanks to Julius Davies. |
tn |
|
"CaseInsensitiveMap" will now convert input strings to lower-case in a
locale-independant manner. Fixes COLLECTIONS-294. Thanks to Benjamin Bentmann. |
bayard |
|
Added support for using custom "Equator" objects in "EqualPredicate". Fixes COLLECTIONS-293. Thanks to Stephen Kestle. |
tn |
|
Added method "CollatingIterator#getIteratorIndex()". Fixes COLLECTIONS-289. Thanks to Fredrik Kjellberg. |
bayard |
|
Fixed javadoc for "ListUtils#transformedList(List)" to clarify that existing objects
in the list are not transformed. Fixes COLLECTIONS-256,COLLECTIONS-288. Thanks to Paul Benedict. |
bayard |
|
Added method "CollectionUtils#extractSingleton(Collection)". Fixes COLLECTIONS-286. Thanks to Geoffrey De Smet. |
mbenson |
|
Added serialization support for "TreeBidiMap". Fixes COLLECTIONS-285. Thanks to Christian Gruenberg. |
tn |
|
The predicate that rejected an object to be added to a "PredicatedCollection"
is now contained in the respective exception message. Fixes COLLECTIONS-280. Thanks to Chris Lewis. |
bayard |
|
Added "IndexedCollection" collection decorator which provides a map-like
view on an existing collection. Fixes COLLECTIONS-275. Thanks to Stephen Kestle. |
tn |
|
Added serialization support for "FixedOrderComparator" and "TransformingComparator". Fixes COLLECTIONS-272. Thanks to Chaitanya Mutyala. |
tn |
|
"MultiKey" will now be correctly serialized/de-serialized. Fixes COLLECTIONS-266. Thanks to Joerg Schaible. |
bayard |
|
"TreeBag" will now only accept "Comparable" objects as input when used with natural ordering. Fixes COLLECTIONS-265. Thanks to David Saff. |
bayard |
|
Added methods "MapUtils#populateMap(MultiMap, ...)" to support also "MultiMap" instances
as input. Fixes COLLECTIONS-263. Thanks to John Hunsley. |
tn |
|
Fixed javadoc for methods "firstKey()" and "lastKey()" in class "AbstractLinkedMap". Fixes COLLECTIONS-262. Thanks to Lisen Mu. |
bayard |
|
"Flat3Map#remove(Object)" will now return the correct value mapped to the removed key
if the size of the map is less or equal 3. Fixes COLLECTIONS-261. Thanks to ori. |
bayard |
|
Added constructor "TransformingComparator(Transformer)". Fixes COLLECTIONS-260. Thanks to Stephen Kestle. |
mbenson |
|
Added "DualLinkedHashBidiMap" bidi map implementation. Fixes COLLECTIONS-258. Thanks to Nathan Blomquist. |
tn |
|
Removed unused variables in "TreeBidiMap". Fixes COLLECTIONS-255. Thanks to Henri Yandell. |
mbenson |
|
The static factory methods have been renamed from "getInstance()" to a camel-case
version of the class name, e.g. "truePredicate()" for class "TruePredicate". Fixes COLLECTIONS-251,COLLECTIONS-321. Thanks to Stephen Kestle. |
mbenson |
|
"SetUniqueList.addAll(int, Collection)" now correctly add the collection at the
provided index. Fixes COLLECTIONS-249. Thanks to Joe Kelly. |
bayard |
|
Added "Equator" interface. Fixes COLLECTIONS-242. |
skestle |
|
Added "PassiveExpiringMap" map decorator. Fixes COLLECTIONS-241. Thanks to Elifarley Callado Coelho. |
brentworden |
|
"MultiValueMap" is now serializable. Fixes COLLECTIONS-240. Thanks to Wouter de Vaal. |
bayard |
|
Added method "MultiValueMap#iterator()" to return a flattened version of
"entrySet().iterator()". Clarified javadoc for "entrySet()" that the returned Entry
objects are unflattened, i.e. the Entry object for a given key contains all values
mapped to this key. Fixes COLLECTIONS-237. Thanks to Nils Kaiser, Alan Mehlo. |
tn |
|
Added method "ListUtils#indexOf(List, Predicate)". Fixes COLLECTIONS-235. Thanks to Nathan Egge. |
bayard |
|
Fixed several unit tests which were using parameters to "assertEquals(...)" in wrong order. Fixes COLLECTIONS-232. Thanks to Mark Hindess. |
bayard |
|
Return concrete class in static factory methods instead of base class interface
(except for Unmodifiable decorators). Fixes COLLECTIONS-231. Thanks to Torsten Curdt. |
tn |
|
"CollectionUtils#size(Collection)" now returns 0 when called with null as input. Fixes COLLECTIONS-230,COLLECTIONS-297,COLLECTIONS-318. Thanks to Stepan Koltsov,sebb. |
bayard |
|
Removed deprecated classes and methods. Fixes COLLECTIONS-229. |
scolebourne |
|
"MultiValueMap#put(Object, Object)" and "MultiValueMap#putAll(Object, Collection)"
now correctly return if the map has changed by this operation. Fixes COLLECTIONS-228. |
scolebourne |
|
Added method "ListOrderedMap#putAll(int, Map)". Fixes COLLECTIONS-226. Thanks to Vasily Ivanov. |
bayard |
|
Added new "Trie" interface with a first concrete implementation "PatriciaTrie"
together with decorators "Unmodifiable" and "Synchronized". Fixes COLLECTIONS-225. Thanks to Sam Berlin, Roger Kapsi. |
tn |
|
"CollectionUtils#addAll(...)" methods now return if the collection has been changed
by this operation. Fixes COLLECTIONS-223. Thanks to Vasily Ivanov. |
bayard |
|
"CompositeCollection", "CompositeMap" and "CompositeSet" are now serializable. Fixes COLLECTIONS-221. Thanks to Pal Denes. |
bayard |
|
"CollectionUtils#removeAll" wrongly called "ListUtils#retainAll". Fixes COLLECTIONS-219. Thanks to Tom Leccese. |
scolebourne |
|
The "CollectionUtils#select(Collection, Predicate, Collection)" method will now
return the output collection. Fixes COLLECTIONS-218. |
skestle |
|
Calling "setValue(Object)" on any Entry returned by a "Flat3Map" will now
correctly set the value for the current entry. Fixes COLLECTIONS-217. Thanks to Matt Bishop. |
scolebourne |
|
"MultiKey#toString()" will now use "Arrays#toString(List)". Fixes COLLECTIONS-216. Thanks to Hendrik Maryns. |
scolebourne |
|
Added support for resettable iterators in "IteratorIterable". Fixes COLLECTIONS-213. Thanks to Dusan Chromy. |
brentworden |
|
Added methods "MapUtils#populateMap(Map, Iterable, Transformer, ...)". Fixes COLLECTIONS-194. Thanks to Dave Meikle. |
bayard |
|
"CollectionUtils#forAllDo(Collection, Closure)" now returns the provided closure. Fixes COLLECTIONS-182. Thanks to Jim Cakalic. |
mbenson |
|
Make generic versions of all classes in collections. Fixes COLLECTIONS-110,COLLECTIONS-243,COLLECTIONS-245,COLLECTIONS-247, COLLECTIONS-253,COLLECTIONS-273,COLLECTIONS-282. |
multiple |
|
Added class "ComparatorPredicate". Fixes COLLECTIONS-8. Thanks to Rune Peter Bjørnstad. |
brentworden |


--- title: Eventum featured_image: projects/eventum.png link: https://github.com/schlosser/eventum cta: View on GitHub date: 2014-08-01 ---
Eventum is an open source content management system for event-driven websites, built in Python and Flask. I wrote Eventum from scratch for ADI, the tech club at Columbia, when I was redesigning their website in the summer of 2014. Building Eventum was a massive undertaking, including almost a complete rewrite a few years later. Checkout the blog post I wrote motivating Eventum, or contribute on GitHub.


Nature counts down to 2nd mini album 'Nature World' with solo teasers of Sunshine and Loha
by danisurstNature is getting ready to make another comeback!
On November 3 KST, the group continued the release of individual teasers, this time revealing concept photos for members Sunshine and Loha. While both girls are rocking an all-white look for their photos, both wear a completely different outfit reflecting their own personal style.
Meanwhile, Nature's second mini album 'Nature World: Code A' is set for release on November 12, their very first comeback with new member So Hee.
Check out the two new teasers below, and stay tuned for more as the group counts down to their comeback.


---
layout: study
title: Introducing Computers in Ontario’s Classrooms
---
Provincial Ambitions, Teacher Preparation, and Technological Change in the 1980sIntroducing Computers in Ontario’s Classrooms
In late 2017 and early 2018, I researched how Ontario teachers shared information in preparation for the wide-scale introduction of standardized educational computers in the 1980s and early 1990s.
To do this, I analysed historical issues of the Educational Computing Organization of Ontario’s newsletter—ECOO is an organization set up in the late 70s to share information between teachers and other professionals about educational computing.
Trying to understand the effects of technological change is essential. It’s hardly a certain thing—we rarely realize the full degree of change, and definitely not in advance. But after the fact, we can look at how others prepared for such change—from it, we might learn some lessons for today. This is a particularly interesting case for me, because these newsletters demonstrate just how key the role of individuals is in pushing organizational change. Making explicit the role that individuals play in preparing for change interests me a lot.
As part of my documentation, I’m publishing relevant notes, findings, and thoughts from the research process. I’m slowly adding to this section, transferring previously local documents to this site. Consider this an incomplete record of my research process and the evolution of my thinking, with some parts better noted than others. Do not consider it as revised, reviewed, or published work.
{{ finding.subtitle }} ({{ finding.date | date: '%B ~%dth, %Y' | replace: '~0', '' | replace: '~', '' | replace: '1th', '1st' | replace: '2th', '2nd' | replace: '3th', '3rd' | replace: '11st', '11th' | replace: '12nd', '12th' | replace: '13rd', '13th' }})


Catalogue
Agata Bieleń
Right Line
Coll. N°1
→Nature Line
Coll. N°2
→-
Coll. N°3
Storm Line
→ -
Coll. N°4
Storm Line
→ -
Coll. N°5
Storm Line
→ -
Coll. N°6
Storm Line
→ -
Coll. N°7
Storm Line
→ -
Coll. N°8
Storm Line
→
-
Coll. N°3
Storm Line
→ -
Coll. N°4
Storm Line
→ -
Coll. N°5
Storm Line
→ -
Coll. N°6
Storm Line
→ -
Coll. N°7
Storm Line
→ -
Coll. N°8
Storm Line
→


--- layout: post title: Beyond The Screen date: 2007-11-28 00:00:00 categories: business digital-media interfaces-&-interaction mobile personal play software-development ---
Last minute Hume booking! I'll be talking at Beyond The Screen this Friday, around the corner from FPHQ. I'll be doing a short 15-minute skit with Richard Vahrman from LocoMatrix, on some of the real-world interface difficulties we found and solved when FP were building a GPS gaming platform. There's an Upcoming page for the event here.


|
equal
Syntax:
#include <algorithm> bool equal( iterator start1, iterator end1, iterator start2 ); bool equal( iterator start1, iterator end1, iterator start2, BinPred p ); The equal() function returns true if the elements in two ranges are the same. The first range of elements are those between start1 and end1. The second range of elements has the same size as the first range but starts at start2. If the binary predicate p is specified, then it is used instead of == to compare each pair of elements. For example, the following code uses equal() to compare two vectors of integers: vector<int> v1; for( int i = 0; i < 10; i++ ) { v1.push_back( i ); } vector<int> v2; for( int i = 0; i < 10; i++ ) { v2.push_back( i ); } if( equal( v1.begin(), v1.end(), v2.begin() ) ) { cout << "v1 and v2 are equal" << endl; } else { cout << "v1 and v2 are NOT equal" << endl; } |


Why Figma Wins - kwokchain Companies are a sequencing of loops. While it’s possible to stumble into an initial core loop that works, the companies that are successful in the long term are the ones that can repeatedly find the next loop. However, this evolution is poorly understood ...
How I Got My 7 Person Startup Featured In Entrepreneur Magazine - David Kemmerer If you have the word “Co-Founder” or “Chief ______ Officer” in your LinkedIn title, there’s a good chance your inbox gets flooded with pitches from all sorts of sales people. It doesn’t even matter if the title is legit or not.
The ugly truth I am so excited to meet my old friend Vinay after a long time. It has been almost one and half year we spoke to each other. We worked together in one of my previous organizations and he is a close friend and kind of mentor to me too. We both got busy in o...
Implementing a brainfuck CPU in Ghidra - part 1: Setup and disassembly This blog post is part of the series Implementing a brainfuck CPU in Ghidra: Setup and disassembly Decompilation of pointer and arithmetic instructions Decompilation of I/O and control flow instructionsRenaming the analyzer and adding a manual (future pos...
Starting from the Problem not the Solution I spent most of the day in solution space. The wrong solution space. In fact, I was solving a problem that didn't exist.
The Wolf You’ve heard of the 10x engineer, but I am here to tell you about the Wolf. They are an engineer and they consistently exhibit the following characteristics: They appear to exist outside of the well-defined process that we’ve defined to get things done, ...
Switching from Fedora & Gnome to Arch & Sway | Josh Mcguigan I’ve been a Linux user for ~1 year, switching from macOS which I had been using for a long time. I installed Fedora on a 4th generation X1 Carbon and everything just worked.
Good and Bad Parts of Ansible after 2 Years of Usage Personal experiences from Ansible usage after two years.
johang/btfs A bittorrent filesystem based on FUSE. Contribute to johang/btfs development by creating an account on GitHub.
Police-Data-Accessibility-Project/Police-Data-Accessibility-Project A repository for all code related to the Police Data Accessibility Project - Police-Data-Accessibility-Project/Police-Data-Accessibility-Project
Written communication is remote work super power Update: An interesting discussion around this started in hacker news
CCCXLIII - Muscle Sword **Puny Hero:** Muscle Sword! Give me your power! > The Puny Hero becomes a Muscly Hero with a CHONK! sound > Muscle Hero leaps at a dragon **Muscle Hero:** HYAAAAH! > Dragon is stabbed with the Muscle Sword and every part of its body becomes covered i...
Weekly Update 196 All my things are breaking 😭 Mic broke, PC broke, boat shed handle broke, fridges (both of them) broke, fireplace broke, roof broke... and that's just the stuff I could remember in the live stream. But in happier news, listening back to that video now I'...
Join us live! - JuneteenthConf - June 19th and 20th 2020 Juneteenth Conference is a free virtual tech conference made for and featuring Black people in technology. The conference celebrates Black Excellence and promotes community for Black people who are severely underrepresented in the tech industry. We welcom...
Olo - Xamarin Mobile Engineer At Olo we develop an online food ordering platform used by many of the country’s largest restaurant chains, reaching millions of consumers. Chances are if you’ve ordered directly from a restaurant brand’s app or website, we’ve made that happen. Mobile ord...
» The Shareware Scene, Part 5: Narratives of DOOM The Digital Antiquarian Let me begin today by restating the obvious: DOOM was very, very popular, probably the most popular computer game to date.
Code Maze Weekly #30 - Code Maze There is nothing better after a busy week than to wind down, relax, prepare your favorite brew, and enjoy some quality reading material. Let’s see what’s new this week: .NET and C# Validation in ASP .NET Core 3.1 [wakeupandcode.com] Shahed covers basic of...
The smartest password policy enforcer for Active Directory safepass.me® and pwncheck® help you eradicate weak, leaked and compromised passwords from being used in your organisation.
Build your own .NET memory profiler in C# — call stacks (2/2–2) In this last episode I will details how to transform addresses from the stack into methods name and possibly signature.
Quit Whining about Apple and Just Stop Using Them Note: I have changed the name of the actual email company referred to by this story, simply for the reason that I’m not familiar enough with their service to feel comfortable contributing to all the free publicity they’re drumming up through this issue. I...
Heading into WWDC by insulting developers, Apple? Really? - 9to5Mac Heading into WWDC, Apple isn't exactly getting off to the best of starts. While outlining my view of Apple's overall handling of the antitrust charges ...
Announcing CUDA on Windows Subsystem for Linux 2 | NVIDIA Developer Blog Figure 1. Stack image showing layers involved while running Linux AI frameworks in WSL 2 containers. In response to popular demand, Microsoft announced a new feature of the Windows Subsystem for Linux…
the-benchmarker/web-frameworks Which is the fastest web framework? Contribute to the-benchmarker/web-frameworks development by creating an account on GitHub.
dotnet/tye Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and ...
Pwned Passwords, Version 6 Today, almost one year after the release of version 5, I'm happy to release the 6th version of Pwned Passwords. The data set has increased from 555,278,657 known compromised passwords to a grand total of 572,611,621, up 17,332,964 (just over 3%). As with...
Machine learning on Azure for baseball decision analysis What-if analysis is a great use case for Azure machine intelligence techniques. Bart Czernicki, Principal Technical Architect with the Microsoft Machine Intelligence team, shows you how in his sample web app for baseball decision analysis based on ML.NET ...
CAP: Event Bus & Outbox Pattern This is a look at the project CAP which is an event bus that also implements the outbox pattern when implementing an event or message-based system.
New Azure maps make identifying local compliance options easy Countries around the world are placing more compliance requirements on organizations of all types, and customers want to more easily understand which compliance offerings are available in their…
How much do you need transactions? The most famous example about the use of transactions is the money transfer scenario. As money is shifted from one account to the other, we want to ensure th...
How to setup Visual Studio Codespaces for collaborative use In an ever-changing climate, we find ourselves working remotely, many organizations were not prepared for such a change. There has been a vast cultural shift, but also a technical shift. IT teams are now almost entirely remote, prior to that many teams ...
Refactoring optional chaining into a large codebase: lessons learned – Lea Verou Now that optional chaining is supported across the board, I decided to finally refactor Mavo to use it (yes, yes, we do provide a transpiled version as well for older browsers, settle down). This is a moment I have been waiting for a long time, as I think...
Making your data residency choices easier with Azure We understand that with Azure’s over 200 services, advances in architecture, and data protection promises, there are a lot of options available to customers. To help you make the right decisions, we have summarized the answers to your questions on Azure r...
Don't Code Tired | Configuring Custom Feature Filters with Azure App Configuration (Microsoft.FeatureManagement) Don't Code Tired - Jason Roberts on Software Development and .NET -
The June 2020 release of Azure Data Studio is now available - SQL Server Blog The June release of Azure Data Studio is now available. Download Azure Data Studio and review the release notes to get started. Note: After downloading Azure Data Studio, say Yes to enabling preview features so that you can use extensions. Azure Data Stud...
AgileMapper v1.7 Released AgileMapper 1.7 is now on NuGet with bug fixes, and some new options for configuring data sources.
Apple gave me the Hey treatment back in 2014 I’ve been reading the news this week about Hey, Apple, and in app purchases. Many people have offered their takes on the situation, and I can’t help but feel déjà vu.
This is why we need to #DoTheMath, even on "small" projects. — Strong Towns It’s easy for “maintaining” our public investments to become “upgrading” our public investments. Especially when there is money available. And especially when that money is borrowed.
The Australian Dream The remarkable story of Indigenous AFL legend Adam Goodes. Through the backdrop of Goodes' journey, the feature documentary explores race, identity and belonging in Australia today.
microsoft/WinDev A repo for developers on Windows to file issues that impede their productivity, efficiency, and efficacy - microsoft/WinDev
Workshop: Hack Yourself First: How to go on the Cyber-Offence - 1/2 - NDC Melbourne 2020 Module 1/4

 Cyber-attacks have become a reality of running software on the web today. We find ourselves under a constant barrage of malicious activity from hacktivists, online criminals and increasingly, nation states. Successful att...
The Return of the 90s Web Are we ready to revisit some of the ideas of the early web again? There are trends that suggest we might just have come full circle - and I like it.
Let's Encrypt: Senior Software Engineer Posted: June 18, 2020 Position Status: Open We’re making HTTPS easier for developers to use, we’re doing it at scale, and we need your help. We’re a first-of-our-kind Certificate Authority (CA). We make certificates available to anyone, for free, and we ...
Ask Troy Hunt your data protection questions at Redgate Streamed Post your burning data privacy and protection questions below to be in with the chance of winning some great prizes. Troy Hunt is one of the most respected security experts in the world and luckily for us, he's based in Australia.
No to .io, yes to .xyz! — Yarmo Mackenbach TL;DR: I openly urge all FOSS projects and startups to reconsider registering .io ccTLD domains, opting instead for truly generic TLDs like .xyz


DEBRSIGN(1) DEBRSIGN(1) NAME debrsign - remotely sign a Debian changes and dsc file pair using SSH SYNOPSIS debrsign [options] [user@]remotehost [changes-file|dsc-file] DESCRIPTION debrsign takes either an unsigned .dsc file or an unsigned .changes file and the associated unsigned .dsc file (found by replacing the architec‐ ture name and .changes by .dsc) if it appears in the .changes file and signs them by copying them to the remote machine using ssh(1) and remotely running debsign(1) on that machine. All options not listed below are passed to the debsign program on the remote machine. If a .changes or .dsc file is specified, it is signed, otherwise, debian/changelog is parsed to determine the name of the .changes file to look for in the parent directory. This utility is useful if a developer must build a package on one machine where it is unsafe to sign it; they need then only transfer the small .dsc and .changes files to a safe machine and then use the debsign pro‐ gram to sign them before transferring them back. This program automates this process. To do it the other way round, that is to connect to an unsafe machine to download the .dsc and .changes files, to sign them locally and then to transfer them back, see the debsign(1) program, which can do this task. OPTIONS -S Look for a source-only .changes file instead of a binary-build changes file. -adebian-architecture, -tGNU-system-type See dpkg-architecture(1) for a description of these options. They affect the search for the .changes file. They are provided to mimic the behaviour of dpkg-buildpackage when determining the name of the .changes file. --multi Multiarch changes mode: This signifies that debrsign should use the most recent file with the name pattern package_ver‐ sion_*+*.changes as the changes file, allowing for the changes files produced by dpkg-cross. --path remote-path Specify a path to the GPG binary on the remote host. --help, --version Show help message and version information respectively. Other options All other options are passed on to debsign on the remote machine. CONFIGURATION VARIABLES The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced in that order to set configuration variables. Command line options can be used to override configuration file settings. Environment variable settings are ignored for this purpose. The currently recognised variables are: DEBRSIGN_PGP_PATH Equivalent to passing --path on the command line (see above.) SEE ALSO debsign(1), dpkg-architecture(1) and ssh(1). AUTHOR This program was written by Julian Gilbey<EMAIL_ADDRESS>and is copy‐ right under the GPL, version 2 or later. DEBIAN Debian Utilities DEBRSIGN(1)


SSAO is one of those effects you never knew you needed and can't live without once you have it. It can take a scene from mediocre to wow! For fairly static scenes, you can bake ambient occlusion into a texture but for more dynamic scenes, you'll need a shader. SSAO is one of the more fairly involved shading techniques, but once you pull it off, you'll feel like a shader master.
By using only a handful of textures, SSAO can approximate the ambient occlusion of a scene. This is faster than trying to compute the ambient occlusion by going through all of the scene's geometry. These handful of textures all originate in screen space giving screen space ambient occlusion its name.
The SSAO shader will need the following inputs.
Storing the vertex positions into a framebuffer texture is not a necessity. You can recreate them from the camera's depth buffer. This being a beginners guide, I'll avoid this optimization and keep it straight forward. Feel free to use the depth buffer, however, for your implementation.
PT(Texture) depthTexture =
new Texture("depthTexture");
depthTexture->set_format
( Texture::Format::F_depth_component32
);
PT(GraphicsOutput) depthBuffer =
graphicsOutput->make_texture_buffer
( "depthBuffer"
, 0
, 0
, depthTexture
);
depthBuffer->set_clear_color
( LVecBase4f(0, 0, 0, 0)
);
NodePath depthCameraNP =
window->make_camera();
DCAST(Camera, depthCameraNP.node())->set_lens
( window->get_camera(0)->get_lens()
);
PT(DisplayRegion) depthBufferRegion =
depthBuffer->make_display_region
( 0
, 1
, 0
, 1
);
depthBufferRegion->set_camera(depthCameraNP);
If you do decide to use the depth buffer, here's how you can set it up using Panda3D.
Here's the simple shader used to render out the view space vertex positions into a framebuffer texture. The more involved work is setting up the framebuffer texture such that the fragment vector components it receives are not clamped to [0, 1]
and that each one has a high enough precision (a high enough number of bits). For example, if a particular interpolated vertex position is <-139.444444566, 0.00000034343, 2.5>
, you don't want it stored into the texture as <0.0, 0.0, 1.0>
.
// ...
FrameBufferProperties fbp = FrameBufferProperties::get_default();
// ...
fbp.set_rgba_bits(32, 32, 32, 32);
fbp.set_rgb_color(true);
fbp.set_float_color(true);
// ...
Here's how the example code sets up the framebuffer texture to store the vertex positions. It wants 32 bits per red, green, blue, and alpha components and disables clamping the values to [0, 1]
The set_rgba_bits(32, 32, 32, 32)
call sets the bits and also disables the clamping.
Here's the equivalent OpenGL call. GL_RGB32F
sets the bits and also disables the clamping.
If the color buffer is fixed-point, the components of the source and destination values and blend factors are each clamped to [0, 1] or [−1, 1] respectively for an unsigned normalized or signed normalized color buffer prior to evaluating the blend equation. If the color buffer is floating-point, no clamping occurs.
Here you see the vertex positions with y being the up vector.
Recall that Panda3D sets z as the up vector but OpenGL uses y as the up vector. The position shader outputs the vertex positions with z being up since Panda3D was configured with gl-coordinate-system default
.
You'll need the vertex normals to correctly orient the samples you'll take in the SSAO shader. The example code generates multiple sample vectors distributed in a hemisphere but you could use a sphere and do away with the need for normals all together.
in vec3 vertexNormal;
out vec4 fragColor;
void main() {
vec3 normal = normalize(vertexNormal);
fragColor = vec4(normal, 1);
}
Like the position shader, the normal shader is simple as well. Be sure to normalize the vertex normal and remember that they are in view space.
Here you see the vertex normals with y being the up vector.
Recall that Panda3D sets z as the up vector but OpenGL uses y as the up vector. The normal shader outputs the vertex positions with z being up since Panda3D was configured with gl-coordinate-system default
.
Here you see SSAO being used with the normal maps instead of the vertex normals. This adds an extra level of detail and will pair nicely with the normal mapped lighting.
// ...
normal =
normalize
( normalTex.rgb
* 2.0
- 1.0
);
normal =
normalize
( mat3
( tangent
, binormal
, vertexNormal
)
* normal
);
// ...
To use the normal maps instead, you'll need to transform the normal mapped normals from tangent space to view space just like you did in the lighting calculations.
To determine the amount of ambient occlusion for any particular fragment, you'll need to sample the surrounding area. The more samples you use, the better the approximation at the cost of performance.
// ...
for (int i = 0; i < numberOfSamples; ++i) {
LVecBase3f sample =
LVecBase3f
( randomFloats(generator) * 2.0 - 1.0
, randomFloats(generator) * 2.0 - 1.0
, randomFloats(generator)
).normalized();
float rand = randomFloats(generator);
sample[0] *= rand;
sample[1] *= rand;
sample[2] *= rand;
float scale = (float) i / (float) numberOfSamples;
scale = lerp(0.1, 1.0, scale * scale);
sample[0] *= scale;
sample[1] *= scale;
sample[2] *= scale;
ssaoSamples.push_back(sample);
}
// ...
The example code generates a number of random samples distributed in a hemisphere. These ssaoSamples
will be sent to the SSAO shader.
LVecBase3f sample =
LVecBase3f
( randomFloats(generator) * 2.0 - 1.0
, randomFloats(generator) * 2.0 - 1.0
, randomFloats(generator) * 2.0 - 1.0
).normalized();
If you'd like to distribute your samples in a sphere instead, change the random z
component to range from negative one to one.
// ...
for (int i = 0; i < numberOfNoise; ++i) {
LVecBase3f noise =
LVecBase3f
( randomFloats(generator) * 2.0 - 1.0
, randomFloats(generator) * 2.0 - 1.0
, 0.0
);
ssaoNoise.push_back(noise);
}
// ...
To get a good sweep of the sampled area, you'll need to generate some noise vectors. These noise vectors will randomly tilt the hemisphere around the current fragment.
SSAO works by sampling the view space around a fragment. The more samples that are below a surface, the darker the fragment color. These samples are positioned at the fragment and pointed in the general direction of the vertex normal. Each sample is used to look up a position in the position framebuffer texture. The position returned is compared to the sample. If the sample is farther away from the camera than the position, the sample counts towards the fragment being occluded.
Here you see the space above the surface being sampled for occlusion.
Like some of the other techniques, the SSAO shader has a few control knobs you can tweak to get the exact look you're going for. The bias
adds to the sample's distance from the camera. You can use the bias to combat "acne". The radius
increases or decreases the coverage area of the sample space. The magnitude
either lightens or darkens the occlusion map. The contrast
either washes out or increases the starkness of the occlusion map.
// ...
vec4 position = texture(positionTexture, texCoord);
vec3 normal = normalize(texture(normalTexture, texCoord).xyz);
int noiseX = int(gl_FragCoord.x - 0.5) % 4;
int noiseY = int(gl_FragCoord.y - 0.5) % 4;
vec3 random = noise[noiseX + (noiseY * 4)];
// ...
Retrieve the position, normal, and random vector for later use. Recall that the example code created a set number of random vectors. The random vector is chosen based on the current fragment's screen position.
// ...
vec3 tangent = normalize(random - normal * dot(random, normal));
vec3 binormal = cross(normal, tangent);
mat3 tbn = mat3(tangent, binormal, normal);
// ...
Using the random and normal vectors, assemble the tangent, binormal, and normal matrix. You'll need this matrix to transform the sample vectors from tangent space to view space.
With the matrix in hand, the shader can now loop through the samples, subtracting how many are not occluded.
// ...
vec3 samplePosition = tbn * samples[i];
samplePosition = position.xyz + samplePosition * radius;
// ...
Using the matrix, position the sample near the vertex/fragment position and scale it by the radius.
// ...
vec4 offsetUV = vec4(samplePosition, 1.0);
offsetUV = lensProjection * offsetUV;
offsetUV.xyz /= offsetUV.w;
offsetUV.xy = offsetUV.xy * 0.5 + 0.5;
// ...
Using the sample's position in view space, transform it from view space to clip space to UV space.
Recall that clip space components range from negative one to one and that UV coordinates range from zero to one. To transform clip space coordinates to UV coordinates, multiply by one half and add one half.
// ...
vec4 offsetPosition = texture(positionTexture, offsetUV.xy);
float occluded = 0;
if (samplePosition.y + bias <= offsetPosition.y) { occluded = 0; } else { occluded = 1; }
// ...
Using the offset UV coordinates, created by projecting the 3D sample onto the 2D position texture, find the corresponding position vector. This takes you from view space to clip space to UV space back to view space. The shader takes this round trip to find out if some geometry is behind, at, or in front of this sample. If the sample is in front of or at some geometry, this sample doesn't count towards the fragment being occluded. If the sample is behind some geometry, this sample counts towards the fragment being occluded.
// ...
float intensity =
smoothstep
( 0.0
, 1.0
, radius
/ abs(position.y - offsetPosition.y)
);
occluded *= intensity;
occlusion -= occluded;
// ...
Now weight this sampled position by how far it is inside or outside the radius. Finally, subtract this sample from the occlusion factor since it assumes all of the samples are occluded before the loop.
Divide the occluded count by the number of samples to scale the occlusion factor from [0, NUM_SAMPLES]
to [0, 1]
. Zero means full occlusion and one means no occlusion. Now assign the occlusion factor to the fragment's color and you're done.
For the demo's purposes, the example code sets the alpha channel to alpha channel of the position framebuffer texture to avoid covering up the background.
The SSAO framebuffer texture is noisy as is. You'll want to blur it to remove the noise. Refer back to the section on blurring. For the best results, use a median or Kuwahara filter to preserve the sharp edges.
// ...
vec2 ssaoBlurTexSize = textureSize(ssaoBlurTexture, 0).xy;
vec2 ssaoBlurTexCoord = gl_FragCoord.xy / ssaoBlurTexSize;
float ssao = texture(ssaoBlurTexture, ssaoBlurTexCoord).r;
vec4 ambient = p3d_Material.ambient * p3d_LightModel.ambient * diffuseTex * ssao;
// ...
The final stop for SSAO is back in the lighting calculation. Here you see the occlusion factor being looked up in the SSAO framebuffer texture and then included in the ambient light calculation.
(C) 2019 David Lettier
lettier.com


--- layout: post title: MozMIT makes its debut! date: 2014-07-15 07:15:12.000000000 -05:00 type: post parent_id: '0' published: true password: '' status: publish categories: - FIrefox tags: - firefox - mozmit - student ambassador meta: _edit_last: '1' _aioseop_opengraph_settings: a:8:{s:32:"aioseop_opengraph_settings_title";s:0:"";s:31:"aioseop_opengraph_settings_desc";s:0:"";s:36:"aioseop_opengraph_settings_customimg";s:0:"";s:37:"aioseop_opengraph_settings_imagewidth";s:0:"";s:38:"aioseop_opengraph_settings_imageheight";s:0:"";s:35:"aioseop_opengraph_settings_category";s:0:"";s:30:"aioseop_opengraph_settings_tag";s:0:"";s:34:"aioseop_opengraph_settings_setcard";s:7:"summary";} _aioseop_keywords: mozmit, firefox, student ambassador author: login: admin email<EMAIL_ADDRESS>display_name: Anna first_name: '' last_name: '' permalink: "/mozmit-makes-its-debut/" ---
The newest addition to the CSMIT family is the Mozilla team - “MozMIT” a spinoff of the Firefox student ambassador program, was started the semester before. Its primary objective is to prep students so that they can actively contribute to the open source community(Mozilla in particular) as opposed to being mere users.
Mozilla has a number of projects under its umbrella so contributions do not necessarily have to take the form of code. A writer? There are a lot of new features that require documentation. If you are bilingual, consider translating articles, guides, tutorials etc.(L10N). If graphic design is your forte we have a place for you as well.
An “introductory” session was held last saturday at the computer centre in MIT mostly for the benefit of the new team members(so they know what they’re getting into). The speakers were Mozillians who actively contributed to various projects in Mozilla, technical and nontechnical - Shashank Gaikaiwari (Localization), Nikhil Patel and Achyuth KP(Appmaker, Thimble and Popcorn) and Vikneshwar (Coding). Plus the mozilla rep/evangelist Shreyas Narayanan Kutty.
The session got off to a good start after the ice breaker.  The Mozilla rep brought along his shiny new tab (Firefox OS) courtesy Mozilla (one of the few perks of being a mozillain) and we had a thorough demo on how to contribute to Mozillas codebase by Vikneshwar. The allotted 2 hours was a bit of a squeeze and before we knew it, it was time for lunch. We split up after the rep gave all the new members cute mozilla badges. So in short, it was a fun and productive session.
MozMIT is still recruiting. Drop by for one of our sessions to get initiated :)


General Site Statistics
Total number of articles:
Total number of words in articles:
Total number of characters in articles:
Average number of words per article:
Average number of characters in a word:


CocoPerfect
ABOUT US
The Photographic Angle (TPA) is a charitable organisation with a dedicated team of permanent staff members who ensure that all of our exhibitions are curated, marketed, and installed to a high and consistent standard.
TEAM
Each member of the team brings with them a particular skill set that helps to transform otherwise unused buildings into venues that bring photography to life. We aim to enable the public to engage with our exhibition themes whilst at the same time gaining some valuable knowledge that can help them to improve their own photography skills and enhance their appreciation of the art and science of photography.
TRUSTEES
The Photographic Angle and the work that we do is overseen by our board of trustees who lend their skills and experience to our organisation. The majority are now retired but have previously held prominent positions in the worlds of academia, commerce, the professions and the arts.
AMBASSADORS
As our exhibitions tour around the country, we have created a comprehensive network of local representatives who are based in and around the areas where we host our events. They are able to use their knowledge of the local area in order to help us market and advertise our exhibitions to potential visitors. They also oversee the installation of the photographs at our various venues ensuring that each exhibition is in place and ready to receive visitors.


Interface CalculationTaskRunner
-
- All Superinterfaces:
AutoCloseable
public interface CalculationTaskRunner extends AutoCloseable
Component that provides the ability to run calculation tasks.This interface is the lower-level counterpart to
CalculationRunner
. It provides the ability to calculate results based onCalculationTasks
. Unless you need to optimize, theCalculationRunner
is a simpler entry point.The purpose of the runner is to produce a grid of results, with a row for each target and a column for each measure. The targets and columns that define the grid of results are passed in using an instance of
CalculationTasks
.The
CalculationTasks
instance is obtained using static factory method. It consists of a list ofCalculationTask
instances, where each task instance corresponds to a single cell in the grid of results. When theCalculationTasks
instance is created for a set of trades and measures some one-off initialization is performed. Providing access to the instance allows the initialization to occur once, which could be a performance optimization if many different calculations are performed with the same set of trades and measures.Once obtained, the
CalculationTasks
instance may be used to calculate results. The four "calculate" methods handle the combination of single versus scenario market data, and synchronous versus asynchronous.A calculation runner is typically obtained using the static methods on this interface. The instance contains an executor thread-pool, thus care should be taken to ensure the thread-pool is correctly managed. For example, try-with-resources could be used:
try (CalculationTaskRunner runner = CalculationTaskRunner.ofMultiThreaded()) { // use the runner }
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Results
calculate(CalculationTasks tasks, MarketData marketData, ReferenceData refData)
Performs calculations for a single set of market data.void
calculateAsync(CalculationTasks tasks, MarketData marketData, ReferenceData refData, CalculationListener listener)
Performs calculations asynchronously for a single set of market data, invoking a listener as each calculation completes.Results
calculateMultiScenario(CalculationTasks tasks, ScenarioMarketData marketData, ReferenceData refData)
Performs calculations for multiple scenarios, each with a different set of market data.void
calculateMultiScenarioAsync(CalculationTasks tasks, ScenarioMarketData marketData, ReferenceData refData, CalculationListener listener)
Performs calculations asynchronously for multiple scenarios, each with a different set of market data, invoking a listener as each calculation completes.void
close()
Closes any resources held by the component.static CalculationTaskRunner
of(ExecutorService executor)
Creates a calculation task runner capable of performing calculations, specifying the executor.static CalculationTaskRunner
ofMultiThreaded()
Creates a standard multi-threaded calculation task runner capable of performing calculations.
-
-
-
Method Detail
-
ofMultiThreaded
static CalculationTaskRunner ofMultiThreaded()
Creates a standard multi-threaded calculation task runner capable of performing calculations.This factory creates an executor basing the number of threads on the number of available processors. It is recommended to use try-with-resources to manage the runner:
try (CalculationTaskRunner runner = CalculationTaskRunner.ofMultiThreaded()) { // use the runner }
- Returns:
- the calculation task runner
-
of
static CalculationTaskRunner of(ExecutorService executor)
Creates a calculation task runner capable of performing calculations, specifying the executor.It is the callers responsibility to manage the life-cycle of the executor.
- Parameters:
executor
- the executor to use- Returns:
- the calculation task runner
-
calculate
Results calculate(CalculationTasks tasks, MarketData marketData, ReferenceData refData)
Performs calculations for a single set of market data.This returns a grid of results based on the specified tasks and market data. The grid will contain a row for each target and a column for each measure.
If the thread is interrupted while this method is blocked, calculations will stop and a result returned indicating the failed tasks, with the interrupted flag set. For additional control, use
calculateAsync(CalculationTasks, MarketData, ReferenceData, CalculationListener)
.- Parameters:
tasks
- the calculation tasks to invokemarketData
- the market data to be used in the calculationsrefData
- the reference data to be used in the calculations- Returns:
- the grid of calculation results, based on the tasks and market data
-
calculateAsync
void calculateAsync(CalculationTasks tasks, MarketData marketData, ReferenceData refData, CalculationListener listener)
Performs calculations asynchronously for a single set of market data, invoking a listener as each calculation completes.This method requires the listener to assemble the results, but it can be much more memory efficient when calculating aggregate results. If the individual results are discarded after they are incorporated into the aggregate they can be garbage collected.
- Parameters:
tasks
- the calculation tasks to invokemarketData
- the market data to be used in the calculationsrefData
- the reference data to be used in the calculationslistener
- listener that is invoked when individual results are calculated
-
calculateMultiScenario
Results calculateMultiScenario(CalculationTasks tasks, ScenarioMarketData marketData, ReferenceData refData)
Performs calculations for multiple scenarios, each with a different set of market data.This returns a grid of results based on the specified tasks and market data. The grid will contain a row for each target and a column for each measure. Each cell will contain multiple results, one for each scenario.
If the thread is interrupted while this method is blocked, calculations will stop and a result returned indicating the failed tasks, with the interrupted flag set. For additional control, use
calculateMultiScenarioAsync(CalculationTasks, ScenarioMarketData, ReferenceData, CalculationListener)
.- Parameters:
tasks
- the calculation tasks to invokemarketData
- the market data to be used in the calculationsrefData
- the reference data to be used in the calculations- Returns:
- the grid of calculation results, based on the tasks and market data
-
calculateMultiScenarioAsync
void calculateMultiScenarioAsync(CalculationTasks tasks, ScenarioMarketData marketData, ReferenceData refData, CalculationListener listener)
Performs calculations asynchronously for multiple scenarios, each with a different set of market data, invoking a listener as each calculation completes.This method requires the listener to assemble the results, but it can be much more memory efficient when calculating aggregate results. If the individual results are discarded after they are incorporated into the aggregate they can be garbage collected.
- Parameters:
tasks
- the calculation tasks to invokemarketData
- the market data to be used in the calculationsrefData
- the reference data to be used in the calculationslistener
- listener that is invoked when individual results are calculated
-
close
void close()
Closes any resources held by the component.If the component holds an
ExecutorService
, this method will typically callExecutorService.shutdown()
.- Specified by:
close
in interfaceAutoCloseable
-
-