MayfieldGlobal

Everything from operating systems, programming to web development and more.

Jan
19

How do I use PHP includes in my Web pages?

Posted under PHP

PHP Includes allow you to easily reuse specific sections of code and content throughout your site. For example, many sites have a footer section where they display additional navigation links, ads, etc. Without PHP Includes (or other server side programming language), a developer would need to write the same code for this footer into each and every page of their site. Manually coding every page with the same identical content is a serious hassle and can make maintenance a nightmare. In comes PHP includes.

A basic include statement is written like this:<?php include ( 'directory/filename.php' ); ?>

Pretty simple. Now, let’s say you want the links listed below to be displayed as the footer in several pages of your site:
Read the rest of this entry »

Jan
16

What is the SQL Server 2005 SQL syntax for dropping a column?

Posted under SQL Server 2005, T-SQL

The following is the general syntax for deleting a column from a table:
ALTER TABLE table_name
DROP COLUMN column-name

Jan
15

How do I connect my ASP.NET project to the AdventureWorksLT database?

Posted under ASP.NET, SQL Server 2005, Visual Web Developer 2008 Express

Establishing database connections to SQL Server 2005 is pretty straight forward, provided that you have the necessary components:

  • SQL Server 2005 Express
  • Visual Web Developer 2008 Express
  • Microsoft SQL Server Management Studio Express

Read the rest of this entry »

Jan
13

I receive the message: “<username> is not in the sudoers file. This incident will be reported.”. How do I enable sudo?

Posted under Linux, Shell

The sudo command allows users to perform tasks as another user - most commonly, the root user. Using sudo instead of su - has significant advantages. Most notably is that all operations performed with sudo are logged to: /var/log/secure.

To use the sudo command, the user (in this article, the user is ned) must be added to the: /etc/sudoers configuration file.
Read the rest of this entry »

Jan
11

How do I convert my MP3 files to the AAC format in iTunes (v7.5)?

Posted under Windows Vista, iTunes

Converting MP3 files to AAC format has many benefits but for me the main reason is much smaller files.

  1. Ensure that you have added your MP3 files to the iTunes library.
  2. Select the MP3 files you would like to convert then right-click on the selected files and select Convert Selection to AAC.
  3. After the conversion is complete you may safely remove your MP3 files from the iTunes library.