That would be possible – the (only) LAN cable is installed closely to an extension lead with 6 plugs... I'm gonna try to change that, test the function again over night and report. The idea would correlate with the fact that in the old house everything in that respect was absolutely fine. I read from what you write that there's no chance the computer (through the LAN sockets) would send anything (probably a test signal that could be misinterpreted) causing the router to re-boot. If I can drop this suspicion, I feel at least a little bit more on a track.
Sonhospa
Posts
-
Strange, Recurring Router Reset When Connected by LAN -
Strange, Recurring Router Reset When Connected by LANThank you, Dave. I'm afraid that, if you were right, the error would NOT only affect the desktop computer but rather all connected devices - which it doesn't. The router as well as all the cables and sockets were exchanged by the provider twice already – they even had engineers replace the outside lines from the house to the area's "exchange unit".
-
Strange, Recurring Router Reset When Connected by LANHello everybody, It's my first question in 2022, so "happy new year" to all! I encounter a strange effect and really need an idea on how to find what is exactly happening and how to resolve the problem. Everything went perfectly fine in the exact same setup (as described in the following) before I moved house (coming from less than 1 mile away) a few months ago... Whilst other devices use WiFi to connect to my private WLAN, one of the desktops is supposed to use maximum speed (72 Mbps download) and bandwidth via a CAT-5 LAN cable. The router is a standard model of the provider and has been exchanged already, the desktop is running Windows 10 and permanently updated. In addition, I updated all the device drivers using the "Avast Driver Updater" software. What happens is that the Router (given it's connected via LAN) disconnects and reboots approximately every 1/2 hour. After approx. 1 minute it restarts (with the full procedure of lights blinking etc.), so that the interruption lasts around 2-3 minutes in total. For another 1/2 hour (this interval changes wildly, sometimes it is 1 hour, sometimes only 20 min or e.g. during the night even several hours) everything seems to be running normal with no indication of an error and at full speed. I've tried using 2 different LAN devices of the desktop computer (1 PCI-Express and a built-in Gigabit-device) and also all 4 different LAN inputs of the router. No change that I would have been able to observe. Since I couldn't resolve the problem, I'm currently using a WiFi stick which works perfectly but only makes 60% the speed (approx. 47 Mbps). Would someone please help me narrow down the error and/or give me hints on how/where I can find help on such a peculiar problem? Thank you very much in advance! Michael
-
Massive Confusion about DelegatesHi all, it's crazy but even after reading for hours I can't use delegates (with callback function) properly. In a small experimental application I only want that a particular class ("textfile", more or less a reader) updates the UI of a form. My simple question: In which of the classes will I have to a) define / b) instantiate / c) invoke the callback function? I guess I've tried all the different ways I know, but either the Delegate can't be accessed in one of the classes, or it is NOTHING at runtime. Thank you in advance for your advice! Regards Mick
-
Correct Expression For 'Any Character Including Whitespace'Hello and thank you both! :thumbsup: In order to solve the regex issue, I successfully tried to read the first three lines of each block:
\[CameraDefinition\.(?\d+)\]\r\nTitle\=(?.*)\r\nGuid\=(?<Guid>\{[0-9A-Fa-f\-]*\})</pre>Considering the results, this works well, is fast and gives me the title as an additional field. In case I recognize any errors, I'll go back to reading line by line and also consider your hint regarding general ini-file structure.
Thank you again, and have a nice day! :)
EDIT: Changing the critical middle part to the following helped...
<pre>\[CameraDefinition\.(?<CamNumber>\d+)\]\r\n(.*\r\n)Guid\=(?<Guid>\{[0-9A-Fa-f\-]*\})\r\n{1,}</pre>This way I have the correct matches as well. But: Still no capture if there are more lines between the top line and the GUID definition.</x-turndown> -
Correct Expression For 'Any Character Including Whitespace'Hi Richard, thank you for your response. It's exactly what I did meanwhile... still I hope someone knows an answer, so that this seemingly simple task wouldn't annoy me again :-)
-
Correct Expression For 'Any Character Including Whitespace'Hi all, I've been fighting with this for hours now, but don't get it to work. I want to strip out some information from an ini-file, which basically looks like this:
[CameraDefinition.1]
Title=Linke Seite
Guid={0ae3f864-da10-4e5a-977c-b9bba47d6f7a}
Description=Ansicht nach links
Origin=CenterIt's a standard Windows text file, the sections are separated with two new lines (\r\n\r\n). My regex currently looks like this: "\[CameraDefinition\.(?\d+)\][.|\s]*Guid=(?\{[0-9A-F\-]*\})" While the first (CamNumber) and the last part (Guid) return correct results as 'partial match', the critical part seems to be the underlined expression for "everything between the top and the Guid", which might be several lines. I'd be happy if someone of you helps me solve this... Thank you in advance! Regards Mick
-
How to dispose of a particular instance of a class?Thank you for this insight, Eddy. Still I am confused having the list.count variable reduced after removing the list entry (which is an instance), but the instance itself seems to be still alive (shared counter variable of the class doesn't decrement).
-
How to dispose of a particular instance of a class?Would that be a probable solution?
Public Class cfgFiles
Inherits SortedList(Of String, cfgFile)Private Shared files As New SortedList(Of String, cfgFile) Public Overloads Shared Sub Add(ByVal fileName As String) files.Add(fileName, New cfgFile(fileName)) End Sub Public Overloads Shared Sub Remove(ByVal fileName As String) Dim ff As cfgFile = files(fileName) ff.Dispose() files.Remove(fileName) End Sub Public Overloads Function GetEnumerator() As IEnumerator(Of cfgFile) Return files.GetEnumerator End Function Public Property SelectedItem As cfgFile Default Public Overloads Property Item(index As Integer) Get SelectedItem = files(index) Return SelectedItem End Get Set(value) ' as cfgFile? files(index) = value End Set End Property
End Class
-
How to dispose of a particular instance of a class?Hi Michael, I guess that's part of my question... I tried to put every newly created class into a List(of class), where I could add/remove entries. But removing elements from the list (i.e. list.count resulted in -1) didn't dispose of their instances (static counter variable, decremented inside the 'dispose' method, stayed the same). Thank you for guiding me further.
-
How to dispose of a particular instance of a class?Hello, this might be a dummy question, but I couldn't find a good answer on the internet yet. In my code I populate a CheckedListBox with the filenames of a particular filetype. If one of the entries gets checked ('ItemCheck' event of the CheckedListBox), I create an instance of a class that represents one of the relevant files.
If ctrl.GetItemCheckState(ctrl.SelectedIndex) = 0 Then ' create a new cfgFile class AND add it to the classes list ff = New cfgFile(ctrl.SelectedItem) lbl\_FileMessage.Text &= ff.Message Else ' How to dispose of the correct instance? End if
How can I properly dispose of the correct classes' instance, once the item is unchecked again? I thought about looping through the instances and check for their 'filename' property... but there doesn't seem to be a collection of instances, which I can refer to in a loop. Thank you for your advice, Mick
-
Help Needed Again: Funny Effects about My.SettingsHello, sorry again for the late response. With the help of your links (i.e. the articles) I was at least able to eliminate older/probably competing settings files and put most of the code into a new project which is running. Thank you for the advice, Eddy! I wish you a merry Christmas and a happy new year.
-
Help Needed Again: Funny Effects about My.SettingsHello Eddy, sorry for the late response, I didn't have access to programming stuff for a few days. While my VS2010 projects are on the "E:" harddrive, the user's folders (pictures, videos etc) are mapped to "F:\Media" on the same computer (separate harddrive). No network connections. I wonder what would cause such a twist... you seem to have an idea... Btw I'm under Win7-64bit.
-
Help Needed Again: Funny Effects about My.SettingsHi, I followed your advice (Eddy) with notepad++, setting the filter to "*.*" and searching for "My.Settings.UserSource_Path", because in initialization it's "nothing" which isn't a searchable string. I only get results from 2 vb-files, not even the settings.settings and settings.designer files of which I know they have the string in them. So this approach didn't help... Still can't find out why it's nothing instead of the project properties entry. Thank you though, Mick
-
Help Needed Again: Funny Effects about My.SettingsThank you, Eddy! In case you're still online: Does that method give different results than searching for the string in VS2010? Coz that's what I did already, searching for the String (the one that's not in the settings). I saw the code in the settings.designer file and in the settings.vb file, both hold the settings that I can see in the project properties, i.e. are correct. The string that appears (on hover) is the string that I entered at runtime (a different one for test purposes), and searching for it didn't bring any results. p.s.: Are you sure searching for ".cs" makes sense in a VB project? I'm asking seriously, as my programming knowledge is limited.
-
Help Needed Again: Funny Effects about My.SettingsThank you, Dave. Sorry for not being specific enough. The breakpoint is on that line, as you assume, but I should be able to see (hovering) the value of "My.Settings.UserSourcePath". This was the case before as well as it is in a new project. Hovering over it, I see the wrong path which must be stored somewhere... The custom control is in the same project, just in a subdirectory named "Controls", and it's in the Namespace "Controls" as well. In the designer I assign the textfields value to "My.Settings.UserSourcePath" as well. Do you have further hints what to examine? EDIT / ADDITIONAL: I just played around with manually changing the settings and then debugging. That makes it even more funny, since I found that some of the values actually do come from the manual settings (main settings file), all of them referenced through "My.Settings.xxx". So the problem doesn't seem to be Namespaces related - I hope the assumption is ok. But how can I find out WHERE the variable "My.Settings.UserSourcePath" comes from, i.e. why I get my latest runtime entry instead of the actual setting????
-
Help Needed Again: Funny Effects about My.SettingsHello again, unfortunately my problem (just below) looked like resolved, but something got completely twisted. Something seems to be really wrong in my Settings configuration, since I have the following effects: - In my main form, I have a custom control, which (of course) is initialized in the form designer. - A text field in it is supposed to open with a path retrieved from My.Settings, the UserSourcePath. - When debugging I stop the code during initialization in the line "Private _userSourcPath As String = My.Settings.UserSourcePath" and check for the value --> FUNNY: It' not the value that I have in the settings, but a value that I set at runtime when debugging before. :confused: Everything else seems to work quite normal, e.g. the settings I made show in the projects properties as supposed to. I have no idea where this alternative setting is stored i.e. from where it's retrieved. Searching the string with Ctrl-F doesn't give any results. Could someone please give me any hints how to resolve this strange effect? Where can I search for the string that's actually used instead of my intended setting? Thank you, Mick
-
My.Settings out of scope?Thank you though, Richard. Finally I found the problem: The file "settings.designer.vb" had it's first part of the code (where the properties are defined) wrapped into "Namespace My"/"End Namespace". Obviously that's not right and lead to wrong references / empty string. Now it works again :thumbsup:! Have a nice day, Mick
-
My.Settings out of scope?Thank you, Richard - but both methods work normal and I see the usual page with my user settings. The problem occurs when "InitializeComponent" calls
Private _userSourcePath As String = My.Settings.UserSourcePath <--------------
Public Property UserSourcePath() As String
Get...which is called by , returns an empty string instead of the actual settings entry. I think I must have made an error when manually editing the mentioned files. For example, I don't know where I would place the Namespace reference in "app.config" or in the settings files. Any other idea?
-
My.Settings out of scope?Hello to everyone, it might sound funny, but in a current project "suddenly" (i.e. I don't know what I exactly did) the references to "My.Settings" didn't work anymore. Instead, I had many errors saying that "Settings" isn't a property of "My". What I did: I opened a completely new (winforms-) project and looked into the files having "My.Settings" (etc) in their text, and adapted my project files "app.config", "settings.settings" and "settings.designer" (manually inserting the properties) to the syntax and entries I saw in the new (sample) project. First I thought it's ok: All the error messages disappeared. But when debugging, I can see that my settings references (e.g. "My.Settings.UserPath") only supply empty strings. This implies to me that the valid entries must be out of the valid scope (or something like that), i.e. I must have overlooked something... typos are checked. Could one of you please advise me, where else I might look for errors or what else I could do? Thank you very much in advance, Mick