dynamic

How to Develop Dynamic Plug-In Based Functionality in C#

Hello: I've been looking around for different methods of providing plug-in support for my application. Ideally, I will be creating a core functionality and based on different customers developing different plug-ins/addons such as importing, exporting data etc... What are the some methods available for making a C# application extensible ...

Can I dynamically adjust the height of a css set div border?

Ok so I have a div that contains a few forms that have dynamically generated content. There are categories, that if you click on, slide/toggle down to reveal that categories sub-contents, or projects. Right now, I have it setup so that if the height of the div expands to exceed a set amount, a scroll bar shows up at the side, and the use...

Lots of first chance Microsoft.CSharp.RuntimeBinderExceptions thrown when dealing with dynamics

I've got a standard 'dynamic dictionary' type class in C# - class Bucket : DynamicObject { readonly Dictionary<string, object> m_dict = new Dictionary<string, object>(); public override bool TrySetMember(SetMemberBinder binder, object value) { m_dict[binder.Name] = value; return true; } public over...

What do you think about the advantages/disadvantages of .net 4.0 dynamic types?

Possible Duplicate: What do you think of the new C# 4.0 dynamic keyword? What do you think about the advantages/disadvantages of .net 4.0 dynamic types? are they useful? do we really need them? what are their advatages? thanks ...

Expression.OrElse, dynamically creating a condition.

Hi, I am attempting to create a dynamic where clause using the standard expression API. var query = ( from p in Parties orderby p.PartyId orderby p.FullName select p ).AsQueryable(); Expression<Func<Party, bool>> @fn = (p) => SqlMethods.Like(p.FullName, "%smith%") || SqlMet...

.net 4 - run code from string - in C# / F# / IronRuby / IronPython.

What ways do I have in .net to run code from string? Console.WriteLine(Compile("1 + 2 * 3")); // results is 7. What other options do we have? C# - Compile the code on runtime? IronRuby / IronPython? F#? ...

generic identifier

Hi, as I probably do not describe the problem in the right terms, I was not able to get an answer with google. Please excuse! In the following code, I would like to replace 'hardcoded' identifier COMMENT with the variable editedField. How to do that? var editedField:String = event.dataField; if (model.multipleProcessingData[i][editedI...

WinForms Dynamic Label

I am creating dynamic labels and letting users change attributes of the labes like backcolor and so by sending unicode. However I don't know how to check if the label exists therefore I can't manipulate the dynamicly created label. below is my code: if ((InputBox.Text.StartsWith("π")) && (InputBox.Text.EndsWith("}")))// only process if ...

Dynamically Change Fusion Chart Value with Slider Event in flex

I am having a set of slider for each bar in the graph. I have bindded all the sliders with their corresponding bars. When i change the value of slider the value in the ArrayCollection changes and i have also used singleData.refresh(); but the values in the chart remains unchanged. How can i update the values in the chart with the...

MySQL - Dynamic SQL inside stored procedure

Hi, see the procedure InsertHelpQuestion2 below. DROP PROCEDURE InsertHelpQuestion2; CREATE PROCEDURE InsertHelpQuestion2(user_id char(50),scenerio_id char(50),component_id char(50)) BEGIN DECLARE uu_id char(50); SELECT BinToUUID(NewUUID()) INTO uu_id from helpquestion LIMIT 1; SET @fields_part = 'INSERT INTO helpquestion(H...

How to dynamicly apply variable modifiers in Smarty 2.x

Hi, I can't find the solution of applying modifiers dynamicly in Smarty. Template - I would like to work this way (example) {$myVariable|$modifiers} Php script $smarty->assign('myVariable', "brumla brumla na drum drum drum"); $smarty->assign('modifiers', "truncate:30|trim"); Or I would like to apply modifiers in php - is there any...

Dynamically implementing an interface in .NET 4.0 (C#)

With the new dynamic capabilities in .NET 4.0, it seems like it should be possible to dynamically implement an interface, e.g. given: public interface IFoo { string Bar(int baz); } public class Foo : IFoo { public string Bar(int baz) { return baz.ToString(); } } public class Proxy : IDynamicMetaObjectProvider { private re...

jQuery Colorbox Dynamic Resize

I using Colorbox for login form. And there's a signup link in the login form. I want to resize colorbox window when sign up page opened. main page: <a href="/login.php" class="colorbox_login">Click</a> to login. login page: <form method="post" action=""> ... </form> <a href="/signup.php">Sign up!</a> Help please ... ...

How to implement a class to access objects of several different types in C#?

I'm trying to implement a class to access items of different types, in a similar way to database rows. However, I have two different ideas in mind, and I don't know which one to choose: Design 1 public enum ObjectTypeA { Undefined, Integer, Float } public class MyObjectA { private object val; public ObjectTypeA T...

dynamic list of type or pattern to solve chaning type problem?

I have a class which uses a list for passing to ssrs and for each report I had to define a list of that type. like this List<ReportClass1> ReportClass1prods; public List<ReportClass1> GetReportClass1 { get { return ReportClass1prods; } } List<ReportClass2> ReportClass2prods; public List<ReportClass2> GetReportClass2 ...

Placeholder containing dynamic table is empty unless I create table twice

I am dynamically creating a table that contains a textbox in each cell. The table is put in a placeholder control. Everything displays perfectly. The problem is when I go to retrieve the values entered in the cells. I have the code to generate the table in a separate method called CreateTable(). In order for my program to find a tab...

Pairing Links with PHP Randomized Ads

So I have the following code with works great for randomly generating position for 5 different sidebar ads, my problem is how to give the ads a link that will always be paired with them. I'm looking for suggestions from some PHP gurus as to best practices for doing this... <ul class="top_ads"> <?php ...

how to create a dynamic class at runtime in Java

hi, is it possible to create a new java file from existing java file after changing some of its attributes at runtime?? Suppose i have a java file pubic class Student{ private int rollNo; private String name; // getters and setters // constructor } is it possible to create something like this, provided that rollNo is...

Duck type testing with C# 4 for dynamic objects.

I'm wanting to have a simple duck typing example in C# using dynamic objects. It would seem to me, that a dynamic object should have HasValue/HasProperty/HasMethod methods with a single string parameter for the name of the value, property, or method you are looking for before trying to run against it. I'm trying to avoid try/catch bloc...

Dynamic Selectors with Jquery with php while loop

I have a while loop which creates a list of anchor tags each with a unique class name counting from 1 to however many items there are. I would like to change a css attriubute on a specific anchor tag and class when it is clicked so lets say the background color is changed. Here is my code while($row = mysql_fetch_array($results)){ $tit...