Questions tagged [dynamic-loading]

Code that loads code at runtime for execution

Filter by
Sorted by
Tagged with
1 vote
1 answer
97 views

Is there any sugestions how to make this script faster if its possible?

I wrote a script that uses an uploaded excel file to import data to the database. It checks for the image first if it can be downloaded without any error then insert the rest of the data. With ten or ...
Benjji's user avatar
  • 11
3 votes
1 answer
288 views

Load and execute shared library

This is my attempt to load shared library on linux (and may be mac - did not test yet) I am interested if I am implementing everything correctly and if I can really use my function in a loop like that....
Nick's user avatar
  • 1,582
2 votes
1 answer
65 views

UPDATE #1: Lengthening the time it takes to access files using function hooking

https://github.com/speedrun-program/load_extender This is the previous post: Lengthening the time it takes to access files using function hooking I tried adding everything from the previous post's ...
my_stack_exchange_account's user avatar
2 votes
1 answer
67 views

Lengthening the time it takes to access files using function hooking

https://github.com/speedrun-program/load_extender This is something I made and posted here about a year ago, but I decided to remake it. To compile this on Windows, you need to install EasyHook. ...
my_stack_exchange_account's user avatar
1 vote
1 answer
452 views

Constructing routes from imported URL constants

There is a file created with the project paths in a dictionary. Example: ...
Javier's user avatar
  • 113
1 vote
1 answer
128 views

PHP autoloader that uses array of file paths

After doing much reading of the PHP docs and trying out other developers' autoloader code, below is what I've come up with for an autoloader. It is working as expected so far. Posting the code here ...
knot22's user avatar
  • 357
1 vote
0 answers
506 views

Get & change file names from folder

This was originally posted as a Stack Overflow answer. Objective Import all filenames from a folder & change the filename using a mapping table. Challenge As described in the original posting, ...
JasonC's user avatar
  • 11
3 votes
2 answers
916 views

Accessing multiple dynamic libraries with the same extern C methods

I have multiple pre-compiled dynamic libraries that use the same extern "C" function names. The functions can behave differently for each dynamic library. ...
Greg's user avatar
  • 443
0 votes
1 answer
61 views

Multiple CSV Imports with Pandas

I have a class that is importing a CSV file into a Pandas DataFrame. However, this CSV has a multiline header that changes length seemingly at random. Sometimes it is 27 lines, sometimes 31, sometimes ...
GalacticPonderer's user avatar
5 votes
1 answer
1k views

Python factory class with dynamic imports

I'm trying to write a factory class that essentially provides a user-friendly frontend to creating objects of different kinds depending on keywords. So the user will just have to import this module, ...
Seamus's user avatar
  • 151
2 votes
0 answers
284 views

How should I go about implementing rust into the unity3d engine?

Recently, I've explored using rust as a scripting language for unity. My current method involves creating a DLL from rust, and loading it into my game at runtime. It requires that the user use a ...
Dimitri Bobkov's user avatar
4 votes
1 answer
155 views

DynamicClass - loads and instantiates classes at run-time

I needed to dynamically load and instantiate some classes from a generated jar and a generated .class file which depends on that jar. So I came up with this: ...
Hawk's user avatar
  • 216
3 votes
1 answer
117 views

Efficient, typesafe runtime selection between "compiler-checked" sets of static config constant

Motivation / Task An apparently trivial problem.... A CLI app tries to make use of box drawing characters. But depending on the stdout device this may not be appropriate so there is a ...
Oliver Schönrock's user avatar
4 votes
0 answers
54 views

Python automatic import and install script

In the following script, I am trying to infer if the modules are managed by a conda environment or not and based on that, I am trying to auto install and import the modules. [I skipped around 5 to 6 ...
ShellZero's user avatar
  • 205
11 votes
4 answers
6k views

Skipping over failed imports until they are needed (if ever)

We have a program with many dependencies. Because the user may not want to use all of them, the program should skip over failed imports and only raise an error if absolutely necessary. e.g. if the ...
QuantumChris's user avatar
  • 1,385
6 votes
4 answers
2k views

Dynamically loading CSS files based on URL or URI in PHP

I have written out the following code in the head section of my document, which should load 3 separate style sheets for each page based on the URL/URI that the user is visiting. It is working as ...
Ryan Stone's user avatar
1 vote
1 answer
1k views

Importing modules for private use in Python [closed]

There's something I completely dislike when importing a module in an interactive Python shell, typing the name of the module, hitting tab and getting the automatic completion cluttered with other ...
fortran's user avatar
  • 137
4 votes
1 answer
380 views

Making a graph of the import structure of a program

When I read other people's code, it's sometimes difficult to understand the import structure. I thought making a graph of the import structure of a given python program would be a fun programming task,...
Tom C's user avatar
  • 203
2 votes
0 answers
134 views

Parse Mach-O binding info

I wrote this C program to open a Mach-O executable/framework and parse the external symbols along with their respective framework/library. A few things I would like to get better at: Memory ...
JLegendre's user avatar
  • 121
4 votes
2 answers
1k views

PHP Autoloader - For classes, traits and interfaces

Please review my Autoloader, which is the first file included in index.php Note that there is no resource with the same name for trait, interface and class. Each resource has it's own name. And even ...
Andrei's user avatar
  • 51
2 votes
1 answer
79 views

Move debug functions to two DLL's

When programming debug functions I am left with 2 options, either put them all within preprocessor blocks so that they don't exist at release runtime, or put them within an if block with a debug flag ...
vandench's user avatar
  • 153
3 votes
2 answers
4k views

C++ DLL Injector

I made a DLL Injector in C++. It provides multiple functionalities. What could be added or improved in the code? It works well as far as I've used it. ...
I like to code's user avatar
1 vote
1 answer
1k views

Script to load other .js scripts

I made a simple script to load other scripts into the page without worrying about caching. It's meant to be used by a considerable amount of people, so I would like it to be as clean as possible, and ...
Artur Trapp's user avatar
13 votes
0 answers
330 views

Code to fill PE import address table

I wrote a program to test AV engines against encryption. When it runs, it will compute some key, decrypt an executable it has in its data section and copy it to the locations where the executable ...
Douglas's user avatar
  • 859
0 votes
2 answers
440 views

Dynamic loading of Javascript dependency graph

I have JavaScript module for loading dynamically script files by dependency graph: ...
sDima's user avatar
  • 849
3 votes
1 answer
199 views

Google Guice module that loads two kinds of views

The code of my Guice Module looks like this: ...
guicy's user avatar
  • 31
3 votes
1 answer
1k views

Managing dynamic loading of dependent JavaScript files with automatic versioning

I have written a solution for managing dynamic loading of dependent JavaScript files (or executing JS functions) coupled with automatic versioning to refresh browser cache. The goal was to be able to ...
mseifert's user avatar
  • 185
8 votes
0 answers
350 views

.NET DLL Injector in C++

I built a DLL Injector with User-Interface. The program lists all processes, the user chooses one of them and a DLL, and inject it. It's my first project in C++, and I know it's not exactly C++ ...
Gil Mans's user avatar
2 votes
1 answer
2k views

Recursive autoloader to find PHP files

I created a small working autoloader based on some of the answers and ideas found on Stack Exchange (I lost the reference). However, I don't know much about PHP (I mainly know C, a bit C++ and Java). ...
Name's user avatar
  • 237
2 votes
1 answer
189 views

Auto loading code

I'm new to PHP and I didn't know there is something called coding style standards. Now I'm trying to stick to PSR coding style standards and after reading PSR-4, which is about autoloading standards. ...
Accountant م's user avatar
3 votes
1 answer
497 views

Dynamic module import in Python with exception handling

...
boot-scootin's user avatar
4 votes
1 answer
316 views

"import translate" in a way that works with Python 2 and 3

I'm trying to make my script cross-Python (Python 2 and 3 compatible), and to solve an import problem I did this: __init__.py file ...
mou's user avatar
  • 281
1 vote
1 answer
314 views

Decoupled chain of responsibility in Python

I've started to learn Python today. I'm trying to write decoupled middleware or chain of responsibility pattern. In my app I have some two classes: abstract class or interface named Processable ...
xcono's user avatar
  • 19
4 votes
1 answer
140 views

Simple import system for a large shell program

I am writing a large shell program comprised of several source files. I was looking for a basic import system that accomplishes three goals. Avoid sourcing entire files for access to just a few ...
arctelix's user avatar
  • 271
3 votes
3 answers
136 views

Loading modifications at runtime

I'm working on a game engine among other things in Java, and would like to know how to optimise my code, as it is ridiculously ugly and bloated. I'm terrible with operating the ...
user avatar
3 votes
1 answer
72 views

Method injection into TestClass local namespace for automatic generation of Python unittest "test_xxx" methods

I am writing a series of unit tests in Python 3.5 unittest, which run the exact same test methods on different datasets. The purpose is to validate proper behavior ...
hBy2Py's user avatar
  • 247
5 votes
3 answers
1k views

Eval is evil: Dynamic method calls from named regex groups in Python 3

I'm working on a simple dice roller for a Python IRC bot. The particular game this roller is for uses six different kinds of dice, which I've defined using a simple base class, and created six ...
Mikey T.K.'s user avatar
3 votes
1 answer
126 views

Autoloader class for PHP

I created a class that I plan on using to autoload my project classes (20-30 classes) maximum. I wonder if there is anything, anything at all, that I can improve on this class to improve it any ...
Daniel Barrow's user avatar
3 votes
1 answer
410 views

Reverse Polish notation calculator similar to dc on Unix/Linux systems using dynamic libraries

This problem is using dynamic libraries so that additional calculator functions can be added by dropping a library into a specific directory. What I'd like to get out of this code review is: What do ...
pacmaninbw's user avatar
  • 23.8k
2 votes
2 answers
461 views

Python exception handler to recommend package

Consider this python 3 snippet, where when an import exception is raised, a string 'e' is created that says: "No module named ' packageName'". The goal is to simply say on exit, that the import error ...
j0h's user avatar
  • 139
8 votes
1 answer
87 views

Implementing Multi-File Programs in Vitsy

I'm the proud owner of the Vitsy programming language, which I've been working on for some time (except recently, because high school). It's only been used in PPCG so far, but I hope to expand it to ...
Addison Crump's user avatar
5 votes
1 answer
92 views

Loading DLLs to produce reports

My application relies on an unknown number of DLLs that each produce a report. The only thing that is known in advance is the location of the files and the classes that each will contain, including ...
DonBoitnott's user avatar
3 votes
1 answer
208 views

JavaScript Script/CSS Loader Plugin

I wrote a basic JavaScript plugin that allows you to specify what specific JavaScript files and CSS files to be loaded in, and in addition specify attributes for each file. To specify where to load ...
user avatar
4 votes
1 answer
54 views

Memory mapped classpath HttpServlet

I have a single page application where the resources sit on the classpath. Any request for a resource that doesn't exist should redirect to the index.html page. ...
Cheetah's user avatar
  • 171
1 vote
0 answers
857 views

PHP autoload class design for a framework

I'm developing a php framework called Stack. I just created the autoload.php as follows. ...
underscore's user avatar
3 votes
1 answer
827 views

Simple Python plugin loader

I have written a simple system to load plugins from files in Python 2.7, and I'd like to see if any of it can be improved upon. vedo.py ...
Jack Wilsdon's user avatar
  • 1,651
10 votes
4 answers
7k views

ASCII art generator in C

I have written an ASCII art generator library. I was practicing data abstraction and code abstraction and I wanted to know if there is something that can be improved. File tree: ...
u185619's user avatar
  • 815
6 votes
1 answer
56k 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 ...
bwDraco's user avatar
  • 163
3 votes
1 answer
292 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 ...
r3wt's user avatar
  • 472
3 votes
2 answers
2k 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 ...
Jack hardcastle's user avatar