Tag Archive: Computer Concepts

Discovered a Bug in the Web Application

I encountered a small bug in my Computer Concepts web app while I was doing the assignment using the app. It seems to always output a forward slash in front of each single quote on the print layout table. Please refer to the following screenshot if you don’t know what I’m talking about.

Forward slash bug in the web aplicationForward slash bug. Click the image to enlarge

Thankfully, I found this post in the Dev Shed forum that provide a native PHP function to remove the forward slashes. I applied the function stripslashes($string) to the output value and the forward slashes are now gone.

Here is the updated source code for anyone who downloaded my last source code:

http://www.robbychen.com/cs110/worksheet_sourcecode.zip

If you find more problems while using the app, please leave a comment. I will fix it as soon as possible. Thanks.

Computer Concepts Assignment Aid Web App released

Comparison between original and digitized version

Note:  This is an old post. It may contain links that no longer exists.

I finally completed the project and will be released under CS 110 homepage over robbychen.com soon. The following are some features of the web application (NOTE: This application is primarily made to help me to finish the assignments easier. However, anyone can use it if it helps to make life easier. This web app doesn’t contain any database-related function nor server/client log script, so you can safe to use it):

  • Each text field is auto expandable thanks to the autoResize (http://james.padolsey.com/javascript/jquery-plugin-autoresize/) jQuery plug-in.

Each text field will automatically expand once text in the text field reached the bottom of the text field.

  • The ability to add more rows using PHP.

The default number of rows is 20. Once you reached the last row at the bottom of the page, the Add a New Row button will appear. NOTE: this button will disappear if I don’t enter anything to any three of the text fields, it assumes that I had completed entering the data. After clicking the button, the page will refresh and it will scroll to the bottom of the page to letting me to enter data in the new row. I use the scrollTo jQuery plug-in to achieve this effect.

  • The option to print out the completed sheet after clicking the Submit button.

Once I clicked the Submit button, two buttons will appear on both top and bottom of the page, print button and edit button. It allows me to print out the completed sheet in order to hand in to the professor. The buttons on the page will not print out with the assignment sheet. I specified the print style sheet to hide the buttons while printing.

  • The option to edit the fields after it was submitted by clicking the Edit button.

The Edit button is simply using history.back() Javascript function to go back one page. I have not think of a way to achieve this without using database or session variables yet since my goal is to not leave any trace of the application on the computer and on the server.

Here is the side-to-side comparison between the original (non-digitized) version of the assignment sheet and digitized one:

Comparison between original and digitized versionComparison between original and digitized version. Click the image to enlarge

The following is the URL for this web app if you want to go to it directly:

http://www.robbychen.com/cs110/worksheet/

Changing Plan

I just found out this morning school is open today despite that today is President’s Day in the US. I have to postpone my project to Wednesday since I don’t have access to a scanner to scan the original assignment sheet. Right now I’m completing assignment for Computer Concepts class. I know the web app for helping me to complete this assignment is not finished yet. Since this assignment is due tomorrow, I have to complete this by hand. Besides, if I finished building the web app, I don’t have access to a printer to print out the assignment, and I have classes until ten o’clock on both evenings today and tomorrow.

So I decided to delay my web app “release” to Wednesday. Today I’ll complete my Computer Concepts assignment. The completion of the web app will be tomorrow. On Wednesday, I will scan the original assignment sheet to my laptop, compare between the web app and the original, and upload the project. As I wrote on previous post, it will be uploaded under the CS 110 homepage on robbychen.com website.

Creating my First Web App

I’m currently creating my first web application to aid my class assignment, specifically CS110 (Computer Concepts). The reason I came up with this web app idea is because there are 12 Chapters in the textbook for the course and we must answer the questions at the end of every chapter, but there is only one sheet of assignment paper. The professor told us to xerox some copies for future assignments. I thought this is a good idea to create a web app based on this sheet of paper. Originally, I planned to use scanner to scan it to my PC and directly working on it. Because there aren’t any good OCR tool available in GNU/Linux, as far as I know, and my writing is terrible, I decided to convert it to a web app.

Today I started creating the web app. I finished coding it using HTML and PHP and putted it to test. I used it to complete the Chapter 2 assignment. During the test, I was beginning to come up inspirational ideas, like auto change to the next text field in the same table column when it reaches maximum length and move the last incomplete word to the new text field like word processor. Unfortunately, I only knows little about JavaScript. I’m researching on how to do these. Maybe I will keep these ideas for my next project if I didn’t find anything on how to accomplish these.

I plan to complete the web app tomorrow. It will be “released” under CS 110 homepage on the robbychen.com website.