Jump to content

If you like to learn about computers/software


cozofdeath
 Share

Recommended Posts

  • Replies 98
  • Created
  • Last Reply

Top Posters In This Topic

No I couldn't understand them, but I could definitely tell the difference between you code and language. I have a lot of dutch in my background, unfortunately I never took the time to learn the language. I wish I did though. There was actually so many settlers that came over here we have our own dialect of dutch/german called Pennsylvania dutch. Where abouts are you from?

Link to comment
Share on other sites

hello all... it so nice to see such enthusiastic people here...

I'm a computer science student and my primary programming language is (Native) C++... I really love it.. Been using it for 3,5 years now... If i may give some opinion.. there are some thing that you need to learn before C++...

1. try to learn basic C, some algorithm and data structure, before you move forward to the more advance C++, or you will be confuse with it... Like some of the source code i see here, i can't say that it is C++..

2. don't use any of those given function/methods in C/C++ if you don't really understand what's going on in the function.. once you made a big software, you'll understand why...

3. learn about Object Oriented Programming Concept (like class, attributes, methods, inheritence, polymorphism, etc...), because C++ is an OOP language... It can be used with structural paradigm only to support backward compatiblity... C++ is not C++ without object...

There are a lot of good programming books out there, like "Introduction To Algorithm" by Steven Skiena (well all of his books actually.. lol) and "C++ The Complete Reference" by Herbert Schildt...

If you all REALLY interested in being an expert in programming, visit the programming contest website like ACM, and TopCoder... Join their forum and try to solve lots of problem there...

Have fun in learning! and welcome to the club!

Link to comment
Share on other sites

i might have a challenge for you:

im making a toolbar, and i would like to see if this is possible:

make a C++ script which reads text from a website page [in my case: http://www.udenscollege.nl/intranet/Leerlingen/monitor1.htm and http://www.udenscollege.nl/intranet/Leerlingen/monitor2.htm, so that will be 2 scripts] and displays it afterwards in a ticker [for a toolbar: it displays text, which slides to the left]

this is possible, because ive searched it on google, BUT most of the search results came onto a main page of a website [no scripts there...]

so maybe you guys could do this [but if you find something for this on google, its good too!]

here is the script which is automattically used, but only displays text YOU put in the line

you must enter text at the: Enter your ticker message here, part

<html><body>
<script>
//Specify the Ticker content
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
var marqueecontent = ' Enter your ticker message here. You can add <a href="http://www.effectivebrand.com">links</a> and any other <b>HTML</b>...'

//Specify the ticker speed (larger is faster 1-10)
var marqueespeed=1

//Pause ticker onMousever (0=no. 1=yes)?
var pauseit=1

//configure background color:
var marqueebgcolor="threedface"

//Specify the ticker height
var marqueeheight="20px"

////NO NEED TO EDIT BELOW THIS LINE////////////

//(don't delete <nobr> tag)
marqueecontent = '<nobr><font face="Arial">'+marqueecontent+'</font></nobr>';

marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS

var marqueewidth=document.body.clientWidth;//added by Guy

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var actualwidth=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"

}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}

if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>

<style type= "text/css">
<!--
BODY {margin-left:0; margin-right:0; margin-top:0; margin-bottom:0;
width:100%;height:100%;overflow:hidden;background-color:threedface;}
-->
</style>
</body>

something which also is an option, is to make these pages RSS feeds, so the toolbar can open them and display the text in the toolbar

Link to comment
Share on other sites

i know, you can do more with C++, but Pascal is great to learn

this is kindy funny, 'cause the Pascal programming language looks really like the TI-83/84 programming language, that comes in really fine, 'cause then i can see connections and problems faster [sorry for the bumpy english]

here are 4 programmes ive written: [ive translated them into english]

This program will multiply 2 numbers <> this is my first program

PROGRAM NumberMultiply;

VAR getal1, getal2: integer;

BEGIN
write('Give a number');
readln(getal1);
write('Give another number');
readln(getal2);
writeln(getal1,'*',getal2,'=',getal1 * getal2);
readln
END.

This program will tell you when the Eastersunday is, after you have given a certain year. <> this is my second program

PROGRAM Eastercalculation;

VAR jaartal, a,b,c,d,e,f:integer;

BEGIN
write('Which year?');
readln(jaartal);
a:= jaartal MOD 19;
b:= jaartal MOD 4;
c:= jaartal MOD 7;
d:= (19*a+24) MOD 30;
e:= (5+2*b+4*c+6*d) MOD 7;
f:= d+e-9;
IF f <= 0 THEN
writeln('Eastersunday is on ',f+31,' march')
ELSE
IF f = 26 THEN
writeln(''Eastersunday is on 19 april')
ELSE
IF (f = 25) AND (d = 28) THEN
writeln('Eastersunday is on 18 april')
ELSE
writeln('Eastersunday is on ',f,' april');
readln
END.

this program calculates how you can pay a amount of money [in cents] the best [with the lowest amount of coins] <> this is my third program, im really proud of this one

PROGRAM Money;

VAR a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,f1,f2,bedrag:integer;

BEGIN
write('What is your total amount of money?(in cents)');
readln(bedrag);
writeln('You need (in coins):');
a1 := bedrag DIV 50;
a2 := bedrag MOD 50;
writeln(' ',a1, ' times 50 cent');
b1 := a2 DIV 20;
b2 := a2 MOD 20;
writeln(' ',b1, ' times 20 cent');
c1 := b2 DIV 10;
c2 := b2 MOD 10;
writeln(' ',c1, ' times 10 cent');
d1 := c2 DIV 5;
d2 := c2 MOD 5;
writeln(' ',d1, ' times 5 cent');
e1 := d2 DIV 2;
e2 := d2 MOD 2;
writeln(' ',e1, ' times 2 cent');
f1 := e2 DIV 1;
f2 := e2 MOD 1;
writeln(' ',f1, ' times 1 cent');
readln;
END.

This program will tell you if the year you entered is a leap-year <> this is my last and fourth program

PROGRAM LeapYear;

VAR jaar,a,b: integer;

BEGIN
writeln('Which year?');
readln(jaar);
IF (jaar MOD 4 <> 0) THEN
writeln('It is no leap year.')
ELSE
IF (jaar DIV 100 <> 0) AND (jaar MOD 4 = 0) THEN
writeln('It is a leap year.');
readln
END.

you can run these files by saving them as a .PAS file and opening them with TurboPascal [i uploaded it here]

Link to comment
Share on other sites

Very interesting. Looks a little like C but not. Thanks for taking the time to translate. All of the programs worked. There was one tiny thing in the second program in this line...

IF f = 26 THEN

writeln(''Eastersunday is on 19 april')

But after changing the '' to ' it worked. It seems to be a cool language to learn.

Link to comment
Share on other sites

  • 1 month later...

does anyone else got some news?

i would like to keep this topic alive...

btw: cozofdeath, your forum has been offline for a long while now... {you did that on purpose didnt you?}

btw: ive got some neat Pascal programs

ill post them as soon as i can get them from school to here.

Link to comment
Share on other sites

does anyone else got some news?

No

i would like to keep this topic alive...

Same here.

btw: cozofdeath, your forum has been offline for a long while now... {you did that on purpose didnt you?}

Yeah its been gone for a while now. I actually reformatted and reinstalled and left out the forum.

btw: ive got some neat Pascal programs

ill post them as soon as i can get them from school to here.

Awesome.

I really only come to this forum so it would be cool to keep something like this going even if no one really has anything to say about a post right away maybe someone will later on. I think it makes you want to keep working at it because usually I only learn something till I get bored of it then I stop. So its nice to post something you've done or learned then you can look back at it and really see the progress your making. Whether its about C, pascal, php, etc.

Link to comment
Share on other sites

ive been wondering about that Linux >to> Windows coding too, but it is too complicated for me...

i just did a quick search on that and found this: ZipZag, PicoZIP and AlphaZIP

let me know if that works somehow...

i also read something about .rpm files > you can convert .tar.gz to .rpm, but can windows handle them?

i'm gonna take some pictures of our finishes robot [finished a long while ago...]

we were asked to use it on the open day of our school:

we made it all the way to the newspapers >> more here [watch out: its dutch]; im on this picture [in the striped sweater], but the picture is really weird: my head looks stretched!, and you cant see our robot properly

when i will take the pictures, i will take some pictures of the other robot too...

ill show the programs we used then, too

Link to comment
Share on other sites

Hello...., Maybe for a new project , one of you could try to re-write the code for this thing so it can work in windows..?

I'll give it a shot but I really chances are low that I can do it. I haven't been playing with C for a while.

i wanted to take the pictures yesterday, but i found out that they already destroyed our robot

mayeb i can find some pictures of it on our school site

That sucks. Are you still learning pascal?

Link to comment
Share on other sites

i finished my presentation earlier yesterday, but then this great movie [i-Robot] was on tv, so i had to see it

i attached all the programs i have ever made, in a .zip file, in the .PAS format and as executables [so you dont need Turbo Pascal to run them]

Short descriptions:

BANK: calculates your money on the bank, with a certain amound of interest, after a certain period

BIGNUMBE: calculates the biggest number, of the 3 you entered

COINS: calculates how to pay a certain amount of money with the lowest amount of coins

COUNT: you give a number, this program counts towards that number

DIE1: the computer simulates the throw of a die, and shows the results of the times a number has been thrown

DIE2: the computer simulates the throw of 2 dies, and shows the results: the times a number has been thrown and the number the thrown numbers make after adding them all up

EASTER1: calculates the eastersunday of a certain year

EASTER2: calculates the eastersundays of a certain period of years

FACTORI: calculates the factorial of a certain number

GUESS1: you need to guess a number under the hunderd, using the WHILE command. the computer tells you if you need a bigger or smaller number

GUESS2: you need to guess a number under the hunderd, using the REPEAT-UNTIL command. the computer tells you if you need a bigger or smaller number

GUESSGAME: you need to guess a number under the hunderd, within 20 turns, the computer tells you if you need a bigger or smaller number

LEAPYEAR: calculates if a certain year is a leapyear

MULTIPLY: multiplies 2 numbers

NNUMBER1: displayes a row of systematic numbers [all from a certain number] > this is the not-properly coded version

NNUMBER2: displayes a row of systematic numbers [all from a certain number] > this is the properly coded version

RABBITS: calculates the amound of rabbits after a certain amound of months

TAX1: calculates the price including taxes, after you give a price without taxes

TAX2: calculates the price without taxes, after you give a price including taxes

WAIT1: calculates how many turns are needed to throw a 6 with a die

WAIT2: calculates the average amound of turns needed to throw a 6 with a die

WAIT3: calculates the average and highest amound of turns needed to throw a 6 with a die

WEIGHT: calculates the price you have to pay to post your letter

my most recent programs are: DIE1, DIE2, GUESS1, GUESS2, GUESSGAME, RABBITS, TAX1, TAX2, WAIT1, WAIT2, WAIT3

i like GUESSGAME the best

Link to comment
Share on other sites

i finished my presentation earlier yesterday, but then this great movie [i-Robot] was on tv, so i had to see it

:lol: I-Robot is good.

OMG man! Thats a lot of programs.

I would post some php but I haven't been making it into executables just scripts. But hopefully soon I will be able to make some nice Windows apps with it.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy