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
/** | |
* Assume this is syntactically the same as the fetch API with the application/json header | |
* This mock fetch call has three outputs: | |
* | |
* If no cursor is given it returns a response with data: ['a', 'b', 'c'] | |
* and a cursor string of VALID_CURSOR. | |
* If it is given the VALID_CURSOR it returns data: [ 'd', 'e' ]. | |
* If its given an invalid cursor it will return an error 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
import React, {useLayoutEffect} from 'react' | |
import useRN5Back from './useRN5Back' | |
export default function Example({navigation}) { | |
const [headerLeft, onBack] = useRN5Back(navigation, () => { //note any variables here | |
console.log('I am doing cleanup before onBack!') | |
}) | |
useLayoutEffect(() => { | |
navigation.setOptions({headerLeft}); |
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
diff --git a/YEP_EnhancedTP.js b/SIV_EnhancedTP.js | |
index 0c5a4bf..58ca159 100644 | |
--- a/YEP_EnhancedTP.js | |
+++ b/SIV_EnhancedTP.js | |
@@ -2854,6 +2854,10 @@ Game_BattlerBase.prototype.initTpMode = function() { | |
this._tpMode = this.enemy().tpMode; | |
this._unlockedTpModes = this.enemy().unlockedTpModes.slice(); | |
} | |
+ if (this.pendingInit.length) { | |
+ this._unlockedTpModes = this._unlockedTpModes.concat(this.pendingInit) |
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 {getCurrentWeek} from 'weekSolution'; | |
// Friday: -2 | |
getCurrentWeek(-2) | |
// Saturday: -1 | |
getCurrentWeek(-2) | |
// Sunday: 0 | |
getCurrentWeek(0) |
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 React from 'react'; | |
import AsyncComponent from './AsyncComponent' | |
// call this.getAsyncComponent(path) to get a default export. | |
// call this.getAsyncComponent(path, specifier) to get a non-default export. | |
class App extends AsyncComponent { | |
render() { | |
let view; |
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 would be the start of what is now the 'inApp' runner | |
Herald._runners['mongo'] = function (message, options) { | |
if (!options.collection || !options.collection.insert) { | |
throw new Meteor.Error('Herald - mongo runner', 'No Mongo.Collection found, please set it in your defaults'); | |
} | |
if (!options.userId) { | |
throw new Meteor.Error('Herald - mongo runner', 'You must give a user id'); | |
} | |
options.collection.insert({ | |
message: this.message, |
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
myLookupObj = {}; | |
//for each might not exits, you may need to use a for loop | |
[“member1”, “member2”, “member3”].forEach(function () { | |
myLookupObj[key] = 'location'; | |
}); | |
//then continue as you have been | |
myLookupObj[“member2”] //-> 'location' |
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
<template name='form'> | |
<input name='email' value={{email}}> | |
{{#with validate 'email'}} | |
{{message}} | |
{{/with}} | |
</template> |
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
var pushConfiguration = null; | |
testRunner = function (notification, user) { | |
if(!pushConfiguration) | |
{ | |
Push.debug = this.debug || false; | |
pushConfiguration = Push.Configure({ | |
gcm: { | |
apiKey: this.gcm, | |
}, |