Posts

Showing posts from 2014

Type Malayalam in Photoshop, CorelDraw, Publisher etc. Without Character Map.

Image
Typing Malayalam Unicode in Photoshop/CorelDraw etc. will not work well with Google input tools. It requires some ICFOS fonts to work like ML-TTKartika, ML-TTIndulekha etc. But where the problem is how to type using these fonts. Some websites recommends using character map in windows, But it is a boring job to type each and every word in Malayalam, especially if we want to type a paragraph or page... Another way is using ISM, but it costs around $225 I think. Don't worry, here is a free and easy solution, use my FontConverter software. How to use it? It is so simple... If not present, download and install "Kartika" and "ML-TTIndulekha Normal" Fonts in your windows system. You can get ML-TT Fonts from here Download and Install Google Input Tools Download FontConverter setup and install it in your system. Now start FontConverter. In the input text box, type using Google input tools. Then click "convert" button. The output is set to display...

Dining Philosophers Problem between Processes

This is a solution to Dining Philosophers Problem between Processes. It starts 5 processes that runs infinitely, so require at least Intel i3 processor. Platform : Linux #include<iostream> #include<stdlib.h> #include<sys/ipc.h> #include<sys/types.h> #include<sys/shm.h> #include<sys/mman.h> #include<fcntl.h> #include<unistd.h> #include<semaphore.h> using namespace std; #define FORKS 5 #define PHIL_NUM 5 #define SNAME "SEM" key_t key = 5678; class philosopher {  sem_t *lock;  int shmid, *s, *shm, n, left_fork, right_fork;  void open_sem();  void open_shm(int);  void think (void);  void eat (void);  void take_forks ();  void put_forks ();  public:  const static int INIT = 0, NORMAL = 1;  philosopher(int );  void init_shm();  void start(); }; /* initialises shared memory all positions to 0*/ void philosopher :: init_shm () {  open_shm (INIT); } /** opens sha...