dynamic

Question on dynamically sizing a button with textField

Hi Stackers! My question today is dealing with a dynamically generated button with a textField. I have the button copy in XML and I need to add a buffer of 10 pixels to either side of the textField. I tried to CENTER my textFormat, but then I could not see my text because the button is for some strange reason 545.45 instead of 88 like i...

What is the best way of implementing a dynamically resizing stack in C?

What is the best correct way of implementing a dynamically resizing stack in C? For example, i want to allocate an amount of memory to a stack but when that stack gets full, the memory allocated is doubled to accomodate new data, etc. I have a stack implemented at the minute using a simple array of void pointers, this way i can store p...

Dynamically create checkbox with JQuery from text input

In my cms I have a checkbox group for categories. I would like to have a text input below that where the user can input the name of a new category and it will dynamically add a new checkbox with the provided name used for both the value and the label. How can I do this? ...

Dynamic order by in JPA/Hibernate?

The naive attempt query would look like this: Query query = em.createQuery("from org.domain.Resource r where r._parent = ? order by ?"); This does not work as the parameters should be data and not column names or syntax like ASC or DESC. What kind of workarounds you have figured out for this dynamic ordering? Concatenating the orderi...

can i have dynamic date pickers using jquery by class selector

i have a dynamic html table and in one column i want a jquery ui date picker. A few questions: Can i have datepicker by class instead of id: $(document).ready(function(){ $(".datepicker").datepicker(); }); Can i create them on the fly if i i am adding in textboxes with this class using jquery? ...

Dynamic data Table showing up as read only

Hi everyone, I just started a new project in dynamic data. I didn't add or remove any external libraries in the project. But for some reason my table is coming up as readonly. I tried going to the database with the same login information and add data and it works. But doesn't work in my dynamic data application. Can any please give m...

Is it possible to save a dynamic assembly to disk?

I recently bought Ayende's book Building DSLs in Boo (buy it, read it, it's awesome) but I'm coming up against an implementation problem and I want to see what the generated code looks like. I would normally use reflector to look at the code but in this case the assemblies are dynamic and only in memory. Is there a way to save dynamic ...

Is there any Scala feature that allows you to call a method whose name is stored in a string?

Assuming you have a string containing the name of a method, an object that supports that method and some arguments, is there some language feature that allows you to call that dinamically? Kind of like Ruby's send. ...

How to HTMLEncode arbitrary datasets returned from ScriptService

I've exposed an ASP.NET ScriptService that returns the results of a user defined query. In this case, I'm returning the resulting dataset as a JSON serialized IEnumerable<IDictionary>. Each IDictionary represents a dataset row and contains an arbitrary number of key/value pairs. Although most returned values are primitive types, occasi...

Actionscript3: add and remove EventListeners (with dynamic name and dynamic variables)

picture: http://yfrog.com/1rcheckerboardflashvraagjg Hey all! I am making a boardgame in flash Action Script 3 each position on the board is a buttons like this: button_1_1, button_1_2 etc. Whenever a character is selected you want to move it so the script has to add event listeners for positions around the selected unit // This f...

how do I dynamically create and name objects at runtime in C#?

I wish to dynamically create and name instances of my object at runtime as I add them to a list class I somehow thought this would be a simple matter in c# but thus far I have been unable to find any information on how to achieve this. for the brief description I have a custom class that during runtime I wish to create an array list and...

Remote Observables in .NET

I encounter this scenario all the time, but have never found anything but home-grown solutions to it: You view a list of orders When you make changes to those orders, they dynamically update on any other clients screens who are looking at the same list, and vice versa I call this idea "Remote observables"... not sure if it has a bett...

Dynamically access a property in a Delphi component

I'm using Delphi 5, and we have a method to dynamically create certain controls based on the contents of a database table (we create TButtons mostly) and take action when those are clicked. This allows us to add simple controls to a form without having to recompile the application. I was wondering if it was possible to set a component's...

dynamic data asp.net Query String parameter

Hi, Is there a way to define my own querystring parameter in Dyanmic data rather then using something like Edit.aspx?AccountID=1 I want to use something like this Edit.aspx?id=1 ...

DynamicObject implicit casting

I have a subclass of DynamicObject and I would like to implement implicit casting for primitive types similarly as DO's explicit casting method TryConvert; that is, without writing multiple implicit operator [type] functions. Usage: dynamic myDynamicObject = new MyDynamicObject("1"); int sum = 1 + myDynamicObject; // instead of int i =...

Dynamically adding members to a dynamic object

Hi, I'm looking for a way to add members dynamically to an dynamic object. OK, I guess a little clarification is needed... When you do that : dynamic foo = new ExpandoObject(); foo.Bar = 42; The Bar property will be added dynamically at runtime. But the code still refers "statically" to Bar (the name "Bar" is hard-coded)... What if ...

How to dynamically adjust method names and calls with Objective-C

Hello. I am trying to condense my code for a method and was wondering how I would achieve the following: I have a bunch of variables that differ only in their number such as: int intVariable1 int intVariable2 UILabel Label1 UILabel Label2 BOOL bool1 BOOL bool2 etc. So I want to call a method and pass in an int. That int would dete...

UITableView has an "ugly" background image for dynamic height rows

I've created a UITableViewController which calculates the height for each row depending on the amount of text it contains. The code to calculate the row height looks like this: - (CGFloat)tableView:(UITableView*)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CON...

Why in some dynamic website , their pages are in html format ?

Hi I've seen a lot of dynamic website through the internet that their pages are in html or htm format . I don't get it why is that ? And how they do that ? Just look at this website : http://www.realmadrid.com/cs/Satellite/en/Home.htm ...

C# Absolute Value for dynamic type

I have code that computes the absolute value of a custom value type: public Angle Abs(Angle agl) { return (360 - Angle.Degrees); } This isn't my actual application but it will serve my point. Then I have a method like so: public dynamic DoStuff(Foo f) { // f contains a list of value types: int, double, decimal, angle retu...