Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-3 of 3 total  RSS 

Only allow numbers in textbox

// This can be expanded to limit the key pressed to whatever you want
//In this scenario it only allows digits

 void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = !(Char.IsDigit(e.KeyChar) || e.KeyChar == '\b');
}

Subversion service for low-load (personal?) sources repository

Create separate user and insert svnserve into inetd.

# useradd -g root -s /bin/false -d /dev/null -c "SubVersion Daemon" svnserve
# mkdir /var/svn
# chown -R svnserve /var/svn
# update-inetd --add 'svn\tstream\ttcp\tnowait\tsvnserve\t/usr/sbin/tcpd\t/usr/bin/svnserve --inetd --root /var/svn'


/var/svn - root of repository.
update-inetd - standart tool in debian and ubuntu linux distros

You must run svnadmin as svnserve user for manage your repository

$ sudo sudo -u svnserve svnadmin <command>


Code Snippets open source ? when ?

// description of your code here

So when is "Code Snippets" going to be open source ? 
what does "source code soon to be available" tell us ?
« Newer Snippets
Older Snippets »
Showing 1-3 of 3 total  RSS