Configure HTML/JavaScript

Monday, July 11, 2011

Greate article to Develop your personal managemen skill


Great article to Develop your personal management skill:


Developing a company culture can be a challenge for any business, but especially for ones that employ remote workers. However, it’s crucial for long-term success to have a strong set of values and principles to give your company a unique character that your staff can believe in.
Despite the difficulty of distance, it is possible to grow a company culture when your staff are dotted around the world. You just have to work a little harder at it.
We’ve spoken to two HR experts to bring you five ways to develop and sustain a company culture for remote teams. Have a read and share your thoughts and ideas in the comments below.

1. Write a Mission Statement


It’s not enough to have vague guidelines — you need to have a strong mission statement backed up by a company philosophy that outlines your entire ethos.
Your mission statement should be short and memorable, and it should use your philosophy to expand and explain. In addition to sharing it with staff during the initiation process, put the statement on your company website for all to see and refer to at any time.
Also, you should internally share company goals for the future. Whether these are based on success metrics or less measurable aims, these insights provide the team with direction and empower staff to make educated decisions.

2. Hire the Right People


To develop a strong company culture, every member of staff — from the CEO down to an intern — has to be on board with the philosophy. Add questions into your interview process to determine whether candidates are on the same wave-length as the company.
This is especially important for remote workers, as these teammates will have minimal supervision. You need to match your workers with your company culture. By employing people with the “right” values form the get-go, you’ll have a lot less work ahead of you in making your culture a success across state and even international borders.
In addition, you need to be sure that candidates can cope with remote working. “To aid creation of a virtual culture, and also to help employees decide whether remote team working is for them, it is recommended that organizations first educate themselves and their employees in what the positive and negative implications are,” advises Hilary Blackmore, a chartered occupational psychologist.
“In this way, continuity can be supported for those who subsequently decide to move to a remote working arrangement, as it will help them conceptualize the shift in identity that may be required, reducing the risk of threat.”

3. Create a Close-Knit Team


A close team with shared values is always going to be more motivated than a loose collection of loners. It’s your challenge to try and get your remote team as tight-knit as possible, despite the miles between them.
“Despite the fact that remote workers like the freedom of their work, they still like to be included in the team. There are a number of ways this can be done. If the team members are relatively new and don’t know each other, you can have them do a presentation on themselves to show their interests, family, hobbies and passions,” suggests Michael D. Haberman, SPHR, vice president of Omega HR Solutions.
“One company manager had his employees send a photo of their work area at home and they had a contest with the team members trying to guess whose work area was whose.”

4. Give Your Staff Independence


Give your staff as much autonomy as possible. By letting them make their own decisions based on knowledge of your company philosophy, the corporate principles will be cemented far more effectively than if they just read them and have decisions made for them by more senior staff. Don’t micro-manage.
“There are many ways a manager can still micro-manage a remote team. Instant messaging, phone calls, tracking computer time, times in system, etc. all constitute micro-managing. And that sends the wrong message. Remote teams need to be measured on productivity. Are they getting the work done? If the answer is yes, then leave them alone. If the remote worker is the type of person who needs micro-managing, then the manager made a poor selection choice in that employee,” says Haberman.

5. Recognize and Reward


If one of your staff members does something that is a great example of your company culture, then be sure to highlight this action. Whether you mention it on a team call, write about it on the company blog or just send a group email, recognizing and rewarding staff is a great way to boost morale and keep your company culture strong.

Thursday, April 28, 2011

Function to get next Database ID

the bellow function will give you the next auto increament id of your database primary key.

function getNextID($field_id){
$db =& JFactory::getDBO();
$sql = "SELECT max(id) FROM jos_table WHERE field_name=$name";
$db->setQuery($sql);
$acl_num = $db->loadResult();
if($acl_num<>null){
return ($acl_num + 1);
}else{
return 0;
}
}

in reference to:

"Some time we need to see some string type data of different rows in comma separated or other separated in a single field. for this type of implementation mysql have a function GROUP_CONCAT(field_value) . we can add GROUP BY cluse to get comma separated values in different cases."
- Techinical tips for practical uses (view on Google Sidewiki)

Thursday, February 10, 2011

Getting row values in comma separated using GROUP by or other queries in MySQL

Hi,

Some time we need to see some string type data of different rows in comma separated or other separated in a single field. for this type of implementation mysql have a function GROUP_CONCAT(field_value) . we can add GROUP BY cluse to get comma separated values in different cases.

Example:

GROUP_CONCAT([DISTINCT] expr [,expr ...]
[ORDER BY {unsigned_integer | col_name | expr}
[ASC | DESC] [,col_name ...]]
[SEPARATOR str_val])

mysql> SELECT student_name,
-> GROUP_CONCAT(test_score)
-> FROM student
-> GROUP BY student_name;

in reference to: Aniruddh (view on Google Sidewiki)

Thursday, January 20, 2011

Searching non alpha numeric character through REGEX through PHP

Hi,
you can search non-alpha numeric characters by simple adding a negation regex charactor in the regex string (^).

below is the Example

preg_replace('/[^A-Za-z0-9_]/', '', 'D"usseldorfer H"auptstrasse');

Thanks

in reference to: Aniruddh (view on Google Sidewiki)

Monday, December 20, 2010

Checking the Request is Ajax

//function to check if the request is made through ajax
function isAjax() {
return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) &&
($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'));
}
}

in reference to: http://php.net/ (view on Google Sidewiki)

Thursday, December 9, 2010

managing multiple Databases in php

Hi,
This is important to manage your database connections in php if you are using many connections in a single application. you can use single ton pattern in php to make is clear.

Exe:
class Connector {
    private $conn;
    private $intranetdb = 'jprod';
    private $metricsdb = 'metrics_prod';
    private function __costructor(){
           
    }
    static function intranetDb(){
        return 'jprod';
    }
    static function metricsDb(){
        return 'metrics_prod';
    }
    static function makeConnection($host, $username, $password){
        return $this->conn = mysql_connect($host, $username, $password);
    }
    static function prodConnection(){
       
        $prod_dbhost         = 'localhost1';
        $prod_dbuser         = 'jroot';
        $prod_dbpass         = 'joomla1';
        /*
        $prod_dbhost         = 'localhost';
        $prod_dbuser         = 'root';
        $prod_dbpass         = '';
        */
        $prod_conn = mysql_connect($prod_dbhost, $prod_dbuser, $prod_dbpass) or die ('Error connecting to mysql');
        return $prod_conn;
    }
    static function metricsConnection(){
       
        $dbhost         = 'localhost2';
        $dbuser         = 'jroot';
        $dbpass         = 'joomla1';
        /*
        $dbhost         = 'localhost';
        $dbuser         = 'root';
        $dbpass         = '';
        */
        $db             = 'metrics_prod';
        $conn = mysql_connect($dbhost, $dbuser, $dbpass);
        return $conn;
    }
    static function closeConnection($resource){
            return mysql_close($resource);
    }
    static function freeResult($result){
            return mysql_free_result($result);
    }
}

Friday, November 12, 2010

file copy from url in java

public int copyfile(String filesToTransfor[]) {
int oneChar, count = 0;
if (filesToTransfor.length < 1) {
System.err.println("Two file path is required to complete the process");
System.exit(1);
}
try {
URL url = new URL(filesToTransfor[0]);
System.out.println("Opening connection to " + filesToTransfor[0] + "...");
URLConnection urlC = url.openConnection();
// Copy resource to local file, use remote file
// if no local file name specified
InputStream is = url.openStream();
// Print info about resource
System.out
.println("Copying resource (type: " + urlC.getContentType());
// Date date=new Date(urlC.getLastModified());
// System.out.println(", salesnet file modified on: " + date.toString() + ")...");
System.out.flush();
FileOutputStream fos = null;
if (filesToTransfor.length < 2) {
String localFile = null;
// Get only file name
StringTokenizer st = new StringTokenizer(url.getFile(), "/");
while (st.hasMoreTokens())
localFile = st.nextToken();
fos = new FileOutputStream(localFile);
} else
fos = new FileOutputStream(filesToTransfor[1]);

while ((oneChar = is.read()) != -1) {
fos.write(oneChar);
count++;
}
is.close();
fos.close();
System.out.println(count + " byte(s) copied");

} catch (MalformedURLException e) {
System.err.println(e.toString());
} catch (IOException e) {
System.err.println(e.toString());
}

return count;
}

in reference to: Google Toolbar Installed (view on Google Sidewiki)