Friday, September 26, 2008

Tanya Stephens - Do you still care

Great song

Put your photo or text in the middle and in the center of a page

Just follow this steps:

  1. Remove the DOCTYPE Declaration from the top of your code. By removing this code you will not be able to validate your page, but who care.

  2. Then insert one table and give it a height=100%.

  3. Then align your text/photo in the center and in the middle of the table. How you do that? By giving to the table the following attributes: valign="middle" and align="center"

Chapter 1 homework solution from the book: Introduction to Discrete Event Systems By Christos G. Cassandras, Stephane Lafortune.

As i say in the title of this post i have the solution for chapter 1 problems. The solutions are for 1.1 and 1.3 exercise.

Please click here (.doc format) to download the solutions.

Tuesday, April 29, 2008

Oldie effect on Fireworks

A nice effect using fireworks. You can use it as a banner, a photo frame and background.

You can download the .png file from here (722 Kb) if you link to see the effect in details.

Thursday, March 13, 2008

Free Website Template

Sorry i have so long to write, but i was really busy with my studies.

I stole little of my free time and i make a simple and nice website template. You can use this template for free but only for personal use (no commercial use is allowed).
Please leave the link on the bottom of the site.

View Demo


Friday, February 29, 2008

My VHDL lab. Cadence, Simple starter examples

I have used program like Max Plus, Quartus, XILINX ISE, Modelsim but none of them had such a bad interface like Cadence Nclaunch. The interface really sucks. Beside that, it is one of the best packets in the market.

Below are 2 simple exercises i had to do with
Cadence Nclaunch.

Exercise 1: Write a VHDL file and a test bench for a comparator circuit. The input ports
are std_logic_vectors (1 downto 0) A and B and the output ports are std_logic signals: less, equal and greater. The circuits compares the vectors A and B. If A is less than B, then less is assigned value 1 and the rest of the output ports are assigned value 0 and so on.

VHDL code


entity exc1 is
Port (A, B : in STD_LOGIC_VECTOR (1 downto 0);
less, greater, equal: out STD_LOGIC);
end exc1;

architecture Behavioral of exc1 is

signal less1, greater1, equal1 : STD_LOGIC;


process(A, B, less1, greater1, equal1)
if (A >B) then
less1 <= '0'; greater1 <= '1'; equal1 <='0'; elsif(A=B) then less1 <= '0'; greater1 <= 0'; equal1 <='1'; else less1 <= '1'; greater1 <= '0'; equal1 <='0'; end if; end process; less<=less1; greater<=greater1; equal<=equal1; end Behavioral;

Test bench

library IEEE;
use IEEE.std_logic_1164.all;

entity exc1_test is
end exc1_test;

architecture test of exc1_test is

component exc1
port(A, B : in STD_LOGIC_VECTOR (1 downto 0);
less, greater, equal: out STD_LOGIC );
end component;

for i1: exc1 use entity work.exc1(behavioral);
signal A, B : STD_LOGIC_VECTOR (1 downto 0);
signal less, greater, equal : std_logic;
i1: exc1 port map( A,B,less, greater, equal);

simulate: process

A<="00"; B<="00"; wait for 10 ns; A<="00"; B<="01"; wait for 10 ns; A<="00"; B<="10"; wait for 10 ns; A<="00"; B<="11"; wait for 10 ns; A<="01"; B<="00"; wait for 10 ns; A<="01"; B<="01"; wait for 10 ns; A<="01"; B<="10"; wait for 10 ns; A<="01"; B<="11"; wait for 10 ns; A<="10"; B<="00"; wait for 10 ns; A<="10"; B<="01"; wait for 10 ns; A<="10"; B<="10"; wait for 10 ns; A<="10"; B<="11"; wait for 10 ns; A<="11"; B<="00"; wait for 10 ns; A<="11"; B<="01"; wait for 10 ns; A<="11"; B<="10"; wait for 10 ns; A<="11"; B<="11"; wait for 10 ns; end process simulate; end test;

Exercise 2: Write a VHDL file and a test bench for a decoder circuit. The input port is a
std_logic_vector (1 downto 0) I and the output port is a std_logic_vector(3 downto 0) Out. The behavior of the circuit is as follows: (Out=0001 when I = 00, Out=0010 when I = 01, Out=0100 when I = 10, Out=1000 when I = 11, otherwise, Out=XXXX) .

VHDL code

library IEEE;

entity exc2 is
Port ( I : in STD_LOGIC_VECTOR (1 downto 0);
output : out STD_LOGIC_VECTOR (3 downto 0));
end exc2;

architecture Behavioral of exc2 is
signal temp:STD_LOGIC_VECTOR (3 downto 0);

if (I="00") then
temp <= "0001"; elsif(I="01") then temp <= "0010"; elsif(I="10") then temp <= "0100"; elsif(I="11") then temp <= "1000"; else temp <= "XXXX"; end if; end process; output <= temp; end Behavioral;

Test bench

library IEEE;
use IEEE.std_logic_1164.all;

entity exc2_test is
end exc2_test;

architecture test of exc2_test is
component exc2
port( I: in STD_LOGIC_VECTOR (1 downto 0);
output: out STD_LOGIC_VECTOR(3 downto 0));
end component;

for i2: exc2 use entity work.exc2(behavioral);

signal I : STD_LOGIC_VECTOR (1 downto 0);
signal output : STD_LOGIC_VECTOR (3 downto 0);


i2: exc2 port map(I, output);

simulate: process

I<="00"; wait for 10 ns;
I<="01"; wait for 10 ns;
I<="10"; wait for 10 ns;
I<="11"; wait for 10 ns;

end process simulate;

end test;

Friday, February 1, 2008

Few SEO Tips

Few SEO Tips

Few SEO tips i gather thought time that was really helpful and successful.

Few tips about your site (Internal SEO)

  1. Good, rich and unique content.
  2. Try not to steal from other websites, search engines can detect duplicate content after a while and then they will ban your links.
  3. Good use of h1,h2... tags. Try to use only one h1 tag on every page. "h1" is important because it is the text that describes the content of the page. You can use h2 and h3 tags for other text. Remember h1 represents the most important text of the page and all the others the less important text.
  4. Use good and unique titles for your page.
  5. Use good keywords.
  6. Give a brief and scheme description of your site.
  7. When you use links it is better to give to them title=" .....".
  8. When you use images use both alt="...." and title=".....", so the search engines understand what kind of image is.
  9. Try to give a more understandable name to your images. For example it is better to name an image "my_cat_Nora.gif" instead of using the name "DC12345.gif".
  10. Be patient, if you follow this rules the search engines will reward your effort.
  11. if you use a link to an external source use the HTML attribute rel="nofollow". This mean that the crawlers of the search engines will not follow that link.
External SEO
  1. List your site in directories (i recommend free ones).
  2. Make partnership with other related sites and exchange links.
  3. Write articles in other sites which will link and advertise your site.

I am sure that you can find more tips, but i think this are the basics ones. I hope it will help.

Thursday, January 31, 2008

Install multiple versions of IE on your PC

Install multiple versions of IE on your PC

For web designers who wants to see how their site looks on multiple versions of Internet Explorer, this is a great program. It allows you to have all IE versions from IE 3.0 until version 7.0

download site

Wednesday, January 30, 2008

Macromedia Fireworks Free Textures (379 in total)

If you like Macromedia Fireworks then you would get in love with this textures, 379 in total

Download from here

Tuesday, January 29, 2008

Validate your website or not?

The days that IE was number one browser has gone and new players appears. Websites are not Microsoft FrontPage
babies that works properly only in IE. The effort that a web designer have to make to create a well done website that follows the web standards but at the same time works on multiple browsers have increase.

I have read a lot of articles about the importance of validating the HTML and CSS code of your site and found that it is not so “important”. I don’t say that you don’t need to do it, but sometimes it’s difficult to apply the web standards to your website. The most important thing is to make your site to work on multiple browsers: Firefox and IE (at least on version 6 and 7). If you archive this it will be ok for your visitors.

But if we analyze in more depth the importance of validating your site you will have the following benefits:

Your site will be working on multiple browsers (not absolute). I found that making your site behave normally in IE you will need a little more effort. Sometimes you need to write a different CSS for it and include it in the following tags:

Internet Explorer browser display forms, text fields, buttons and some form elements a little different than Firefox. Especially you will discover the IE always put a padding to your form for no reason. To fix this you will have to write the following CSS code:

Also, if you apply border styles to your button or text field you will have to play with their height because IE displays them different than Firefox.

Fewer strange problems. Less problems with text align and padding issues. For example, if you make a page and don’t give text-align properties to it you will find that Firefox align the text on left and IE align the text on the center. So you will always have to give text-align properties in your CSS:

text-align: left; or
text-align: center; (there are more options: right, absolute…)

Search engine friendly site. If your code is clean and follows the web standards the search engine crawlers will be able to analyze in more depth your site and get more information, otherwise they will leave on the first bad code.

Discover and recover broken links. I think i don't have to analyze that point, it's obvious.

Be more professional. If you learn to write clean and validated code then you will increase your web design abilities, save a lot of time and effort from try to validated your site, use useless code will be a history and generally you will be more proud about your work.

Some useful links

HTML Validator
CSS Validator

I make a search to see which of the most popular site are HTML validated (XHTML 1.0 strict) and found the following results (Top 10 sites from
  1. HTML: Failed CSS: Pass
  2. HTML: Failed CSS: Failed
  3. HTML: Failed CSS: Failed
  4. HTML: Failed CSS: Failed
  5. HTML: Pass CSS: Pass
  6. HTML: Failed CSS: Failed
  7. HTML: Failed CSS: Failed
  8. HTML: Failed CSS: Failed
  9. HTML: Failed CSS: Pass
  10. HTML: Failed CSS: Failed
Only pass both html and css validation. You can see that the big players don't care too much about the web standars. They want only to make their site works on all browser (that don't mean html&css validated) and offer their products.

It is up to you to decide what is the best.

Monday, January 14, 2008

Simple Java Chat Client-Server

This is a project i had in the Computer Networks Cource in University.

Download it here

What was asked is to create a Java Chat Room application, which uses a certain protocol (given) to implement a server client functionality.

How the protocol works:


  • Client sends Login command. The server checks if no other person has that nickname and sends back the List command that is a list with all the other clients (explained bellow)
  • NewNick command. It is send by the server to the client to notify that nickname is not available.
  • PrivateRecieve , private message from nickname (!)
  • Logout: Client sends that command to logout from the server and then exists the Gui
  • Logout : nickname has logged out
  • Gui for all this, pretty simple


  • It opens port 9999 and wait some connection
  • When it get a connection waits for Login command. It then checks to see if nickname is available. If nickname is not available sends the NewNick command back to notify the client
  • If nick is availiable the server sends the List to all the clients
  • When it recieves a Post command then sends msg to all the users in the chat room
  • PrivatePost sends msg to the nickname
  • When recieves the Logout command, deletes the nickname from the clients list and resends the List command to everybody
  • Server is created with threads so that it can handle a large number of clients
Client Gui
  • Action - Connect Popups a window to select server, ip or host. If you run the server on your computer leave it to localhost
  • Action - Disconnect Disconects ...
  • When connected a second window popus to ask you for your nickname
  • If nickname exists the client asks you for a new one
  • When connected you can write your personal message down and press enter or the send button
  • For private message click on the nickname you want to sent it and write the message

The project is in fact simple and is based on the java tutorial

The source code comments are in greek (since i am greek), but anything you might want to ask just leave a comment, i will answer as soon as i see it

Some images:

Saturday, January 12, 2008

Create a mountain with Fireworks

With the pen tool create a triangle shape

Create a mountain with Fireworks

Give to the shape the following characteristics

Fill category -> Gradient -> Linear
Color -> i use #FF9900 and fading to white (#FFFFFF), you can use any color

Create a mountain with Fireworks

After, with the pen tool create a shape like the below (with black color)

Create a mountain with Fireworks

Now give to the new shape:
color -> #FF6600

and select the two shapes and clone them (edit -> clone) and resize (modify -> transform -> numeric transform... -> scale = 60%). Now place them behind the original shapes.Create a mountain with Fireworks

Create a mountain with Fireworks

Friday, January 11, 2008

Create a beer mat with fireworks

Because beer mat looks always dirty and wet we have to represent this things. We can do this using an old paper like the below.

Create a beer mat with fireworks

We will use the old paper effect after. First you have to create a rectangle 350x350px and give to it the following characteristics:

color -> #663300
rectangle roundness ->20%
texture -> NN_fractal256_hline2noise

If you don't have this texture you can take it from the image below

Create a beer mat with fireworks

The result will be this

Create a beer mat with fireworks

Then you can make a border for the mat and write some text. For the border is a rectangle with no fill color, just border color (#FFFFFF white) and tip size 2px. Also I add to the border noise from the effect list.
Add some text also.

Finally, we will give the old paper effect to the beer mat. what we have to do is to give to the old paper from the effects list the effect Convert to Alpha.

Fix the corners with eraser tool, I do it very fast so forgive me if it is not perfect

Other colors

When you take the law in your hands

When you take the law in your hands

Fade effect with Fireworks

Select a picture

Then create a rectangle

Give to the rectangle the following effects (Properties bar at the bottom):

Blend mode -> Erase
Edge of fills -> Feather
Amount of Feather -> 40% you can play with this value

Place the rectanngle at the bottom of the picture.