dynamic

Sql server dynamic pivot with dynamic fields type

落花浮王杯 提交于 2019-12-23 05:26:02
问题 I need to build a dynamic pivot table on Sql Server 2005 and I found several excellent answers on how to do it, but I have an extra requirement to implement: dynamic field type . This is my data structure CREATE TABLE [dbo].[MyData]( [Key] [char](12) NOT NULL, [AttributeName] [char](3) NOT NULL, [AttributeValue] [char](40) NOT NULL) This is the definition of types. CREATE TABLE [dbo].[Attributes]( [AttributeName] [char](3) NOT NULL, [CastTo] [char](10) NOT NULL, [Size] int NULL, [Precision]

Add table dynamically in Entity framework in MVC

笑着哭i 提交于 2019-12-23 05:25:40
问题 I have an MVC application in which i need to add the table dynamically i.e table name is prepared dynamically. Is there any way we can check for the existence of a table and if not exist then add it in entity model. If we can are able to create the table then how we can access the dynamically created table name using the object of entity model? 回答1: No. If you want to use new table in EF you also need related entity (class), mapping and ObjectSet exposed in your context. Here you have some

MPI_Allgather and dynamic struct

半世苍凉 提交于 2019-12-23 05:18:28
问题 I want to send a array of structure with the MPI_Allgather() but my structure has a dynamic array: typedef struct { float a; int* b; } structure_t; My structure is initialised the following way: structure_t *resultat = (structure_t*) malloc( sizeof( structure_t ) + n * sizeof( int ) ); But how can I send my structure with MPI_Allgather ? How can I create the two (send and receive) arrays? 来源: https://stackoverflow.com/questions/9866096/mpi-allgather-and-dynamic-struct

how to split a column into multiple columns in mysql

瘦欲@ 提交于 2019-12-23 05:16:18
问题 I have column like this +--------------------------+ | Marks | +--------------------------+ |Maths-80,Phy-100,Che-99 | |Maths-90,Phy-60 | |Phy-82,Che-65 | |Che-90 | |Maths-33,Phy-89,Che-65 | |Maths-50,Phy-43,Che-59 | +--------------------------+ i just give 3 sample subjects but in realdata it maybe any number of subjects seperated by comma. for that i want to display the marks for each subject by split the marks column and display it in multiple columns like the below sample. +--------------

number of increasing strings of length k

无人久伴 提交于 2019-12-23 05:13:32
问题 I am finding it hard that how to find the number of increasing sequences of length k in n numbers. I know it has use of LIS problem and I have to modify it somehow, but now getting how. It's complexity is O(k*n^2) DP solution. Please give hint and explain me a little bit. 回答1: Maybe a little late but this can be helpful: There are two algorithms (as far as I know) that are used to solve this problem. Im going to describe the one with O(n^2*k) complexity. This algoritm uses a DP solution; it's

dynamic height of chart of highchart

孤人 提交于 2019-12-23 04:45:44
问题 It is necessary to automaticly and dynamicly change (update) the height of highcharts's charts depending on the amount rows (example, for horizontal bars) on it. The height of one element (example, horizontal bar) is constant (for example, 20px). The height of charts with X elements set automaticly (~ 20px * X). 回答1: You can do this with a little pre-setup. Set variables for: the top and bottom margins the point and group padding the width of the points the number of data points in your data

Nunjucks dynamic page template

只愿长相守 提交于 2019-12-23 04:32:33
问题 i'm using nunjucks (gulp) as templating language and i want to build a dynamic page template. This is my Json: "pages": [ { uname: "Welcome", title: "Page 1 Headline" }, { uname: "About", title: "Page 2 Headline" } ] Currently i have a static page (html) template for each page: {% extends "layout.html" %} {% set active_page = "Welcome" %} //<- This needs to be dynamicly {% block content %} <h1>{{ page[0].title }}</h1> //<- This needs to be dynamicly My first thought was to read the url

Dynamic button not working with AddHandler in VB.NET

会有一股神秘感。 提交于 2019-12-23 04:24:49
问题 I am working on a project in which I am trying to create a button dynamically in the code-behind dynamically to submit and upload a file to the server. I am using AddHandler, but the button will not post back. I read everywhere that I need to regenerate this button after each post back because of the way webpages work. I'm still not able to get this button to work. I have a main page with the HTML: <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind=

Dynamic buttons added to a GridLayout using RecyclerView are added on top of each other

送分小仙女□ 提交于 2019-12-23 04:17:08
问题 I want to add dynamic buttons to a grid layout as shown below. Each button is added one at a time , and the layout must update itself to have the buttons in rows. My problem is that when a new button is added it appears on top of the last button added, and is not placed in a row format. In this image below I show what I want and what is currently happening, where the squares labeled with numbers are my buttons. In the image of what I have, I have added 6 buttons to the layout, but they are

Return Values of Recursive Dynamic Variables in Batch

六眼飞鱼酱① 提交于 2019-12-23 03:48:06
问题 I'm attempting to use dynamic variables within Delayed Variable Expansion to represent other Dynamic Variables. I'm running into some trouble. How can I get a dynamic variable's value's value if the dynamic variable's value is another dynamic variable with it's own value? i.e. !valA! = %valB% = this @ECHO OFF SETLOCAL EnableExtensions EnableDelayedExpansion ... ... FOR /F ... %%G IN (...) DO ( SET _temp=%%~nG SET _file=!_temp:~0,-4! SET _cnt=0 FOR /F ... %%L IN (...) DO ( SET _temp=%%L SET