Showing similar content nodes on Drupal

2009
01
Dec

To show similar content nodes on drupal you have to install the similar module. After installing the similar module

  • goto admin/build/block
  • Drag the Similar Entries module

OR

If you want to integrate the similar content to the node body, call the similar_content theme function.  print theme('similar_content', $node); on node.tpl.php

Read More

Firefox 3.5 Embarrassing Error Message

2009
01
Dec
2

Firefox Embarrassing

That was an embarrassing error message Grinning



How to Integrate another Website to Google Analytics Tracking and Adsense

2009
30
Nov

This was supposed to be obvious, but I couldnt find easily how to integrate Google Adsense and Analytics to track your Adsense Ad performance on google analytics. Make sure you display ads on your page and the analytics tracking code. Make sure you have linked the adsense and analytics together before doing this. The following is to add one more site to track adsense.

And then Getting straight to the answer, put the following script on the head.

<script type="Text/javascript">window.google_analytics_uacct = "UA-XXXXXX-X";</script>

Read More

Perl script to remove a directory and contents recursively

2009
26
Nov
2

This is the script for sandeep when he asked me how to delete a directory in perl. rmdir function only removes empty directories. So we need to remove the contents of the directory before removing the directory. So if the directory contains more directories / folders we would have to recursively delete all the directories under the directory. Well so here is the code just to do that.

Read More

Installing Google Go on Linux Ubuntu

2009
22
Nov
1

One command install, Bash script to install Google Go in one Go

#!/bin/bash
ARCH=386 #CHANGE this setting to amd64 if you are on 64 bit.
sudo apt-get install bison make gcc libc6-dev ed mercurial
{
cat ~/.bashrc; cat <<EOF
export GOROOT=$HOME/go
export GOARCH=$ARCH
export GOOS=linux
export GOBIN=$HOME/gobin
export PATH=$PATH:$GOBIN
EOF
}  > ~/temp.bashrc
 
mv ~/.bashrc ~/.bashrc.old
mv ~/temp.bashrc ~/.bashrc
 
export GOROOT=$HOME/go
export GOARCH=$ARCH
export GOOS=linux
export GOBIN=$HOME/gobin
export PATH=$PATH:$GOBIN
 
mkdir $GOBIN
hg clone -r release https://go.googlecode.com/hg/ $GOROOT
cd $GOROOT/src
./all.bash

Read More

Google Go HelloWorld Example Program

2009
22
Nov

code

File : hello.go

package main
import "fmt"
 
func main() {
	fmt.Printf("Hello World !!! \n")
}

Compiling & Running

 8g hello.go 
 8l hello.8
 ./8.out

Output

Hello World !!!

(Obviously Grinning )



Remove a reference to a DLL or COM Component Object file in VB.Net

2009
15
Nov

A reference to 'XXXXX.dll' could not be added. A reference to the component 'XXXXX.dll' already exists in the project.

This occurs when you add 2 versions of the same dll into your project. Before adding a reference to a new DLL you have to remove the reference to the existing library. This is not obvious on vb.net in visual studio. There is a Project > Add Reference. But how do you remove the reference ?

Read More

Syndicate content