Wednesday, May 21, 2008

About to finish my project.

My golden days are about to come. my project is about to complete. It was a very big project and one of my workmate helped me to complete it. However today i was very much tensed. As iam about to complete my project, today i faced lots of errors.
I was totally freaked out and i never lost hope. I managed to fix those problems and when i looked at the clock..it was time to go home.
Well looking forward for a great day tomorrow.

Friday, May 9, 2008

Rude Man?

Last Friday my aunty went to Brown Sugar which is located in Suva Central to buy white top. She bought 2 white top; one long shelve and one short shelve. Over the night she thought and decided to exchange the long shelve top to short shelve. Early the next morning i went with her to the shop. It was one of my favorite shop. She aproached the man sitting behind the counter and asked whether she can exchange it or not, before she can complete her conversation he referred to her to one of the salesman.
She asked the salesman whether she can exchange it or not and then he started taking out all the top from the plastic. He left us unattended and went to do something else and my aunty started looking at them.
In that moment the man sitting behind the counter(i guess the owner of the shop) said ,"why didnt you think of that while buying yesterday. what about if 100 customers come and ask about exchange.We cant do that.did you read the notice ,we cant exchange things once sold "In short he seems too be very rude.
Well i guess it is the consumers right to buy the right product and if they are not satisfied it is their right to exchange the goods.
Some people especially the shop owners didnt seems to understand the consumers right . Well i must say that just because of his attitude we thought of not going to his shop anymore and we also told our friends about the attitude of that man.
For any business customer satisfaction is the aim, if you are rude to them then no one will like to do shopping from there.
All the best Brown Sugar..we are not going to do anymore shopping.

Scared

It was a lovely shiny day today.My aunty and me decided to go for shopping. After doing my washing and house work, we got ready and took off for shopping. We decided not to spend too much time because i have to go to work in the afternoon.
We took a cab and got off at RB Patel in waimanu road and from there we start to do some window shopping. It was saturday so the city was quite busy.
We did some shopping around and then we went to buy vegetables. As i was walking along and looking at the vegetables one man just hold my my hand from behind. I turned back to him with an angry look. A group of fijian man were standing behind me and then one of them said "sorry i just wanted to touch your hand". I really don't know what was his intention but it really scared me. After that i just decided to buy the basic necessity item and go home as early as possible. I went to Rajendras Foodtown to do my grocery shopping. After doing my shopping, one of the salesman just asked me whether i want a taxi , i said yes and he told me to stand there and he will find a cab for me.
As i came outside the shop i saw lot of people. The salesman said just be careful and don't move from there till i find a cab for you. After 5 mins we managed to get one taxi and then i went home safely. Finally i reached my destination(home).

Unlucky day for me....

After a tiring day at work today,i skipped my lunch hour instead thought to do some useful work. The cold weather and heavy rain made me hunger. So i thought of to eat something before i go home. The only meal which i prefer today to eat in this weather was hot and spicy chicken pizza with extra cheese.
So i called my friend to make an order for a medium pizza so that we don't have to wait for 20mins and get into more hunger. By the time we reached the pizza hut opposite village 6 it was around 5.30pm. At first we searched for a seat but cannot grab one so we thot to wait for a while. We stood there for about 15 minutes but unfortunately we didn't managed to get a seat.
My friend got impatience and went to cancel the order. He stood there for about 10 minutes and no one attended him so he thought we are just wasting out time there and we took off. We missed our pizza.
We just pop into wishbone to crab a sit if any available but was unlucky there also. I decided to go home but my friend insisted me to check out kfc and makkers. Makkers made me a bit long distance in the rainny weather so we decided to hop into kfc.
I was very much suprised that seat was available at kfc so we thought to have kfc for our dinner. We bought 2 pc meal and enjoyed our dinner but it was not as delicious as pizza.
After our meal we decided to catch a cab to go home. So we worked down to village 6 , thinking that we can get a cab more easily.
Today was a really bad for me i guess, because it was really difficult to catch a cab.
For about waitng for half an hour we managed to get a cab so both of us board in the same cab even thou are home direction were different.
I dropped my friend first and then i told the driver to drop me home.
I guess it was my unlucky today and for sure i will never go out for pizza after my work especially on fridays.

A day i will never forget in my life.

Wednesday, May 7, 2008

DataGrid,DataList,Repeater

Similarity
-
display data
- code needed to bind data
dataWebControlID.Datasource = someDataSource
dataWebControlID.DataBind()
-using templates to provide customized output
-DataGrid and DataList derived from web control class
-Repeater derived from control class

DataGrid
-
TableRow class
-DataGridItem renders, more or less as a table row
-display data in tabular format
features:
-allowsorting
-data pagination
-inline editing
Disadvantage:
-performance(viewstate)
-displays data in table format
-prohibits more creative display
Template:
-ItemTempplate
-HeaderTemplate
-FooterTemplate
EditItemTemplate
*BoundColumn
*ButtonColumn
*EditColumn
*HyperlinkColumn
*TemplateColumn
Repeater
-
complete customization of its output
-RepeaterItem class
-no stylish property
-lack pagination,editing
-performance beter than datalist and datagrid
  • AlternatingItemTemplate
  • FooterTemplate
  • HeaderTemplate
  • ItemTemplate
  • SeparatorTemplate

DataList
-abondons the columns
-display is define via template


<%# DataBinder.Eval(Container.DataItem, "CompanyName") %>



  • AlternatingItemTemplate
  • EditItemTemplate
  • FooterTemplate
  • HeaderTemplate
  • ItemTemplate
  • SelectedItemTemplate
  • SeparatorTemplate



Monday, May 5, 2008

My short semester

This semester i broke the record of not attending the class. Every monday is my class but i really forget to attend and also fit lazy. One week after mid semester break made an attempt to find out whats going on with the lectures and assignments.

After mid-break my assignment was due. Made and attempt to finish it and submit it after 1 week late. Lecturer told she will deduct 5 marks and just tried to gain optional marks coz assignment was one week late.

After that i made a habbit of attending my class every week. Today i was very much suprised to know that i got only one week lecture left. I think the lecturer made it short and gave us more time to complete the assignment.

It is very difficult to do assignment and also work. I find it bit difficult to adjust my life and i have no idea with others.

Study should not end in life. It is the most enjoyable thing in life.

Thursday, May 1, 2008

Disturbing News!

1st May 2008 is made an unforgettable mark in our life. Was very excited that i will go home early today and do my cooking and then start reading. As i switched on my laptop the first news feed was very much disturbing. Maybe we had lost a wonderful person for ever and ever. It disheartens us to live in the country. A very big question mark is on my mind as why it has happened???? I am really looking for the solution from the current government as why they had taken this step.
I just want to conclude : Be happy and lets others be happy also.

Monday, April 28, 2008

HTTP VS HTTPS

HTTPS - HyperText Transfer Protocol with Secure Sockets Layer. HTTPS is a protocol to transfer encrypted data over the Web.

There are two primary differences between an HTTPS and an HTTP connection work:

* HTTPS connects on port 443, while HTTP is on port 80
* HTTPS encrypts the data sent and received with SSL, while HTTP sends it all as plain text

HTTPS should be used while designing a online store or ecommerce website.
HTTP sends data collected over the Internet in plain text and freeware sniffer software tools can easily collect those data.

Things to consider:

* A Web server such as Apache with mod_ssl that supports SSL encryption
* A Unique IP address - this is what the certificate providers use to validate the secure certificate
* An SSL Certificate from an SSL certificate provider

Sunday, April 27, 2008

SQL SERVER trick

Tips and Tricks for Good Result from SQL SERVER

1. Store relevant and necessary information in the database instead of application structure or array.
2. Use normalized tables in the database. Small multiple tables are usually better than one large table.
3. If you use any enumerated field create look up for it in the database itself to maintain database integrity.
4. Keep primary key of lesser chars or integer. It is easier to process small width keys.
5. Store image paths or URLs in database instead of images. It has less overhead.
6. Use proper database types for the fields. If StartDate is database filed use datetime as datatypes instead of VARCHAR(20).
7. Use Like Clause properly, if you are looking for exact match use '=' instead.
8. Specify column names instead of using * in SELECT statement.
9. Write SQL keyword in capital letters for readability purpose.
10. Using JOIN is better for performance then using sub queries or nested queries.
11. Use stored procedures. They are faster and help in maintainability as well security of the database.
12. Use comments for readability as well guidelines for next developer who comes to modify the same code. Proper documentation of application will also aid help too.
13. Proper indexing will improve the speed of operations in the database.
14. Make sure to test it any of the database programming as well administrative changes.

connecting asp with databse securely

http://dotnetbird.wordpress.com/2008/04/25/connecting-an-aspnet-website-to-sql-server-database-securely/

Friday, April 25, 2008

Current Week Number!!

To find the current week no. in C#.
int i = 0;
i = select todate(sysdate,w);
or
i = (DateTime.Now.DayOfYear)/7;

Wednesday, March 12, 2008

Just Wondering!!!

Just had a strange problem this week....
400 records changed the status from OK to KI.
IT is possible. If it is how.....how can it happen!!!!!

Class

Abstract Class
===========
Here inheritance is possible, instantiating object is not possible
The Abstract class Abstract method will be implement only in derived class by OVERRIDE.
At least one Abstract method is must and should in Abstract Class.



Interface
=======
It’s a pure abstract class.
It has only Abstract methods no implementation. Implement methods through class.

Can inherit can’t create object to interface.

Public Access modifier not private

It’s a indicator. It indicates what, class must provide after inherited the interface. OVERRIDE no need.

Multiple inheritance is possible through Interface only in C#.

ASP.NET features

ASP.NET feature supports are as follows :-
Better Language Support
1.New ADO.NET Concepts have been implemented.
2.ASP.NET supports full language (C# , VB.NET,C++) and not simple scripting
like VBSCRIPT..Better controls than ASP
3. ASP.NET covers large set’s of HTML controls..
4.Better Display grid like Datagrid , Repeater and datalist.Many of the display
grid have paging support.
5.Controls have event supports
6.All ASP.NET controls support events.
7.Load, Click and Change events handled by code makes coding much simpler
and much better organized.
Compiled Code
The first request for an ASP.NET page on the server will compile the ASP.NET code and
keep a cached copy in memory. The result of this is greatly increased performance.
Better Authentication Support
ASP.NET supports forms-based user authentication, including cookie management and
automatic redirecting of unauthorized logins. (You can still do your custom login page
and custom user checking).
User Accounts and Roles
ASP.NET allows for user accounts and roles, to give each user (with a given role) access
to different server code and executables.
High Scalability
Much has been done with ASP.NET to provide greater scalability.
Server to server communication has been greatly enhanced, making it possible
to scale an application over several servers. One example of this is the ability
to run XML parsers, XSL transformations and even resource hungry session
objects on other servers.
Easy Configuration
Configuration of ASP.NET is done with plain text files.
Configuration files can be uploaded or changed while the application is running.
No need to restart the server. No more metabase or registry puzzle.
Easy Deployment
No more server restart to deploy or replace compiled code. ASP.NET simply redirects all
new requests to the new code.

Thursday, February 28, 2008

Adding Multiple Rows to Datatable

Recently i have been trying to use Datatable to store my input data temporary but iam not able to do so. when i click on add new record button it overwrites my first column instead of adding a new row. I am using C# to code my webforms.
My point is that for a particular customer got more than one sales record. So i just wanted to store it in the datatable till the user finishes entering all the data. Thus Datatable will show the user whatever they had entered and if they had made any mistakes they can change it right way.

If anyone has any solutions to this then please to do so....

IsNumeric and ISNull Function

I am just wondering y there is no function such as IsNumeric and IsNull in C#. It makes life bit difficult while doing critical programming.
It just lets me to wonder.........?????

Thursday, January 31, 2008

Writing stored procedure

CREATE PROCEDURE MyMarriage
BrideGroom Male (25),
Bride Female(20) AS
BEGIN

SELECT Bride FROM India_ Brides
WHERE FatherInLaw = 'Millionaire' AND Count(Car) > 10 AND
HouseStatus = 'ThreeStoreyed'
AND BrideEduStatus IN (B.TECH ,BE ,Degree ,MCA ,MiBA) AND Having
Brothers = Null AND Sisters = Null

SELECT Gold, Cash, Car, BankBalance FROM FatherInLaw UPDATE MyBankAccout SET MyBal = MyBal + FatherInLawBal UPDATE MyLocker SET MyLockerContents = MyLockerContents + FatherInLawGold INSERT INTO MyCarShed VALUES ('BMW') END GO

Then the Bride writes the below query:

DROP HUSBAND;
Commit;