Category Archives: Final Year Project

FYP: COMPLETED!!!

Yay! I just completed my FYP last Tuesday! The presentation went quite smooth. Nothing went wrong during the whole presentation unlike some other group (thank god!)

Now, the only left thing left is my final. My final exam will start next Friday and will end the week after that (Thursday).

Guess that I won’t be writing anything between this two weeks.

Add Item Manually in DropDownList

In ASP.NET, we can bind the dropdownlist to a data source so that it can display the items dynamically. But one of the problem is that you can’t add the any new item such as “Select One” in the list. But here is the workaround for it:

<asp:DropDownList ID="ddlProducts" DataSourceID="SqlDataSource2" DataTextField="ProductName" runat="server" onDataBound="ddlProducts_DataBound">
</asp:DropDownList>

protected void ddlProducts_DataBound(object sender, EventArgs e)
{
ddlProducts.Items.Insert(0, new ListItem("Select.......","-1"));
}

Busy busy busy

Been very busy lately due to my FYP and assignments. For my FYP, the system itself is almost done. Currently I’m doing the testing for the system. But there are too much documentation to do (such as test script, etc) And we still haven’t start to do the final report.

Other than my FYP, I’m really busy with assignments and midterms. For now, only one midterm left, which is BHM on next Friday (and I still haven’t study for it yet) For Software Quality’s assignment, I’m damn frustrated with one of my groupmate. She just doesn’t understand what the assignment want! Talking to her is almost useless and she acts like she is the leader of the group. Hopefully I can finish this in time. (need to submit next Wed)

I guess that I won’t be able to make any new post until I’m done with my work. (most probably in two or three weeks)

And btw, many new anime this season that are interesting. ;)

scope_identity()

scope_identity() is one of the function in SQL Server. (2000 and above) The usage of this function is to return the primary key of the last record that you insert into the table. Some people also said that you can use @@identity to archive similar result, but there is one problem which is @@identity will return the wrong primary key if there is any use of trigger (that insert another record) during the insert of the record. And scope_identity() only return the primary key from the same table (and same session) of the insertion which prevent user from getting the wrong primary key.

Scope_Identity @ MSDN
Retrieving Scalar Data from a Stored Procedure @ 4guysFromRolla
Check Your SQL Server Identity @ SQL Server Central

Web-based Sound Recorder

As you know, I’m currently working on my FYP. One of the part that I’m responsible for is to develop a web based sound/voice recorder. This is definitely something new to me!

At first, I think of using C# with .Net for the recorder, but it seems that it is not possible to do it for a web-based application. So, after some searching, I found that Java is more suitable to develop this program. One of the main reason is Java code can run as an applet in a browser and secondly, there is a Sound API for sound-related development. There are plenty of resources for this API!

I started coding the program yesterday (since my group is not available, and I can’t discuss the design of the database) I found a few website that are quite useful to me. The article/lesson/tutorial by Richard G Baldwin is very useful and helped me a lot! The link to the article is available at the end of this post. JSResources is also a good place if you’re looking for some references or sample code that related to Java Sound API. This is where I learnt about the security that related to sound recording applet.

The following links might be useful if you are developing an application based on Java Sound API:
Java Sound, An Introduction
Java Sound, Getting Started, Part 2, Capture Using Specified Mixer
Java Sound Resources
Applet Signing Using Test Certificate