by http://webgeektutorials.blogspot.com

Tuesday, February 28, 2012

Detecting IPhone Device

There are few ways you can detect Iphone Device, and tell browser to behave accordingly. The iPhone launched with this user agent:

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

Todetect User Agent
Using ASP code
For those on a Windows Server, create a file called user-agent.asp and put the following lines of code in:
<%
Response.Write Request.ServerVariables (“HTTP_USER_AGENT”)
%>
Using PHP Code
For those on Linux based servers
<?php

Friday, February 17, 2012

Data Pump in Oracle Database 10g

Oracle Data Pump is a newer, faster and more flexible alternative to the "exp" and "imp" utilities used in previous Oracle versions. In addition to basic import and export functionality data pump provides a PL/SQL API and support for external tables.

Getting Started

For the examples to work we must first unlock the SCOTT account and create a directory object it can access:
CONN sys/password@db10g AS SYSDBA
ALTER USER scott IDENTIFIED BY tiger ACCOUNT UNLOCK;
GRANT CREATE ANY DIRECTORY TO scott;
 
CREATE OR REPLACE DIRECTORY test_dir AS '/u01/app/oracle/oradata/';
GRANT READ, WRITE ON DIRECTORY test_dir TO scott;

Table Exports/Imports

The TABLES parameter is used to specify the tables that are to be exported. The following is an example of the table export and import syntax:
expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR 
dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
 
impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR 
dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log


For example output files see expdpEMP_DEPT.log and impdpEMP_DEPT.log.

The
TABLE_EXISTS_ACTION=APPEND parameter allows data to be imported into existing tables.

Schema Exports/Imports

The OWNER parameter of exp has been replaced by the SCHEMAS parameter which is used to specify the schemas to be exported. The following is an example of the schema export and import syntax:
expdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR 
dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
 
impdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR 
dumpfile=SCOTT.dmp logfile=impdpSCOTT.log
For example output files see expdpSCOTT.log and impdpSCOTT.log.

Friday, January 6, 2012

Quick intro to SQL Server 2008


What is SQL Server 2008 RDBMS?

SQL Server 2008 is primarily thought of as a Relational Database Management System (RDBMS). It is certainly that, but it is also much more.SQL Server 2008 can be more accurately described as an Enterprise Data Platform. It offers many new features and even more enhanced or improved features from previous editions of the product. In addition to traditional RDBMS duty, SQL Server 2008 also provides rich reporting capabilities, powerful data analysis, and data mining, as well as features that support asynchronous data applications, data-driven event notification, and more.


Database Engine

The Database Engine is the primary component of SQL Server 2008. It is the Online Transaction Processing (OLTP) engine for SQL Server, and has been improved and enhanced tremendously in this version. The Database Engine is a high-performance component responsible for the efficient storage, retrieval, and manipulation of relational and Extensible Markup Language (XML) formatted data.
SQL Server 2008’s Database Engine is highly optimized for transaction processing, but offers exceptional performance in complex data retrieval operations. The Database Engine is also responsible for the controlled access and modification of data through its security subsystem. SQL Server 2008’s Database Engine has many major improvements to support scalability, availability, and advanced (and secure) programming objects.

SQL Server database : Regular maintenance

If you are a DBA it is very important for you to know maintenance plan in SQL Server. Generally we use SQL Enterprise Manager to perform regular maintenance of SQL database.

The information below does not cover everything you can do to maintain your SQL database in SQL Enterprise Manager. Before you must See your SQL documentation for details on what else you can do to maintain your database.

Backing up the transaction log is not compatible with simple recovery. If you have multiple databases with different recovery models, you can create separate database maintenance plans for each recovery model. In this way you can include a step to backup your transaction logs only on the databases that do not use the simple recovery mode.

Change recovery model to simple

Simple recovery mode is recommended because it prevents the transaction logs from swelling. In simple recovery, once a checkpoint is complete, the transaction logs for the time before the checkpoint are dropped from the active database. A checkpoint automatically occurs when the backup is made. We recommend having a database maintenance plan that performs a backup of the ePO database, together with "Simple Recovery". In this way, once a backup is successfully created, the portion of the transaction log in the active database will be dropped as it is no longer needed since a backup file exists.

Saturday, December 31, 2011

Photoshop CS5 best features demo

Adobe Creative Suite (CS) is a collection of graphic design, video editing, and web development applications made by Adobe Systems. The collection consists of Adobe's applications (e.g., Photoshop, Acrobat, InDesign), that are based on various technologies (e.g., PostScript, PDF, Flash). The latest version, Adobe Creative Suite 5.5 (CS5.5), was released on April 12, 2011.

Creative Suite 5 and I thought I would share with you Top 5 Favorite Features in Photoshop CS5. There are certainly many more new features than you'll see here, but these are definitely among my favorites.

Photoshop Convert photo to sketch/line draw

This tutorial is just the first video of a multi video session that will show how to turn a photo into a drawing and adding a lil jazz to the image.



Friday, December 23, 2011

TOP 5 Sql Server Scripts


/* 1 -------------------------------Script------------------------------

This script captures CPU Utilization Percent using TSQL. It uses system functions @@CPU_BUSY and @@IDLE
to see what is the CPU Utilization % at a particular instant. You can then use this number in a table or variable
to trigger other events.


@@CPU_BUSY  shows the time SQL Server has been busy
@@IDLE shows the time SQL Server has been idle


--------------------------------------------------------------------*/


DECLARE @CPU_BUSY int
DECLARE @IDLE int

SELECT @CPU_BUSY = @@CPU_BUSY, @IDLE = @@IDLE

WAITFOR DELAY '000:00:01'

SELECT
(@@CPU_BUSY - @CPU_BUSY)/((@@IDLE - @IDLE + @@CPU_BUSY - @CPU_BUSY) * 1.00) *100 AS CPU_Utilization_Pct

Wednesday, December 21, 2011

2 Nodes RHEL6 Cluster Configuration

Step by Step 2 Nodes RHEL6 Cluster Configuration

Virtual Lab Environment
1.    Two Nodes
2.    SAN Storage Server (software iscsi-taget)


Two Nodes
1.    Rhelsrv1
      OS: RHEL6 Server
       IP :172.168.100.101
Iscsi-initiator – iscsi-client

2.    Rhelsrv2
      OS: RHEL6
      IP : 192.168.100.102
Iscsi-client

3.    Client1
       OS: RHEL6 Desktop
        IP : 172.168.100.103

4.    Cluster Name: iscsicluster
        IP : 172.168.100.200

Required Software
Set up yum repo in all three nodes
From Vbox interface , attach rhel6 iso as cdrom and reboot the VMs.
Mount /dev/sr0 /media
/etc/yum.repos.d/rhel6dvd.repo
[Server]
name=Server
baseurl=file:///media/rhel6/Server
enabled=1
gpgcheck=0
[HighAvailability]
name=HighAvailability
baseurl=file:///media/HighAvailability
enabled=1
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=file:///media/LoadBalancer
enabled=1
gpgcheck=0
[ScalableFileSystem]
name=ScalableFileSystem
baseurl=file:///media/ScalableFileSystem
enabled=1
gpgcheck=0

Install Python3 on RHEL

One of my frined was facing trouble while installing Python3 on RHEL. I followed the following steps to install it on RHEL:

One thing i would like to say,It is very easy to install  manually:

STEPS :

1. To download python3 Download:

wget http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tar.bz2

2. Now Unzip

bzip2 -cd Python-3.2.2.tar.bz2 | tar xvf -

3. Its time to Prepare compilation

./configure

4. Now start Build

make

5. start Installation

make install

Happy installing :)

Friday, November 11, 2011

Great business tips from Steve Jobs

1. Be innovative
Steve Jobs was committed and dedicated to technological innovation, Moaiyad Hossenally, senior industry manager for Asia-Pacific ICT practice at Frost & Sullivan, noted in an e-mail.
Pointing to one of Jobs' quotes, "Innovation distinguishes between a leader and a follower", he said the former Apple CEO worked at marrying art and science to bring about technological innovation. "This was the biggest difference in Apple as compared to other PC manufacturers."
Jan Dawson, chief telecoms analyst, said Jobs was not constrained by what has been done before, what is available in the market, or what consumers think they want. Under his leadership, Apple had been very good at reinventing categories in a way consumers could not have articulated "ahead of time" but responded to "enthusiastically", the analyst explained in an e-mail.
Bryan Ma, associate vice president of client devices at IDC Asia-Pacific, shared that even though Apple had not been at the "forefront" of technology, they were innovative in making the product easy enough to use and attractive enough for the mass market.
"Apple made technology cool by simplifying technology and making it cool," he said in a phone interview.
Apple customer Tan Dezhong praised Jobs' for daring to be different and challenging the status quo. "Jobs could tap his inner creativity to create products that change the world," said the banker. "If I could, I'd like to pick up that ability."
2. Have both foresight and confidence
In his tribute to Jobs, Frost & Sullivan Chairman David Frigstad wrote: "Many claim the title of a true visionary, but Jobs set the standard by which all others will be measured."
IDC's Ma noted that Jobs' most striking trait was that he did not get "too caught up" in corporate bureaucracy when making decisions. It was always an intuitive decision--Jobs knew what consumers wanted even if "data told him otherwise", he noted.
Van Baker, research vice president of retail and consumer technologies at Gartner, added that Jobs always knew where he wanted the company to go and was completely confident in the vision the company had.
The veteran also did not resort to outside polling to determine product directions, which allowed the company to deliver products to consumers that they didn't know they need until they saw them, the U.S.-based analyst told ZDNet Asia in an e-mail.
"The premise of the film 'Inception' is that it is possible to seed an idea within a person's dream to persuade them that the genius of a particular course of action stems from their own unconscious desires," Windsor Holden, research director at Juniper Research wrote in a blog post. "Jobs was the mobile industry's [version of] Cobb, the film's central character--the man who planted the seeds."