Monday, 25 May 2009

Little update!

Have been really busy with Uni recently, so I couldn't write to much. Fortunately there are HOLIDAYS now. Stay tuned for more posts soon:))

Thursday, 12 March 2009

"Hello world!" :) Part 2

This is a little update to the post "Hello world!". There us two more languages I'm learning right now, so I decided to add two more Hello World applications.

7. Assembler- PEP72

BR Main
Main: CHARO c#/H/,i
CHARO c#/e/,i
CHARO c#/l/,i
CHARO c#/l/,i
CHARO c#/o/,i
CHARO c#/ /,i
CHARO c#/W/,i
CHARO c#/o/,i
CHARO c#/r/,i
CHARO c#/l/,i
CHARO c#/d/,i
CHARO c#/!/,i


8. JavaScript

<script language="JavaScript">>
document.write("Hello World!");
</script>


It looks quite simple (apart from the assembler, still need a bit of practice in it), but as I said before, writting this kind of programs give the novice programmer lots information about the language structure.

Tuesday, 3 March 2009

Unix shell script 1

The following script finds a given string in the files in given directory. The directory is passed as an argument and it has to be relative path from the users home directory.

#!/bin/csh

if( !( -d ~/$1 ) ) then
echo No directory supplied
exit
endif

echo Enter string:
set w = $<

foreach a ( `ls ~/$1` )
if( !( -d $a ) ) then
set s = `grep -s $w ~/$1/$a | wc -l`

if ( $s>0 ) then
echo $a : $w found
else
echo $a : $w not found
endif
endif
end


As a result we get listing of all files, saying in which the given string has been found and in which has not.

Tuesday, 24 February 2009

Sebo K - Diva



Monday, 23 February 2009

"Hello world!" :)

The first application that any programmer learning any programming language is likely to write is Hello World. This simple program prints out only the string of characters Hello World. Why is it so important if it is so simple?? Well, the main purpose of this task is to get the ‘programmer’ familiar with main structure of the language.

I was bored and got together some Hello World application from the languages I can program in:

1. C

#include <stdlib.h>

void main()
{
printf(“Hello world!”);
}

2. C++

#include <iostream>
using namespace std;

int main()
{
cout << “Hello World” << endl;
return 0;
}

3. Java

public class helloWorld {
public static void main( String[] args )
{
System.out.println(“Hello World”);
}
}


4. PHP


<?php
echo 'Hello World!';
?>

5. Html

<html>
<head>
<title>Hello World</title>
</head>
<body>
Hello World!
</body>
</html>


6. Shell script


#!/bin/csh
echo “Hello World!”


How would you say 'Hello World!'??

Tuesday, 17 February 2009

Did you know??




Join the discussion: http://shifthappens.wikispaces.com/

StumbleUpon!!!

One day, completely unsuspected i came across website http://stumbleupon.com. I got attracted by the slogan "Discover your web".I started digging in the website and finally i got it. This website allows you to recommend the websites which you think are interesting with other members.

There are many categories of websites to choose from. During the registration process you'll be asked to specify yours. I'd advise you to do it as later the system will provide you with the websites from given categories.

Another useful tip is to install the toolbar. If you do so, you'll have all functionality in the browser window. You can also rate the sides, whether you like them or not. The system will learn what you prefer with every click.

I found this website very entertaining. You can find really interesting websites, which probably you wouldn't find so easily.