dynamic

How can I get Excel-like formulas in .Net?

Should I use a commercial component? Should I roll my own expression evaluator? Should I roll my own dynamic language? I know programmers are notorious for wanting to write their own language, but this is not the case here. The less work, the better. Lets assume that compatibility with Excel formulas is not a strict requirement; if t...

How could I call Java code dynamically ?

How could I write Java code that is executed like javascript code used together with the eval function? What I would like to achieve would be something like this: System.execute ("String str = \"test\"; System.out.println(str);"); which would print the word 'test'. (10x dehmann ) A code sample would help a lot. ...

How to alloc a dynamic typed object in objective-c

Hi, I have seen a lot of talk about dynamic typing in objective-c. But i haven't seen any examples of what i think it is supposed to be. lets say I have a generic function that is supposed to juggle two objects (one gets allocated and the other gets freed) and the calling object attaches it self to the newly alloced object. Both are in...

Delegate.CreateDelegate vs DynamicMethod vs Expression

Questions about Making reflection fly and exploring delegates... If I need to create delegates Func<T, TResult> to methods on dynamically loaded types I could potentially use (1) Delegate.CreateDelegate (2) DynamicMethod (3) Expression trees. Lets say the set of dynamically loaded types/methods are reflected once at application startup...

iPhone: How to create dynamic image dragging ala iphone icon rearranging

On the iPhone, if you touch and hold your finger on an icon, it starts vibrating, then you can drag them around while the other icons move aside and rearrange dynamically. I'm trying to figure out how to do this inside an application with a grid of images or buttons. I don't need them to vibrate, but I do want the UI to allow the user ...

Saving raw html of a dynamically created page

I'm writing an application that would allow users to edit a calendar, its description and a few other things. I'm using jquery, php and mysql. Each time the user makes a change it asynchronously updates the database. I'd like to give them the option of turning what they make into a pdf. Is there a way that I can post to my server the ra...

Dynamically Generate Modules in same Assembly Space

Hello, Consider I have a program running, which should do the following- Should read some code from a text file and should execute it in its own Assembly space so that the new code being executed can access all components of the code already running. How is that possible?? Help please. ...

Totally Dynamic Form Creation: MVC or WebForms?

I'll start a new project, that will include forms whose inputs and their types (textbox, checkbox etc), Validation rules are defined in DB. I have to choose one of the frameworks for Form Creation, Form Validation, Edit/Insert Forms but I'm stuck. I doubt MVC will make handling Parent-Child relationship for Controls difficult. And altho...

Asp.net Master Page control dynamically through code behind

I am having 2 Master Pages and I want to Switch Master page depending on the site, so I want to handle switching the master in code behind. ...

Non generic IQueryable Enumeration Problem

Using dynamic linq (http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx) I run the query below which returns an IQueryable. On this result which is also an IEnumerable I am able to run a Count() however there is not ToList() to get the values. I can enumerate over them using a f...

Append a stylesheet to an iframe with jQuery

I'm creating an HTML editor, similar to this one I'm typing in right now with the output below. I'm using an iframe and dumping the $htmlTextBox.val() into the body of the iframe. I'm trying to create a stylesheet inside the iframe so that it looks as good as it works. Thanks in advance! $htmlTextBox.keyup(function(){ SetPreview()...

Gathering Data: Dynamic Text Boxes.

Edit: if someone could also suggest a more sensible way to make what I'm trying below to happen, that would also be very appreciated I'm building an multiPage form that takes a quantity (of product) from a POST method, and displays a form sequence relying on that number. when the user goes to the next page, the form is supposed to colle...

Delphi - Accessing data from dynamic array that is populated from an untyped Pointer

Hi im using Delphi 2009 not that it has a large affect on what im doing i think I would run into the same if i was still on 2007. I have a scsi call that outputs data to a pointer (wrong way of looking at it but i have trouble explaining that). Originally i used Move to populate a Static Array of Byte with the data that came back, but ...

Dynamically loading user controls from database entries in C#

In a C#, Windows forms app, we have a series of user controls that are associated with menu entry records in a database... ID Menu Title 1 User Management 4 Group Management 6 System Utilities 12 Configuration Management A few user controls... UserManagement.cs GroupManager.cs SysUtil.cs ConfigurationMan....

Why do I get a segmentation fault (core dumped) when I try to allocate a 4D array?

I'm trying to allocate a large 4D matrix but I want to do it dynamically. When I just create the static matrix everything works fine so I know I have enough memory for now. However when I try and implement the same thing dynamically it breaks whenever I enter the third dimension and I need to get to a fourth! Can anyone tell me why th...

JQuery 1.3.1 doesn't find dynamically generated rows

I have just installed in the ASP.NET MVC RC2 and with that also using the JQuery 1.3.1 library. Before I was using the 1.2.6 library. Our application works fine under that library. But now I have strange problem. We have a grid view that we build up with the result of an AJAX call. With the result returned we add new rows to a table thr...

ViewState and dynamicly removed controls

A ASP.NET page's ViewState seems to have troubles keeping up with dynamicly removed controls and the values in them. Let's take the following code as an example: ASPX: <form id="form1" runat="server"> <div> <asp:Panel runat="server" ID="controls" /> </div> </form> CS: protected void Page_Init(object sender, EventArgs e) { B...

Html/Javascript: Add Attribute to an HTML Control

Need: Find a way to add a valid tag/attribute/property to a normal html control. What I have is some javascript/jquery adding a click event to a link that will show or hide a div. The idea is to do this using $(document).ready and an anonymous method to create the method called by onClick at the page load. When clicked, a div will be ...

Is it possible to have two partial classes in different assemblies represent the same class?

I have a class called 'Article' in a project called 'MyProject.Data', which acts as the data layer for my web application. I have a separate project called 'MyProject.Admin', which is a web-based admin system for viewing/editing the data, and was build using ASP.NET Dynamic Data. Basically I want to extend the Article class, using a pa...

In C++, where in memory are class functions put?

I'm trying to understand what kind of memory hit I'll incur by creating a large array of objects. I know that each object - when created - will be given space in the HEAP for member variables, and I think that all the code for every function that belongs to that type of object exists in the code segment in memory - permanently. Is that...