Programovanie

Táto stránka rieši rôzne otázky zo sveta programovania. Nájdete tu množstvo zdrojových kódov a rôzne open source aplikácie. Pravidelne budú pridávané ďalšie a ďalšie. Ak vás táto problematika zaujíma, máte otázky alebo chcete niekomu pomôcť, navštívte stránky Score phorum, zaregistrujte sa a sledujte miestnosť s názvom Programování. Niektoré tipy sú vyberané aj z tejto lokality, avšak nájdu sa tu prevažne také, ktoré sa na daných stránkach nikdy nevyskytli.

TICQClient

A freeware, easy to use component for Borland Delphi implementing ICQ features in your own application.

Requirements

Windows 9x/ME and Windows NT/2000/XP

Opensource.

SourceForge.net: TICQLib

DClock

DClock slúži ako alarm alebo ako aplikácia na vypnutie, reštart a odhlásenie užívateľa. Vypína napájanie ATX počítačov. Program umožňuje nastavenie dátumu a času, podporuje časový formát AM/PM. Ovládanie a nastavenia sú popísané v nápovede.

Program pracuje s Windows 9x/ME a Windows NT/2000/XP.

dw- DClock v2.71 (Borland Delphi)

Adresár

Adresár slúži ako jednoduchá, no šikovná náhrada známeho Address Book-a aplikácie Outlook Express. Design Adresara je veľmi konfortný a ovládanie je jednoduché. Databáza uchováva názovy osôb alebo firiem, e-mail, adresu web stránky, telefónne číslo, fax, číslo mobilného telefónu. Ďalej adresu a poznámky. Vyhľadávať je umožnené podľa mena, e-mailu, prezývky a poznámky. Ku každému záznamu prislúchajú malé informačné ikony, ktoré určujú aké záznamy sú pre danú osobu alebo firmu uložené v databáze. Vylepšením od klasického Address Book-a je bublinková informácia, ktorá po zastavní kurzoru myši na názve osoby alebo firmy zobrazí údaje ako číslo telefóna, e-mail a číslo mobila.

dw- Adresar v1.0 #241 (Borland Delphi 6)

CD Drive

CD Drive je malá 50kB aplikácia, ktorá slúži na otvorenie a zatvorenie CD-ROM mechaniky. Inštalácia vytvorí na ploche dvoch zástupcov, ktorí majú rozdielne ikony. Jeden otvára a druhý zatvára mechaniku.

Podobná utilita a článok je uverejnený na stránkach The Code Project pod Open or Close CD-ROM drive.

dw- CD Drive (Borland Delphi 6)

Shutdown

Malá aplikácia, ktorá slúži na vypnutie ATX počítača. Po spustení okamžite vypína PC, pričom NEULOŽENÉ DÁTA SA STRATIA.

dw- ShutDown (Borland Delphi)

Autorun

Jednoduchý program, ktorý spustí súbor index.html, ktorý sa nachádza v tom istom adresáry ako aplikácia Autorun.

dw- Autorun (Borland Delphi)

Výpočet faktoriálov

Sofistikovaný spôsob na výpočet faktoriálov, nezáporných celých čísel, pomocou funkcie s jedným jediným riadkom. Vstupné hodnoty nie sú ošetrené, ide len o formálnu ukážku funkcie, ktorá zabezpečuje rekurzívny algoritmus.

dw- výpočet faktoriálov (ANSI C)

Pavel Herout - Učebnice jazyka C

Príklady, ktoré si môžete stiahnut, ci prezriet, som vypracoval z úloh, ktoré zadáva Pavel Herout vo svojej knihe Učebnice jazyka C. Zakúpit si ju môžete napríklad tu (akcia pre I. a II. diel).

Príklady z pociatocných kapitol (kapitola 4 a 5) som napísal pod BC++ v3.1, dalšie v prostredí MSVC++ 6.0.

dw- riešené úlohy z kapitoly 4 a 5 (prostredie BC++ v3.1)

dw- riešené úlohy z kapitoly 8, 9, 10 a 11 (prostredie MSVC++ v6.0)

ICQ2003Decrypt

This is Microsoft Visual C++ 6.0 implementation of ICQ password decryption based on ICQ2003Decrypt library created by coban2k.

Main Features:

Able to decrypt 2003a/2003b/Lite passwords. Passwords can be decrypted even if 'save password' option wasn't checked. Password can't be decrypted only if 'public computer' option (ICQ2003b, ICQ Lite 4.x) was checked. Opensource.

Download:

dw- ICQ2003Decrypt - 28 672 bytes (binary and sources MSVC++)

md5 = d18d3d029b6a0009c2f3e74a8a80ed20

dw- ICQ2003Decrypt - 19 707 bytes (binary and sources lcc-win32)

md5 = 0936b408d679c330941ec26565427fe3

dw- ICQ2003Decrypt.zip - 64 273 bytes (original binaries and sources)

md5 = 93ab9043268265f0d97d9adb6096b971

LockWorkStation

Example, how to lock workstation.

Main Features:

Locking a workstation protects it from unauthorized use.

Common reasons the workstation might not be locked even if the function succeeds include the following: no user is logged on, the workstation is already locked, the process is not running on the interactive desktop, or the request is denied by the Graphical Identification and Authentication (GINA) DLL.

This application has the same result as pressing Ctrl+Alt+Del and clicking Lock Workstation.

The full article Lock workstation is on The Code Project website.

Requirements

Client: Requires Windows XP or Windows 2000 Professional.
Server: Requires Windows Server 2003 or Windows 2000 Server.

Opensource.

Download:

dw- LockWorkStation - 13 825 bytes (binary and sources lcc-win32)

MonitorPowerOff

Example, how to turn off the monitor using software way.

Main Features:

Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer. Means the display is being shut off.

The full article Turn on/off monitor is on The Code Project website.

Requirements

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- MonitorPowerOff - 8 546 bytes (binary and sources lcc-win32)

SetState

Set state and state information tool for MS Windows.

Main Features:

Shuts down all processes. Then it logs the user off.
Shuts down the system and turns off the power.
Shuts down the system and then restarts the system.
Shuts down the system to a point at which it is safe to turn off the power.
Forces processes to LOGOFF. This can cause the applications to lose data.
Forces processes to POWEROFF. This can cause the applications to lose data.
Forces processes to REBOOT. This can cause the applications to lose data.
Forces processes to SHUTDOWN. This can cause the applications to lose data.
Locking a workstation protects it from unauthorized use. (**)
The lowest power state where the system is responsive to interrupts.
System can resume quickly from a file written to disk before power down. (*)
Determines whether the computer supports the soft off power state. (*)
Determines whether the computer supports the sleep states. (*)
Determines whether the computer supports hibernation. (*)
Turns monitor off.
Turns monitor on.
(*) - feature is not supported in Windows 95 and Windows NT 3.51 or 4.0
(**) - requires Windows 2000 or later

Requirements - see details in main feature

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- SetState - 7 973 bytes (binary and sources lcc-win32)

md5 = 181bb69c0c0f97c481b26063cea5a938

Read Time

Win32/Win64 EXE/DLL file TimeStamp reader.

Main Features:

Reads TimeStamp from PE header. Console application.

Requirements

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- ReadTime - 14 273 bytes (binary and sources lcc-win32)

md5 = 127417605e025687649d095e2e782e84

ScrSaver

Way how to enable or disable the screen saver.

Main Features:

Screen saver activation/deactivation.

Requirements

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- ScrSaver - 1 000 bytes (only sources lcc-win32)

md5 = fcf990895e90b082db6625d3cd623a0d

PowerSaving

Way how to disable Screensaver and Monitor Power Saving features

Main Features:

Screensaver & Monitor Power Saving are temporary disabled while this application is running.

Requirements

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- PowerSaving - 1 051 bytes (only sources lcc-win32)

md5 = 65548907cf406f9085bebf4a1787377a

Notepad

NOTEPAD.EXE - part of PSpad.

Main Features:

Notaped.exe runs PSPad only.

Requirements

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- Notepad - 9 371 bytes (binary and sources lcc-win32)

md5 = 21960249f3901eead3b6eea2467f26be

Abort System Shutdown

The AbortSystemShutdown function stops a system shutdown started by using the InitiateSystemShutdown function. The InitiateSystemShutdown function initiates a shutdown and optional restart of the specified computer.

Main Features:

Stops the local computer from shutting down. It's the same function as running Windows XP shutdown.exe utility with "-a" parameter.

The full article Abort system shutdown is on The Code Project website.

Requirements

Windows NT: Requires version 3.1 or later.

Opensource.

Download:

dw- AbortShutdown - 9 076 bytes (binary and sources lcc-win32)

md5 = 8a7a8bd46feb2874c16403e4c6722c96

Kill background

Sets or removes the desktop wallpaper.

Main Features:

Sets, if the first parameter is pointing to a file containing the name of a bitmap file, else removes the desktop wallpaper. Assembler example only removes current desktop wallpaper.

Requirements

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- KillBackground - 4 811 bytes (binary and sources masm32, lcc-win32)

md5 = 54c903cf9939a209966d316b82d24f3d

Get Windows Version

The GetVersion application returns the current version number of the operating system.

Main Features:

Return value is a DWORD value that contains the major and minor version numbers of the operating system in the low order word, and information about the operating system platform in the high order word.

For all platforms, the low order word contains the version number of the operating system. The low-order byte of this word specifies the major version number, in hexadecimal notation. The high-order byte specifies the minor version (revision) number, in hexadecimal notation.

There is a similar article Windows version requirements macros on The Code Project website.

Requirements

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- GetVersion - 2 166 bytes (binary and sources lcc-win32)

md5 = bd3a9565acd799db53d377fcec2d942b

Screen Capture

Saves current desktop to .bmp file.

Main Features:

SW print screen function. After run saves the current desktop to the caputre.bmp file in the application's directory.

Requirements

Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.

Opensource.

Download:

dw- ScreenCapture - 4 024 bytes (binary and sources C++)

md5 = c68aee1ee44f938e3d08cf3ecb1a7e7f

Get local IP address and Adapter Info

Gets information about local network (*) and adapters (**).

Main Features:

Gets various information: winsock info, host name, local IP(s) address(es), adapter name, mac (hardware address for the adapter) address, subnet mask, default gateway, DHCP info, WINS info, etc.

Requirements

(*) Windows NT: Requires version 3.1 or later.
(*) Windows: Requires Windows 95 or later.
(**) Client: Requires Windows XP, Windows 2000 Professional, Windows Me, or Windows 98.
(**) Server: Requires Windows Server 2003 or Windows 2000 Server.

Opensource.

Download:

dw- GetIP and AdapterInfo - 5 189 bytes (binary and sources lcc-win32)

md5 = b4637272763e21809a311abdeebe1826

dw- GetIP - 20 412 bytes (binary and sources MSVC++)

md5 = c51278ee02f47b8fdfd69cce58bb19ef

Get URL

Downloads any file from website.

Main Features:

This console utility is a simple way how to get any file from a website. Obtaining a port number from URL. Proxy is supported.

Requirements

The WinHTTP 5.0 redistributable (Winhttp5.dll) requires Windows XP, Windows 2000, and Windows NT 4.0 with Microsoft Internet Explorer 5.01 or later.

Functions:

WinHttpOpen(), WinHttpConnect(), WinHttpOpenRequest(),WinHttpSendRequest(),
WinHttpReceiveResponse(), WinHttpQueryDataAvailable(), WinHttpReadData(),
fopen(), fwrite()

Opensource.

Download:

dw- GETURL - 4 506 bytes (binary and sources lcc-win32)

md5 = 1cc19d4f726eef769d461992d0477c6b

MD5 hash code

RFC 1321 compliant MD5 implementation.

Main Features:

MD5 Message-Digest Algorithm. This utility (md5.exe) prints into the console window the MD5 sum of the given file and the comparsion is supported in the first example. First example (folder 01) is based on the Christophe Devine's implementation under the terms of the GNU General Public License as published by the Free Software Foundation. The second example (folder 02) is based on the RSA Data Security, Inc. implementation.

Opensource.

Download:

dw- MD5 - 24 876 bytes (binary and sources lcc-win32)

md5 = dbb5e4c9aa7e6382fb6918e5e4a404d5

HDD serial number

Gets volume serial number.

Main Features:

This utility will show a serial number of the hard drive and a drive letter where is operating system MS Windows installed.

Opensource.

Download:

dw- HDD sn - 2 485 bytes (binary and sources lcc-win32)

md5 = adee9e8c87c55ec8ba6248416fafd1bc

created: Feb 04 2005 16:24:52

Convert

Numeric system convertor.

Main Features:

Convert a decimal number to binary, hexadecimal and octal number system. Print a hexadecimal or binary string to decimal number. Recursion, recursive algorithms and bitwise algorithm.

Opensource.

Download:

dw- convert - 1 278 bytes (sources lcc-win32)

txt- source file

md5 = f67a143d257e2a46176850fb18b1b08f

created: Feb 11 2005 21:27:05

AutoLock

Auto lock workstation.

Main Features:

Locks workstation after set minutes of inactivity.

Requirements

Client: Requires Windows XP or Windows 2000 Professional.
Server: Requires Windows Server 2003 or Windows 2000 Server.

Opensource.

Download:

dw- autolock - 13 259 bytes (binary and sources lcc-win32)

.c - source file

txt - readme.txt

md5 = b01862431c90bb5b4bee96ed0e5f7f00

created: Feb 11 2005 21:29:37

updated: Jun 18 2006 23:52:28

Simple Debug View

Debug viewer application.

Main Features:

DebugView is an application that lets you monitor debug output on your local system. Will capture output from the following sources: OutputDebugString() and System.Diagnostics.Trace.Write() functions.

Version: 0.0.5

Requirements

Windows NT: Requires version 4.0 or later.

Tested on

Windows 2000 Professional and Windows XP.

This software is released under the terms of the GNU General Public Licence.

Download:

dw- sdbgview - 31 885 bytes (binary and sources lcc-win32)

txt- todo list

screenshots 01 | 02

md5 = 444dd3ca0f7990e63e487f11e9e95d44

Built Jul 08 2005 10:38:52

Release/Free library

Find a process which holds the given dynamic library (.dll). Check and kill which process has that DLL as a module.

Main Features:

Console application. Will search and kill all the processes which are holding the given library name (comparison is not case sensitive). Useful by COM+ registration using gacutil.exe and regsvcs.exe utilities.

Syntax:

freelib.exe library_name.dll

Output example:

PROCESS: [590] dllhost.exe MODULE: sample.dll ...terminated!
PROCESS: [1280] w3wp.exe   MODULE: sample.dll ...terminated!
PROCESS: [1280] w3wp.exe   MODULE: sample.dll ...terminated!

Batch file example:

@echo off

freelib.exe sample.dll

echo.
echo Just... paused!
pause > nul

gacutil /nologo /u sample
regsvcs /u /nologo sample.dll

gacutil /nologo /i sample.dll
regsvcs /fc /nologo sample.dll

echo.
echo Press any key to close this console window
pause > nul

The full article Find and kill a process which uses the specified loaded dynamic library (.dll) is on The Code Project website.

Requirements

Requires Windows 2000 or higher.

Tested on

Windows 2000 Professional and Windows Server 2003.

Download:

dw- freelib - 5 814 bytes (binary and sources lcc-win32)

md5 = ab44a61eb808c5ed84cf85191de04638


WebZdarma.cz