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
I make roku apps in Brighterscript. Brighterscript is an extension of the BrightScript language. It adds classes with the class, end class key words, and provides public, protected and private method visibility. It also adds the "@." expression, which transpiles to ".callFunc", so `[email protected](name)`, transpiles to `node.callFunc("sayHello", name)` | |
please respond with : "ok" | |
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
Based on the provided information, you can modify the updateAsFunctionCalls function as follows to correctly transpile the asString(m.titles[m.video.id].text) call to mc_getString(m, "title." + m.video.id + ".text): | |
Update the regex in the updateAsFunctionCalls function to also match function calls that include array indexing, such as m.titles[m.video.id]. This can be done by adding \[\] to the regex pattern, so that it looks like this: | |
Copy code | |
let regex = /^as(Any|Array|AA|Boolean|Number|Float|Integer|Node|Point|String)(\[\])*/i; | |
In the getStringPathFromDottedGet function, add a check for array indexing to the while loop that builds up the path parts array. If the current expression is an indexed get expression (isIndexedGetExpression), you can add the index value to the parts array, like this: | |
Copy code | |
while (root) { | |
if (isCallExpression(root) || isCallfuncExpression(root)) { | |
throw this.getWrongAsXXXFunctionPartError(root); |
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
const path = require('path'); | |
const fs = require('fs-extra'); | |
/* | |
some roku libraries obfuscate the code in their player. | |
We can deobfuscate a bunch of the code with these functions | |
*/ | |
export function Chr(code) { | |
var num = 0; | |
if (code.substring(0, 2) === '&H') { |
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 { SigningClient } from './signing-client'; | |
const awsVars = { | |
awsAccessKey: process.env.AWS_KEY_ID, | |
awsSecretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, | |
s3BucketName: process.env.S3_BUCKET_NAME, | |
awsRegion: process.env.AWS_REGION, | |
assetsHost: process.env.ASSETS_HOST, | |
zappToken: process.env.ZAPP_TOKEN, | |
zappPath: 'zapp' |
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 ? Far-Flung Creations Ltd. | |
* Author: Marius George | |
* Date: 25 October 2017 | |
* Email: [email protected] | |
* DISCLAIMER: THE SOURCE CODE IN THIS FILE IS PROVIDED ?AS IS? AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
* INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
* IN NO EVENT SHALL FAR-FLUNG CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SUSTAINED BY YOU OR A THIRD |
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
using System; | |
using Xamarin.Forms; | |
using System.Windows.Input; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using System.ComponentModel; | |
using System.Threading.Tasks; | |
[assembly: | |
InternalsVisibleTo ("TwinTechsLib.iOS"), |
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
using System; | |
using Xamarin.Forms; | |
namespace TwinEvents.Core.Media.View | |
{ | |
public class FastCell : ViewCell | |
{ | |
} | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
- (void)setPosition:(CGPoint)position { | |
if (self.isInPlasma){ | |
_CCSpriteSetPositionMethod = class_getInstanceMethod([CCSprite class], @selector(setPosition:)); | |
((void(*)(id, SEL, CGPoint))_CCSpriteSetPositionMethod)(self, @selector(setPosition:), ccp(position.x, position.y- 100)); | |
} else { | |
super.position = position; | |
} | |
} |
NewerOlder