|
Biplob Singha Shee wrote: Our users want....
f. should be done yesterday
g. should not contain ANY errors (expected or unexpected)
h. should run on the oldest hardware in the company, but at the same speed as newer computers
i. if the OS (or even the printer) gives an error while running your app, it's the apps fault
j. should be available on the internet, even without connection
k. should be built using WPF, and still run on Linux
l. should not be in a managed language because that's slow, but it has to be a .NET language
m. should be able to handle 8 Gb of memory, even on a 1Gb 32bit XP machine. After all, it's got "virtual memory".
..whatever they want will come at a price-tag, and will have to be realistic.
You can write the last "known datetime" to a textfile, and check that when you start your app; if your last previous start was "in the future", compared to today, you'll know that the clock has been turned back. Or that the battery of the internal clock died, either one.
That's also easy to circumvent if one wants to copy the app illegaly - so the question is rather if the users "need" this.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: You can write the last "known datetime" to a textfile, and check that when you
start your app; if your last previous start was "in the future", compared to
today, you'll know that the clock has been turned back. Or that the battery of
the internal clock died, either one.
In fact, I have a system running well for nearly five years.
Is provided to the client an encrypted file for activation and with license information, which contains the current date (validated by our services). In the process of software installation, this file is copied to the client system.
Whenever the application starts up, this date in the license file is compared with the data from the local system. If the local system date is older than the date recorded in the license file, this indicates that the user manipulated the date (or the BIOS battery is over).
In such case, the application will inform the user of this and will automatically terminate. Even in this case the current system date is recorded in the file whenever it is greater than data recorded previously.
In any situation, you should call on our helpdesk services for assessment.
The system is working very well for the needs. So far, no complaints from customers.
Just trying to help.
Artur Gomes
|
|
|
|
|
This strikes me as an adequate solution, won't guarantee a hacker won't break it but obviously works well for a real world solution. There are probably a limited number ofpeople who would bother breaking some reasonable encryption (we use to add 127 to each character in the early 90s and it worked fine).
I can't understand why Dave didn't suggest this 120 posts ago!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Richard Deeming wrote: Even if you use the IP address? I'd curse for a second and fire up fiddler as a reverse proxy.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have a form with about 10 text boxes . Now I need to allow the user to press the Enter key .
For Example -:
Textbox1.Text
Textbox2.Text
Textbox3.Text
Textbox4.Text
Textbox5.Text
Textbox6.Text
Textbox7.Text
Textbox8.Text
Textbox9.Text
Textbox10.Text
When i enter the detail in first Textbox user need to press " ENTER ". If user press ENTER button cursor will moving Textbox2.Again press "Enter" cursor will going Textbox 3.So I need to make for all textboxes likethis ? How can i ? Can You help me ? Thank You....
|
|
|
|
|
It's the TAB key, not the Enter key. The Enter key is expected to cause the same effects as a click on the OK button.
Make sure that the TabIndex property of your TextBoxes matches their expected order.
|
|
|
|
|
You need to specify what you're writing the UI in. Is it WPF? Windows Forms? ASP.NET WebForms? Something else?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Private Sub Textbox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Textbox1.KeyDown
If e.KeyCode = Keys.Enter Then
Textbox2.Focus()
End If
End Sub
|
|
|
|
|
Hello everybody,
I've been struggeling with a Regex for hours now, and I hope someone of you can help me out of this. I'm trying to capture a "Number" section and a "Text" section from a string like
124[HT][HT]In the year 1560, there was ...[CR][HT][HT]somethingt strange going on.[CR][CR]125[HT][HT]The same pattern followed hour after hour. I've been trying dozens of different ways in Expresso, but nothing seems to work out.
(?<Nummer>\d+)\t+(?<Text>.*(?=\r{2,})) Mostly I get results having the first number in the proper section, but the complete rest of the string in only one "Text" section. What's my stupid error here? Somehow I'm lost in a maze now.
Thank you for your time!
Mick
|
|
|
|
|
This seems to work for your example input:
(?<number>\d+)\t+(?<text>[^\r\n]+((\r\n|\r|\n)\t+[^\r\n]+)*)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you for your great help, Richard - I guess my major misunderstanding was that I interpreted the [CR] as \r only, and not as \r\n? Nevertheless, it seems to work on the original, too.
Have a nice evening,
Mick
|
|
|
|
|
rs.Open "select PDATE,plan,NAME,PQNTY from purch where pdate >=" & DTPicker1.Value & " and pdate<=" & DTPicker2.Value & " order by name,pdate ", cn, adOpenKeyset, adLockOptimistic
what Wrong in above ?
in this command rs # 0 ?
rs.Open "select PDATE,plan,NAME,PQNTY from purch order by name,pdate", cn, adOpenKeyset, adLockOptimistic
rs.Filter = "pdate>=" & DTPicker1.Value & " and pdate<=" & DTPicker2.Value
what Difference
modified 8-Jul-13 2:12am.
|
|
|
|
|
Please do not post the same question multiple times like this. If you need to add extra information you can edit the original. As to your actual problem, it is not clear what you are asking.
Use the best guess
|
|
|
|
|
Could you delete your two other questions that is exactly simular?
|
|
|
|
|
Ajay Chaturvedi bhopal wrote: what Difference Your question is not clear, please expalin exactly what this code is supposed to do and what results you are getting.
Use the best guess
|
|
|
|
|
if i use this :-
rs.Open "select PDATE,plan,NAME,PQNTY from purch where pdate>=" & DTPicker1.Value & " and pdate<=" & DTPicker2.Value & " order by name,pdate", cn, adOpenKeyset, adLockOptimistic
no any record found and rs = 0 but if i use this
rs.Open "select PDATE,plan,NAME,PQNTY from purch order by name,pdate ", cn, adOpenKeyset, adLockOptimistic
rs.Filter = "pdate>=" & DTPicker1.Value & " and pdate<=" & DTPicker2.Value
then get records in rs, Why above side command not run.
|
|
|
|
|
Drop the string concatenation garbage for building this SQL statement and use parameterized queries instead. They will escape and translate your DateTime values properly. You don't mention what database you're using but what you've written really doesn't work for any database I know of.
And this looks like VB6 code. Why on earth anyone doing is still doing new VB6 developement in this day is beyond me. VB6 is long since dead.
|
|
|
|
|
Hi guys,
I've read articles about; "Sending and receiving data from RS232 or USB ports" or, "Using vb.net to switch on/off electrical devices", but conversely in my case I want to just using a simple electrical switch to do something in my vb.net application (via RS232 or USB port). For example; if user pushed an electrical switch button which is connected to the RS232 or USB port, then simply a text same as "Pushed" appear in my application's text box.
Briefly, could we connect an electrical switch without any circuit or board to USB port to do something simple in our application?
Any suggestion or experience?
Thanks.
|
|
|
|
|
Short answer: No.
Longer answer: you would need some interface between the switch and the computer's port that converted the elctrical current into the correct signals for the computer. Try searching Google for computer switches to see the sort of devices that are asvailable.
Use the best guess
|
|
|
|
|
|
aeskan wrote: Briefly, could we connect an electrical switch without any circuit or board to USB port to do something simple in our application? No, as a USB port doesn't know how to interpret a "row" of switches. There's various projects, with prebuild general-purpose controllers and open source to control the hardware, like this one[^]. Alternatively, find a cheap USB-joystick and a large hammer
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you Eddy for reply.
|
|
|
|
|
Connect a switch to a USB "port", hit the switch just once and you'll short the USB out and possibly kill the USB controller on your motherboard.
USB ports are not "ports". USB is a BUS, not unlike the expansion slots (bus) inside your PC. Without an interface chip on the switch to tell USB that a device is there, you cannot listen for the changes in the switch.
|
|
|
|
|
|
As other have already pointed out. Direct connection to USB is hazardous to the health of the USB ports.
However, perhaps if you got hold of a USB-Serial adapter it should be possible to use it on the Carrier Detect/CTS/RTS/DTR/DTS. whichever is available at the serial port.
an additional smoothing capacitor & resistor above 1K-ohms in series should help filter out the switching noise/limit current demand.
|
|
|
|