|
Then keep the code at work; you can Remote Desktop to your dev PC if you want to work on it from home.
Anything you write during work hours is owned by the company.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
For (small, or any) business document management, I would recommend SharePoint Online. It's like $5.00 per month per user; quit any time. You'll never match what it provides out of the box.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
So, nearly posted a bug; but I understand I upvoted you already and can't do that twice!
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Listen to Dave - it is important.
If you can set up a shared drive between work and home (google, one drive, dropbox etc) then you can set the project folder to that drive within VS.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Yeah, I guess that's the way to go. I'll look into it.
|
|
|
|
|
Hello folks!
In several Winsock programs, I see that a loop with
n = select(max_sock, &read_fd, &write_fd, &except_fd, &timeval);
operation on a non-blocking socket takes approx. 2 seconds to determine there is no
listener for that socket. Even for a localhost:55117 operation.
I have no listening program on port 55117. And I'd expect this to be faster.
Even with curl that's bundled with Windows, I see this:
c:\> curl -4 localhost:55117
curl: (7) Failed to connect to localhost port 55117 after 2055 ms: Connection refused
What / where is this 2 sec. set?
-- Gisle V.
|
|
|
|
|
What do you have set for your timeval?
|
|
|
|
|
|
|
Well, I do not care if select() takes 1 milli-sec to complete.
What I'm asking is why it in total takes 2 seconds (2000 select-loops) to conclude the port is closed (no listener).
-- Gisle V.
|
|
|
|
|
Because there is no way to determine there is no listener unless you wait an appropriate amount of time for the server you tried to connect to to respond. If you waited one millisecond and the server you're connecting to doesn't respond to the connection request for 500 milliseconds, your code just assumed there was no response, and therefore no listener on the other end. In reality, your code was impatient and didn't wait long enough for the response to the connection request.
|
|
|
|
|
That make sense. But where is that time-limit determined?
-- Gisle V.
|
|
|
|
|
It's part of the Connection to the socket. The timeout you're specifying is for data transfer and query once the connection is setup. It has nothing to do with the time it takes to setup the connection itself.
|
|
|
|
|
TIMEVAL is combination of seconds and microseconds; there is no explicit millisecond setting for TIMEVAL.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
No? tv.tv_usec = 1000; is 1 milli-seconds according to what I learned in 2nd grade.
-- Gisle V.
|
|
|
|
|
True. You've confirmed that tv.tv_sec == 0, right?
Keep Calm and Carry On
|
|
|
|
|
Just mentioning it. I would have said 1000 microseconds in the first place because the possibilities otherwise are endless.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Gisle Vanem wrote: And I'd expect this to be faster. That's the error. What gave you that expectation, and why burn time/money on it?
Gisle Vanem wrote: What / where is this 2 sec. set? Google around and posts point to the registry; but that's not it and will not work. It's not part of the .NET environment, but the network. It's not a regular "setting" of sorts, and 0s on a non-realtime OS is nonsense.
Even on a realtime OS, I'd expect a similar delay to ensure you do not receive packets that were intended for the (now) closed connection.
--edit; I forgot to mention, select is not broken.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
modified 2-Jul-22 16:33pm.
|
|
|
|
|
Hi,
I think it's waiting for the default SYN timeout period. I believe it's 1 second on Linux and 2 seconds on Windows.
You can change this value on Windows with the Set-NetTCPSetting[^] powershell cmdlet. You would need to set the InitialRtoMs value.
Although I don't actually know off the top of my head if this would fix your select() problem. Try it and let me know.
|
|
|
|
|
The usual dumb question from me... and I apologize for being this way. But I see as a trend here in CP project Articles' posters' run up to publishing ... tag lack, beyond the general Visual Studio. It's easy to browse the code; yes. Read the Format version, the actual VS "#" and then there's the "VisualStudioVersion".
I suppose I want to head off the "This project created with a newer version of Visual Studio" warning. But that "MinimumVisualStudioVersion" has always had me baffled as when I open a newer project that, if the "minimum" were indeed something to Visual Studio, my VS, which passes muster according to this spec, never seems to be able to do much in the way of filling out the Browser tree beyond the next message "fail to load project" (sp).
Short of suggesting I subscribe to the latest VS incarnation, are there any acceptable apologies for for this descriptive non sense from MS then?
|
|
|
|
|
|
Why has Binding never caught on in Windows Forms. I have been using binding in Wpf for years. Have not paid much attention to Windows Forms. Someone just pointed out that Windows Forms has binding. Looking it up they have had it since .Net2. Occasionally I have had to maintain a Windows Forms app and have never seen it used.
So many years of programming I have forgotten more languages than I know.
|
|
|
|
|
I have used binding for more than 10 years in Windows Forms projects.
|
|
|
|
|
If one never leaves the Designer, and believes all the "no code behind", then one never learns about Windows Forms binding, etc. It's when you start writing your own framework(s) and patterns that all this starts to come to the surface. For some, that is a bad thing ("details").
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Binding is Good(Less coding) and Bad(more code to control)
If you want full control on your form workflow, don't use binding
If you bind a control (textbox) to datasource (access or mssql) to field ID (AutoNumber) and you want to add new record, the textbox will display -1 (you have more coding to prevent it)
sometimes you will not be able to leave textbox binded to numberic (int,dec) empty (blank), unless you enter a value (you have more coding to allow it)
binding is powerful and easy if used with dataset, but not easy if used with LinqToSql or EF
In my form, I use binding and manual where necessary.
|
|
|
|