dynamic

Pass Arguments to Included Module in Ruby?

I'm hoping to implement something like all of the great plugins out there for ruby, so that you can do this: acts_as_commentable has_attached_file :avatar But I have one constraint: That helper method can only include a module; it can't define any variables or methods. The reason for this is because, I want the options hash to d...

Create on the fly web service, Dynamic web service invoker

I need to create dynamic invoker of webservices based on their WSDL. any idea? thanks ...

ELF and processor specific aspects of dynamic linking

I am trying to understand the process of dynamic linking, in detail. For the purpose, I tried digging into .got section of ELF. q.1 : I read in ELF Standard 1.2(Appendix) that Global offset table's format and interpretation are processor specific. Can some body please help me, why we dont have standard for this as well and why it has to...

Unknown error in the memory in C

I have a 2D dynamic array. I enter a line of 0's after line which has a biggest number: void InsertZero(int **a, int pos){ int i, j; a = (int**)realloc(a, n * sizeof(*a)); a[n-1] = (int*)calloc(n, sizeof(**a)); d = 0; for(i = n-1; i > pos; i--){ for(j = 0; j < n; j++){ a[i][j] = a[i-1][j]; ...

Ajax dynamic content from .aspx page

Hi, I'm using this Ajax script (http://www.dhtmlgoodies.com/index.html?whichScript=ajax-dynamic-content) to load content from an aspx page on another server than the page calling the content. So far I've learned that this is a no go. The problem seems to be that when using an absolute link to content the script fails as apposed to using ...

Replacing content with jquery.

I am loading a movie into a overlay. My problem is that when I close the div overlay the movie continues to play. I do not control the code on the move side it is imported via a script tag which then opens in a iframe. I am able to remove the content of the of the div and then the movie stops playing. Then of course when the user opens t...

Log4j Dynamic Parameter

Hi. i have a j2ee web application running on spring framework and using log4j for logging. I have this line in my log4j.properties file. this will insert the logs in my database. How do I set a dynamic value in the message part so that I can somehow append the currently logged in user. The bean object containing info for the current user...

Jquery and Ajax to Dynamically load IFrame

I have a script that dynamically loads iframes inside a webpage. You can see the demo here: DEMO I want to use jquery to achieve a similar rseult, but with a nice sliding effect, and external links that load the iframe in another div. Basically, I have 10 links on a page. When the link is clicked, I want the iframe window to load in the...

Reflect.Emit Dynamic Type Memory Blowup

Using C# 3.5 I am trying to generate dynamic types at runtime using reflection emit. I used the Dynamic Query Library sample from Microsoft to create a class generator. Everything works, my problem is that 100 generated types inflate the memory usage by approximately 25MB. This is a completely unacceptable memory profile as eventually I ...

Writing/Reading struct w/ dynamic array through pipe in C

I have a struct with a dynamic array inside of it: struct mystruct{ int count; int *arr; }mystruct_t; and I want to pass this struct down a pipe in C and around a ring of processes. When I alter the value of count in each process, it is changed correctly. My problem is with the dynamic array. I am allocating the array as such: mys...

Dynamic select with linq-to-xml?

I got a XML document with a lot of data divided into category->subcategory. Like this: <?xml version="1.0" encoding="utf-8" ?> <data> <car> <transmission> <option value="1" text="Manual" /> <option value="2" text="Automatic" /> </transmission> <milage> <option value="2" tex...

Dynamic JPA 2.0 query using Criteria API

Hello all, I am a bit stucked constructing a dynamic query using the CriteriaBuilder of JPA 2.0. I have quite a common use case I guess: User supplies a arbitrary amount of search parameters X to be and / or concatenated: like : select e from Foo where (name = X1 or name = X2 .. or name = Xn ) The Method or of CriteriaBuilder is no...

Dynamicl invoking web services, what is the argument in the method call.addParameter("String_1", QNAME_TYPE_STRING, ParameterMode.IN);

call.addParameter("String_1", QNAME_TYPE_STRING,ParameterMode.IN); I want to invoke web service and I'm lost in the request/response thing. I have WSDL and I wonder how I can put the requested arguments and read the response. What does "String_1" means? its name of what? Please help me, Thank you in advance ...

How to display objects with dynamic fields in wpf data grid?

Hi! I want to display and edit some objects in a WPF data grid and I'm looking for a good way to do so. All objects I want to display have the same fields, but every execution the fields of my objects can differ. Here is a piece of the interface to illustrate what I mean: public interface IMyObject { IEnumerable<string> GetFieldNam...

Creating Multiple TextFields in runtime AS2

Hi lads, I have an issue generating multiple text fields in AS2. My AS2 Flash application calls database (via PHP) and then receives XML file that contains a few objects. All I want to do is to loop throught this XML objects and then create a TextField (actually a Component that contains graphics and TextField, but this will come later) ...

need help figuring out dynamic menu generation in django

I need to dynamically generate a code like this in the resulting html: <p>>> gallery one</p> <p><a href="../gallery2">gallery two</a></p> <p><a href="../about">about the author</a></p> <p><a href="../news">our news</a></p> I do have menu_code string variable created in views.py (it is generated depending on an item number of the curre...

Can I add elements to a Java GUI?

I want to know how I can make a Java program where an unknown amount of objects can be added to a GUI depending on user input. I can program in objects one at a time within the program, but I haven't seen a more dynamic program. Can I do that with Java? If not, what can I do it with? For more information, here's a picture. There ca...

Prevent Postback in array of linkbutton is created at dynamically

i have created Array of Linkbutton and when user click on link button it will create an array of Radio Buttons but it requires Postback all time so page load takes more time... what is solution of it?? ...

Java/Swing (and GUI in general) - technique or patterns to build dynamic search form with criterias/filters

I feel recurrent the need of building a search formula or filter panel using logic and expression. Here are some example expressions: search all item with price >= $100 and available in stock. filter all files with (name like *.log or name = toto.txt) and modification date < 2 hours from now I know how to implement such a search/filte...

Removing a fields from a dynamic ModelForm

In a ModelForm, i have to test user permissions to let them filling the right fields : It is defined like this: class TitleForm(ModelForm): def __init__(self, user, *args, **kwargs): super(TitleForm,self).__init__(*args, **kwargs) choices = ['','----------------'] # company if use...