I have a gridview, I am binding the gridview with a datatable and in the gridView, my autogenerateColumn is set to true since I am generating the columns dynamically coming from database. I am also doing doing showFooter =true. There are values in the rows of these dynamically generated columns. I need to calculate the average of each of these columns and display it in the footer. so for e.g, I have
A B C 10 11 12 13 14 15 16 12 11 -- -- -- 13 12.3 12.6
There are two tables 1)HR_OrderRequest (column to be considered is HRdate) other columns are HRUID,UID
2)HR_Supplydetails(colmn to be considered is HRUID) other columns are createddttm,UID
by considering the date from HR_Supplydetails we should find the average days taken for that particular UID time taken to release of HRdate .I have a problem getting a average of days
Last night I did a load test on a site. I found that one of my shared caches is a bottleneck. I'm using a ReaderWriterLockSlim to control the updates of the data. Unfortunately at one point there are ~200 requests trying to update the data at approximately the same time. This also coincided with CPU usage spikes.
The data being updated is in the ASP.NET Cache. What I'd like to do is if the CPU usage is around 75%, I'd like to just skip the cache and hit the database on another machine.
My problem is that I don't know how expensive it is to create a new performance counter to check the cpu usage. Also, if I would probably like the average cpu usage over the last 2 or 3 seconds. However, I can't sit there and calculate the cpu time as that would take longer than it's taking to update the cache currently.
Is there an easy way to get the average CPU usage? Are there any drawbacks to this?
I'm also considering totaling the wait count for the lock and then at a certain threshold switch over to the database. The concern I had with this approach would be that changing hardware might allow more locks with less of a strain on the system. And also finding the right balance for the threshold would be cumbersome and it doesn't take into account any other load on the machine. But it's a simple approach, and simple is 99% of the time better.
I have two datetime2(1) fields in my db. I will calculate the time in hours and minutes between them. That I have done this way:
[Code]....
This works. But how can I calculate the avgerage speed if I have drived 665 kilometers in this time? I know how to do it with only houurs but not with the minutes to. I have tried this and I think it works. Is it correct?
There are various website speed test online tools available. Few of them are listed on: [URL] I tested my website using iweb and selfseo. My website is showing 0.03KB Average speed per KB everywhere. Even google also is giving same kind of results.I tested the site using Page Speed and YSlow. I have already followed most of the recommendations suggested by these tools like efficient use CSS, contents across the domains, caching, compression and all. But still I am getting the same average speed per kb. Page speed is showing around 85/100 as my page speed score, so I guess I have optimized my site a lot. My questions here are:
1. What are the other factors affecting the avg speed per kb of a website?
2. How to improve the Avg speed per kb?
3. Is there anything related with the Server Software and Hardware that I have to check?
Note: I tested by uploading a plain html page with simple text "Hello World", but the avg speed per kb is the same for this page as well. Same is the case with the rest of the pages.
Application Platform : ASP.Net 3.5, C#3.0, LINQ as Data Access, SQL Server 2008
how can we find average at the right side of datas in a matrix. I created matrix and by right clicking on the cell , there is 'Subtotal' But after cliking that dont get any sum, but only last value is displayed as sum. How can i resolve this?
I am having some issues with the performance. I am binding a Gridview with around 200 records and it is taking a long time. At one time I only display 10 records on the page, but I bind all the 200 records.
Generally what is the number of records that should be bound to a gridview ?
I have created a student webpage with many tables like student info,test1 marks,test 2 marks and so on now i have to generate a report for each and every student with their details and average marks in each subject
What im trying to do is have an edit button that instead of opening the line for editing, it forwards you to a page where you can edit. Is this possible? I tried something with the client template, but the grid render is ignoring it completely.
In my .cs file i calculate value of BV, MV, KV total value with this code and i assign to a Label. Labels are under the Gridview. BUT, some customer names long some of short, because of that, labels location changing according to Gridview. Because of that i don't want use Label.
I calculate a value with this code, and how can i assing BV, MV and KV columns footer this value?
Region ( ID int, Name varchar(50), Description varchar(51) )
One thing I can use is to retrieve the max(ID) from region and store it in a variable and increment the variable sequentially and insert. But, if any other user inserts a record while I am executing this script then max(id) might clash with the id inserted with other user causing my script to fail.
Is there any other option to insert record sequentially base on the highest number in the table.
What we need is a two column layout (left column approx. 200px with the right column 100% for the rest of the width). We need a header on top and a footer on bottom. Both the header and footer can be fixed heights if that's what's needed. The footer needs to "stick" to the bottom of the browser. The two columns both need to fill in 100% height down to the footer when the content is short, and push the footer down when the content is long. Finally, we need this to be a CSS-only solution (no JavaScript).
I have implemented column tolals in the footer of my gridview using the technicque described in this article [URL] .
Now I would like to have a total of the 7 column totals that are displayed in the footer. Can anyone tell me how to do this. I would like to display this in a label or an addition row in the footer if that is possible.
I have a rating control that shows the average rating of a user supplied posting (think of a forum post that others will rate). So if the average rating for that posting is lets say 3 out of 5 all users will see 3 stars. If someone wants to rate the posting, then they could click lets say 4 stars and I save the rating to the database, re-average the current rating and display the result (which may or may not still be 3 at this point). So far so good. The problem comes in when a user wants to agree that it's 3 stars. Since the rating control currently shows 3 stars, choosing 3 again does not cause a postback. In my case even though the value didnt technically change, I need to capture the users choice so I can average it in and save that users rating. I also modify the UI so that I can show each user of the site what he/she choose as a rating.How can i get the control to let me know that a user choose a star rating even if its the same one the control is currently displaying?