dynamic-data

Pivots with dynamic columns in SQL Server

一世执手 提交于 2019-11-27 09:28:48
I am working on an SQL Query using pvots with dynamic columns in SQL Server (T-sql). Rather than submitting my lengthy query, I’m illustrating my problem with a simplified model. I create 2 tables: Table1 and Table2 and populate them with a few entries as follows: Table1: Col_ID1...............Col_Name 1.........................Jan-11 2.........................Feb-11 3.........................Mar-11 Table2: Col_ID2......Account.....AccountName......Amount 1...............121...........Electricity............10000 2...............121...........Electricity............20000 3...............121...

Why does jQuery UI's datepicker break with a dynamic DOM?

我们两清 提交于 2019-11-27 07:05:43
I'm working with a dynamic DOM here, and have called the jQuery UI datepicker to all inputs with a specific class name, in this case .date It works great with the first, static, construct but when I clone it the event handlers don't seem to want to move over. I get the Firebug error: inst is undefined I tried looking into jQuery's new live() function but couldn't combine the two. Any ideas? Ah, got it. Right after I append the HTML to the DOM I run this on all the inputs I'd like to have a datepicker pop up with. Datepicker adds a class to elements it has been attached to, so we can filter out

Is there a way to let cURL wait until the page's dynamic updates are done?

假如想象 提交于 2019-11-27 06:57:44
问题 I'm fetching pages with cURL in PHP. Everything works fine, but I'm fetching some parts of the page that are calculated with JavaScript a fraction after the page is loaded. cURL already send the page's source back to my PHP script before the JavaScript calculations are done, thus resulting in wrong end-results. The calculations on the site are fetched by AJAX, so I can't reproduce that calculation in an easy way. Also I have no access to the target-page's code, so I can't tweak that target

How do you dynamically allocate a matrix?

戏子无情 提交于 2019-11-27 06:50:35
How do you dynamically allocate a 2D matrix in C++? I have tried based on what I already know: #include <iostream> int main(){ int rows; int cols; int * arr; arr = new int[rows][cols]; } It works for one parameter, but now for two. What should I do? A matrix is actually an array of arrays. int rows = ..., cols = ...; int** matrix = new int*[rows]; for (int i = 0; i < rows; ++i) matrix[i] = new int[cols]; Of course, to delete the matrix, you should do the following: for (int i = 0; i < rows; ++i) delete [] matrix[i]; delete [] matrix; I have just figured out another possibility: int rows = ...,

How to catch that map panning and zoom are really finished?

混江龙づ霸主 提交于 2019-11-27 05:30:20
问题 I am trying to write an application that will dynamically load data to map while user pans or zooms it. I need to track when the map is finished to change its view state (stops panning or zooming) and then load a new portion of data for creating markers. But in fact Google Maps API doesn't have any events to handle this. There are some methods like creating an empty overlay to control onTouch events and so on, but map panning could last long after user finished his touch because GMaps use

Dynamically call Class with variable number of parameters in the constructor

血红的双手。 提交于 2019-11-27 02:10:58
问题 I know that it is possible to call a function with a variable number of parameters with call_user_func_array() found here -> http://php.net/manual/en/function.call-user-func-array.php . What I want to do is nearly identical, but instead of a function, I want to call a PHP class with a variable number of parameters in it's constructor. It would work something like the below, but I won't know the number of parameters, so I won't know how to instantiate the class. <?php //The class name will be

Dynamic Form Generation in ASP.NET

徘徊边缘 提交于 2019-11-27 01:46:40
问题 I would like to dynamically generate a form from a database in ASP.NET, what is the best approach? Are there any built in functionalities I can use? I will have database tables to represent the panels and their names, then for each panels, it contains the different fields and their types (Combos, Textboxes, etc..). Please advice, thank you. Note: I have to use Telerik Ajax controls for the form generation 回答1: Have a look at Dynamic Data. I recently found out about it and it's already saved

App_Code folder is missing in VS 2010

你。 提交于 2019-11-27 01:46:18
问题 I was trying to create a Dynamic Data Website using VS 2010 RC. An attempt to create an App_Code folder where I would put a LINQ to SQL class, failed. When I selected 'Add ASP.NET Folder' to add the folder, I had options to create only the following folders: App_GlobalResources App_LocalResources App_Data App_Browsers Theme What happened to the App_Code folder? 回答1: Why not create another project, a class library, and put it in there. That's by far the best way to keep those classes separate

Dynamic (Runtime Generated) Forms in ASP.NET MVC [closed]

会有一股神秘感。 提交于 2019-11-26 23:58:32
问题 This is a general design question: How would you implement a dynamic (runtime generated) form in ASP.NET MVC? Here's the situation: A site admin can define form parameters (fields, type of fields, validation) with a GUI (MVC view). As needed, the runtime generates the form for the end user based on the admin configuration. I'm assuming that all of this logic would reside in the controller - or perhaps extension methods, action filters or something like that. End user fills out the form, hits

Hide Page Extensions (Like StackOverflow)

落花浮王杯 提交于 2019-11-26 22:10:41
问题 I want to hide page extensions like stackoverflow does. How does the following work? http://stackoverflow.com/tags/foo http://stackoverflow.com/tags/bar I've seen a lot of sites that do this, but I still don't know how this is accomplished (I have a LAMP stack). 回答1: When a web server gets a request for a URL, it has to decide how to handle it. The classic method was to map the head of the URL to a directory in the file system, then let the rest of the URL navigate to a file in the filesystem