Category Archives: Computers

Delphi & Crystal Reports – Steves way

Choose Type Library “Crystal Report Control” (version 5.2 on my system) – CRYSTL32.OCX Gives me TCrystalReport If you get a complaint during compling saying it can’t find Crystal_TLB go to the PROJECT OPTIONS, click Delphi Compiler then add “E:\My Programs\Delphi2010\[packages]\TCrystalReport” to Search Path.

Using Automation with Crystal Reports and Delphi

In order to use the automation features in Crystal Reports 8.0 and higher, you must first import the type libraries into Delphi. 1. From the Delphi IDE main menu, go to Project | Import Type Libary. 2. Highlight ‘Crystal Report 8 Active X Designer Run Time Libary’. 3. In the Class Names box, change the… Read More »

Kix Script – kixtart.kix

include “functions.kix” $startTime = @Ticks $welcome = “Weclome to @Domain, @Fullname (@WkSta)” SetTitle($welcome) cls COLOR W+/n ? $welcome /************************************************** ** ** Mapping network drivers ** **************************************************/ COLOR Y+/n ? ? “Mapping drives” ? “————–” map_drive(“S:”, “\\econel\shared”) map_drive(“T:”, “\\econel\talisman”) /************************************************** ** ** Sync workstations times with cadserv for ** Teamwork software to work. ** **************************************************/ COLOR… Read More »

Kix script – functions.kix

Function map_drive($drive_letter, $unc) COLOR W+/n ? “Mapping $drive_letter to $unc” USE $drive_letter /del /persistent USE $drive_letter “$unc” If @ERROR == 0 COLOR G+/n ? ” Connection succesful” Else print_error(@Error, @SError) EndIf EndFunction Function print_error($errorno, $errorstr) COLOR R+/n ? ” Error $errorno – $errorstr” EndFunction Function connect_printer($unc) COLOR W+/n ? “Connecting to $unc” If ADDPRINTERCONNECTION ($unc)… Read More »

How to Move WordPress Blog to New Domain or Location

To update WordPress options with the new blog location, use the following SQL command: UPDATE wp_options SET option_value = replace(option_value, ‘http://www.old-domain.com’, ‘http://www.new-domain.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’; After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table… Read More »

htaccess surpress / display PHP errors

# supress php errors php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0 # display php errors php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on php_value docref_root 1 php_value docref_ext 1

Vertical text in an image

<?php header (“Content-type: image/png”); // imagecreate (x width, y width) $text = str_replace(‘_’, ‘ ‘, $_GET[‘text’]); $text = ucwords($text); $img_handle = @imagecreatetruecolor (30, 180) or die (“Cannot Create image”); // ImageColorAllocate (image, red, green, blue) $background_color = ImageColorAllocate($img_handle, 0, 0, 0); //to become transparent later in the script $txt_color = ImageColorAllocate($img_handle, 255, 255, 255); //… Read More »

Category: PHP

BT Fibre and Draytek routers

You may already have a BT Business Hub. The BT engineer will bring a Fibre modem with them on installation day. Let the BT engineer setup the new connect. Once they’ve finished plus the BT Fibre Modem into the ethernet WAN port of the Draytek (in my case a 2820). Configured the draytek to enable… Read More »

301 redirection with Apache config or .htaccess file

<VirtualHost *:80> DocumentRoot “/home/apache/http/example.co.uk/www” ServerName www.example.co.uk ServerAlias example.co.uk ServerAlias example-ltd.co.uk www.example-ltd.co.uk ServerAlias example.net www.example.net ServerAlias example.com www.example.com ServerAdmin webmaster@www.example.co.uk #Log files CustomLog logs/access/www.example.co.uk.log combined ErrorLog logs/error/www.example.co.uk.log # redirect all non-www traffic Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.example\.co\.uk$ RewriteRule ^.*$ http://www.example.co.uk%{REQUEST_URI} [R=permanent,L] </VirtualHost>

My linux personalisations

.bashrc # .bashrc # User specific aliases and functions alias rm=’rm -i’ alias cp=’cp -i’ alias mv=’mv -i’ # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi .bashrc_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup… Read More »

Linux Filesystem Backup

tar cvzpf /tmp/Backup.tgz –same-owner –exclude=/proc/* –exclude=/media/* –exclude=/dev/* –exclude=/mnt/* –exclude=/sys/* –exclude=/tmp/* / 2>/tmp/error.log

Syntax to Exclude Directories in Roaming Profiles

GPO Exclude DirectoriesIn Windows 2003 (2000 and 2008) you can use group policies to manage users and computer settings. Most companies have servers where all the data is saved and users should not save any data locally. A lot of companies also use roaming profiles so users can basically sit anywhere and have their data… Read More »

Putty / Puttygen / SSH Keys

Run Putty Key Generator (puttygen.exe) and create and save keys (private as .ppk, public as .public). Copy the text in the window labelled “Public key for pasting into OpenSSH authorized_keys file:” Log onto server and past the key into a users authorized_keys file and save Open putty and navigate to Connection -> SSH -> Auth.… Read More »

TListView info

This info is C orientated but you can figure it out! Start a new application with its default form From the Win32 tab of the Component Palette, double-click the ListView control. Change the Height of the ListView1 control to 200 and its Width to 350 Double-click an empty area on the form and implement the… Read More »

The Network Load Balancing service failed to start due to the following error:

The Network Load Balancing service failed to start due to the following error: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. http://support.microsoft.com/kb/833375 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WLBS\Group