Questions tagged [dynamic-loading]
Code that loads code at runtime for execution
67 questions
2
votes
1
answer
155
views
Python preprocessor for pipes
I wrote this preprocessor just to add a couple features to Python (pipes mostly.) Is there any way I could improve it?
...
2
votes
1
answer
149
views
Script that uses an uploaded excel file to import data to the database
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 ...
3
votes
1
answer
393
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....
2
votes
1
answer
93
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 ...
2
votes
1
answer
99
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.
...
1
vote
1
answer
505
views
Constructing routes from imported URL constants
There is a file created with the project paths in a dictionary.
Example:
...
1
vote
1
answer
183
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 ...
3
votes
2
answers
1k
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. ...
1
vote
1
answer
94
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 ...
5
votes
1
answer
2k
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, ...
2
votes
0
answers
326
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 ...
4
votes
1
answer
226
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:
...
3
votes
1
answer
169
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 ...
4
votes
0
answers
67
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 ...
11
votes
4
answers
7k
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 ...
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 ...
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 ...
4
votes
1
answer
449
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,...
2
votes
0
answers
154
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 management:...
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 ...
2
votes
1
answer
102
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 ...
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.
...
1
vote
1
answer
2k
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 ...
14
votes
1
answer
398
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 ...
0
votes
2
answers
511
views
Dynamic loading of Javascript dependency graph
I have JavaScript module for loading dynamically script files by dependency graph:
...
3
votes
1
answer
222
views
Google Guice module that loads two kinds of views
The code of my Guice Module looks like this:
...
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 ...
3
votes
1
answer
999
views
SAFEARRAY export from a C++ DLL to VBA
My code is not very elegant, but I'm a total newbie in c++ and I consider it already a major achievement that I managed to write something that actually works.
As background, I'm defining in VBA the ...
6
votes
4
answers
3k
views
Importing multiple worksheets
I use the following code to import multiple worksheets from another workbook and do some processing. The importing time is too long. Can anyone suggest a more efficient way to import? Should I be ...
8
votes
0
answers
377
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++ ...
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). ...
2
votes
1
answer
269
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. ...
4
votes
1
answer
527
views
4
votes
1
answer
337
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
...
1
vote
1
answer
345
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
class ...
4
votes
1
answer
169
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 ...
3
votes
3
answers
188
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 ...
3
votes
1
answer
105
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 ...
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 ...
3
votes
1
answer
140
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 ...
3
votes
1
answer
449
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 ...
2
votes
2
answers
490
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 ...
8
votes
1
answer
128
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 ...
5
votes
1
answer
119
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 ...
3
votes
1
answer
227
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 ...
4
votes
1
answer
72
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. ...
3
votes
1
answer
856
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
...
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:
...
6
votes
1
answer
57k
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 ...