I have googling a lot about this debate to move from table to div. What are your advices here to move or not. I have below my codes building layout using div. The issue I find with div for example below codes which I am referring to a template . MY issue is that on different resolution it looks different there is not like fix size. For eg. in some resolution its just nice and some it shrink. What is the best solution to ensure it stay in every resolution which I know if I would go back to table it will work but that is not advisable I guess.

<body>

    <div class="navbar">
        <div class="navbar-inner">
            <div class="container-fluid">
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".top-nav.nav-collapse,.sidebar-nav.nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                 <img alt="Logo" src="img/logo20.png" /> 

                <!-- theme selector starts -->
                <div class="btn-group pull-right theme-container" >

                    <h5>User Name:  my demo</h5>
                    Logout
                </div>

            </div>
        </div>
    </div>  

        <div class="container-fluid">
        <div class="row-fluid">

            <!-- left menu starts -->
            <div class="span2 main-menu-span">
                <div class="well nav-collapse sidebar-nav">
                    <ul class="nav nav-tabs nav-stacked main-menu">
                        <li class="nav-header hidden-tablet">Vtst1</li>
                        <li><a class="ajax-link" href="test1.php"><i class="icon-home"></i>  <span class="hidden-tablet">Test1</span></a></li>
                        <li><a class="ajax-link" href="test2.php"><i class="icon-eye-open"></i>  <span class="hidden-tablet">Test2</span></a></li>

                        <li class="nav-header hidden-tablet">Admin</li>
                        <li><a class="ajax-link" href="addM.php"><i class="icon-home"></i>  <span class="hidden-tablet">Master</span></a></li>
                        <li><a class="ajax-link" href="gridU.php"><i class="icon-eye-open"></i>  <span class="hidden-tablet">UD</span></a></li>

                        </ul>

                </div><!--/.well -->
            </div>
                        <!--/span-->
            <!-- left menu ends -->

            <div id="content" class="span10">
            <!-- content starts -->

            <div>
                <ul class="breadcrumb">
                    <li>
                        <a href="#">Home</a> <span class="divider">/</span>
                    </li>
                    <li>
                        <a href="#">Forms</a>
                    </li>
                </ul>
            </div>

            <div class="row-fluid ">
                <div class="box span6">
                    <div class="box-header well" data-original-title>
                        <h2>Add Master</h2>

                    </div>
                    <div class="box-content"> ...
commented: Really ! Helped me out Thanks ! +0

Dear All,
My problem is that exactly every second I need to call a particular function to do some sql querying. So after reading I found that the latest api is timer_create. Below is a skeleton. Is this skeleton a right one to move forward? Thank you.

[CODE]#include <stdio.h>

include <time.h>

include <signal.h>

timer_t gTimerid;

void start_timer(void)
{

struct itimerspec value;

value.it_value.tv_sec = 1;//waits for 5 seconds before sending timer signal
value.it_value.tv_nsec = 0;

value.it_interval.tv_sec = 1;//sends timer signal every 5 seconds
value.it_interval.tv_nsec = 0;

timer_create (CLOCK_REALTIME, NULL, &gTimerid);

timer_settime (gTimerid, 0, &value, NULL);

}

void stop_timer(void)
{

struct itimerspec value;

value.it_value.tv_sec = 0;
value.it_value.tv_nsec = 0;

value.it_interval.tv_sec = 0;
value.it_interval.tv_nsec = 0;

timer_settime (gTimerid, 0, &value, NULL);

}

void timer_callback(int sig) {

printf(" Catched timer signal: %d ... !!\n", sig);

}

int main(int ac, char **av)
{
(void) signal(SIGALRM, timer_callback);
start_timer();
while(1);
}[/CODE]

Dear All,
I have function where I read from a mysql table a set of value. Part of my codes is like this

[CODE]echo "<tr id='gridRow'>
<td >$count</td>
<td> <input type='checkbox' onClick=selectAndUpdate('$row1[size]')></td>
<td> {$row1[SerialNo]}</td>
<td> {$row1[InHouseBranding]}</td>
<td> {$row1[BrandCode]}</td>
<td> {$row1[size]}</td>
<td> {$row1[Pattern]}</td>
<td> {$row1[EntryStatus]}</td>
</tr>";[/CODE]

A sample row generated is as below can you notice this line <input type="checkbox" 22.567')="" onclick="selectAndUpdate('21060R"> why the same value appear properly in the <td> 21060R 22.567</td> but in the previous line is showing me like this 22.567')="" onclick="selectAndUpdate('21060R"> any idea?

[CODE]<tr id="gridRow">
<td>1</td>
<td>
<input type="checkbox" 22.567')="" onclick="selectAndUpdate('21060R">
</td>
<td> EA12</td>
<td> BOR1</td>
<td> GY</td>
<td> 21060R 22.567</td>
<td> HMG 2020</td>
<td> New</td>
</tr>[/CODE]

Dear All,
I have java listener which keep reading for incoming data to the particular port. Most of the times it works fine only at times it gets too many open files error. Below is my codes what could be wrong? Thank you.

[CODE]public static void main(String[] args) {

try
{
final ServerSocket serverSocketConn = new ServerSocket(8888);

while (true)
{
try
{
Socket socketConn1 = serverSocketConn.accept();
new Thread(new ConnectionHandler(socketConn1)).start();
}
catch(Exception e)
{
System.out.println(e.toString());
}
}

}
catch (Exception e)
{
System.out.println(e.toString());
//System.exit(0);
}
}

}
class ConnectionHandler implements Runnable
{
private Socket receivedSocketConn1;
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
DateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy");
DateFormat inDf=new SimpleDateFormat("ddMMyyHHmmss");
DateFormat outDf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

ConnectionHandler(Socket receivedSocketConn1)
{
this.receivedSocketConn1=receivedSocketConn1;
}

//@Override
public void run()
{
Connection dbconn = null;
BufferedWriter w = null;
BufferedReader r = null;
try
{

     PrintStream out = System.out; 
     BufferedWriter fout = null;
     w = new BufferedWriter(new OutputStreamWriter(receivedSocketConn1.getOutputStream()));
     r = new BufferedReader(new InputStreamReader(receivedSocketConn1.getInputStream()));

     int m = 0, count=0;
     String line="";
     String n="";
     w.write("$PA\n");
     w.flush();
         while ((m=r.read()) != -1) 
         {
              Date dateIn = new Date();
              n = n + (char) m;
              int i = n.indexOf("GET");
              if(i != -1) 
              { 
                 break;
              }

             if (m==35)
             {

               String ori = n;
               String noCheckSum = n.substring(0,(n.length()-4));
               int addExist = n.indexOf("@");

               String[] slave = null;
               if(addExist!=-1)
               {
                 slave = noCheckSum.split("@");
                 n = slave[0];
               }
               else
               {
                 n = noCheckSum;
               }

               String[] result = n.split(",");
               Statement stmt = null;

               w.write("$PA\n");
               w.flush();

               int count1 = 0;

               Date date = Calendar.getInstance().getTime(); 
               String today = formatter.format(date); ...