PHP Fragment cache solution

PHP Fragment cache solution Sometimes we want to cache a part php script rather caching the whole page.

dyanmic_updated_part.gif

For example above right side list is updating after 1 hour, so why not cache it for 1 hour rather shooting database for each request.

My illustration will cache a time stamp (so when can verify when it was updated lastly):

Continue reading

www.IDG.no up NOW!!!

www.IDG.noAfter a long journey now www.IDG.no is up and running from production server.
we all are very happy and excited for new challenge on phase two.

another news escenic CEO and CTO are coming …
we had a lot of andersen’s icecream today and also filled our stomach with Chicken King friend chicken… and coke…
after a long road trip we could reach at home…

another information today is first Holly Ramadan night… :D

Java Swing: resize Undecorated window

Hi, here is code snap to make resizable your undecorated window

private void _setUpWindowResizeEvent() {
this.addMouseMotionListener(
new MouseMotionListener() {

public void mouseDragged(MouseEvent mouseEvent) {
if( mHozResizeEnabled || mVerResizeEnabled ) {
int x = mouseEvent.getX();
int y = mouseEvent.getY();
_resizeWindow( MouseInfo.getPointerInfo().getLocation() );
}
}

public void mouseMoved(MouseEvent mouseEvent) {
boolean horizontalResize = mouseEvent.getX() = getWidth()-5;
boolean verticalResize = mouseEvent.getY() = getHeight()-5;

if( horizontalResize ) {
setCursor( new Cursor( Cursor.W_RESIZE_CURSOR ) );
mHozResizeEnabled = true;
mWindowMouseClickPoint = mouseEvent.getPoint();
}
else if( verticalResize ) {
setCursor( new Cursor( Cursor.S_RESIZE_CURSOR ) );
mVerResizeEnabled = true;
mWindowMouseClickPoint = mouseEvent.getPoint();
}
else {
setCursor( new Cursor( Cursor.DEFAULT_CURSOR ) );
mHozResizeEnabled = false;
mVerResizeEnabled = false;
}

}
}
);
}

Great Song from “Yatri” “Akta gopon kota….”

I am not much music fan… few days back I stacked with a music of “Yatri” “Akta gopon kota ….” Bangladeshi musician…. I really wondered How great a music could be….

I continued this music for more than 40 times still repeating…. Great one….


Thanks Omi Azad whom I called and heard such great music…. And also thanks Yatri….


Album: shopnochura

Résumé in Web 2.0 way ….

I have made a presentation to demonstrate, how people can use web 2.0 concepts on  a silly stuff like personal Résumé….

Download “Résumé in web 2.0 way” Presentation…

I will be pleased if people get it interesting… best wishes…

drag java undecorated window

Just for reminder,

“How to drag undecorated window”
place a JLabel or what ever component which does support mouse mototion and mouse event listener.

undecorated window: when window is head less. no caption bar no resizable border. is enabled by  setUndecorated( true );

private boolean mMoveStart = false;
private Point mMouseClickPoint = null;
private void _setUpMoveEvent() {
mWindowTitleLabel.addMouseMotionListener(
new MouseMotionListener() {
public void mouseDragged(MouseEvent mouseEvent) {
if (mMoveStart)
_moveWindowTo(mouseEvent.getPoint());
}

public void mouseMoved(MouseEvent mouseEvent) {

}

}
);
mWindowTitleLabel.addMouseListener(
new MouseAdapter() {
public void mousePressed(MouseEvent mouseEvent) {
mMouseClickPoint = mouseEvent.getPoint();
mMoveStart = true;
}

public void mouseReleased(MouseEvent mouseEvent) {
mMoveStart = false;
_fireStickyUpdated();
}
}
);
}

private void _moveWindowTo(Point point) {
int musDiffX = point.x - mMouseClickPoint.x;
int musDiffY = point.y - mMouseClickPoint.y;

setLocation( getLocation().x + musDiffX, getLocation().y + musDiffY );
sticky.setLocation( getLocation() );
}

here, mWindowTitleLable is JLable component

:D

For old Fan!!!

hi, i am getting some request for my previous “ajax-new-color” theme.

i have changed my file system thats why previous files are lost.

please find out this attachment…. ajax-new-color
thank u :D

Java Limited list

sometimes, you may need a list objects which is limited by its’ fixed length.
let’s think: you need a maximum 10 items list.
if more value is added it will remove the last one and append on top of the list.

this code snap could be used for such purpose:

public class LimitedListCacheObject {

    private int listSize = 20;
    private LinkedList list = new LinkedList();

    public LimitedListCacheObject() { }

    public int getListSize() { return listSize; }

    public void setListSize(int listSize) { this.listSize = listSize; }

    public LinkedList getList() { return list; }

    public synchronized void addItem( Object o ) {
        _clearListLastItem();
        getList().addFirst( o );
    }

    private void _clearListLastItem() {
        if( getList().size() == listSize )
            // remove last item from the list
            getList().removeLast();
    }

}

IntelliJ IDEA Plugin contest – Plug in and win $5000

very interesting…

Plugins created by our community members and others have made IntelliJ IDEA even more intelligent and smart over the years. In appreciation, we’d now like to give a little something back – like about $25,000! Enter your new or modified plugin in our 2006 Plugin Contest and you could take home the grand prize of $5,000, or one of the other super cash and software prizes from JetBrains and other contest sponsors totalling over $25 K.

Someone is going to win all these very nice prizes – why not you? Use the links above to get all the details, and then blow us away with your best stuff – we just can’t wait to see what you’re going to come up with!

http://plugins.intellij.net/ 

New resume, with new idea.. Skill cloud, Interest Cloud etc..

My new resume uploaded, few ideas are added, How does it look like to other peple? :D , Thanks to emran bhai (for editing my english construction)
Download Hasan’s Resume

Skill Cloud:

skill_cloud1.gif

Interest cloud:

interest_cloud1.gif

my tweets

 

September 2006
S S M T W T F
« Aug   Oct »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Flickr Photos

@kamalapur over bridge

@kamalapur station

cox's bazaar trip oct 09

cox's bazaar trip oct 09

cast ur vote!

More Photos
Follow

Get every new post delivered to your Inbox.