.net - Memoryusage Drops After A Week?

May 18, 2011

I have this app written in VB.Net with winforms that shows some stats and pictures on a bigscreen monitor.I also monitor the memory usage of sad app by using this. Process.WorkingSet64

I know windows does not always report the correct usage but I just wanted to know if I didn't have any little memory leaks which I had but are solved now. But the first week the memory usage was around 100MB and the second week the memory usage showed around 50MB.

So why did it all of a sudden drop while still running the exact same code?I can hardly imagine that the garbage collector kicked in this late since the app refreshes every 10 seconds and it has ample time in between those periods to do it's thing.Or perhaps there is just better way to get memory usage for a process that is more reliable.

View 1 Replies


ADVERTISEMENT

Calculate The Start And End Date Of A Week Given The Week Number And Year In C# (based On The ISO Specification)?

Aug 4, 2009

I need to generate a report that shows the 52 weeks of a year (or 53 weeks as some years have) and their start and end dates. There is an ISO spec to do this but seems awfully complicated! Im hoping someone knows of a way to do it in C# or Visual Basic (its actually for Visual Basic 6 but I will try port it across)

View 7 Replies

C# - Group By Week Of Year (Week Number) In Linq To SQL

Aug 6, 2010

In regular SQL i could do something like

SELECT * From T GROUP BY DATEPART(wk, T.Date)

How can i do that in Linq to SQL ?

The following don't work

From F In DB.T Group R By DatePart(DateInterval.WeekOfYear, F.Date)

Also don't work:

From F In DB.T Group R By (F.Date.DayOfYear / 7)

View 4 Replies

TCP Connection Drops Out

Sep 25, 2011

I have written a application that has a TCP client and server to connect to a PLC. The Client works perfectly but it looks like the server drops out all the time. What happens is when I first start the connection it will update without any problems but after about 1min of no transfer the PLC can no longer send data to the application. Neither system gives an error and the PLC shows that it is transmitting the data but nothing comes through on the application side of things. I have tried to put in heartbeat to see if that would stop the drop out but to no avail.[code]

View 10 Replies

Received TCP Packet Drops First Byte?

Aug 2, 2010

I've been using some code which I found on the net, and have noticed that the first byte is never recieved. Annoyingly, this contains the MAC addresses, which is the bit I want. Below is the relevant snippits:

Public Sub [Start]()
If m_Socket Is Nothing Then
Try

[Code].....

View 5 Replies

VS 2010 - What To Do When Network Connection Drops With FileSystemWatcher

Jul 15, 2011

I can't see anything in the method list that lets you know when a connection drops (and since it's constantly checking, it seems that could have been in there, to raise a flag when it can't find the connection anymore...no?). Is there a way to know if the network connection drops? Is there a way to reconnect it? Is it just a matter of turning EnableRaisingEvents() off and back on to re-establish the link to the network share?

View 6 Replies

When I Click On LstPlaylist, It Drops The Selection For All Lists?

Oct 2, 2010

I have 3 lists in my form.When 1 list is clicked, I want to drop the selection in the other 2 lists.

Private Sub lstPlaylist_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstPlaylist.SelectedIndexChanged
lstArtist.ClearSelected()[code]....

This is my current code. When I click on lstPlaylist, it drops the selection for all lists.

View 1 Replies

Insert Pop Up Error If Connection Drops Or Download Fails

Feb 7, 2011

I built a dwonloader program which download a file from the web. I would like to insert an error message that pop up whenever the program fail to download the file and/or when the computer gets disconnected from the internet while the program is downloading the file.

View 12 Replies

.net - Visual Studio Loses/drops/deletes VB Continuation Lines After Subroutines?

Nov 20, 2009

Several times while debugging a VB.Net program I have found that continuation lines are missing from a subroutine designed to handle an event. The continuation character "_" is there but the following line is missing

[Code]...

The first few times I figured I had made some editing error, but this has happened 3 times now, always in the same way (different subroutines but same place). As far as I can tell, no other continuation lines have changed. Is this a bug or some feature I have missed?

View 2 Replies

Make Part That Drops Down Semi-transparent Or Completely Transparent Resembling Floating Text?

Oct 27, 2010

[code] how to make the part that drops down semi-transparent or completely transparent resembling floating text. So that I can see the form underneath.

View 1 Replies

.net - Using A FileStream On A Network When The Network Drops?

Mar 26, 2012

I am writing some code as part of a framework for opening a file.The file is of custom type and should not be opened by more than one instance of my application. To stop multiple file opening I use a filestream to create a lock file and then keep said filestream open. This seems to work in preventing another instance of my application from opening the file ( as it will fail in recreating the lock stream in the files open code ) but if the file is on a network share and the network drops then the original application also can not access the file any more.The code to get the lock stream is as follows:

Try
' We need to keep this stream alive to prevent other applications gaining access to the lock
mLockStream = New FileStream(mLockPath, FileMode.CreateNew, FileAccess.Write, FileShare.None)[code]....

In this I create the lock stream the first time round and then if another application tries to create it, it throws an exception and stops them from getting any further. This is kind of how it needs to work, unfortunately as I said, if this is done across a network and then the network connection is dropped for some reason then I can not delete the lock stream as I get an IOException telling me a process cannot access the file as it is open in another process ( which shouldn't be happening I don't think).

View 1 Replies

How To Get Name From Day Of Week

Jun 8, 2011

how to get the name from dayofweek? [code]

View 3 Replies

Day Of Week Calculator?

Mar 30, 2012

Sorry in advance. I emailed myself my coding since I don't have vb on my personal computer. Sooo, the format is going to be off. But my program allows the computer to generate a random date. The user has to guess what day of the week the random date lands on. I have written the whole code. It all works except when user checks his/her answer. The answer always comes up as incorrect. Here is the coding:

[code]...

View 5 Replies

Find The First Day Of The Week?

Jan 21, 2010

So I can't figure out how to find the first day of the week. I also need it in a format like ("yyyyMMdd")

Right now I only have it telling me its Sunday. I need the exact date.

Dim FDW As Date
FDW = WeekdayName(1, FirstDayOfWeek.System)
MessageBox.Show(FDW)

View 2 Replies

Get Day Of Week From A Date?

Jun 1, 2011

I need a function that will give me the day of the week for any date...and possible assign the day of the week to a string...

View 1 Replies

Getting The First Day Of The Week Then The Date Of That Day?

Dec 13, 2011

I'm having some trouble getting the first day of the current week, then getting the date of that day.

Public NotInheritable Class FirstDayOfWeekUtility
Private Sub New()
End Sub

[Code]......

View 2 Replies

Set +1 To An Integer Each Week?

Oct 14, 2011

I have a ComboBox where I select which day of the week I want it to update. And each week at that day, at a predefined time as well I want it to add 1 to an integer. I want it to continue doing this until I stop it. When I close the program I want it to do a check on start up if it has past that set date and time, if it has it should add 1 to the integer again, if 2 weeks have past I want it to add 2 to the integer.

View 14 Replies

VS 2008 :: How To Get Day Of The Week

Mar 31, 2009

How To Get Day Of The Week for example : on label1I Want To Code The Program That Turns Off The Computer On Saturday And Sunday

label1.text = 'The Day Of The Week Code'
if label1.text = "Saturday" then
Shell("Shutdown -s -t 1")

[code].....

View 2 Replies

Asp.net - Converting Date To Day Of Week?

Mar 21, 2010

is there any ready to go solution within the microsoft framework, regarding conversion of date to day?For example, i would like to convert this string 21/03/2010 (dd/mm/yyyy) to Sunday?

View 5 Replies

Check Day Of Week In Program?

Feb 2, 2010

How do you check the day of the week in VB.net 2003?[code]...

View 3 Replies

Display The Day Current Day Of The Week In VB?

Apr 11, 2010

Can anyone tell me what the code is for displaying the current day in visual basic on a form in a textbox

ie: Monday,Tuesday ect. day now

View 1 Replies

Display The Week Number Only?

Apr 1, 2010

I am useing Visual Basic 2008 and on a form....

....how do i display the week Number only in a textbox or label

View 7 Replies

Finding The Day Of The Week Converter?

Mar 15, 2011

Ok so i'm working on this project that requires me to imput a month and year which then will output the number of days in the selected month for you to select from, then determines what day of the week it is. The problem i'm having is that I cant get the month to the converted value that I need for it to work . Example: January will be the 13th month and february as the 14th of the previous year. Heres what i have so far if it helps. Aslo the code that I have to use to find the day of the week only works when the total is divided by 7, and then the value of the remainder is the day of the week with saturday =0, sunday=1, monday=2, and so on.

[code]...

View 4 Replies

Finding Week Of The Month?

May 10, 2009

A month consistof weeks and i want to find out which week of the current month.

View 2 Replies

Getting Records By Month And Week?

May 31, 2012

I just want to clarify my select statement if correct to get records from my table. Please see below

List for products 3 months before Expire genReportExpires("SELECT * FROM t_products WHERE f_expire < #" & Date.Now & "# - Interval 3 month ")List of products 2 months before ExpiregenReportExpires("SELECT * FROM t_products WHERE f_expire < #" & Date.Now & "# - Interval 2 month ")List of products 1 month before Expire
genReportExpires("SELECT * FROM t_products WHERE f_expire < #" & Date.Now & "# - Interval 1 month ")
List of products 1 week before Expire genReportExpires("SELECT * FROM t_products WHERE f_expire < #" & Date.Now & "# - Interval 1 week ")

View 2 Replies

How To Loop Through Days Of Week

Mar 22, 2012

I need to loop through each day of the week (monday tues...) and compare the day to a string.I know I can manually add each day of week to a string array, but that's not what prefer.[code]

View 2 Replies

Saving Days Of Week - MVC?

May 24, 2012

I have this:

this is a extension method for calculating the dates for a week,

public static IEnumerable<SelectListItem> GetWeekNumbers(this HtmlHelper helper /*Dictionary<int, DateTime> dayOfWeek*/ /*,DateTime allWeeks*/ /*int selectID*/)
{

[Code]....

But how to get an optvalue in asp.net MVC 3.Because the dates has to be saved in the databse.

View 3 Replies

VS 2008 - How To Get Day Of Week On Label

May 4, 2010

How To Get Day Of The Week for example : on label1. I Want To Code The Program That Turns Off The Computer On Saturday And Sunday

label1.text = 'The Day Of The Week Code'
if label1.text = "Saturday" then
Shell("Shutdown -s -t 1")
end if
if label1.text = "Sunday" then
Shell("Shutdown -s -t 1")
end if

View 2 Replies

VS 2008 Backup Once A Week?

Feb 26, 2010

I have an application with a button on it which launches a backup program. I actually want to backup it each week. So when you launch the program, it looks if its time to backup. What code could i use, i don't really think i need to be saving things in text files, do i ?

View 4 Replies

.net - Equiv To Get Week Of Year By Datepart In C#?

Aug 29, 2011

I have a code in vb

var weekOfYear=DateAndTime.DatePart(DateInterval.WeekOfYear, date, FirstDayOfWeek.Monday, FirstWeekOfYear.FirstFullWeek);

which is [URL].. I canÄ… find nothing equivalent to this in c¤, but I don't want to create new algorithm, which I think would have some bugs

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved