Jump to content

killboy

Members
  • Content Count

    164
  • Joined

  • Last visited

Community Reputation

0 Neutral

About killboy

  • Rank
    Member

Previous Fields

  • Languages
    Spanish, English... :P

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Colombia
  1. Hello everyone. Anyone familiar to Flex development? If so, can anyone tell me how to build a simple login system using Flex as the frontend? Thank you all.
  2. killboy

    PHP and serial ports

    Well, I guess they'll give the spec.OK, thank you very much for your help. Very appreciated.
  3. killboy

    PHP and serial ports

    Well, that's what they say: "The port can be any kind", I guess I'm gonna stick with serial port.Unfortunately, it's not up to me to decide what OS to use. What they told me is that this robot interacting with the language is going to be presented in a school, where all the computers run Windows.I've been doing more research and found this:http://www.easyvitools.com/phpserial/index.htmlAnyway. Do you think all this port stuff is too much to deal with PHP? Would you recommend me to switch to Java?
  4. killboy

    PHP and serial ports

    What about COM functions and sockets?Heck, I'm totally lost here. I will expose what I need as clear as possible:In my university, I'm working with some teachers in a project with Systems and Electronics. They're building a sort of robot which will be connected to the computer. This robot will be walking through a sort of board, drawing a geometric figure and passing the XY points to PHP.They said the robot will send the data by a port (of any kind), thing is, I must get the data sent by this device and make other things that don't have to do with the topic.Do you know someone or have some code making something similar?I hope I was clear enough; my english is not perfect.Thanks for the help.
  5. killboy

    PHP and serial ports

    Not much actually.What I really need is to be able to read data from the port (any port will do, I just thought I'd be luckier searching for serial ports).Just so I don't miss the point: the communication between the port and PHP must be local, right? I can't access to an external device through a remote page, can I?
  6. killboy

    PHP and serial ports

    I've been searching around and I found that it's possible to read/write to external devices such serial ports with PHP through the Direct IO functions in Windows. Problem is, I don't really know how to use them and the examples I've found are all taken from the PHP.Net site which don't tell me much. Can anyone enlighten me with these functions? Any good example? Or did I just misunderstand what these functions are about?Thanks.
  7. OK, I googled around and found how to do it with jQuery. This is my code and it's working as I want: <script type="text/javascript"> $( document ).ready( function() { $( "#div-detalle" ).scroll( function() { $( "#fila-informacion-detalle" ).scrollLeft( $( "#div-detalle" ).scrollLeft() ); } ); });</script><div id="fila-informacion-detalle" style="width: 770px; overflow: hidden;"> <table border="1" cellpadding="5" style="width: 1284px;"> <tr class="titulo-tabla" align="center"> <th width="16"> </th> <th width="81"> Categoría </th> <th width="183"> Nombre / Referencia * </th> <th width="183"> Marca * </th> <th width="183"> Cantidad * </th> <th width="183"> Valor Unitario * </th> <th width="183"> Tarifa * </th> <th width="183"> Total </th> </tr> </table> </div> <div id="div-detalle" style="width: 770px; height: 200px; overflow: auto;"> <table border="1" cellpadding="5" id="table-detalle"> <?php $countDetalle = 1; if ( empty( $this->orden ) === false ) { $countDetalle = count( $this->orden["detalle"] ); } for ( $i = 0; $i < $countDetalle; $i++ ) { ?> <tr id="detalle-<?php echo $i; ?>"> <td> <a href="java script:;" id="eliminar-detalle"> <img src="img/eliminar.png" alt="Eliminar" border="0"></a> </td> <td> <select name="detalle[id_categoria][]" style="width: 81px;"> <?php $selected = null; foreach ( $this->categorias AS $categoria ) { if ( $categoria["id"] === $this->orden["detalle"][$i]["id_categoria"] ) { $selected = "selected=\"selected\""; } ?> <option value="<?php echo $categoria["id"]; ?>" <?php echo $selected; ?>> <?php echo $categoria["descripcion"]; ?> </option> <?php $selected = null; } ?> </select> </td> <td> <input type="text" id="nombre" name="detalle[nombre][]" value="<?php echo $this->orden["detalle"][$i]["nombre"]; ?>"> </td> <td> <input type="text" id="marca" name="detalle[marca][]" value="<?php echo $this->orden["detalle"][$i]["marca"]; ?>"> </td> <td> <input type="text" id="cantidad" name="detalle[cantidad][]" value="<?php echo $this->orden["detalle"][$i]["cantidad"]; ?>"> </td> <td> <input type="text" id="valor_unitario" name="detalle[valor_unitario][]" value="<?php echo $this->orden["detalle"][$i]["valor_unitario"]; ?>"> </td> <td> <input type="text" id="tarifa" name="detalle[tarifa][]" value="<?php echo $this->orden["detalle"][$i]["tarifa"]; ?>"> </td> <td> <input type="hidden" id="subtotal" name="detalle[subtotal][]" value="<?php echo implode( "", explode( ",", $this->orden["detalle"][$i]["subtotal"] ) ); ?>"> <input type="text" disabled="disabled" id="subtotal-disabled" value="<?php echo $this->orden["detalle"][$i]["subtotal"]; ?>"> </td> </tr> <?php } ?> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="6"> </td> <td align="center"> <b>Total</b> </td> <td> <input type="text" id="total" name="total" disabled="disabled" value="<?php echo $this->orden["encabezado"]["total"]; ?>"> </td> </tr> </table> </div> As ShadowMage said, I had to give every column a defined width, but that's okay.ShadowMage, I've not tried your code, but thanks for the help.
  8. I did, and that works when scrolling vertically, but how can I make the outside row scroll horizontally the same time as the div?
  9. Hi there. First of all, happy new year to everybody!I have a table inside a div which is scrolled. I need the first row to be static and scrolled along with the div. Maybe you'll understand what I mean by looking at my code: <div id="div-detalle" style="width: 780px; height: 200px; overflow: auto;"> <table width="100%" border="1" cellpadding="5" id="table-detalle"> <tr class="titulo-tabla" align="center"> <th> </th> <th> Categoría </th> <th> Nombre </th> <th> Marca </th> <th> Cantidad </th> <th> Valor Unitario </th> <th> Tarifa </th> <th> Total </th> </tr> <tr id="detalle-1"> <td> <a href="java script:;" id="eliminar-detalle"> <img src="img/eliminar.png" alt="Eliminar" border="0"></a> </td> <td> <select name="categoria[]"> <?php foreach ( $this->categorias AS $categoria ) { ?> <option value="<?php echo $categoria["id"]; ?>"> <?php echo $categoria["descripcion"]; ?> </option> <?php } ?> </select> </td> <td> <input type="text" id="nombre" name="nombre[]"> </td> <td> <input type="text" id="marca" name="marca[]"> </td> <td> <input type="text" id="cantidad" name="cantidad[]"> </td> <td> <input type="text" id="valor_unitario" name="valor_unitario[]"> </td> <td> <input type="text" id="tarifa" name="tarifa[]"> </td> <td> <input type="hidden" id="subtotal" name="subtotal[]"> <input type="text" disabled="disabled" id="subtotal-disabled"> </td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="6"> </td> <td align="center"> <b>Total</b> </td> <td> <input type="text" id="total" name="total" disabled="disabled"> </td> </tr> </table> </div> The reason is, I will be adding new "detalle" rows by pressing a button, so I need the first row to be static so the user know what column is related an input.Thanks for the help.
  10. killboy

    LOL

    I just thought to share this image with you, coders, cuz we have to laugh and relax from time to time:http://www.osnews.com/story/19266/WTFs_m
  11. Thanks for the replies guys.After a lot of Googling, I found what I needed. If someone has the same issue, here's the code: // Controller$mail = new Zend_Mail();$mail->setFrom( "myEmail@example.com", "My Example" );$mail->setSubject( "My Subject" );$logo = $mail->createAttachment( file_get_contents( APPLICATION_PATH . "/../public/img/myImage.png" ), "image/png", Zend_Mime::DISPOSITION_INLINE, Zend_Mime::ENCODING_BASE64, "myImage.png");$logo->id = "myLogo"; And the view: <div align="center"> <img src="cid:myLogo" alt="My Logo"> </div>
  12. Could you give me an example of what your If...Else statement would be like?
  13. Hello everyone.For those who have used Zend Framework, I have the following issue:I've been playing around with Zend Mail, it's been very useful. It lets me set an HTML Body text and easy attachments. What I've not been able to do is to embed an image to an HTML email. Has anyone done so?Thanks.
  14. killboy

    Singleton Pattern

    Sorry I'm reviving this thread, but I prefer to ask this here rather than make a new topic.What's the point of doing a singleton on PHP? I mean, instance is not preserved through the different pages of a whole project.
  15. killboy

    Free Php Editor?

    Netbeans 6.7 for PHP can do that and much more
×
×
  • Create New...