Results for "Author: luis cantero"
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.
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:
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.
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.
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.
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
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.
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.
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.
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).
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.)
It returns the path of the windows or temp folders.
UPDATED 10/AUG/2003: This is a file upload example based on other examples that I found. I made a module with functions to handle all that has to be done, and I've commented and formatted the code nicely. I've also added JavaScript code that disables the Submit button and shows an image and message informing about the upload. I've also added code that shows what to do with data that has been received (variables): you can put them on a form as hidden values and post them back to another page for further processing (saving to a DB, etc.) If you use Norton AntiVirus you will need to disable your Script Blocking for the file writting to work (it took me a while to figure out). The code can support uploads of up to 2GB or so, but I've only tested it with files of up to 30MB. If you like this code, please vote.
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.
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.
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:
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.
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.
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.
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