Wednesday, June 30, 2010

ulip vs mutual fund......

Mutual Fund are pure investments. ULIP are combination of Insurance and Investment.

First question that we need to answer while buying ULIP is - Do I need to buy insurance?

1) Does the person seeking insurance have any financial liabilities?
2) If something happens to the person, Is there someone who can be in a financial crisis?

1) Insurance
ULIPs provide you with insurance cover.
MFs don’t provide you with insurance cover.

A point in favor of ULIPs. But let me tell you that you don’t get this insurance cover for free. Mortality charges (i.e. the price you pay for the insurance cover) get deducted from your investment.

2) Entry Load
ULIPs generally come with a huge entry load. For different schemes, this can vary between 5 to 40% of the first years premium.
MFs do not have any entry load.

Tax saving MF ( Popularly called as Equity Linked Saving Scheme or ELSS) come with a lock-in period of 3 years. Other MFs don’t have a lock-in period. Again MFs have advantage over ULIPs. ULIPs do allow you to take money out prematurely but they also put penalties on you for doing that.


Friday, June 25, 2010

shares

1. You own a part of the business

.

The good news is, since you own part of the company, you are entitled to a share in its profits.

The bad news is that you are also expected to bear the losses, if any.


2. In the short-run, the price of the share can wildly fluctuate

Let's say the company fixes the price of each share at Rs 10. This is called the face value of the share.

When the share is traded in the stock market, this value may go up or down depending on supply of and demand for the stock.

If everyone wants to buy the shares, the price will go up. If nobody wants to buy the shares, and many want to sell them, the price will fall.

The value of a share in the market at any point of time is called the 'price of the share' or the 'market value of a stock'.

A share with a face value of Rs 10 may be quoted at Rs 55 (higher than the face value) or even Rs 9 (lower than the face value).

So you might have paid Rs 15 for a share which is now quoting at Rs 12. Don't panic and sell. If it is a good company, the share price will eventually rise.

The prices will get influenced by the market sentiment and the general direction of the market. As a result, you may see short-term slumps.

4. Decide how much you want to invest

5. Don't rely solely on 'good advice'

It doesn't matter who is buying the stock or who is recommending it. Steer clear of such ways of making a fast buck. These tips will land you in a soup.

When you hear of a 'hot tip', dig further.

6.. There are many things to remember when you buy shares. stop loss, short sell, Intraday, Delivery, Cash trade e.t.c.

http://www.sharemarkettheory.blogspot.com




Wednesday, June 23, 2010

software architecture

Software architecture is the set of decisions the software architect makes.

The Role of the Software Architect

Tuesday, June 22, 2010

giving the demo of software

  • do's
  • demo is all about demonstrating your product
  • you will live or die by your product
  • you should believe in your product and its ability to shine ,so let it shine
  • gimmick to show value your product skit ,role playing,video etc.
  • a while few laugh keep the audience engaged
  • . Leave room for spontaneity (or at least appear like you have).
  • Have fun. DEMO is fun. That's why people like it
  • . Have a backup plan.
  • Practice piece by piece.
  • Practice in front of people.
  • Practice with distractions.
  • Find your speaking style
  • Practice hand gestures.
  • Find your comfort zone.
donts
  • Don't praise your own product.
  • Don't use a tag line.
  • Don't say what you're looking for out of your DEMO.
  • Don't try to be funny if you aren't funny.
  • Don't sing.

Saturday, June 5, 2010

for getting time difference in two time stamp in minutes for session

for getting time difference in two time stamp in minutes for session

SELECT TIMESTAMPDIFF(MINUTE,`last_update`,CURRENT_TIMESTAMP ) FROM sessions;

thanks
rahul

Monday, May 31, 2010

MAKING EXT JS FORM



HIII

MAKING FORM IN EXT JS OF CRUD OPERATION.

CODE IS AS FOLLOWS

SHOWTASKGRID FUNCTION MAKES THE GRIDPANEL WHICH USES STORE OR RECORDSET IS SIMPLEDATASTORE, SHOW THE COLOUMN MODEL USES THE ROW SELECTION MODEL FOR SHOWING THE UPDATE FORM AND DOING THE DELETE OPERATION , IN FBAR I HAVE GIVEN THE BUTTONS FOR ADD UPDATE ,REFRESH, CLEAR GROUPING AND FOR LOGOUT ,I HAVE GIVEN FUNCTIO FOR DELETERECORD WHICH IS USED FOR DELETED THE RECORD AND MAKE NEW EXT.WINDOW AND ASSING THE GRID VARIABLE IN THE ITEMS OF WINDOW ... BY THIS GRID WILL BE SHOWN IN THE WINDOW....



function showtaskgrid(){
var grid = new xg.GridPanel({
store: SimpleDataStore,
columns: [
{header: "Id", width: 10, sortable: true, dataIndex: 'id'},
{header: "Customer", width: 20, sortable: true, dataIndex: 'customer'},
{header: "Project", width: 20, sortable: true, dataIndex: 'project'},
{header: "Assigned To", width: 20, sortable: true, dataIndex: 'employee'},
{header: "Task", width: 20, sortable: true, dataIndex: 'task'},
{header: "Due Date", width: 20, sortable: true, dataIndex: 'duedate', renderer: Ext.util.Format.dateRenderer('m/d/Y')},
{header: "Hands on Hrs", width: 20, sortable: true, dataIndex: 'handsonhours'},
{header: "Comments", width: 20, sortable: true, dataIndex: 'comment'},
{header: "Completed On", width: 20, sortable: true, dataIndex: 'completiondate', renderer: Ext.util.Format.dateRenderer('m/d/Y')},
{header: "Days Left ", width: 20, sortable: true, dataIndex: 'dayleft'},
{header: "Buffer Hours", width: 20, sortable: true, dataIndex: 'buffhours',renderer:renderbuffhours}
],
sm: new Ext.grid.RowSelectionModel({
singleSelect: true,
listeners: {
rowselect: function(sm, row, rec) {
/* addTab();
Ext.getCmp("task").getForm().loadRecord(rec);*/
}
}
}),
listeners: {
viewready: function(g) {
g.getSelectionModel().selectRow(0);
} // Allow rows to be rendered.
},
viewConfig: {
forceFit:true,
enableRowBody:true,
showPreview:true,
getRowClass : function(record, rowIndex, p, ds) {
var xf = Ext.util.Format;
p.body = '

' + xf.ellipsis(xf.stripTags(record.data.comment), 200) + '

';
return 'x-grid3-row-expanded';
}
},
view: new Ext.grid.GroupingView({
forceFit:true,

groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
}),


plugins: filters,
frame:true,
width: 1000,
height: 450,
collapsible: true,
animCollapse: false,
title: 'Listing of Task',

iconCls: 'icon-grid',
fbar : ['->', {
text:'Clear Grouping',
iconCls: 'icon-clear-group',
handler : function(){
SimpleDataStore.clearGrouping();
}
},'-', {
text:'Add Task',
iconCls: 'icon-clear-group',
handler : function(){
addTab();

}
},'-', {
text:'Refresh',
iconCls: 'icon-clear-group',
handler : function(){
grid.getStore().removeAll();
grid.getStore().load();

}
},'-', {
text:'Update',
iconCls: 'icon-clear-group',
handler : function(){
var selectedKeys = grid.selModel.selections.keys;
if(selectedKeys.length > 0)
{
addTab();
var rec = grid.getSelectionModel().getSelected();

Ext.getCmp("task").getForm().loadRecord(rec);
}
else
{
Ext.MessageBox.alert('Message','Please select at least one item to delete');
}

}
},'-', {
text:'Delete',
iconCls: 'icon-clear-group',
handler : function(){
var selectedKeys = grid.selModel.selections.keys;
if(selectedKeys.length > 0)
{
Ext.MessageBox.confirm('Message','Do you really want to delete selection?', deleteRecord);
}
else
{
Ext.MessageBox.alert('Message','Please select at least one item to delete');
}

}
},'-', {
text:'Log Out',
iconCls: 'add16',
handler : function(){
Ext.Ajax.request({
url:'logout.php',
success:function(){window.location='index.php';},
failure:function(){window.location='index.php';},
});

}
}
]
});
function deleteRecord(btn) {
if(btn=='yes')
{

//returns record objects for selected rows (all info for row)
var selectedRows = grid.selModel.selections.items;

//returns array of selected rows ids only
var selectedKeys = grid.selModel.selections.keys;

//note we already did an if(selectedKeys) to get here

//encode array into json
var encoded_keys = Ext.encode(selectedKeys);
//submit to server
Ext.Ajax.request( //alternative to Ext.form.FormPanel? or Ext.BasicForm.submit
{ //specify options (note success/failure below that receives these same options)
waitMsg: 'Saving changes...',
//url where to send request (url to server side script)
url: 'deletetask.php',

//params will be available via $_POST or $_REQUEST:
params: {
task: "delete", //pass task to do to the server script
companyID: selectedKeys//the unique id(s)

},

/**
* You can also specify a callback (instead of or in
* addition to success/failure) for custom handling.
* If you have success/failure defined, those will
* fire before 'callback'. This callback will fire
* regardless of success or failure.*/
callback: function (options, success, response) {
if (success) { //success will be true if the request succeeded
Ext.MessageBox.alert('OK','record deleted');//you won't see this alert if the next one pops up fast
var json = Ext.util.JSON.decode(response.responseText);

//need to move this to an after event because
//it will fire before the grid is re-rendered
//(while the deleted row(s) are still there
Ext.MessageBox.alert('OK', ' record(s) deleted.');

//You could update an element on your page with
//the result from the server
//(e.g.
)
//var total = Ext.get('total');
//total.update(json.sum);

} else{
Ext.MessageBox.alert('Sorry, please try again. [Q304]',response.responseText);
}
},

//the function to be called upon failure of the request (server script, 404, or 403 errors)
failure:function(response,options){
Ext.MessageBox.alert('Warning','Oops...');
//ds.rejectChanges();//undo any changes
},
success:function(response,options){
//Ext.MessageBox.alert('Success','Yeah...');
//commit changes and remove the red triangle which
//indicates a 'dirty' field
grid.getStore().removeAll();
grid.getStore().load();
}
} //end Ajax request config
);// end Ajax request initialization
};//end if click 'yes' on button
}; // end deleteRecord
SimpleDataStore.load();

var wingrid = new Ext.Window({
title: 'Task Manager',
id:Ext.id(),
closable:false,
width:1200,
height:700,
minWidth: 300,
minHeight: 200,
//border:false,
layout:'fit',

items: grid
});
wingrid.show(this);
}

FOR MAKING THE GROUPING STORE IN EXTJS I HAVE USED THE FOLLOWING CODE

var SimpleDataStore = new Ext.data.GroupingStore({
proxy: new Ext.data.HttpProxy({
url: 'tasklist.php',
method: 'POST'
}),
reader: new Ext.data.JsonReader({

},
[
//this is field in database
{name: 'id', type: 'numeric'},
{name: 'customer', type: 'string'},
{name: 'project', type: 'string'},
{name: 'employee', type: 'string'},
{name: 'task', type: 'string'},
{name: 'duedate', type: 'date'},
{name: 'handsonhours', type: 'numeric'},
{name: 'completiondate', type: 'date'},
{name: 'comment', type: 'string'},
{name: 'dayleft', type: 'string'},
{name: 'buffhours', type: 'string'}

]),
sortInfo:{field: 'customer', direction: "ASC"},
groupField:'customer' // this script used to classify by country
});

FOR GIVING FILTER TO THE GRID USED THE FOLLOWING CODE....


var filters = new Ext.ux.grid.GridFilters({
local:true,
filters:[
{type: 'numeric', dataIndex: 'id',store: SimpleDataStore},
{type: 'string', dataIndex: 'customer',store: SimpleDataStore},
{type: 'string', dataIndex: 'project'},
{type: 'string', dataIndex: 'employee'},
{ type: 'string',dataIndex: 'task'},
{ type: 'date',dataIndex: 'duedate'},
{ type: 'numeric',dataIndex: 'handsonhours'},
{dataIndex: 'completiondate', type: 'date'},
{dataIndex: 'comment', type: 'string'},
{dataIndex: 'dayleft', type: 'numeric'},
{dataIndex: 'buffhours', type: 'numeric'}
]});

FOR OPENING THE FORM ON CLICK OF THE ADD BUTTON.....

USE THIS FUNCTION.....

function addTab(){
/*data store for project,employee,customer auttosuggest*/
var customer = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'customer.php'
}),
reader: new Ext.data.JsonReader({

},
[{name: 'customer'},
{name: 'customer'}
])
});
customer.load();
var project = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'project.php'
}),
reader: new Ext.data.JsonReader({

},
[{name: 'project'},
{name: 'project'}
])
});
project.load();
var employee = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'employee.php'
}),
reader: new Ext.data.JsonReader({

},
[{name: 'employee'},
{name: 'employee'}
])
});
employee.load();
/* formpanel for form for add edit task*/
var simple = new Ext.FormPanel
({
id:'task',
bodyStyle : "padding: 0px;",
buttonAlign: 'center',
defaults: {anchor: '100%'},
defaultType: 'textfield',
frame : true,
labelAlign : "top",
method: 'post',
style: 'margin: 0px auto',
url: 'savetask.php',
width: 300,
items :
[{
xtype:'combo',
store: customer,
name:'customer',
fieldLabel : "Customer",
displayField: 'customer',
valueField:'customer',
minChars: 1,
typeAhead: false,
mode: 'remote',
forceSelection: false,
triggerAction: 'all',
emptyText: 'Select a customer...',
selectOnFocus: true

},{
xtype:'combo',
store: project,
name:'project',
fieldLabel : "Project",
displayField: 'project',
valueField:'project',
minChars: 1,
typeAhead: false,
mode: 'remote',
forceSelection: false,
triggerAction: 'all',
emptyText: 'Select a project...',
selectOnFocus: true
},{
xtype:'combo',
store: employee,
name:'employee',
fieldLabel : "Employee",
displayField: 'employee',
valueField:'employee',
minChars: 1,
typeAhead: false,
mode: 'remote',
forceSelection: false,
triggerAction: 'all',
emptyText: 'Select a employee...',
selectOnFocus: true
},{
xtype : "textarea",
name : "task",
fieldLabel : "Task",
height : 50,
},

{
xtype : "hidden",
name : "id",
fieldLabel : "id",
height : 0,
}
,

new Ext.form.DateField({
fieldLabel: 'Due Date',
name: 'duedate',
allowBlank: false,
width:190
}),
{
name : "handsonhours",
fieldLabel : "Hand On Hours"
} ,{
xtype : "textarea",
name : "comment",
fieldLabel : "Comment",
height : 50,
},
new Ext.form.DateField({
fieldLabel: 'Completion Date',
name: 'completiondate',
width:190
})



],

});
/* window for form for add edit task*/
if(!win){
var win = new Ext.Window({
title: 'Add Task',
id:Ext.id(),
closable:true,
width:500,
height:550,
minWidth: 300,
minHeight: 200,
//border:false,
layout:'fit',
plain:true,
items: simple,
buttons:
[{
text: 'Reset',
handler: function(){simple.getForm().reset()}
},{
text: 'Submit',
handler: function()
{
simple.getForm().submit
({
success: function(form, action) {

Ext.Msg.alert('Success', action.result.msg);
grid.getStore().removeAll();
grid.getStore().load();
win.hide();
},

failure: function(form, action) {
Ext.Msg.alert('Failure', action.result.msg);
win.hide();
}
});
}
}]

});
}
win.show(this);
}
IN THIS FUNCTION FIRST I HAVE MAKE THREE DATA STORE FOR CUSTOMER,PROJECT,EMPLOYEE AUTO SUGGEST COMBO BOX IN THIS I WAS GETTING THE PROBLEM OF NOT GETTING THE DATA ON TYPING IN THE TEXT BOX THAN THROUGH SOME BLOG I GOT THE IDEA OF POSTING OF QUERY IN THE VALUE OF TEXT BOXT I GOT THAT IN THE POST VARIABLE THAN I QUERY WITH THAT POST VARIABLE WITH LIKE THAN MY PROBLEM IS SOLVED , THE CODOR HELPED ME IN SOLVING THIS PROBLEM THANKS TO HIM..

AFTER MAKING THIS AUTO SUGGEST I MAKED THE FORM PANEL IN WHICH ALL TEXT BOX AND AUTOSUGGEST I PUT THAN I MAKED NEW WINDOW AND ASSIGNED THE FORM SIMPLE VARIBLE TO WINDOW AND SHOWED IT ........

I HAVE MADED THE LOGIN LOGOUT FORM IN EXTJS IN THAT I GOT THE PROBLEM OF SESSION VARIBLE THAN I PUT THE ACTION ON LOGIN
IS WINDOW.LOCATION TO ANOTHER PAGE THAN I GOT THE SESSION VARIABLE STOARGE

THANKS


RAHUL







Monday, May 3, 2010

testing web application

1.check broken link from
http://www.dead-link-checker.com/en/
2.check design all browser testing -every page
3.form submission and flow of dynamic website

a) if admin there then password encryption check