LandscapeView To PortraitView

- (BOOL) shouldAutorotateToInterfaceOrientation:UIInterfaceOrientation) interfaceOrientation  
{
    if (interfaceOrientation == UIInterfaceOrientationPortrait)
        return NO;
    if (interfaceOrientation == UIInterfaceOrientationLandscapeRight 
            || interfaceOrientation == UIInterfaceOrientationLandscapeLeft )
        return YES; 
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

Export Database to CSV File PHP Script

$host = 'localhost';
$user = 'mysqlUser';
$pass = 'myUserPass';
$db = 'myDatabase';
$table = 'products_info';
$file = 'export';

$link = mysql_connect($host, $user, $pass) or die("Can not connect." . mysql_error());

mysql_select_db($db) or die("Can not connect.");


$res = mysql_query("SELECT * FROM $table");

// fetch a row and write the column names out to the file
$row = mysql_fetch_assoc($res);
$line = "";
$comma = "";
foreach($row as $name => $value) {
    $line .= $comma . '"' . str_replace('"', '""', $name) . '"';
    $comma = ",";
}
$line .= "\n";
fputs($fp, $line);

// remove the result pointer back to the start
mysql_data_seek($res, 0);

// and loop through the actual data
while($row = mysql_fetch_assoc($res)) {
 
    $line = "";
    $comma = "";
    foreach($row as $value) {
        $line .= $comma . '"' . str_replace('"', '""', $value) . '"';
        $comma = ",";
     

    }
     $line .= "\n";
    fputs($fp, $line);
 
}

fclose($fp);
header('Content-type: application/csv');
header('Content-Disposition: attachment; filename="export.csv"');
readfile('export.csv');

Windows XP Run Commands and Shortcuts


Windows XP Home / Pro Run Commands and Short Cuts

How To - Click Start, Click Run and enter the command Click OK

Run commands

Calc - Calculator

Cfgwiz32 - ISDN Configuration Wizard

Charmap - Character Map

Chkdisk - Repair damaged files

Cleanmgr - Cleans up hard drives

Clipbrd - Windows Clipboard viewer

Cmd - Opens a new Command Window (cmd.exe)

Control - Displays Control Panel

Dcomcnfg - DCOM user security

Debug - Assembly language programming tool

Defrag - Defragmentation tool

Drwatson - Records programs crash & snapshots

Dxdiag - DirectX Diagnostic Utility

Explorer - Windows Explorer

Fontview - Graphical font viewer

Ftp - ftp.exe program

Hostname - Returns Computer's name

Ipconfig - Displays IP configuration for all network adapters

Jview - Microsoft Command-line Loader for Java classes

MMC - Microsoft Management Console

Msconfig - Configuration to edit startup files

Msinfo32 - Microsoft System Information Utility

Nbtstat - Displays stats and current connections using NetBios over TCP/IP

Netstat - Displays all active network connections

Nslookup - Returns your local DNS server

Odbcad32 - ODBC Data Source Administrator

Ping - Sends data to a specified host/IP

Regedit - registry Editor

Regsvr32 - register/de-register DLL/OCX/ActiveX

Regwiz - Reistration wizard

Sfc /scannow - Sytem File Checker

Sndrec32 - Sound Recorder
Sndvol32 - Volume control for soundcard

Sysedit - Edit system startup files (config.sys, autoexec.bat, win.ini, etc.)

Systeminfo - display various system information in text console

Taskmgr - Task manager

Telnet - Telnet program

Taskkill - kill processes using command line interface

Tskill - reduced version of Taskkill from Windows XP Home

Tracert - Traces and displays all paths required to reach an internet host

Winchat - simple chat program for Windows networks

Winipcfg - Displays IP configuration