dynamic

Is the dynamic keyword meant to be *only* used with dynamic languages?

I attended Code Camp 12 recently, and a speaker there said that the new dynamic keyword in C# 4.0 should only be used for interopping with dynamic languages. I think he also said that it is somewhat slow, compared to normal reflection (which itself is somewhat slow). But then I heard Scott Hanselman mention that the dynamic keyword "ma...

How to dynamically compile a ViewUserControl(Asp.Net MVC) or Asp.Net Control

Hey Guys, I've read the related questions but I cannot find one that suits my problem(or i'm just stupid). Basically i have a factory that renders a certain "template" and that template contains certain "entities". These entities can render themselves and have a void Render method that constructs the HTML and returns it to the template...

Persistent display (hide/show) for dynamically created DOM elements?

I have a set of DOM elements that I want to show only when a controlling checkbox is checked by the user. All of these items have a common class and are initially hidden: .spec { display:none; } In the click handler of the checkbox, I originally had the following, which worked fine for existing elements. However, the tables are dyn...

Does the dynamic keyword in C# 4 permit certain previously impossible operations with generics?

The dynamic keyword in C# 4 introduces new ways to work with objects that weren't previously possible. How does this overlap with generics? Specifically, are there operations that would be potentially useful which are now legal and valid? For example, this isn't possible now: // Use a type whose value is known only at runtime. Type t =...

TSQL using a wildcard in a where clause with dynamic sql

It appears that using the LIKE in a condition with wildcards and a variable inside of dynamic sql doesn't work, although it doesn't give an error. Here's an example. The column called code has values like A0B01C02,A0B02C2D05,A0B02C2D05, etc and I am trying to match on rows containing a subset like 'B1'. When I do this it works and ret...

Dynamically added HTML does not dynamically remove with JQuery in Cakephp

Hi, We have a part list in the "garagecar/view/index.ctp" view page. The part list is populated with PHP when the page is first loaded. Each part has a remove button. When the user clicks "remove", the controller link removes the part while the JQuery/Ajax removes the HTML that displays the part in the index: $html->link(__('remove', ...

Problem Integrating jquery show-hide with Dynamic Drive Step Carousel Viewer v1.8

I'm using Dynamic Drive Step Carousel Viewer v1.8 so show a series of item images (div class="panel") within a #scroll.belt div. Each image panel includes a hidden <p> containing alarger version of the image and some text description. So far, so good. When a user clicks on any image, I want the hidden <p> associated with that image to a...

NHibernate - How do I change schemas during run time?

I'm using NHibernate to connect to an ERP database on our DB2 server. We have a test schema and a production schema. Both schemas have the same table structure underneath. For testing, I would like to use the same mapping classes but point NHibernate to the test environment when needed and then back when in production. Please keep in min...

Insert, Defer, Prototype and Append elements

Hi all, This might be a more generic browser/javascript questions than a prototype specific quesiton but i thought it would better to ask here because you all tend to really understand javascript and browsers in a ton of detail. So here goes. If i execute the following code: HTML: Javascript: $('area').insert({bottom: "<div ...

RDLC, Dynamic Picture based on parameter, c#

Is it possible to add a dynamic picture to a paramter in rdlc? for example: =SWITCH(Parameters!picture.Value="1","picture1.jpg", Parameters!picture.Value="2","picture2.png") or something similar? or any other way to use the parameter's value to be the guide for the dynamic picture? ...

Large dynamic array in c++

Short problem: #include <iostream> using namespace std; int main() { double **T; long int L_size; long int R_size = 100000; long int i,j; cout << "enter L_size:"; cin >> L_size; cin.clear(); cin.ignore(100,'\n'); cout << L_size*R_size << endl; cout << sizeof(double)*L_size*R_size << endl; ...

Variable sized matrix in C

Is there any way to create a variable sized doubly-scripted array in C (not C++, just C)? I know that to create a variable sized singly-scripted array, you just use a pointer, e.g. float *array; array = (float *) calloc(sizeof(float), n); creates a singly-scripted array of floats of size n. Is there something similar that I can do for...

Dynamic memory allocation on stack

I recently tried this experiment in which instead of going for dynamic memory allocation for memory requirements of unknown size, I did a static allocation. When an array a[i] was declared by me, I kept i (size of the array) variable and dependent on the input that the user gives. #include <stdio.h> #include <stdlib.h> #include <stri...

Can I use regular functions with jQuery variables?

$(document).ready(function(){ $("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank"); $("a[target!='_blank'][target!='_top']").click(function(){ $("#actualcontent").load($(this).attr("href")); window.location.hash=$(this).attr("href"); return false; }); }); So I have this code so that my link...

dynamic linq Like

How to write a dynamic linq method for Like clause. For.: the reference for Dynamic linq orderby is http://stackoverflow.com/questions/41244/dynamic-linq-orderby. I am looking for a similar one for dynamic Like clause. I have the following extension methods for like: public static IQueryable<T> Like<T>(this IQueryable<T> source, str...

Dynamic 2-level menu in web apps

I'm looking to create a top-level horizontal menu, with a second-level horizontal menu below it. Clicking on the top level menu causes the second level menu to change, based on the top level one. clicking on a second level menu causes the content of the page to change. (BTW - I'm looking to do all this in ASP.NET MVC, so if you have any...

How can you tell if a language is a "dynamic language"?

I'm trying to get a better handle on what it really means for a language to be "dynamic". I have quite a bit of experience with Lingo, which is the scripting language for the Adobe (formerly Macromedia) Director product line, and I'm just wondering if it would be considered a "dynamic language". The way variables and lists are handled s...

How to add scroller around table using html and javascript?

i am designed a dynamic table for getting input from user.each column of table contains different types of fields like text box,drop down,check box etc.what should i do to add scroller around table.i searched it on internet but i could only get a solution for plan text in table.and other solutions were too much complicated .if u can refe...

General rule for tag parameters dynamic changes

Just found that changing href dynamically can be implemented differently and one method with document.anchors[] = works for FireFox and Chrome and does not for IE while using document.getElementById(..).setAttribute('href', works for All. Is there a general rule for such changes that one can take for granted or is it always tag...

Django: Printing a queryset dynamically in the template

How can I print the columns specified in "fields_i_want" instead of hardcoding the column names in the template code? # Let's say I have this in my view: foo = Foo.objects.filter(some_field='bar').select('field1', 'field2', 'field3') fields_i_want = ['field1', 'field2'] # Then in the template I want to do something like this: <TABLE id...