dynamic

Dynamic Proxy without explicitely specifying the type in scala

is it possible to have a method that takes an arbitrary instance and returns a java.reflection.Proxy or similar that has the same type as the original argument? I guess it should look something like this: def createProxy[S](model: S)(implicit manifest: Manifest[S]): S = {...} or this def createProxy[S, T<:S](model: S)(implicit manif...

Dynamically Growing an Array in C++

I have an array of pointers of CName objects. I have the following constructor which initializes my array to size one. Then when I add an object I grow the array by 1 and add the new object. It compiles fine, however when I try to print them I just get segmentation fault error. Can you look and see if I'm doing anything wrong? //cons...

Multiple dynamic libraries with the same static variables, how many instances?

Let me explain it with an example: I have a class S, which is static. I have two dynamic libraries A and B that use S. I have an application, that links with A and B, in this application, how many different instances of S are created? All this using C++ and in Ubuntu. Thanks in advance ...

Is it possible to manipulate the menu of my CMDIFrameWndEx's CMFCMenuBar?

My main frame has a CMFCMenuBar member, which contains the menu of the current document type. I would like to add/remove a sub-menu dynamically. For example, if the user chooses to display a map pane, I want to add a map submenu next to the "File" menu. Vice versa, if the map pane gets closed, I also want to remove the map menu items. ...

Using Expression.Dynamic to generate a converter for value types.

Part of the data layer for my application is a converter cache similar to System.Data.DataRowExtensions.UnboxT, used in Linq-to-Data. The premise of the cache for all known types I generate a simple converter and cache it. The converter casts the object as T, or in the case of DBNull.Value, returns default(T) (unlike UnboxT which throws...

Display 3 columns of same height with variable amount of data

Hi there, I'm building a page full of hyperlinks which are gotten from querying a content management system, so the number of links is variable. The requirements need me to display all the links over 3 columns and make it look presentable. So at the moment I've got myself a Map<Category, Hyperlink> and when I display it at the moment ...

Can I execute a single C# statement as a script?

Hello everyone! I have seen online how C# allows you to compile code on the fly and I think that is a really awesome thing. I need to use this functionality for my project. But here is the problem. I'm not trying to compile a whole function or new program dynamically. I just need to call a single statement to create or delete stuff on th...

Convert string to model

Let's say I have this object: public struct Line { public string Name { get; set; } public int Value { get; set; } public string Alias { get; set; } } And I have a file with lines following this syntax: garbagedata|moregarbagedata|Name|garbagedata3|Value|garbagedatamaximums|Alias\n Note that moregarbagedata[x] may or ma...

2D array using pointers

I am attempting to read a file with some random names in the format "ADAM","MARK","JESSIE" ..... I have some constraints, the file should be read in a function but should be accessible form the main function with no global variables. The file size and the no of names in the file are not known. This is what I have done till now. I have ...

Dynamically creating classes - Python

Hi folks, I need to dynamically create a class. To go in futher detail I need to dynamically create a subclass of Django's Form class. By dynamically I intend to create a class based on configuration provided by a user. e.g. I want a class named CommentForm which should subclass the Form class The class should have a list o...

form select object dynamically changing class name with php and javascript?

Having some trouble here with this. The setup: A select object with a choice of "Other" User selects "Other". Script runs when this specific value is chosen, and dynamically changes the class of input object from "hide" to "show" (hidden and visible with css display). <p>Select a Grade:</p> <select name="grade" id="grade" oncha...

Brackets go backward on Unicode text

I have Unicode text being displayed on an ASP.NET page. The text is enclosed by two square brackets, as soon as Arabic text appears the ending bracket goes reverse, e.g. "[Hi there]" becomes "[ [arabic". Is this a browser issue? The brackets are hard-coded and only the enclosing text is dynamic. Here is some sample code. The variable r...

Is there a bug with valuetype operator handling in dynamics?

Dynamic should be able to handle math without making me have to think about it but even in trivial cases I'm running into some issues. Consider this really simple function:: public static T DynamicFactorial<T>(T input) { dynamic num = input; dynamic res = 1; for (; num > 1; res *= num, num -=1) ; return res; } This i...

GridView: Columns.Insert() cause my data to vanish on postback, but Columns.Add() works OK?

I have a GridView that has several dynamic columns (I do not know how many at design time and it could be 0-12 columns, hence need for dynamic columns). I have the columns in the grid and data bound to them - works great. There are other standard, design-time TemplateField columns with TextBox controls in them. These are bound with va...

Does mono 2.8 support 'dynamic' keyword?

I tested IronPython on mono 2.8 with the code in the book Professional IronPython p.315 listing 15-3. using System; using IronPython.Hosting; using IronPython.Runtime; using Microsoft.Scripting.Hosting; namespace Method2 { class Program { static void Main(string[] args) { // Obtain the runtime. ...

How to validate dynamic fields using jquery validation plugin ?

Hello, I am trying to validate a form using the jquery validation plugin. It's usually pretty easy but this time I'm using dynamic field. The new fields are not being checked so I tryed to remove the validator then to recreate it but It's doesnt seem to work. $j("#add").click(function(){ $j("#lignes").append($j(".ligne_vide:l...

Dynamic form fields (JSF + XSLT)

I'm working on a project which I need to build a form depending on user's wish. Trying to explain better, suppose I have two buttons ('input' and 'output' button), if user clicks on input button an inputText appears in the screen, if he/she clicks on output one an outputText shows up. To do that, everytime some button is clicked, my bean...

how to pull flash video from mysql with php.

Hello, im trying to pull .swf files from MySQL by using PHP, ive set everything in the database up with an ID and licked it properly. Im not sure if the 'type' has to be anything special, right now its just a 'VARCHAR' and when altering the javascript part of it that that flash automatically generated-- in the i tried to echo it out by ...

jQuery loadpage slow - animation cut

Hi, ok I try to load the .content of my site with jQuery, when I run it local, it shows smoth and nice but when I test it on a host server, the animation is too slow an cuts... and the "loading bar" doesn't show up... :S You can check it out here... here is my code and if u need something else please ask me $(document).ready(function ...

How to organize your site, so that .htaccess works

I am building a Dynamic web site from scratch for the first time so I am new at this. I need to match this URL: www.domain.org/world/2.html with this: www.domain.org/index.php?html=world&rss=2 For that purpose I am using this rewrite rule: RewriteRule ^([^/])/([^/]).html$ /index.php?html=$1&rss=$2 [L] And this should be working, bu...