dynamic-loading

Can I access to symbols of the host process from a shared object loaded in runtime? Any alternative?

倾然丶 夕夏残阳落幕 提交于 2020-01-02 07:26:45
问题 In my scenario I want a plugin, which is a shared object loaded in runtime, to access symbols from the “host application” so I can add any functionality to my application. I have tried but have not found any way to do this and I have no clue on whether this is possible or not. So, can I do this somehow or is there any alternative that applications that use plugins use? I am on Fedora 15, Linux 2.6.4. However, I hope the solution will be cross-platform. 回答1: There are three main approaches:

Android dynamic loading list view onScrollListener issues

两盒软妹~` 提交于 2019-12-29 08:51:36
问题 I have implemented a list view, every user scroll to bottom screen, it auto add new data to list view Once the scroll has completed, onScroll() call for every new item that enters the displaying view, from the beginning to the end of the scrolling. lv_best = (ListView) findViewById(R.id.lv_best); bestadapter = new LazyAdapter(this, lst_tab_best); lv_best.setAdapter(bestadapter); lv_best.setOnScrollListener(new AbsListView.OnScrollListener() { @Override public void onScrollStateChanged

Is it bad to enable Dead Code Stripping?

*爱你&永不变心* 提交于 2019-12-21 16:48:32
问题 My iOS project uses dlsym to dynamically point to an optional C library. Optional as-in the project can run with our without it, it just adds features. For background info: Detect and use optional external C library at runtime in Objective-C The problem is, XCode cleans up libraries that are "not used". Using dlsym means there are no direct references to my 3rd party library and XCode removes it. I thought I found a solution, in "Other Linker Flags" I added -force_load "$(SRCROOT)/my_external

Progress of loading external JS file

萝らか妹 提交于 2019-12-21 12:26:01
问题 I'm not sure what this would be called to know what to search for, if this is a duplicate please link me :) Is it possible in JavaScript in a browser, to load an external file (this bit is easy), but given that the external file could be rather large (say 50MB) show a progress indicator of the loading of that file? i.e I, knowing the serverside size of the file, not knowing the gzip size, I want to say X% of file loaded. I've not tried anything, I can't find anything to work from let alone

Ajax - limit the loading of a list and then load the rest on scroll

落爺英雄遲暮 提交于 2019-12-21 05:48:13
问题 I have a store that shows all products of a category on one page (and this is how the owner likes it so pagination is not an option). To improve load time on some heavy categories, I'm hoping to implement a scrip which will load a number of products <li>s and then on page scroll, load another set. The page is generated with this structure <div id="CategoryContent"> <ul class="ProductList"> <li class="Odd">Product</li> <li class="Even">Product</li> <li class="Odd">Product</li> <li class="Even"

Dynamically loading classes (with custom behavior) from different assemblies?

浪子不回头ぞ 提交于 2019-12-21 02:41:19
问题 We are building an app for few customers, each has its own requirements along with the similar ones. We also want to keep all the code in the same app, not branch it, and the IFs is not good choice since it will be all over places. I plan having the base classes for all. Then each customer will have its own class in which the override methods will do special logic. How can we load the assemblies when compiling instead of doing this public class BaseClass { public string getEventId() } public

Max number of appdomains loaded in one process

帅比萌擦擦* 提交于 2019-12-19 19:58:04
问题 Since dynamic assembly loading requires appdomain loading to enable killing the assembly with unloading related appdomain, is there a "max" number appdomains in a process to be loaded? I am thinking of a server based application that each user can run his proprietary C# code dynamically. But what if, say, 2000 users log in and load their codes? Are there any possible restrictions I might encounter besides the number of appdomians? thanks. 回答1: Almost all CLR limits are based on "as memory

Dynamic Loading Without extern “C”

喜欢而已 提交于 2019-12-19 03:15:37
问题 I'd like to use libdl to dynamically load C++ in general. The problem is identifying symbols at runtime that have been name mangled. As described here, one solution is to remove name mangling by using extern "C". http://www.tldp.org/HOWTO/C++-dlopen/theproblem.html This solution has the drawback of limiting dynamically loaded resources to C style interfaces. Dynamically loaded functions cannot, for instance, be overloaded functions. What is a good way to overcome this limitation? One possible

tiny mce can't be inited when load js dynamically

那年仲夏 提交于 2019-12-18 12:39:24
问题 i am having trouble with tinyMCE, when i put <script type="text/javascript" src="/scripts/tiny_mce/tiny_mce.js"> to <head> , and put init code before the <textarea class="tinyMceEditor"> , it works fine. the init code is like this: tinyMCE.init({ mode : "specific_textareas", editor_selector : "tinyMceEditor", plugins : "inlinepopups,advlink", convert_urls : false, theme : "advanced", theme_advanced_buttons1 : "link,unlink", width: "602", height: "175", theme_advanced_statusbar_location :

Implementing Plugin Architecture - Dynamic DLL loading

廉价感情. 提交于 2019-12-17 19:29:56
问题 I've an application which is basically a designer with preloaded controls where you can design your pages using the controls. I'm planning to release more and more controls in the future. I don't want to release a new build for newly added controls as it has its disadvantages. So I was thinking of addon/plugin kind of architecture where I just release the addon/plugin separately which they can install and get the controls inside the designer. Right now I'm using xml files as addons to specify