Daily Archives

Articles indexed Tuesday March 9 2010

Page 19/49 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • MSIE8 compatibility mode not rendering dynamically created table

    - by KristoferA - Huagati.com
    A bit weird... ...if running in IE8 quirks mode, the table added by the following code doesn't render. Can anyone tell me why, because it is not obvious to me..? <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script> function AddTable() { var table = document.createElement('table'); var row = document.createElement('tr'); table.appendChild(row); var cell = document.createElement('td'); cell.innerHTML='abc'; row.appendChild(cell); var divContainer = document.getElementById('divContainer'); divContainer.appendChild(table); } </script> </head> <body> <div id='divContainer'> </div> <input type='button' value='add table' onclick='javascript:AddTable()' /> </body> </html>

    Read the article

  • Eclipse/Java code completion not working

    - by Rob
    I've downloaded, unzipped and setup Eclipse 3.4.2 with some plugins (noteable, EPIC, Clearcase, QuantumDB, MisterQ). Now I find when I'm editing Java projects the code completion is not working. If I type String. and press ctrl-space a popup shows "No Default Proposals" and the status bar at the bottom shows "No completions available". Any ideas? Thanks....

    Read the article

  • make my file readable as either Perl or HTML

    - by JoelFan
    In the spirit of the "Perl Preamble" where a script works properly whether executed by a shell script interpreter or the Perl interpreter... I have a Perl script which contains an embedded HTML document (as a "heredoc"), i.e.: #!/usr/bin/perl ... some perl code ... my $html = <<'END' ; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> ... more HTML ... </html> END ... perl code that processes $html ... I would like to be able to work on the HTML that's inside the Perl script and check it out using a web browser, and only run the script when the HTML is the way I want. To accomplish this, I need the file to be openable both as an HTML file and as a Perl script. I have tried various tricks with Perl comments and HTML comments but can't get it quite perfect. It doesn't have to be "strictly legal" HTML... just displayable in a browser with no (or minimal) Perl garbage visible.

    Read the article

  • How can I export images from MS SQL Server to a file on disk?

    - by rball
    I have a User table that has all of their avatars saved in an image field. I'd like to just take that out of the database and store it as a regular file on disk. I looked around and saw some code for textcopy, but that doesn't seem to be on my machine for some reason. Here is the code I wrote up anyway. Anyone know a way to get this done? DECLARE @exec_str varchar (255) SELECT @exec_str = 'textcopy /S (local)\SQLEXPRESS' + --' /U ' + @login + --' /P ' + @password + ' /D thedatabase' + ' /T User'+ ' /C AvatarImage' + ' /F "d:\Avatars\' + User.Name + '.jpg"' + ' /O' FROM [User] WHERE UserID = 2 EXEC master..xp_cmdshell @exec_str

    Read the article

  • OpenCV: How to copy CvSeq data into CvMat?

    - by Can Bal
    I have a CvSeq structure at hand, which is the output of an available OpenCV function. This holds 128 bytes of data in each of the sequence elements. I want to copy each of these 128-byte elements into rows of a CvMat structure to form a N-by-128 of type CV_32FC1. What would be the most efficient way to do this? I thought of using memcpy but I couldn't come up with a working solution. For the details, I want to calculate the SURF features in an image by cvExtractSURF() function, and copy the SURF descriptors into a matrix for passing it to the cvKMeans2().

    Read the article

  • Closing idle connections with iptables.

    - by kyku
    Hi, I have a server application that does not remove idle connections (resulting from for example client or communication failures). Is it possible to configure iptables to monitor activity on sockets and close connections haven't had any activity for a specified amount of time?

    Read the article

  • Problem in SQL Server 2005

    - by megala
    I Know how to create table in SQL server 2005.But due to system problem i reinstalled SQL SErver 2005.After that I select the option like that start - programs - microsoft sql server 2005 - sql server management studio express My problem is in that sql server management studio express is not exits.How to solve the above problem Thanks in advance

    Read the article

  • Batch crop PDF pages?

    - by boost
    I have a PDF document containing pages which have crop marks on them. I'd like to copy these pages to another PDF without the crop marks. I'm assuming I have to crop-out the crop marks but is there any way to do this in batch rather than interactively?

    Read the article

  • Django formsets: make first required?

    - by Mark
    These formsets are exhibiting exactly the opposite behavior that I want. My view is set up like this: def post(request): # TODO: handle vehicle formset VehicleFormSetFactory = formset_factory(VehicleForm, extra=1) if request.POST: vehicles_formset = VehicleFormSetFactory(request.POST) else: vehicles_formset = VehicleFormSetFactory() And my template looks like this: <div id="vehicle_forms"> {{ vehicles_formset.management_form }} {% for form in vehicles_formset.forms %} <h4>Vehicle {{forloop.counter}}</h4> <table> {% include "form.html" %} </table> {% endfor %} </div> That way it initially generates only 1 form, like I want. But I want that one form to be required! When I dynamically add blank forms with JavaScript and vehicles_formset.empty_form all those extra forms are required, which I don't want. From the docs: The formset is smart enough to ignore extra forms that were not changed. This is the behavior the first form is exhibiting (not what I want) but not the behavior that the extra forms are exhibiting (what I do want). Is there some attribute I can can change to at least make one form required?

    Read the article

  • How to hide check all, clear all checkbox

    - by Kalpana
    I am having check box in the column header. The function of this is to check or uncheck all the check boxes in that column.If the row check box is checked and say delete, that row can be deleted from the dataTable. If the row object is used in some other table as a foreign key i put '-' in that row instead of check box which indicates that row cannot be deletable. In these cases if all the row has '-" , there is no need to have the header check box. How to programatically hide this 'Check All | Clear All' check box, if there is nothing to be removed. It would be even preferable to hide the 'Remove' button if there is no selection to be made. What are the best practices to address the above scenario. I have attached the javascript which I am using. <script type="text/javascript"> var tableId = '#user\\:userList'; jQuery(document).ready(function() { jQuery('#selectAll').click(function() { jQuery(tableId).find("input[type='checkbox']").attr('checked', jQuery('#selectAll').is(':checked')); }); }); </script>

    Read the article

  • What happens when we combine RAII and GOTO ?

    - by Robert Gould
    I'm wondering, for no other purpose than pure curiosity (because no one SHOULD EVER write code like this!) about how the behavior of RAII meshes with the use of Goto (lovely idea isn't it). class Two { public: ~Two() { printf("2,"); } }; class Ghost { public: ~Ghost() { printf(" BOO! "); } }; void foo() { { Two t; printf("1,"); goto JUMP; } Ghost g; JUMP: printf("3"); } int main() { foo(); } When running the following code in VS2005 I get the following output: 1,2,3 BOO! However I imagined, guessed, hoped that 'BOO!' wouldn't actually appear as the Ghost should have never been instantiated (IMHO, because I don't know the actual expected behavior of this code). Any Guru out there knows what's up? Just realized that if I instantiate an explicit constructor for Ghost the code doesn't compile... class Ghost { public: Ghost() { printf(" HAHAHA! "); } ~Ghost() { printf(" BOO! "); } }; Ah, the mystery ...

    Read the article

  • color code in X/HTML , CSS..

    - by jitendra
    In how many ways we can give color info in X/HTML, css? I know some Hex color name rgba is there any other method? and which method is preferred to use and which not? Please give explanation. And what is the means of web-safe colors?

    Read the article

  • How to setup Eclipse PDT on a bare Windows box?

    - by Alex R
    I have installed Eclipse PDT All-In-One and nothing works (I can edit PHP source but cannot execute any PHP Scripts). Do I also need to install my own PHP interpreter? Do I need XAMPP? WAMP? Cygwin? XDebug? Zend? I'm looking for the smallest amount of stuff that I need to install to get a working PHP IDE, starting with an empty install of Windows Vista.

    Read the article

  • Within a DLL, how is the function table structured?

    - by Willi Ballenthin
    I've been looking into the implementation of a device library that doesn't explicitly support my operating system. In particular, I have a disassembled DLL, and a fair amount of supporting source code. Now, how is the function table/export table structured? My understanding is that the first structure of the .data section is a table of VRAs. Next is a table of strings linked by index to that first address table. This makes sense to me, as a linker could translate between symbols and addresses. How do functions referenced by ordinals fit into this picture? How does one know which function has such and such ordinal number, and how does the linker resolve this? In other words, given that some other DLL imports SOME_LIBRARY_ordinal_7, how does the linker know which function to work with? Thanks, all! edit More information... Im working with the FTDI libraries, and would like to resolve which function is being invoked. In particular, I see something like: extern FTD2XX_Ordinal_28: near how might I go about determining which function is being referenced, and how does the linker do this?

    Read the article

  • Code Golf: Triforce

    - by chpwn
    This is inspired by/taken from this thread: http://www.allegro.cc/forums/thread/603383 The Problem Assume the user gives you a numeric input ranging from 1 to 7. Input should be taken from the console, arguments are less desirable. When the input is 1, print the following: *********** ********* ******* ***** *** * Values greater than one should generate multiples of the pattern, ending with the one above, but stacked symmetrically. For example, 3 should print the following: *********** *********** *********** ********* ********* ********* ******* ******* ******* ***** ***** ***** *** *** *** * * * *********** *********** ********* ********* ******* ******* ***** ***** *** *** * * *********** ********* ******* ***** *** * Bonus points if you print the reverse as well. *********** *********** ********* ********* ******* ******* ***** ***** *** *** * * *********** ********* ******* ***** *** * * *** ***** ******* ********* *********** * * *** *** ***** ***** ******* ******* ********* ********* *********** *********** Can we try and keep it to one answer per language, that we all improve on?

    Read the article

  • Django: How to iterate over formsets and access cleaned data?

    - by Mark
    What if I want to do something with my formset other than immediately saving it? How can I do this? for form in vehicles_formset.forms: listing.id = None listing.vehicle_year = form.cleaned_data['year'] listing.vehicle_make = form.cleaned_data['make'] listing.vehicle_model = form.cleaned_data['model'] listing.vin = form.cleaned_data['vin'] listing.vehicle_runs = form.cleaned_data['runs'] listing.vehicle_convertible = form.cleaned_data['convertible'] listing.vehicle_modified = form.cleaned_data['modified'] listing.save() (Thus creating multiple listings) Apparently cleaned_data does not exist. There's a bunch of stuff in the data dict like form-0-year but it's pretty useless to me like that.

    Read the article

  • Reusing a NSString variable - does it cause a memory leak?

    - by Chris S
    Coming from a .NET background I'm use to reusing string variables for storage, so is the code below likely to cause a memory leak? The code is targeting OS X on the iphone/itouch so no automatic GC. -(NSString*) stringExample { NSString *result = @"example"; result = [result stringByAppendingString:@" test"]; // where does "example" go? return result; } What confuses me is an NSStrings are immutable, but you can reuse an 'immutable' variable with no problem.

    Read the article

  • ORACLE XML publishing

    - by Seedorf
    Hey guys, I was wondering which tool in ORACLE 11g (their latest DBMS) can be used for publishing XML. I am about to download it but would first like to know the name of the XML publisher and where I could get more information about it from. Thanks in advance. S

    Read the article

  • What is the most elegant way to deal with sourced files that themselves source (relative) source fil

    - by René Nyffenegger
    I am editing a file like /path/to/file.txt with vim, hence the current directory is /path/to. Now, I have a directory /other/path/to/vim/files that contains sourceA.vim. Also, there is a sourceB.vim file in /other/path/to/vim/files/lib/sourceB.vim In sourceA.vim, I want to source sourceB.vim, so I put a so lib/sourceB.vim into it. Now, in my file.txt, I do a :so /other/path/to/vim/files/sourceA.vim which fails, because the sourcing system is obviously not prepared for relative path names along with sourcing from another directory. In order to fix this, I put a execute "so " . expand("<sfile>:p:h") . "/lib/sourceB.vim" into sourceA.vim which does what I want. However, I find the solution a bit clumsy and was wondering if there is a more elegant solution to it. I cannot put the sourceA.vim nor sourceB.vim into vim's plugin folder.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >