Wednesday, September 23, 2009

A Stab at the Delete Key or DEL_KEY

Hi everyone in OOP Nation, I took the liberty of writing the switch for the DEL_KEY in the CIOL.C CODE. I hope you all take a look and give me some feedback on whether there are any bugs or not.

Here it is:
case DEL_KEY:
for(i=*offset+*curpos;str[i] != 0;i++){
str[i] = str[i+1];
}
if(*curpos != fieldlen - 1){
while(str[i] != 0){
str[i]= str[i+1];
}
}

Thanks for Blogging

Solution to Delete in CIOL.C

I think I found a solution to the problem in the CIOL.C Code that makes the backspace button behave like the delete button.

Here it is, let me know of any bugs, I would appreciate it.


case BACKSPACE_KEY: /* bug, when at *curpos is zero, backspace does what delete key does */
for(i=*offset+*curpos-1;str[i] != 0;i++){
str[i] = str[i+1];
}
if(*curpos != 0){
(*curpos) --;
}
else if(*curpos == 0){
(*curpos) = 0;
(*offset)--;
}

Sunday, September 20, 2009

First Challenge - OOP344 - Armin Kumarshellah

I Realize this is a little late, but I had to do it to prove to myself that I'm not a total slacker. I also know that it is not the shortest piece of code but if you have any suggestions, I welcome your advice. Thank you.



void GetInt(char *strint, int val) {
int x=1, i=0, k=val;
for(i=0;k>x;i++){
x*=10;
}
x/=10;
for(i=0;x>=1;i++){
k/=x;
val -= (k*x);
strint[i]=(k+48);
k=val;
x/=10;}
}

Thursday, September 17, 2009

C code when blogging - Tips for html

when writing a blog in which you want to add C code; for example:
a simple "for" statement, the html code will not show anything after the "<" sign. That is because the "<" sign denotes special character in html. Therefore when you want to write a C code in html, you must substitute the < sign with "&" followed by "l" followed by "t" followed by the semi-colon.

you can find more information about which symbols you can and can't use in html by going to W3SCHOOLS

Hope This Helps.. HAPPY CODING

Wednesday, September 16, 2009

ISO Reader - no cd required

As most of the people in Seneca know, whenever you download something from the ACS website, you receive it in .iso format. Most people will try to burn the image on a CD, which is fine, but some of the files are too big to fit on a normal CD. A better way to open this image would be to use a program called DAEMON Tools. you can simply download and install this program, it will appear on the bottom right of your screen(in windows), in the toolbar. Right click the icon and click on mount image. Then located the iso file and press okay. VERY Simple and easy to do.

you can get daemon tools from this website:
http://www.filehippo.com/download_daemon_tools/

Tuesday, September 8, 2009

Welcome to my first blog

Hello friends, my name is Armin. I would like to take this opportunity to welcome all of you to my first ever blog, and I would also like to thank you for stopping by.

I have to admit, at first I was very intimidated by blogs, primarily because I didn't understand the concept. Not that the concept is hard to grasp, but I think I can blame it on my own laziness and unwillingness to learn it. Anyway, now that I am attempting it, all that apprehensiveness has virtually disappeared. I guess, like most things in life, the first step is always the hardest.

Now that I am familiar with the concept of blogging, you can expect to hear a lot more from me. The second challenge that I must overcome, is finding something worth writing about. Maybe that's the hardest step.