60 Reusable Code Snippet Topics
Remove Filter | |
Hi there! This is a simple pascal program I wrote for a cashier. Please note that this is only a basic level program code and can't actually be used for commercial use. Thanks for reading! | |
Our text file contains 10 words,and located in C:\ drive,we will read this data into an array and write out the results to the screen Created by FlamingClaw 2009.04.26. | |
This snippet shows how you can get the headers for an URL, for example to detect a redirect. I had to use the ANSI functions to ensure correctly returned headers. Manual entry for [HttpQueryInfo](http://msdn.microsoft.com/en-us/library/windows/desktop/aa385373(v=vs.85).aspx). Let me know if you have any questions/remarks. | |
The `ReplaceStrings` function replaces all strings in `APatterns` found in `ASubject` with the value in `AReplacement`. As an example, I added the `RemoveStrings` function which replaces everthing with an empty string, thus deleting all strings found. Usage examples are in the XMLDoc comments. A good test will be to rewrite … | |
There are many places on internet for great help regarding many things. Proper implementation of really fast routines for sorting data however is not common. I am not claiming these routines to be the fastest around, but their ease of implementation and use may make them welcome. As a thank … | |
This example is demonstrates a solution for direct arranging By FlamingClaw | |
The function Delay() allows access to other events during the delay. For instance a certain key could be used to interrupt a lenghty delay. The Win32 API function Sleep() ignores events, maybe it should be called DeepSleep(). | |
ShowDriveSerialNo shows it with ShowMessage GetDriveSerialNo returns a string. You don't need both. | |
The code demonstrates running program limitted time by following going over endtime expressed in seconds since midnight, so might fail for playing just midnight (add check that endtime is less than 24*60*60 if you want to be sure). Exciting action :) of the program is that it shows remaining time … | |
I did this code to compare to Delphi code in Delphi forum [URL="http://www.daniweb.com/software-development/pascal-and-delphi/threads/357771"]TListBox and sorting[/URL] which ran in my computer compiled in free Lazarus environment at time 7,235 s for generate and insert to listbox, 13,265 s sorting the listbox. | |
Hi guys The just of what i whant to do is read lines of text from a file until it reaches a delimiter and then execute that text in a query and repeat the process till there is no more text. I am using Delphi 6(don't have a choice) and … | |
Using FPS IDE with FPC compiler on windows xp. | |
Procedure which checks the number of eating properly entered in edit box with a comma | |
A simple function that converts alphabetic values into their respective lowercase value. | |
The arguments are passed by value and by reference | |
This snippet shows how to open, read, write and close text files. This skeleton can be modified to handle any type of file, from untyped to text to typed files. | |
A function that takes a string and returns the number of words in the string. An example of using pointers in Pascal. | |
This small program shows that how we can arrange strings by alphabet in a vector.By FlamingClaw | |
Note that the angle is in 1/10 of degrees. Any attempt to manipulate font.size or font.color will reset the angle to zero degrees. | |
I want to show a simple example about writing record to a file,and for checking,read back from that file. Created By FlamingClaw | |
This algorithm will add the searched element's place in an array This works only when there is so element what we're searching for. By FlamingClaw | |
This algorithm will decide that is there a serched element in the array.If it finds one then the loop halts.If the loop halts cause we're stepping over the last element of the array then there is not searched element. By FlamingClaw | |
Counts that how many propertied elements are in the array example:negative numbers By FlamingClaw | |
The Rule: s:=0; Loop i:=1 To N s:=s+T[i]; End of Loop; Out:s; By FlamingClaw | |
Prime or not?This little program will show prime numbers with green color from 0 to 100.By FlamingClaw; | |
I want to show you some rules about bit operating like Not,And,Or,Xor,Shl,Shr... By FlamingClaw | |
I've seen,there are guys that did not know,where to use a unit... See it just reference By FlamingClaw |
The End.