dynamic

Overriding public method in dynamically loaded class with AS3 and getDefinitionByName()

I have two SWFs: main.swf and external.swf. main.swf needs to access some methods in external.swf, so it loads external.swf into itself and uses getDefinitionByName("package.Class") to access the class and one of its methods: var ExternalClass = getDefinitionByName("package.Class") as Class; var ClassInstance = new ExternalClass(); var...

dynamic 2d array in java using Arraylist

I found some problem in creating dynamic 2d array with arraylist,The original code is tediously long to read so i am giving a simple code here,the problem is same in both the cases: import java.util.*; class test{ public static void main(String args[]){ Integer test[]=new Integer[3]; ArrayList<Integer[]> al=new ArrayList<Inte...

IDynamicMetaObjectProvider dynamic objects and JScript.Net

I've got a class called EcmaEval which allows users of my application execute arbitary javascript. The implementation of the class is at the end of this question. I allow users to access an "environment" object which provides methods and properties which are useful for them to script with. The problem is that I need to expose a C# dynam...

most appropriate decision for dynamic web content

Hello all, First of all, I'm sorry because of this lame question. But I'm kind of lost in all dynamic-html, ajax, etc stuff. So i decided get help from the pros. Basically what I'm trying to do is creating a web page which have dynamic content(messages) coming from a web server(asp.net or php) presented in floating(movable by viewer) box...

What's the best way to update the input names when dynamically adding them to a form?

I'm trynig to come up with a clean and efficient way of handling form input names when dynamically adding more to the POST array. For example, if I have the following form: <fieldset> <input type="text" name="users-0.firstname" /> <input type="text" name="users-0.lastname" /> </fieldset> I then click an 'addmore' button which d...

Dynamic LINQ Query in LINQ to Entities , problem with WHERE clause

Hi, For the life of me, I can't figure out what the problem is with this: tempData= from a in dx.SomeTable select a; string searchField="ItemName"; string searchString="BoxPkg"; object[] parameters=new object[]{searchField,searchString}; tempData = tempData.Where("@0 like @1", parameters); I get this error " {"Expression of type '...

ASP.NET MVC: Passing instance variables to the View like in Ruby

Yes, I know that in ASP.NET MVC you have to use ViewModels. But I'm tired of writing countless amounts of ViewModel classes. Besides I'd like to just pass the Validation model to the view, instead of that I have to pass the whole ViewModel, so I get ugly code like Html.TextBoxFor(m => m.TopicModel.Title) Instead of Html.TextBoxFor(m...

Create dynamic object with hierarchy from xml and c#

I want to create a dynamic object from a string of XML. Is there an easy way of doing this? Example String. <test><someElement><rep1>a</rep1><rep1>b</rep1></someElement></test> I'm trying to create an mvc editor for passing data through nvelocity and would like people on the front end to input xml as there data for parsing. Thanks i...

How can i stop reloading in firefox when div size adjust dynamic?

Hi all, When i adjust the div width and height dynamically. the flash content in the div is reloading. How can i stop reloading in firefox when the div width and height change dynamically. Thanks in advance. ...

FLEX Video player - play count

I have a video player in flex which constantly plays a movie. Is there a way to see how many times it has played? So each time the movie is played, text filled populates with +1. Thanks, Yan ...

C# Generic object instantiation with generic type

I'm working on a generic delegate function and declaring a return type of type List. public static List<T> PerformOperationOnGenericArray<T>(IList<T> myList, FunctionForGenericArray<T> operation) Am I able to use a generic return type instead of List that also specifies a generic type, i.e. S public static S<T> PerformOperationOn...

Dynamic Drop Shadows in WPF?

Ok I feel like I am just missing something small here, but it has taken me too long to figure this one out. I have a custom UserControl that has a drop shadow. This UserControl is then used as the view to create a ModelUIElement3D. The drop shadow works perfectly when first displaying. The trick here is that I want to be able to change ...

C# 4 "dynamic" in expression trees

I'm trying to figure out how to put all the pieces together, and would appreciate a concrete source code sample for a simple case to start with. Consider the following C# code: Func<int, int, int> f = (x, y) => x + y; I can produce an equivalent function at runtime using expression trees as follows: var x = Expression.Parameter(type...

Automating DDL in .Net

I maintain a product that has a home-grown data access layer, programmed in C++/COM for use with a Windows-based web application designer and it is at least 10 years old. This DAL is modularized with something akin to Data Providers so that it can generate basic SQL and DDL for a specific database type. In the process of migration anal...

Is a dynamic pivot using LINQ possible?

I have a T-SQL 2005 query which returns: pid propertyid displayname value ----------- ----------- --------------- --------------- 14270790 74 Low Price 1.3614 14270790 75 High Price 0 14270791 74 Low Price 1.3525 14270791 75 High Price 0 14270792 74 ...

Differences between ExpandoObject, DynamicObject and dynamic

What are the differences between System.Dynamic.ExpandoObject, System.Dynamic.DynamicObject and dynamic? In which situations do you use these types? ...

server side compile and running languages

In my website my users will submit source code of languages by using a html form . I want to compile and run this code belonging to different programming languages like c,c++,java etc... on the server and return the output or errors to the webpage. many clients upto 3000 submit such codes every week and i need to run them and sh...

Creating two separate instances from the same class causes them to be linked together?

The problem I am having is I create two different menus from a single class. When I finish the first one, everything is fine. However when I create the second one and set it's region, it modifies the previous one as well. When I call Display() which just flips a boolean variable, it flips it for both instead of just the one I'm calling t...

dynamic binding problem

I am building an app where we are pulling messages off of MSMQ. The idea is to then take that message find a handler for it and process the message. The method that is doing the retrieval and kicking off the processing looks like this private void DoWork(object state) { var mq = MessageQueue.Exists(QueueName) ? new...

How to write a Fortran program that supports both static and dynamic memory management?

Hello, I'm working on a public release if a model using Fortran 9x and I'd like to design the code to support both static or dynamic memory management. I've only seen one example of a code that supports something like this. It is implemented using preprocessors that look something like this: The code would include some memory manageme...