dynamic

C# 4.0 dynamic Office interop performance

I've taken an application that was developed in Visual Studio 2008 and used various Office libraries through COM Interop. I began some proof of concept development using the dynamic keyword and Visual Studio 2010. I found that performing the same tasks is around 5-10x slower using dynamic than the "old" way. Has anyone else experienced...

What is the problem with linking of Pthreads libraries to .c file in MSVC++6?

Hi Could someone please help me to compile my .c file with MSVC++6 in windows xp? From this morning, I am trying to compile it but it give me the following errors: --------------------Configuration: server_th - Win32 Debug-------------------- Linking... server_thread.obj : error LNK2001: unresolved external symbol _ThreadMain Debug/se...

Dynamic OLAPCube Flex

I'm trying to push data into an OLAPCube in flex. The data coming in is flat and nothing else is known before hand. How do I have flex automatically create dimensions and such so that I can bind something to the cube? Using a flex chart, it's as simple as setting the data provider to an array collection and it works. The ONLY exampl...

Dynamic Container Height (jQuery)

I have a fixed-height (180px) header and fixed-height footer (50px). I'd like the container height to be: window height MINUS header MINUS footer. How do I achieve this using jQuery? Edited to Add: If the container height is updated on window resize, that'd be awesome! Many thanks! ...

Why this javascript is not working in IE?

I am using the following javascript to dynamically add rows in a table:- var trObj = document.createElement('tr'); trObj.setAttribute('name', 'dynamicTR'); var tdObjEmpty = document.createElement('td'); tdObjEmpty.setAttribute('colspan', '2'); tdObjEmpty.innerHTML = ' ' trObj.appendChild ( tdObjEmpty ); var tdObj = docum...

Show/Hide JMenuItems in a JPopupMenu based on a JTree's selection.

I have a JTree which displays a JPopupMenu when I right click nodes in the JTree. What is the best way to hide/show or enable/disable certain JMenuItems in my JPopupMenu based on the node selected in the JTree? The first solution that came to mind was to add a TreeSelectionListener to the JTree for the 'value changed' event. In the even...

Wordpress query post get Image unless blank

Hi I am creating a wordpress custom page theme, I have included the code. Is there a way to dynamically add the list items. In the code I grab each image related to its post with screenshot1 screenshot2 so on... This all currently works. My problem is at the current moment if I upload 2 screen shots 3 list items will show up and the thi...

Resize dynamic iframe (problem with Chrome)

So I've been looking around at all the other Stack Overflow posts and around google about how to set the height/width automatically on an iFrame. I've gone through about 15-20 of them and none have worked for me so far. Let me try to explain my situation: I'm dynamically setting the body of an iFrame on my page. I'm needing the iFrame t...

dynamic linking msvc compiled dlls in g++

Very sorry if this question has been asked numerous times, but I can not find a precise reference :( The problem is: I have a DLL file along with corresponding LIB file compiled with VC++ 08. Now I want to dynamically link it with another application I am compiling using g++. Is it possible? What linker options will I have to give in ...

XNA: Dynamic content loading without Game Studio installed?

Hi. I'd like to enable my game to load content (such as a model, a jpg file, etc.) during run-time and display them. I looked at the sample on XNA website (http://creators.xna.com/en-US/sample/winforms%5Fseries2), however this method requires Game Studio (which means Visual Studio too) installed on the client computer. What are the ap...

DataContext.GetTable(Type) question

I just started using LINQ a couple of days ago and i'm stuck now. Given a certain type i need to recurse to the top. For example: hierarchy: Client, Project, Department. proposed function descriptor to load hierarchy: public static IEnumerable<object> LoadPath<T>(int id) where T : class, ContentItem, new() { } the user specifi...

Dynamic ListView in Android app

Hi overflow'ers! Is there a working example out there that demonstrates how to append additional rows in ListView dynamically? For example: you are pulling RSS feeds from different domains you then display the first 10 items in the ListView (while you have other threads running in the background continue pulling feeds) you scroll and ...

How do I over-allocate memory using new to allocate variables within a struct?

So I have a couple of structs... struct myBaseStruct { }; struct myDerivedStruct : public myBaseStruct { int a, b, c, d; unsigned char* ident; }; myDerivedStruct* pNewStruct; ...and I want to dynamically allocate enough space so that I can 'memcpy' in some data, including a zero-terminated string. The size of the base struct...

Alternative methods for creating dynamic JavaScript?

Background I am working on a project that runs in an embedded web browser in a small device with limited resources. The browser itself is a bit dated and has limits to its capabilities (HTML 4.01†, W3C DOM Level 2†, JavaScript 1.4). I have no documentation on the browser, so what I do know comes from trial and error. The point is t...

jQuery - change form action based on selection?

I'm trying to change the form action based on the selected value from a dropdown menu... Basically, the html looks like this: <form class="search-form" id="search-form" method="post" accept-charset="UTF-8" action="/search/user"> <select id="selectsearch" class="form-select" name="selectsearch"> <option value="people">Search people</o...

Getting a value from a dynamic object dynamically

Yes, title sounds a bit confusing, so I'll explain what I mean: suppose you have a C# 4.0 'dynamic' object, and the name of a property. How would you retrieve that property from the dynamic object? In other words, how would you implement: public static object GetDynamicValue(dynamic o, string name) { ... } Another way to put it is t...

Create dynamic array from each in jquery?

Is it possible to create a dynamic array using something like this and store X elements, then get the average? How would that be possible? $(xml).find('student').each(function(){ var name = $(this).find("name").text(); var myArray = DYNAMIC ELEMENTS student_list.append("<tr><td>"+name+"</td><td>"+cid+"</td><td>"+grade+"...

Can script.readyState be trusted to detect the end of dynamic script loading?

I use dynamic script loading to reduce the duration of the initial page load. To ensure that the functions and objects defined by a script are accessible, I need to ensure that the script has been fully loaded. I have developed my own Javascript library to this end, and thus did quite a lot of research on the subject, studying how it's ...

dynamic sql pivot table

Hi Sirs, i hope you can help me with the resolution of this task we have. originally we have these tables: hwtype id name 1 router 2 switch hwelement id idhwtype name 1 1 RTR1 2 1 RTR2 3 2 SWT1 hwattributes id idhwtype name 1 1 speed 2 1 IP 3 2 ports hwtypeattri...

C++ allocating dynamic memory in a function - newbie question

I'm investigating a memory leak and from what I see, the problem looks like this: int main(){ char *cp = 0; func(cp); //code delete[] cp; } void func(char *cp){ cp = new char[100]; } At the //code comment, I expected cp to point to the allocated memory, but it still is a null pointer meaning I never delete the mem...