|
Take a copy of the existing code, and remove/limit some of the features. </obvious>
Have the installer automatically install the parts that are the same, then ask for a serial number. If none is provided, install the trial version of the rest, otherwise install the full version.
To stop this from being bypassed, have the full version check a license file.
(do not make the trial do this, as a faked file may unlock some things).
A good license file would be a mac address, full name, organisation and time and date of install, all md5'ed with a key that only you (and your program) knows.
|
|
|
|
|
Alternatively, allow the user a time limit to which they use the application for.
You'll have to implement some hack-proof techniques though, because the most obvious hack would be to turn back your computer time.
Daniel Minnaar
Lead Software Developer
|
|
|
|
|
|
Hi,
I have regular expression for a phone number. The rules i want are; 10 and only 10 digits and any characters in between.
eg.
"0123456789"
"(01)23456789"
"(01)23 456 789
"0123 456 789
"0 1 2 3 4 5 6 7 8 9"
"01 23 45 67 89"
are all acceptable
the regex i have is:
"([^0-9]{0,}[0-9][^0-9]{0,}){10}"
everything works ok except for detecting numbers that are too long (i.e. more than ten characters). I already have a work-around for this, i am just interested to know how to achieve the same thing in a regex.
cheers to you.
|
|
|
|
|
handle keypress event
count the pressed in chars. if =10 e.Handled = true.
Hope this helps
cheers, geri
|
|
|
|
|
so I would do sg like
<br />
int count=0;<br />
if(Char.IsNumber(e.KeyChar))<br />
{<br />
count++;<br />
}<br />
if(count==10)<br />
e.Handled=true;
<br />
& count-- if user deletes.....(so presses like: e.KeyChar = '\u0008' >> backspace, i guess )
geri
-- modified at 2:46 Thursday 29th November, 2007
|
|
|
|
|
Hi,
thanks for the reply, but my question was specifically to do with regular expressions.
thanks anyway.
|
|
|
|
|
Put $ at the end:
"([^0-9]{0,}[0-9][^0-9]{0,}){10}$"
Regards
|
|
|
|
|
This would have no effect, the beginning is not limited.
"^([^0-9]{0,}[0-9][^0-9]{0,}){10}$" fixes this.
(in your regex, the number 12345678901 would have caused the underlined part to match.
|
|
|
|
|
oops, absolutly right
Regards
|
|
|
|
|
Thanks, that works just as i need it.
I had tried the $ character at the end, but not in conjunction with ^.
Thanks to Mabo42 to the reply as well.
|
|
|
|
|
can i install .net frame work in windows 98
|
|
|
|
|
according to MSDN:
you can install 1.1 redist
cheers, geri
|
|
|
|
|
IIRC I started with .NET 1.0 on Win98.
I am pretty sure later .NET versions (2.0 and above) don't support Win95/98/Me
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I was just working on a WinForms applet for which I want variable transparency of the client area.
What I want is the window to have a TrackBar to adjust the transparency of the client area while the TrackBar, border, and title bar stay opaque.
I know how to make the client area completely transparent.
And I know how to make the entire window variably transparent.
But I haven't yet found a way to make just the client area variably transparent.
Any ideas?
Hmmm... I suppose I could stack two forms...
|
|
|
|
|
PIEBALDconsult wrote: I suppose I could stack two forms...
May not be the most elegant way, but a way....
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I am trying to bind a ListView/TreeView w/e to a Data Source I've created from Visual Studio for the project and would like to know if and how it would be possible to bind solely using XAML.
As an idea, let's say we have appName, appName.dataSetFromMySQLviaODBC as the data set, with tableAdapter and tableColumn as the only column, any way to, using only XAML, no cs code that's "user" written, bind the data there to a ListView?
And if it's not too much of a stretch, considering it's probably quite easy to find if I poke around, anything special to do to make the data update in the ListView mirror the database changes? Or is it at least possible?
|
|
|
|
|
My knowledge of WPF is quite limited, having only looked into it in the last two weeks. But, from what I've found, using ODBC as a data source, no, you cannot do this using only XAML. I think you need to provide the code to grab the data so the XAML has something to bind to.
I could be wrong though...
By the way, using ODBC is quite pointless if your using SQL Server. Use the SQL Server specific provider if you want your SQL code to run faster and offer more flexibility.
Dexterus wrote: anything special to do to make the data update in the ListView mirror the database changes?
Only if you have code that goes and gets the changes. Youe code doesn't automagically know that the database has changed without it changing it itself.
|
|
|
|
|
Eh, tried to do something fast-ish so I used what I had, an ODBC connection string
My WPF experience extends to today and the examples I've found around about this DB binding were pretty much using the same thing, a DataSet.
So either I have not found the correct one that VS creates when I create a Data Source (code it auto-magically created to work that data source was slightly hard to read) and I should use as Provider or maybe context or it simply doesn't create a DataSet instance. This last thing would mean it turns into the same, initialize connection, get and fill that all examples I've found do, only they do it a lot cleaner than the "wizard" way.
As for the auto-update was thinking maybe data sources would have some sort of flag or something that would signal the change and it auto-update based on that and someone would know about that. It's not an issue though, manual labor works also.
PS: Would there be a better place for this post? As this is my first one I am somewhat unfamiliar with the exact structure. Switching to another board would keep this one clean of unrelated stuff and make my question slightly more visible to people that spend more time browsing that other board.
|
|
|
|
|
I know that scripting languages like javascript are interpreted languages and technology like .net is a complied language.
But the question is that if i am using javascript in ASP.net application then how javascript access the area of ASP.net because compiling the code of javascript is the work of browser which is at client side and compiling the code of ASP.net is server side that uses CLR . Again only managed code can be compiled by CLR. Then how the interface work over there? How the bridge built between, for interpreted and compiled langauge?
kapil
|
|
|
|
|
You really need to read up on AJAX to see how it all hangs together. Take a look at Microsoft's implementation (formerly codenamed ATLAS). There are plenty of technical papers on this available from Google.
|
|
|
|
|
kapil_b_khadgi wrote: What is the difference between Interpreted and Compliled Language
Most computer languages can be compiled, but Plain English may need to be interpreted.
|
|
|
|
|
No. Not Plain English. Don'ttttttttttt - you'll only encourage him.;)
|
|
|
|
|
Pete O'Hanlon wrote: Not Plain English. Don'ttttttttttt - you'll only encourage him.
Awwww come on, it's fun
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
I need to generate release notes from code, but if I use XML comments to let the parser generate the html for me the notes will keep adding up. Is there a way to tell the parser to parse only the tags that have a certain value? Something like: if I want the release notes for today's build, I want to parse only the tags that have today's date as a value.
If this is not doable, is there any other way of getting release notes from code without keeping a separate document that someone would have to manually update after each build?
thanx
|
|
|
|