<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>LINUX programming Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'LINUX programming' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Thu, 09 Feb 2012 03:50:49 -0800</pubDate>
    <lastBuildDate>Thu, 09 Feb 2012 03:50:49 -0800</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>linux newbie</title>
      <link>http://www.programmersheaven.com/mb/Linux/427312/427312/linux-newbie/</link>
      <description>I'm working in a automation company since 5 yrs..I've experience in micro controller embedded c programming..now I want to learn Linux and RTOS programming...from where I can start..is there any good book for it.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/427312/427312/linux-newbie/</guid>
      <pubDate>Thu, 09 Feb 2012 01:15:29 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>bind fails on socket</title>
      <link>http://www.programmersheaven.com/mb/Linux/427012/427012/bind-fails-on-socket/</link>
      <description>Hi! Here's my problem: I create, bind, set to listen a TCP socket (non-blocking mode). Then client connects, I accept connection, data is transferred properly. Now if client first disconnects and only then I close my application (closing data socket, then listening one) I can start this application again (i.e listen on the same port again) without any problems. However if close my application before client disconnects (still closing both data and listening sockets) I can not listen on the same port again for about 30-40 seconds (bind fails, system says port in use). After 30-40 seconds I can listen again. I use shutdown and close to close sockets and always first close data socket and only then listening one. Does anyone know why system thinks that port is still in use if close server application before client disconnects? Client, by the way, detects disconnect and quits too.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/427012/427012/bind-fails-on-socket/</guid>
      <pubDate>Thu, 26 Jan 2012 01:47:24 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>kbhit with up arrow</title>
      <link>http://www.programmersheaven.com/mb/Linux/426782/426782/kbhit-with-up-arrow/</link>
      <description>Since _kbhit is with windows, I have a routine done&lt;br /&gt;
on linux, however, I am not able to get the up arrow&lt;br /&gt;
key ( the one with the command history ) to work properly&lt;br /&gt;
within the console. Please help.&lt;br /&gt;
&lt;br /&gt;
Is there any routine that can retrieve the history when&lt;br /&gt;
the up arrow key is recognized?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/426782/426782/kbhit-with-up-arrow/</guid>
      <pubDate>Wed, 11 Jan 2012 13:11:19 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>I have 2 important problems to solve guys!</title>
      <link>http://www.programmersheaven.com/mb/Linux/425371/425371/i-have-2-important-problems-to-solve-guys/</link>
      <description>Hello, &lt;br /&gt;
&lt;br /&gt;
I study Computer Engineering in Poland. I have 2 important problems to solve on Linux Terminal... &lt;br /&gt;
&lt;br /&gt;
1. Write a script which takes input from a user and display on the monitor. It's square.&lt;br /&gt;
    e.g. 5^2 = 25&lt;br /&gt;
    Tip: Use "read" command.&lt;br /&gt;
 &lt;br /&gt;
2. Write a script which verifies your current date and time and if it coincides with your lab classes it should print "I wish you good work!" and if not your lab time must write "Do you rest, go to work!"&lt;br /&gt;
&lt;br /&gt;
I am looking forward to hear good news from you! :) I really have to solve these problems! &lt;br /&gt;
&lt;br /&gt;
Thanks a lot, &lt;br /&gt;
&lt;br /&gt;
Best Regards... &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/425371/425371/i-have-2-important-problems-to-solve-guys/</guid>
      <pubDate>Mon, 24 Oct 2011 13:40:47 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>script on linux terminal</title>
      <link>http://www.programmersheaven.com/mb/Linux/425370/425370/script-on-linux-terminal/</link>
      <description>I want to write a script which calculates square of a number by using read command on Linux. How can i write??? please can anyone help me???&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/425370/425370/script-on-linux-terminal/</guid>
      <pubDate>Mon, 24 Oct 2011 13:40:36 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>app that hashes host's mac address and c.name and submits to server</title>
      <link>http://www.programmersheaven.com/mb/Linux/425099/425099/app-that-hashes-hosts-mac-address-and-cname-and-submits-to-server/</link>
      <description>Hi to all. I want to create a desktop or web app / service that hashes the host's mac address with the computer's name along with other computer attributes (cpu,hdisks,os etc..) and creates an id. Then it sends this id to the server to get stored into a binary file. Now every time the client requests from server , the server gets this generated id from client and authenticates, so it knows it is the same computer. I need to make this in order to create a secure server-client access lock. OS = linux.&lt;br /&gt;
&lt;br /&gt;
I have not done anything similar so any help would be highly appreciated.&lt;br /&gt;
Are there any ready apps-algorithms that would do sth like that?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/425099/425099/app-that-hashes-hosts-mac-address-and-cname-and-submits-to-server/</guid>
      <pubDate>Thu, 06 Oct 2011 02:50:45 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>HID driver programming</title>
      <link>http://www.programmersheaven.com/mb/Linux/424942/424942/hid-driver-programming/</link>
      <description>Hi!!&lt;br /&gt;
My task is to create a virtual device file and a driver for it.The driver should poll and send hid reports to the device.&lt;br /&gt;
till now i am successful in creating the device file and a driver with basic features.&lt;br /&gt;
Now what I am stuck on is how to setup and send hid reports to the device file.I have gone through the source code of hiddev.c and hid-core.c but it does not gives any clear picture.&lt;br /&gt;
I am still undecided about the approach.&lt;br /&gt;
Please help me with this!!!&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/424942/424942/hid-driver-programming/</guid>
      <pubDate>Wed, 28 Sep 2011 23:54:38 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Sharing a serial port among multiple processes</title>
      <link>http://www.programmersheaven.com/mb/Linux/424872/424872/sharing-a-serial-port-among-multiple-processes/</link>
      <description>I am creating a Daemon in Unix that will have exclusive access to a serial port "/dev/tty01". I am planning to create a Master - Slave process paradigm where there is one master (the daemon) and multiple slaves. I was thinking of having a structure in "Shared memory" where the slaves can access, and there is only one writer to the memory so I most likely wont need a semaphore. The data will be updated fairly slowly, once every minute for example. I was looking into what would be the best possible way to do this, also if I have a structure in shared memory, how can I guarantee that the structure will be contiguous in memory? It is a requirement I must have.&lt;br /&gt;
&lt;br /&gt;
The master program will have its own internal data structure that is being updated from the serial port, and then it will modify the data and send it out to a global structure that is in shared memory for the clients to use.&lt;br /&gt;
&lt;br /&gt;
I dont have much experience in Unix IPC, but what would be the easiest way to do this? By the way the clients will all be different processes ran by other users locally on the system&lt;br /&gt;
&lt;br /&gt;
It must used shared memory it is a requirement of the project. Also, is it possible to copy one structure into another if the second structure has different data types?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/424872/424872/sharing-a-serial-port-among-multiple-processes/</guid>
      <pubDate>Sat, 24 Sep 2011 18:20:18 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>etmp4 and tcl please help URGENT!</title>
      <link>http://www.programmersheaven.com/mb/Linux/423693/423693/etmp4-and-tcl-please-help-urgent/</link>
      <description>I am trying to create a video file by the command exec ./etmp4 -p -0 sd_1 rd_1 st_a01 a01.mp4 a01e in a tcl script.&lt;br /&gt;
&lt;br /&gt;
but, when I run it- the video files weren't created by the tcl script.&lt;br /&gt;
&lt;br /&gt;
When I tried to run it from the console the video files were created,but with the output "aborted" in the end:&lt;br /&gt;
 &lt;br /&gt;
&lt;strong&gt;~/ns-allinone-2.34/ns-2.34/v1$ ./etmp4 -p -0 sd_1 rd_1 st_a01 a01.mp4 a01e&lt;br /&gt;
&lt;br /&gt;
*** loss_a01e.txt ***: percentage of lost [frames|packets]&lt;br /&gt;
    column 1: I (including H)&lt;br /&gt;
    column 2: P&lt;br /&gt;
    column 3: &lt;br /&gt;
    column 2: loss flag&lt;br /&gt;
    column 3: end-to-end delay [s]&lt;br /&gt;
    column 4: sender inter [frame|packet] lag [s]&lt;br /&gt;
    column 5: receiver inter [frame|packet] lag [s]&lt;br /&gt;
    column 6: cumulative jitter [s] [Hartanto et. al.]&lt;br /&gt;
&lt;br /&gt;
*** rate_s_a01e.txt ***: sender rate&lt;br /&gt;
    column 1: time [s]&lt;br /&gt;
    column 2: momentary rate [bytes/s]&lt;br /&gt;
    column 3: cumulative rate [bytes/s]&lt;br /&gt;
&lt;br /&gt;
*** rate_r_a01e.txt ***: receiver rate&lt;br /&gt;
    column 1: time [s]&lt;br /&gt;
    column 2: momentary rate [bytes/s]&lt;br /&gt;
    column 3: cumulative rate [bytes/s]&lt;br /&gt;
&lt;br /&gt;
*** glibc detected *** ./etmp4: double free or corruption (fasttop): 0x080b9b88 ***&lt;br /&gt;
======= Backtrace: =========&lt;br /&gt;
/lib/tls/i686/cmov/libc.so.6[0xb7e93b25]&lt;br /&gt;
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7e9759
0]&lt;br /&gt;
&lt;br /&gt;
./etmp4[0x807b412]&lt;br /&gt;
./etmp4[0x807d317]&lt;br /&gt;
./etmp4[0x804c440]&lt;br /&gt;
./etmp4[0x804d7c3]&lt;br /&gt;
./etmp4[0x804dc1e]&lt;br /&gt;
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe
0)[0xb7e3e450]&lt;br /&gt;
./etmp4[0x8049271]&lt;br /&gt;
======= Memory map: ========&lt;br /&gt;
08048000-080b0000 r-xp 00000000 08:01 2974088    /home/celtro/ns-allinone-2.34/ns-2.34/v1/etmp4&lt;br /&gt;
080b0000-080b1000 rw-p 00067000 08:01 2974088    /home/celtro/ns-allinone-2.34/ns-2.34/v1/etmp4&lt;br /&gt;
&lt;br /&gt;
080b1000-080f0000 rw-p 080b1000 00:00 0          [heap]&lt;br /&gt;
b7a00000-b7a21000 rw-p b7a00000 00:00 0&lt;br /&gt;
b7a21000-b7b00000 ---p b7a21000 00:00 0&lt;br /&gt;
b7bcb000-b7bd5000 r-xp 00000000 08:01 65600      /lib/libgcc_s.so.1&lt;br /&gt;
b7bd5000-b7bd6000 rw-p 0000a000 08:01 65600      /lib/libgcc_s.so.1&lt;br /&gt;
b7be4000-b7e28000 rw-p b7be4000 00:00 0&lt;br /&gt;
b7e28000-b7f71000 r-xp 00000000 08:01 82947      /lib/tls/i686/cmov/libc-2.7.so&lt;br /&gt;
b7f71000-b7f72000 r--p 00149000 08:01 82947      /lib/tls/i686/cmov/libc-2.7.so&lt;br /&gt;
b7f72000-b7f74000 rw-p 0014a000 08:01 82947      /lib/tls/i686/cmov/libc-2.7.so&lt;br /&gt;
b7f74000-b7f77000 rw-p b7f74000 00:00 0&lt;br /&gt;
b7f77000-b7f9a000 r-xp 00000000 08:01 82951      /lib/tls/i686/cmov/libm-2.7.so&lt;br /&gt;
b7f9a000-b7f9c000 rw-p 00023000 08:01 82951      /lib/tls/i686/cmov/libm-2.7.so&lt;br /&gt;
b7fa7000-b7fac000 rw-p b7fa7000 00:00 0&lt;br /&gt;
b7fac000-b7fad000 r-xp b7fac000 00:00 0          [vdso]&lt;br /&gt;
b7fad000-b7fc7000 r-xp 00000000 08:01 67847      /lib/ld-2.7.so&lt;br /&gt;
b7fc7000-b7fc9000 rw-p 00019000 08:01 67847      /lib/ld-2.7.so&lt;br /&gt;
bfac9000-bfade000 rw-p bffeb000 00:00 0          [stack]&lt;br /&gt;
Aborted &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
do you know why it is different in the tcl via the console?&lt;br /&gt;
 and what is the problem in the console, why I got this error?&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/423693/423693/etmp4-and-tcl-please-help-urgent/</guid>
      <pubDate>Sun, 08 May 2011 05:55:57 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Move an application window outside the desktop bounds?</title>
      <link>http://www.programmersheaven.com/mb/Linux/423511/423511/move-an-application-window-outside-the-desktop-bounds/</link>
      <description>I am currently using Qt 4.7.0 and 32-bit Ubuntu 10.10.&lt;br /&gt;
I have created a very simple application that draws a rectangle and has no border, no title bar and no buttons in it respectively - close, maximize, minimize.&lt;br /&gt;
&lt;br /&gt;
If the user clicks the rectangle with the left mouse button and begin dragging the mouse cursor while holding the left mouse button, the rectangle will be dragged. On Windows and Mac it is possible to move the window out of the desktop bounds - you are only constrained to the position of the cursor.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu the rectangle, which is actually the application window, cannot be moved out of the desktop extents by this custom dragging functionality. It uses QWidget::move( int x, int y ) function which is the same as xlib's XMoveWindow.&lt;br /&gt;
&lt;br /&gt;
Hitting Alt + and then dragging the window with the left mouse button makes the window go out of bounds but this is because Alt + LMB is handled not by the application but by the window manager.&lt;br /&gt;
&lt;br /&gt;
How could I achieve the Alt+LMB effect - move the application window out of the desktop bounds using xlib? Should I set some window attributes - XChangeProperty, XChangeWindowAttributes?&lt;br /&gt;
&lt;br /&gt;
The "XLIB Programming Manual" book says:&lt;br /&gt;
&lt;br /&gt;
------------------------&lt;br /&gt;
Sixth, a window has a set of attributes. The window attributes control many aspects of the appearance and response of the&lt;br /&gt;
window:&lt;br /&gt;
...&lt;br /&gt;
Should this window be allowed to be displayed, moved, or resized without notifying the window manager?&lt;br /&gt;
------------------------&lt;br /&gt;
&lt;br /&gt;
How to make the window not notify the window manager when the application window is moved, so that the application window can go out of its parent's bounds - the bounds of the root window?&lt;br /&gt;
&lt;br /&gt;
I failed to achieve this using Qt, but I presume it is possible using xlib, I think.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/423511/423511/move-an-application-window-outside-the-desktop-bounds/</guid>
      <pubDate>Thu, 28 Apr 2011 07:18:35 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>pic16f877a</title>
      <link>http://www.programmersheaven.com/mb/Linux/422913/422913/pic16f877a/</link>
      <description>hi, im currently working in robotics project. In my project im using pic16f877a microcontroller with RS232 connector.&lt;br /&gt;
my issue is, i have calculated some values(r and theta) using c code and saved it in a file(say output.txt)[BY USING PC].&lt;br /&gt;
now i want to send this values to microcontroller. to send this values, i need a pic code. please help&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/422913/422913/pic16f877a/</guid>
      <pubDate>Thu, 31 Mar 2011 10:02:42 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>ubuntu user pw</title>
      <link>http://www.programmersheaven.com/mb/Linux/422616/422616/ubuntu-user-pw/</link>
      <description>i got a pc from a person to use ubuntu.but that person has a pw for his user profile.I can't contact this guy and the terminal runs under his profile.all the online guides to reset the pw needed grub2 but system doesnt have it either. when i try to install grub2 terminal prompts for the user's pw.&lt;br /&gt;
PLEASE HELP ME OUT&amp;gt;&amp;gt;&amp;gt;thankyou. &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/422616/422616/ubuntu-user-pw/</guid>
      <pubDate>Mon, 21 Mar 2011 07:22:35 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>My bash script for syncing folders between two or three computers</title>
      <link>http://www.programmersheaven.com/mb/Linux/421619/421619/my-bash-script-for-syncing-folders-between-two-or-three-computers/</link>
      <description>I have two desktops and a laptop. I copied my music into each of them from my flash drive, but since then I have added music from various places and they got badly out of sync. So I decided to use rsync and create a script to run once a month or so. I hope someone finds it useful.&lt;br /&gt;
&lt;br /&gt;
 The main problem is that it makes me enter my password five times. I'm trying to learn expect so I can automate that process, if any one can help me with that I would appreciate it. If you have any other improvements, such as making it capable of handling any number of computers, or reducing the amount of code, I would like to hear them as well. &lt;br /&gt;
&lt;br /&gt;
I tried using RSYNC_PASSWORD, but apparently it and --password-file no longer work. &lt;br /&gt;
&lt;br /&gt;
The script runs on mark, my fastest computer. I tried to use it in as many exchanges as possible and my old laptop, robby, in the least amount of exchanges possible.  &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#!/bin/bash

# sync -- uses rsync to sync the music folders of two or three computers #

# philipk88
# 2-8-11


#### Functions ####


main()
{
   read -p 'What is the ip address of Marvin?&amp;gt;' marvin
   read -p 'Is Robby connected to the network?[N/y]&amp;gt;' robbyExist
   if [ $robbyExist = y ]
   then
      read -p 'What is the ip address of Robby?&amp;gt;' robby
      remotefile="$marvin:$marvinPath"
      toMark
      fromMark
      remotefile="$robby:$robbyPath"
      toMark
      fromMark
      remotefile="$marvin:$marvinPath"
      fromMark
      echo "Copying is done"
      exit
   else
      remotefile="$marvin:$marvinPath"
      toMark
      fromMark
      echo "Copying is done"
      exit
   fi
}
      
   
# Displays a pretentious welcome message #
welcome()
{
   echo " "
   echo " "
   echo '#############################################'
   echo '#                                           #'
   echo '#  Welcome to your music syncing program!!  #'
   echo '#       Let the synchronization begin!       #'
   echo '#                                           #'
   echo '#############################################'
   echo " "
   echo " "
   return
}

# Copies the files that only exist on the remote computer to the local file #
toMark()
{
   rsync -vzr -e ssh philip@$remotefile  /home/philip/Music  
   return
}

# Copies the files that only exist locally to the remote computer #
fromMark()
{
   rsync -vzr /home/philip/Music/ -e ssh philip@$remotefile  
   return
}


#### Program ####


## Assign Variables ##

marvin=192.168.2.2
marvinPath=/home/philip/arch-share/music/
robby=192.168.2.4
robbyPath=/home/philip/music/

## Display a welcome message ##

welcome

## Call main and get to work ##

main
  

#### End ####
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/421619/421619/my-bash-script-for-syncing-folders-between-two-or-three-computers/</guid>
      <pubDate>Wed, 09 Feb 2011 16:25:42 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Send file through FTP in small Linux version</title>
      <link>http://www.programmersheaven.com/mb/Linux/421598/421598/send-file-through-ftp-in-small-linux-version/</link>
      <description>Hello&lt;br /&gt;
I have this problem.&lt;br /&gt;
I need to do this:&lt;br /&gt;
I got a small version of Linux installed in some small devices. These devices come from the provider with this small version of Linux installed.&lt;br /&gt;
&lt;br /&gt;
This devices should send data to some other machine in the internet. I have tested wput for this purpose with a PC which has an Ubuntu version 10 and it works fine. However, when I try wput in the small device, I get an error. It seems that the wput might need some libraries to work with the small version of Linux installed in the small device.&lt;br /&gt;
&lt;br /&gt;
The fact of using wput or not is optional. I just need being able to send files through ftp with this small version of Linux.&lt;br /&gt;
&lt;br /&gt;
The thing is that to be able to run wput in this small version of Linux, it seems that many of the needed libraries were missing. So what I did was just install all the needed libraries. But still the wput program fails in its first line.&lt;br /&gt;
&lt;br /&gt;
Could please anyone help me?&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/421598/421598/send-file-through-ftp-in-small-linux-version/</guid>
      <pubDate>Wed, 09 Feb 2011 07:41:27 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Porting existing Pascal games to Java/Javascript</title>
      <link>http://www.programmersheaven.com/mb/Linux/420865/420865/porting-existing-pascal-games-to-javajavascript/</link>
      <description>Hi All,&lt;br /&gt;
&lt;br /&gt;
Please read my profile as I have gone into heaps of details about my history and programming experience. It is about 4-5 paragraphs of description written today as my biography.&lt;br /&gt;
&lt;br /&gt;
I have about a dozen game applications written for Windows XP in Delphi 5 and 7 Enterprise, a few years ago. I have ported some of these to Lazarus and Free Pascal. And they all are fully tested beta versions available for Public Domain download on &lt;a href="http://pewink.info"&gt;http://pewink.info&lt;/a&gt; (my personal homepage).&lt;br /&gt;
&lt;br /&gt;
My goal is to port these games to Java or JavaScript for cross-platform games. &lt;br /&gt;
&lt;br /&gt;
Is there a software tool to do these:&lt;br /&gt;
&lt;br /&gt;
1) Convert my Delphi and Object Pascal to Java or JavaScript?&lt;br /&gt;
&lt;br /&gt;
2) Convert my Delphi forms to Java or JavaScript?&lt;br /&gt;
&lt;br /&gt;
The TwhForm2HTML is a Delphi form to HTML converter written in Delphi 3, suitable for (2).&lt;br /&gt;
&lt;br /&gt;
I am currently corresponding with Ann Lynnworth, Owner HREF Tools Corp about TwhForm2HTML .... and it looks like I will be working on converting the source code from Delphi 3 to Lazarus for Linux and Windows. &lt;br /&gt;
&lt;br /&gt;
I would like advice about tools for (1) converting Delphi to Java. I have limited JavaScript experience, mainly editing other people's JS code.&lt;br /&gt;
&lt;br /&gt;
Also I would like advice about learning Java and best Java ide to use. I have viewed several of the Java ebooks linked here on this site, and I am yet to find time to read them.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
   pew  &lt;img src="http://www.programmersheaven.com/images/Community/smile.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/420865/420865/porting-existing-pascal-games-to-javajavascript/</guid>
      <pubDate>Tue, 11 Jan 2011 02:24:34 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>How to overcome buffer overflow in client ?</title>
      <link>http://www.programmersheaven.com/mb/Linux/420830/420830/how-to-overcome-buffer-overflow-in-client-/</link>
      <description>In case of client server program. I am trying to send string(after concatenating) of more than 32 characters but it shows only 32 characters on the client side.Sometimes even it shows stack overflow and just a semicolon. How can I overcome this?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/420830/420830/how-to-overcome-buffer-overflow-in-client-/</guid>
      <pubDate>Sun, 09 Jan 2011 07:36:32 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>How can I write code to start communication between two servers</title>
      <link>http://www.programmersheaven.com/mb/Linux/420829/420829/how-can-i-write-code-to-start-communication-between-two-servers/</link>
      <description>I want to create two servers that will communicate to each other as well as a client which will communicate with both of them.Can any one please suggest me how to get started...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/420829/420829/how-can-i-write-code-to-start-communication-between-two-servers/</guid>
      <pubDate>Sun, 09 Jan 2011 07:29:51 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>UDP, linux and packets larger than 1500 bytes</title>
      <link>http://www.programmersheaven.com/mb/Linux/420688/420688/udp-linux-and-packets-larger-than-1500-bytes/</link>
      <description>Hi, I'm developing a tftp client and server and I want to dynamically select the&lt;br /&gt;
udp payload size to boost transfer performance.&lt;br /&gt;
&lt;br /&gt;
I have tested it with two linux machines ( one has a gigabit ethernet card, the&lt;br /&gt;
other a fast ethernet one ). I changed the MTU of the gigabit card to 2048 bytes&lt;br /&gt;
and leaved the other to 1500.&lt;br /&gt;
&lt;br /&gt;
I have used setsockopt(sockfd, IPPROTO_IP, IP_MTU_DISCOVER, &amp;amp;optval,&lt;br /&gt;
sizeof(optval)) to set the MTU_DISCOVER flag to IP_PMTUDISC_DO.&lt;br /&gt;
&lt;br /&gt;
From what I have read this option should set the DF bit to one and so it should&lt;br /&gt;
be possible to find the minimum MTU of the network ( the MTU of the host that&lt;br /&gt;
has the lowest MTU ). However this thing only gives me an error when I send a&lt;br /&gt;
packet which size is bigger than the MTU of the machine from which I'm sending&lt;br /&gt;
packets.&lt;br /&gt;
&lt;br /&gt;
Also the other machine ( the server in this case ) doesn't receive the oversized&lt;br /&gt;
packets ( the server has a MTU of 1500 ). All the UDP packets are dropped, the&lt;br /&gt;
only way is to send packets of 1472 bytes.&lt;br /&gt;
&lt;br /&gt;
Why the hosts do this? From what I have read, if I send a packet larger than&lt;br /&gt;
MTU, the ip layer should fragment it.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/420688/420688/udp-linux-and-packets-larger-than-1500-bytes/</guid>
      <pubDate>Sun, 02 Jan 2011 12:09:56 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Program to work with ports 43h, 61h</title>
      <link>http://www.programmersheaven.com/mb/Linux/419686/419686/program-to-work-with-ports-43h-61h/</link>
      <description>Hello, I need to write a program to work with 43h, 61h ports on Gentoo Linux 2.6, i686 &lt;br /&gt;
Actually I read a few Guides like "The Linux Kernel Module Programming".&lt;br /&gt;
I wrote HelloWorld module on C, but I don't know how to work with ports without "outportb(), inportb()" fuctions on C.&lt;br /&gt;
Also, I know how to write such program on NASM, but I don't know how to compile/link it in right way for 2.6 kernel, insmod command gives an "-1 error invalid file format" &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/419686/419686/program-to-work-with-ports-43h-61h/</guid>
      <pubDate>Sat, 13 Nov 2010 02:14:26 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Simple Shell in C++</title>
      <link>http://www.programmersheaven.com/mb/Linux/419219/419219/simple-shell-in-c++/</link>
      <description>I am new to linux programming, and to get my bearings, I have been writing some small programs. I have already written a ls clone that will do ls, ls -l, and ls -lR. My current project is to write a simple shell. My understanding on how to do this is to loop the following: Get some input from the user and parse it into an array of cstrings, fork the program, have the child exec the user's command. I tried this, but I found that I lost i/o with the child after the exec, which make sense considering what it does. I did some reading online, I found that I need to use pipes to connect the child stdout and stdin to the parents before the exec. I did a few experiments with the pipes, but they all either crashed or didn't work, so I'm clearly missing something.&lt;br /&gt;
&lt;br /&gt;
Is my understanding of what I need to do correct? Am I missing some small, but important detail? Is it even possible to connect out pipe to the parent's stdout so the child's output is automatically output to the console, or do I need to manually read the pipe and output its contents. Can you give me some examples of using pipes in this context, preferably in C++? Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My code so far:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;string&amp;gt;
#include &amp;lt;sstream&amp;gt;
#include &amp;lt;cstdlib&amp;gt;
#include &amp;lt;cstring&amp;gt;
#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;sys/types.h&amp;gt;
#include &amp;lt;sys/wait.h&amp;gt;
#include &amp;lt;errno.h&amp;gt;

const unsigned int MAX_ARGS = 128;

using namespace std;

// Execute a parsed command line returning the command's exit code
int doit(const vector&amp;lt;string&amp;gt;&amp;amp; tok)
{
    if (!tok.size() || tok[0] == "") return 0;
    // If user entered cd, change to specified dir. If no dir specified, change to the users home dir
    else if (tok[0] == "cd")
    {
        if (tok.size() &amp;gt; 1) chdir(tok[1].c_str());
        else chdir(getenv("HOME"));
        return 0;
    }

    //Else execute the command specified by the user
    if (pid_t kidpid = fork())
    {
        //Parent
        int status = 0;
        if (tok.back().at(tok.back().size() - 1) != '&amp;amp;')
        {
            waitpid(kidpid, &amp;amp;status, 0);

            #ifdef _INSPECT_EXIT_STATUS
                cout &amp;lt;&amp;lt; "exit status=" &amp;lt;&amp;lt; status &amp;lt;&amp;lt; endl;
            #endif //_INSPECT_EXIT_STATUS
        }
        return status;
    }
    //Child - execute the command
    char* arglist[MAX_ARGS];
    for (unsigned int x = 0; x &amp;lt; tok.size() &amp;amp;&amp;amp; x &amp;lt; MAX_ARGS - 1; x++)
        strcpy(arglist[x], tok[x].c_str());
    arglist[tok.size()] = NULL;

    execvp(tok[0].c_str(), arglist);

    //Program will never reach here unless execvp failed
    cerr &amp;lt;&amp;lt; "execpv failed: " &amp;lt;&amp;lt; strerror(errno) &amp;lt;&amp;lt; endl;
    exit(errno);
}

int main(int argc, char* argv[], char* envp[])
{
    while (!cin.eof())
    {
        cout &amp;lt;&amp;lt; "? ";
        string temp;
        getline(cin, temp);
        if (temp == "exit") break;

        vector&amp;lt;string&amp;gt; v;
        //Break string into separate strings on whitespace
        {
            stringstream foo(temp);
            string s;
            while (foo &amp;gt;&amp;gt; s)
            {
                if (s[0]=='~') s = getenv("HOME") + s.substr(1);
                v.push_back(s);
            }
        }
        doit(v);
    }
    cout &amp;lt;&amp;lt; "exit" &amp;lt;&amp;lt; endl;
    return 0;
}&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/419219/419219/simple-shell-in-c++/</guid>
      <pubDate>Tue, 19 Oct 2010 14:02:36 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Parallel port issue in RHEL 6.0 server</title>
      <link>http://www.programmersheaven.com/mb/Linux/418780/418780/parallel-port-issue-in-rhel-60-server/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I am facing an issue with RHEL 6.0 server 64 bit VM while sending data to parallel port . I  tried  “echo hello &amp;gt;  /dev/parport0 ”  to send data to parallel port ,I get the following error message “echo : write error :Invalid argument”. Sending data to  “/dev/lp0” gives following error message “/dev/lp0:No such device or address”. &lt;br /&gt;
Do I need to do any configuration for RHEL 6.0 to send data to parallel port.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/418780/418780/parallel-port-issue-in-rhel-60-server/</guid>
      <pubDate>Mon, 20 Sep 2010 23:46:57 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>help choosing a language</title>
      <link>http://www.programmersheaven.com/mb/Linux/418626/418626/help-choosing-a-language/</link>
      <description>I use several Linux flavors and know bash and html. What I am looking for is a general purpose language. Something with a gentle learning curve would be preferred. I have read about python and perl, but the words they use to describe them don't really mean a lot to me. I would greatly appreciate it if you would suggest a language and describe what it can do or why it is good in terms I can understand. Thanks.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/418626/418626/help-choosing-a-language/</guid>
      <pubDate>Wed, 08 Sep 2010 14:26:11 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>terminal commands</title>
      <link>http://www.programmersheaven.com/mb/Linux/417511/417511/terminal-commands/</link>
      <description>There are a lot of difference between commands&lt;br /&gt;
./script.sh&lt;br /&gt;
and&lt;br /&gt;
. ./script.sh&lt;br /&gt;
?&lt;br /&gt;
My teacher sad, that it's two different commands. I'm surprised ...&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/417511/417511/terminal-commands/</guid>
      <pubDate>Mon, 28 Jun 2010 05:02:24 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Memorymap issue in powerpc:can't allocate more than 256MB for DRAM</title>
      <link>http://www.programmersheaven.com/mb/Linux/417085/417085/memorymap-issue-in-powerpccant-allocate-more-than-256mb-for-dram/</link>
      <description>&lt;span style="color: Blue;"&gt;&lt;em&gt;&lt;strong&gt; &lt;br /&gt;
&lt;br /&gt;
Hi all&lt;br /&gt;
&lt;br /&gt;
I have an mpc8360e processor (has e300 core and QE) for our networking application. I have to use 1GB DRAM module in my board, but u-boot for powerpc is not supporting that. It is supporting only 256MB DRAM module.&lt;br /&gt;
&lt;br /&gt;
And in kernel, /proc/meminfo gives me only 256MB.&lt;br /&gt;
&lt;br /&gt;
Is it a processor limitation? Is there any other way to do memory map, than address translation method?&lt;br /&gt;
&lt;br /&gt;
Please help me out to solve this&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Remya S J&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/417085/417085/memorymap-issue-in-powerpccant-allocate-more-than-256mb-for-dram/</guid>
      <pubDate>Mon, 07 Jun 2010 23:29:46 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>daemon restart itself on SIGHUP signal in C</title>
      <link>http://www.programmersheaven.com/mb/Linux/416958/416958/daemon-restart-itself-on-sighup-signal-in-c/</link>
      <description>I have a C daemon that needs to restart itself after any configuration file changes on receiving a SIGHUP signal. Can anybody post some example code on how to do it? &lt;br /&gt;
The daemon is started by a shell script.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/416958/416958/daemon-restart-itself-on-sighup-signal-in-c/</guid>
      <pubDate>Wed, 02 Jun 2010 01:20:32 -0800</pubDate>
      <category>LINUX programming</category>
    </item>
  </channel>
</rss>
