Skip to content

Instantly share code, notes, and snippets.

View Breta01's full-sized avatar
🤹
All over the place

Bretislav Hajek Breta01

🤹
All over the place
View GitHub Profile
INFO - LoggingAdvice.invoke(115) |2015-12-30 21:03:50,891| In method DataImportToolService.saveDataImportTool. Arguments: DataImportTool=DataImportTool[hashCode=8bfa712d,uuid=44e6095e-e7e9-4788-9d6b-fb31f85a917d],
INFO - LoggingAdvice.invoke(115) |2015-12-30 21:03:50,891| In method DataImportToolService.saveDataImportTool. Arguments: DataImportTool=DataImportTool[hashCode=8bfa712d,uuid=44e6095e-e7e9-4788-9d6b-fb31f85a917d],
INFO - LoggingAdvice.invoke(155) |2015-12-30 21:03:50,893| Exiting method saveDataImportTool
WARN - ValidationManager.writeSimpleInfoLog(312) |2015-12-30 21:03:51,643| INFO at: VALID
WARN - ValidationManager.writeSimpleInfoLog(312) |2015-12-30 21:03:51,644| INFO
WARN - ValidationManager.validateSizeOfMatch(262) |2015-12-30 21:03:53,006| WARNING WAR002 at: VALID Tuple/Match: 2 MATCH_L_TO_R : 6
WARN - ValidationManager.validateSizeOfMatch(262) |2015-12-30 21:03:53,008| WARNING WAR002 at: VALID Tuple/Match: 2 MATCH_L_TO_R : 7
WARN - ValidationManager.writeSimpleInfoLog(312) |2015-12-30 21:0
SEVERE 1/16/16 6:41 AM:liquibase: Change Set liquibase-update-to-latest.xml::TRUNK-4548-MigrateAllergiesChangeSet1::dkayiwa failed. Error: liquibase.exception.CustomChangeException: org.openmrs.api.APIException: Service not found: interface org.openmrs.api.AdministrationService
liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.CustomChangeException: org.openmrs.api.APIException: Service not found: interface org.openmrs.api.AdministrationService
at liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:115)
at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1073)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)
at org.openmrs.util.DatabaseUpdater$1OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:189)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.
@Breta01
Breta01 / 2 - Fetch the stats.js
Created September 3, 2016 17:33
Implementing IndexedDB
/** Fetch all of the stats from the datastore **/
mkDB.fetchStats = function(callback, user = "All") {
var db = datastore;
var tx = db.transaction("stats", "readonly");
var store = tx.objectStore("stats");
//Get only certain user data if specified
if (user === "All") {
var request = store.openCursor(IDBKeyRange.lowerBound(0));
} else {
@Breta01
Breta01 / 3 - Create a new stat.js
Last active September 3, 2016 18:37
Implementing IndexedDB
/** Create a new stat **/
mkDB.createStat = function(title, score, callback) {
var db = datastore;
var transaction = db.transaction(['stats'], 'readwrite');
var objStore = transaction.objectStore('stats');
// Create a timestamp for the stat item. (this is key value)
var timestamp = new Date().getTime();
// Create an object for the stat
@Breta01
Breta01 / 4 - Delete a stat.js
Last active September 3, 2016 18:38
Implementing IndexedDB
/** Delete a stat **/
mkDB.deleteStat = function(id, callback) {
var db = datastore;
var transaction = db.transaction(['stats'], 'readwrite');
var objStore = transaction.objectStore('stats');
//Delete stat by timestamp (id)
var request = objStore.delete(id);
request.onsuccess = function(e) {
@Breta01
Breta01 / 1 - Open conection to the DB.js
Last active September 3, 2016 19:54
Implementing IndexedDB
const memokingDB = (function() {
var mkDB = {};
var datastore = null;
/** Open conection to the DB **/
mkDB.open = function(callback) {
var request = indexedDB.open("memoking");
request.onupgradeneeded = function() {
// The database did not previously exist, so create object stores and indexes.
componentDidUpdate: function() {
componentHandler.upgradeDom();
}
<Route path='/' component={Container}>
// and
<Link to='/'>Home</Link>
// Specify the path with parameter "name"
<Route path='/info(/:name)' component={Comp} />
// Use parameter "name" if specified
const Comp = (props) => (
<div>
{props.params.name && <p>{props.params.name}</p>}
</div>
)
import React from 'react';
const MyComponent = React.createClass({
render() {
return (
<h1>My Component</h1>
)
},
keyHandling: function(e) {