|
Edward Nutting wrote: Any tips on installation/integration?
They've got a special section on plugins[^], hook up SourceSafe[^]..
Aw, with integration you mean tips on embedding it in the website, of course, not integration with other apps. Ehr, no tips there, I'm a WinForms person. My idea of embedding a website is an IFRAME
FogBugz isn't free, and there may be good and free alternatives that fit the bill that I don't know of. Give it a day or two, as there may be more ideas from other forum-members.
Bastard Programmer from Hell
|
|
|
|
|
which one is faster?
fetching processed data from database
or processing data at asp page
for example i have two dates - start date and end date. on almost all the pages i need total number of days between these two dates. also all dates between them etc. so should i store total number of days in DB or process it on each page where i need them?
________________
Waiting for answer...
We can have facts without thinking but we cannot have thinking without facts.
****************
|
|
|
|
|
Calculating the number of dates between two dates, or determining each date between two dates, is such a trivial task that you will almost certainly get worse performance retrieving them from a database. Put another way; A database connection and command execution will be many times slower than counting from startDate to endDate.
For refernce, the two method look like this:
public static double NumberOfDaysInRange(DateTime startDate, DateTime endDate)
{
return endDate.Subtract(startDate).TotalDays;
}
public static IEnumerable<DateTime> DatesInRange(DateTime startDate, DateTime endDate)
{
for(var date = startDate; date<endDate; date = date.AddDays(1))
yield return date;
}
Live example: http://rextester.com/JKDTC31937[^]
|
|
|
|
|
thanks. easy methods to calculate numofdays. ...
________________
We can have facts without thinking but we cannot have thinking without facts.
****************
|
|
|
|
|
Use the TimeSpan class to calculate date differences.
DateTime dt1 = ...;
DateTime dt2 = ...;
TimeSpan ts = dt1 - dt2;
int days = ts.Days;
|
|
|
|
|
|
Since you are probably going to have to retrieve the start or end date from a database anyway, there is going to be little or no real performance difference between them. However, it is always worth storing dates as dates and doing any necessary match later. If nothing else, it allows you to change how you do the math without affecting the data, or to filter based on end date. For example, today it could be "number of days between" you need - tomorrow it could be "number of complete weeks between". If you store only the days difference, you cannot calculate the weeks accurately for existing data.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
thanks, liked your answer. much understandable and close to my question.
i have two dates "StartDate" & "EndDate" stored in database as datetime datatype. everywhere i need to show these dates i need to show total number of days as well in between. (there is no such comparison as of now).
right now we are only storing dates not total number of days. so what the programmer doing is. . . he is calculating total number of days on each page on the basis of start date and end date fetch from database.
i think in this case, it is good to store number_of_days in DB rather to calculate them everywhere.
Right?
________________
We can have facts without thinking but we cannot have thinking without facts.
****************
|
|
|
|
|
Probably not - it is storing redundant information (i.e., you can calculate it from the two dates) so it introduces the possibility of the two sets of info being out of step - which can cause some horrible-to-spot intermittent bugs. If you are going to be using it really, really often (like on 50,000 records per second) then it could be worth the extra storage and space, but otherwise the really time consumer is going to be setting up the DB connection and accessing the data anyway. If you are really worried, you could move the calculation to the SQL Server by doing it as part of the query but frankly, given this is a website thing, if the extra cost of a DateTime subtraction is a major problem to your webserver then you seriously need to look at an upgrade! (Or a massive overhaul of your website as a whole)
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
 "hi there, thanks a lot for reply to this question again.
i read ur answer so many times then it was cleared. your way of communication is quit difficult to understand for someone who is not English.
well can you please reply me again of below question.
i am really confused how to design the database for the below requirement. please read the requirement summary below and answer these question.
This is a wizard kind of data forms:
- at first page, I have a date range, that i am storing in database as datetime datatype "StartDate" & "EndDate"
- On the 2nd step. I am showing total_number_of_days
- On 3rd Step, I am showing both dates with total_number_of_days. Here I need a Grid filled with all the dates (days) between "StartDate" & "EndDate" with day name and day number.
- On 4th step I again have the dates with total_num_of_days, but here i also have date range selection. this section should be beteen the "StartDate" & "EndDate" stored previously.
- Now after selecting date range from 4th step, i need to show a tabular data with all the dates selected in 4th step.
I need to store some other related information on each step for each day.
Should I store all dates in a separate table? so that all related information can be connected properly by a foreign key relation.
otherwise If i will not store each day separately how can i make a relation between the day and the other related data?
eagerly waiting for your reply...
"
It's difficult to answer with a absolute "do it this way", but in general:
If you are storing the same information for different days, then you need a row for each day (and hence a new table), referencing back to your date range row. I would think from the info you have given that you need a table to hold the start and end date (but not to hold the number of days between - that can be calculated each time) and a table to hold each day's information, with a forieng key back to the start and end row ID.
If the information for a day consists of the same information types repeated, then that should have it's own table, referencing back to the Day table by a foreign key.
Try it on sheets of paper! You will see what I mean.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
thanks to explain in a easy way. i got it all. except the last one. what do you mean by the last line>>>Try it on sheets of paper!?????
________________
We can have facts without thinking but we cannot have thinking without facts.
****************
|
|
|
|
|
If you are not sure how a DB design is going to work, take several sheets of paper, and use each one as a separate table. Then manually run through all the operations you are going to do with a pencil, and see how easy it is to work with. You can sometimes see that a small change can make your life a lot easier.
It can be a lot clearer to see the whole system than leaping into a real database straight away.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
thanks. i always do the same while designing complex database. i mean... i manually fill all the tables on paper if all goes fine then add thoes tables in the databse server otherwise need some change. right now the thing i want to confirm was performaance and then data storage space.. as u mention redundant etc etc.. well thanks for all you explained.
________________
We can have facts without thinking but we cannot have thinking without facts.
****************
|
|
|
|
|
Hello Sir, I m Dnyanesh...! sir i write this message personally to you...! i have found much more suggestion and solution from your site..! i really appriciate of it! but now i have a one conclusion about my windows application...!
my problem is same that where u did gave me solution before! but its heavy to work!
sir i have a windows application in c#.Net and there are uncountable controls..! and now for me its not possible to set the every controls property Dock and Anchor! so sir is there any other solution to set the every controls property Dock and Anchor at one single time or any .dll file which can i easily add to make chages for resizing my form with controls..!
please sir give me a appropriate suggetion or
solution for my problem...!
i am waiting sir of your reply..! 
|
|
|
|
|
You can always do this via code.
Something like
foreach (Control item in this.Controls)
{
item.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
}
In this way you dont need to set the properties for each control.
|
|
|
|
|
Abhinav's solution will work, but it will set the anchor to the same for all controls.
Did you know you can select multiple controls in the VS Designer by dragging a rubber band line around them, starting in a blank bit of the form? And that any property changes made to a multiple selection affect the whole group? This includes the Anchor property.
However, I would try to organise my controls better for the users sake, using maybe Tab controls, or similar - if you as the designer can't work with that many controls, how do you expect the user to cope?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
This is the second repost of an original question posted Jan. 12 on QA [^].
I answered the first repost question here: [^], and mentioned the same information provided by Original Griff in his answer here.
Because of the re-posting, and ignoring a previously accepted answer, I will, reluctantly, "vote" to remove this message.
sorry, Bill
"The first principle is that you must not fool yourself, and you are the easiest person to fool." Richard Feynman
|
|
|
|
|
I am sorry sir..! i will not behave like foolish in future..! but there were something wrong so that's why i did asked to get a new suggestion from your site that was only my intention..!sorry sir if you hurt! please forgive me! 
|
|
|
|
|
Hi,
It's my first SubReport, and Iam trying to make some RDLC -Subreport. Can anybody can show me the further steps...?
The below code is for main report... But I want to display this report (For_RDLC_Check_Appln.Check_Report1.rdlc) and subreport in reportviewer...
Is it possible? Any sample cods for Subreport ?
Thanks
<pre>reportViewer1.RefreshReport();
Microsoft.Reporting.WinForms.ReportDataSource ReptRDS = new Microsoft.Reporting.WinForms.ReportDataSource();
ReptRDS.Name = "DataSet1";
ReptRDS.Value = MyReptDataTable;
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(ReptRDS);
reportViewer1.LocalReport.ReportEmbeddedResource ="For_RDLC_Check_Appln.Check_Report1.rdlc";
reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
reportViewer1.RefreshReport();
reportViewer1.Visible = true;
|
|
|
|
|
|
Sorry for the delayed reply....Thankyou ThatRaja
|
|
|
|
|
Hi,
I create a Com add in Excel. I have the same method in two version: the first use TLP lib for a loop, the second the standard sequential loop.
I have a 4 processor pc. I'm using Excel2003. I see that the performance of TLP version is better in term of time consuming.
Can you confirm can I can transfer C# TLP advantage using COM add in? I thought that even if I have a parallel thread code in my ADD in, in excel it will work in sequential way. I thought it was like to run a code using TLP on a single processor PC. Probably I was wrong.
Can you confirm?
Thanks for your time
|
|
|
|
|
hello guys... I was thinking if it was possible to get the login and logout time of the particular windows user and store that on a text file? A windows service could be one of the choices for this purpose.
I have tried few queries on google but could not find a right direction.
|
|
|
|
|
The Win32_LogonSession class[^] can help you get some information.
|
|
|
|
|
Thanx...it helped 
|
|
|
|