Advertisement

Results for "Author: luis cantero"

6_2008-2009 #194876
Bayesian Anti-Spam Filter/Word Classification (Statistical) Class

Bayesian Filter technology (Bayes Filter) is one of the most effective and most promising ways to filter spam (or any unwanted/wanted content). I made this class based on some ideas I found on the internet and some tweaks and tests of mine. It should be very easy to port to other languages and can be used for spam filtering, bulletin boards or chat rooms to flag unwanted (or wanted) posts. It needs to be trained with "good/ham" (meaning wanted) and "bad/spam" (unwanted) posts, and after enough training it can calculate the probability of a text being spam/bad. It also has an auto-learn feature and database support. There are many uses for it, for example, it can be used on PSC to flag unwanted posts, or in RAC to flag posts that are against the guidelines. Or by law enforcement to evaluate chat rooms in search for pedophiles (child molesters), and the like. I've included an access database with a form that can also be used to train the program. I've tested many algorithms in order to improve the code for speed, accuracy, efficiency and reliability. If you have any suggestions or improvements, please let me know. Also, please vote if you like it :)

6_2008-2009 #194877
Easy to Integrate ASP File Upload Class with status info

UPDATED 03/JAN/2010: This is a file upload class with a demo page. Very easy to integrate into existing projects, it only requires three steps. The code is nicely commented and formatted. I've also added JavaScript code that disables the Submit button and shows an image and message informing about the upload. If you use Norton AntiVirus you will need to disable your Script Blocking for the file writting to work. The code can support uploads of up to 2GB or so, but I've only tested it with files of up to 30MB. It also supports the configuration of allowed extensions for more security. If you like this code, please vote. Last Update: Added code that takes care of a IIS vulnerability involving semicolons in file names (extremely important!).

7_2009-2012 #217375
Trim non alphanumeric characters FAST

It will erase any non-alphanumeric characters from a string rapidly. Usefull if you want to check strings for non-valid characters. Strings such as email or web addresses, you can even make so that only numbers can be entered in, for example, a text box.

7_2009-2012 #217376
Open default email client/browser to your address

Sometimes in the about box of your program you want to put your email address, and web site address, wouldn't it be great if at one click the default email client would open with your address in it?, or the default web browser to your address?, and a plus!, open any file to its association, all of this with no declarations, no APIs, and with ONE line of code? Sounds impossible? here's how:

7_2009-2012 #217377
Replace System Files After Rebooting

When you are creating a sort of Setup program, etc. sometimes you want to replace some system files or delete some other files, however if they are in use by Windows at the time, you can't. You need to update the files after rebooting, you know that message that says "Please wait while windows updates your configuration files", the utility that does this is called Wininit, and here's how to use it! I've included a small example that should work under Win9x/ME/NT/2K/XP.

7_2009-2012 #217381
Email with attachments, Progress Bar, Drag & Drop

This program lets you send emails with attachments (Using Winsock API - without an OCX). It features a progress bar, multiple attachments support, etc. The Attachment list supports multiple file Drag & Drop. You can drop files from explorer for example, it is very simple and without APIs, supports multiple recipients separated by commas. (good example on how to use arrays) Latest addition: NOW FASTER! Succesfully tested with netaddress.com, mail.yahoo.com, hotmail.com FOR VB5 USERS: Replace the VB6 "Split" function with any "Convert String to Array" example found on Planet Source Code. (Please do not email me about it, thanks) Last Updated: 11/APR/2002

7_2009-2012 #217382
ID3v2/ID3v1 Read and Write Demo

This small app. contains code to read/write ID3v1 and ID3v2 Tags from/to MP3 files. This code is used in one of my commercial applications. Please vote for me if you like it, it took many hours of development, specially the ID3v2 part (see ID3v2.org for specs.)

7_2009-2012 #217383
Get Windows and TEMP Folders the easy way, without APIs

It returns the path of the windows or temp folders.

7_2009-2012 #217384
Download Web Site or File using Winsock API

This is a small application that shows how to download a web page (or any file) from a web site using only Winsock API (no OCX, no controls!)! As of today, and as far as I know there are no other examples like this on PSC. It demostrates and explains (advantages and uses of) the GET and POST methods and supports the use of an HTTP Proxy. It downloads Asyncronously so it won't "hang" and you can even set a time-out or cancel the request. One of the many practical uses for it would be: put it on your about box and use it to retrieve a text file on your site that indicates your program's version/update availability. I've commented it and should be easy to understand even for newbees. Please vote for me if you like it ;) if I get enough votes I will post an example on how to transfer files using only Winsock API (Client-Server application).

7_2009-2012 #217385
ActiveX EXE Multithreading

This is a list of issues that I had while implementing this technology in one of my programs and how to solve them. This information took me many days to collect and should save you about a week's worth of testing. To understand this you need Srideep Prasad's turorial on "Multithreading" (txtCodeId=24672), also available at PSC. I've tried all multithreading methods listed on PSC and I found this method to be the best.

7_2009-2012 #217386
File Loading Methods Compared

This example compares four file loading methods, (the normal VB Open method, the ReadFile API, and other methods involving MemCopy API), you will also see the difference between returning a String or a Byte Array. I did this example because I keep seeing people using the normal VB Open command to load files, even for Hex editors, as you will see there's a huge difference between using it and using an API. The test in the screen shot was made with a 1GHZ P3 Notebook with 384MB RAM (as a compiled .EXE), please note that times may vary from test to test depending on what your computer's doing, etc. Comments and/or improvements as well as votes are welcome.

7_2009-2012 #217387
How to round a byte amount into KB or MB (also KB/s) with two decimal places

Apart from what it says on the title, I will also demostrate how to calculate, based on a byte amount and a time period, the amount of KB/s (Kilobytes per second) of a transfer. The decimal separator (. or ,) is shown according to the regional settings.

7_2009-2012 #217388
File transfer using Winsock API (Client + Server)

This is a small example of how to make a listening server and a client that sends a file to it using Winsock API. How it works?: You need to open the server, then the client, select a folder containing images (BMP, GIF or JPG), for each image, you will need to select a value from the 3 combo boxes (these properties describe each image in some way), then you just enter the server's IP address and click on Send. The server accepts only one connection at a time (it stops listening until the transfer is complete), however, it can be modified to accet multiple connections. It uses a protocol similar to SMTP to get the image and its properties. It then saves the image and stores its info in a DB. Please vote if you like it. Thanks.

7_2009-2012 #217389
Change order of letters in a word

This code is just for fun, it demostrates an interesting phenomenon and some ways to manipulate strings, and arrays. According to research at an English university, it doesn't matter in which order the letters in a word are, the only important thing is that the first and last letters are in the right place. The rest can be a total mess and you can still read it without a problem. This is because we do not read every letter by itself but the word as a whole. This works with nearly every language. IMPORTANT: A similar program was posted a little before mine, but I posted mine without knowledge of that, and without seeing any portion of the code. This program (and I'm sure the other one too) was inspired in an email that got forwarded around the world a few days ago. The main difference between my program and the other one is that this one uses a byte array and totally randomizes the order of the words, the other program merely reverses the order of the letters. Thank you.

7_2009-2012 #217390
HTTP File Upload using Winsock API

This is a small example that shows how to upload files to a web server through HTTP Post using Winsock API, this is as low level and as dependency-free as you can get. It also includes an HTTP header class that makes it easy to add fields or files to be sent. You can use the included ASP upload script to test the program.

7_2009-2012 #217391
Rename, copy, delete entire registry keys

This is a registry API module that contains the usual functions to create, set, delete and count registry keys and values. Since the API does not provide a way to rename registry keys, the only way to do it is to copy the entire key including all subkeys and values which could be of different types, then delete the old key recursively (which is also not supported by the API). These functions are also included in this module, the rename/copy function supports all existing value types (REG_SZ, REG_EXPAND_SZ, REG_BINARY, REG_DWORD, REG_MULTI_SZ). The delete function has a security feature (minimum depth) to avoid accidental recursive deletion of important keys, such as HKLM\Software, etc. Make sure you read the comments I left to understand how this function works. The only other approach to renaming a registry key (which also works by copying, etc.) involves using a function to write all keys to a temp file and then save them under the new name. There is code available on the internet that demostrate this approach, but you will always need a temp file, which is not good. This makes my code, at least as of today and as far as I know, one of a kind. I hope you find it useful.

7_2009-2012 #217392
StickyNote with Tray Icon

This is my first VB.NET program. It has a Tray Icon that reacts when clicked/double clicked/right clicked, saves the text in the registry, and has 3 tabs to organize the data.

7_2009-2012 #217393
Web Poison (Anti-Spam Measure)

This is the ASP version of a CGI technique used to scare off spammers (or at least to make things harder for them) that use email extractors to collect addresses from web sites. The script generates a random number of fake Email addresses and URLs that call itself in an endless loop. The result: email extractors get clogged with fake addresses. A META tag tells search engine robots not to index the page. To use just rename the file to anything you want (example: test.asp) and put a hidden link to it on your site, like this: [A HREF="wpoison.asp"][/A] (replace [] with <> respectively). Please help spread the word about web poisoning, it might not stop spammers, but will surely slow them down!

7_2009-2012 #217394
Bayesian Anti-Spam Filter/Word Classification (Statistical) Class

Bayesian Filter technology (Bayes Filter) is one of the most effective and most promising ways to filter spam (or any unwanted/wanted content). I made this class based on some ideas I found on the internet and some tweaks and tests of mine. It should be very easy to port to other languages and can be used for spam filtering, bulletin boards or chat rooms to flag unwanted (or wanted) posts. It needs to be trained with "good/ham" (meaning wanted) and "bad/spam" (unwanted) posts, and after enough training it can calculate the probability of a text being spam/bad. It also has an auto-learn feature and database support. There are many uses for it, for example, it can be used on PSC to flag unwanted posts, or in RAC to flag posts that are against the guidelines. Or by law enforcement to evaluate chat rooms in search for pedophiles (child molesters), and the like. I've included an access database with a form that can also be used to train the program. I've tested many algorithms in order to improve the code for speed, accuracy, efficiency and reliability. If you have any suggestions or improvements, please let me know. Also, please vote if you like it :)

7_2009-2012 #217395
Easy to Integrate ASP File Upload Class with status info

UPDATED 03/JAN/2010: This is a file upload class with a demo page. Very easy to integrate into existing projects, it only requires three steps. The code is nicely commented and formatted. I've also added JavaScript code that disables the Submit button and shows an image and message informing about the upload. If you use Norton AntiVirus you will need to disable your Script Blocking for the file writting to work. The code can support uploads of up to 2GB or so, but I've only tested it with files of up to 30MB. It also supports the configuration of allowed extensions for more security. If you like this code, please vote. Last Update: Added code that takes care of a IIS vulnerability involving semicolons in file names (extremely important!).

Languages
Top Categories
Global Discovery