Programming

How to clear all breakpoints in a Visual Studio…

Click on Debug -> Delete All Breakpoints or press the shortcut key combination Ctrl+Shift+F9
Ian Carnaghan
3 sec read

You are not authorized to access when trying to…

To solve this problem you have to clean the cache folder on your machine. Press Win + R together to open the Run window Type in %UserProfile%\AppData\Local and click on OK...
Ian Carnaghan
13 sec read

The Visual Studio component cache is out of date.…

To fix the error message open the Disk Cleanup utility in Windows. Tick the Temporary files tick box and click on OK. Select Delete Files Restart Microsoft SQL Server Management Studio and...
Ian Carnaghan
8 sec read

How to embed images using PHPMailer

Use the AddEmbeddedImage method provided by the PHPMailer class.  eg. $mail->AddEmbeddedImage(‘test.gif’,’testImage’,’test.gif’); Parameters for AddEmbeddedImage($path, $cid, $name = ”, $encoding = ‘base64’, $type = ‘application/octet-stream’) $path = Path to the attachment $cid = Content ID...
Ian Carnaghan
29 sec read

Comparison Operators

PHP comparison operators allows you to compare two values with each other. Below is a table of all the different comparison operators that are...
Ian Carnaghan
37 sec read

How to subtract a number of days from todays…

$var = ‘2007-08-15’; $var_subtracted_date = date(‘Y-m-d’, strtotime(‘-2 days’, strtotime($var))); Explanation of PHP functions: 1) FUNCTION date DESCRIPTION string date ( string $format  ) PARAMETERS USED IN THIS EXAMPLE Y = A full numeric representation...
Ian Carnaghan
30 sec read

How to print the contents of an array using…

//Array example $arr = array(‘one’,’two’,’three’,’four’); Use the print_r function. Example: print_r($arr); The example above will print out the following: Array ( => one => two...
Ian Carnaghan
19 sec read

How to get the Nameservers of a domain using…

Use the  dns_get_record function with type DNS_NS Example: //Add this piece of code to your PHP will $result = dns_get_record(‘yourdomain.com‘,DNS_NS); Execute the script //An array will be returned...
Ian Carnaghan
19 sec read

What is the purpose of the & Ampersand in…

What this does it creates a reference to the original variable and thus does not copy the value of the original variable. $original_var = 500; &$ref_var = $original_var; //This will print...
Ian Carnaghan
21 sec read