Code that loads code at runtime for execution

learn more… | top users | synonyms

3
votes
1answer
134 views

HTML and JS to dynamically load, refresh, and execute JavaScript from external file

The following code is designed to load and refresh JavaScript code from an external file sandbox.js and allow it to be refreshed dynamically and executed without ...
3
votes
1answer
38 views

Filter, Validate, and Generate Redbean models programmatically

A while ago, I wrote my first Composer Package. The purpose is to completely avoid the tedious work of filtering and validating user input then constructing the model. I have questions about multiple ...
2
votes
2answers
185 views

MVC controller / PHP request dispatcher

After getting the requested controller from the URI request, it checks whether this exists and whether the requested method (default index) exists within that controller, then calls them. My ...
2
votes
1answer
87 views

PHP include page index.php?page=GET safety preg_replace

I found a lot of working codes to include page in page on Internet but I could not find a safe code. So I decided to create one myself. The pages will be only stored in folder /pages/ and whitelist ...
10
votes
2answers
96 views

Test runner for Scala problems

I'm learning Scala and could use another set of eyes on the code below. I'm creating a test runner for the 99 scala problems set. I figure between actually solving the problems and working through the ...
3
votes
2answers
522 views

List all classes in a package directory

I have a package directory pkg with several classes that I would like to build into a convenient dict property. The structure ...
6
votes
3answers
520 views

I command thee: do SOMETHING

I am currenly contributing to a Chat-Bot to be used across the whole SE-Network's chat which is implemented in Java 8. This bot is supposed to have commands. These commands again are supposed to be ...
2
votes
3answers
157 views

Just require a file, or check if_readable first?

I'm writing a simple front controller, index.php is the main file. In my index.php, first thing loaded is ...
5
votes
2answers
208 views

Function autoloading in bash

I'm wondering if anyone can code review my code below. That's the core code of my little framework for bash in GitHub. ...
2
votes
1answer
2k views

JavaScript modules loading with eval()

I recently asked to use eval() for a module function. Now I ended up doing a very weird function which does what I want. I like the idea I made it but I'm not so ...
2
votes
1answer
213 views

Generated Code Proxy

In my library Transfuse I use a code generator to build a handful of classes that look up resources. Each of these look up classes are proxied by a static utility class so they may be referenced ...
5
votes
1answer
5k views

Loading JavaScript files asynchronously

I need to get some scripts from the different social networking site and cache them. I want the function to be asynchronous, and non-blocking. I have settled with a script, but I am not really sure ...