Results for "Category: String Manipulation"
Compare using wildcards like * and ?, ranges like "at[0-99].gif", and a new wildcard %. Which is like *, but goes only at the end. "at%" would be like "at", and also "atquaz".
The Replace-function in VB6 is an extremely useful in many occasions, but unfortunately, it is as most string-functions in VB rather slow. Therefore I’ve tried to optimize this operation, and I must say the result is satisfying – it is nearly 50 times faster replacing 35.000 characters than the native Replace-function. The code should also work in VB5, where the native function doesn’t even exist.
That's right, all positive long values up to 2147483647. This simple algorithm can translate any positive long value to its string equivalent, both English and Spanish. The principle is simple: Process three digits at a time because the cycle is repetitive every three digits. The only thing you have to append every time is the order qualifier: Thousand, Million, or Billion. The code of the main function is commented, and the other functions are just plain very easy, so no commenting there. The user interface shown here is very simple because the object of this post is the functionality! :) BONUS: Included (and made just for fun) there is a custom uppercase function. It was programmed under the principle that switching between lower and upper case, all you have to do is flip bit &H20. It also writes to the source string directly by mapping an array to the string buffer (advanced stuff). I did not benchmark, but supposedly, this upper case method should be a lot faster than regular string manipulation, although I don't know if it is faster than the VB upper case function. If you want to implement this in one of your applications, all you have to do is drop the module in. Please vote and comment. UPDATE: Run-time error 9 in uppercase function solved. It was a silly error.
With the help of SPA Simple Paging Class you can easily implement stylish paging on your site within 30 Seconds!!!. Implementing the paging class is one of the easiest task, and it does not require too many customization. It just takes a table name, or a SQL script as input returns the number of pages. The paging class can be used on a single table or even with custom simple / complex SQL statements. ie. it now Supports JOINS, Nested SQL, UNION etc... Advantages 1.Easy to use – with just 4 simple steps. 2.Supports CSS – That means you have total control on the look and feel. 3.The code generated is 100% compliant with W3C XHTML standards. 4.Supports single table, custom SQL, Nested SQL, Joins, Union. 5.Built in support for English, and French languages. 6.Ability to easily add support for other languages. 7.Automatically includes existing query strings. 8.Supports multiple paging on same page!!! Disadvantages / Known Issues 1.Current development version support only MySQL database.
Maintain the Student Records.
Have you ever need to convert a binary string to HEX? Doing it in VB is quite simple but a lot slow. I'm using this class to exchange XML data from serial I/O apps with high performance.
UPDATED!!!! Keeps records for students : number name lessons:grade,date save to file everything
Photo Album Database Using Xml. This program demonstrates various things in C#; Xml Serialization, Storing Binary Data into XML file, using MemoryStreams to handle images. u can add albums and add photos in an album and give descriptions for both albums and photos. It's not finished yet, needs some easy touches; Edit and Delete for albums and Images, Input validation. I'm working on them beside seeking for a better method to handle XML instead of In-Memory to boost the performance. Read the ReadME.txt file for more information on how to use the program Hope u enjoy it :)
This code is made up of 2 new VBScript classes, the other VBScript class - clsSortableTable.asp was submitted by another user and works great. The first new class - clsDynaEditForm.asp creates an HTML form based on any table/view in the database and can even validate selected fields. The other class - clsUpdateDB.asp is then used to update the database.
Often I use flat mdb files to post forms to on the webserver. This is a simple page to just grab a table from an mdb file on the server with a DSN-less connection and display it as an HTML table, so I can copy the table and paste it into Excel or Access, or just to get a quick look at the contents.
A very simple database search tool. If you wanna learn how to search, sort, and write a database, download this now.
You know ASP and HTML String container. For example www.planet-source-code.com?X=1;R=10. How can I X content from this string ? What's X ? This program is this! Thanx for your vote.
This is a very simple enocde decode routine that I created for a program where I didn't want to store the password in a plaintext string. This routine then came in handy when creating a client/server program where to stop people sending spurious commands to either the server of the client - I encrypted the time in minutes and it was sent with every bit of data - if the time was out by 3 minutes then the server or client discared the data - this is just one example for this bit of code. The routine currently runs 100 times in encryption or decryption but is a for loop - so easy to change - just make sure that the encryption and decryption routines run the same number of times. As an example "Planet Source Code Rocks" becomes "8=EMPT\chipu{$'/49;>?DEHKRY\dehiosuv{}~$+1369;CKQRZ[^`cfglpuw~$%*0479AFKNQSZ]ekry~$*-48:ACHOVW_elrz$D`UbYhrGcifWYr7cXYrFcW_g" The key to the encryption and decryption is the number at the beginning of the string (which is randomly chosen during encryption - and because it is a printable character gets encrypted itself on every subsequent encryption). This routine is for from unbreakable but is going to throw of the person who just wants to quickly find the password.
This program allows the user to create a file and add or change mailing list records to it. The program is able to load files that have the same record structure and concantenate them if required. The user can then save the data stored in memory to a new file or to overwrite an existing file. SIDE EFFECTS: There were side effects when I ported from win95 to XP, which have been commented out. WHATS IN THE ZIP: *database.c : C code file. *debugfile.txt : Redirected the printer to this file for debugging purposes (so I didn't waste paper). *mail.db : An example of a saved file. *PDR_for_project7.doc : The data table, algorithm, and output for the code.
This program was made to show you how to convert number bases easily and efficiently. The program supports binary, octal, decimal, hex, and ascii(base 256). Please vote on my code.
This Comprehensive, Effective way to store images in the MySQL database server. You can store images in MySQL and access then very easily.
Simple Data Entry application using untyped datasets. Shows add,delete,edit,find,update,cancel,navigation and databinding procedures.
It's a common problem everyone has faced. You have a couple paragraphs of text that you want to store in a constant. But how do you manage quotation marks, line breaks, and backslashes in a quoted string? This solution will let you paste text into a textbox, and it will spit out the source code in order to store that text properly in a variable. Outputs to Javascript, VBScript, VB6, VB.Net, C#, and HTML. Very handy!
This is a URL parser class that accepts a URL (such as "http://www.blah.com/") and parses out: - the protocol - the hostname - the username - the password - the port - the resource - the querystring Enjoy!
By thsi code you can Find any text in comboBox by your keypress you should at first locate your database i used Biblo.mdb that you can locate it in your vb directorate try it good programm