Spend right time, for right project and for right client

I am a computer science engineer and for last 8+ years creating wonderful web products and serving smiles to clients. During my early days of professional life i preferred to work with start ups, rather than MNCs, with belief that start ups always have hard time and hard times shapes you well. I always wanted to learn things faster, may be hunger for knowledge, faced and overcame the lot of challenges. The provide me vast experience and strengthened me that led me with setting up an own enterprise named THINK TANKER that I was ever dreaming. At THINK TANKER we’ve worked with numerous clients across industries and in variety of functional domains including E-Commerce, Custom Web Applications, Retail, HR, Technology, Media, Mobile Apps, Transport, and many others.

In India, Collage syllabus include the study of web technologies as theory and practical and hence lot of student are aware of PHP web development because it is comparatively easy piece of cake. Learning PHP is far more easy then learning other web technologies because of two reasons. First it is really easy with no strict type variable binding and second a huge helping community that is always available to help you, specially platform like Stackoverflow and GitHub. Because of this large no of PHP developer are easily available as compared to developers availability for other technologies like Python, Ruby on rails and Java.

This situation leads to the thub rule management studies, demand and supply that when supply is high, price goes down and hence project develpment cost for PHP projects have gone cosiderable down. However in such situation only those can sustain who are consistent in their perfect deliverable by maintaining quality of work.

Hence in the Software Development business world, some Intermediator third party trust factor provider is needed which connects client and service provider and ensure the both parties about successful business agreement. An intermediator which can assure client about quality and consistency of service provider at the same time which can assure service provider that they would definately paid for their good efforts and quality of work. This trustworty party is TOPTAL.

TOPTAL is that TRUST which connects the right client to right team turning win win for both parties. By the TOPTAL, Clients are at their peace that project will get done timely and if in case it does not get don’t timely they clients will not have to burn their hands. At the same time for Service providers have to constantly follow the right deliverable and quality for continuous pool of the project and that what the service provider wants.

And wait! TOPTAL is not just limited to this, they are also in active in proividing teaching and guidance to service provider that how they can have batter business and what else we need.

That is why I’ve added the article title Spend right time, for right project and for right client, that exactly you get from TOPTAL

Wish me happy TOPTALing. Eager to join TOPTAL Web Developers Network

Advertisements

Techfluence – The influence of technologies

Technology – The word did not had any wide spread influence and enthusiasm, but it has changed just in last decade. But now a days it has become the twitter’s trending # tag. New Technologies have changed the way of living life a lot and still continue. Then how all of a sudden the word “Technology” came in picture? Point to think.

For me, only factor is the mobile technology. With rapid transition and a mass influence it the key factory of influence in today’s technology. Desktop computers, you can’t carry anywhere. Laptops you can carry everywhere but you can’t call from it ( without skype ), also not as handy as any smart mobile phone and tablets are.

Any human being is living in society so each of one are social and so we have society. We are connected, mobile phones make our friends and relatives more closer. We love to keep in touch, we love to convey message, too fast. We want prompt action. We want everything ready for us at our time. And smart phones now  a days is the only solution around this.

The smartphone technology has the key factory to bring available service to end user at user’s finger tips. Earlier days we used it to call, to message, for alarm and some pre-installed 2-3 2d games. That is it. And now its usage are countless. Each day thousands of mobile apps are getting ready to reach end users and Users have gone dependent on technologies. Some interesting are:

Banking app: Providing Banking solutions like amount transfer, credit card payment, bill payment No need to go to bank.

Stock Market Apps: You can have real-time status on your portfolio. You can sell/buy yourself.

Job Portals App: The ratio of job change has increased drastically. You can search for new job via monster.com mobile app and your boss can not even know that you are planning jump somewhere.

Matrimony App: In India, we prefer to go traditional and our parents to find a good partner for us. Even this is available in form of app. So parents hassle gone away.

Online Shopping apps and yet lot more.

Have you ever ordered pizza online on Dominos site or not? They shows you at what stage your pizza preparation is!

Apps are there for everything you need.

The complete world is getting available  at your finger tip just unlock your mobile with your finger tips.

It feels like entering into app galaxy. Just unlock to enter in the worlds of apps.

The key factor is “Touch”. Doing everything with gesture. That gives fun to all of us from children to adults and aged ones. We love bigger and bigger screen but we want it to be handy at same time. And solution is Tablet Mobile cum PC. Most of time I have felt that how nice it would be that I could have one flexible keyboard with mobile so that I can use my device as laptop when I’m in office and in rest I can enjoy as tablet. And I see my this imagination to come true via http://asusindia.co.in/T100/ which is all in one for me.

The ASUS Transformer Book T100 is going to buzz in gadget market in coming year. Its 2 in 1, tablet cum PC. Sitting in cafeteria or at office you can use it as Laptop otherwise have fun like Tablet and enjoy your freedom. When you’ll get what all you want in one thing, 2GHZ processor, 2GB RAM, 32GB storage, WiFi, camera, Faster USB3.0  you’ll fall in love with it.

Have a look At ASUS Transformer Book T100 which is 2 in 1 ultra-portable 10 inch laptop cum  tablet that you’ll fall in love.

It will keep you engaged with it, you’ll feel like TRANSFORMED!

 

 

 

 

Listing N Depth Categories Depth Wise

I am regular user at stackoverflow. Post lunch, while seeing the question list for php I came to a question where user wanted to

List N Depth Categories Depth Wise

The Problem was like

table category_path it is in parent child relationship and its look like this


 

User wanted to display result like as below:

The question was interesting. Initially I though that it is so easy can be easily done with self joining of table on id to parent_category_id. But I was wrong. It was not so easy as considered.

After spending whole evening I got the solution is as below:

I have considered that user can easily fetch table values into array and then perform as given:

<?php

function findValue($key,$src){

return $src[$key];
}

function inPatentList($val, $patent_list){

return (in_array($val, $patent_list)) ? true : false;
}

function findFullTraverse($id, $src,&$str){
if(0 != ($value = findValue($id, $src))){
if($str==”){
$str .= $value;
}else{
$str .= ‘_’.$value;
}
findFullTraverse($value,$src,$str);
}
}
$id_parent = array(
‘1’ => ‘0’,
‘2’ => ‘1’,
‘3’ => ‘2’,
‘4’ => ‘1’,
‘5’ => ‘3’,
‘6’ => ‘2’,
);
$parent = array_values($id_parent);
$ids = array_keys($id_parent);

$depth = array();
$keys_for_value = array();
$id_parent = array_reverse($id_parent, true);
foreach($id_parent as $key => $val){

$depth[] = $key.’_’.$key.’_0′;
if(inPatentList($key, $parent)){
$keys_for_value = array_keys($id_parent, $key);
$depth_found[$key] = $keys_for_value;
foreach ($depth_found[$key] as $value){
$str = ”;
findFullTraverse($value, $id_parent,$str);
//echo $value.’=>’.$str.'<br/>’;
$traverse_array = explode(‘_’, $str);
for($i=0;$i<sizeof($traverse_array);$i++){
$has_depth = $i + 1;
$depth[]=$traverse_array[$i].’_’.$value.’_’.$has_depth;
}
}
}
}

sort($depth);
echo ‘<pre>’;
print_r($depth);
echo ‘<pre>’;

?>

 Its really gives nice feeling when solving complex problem.

Load Data From XML to MySql Db Table

One of my colleagues was grabbing data from the web. The data grabbed was in XML format  and he asked me “Hey Rajan, Is there any way that we can insert these data into database?”.

I said, “Wait, let me look”. For till to date, I did database to xml but did not perform xml to database. To solve this I googled and get the solution.

The solution was MySql: LOAD XML

The complete solution is as below:

data.xml file

<?xml version=”1.0″ standalone=”yes” ?>

<getChainTypes>

<result>

<id>1018</id>

<name>Campanile</name>

</result>

<result>

<field name=’id’>1019</field>

<field name=’name’> Best Western </field>

</result>

</getChainTypes>

To import this data into database MySql table, first you need to create table. Precautions, The table columns name must match exactly the data containing tag name or to the tag attribute mentioned as name=’column_name’.

So let’s create table xmldata:
CREATE TABLE xmldata (
    id INT NOT NULL PRIMARY KEY,
    name VARCHAR(40) NULL,
    created TIMESTAMP
);

Once you are done with this now we just need to import data!!!

mysql> LOAD XML LOCAL INFILE 'd:/path_to_/data.xml'
    ->   INTO TABLE xmldata
    ->   ROWS IDENTIFIED BY '<result>';
 

That’s it. You are done with it.

Creating Attractive Anchor buttons Using CSS

Today, while traversing through stackoverflow, one user had asked question about the anchor link button css. He wanted to show mouse hover high-light effect.  The solution I provided is Below.

The two Image user are here:

Main Back Ground Image

The first image is the main(big) back-ground image and the second(small) image is the left side starting image for button.

The main advantage of this css is that, this css is desinged in such a way that it suits itself according to the length of the anchor text.

<html>
<head>
<style type=’text/css’>

#header #nav a {
color: #fff;
float:left;
margin-left:7px;
padding-left:17px;
background:url(“nav-r.png”) 0 0 no-repeat;
text-decoration:none;
}
#header #nav a span {
float:left;
display:block;
padding-right:17px;
background:url(“nav-bg.png”) 100% 0 no-repeat;
line-height:35px;
}
#header #nav a:hover { background-position:0 -70px; }
#header #nav a:hover span { background-position:100% -70px; }

</style>
</head>
<body>
<div id=’header’>
<div id=’nav’>
<a href=’#’><span>Rajan </span></a>
</div>
</div>
</body>
</html>

Download The sample code here

Conditionally selecting values on mysql table

While working under e-commerce project in PHP – MySql, You may came under the situation where you need to show the product price based on condition. It means if the product is that is going to be displayed in the search result has any special offer till some date then show the “special offer” otherwise show normal product price.

I was confuse How to do it. But then I got solution. It was The mysql magic :). The “CASE WHEN ( condition ) THEN some_column_1 ELSE some_column_2”. This solved my problem exactly.

The product table is below.

Now you may getting clear what I want to say. When special_status column has value 1 and special_expire date is greater than current time and special_price is greater than 0(zero) , at that show special_price and if any of the condition fails then show net_price

I select query is as below:

$sql = “SELECT products_id, net_price, special_price, special_expire, special_status, products_name,
CASE WHEN (special_price > 0 AND special_expire > NOW() AND special_status != 0)
THEN special_price ELSE net_price END AS price FROM product_master
WHERE products_name LIKE ‘%s%’
HAVING price >= 100 AND price <= 1000”;

The query above I have fired in such a way that you can get all the rows in order to understand how exactly works. The result of the select query is as below:

See The last column : price where you can see the magic of mysql

Hope this may be helpful to the guys working for e-commerce projects.

Sorry for misspelled words and bad English if you find any.

Thank for reading.

Rajan Rawal

Format Date Fields Using MySQL DATE_FORMAT()

I use MySQL DATE and DATETIME fields almost as much as VARCHAR fields. I use them mostly to track record creation, record updates, and record expiration dates. The default date format in MYSQL is:
2008-09-10 22:50:02

When I pull this information into the page, I want to show the date in human-readable format. That’s where MySQL’s DATE_FORMAT functionality comes in. DATE_FORMAT allows me to format the date in any manner you’d like.
MySQL DATE_FORMAT() Example

DATE_FORMAT(NOW(),’%W, %M %e, %Y @ %h:%i %p’)
#yields ‘Sunday, September 20, 2008 @ 12:45 PM’

MySQL DATE_FORMAT() Letter Representations

Specifier Description
%a Abbreviated weekday name (Sun..Sat)
%b Abbreviated month name (Jan..Dec)
%c Month, numeric (0..12)
%D Day of the month with English suffix (0th, 1st, 2nd, 3rd, …)
%d Day of the month, numeric (00..31)
%e Day of the month, numeric (0..31)
%f Microseconds (000000..999999)
%H Hour (00..23)
%h Hour (01..12)
%I Hour (01..12)
%i Minutes, numeric (00..59)
%j Day of year (001..366)
%k Hour (0..23)
%l Hour (1..12)
%M Month name (January..December)
%m Month, numeric (00..12)
%p AM or PM
%r Time, 12-hour (hh:mm:ss followed by AM or PM)
%S Seconds (00..59)
%s Seconds (00..59)
%T Time, 24-hour (hh:mm:ss)
%U Week (00..53), where Sunday is the first day of the week
%u Week (00..53), where Monday is the first day of the week
%V Week (01..53), where Sunday is the first day of the week; used with %X
%v Week (01..53), where Monday is the first day of the week; used with %x
%W Weekday name (Sunday..Saturday)
%w Day of the week (0=Sunday..6=Saturday)
%X Year for the week where Sunday is the first day of the week, numeric, four digits; used with %V
%x Year for the week, where Monday is the first day of the week, numeric, four digits; used with %v
%Y Year, numeric, four digits
%y Year, numeric (two digits)
%% A literal “%” character
%x x, for any “x” not listed above
Be kind to your users and format the date for them!