Search Results

Search found 565 results on 23 pages for 'craig johnston'.

Page 9/23 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Upload File to Database in ColdFusion

    - by George Johnston
    I simply would like to upload a file to my database using ColdFusion. I understand how to upload an image to a directory, but I would like to place it directly in the database. I have set a database field to varbinary(MAX) to accept the image and have the stored procedure to insert it. Currently my code for uploading the image to my file system is: <cfif isdefined("form.FileUploadImage")> <cffile action="upload" filefield="FileUploadImage" destination="#uploadfolder#" nameconflict="overwrite" accept="image/*" > </cfif> I've obviously left some of the supporting code out, but really all I need to do is get a binary representation of the file stored in memory, instead of the file system. Any experts out there that can help? Thanks, George

    Read the article

  • Numeric representation of a color

    - by George Johnston
    What would be the best format to numerically represent a color in .NET so that I wouldn't have to use the Color object? Right now I am saving the color as a the HTML representation, but in order to use it I have to parse it out. I am dealing with a 800x600 canvas that stores a color value for each pixel and I need to be able to render the color out as quick as possible without bloating my application out to storing 500k+ color objects.

    Read the article

  • SQL: HAVING clause

    - by Craig Johnston
    See the following SQL statement: SELECT datediff("d", MAX(invoice.date), Now) As Date_Diff, MAX(invoice.date) AS max_invoice_date, customer.number AS customer_number FROM invoice INNER JOIN customer ON invoice.customer_number = customer.number GROUP BY customer.number If the the following was added: HAVING datediff("d", MAX(invoice.date), Now) > 365 would this simply exclude rows with Date_Diff <= 365? What should be the effect of the HAVING clause here?

    Read the article

  • C#: how to construct strings

    - by Craig Johnston
    Which of these will achieve the correct result: (1) int X = 23; string str = "HELLO" + X.ToString() + "WORLD"; (2) int X = 23; string str = "HELLO" + X + "WORLD"; (3) int X = 23; string str = "HELLO" + (string)X + "WORLD"; EDIT: The 'correct' result is to output: HELLO23WORLD

    Read the article

  • How often should a programmer communicate with management?

    - by George Johnston
    I struggle with finding a good medium on communication. In our jobs, it seems like it's very easy to get lost in code and lose track of time. It also seems kind of ridiculous to send out updates for every tiny task. Even though I am working very hard on getting things done, in a company that has very active communication between other branches, it tends to look bad for me when I'm not constantly updating my status. However, if I'm working on a 3-4 hour project, I'm not going to update management for every single line of code that I output. Broad I know, depends on the people, company, etc, but what would be a good general rule of thumb for effective communication?

    Read the article

  • Is it possible to produce a small preview or thumbnail image of a Crystal report in code?

    - by Lawrence Johnston
    I'm using Crystal to display the reports in my project, and I'd like to be able to display a small preview or thumbnail image of the report to the user when he or she is picking a report to display from my UI. Is there any way to produce these thumbnails dynamically from code? The user has the option to add or remove reports by adding or removing them from the reports folder, so just making all the thumbnail images by hand isn't really an option.

    Read the article

  • Overloading methods in C#

    - by Craig Johnston
    Is there a way to simplify the process of adding an overloaded method in C# using VS2005? In VB6, I would have just added an Optional parameter the function, but in C# do I have to have to type out a whole new method with this new parameter?

    Read the article

  • c#: can you use a boolean predicate as the parameter to an if statement?

    - by Craig Johnston
    In C#, can you use a boolean predicate on its own as the parameter for an if statement? eg: string str = "HELLO"; if (str.Equals("HELLO")) { Console.WriteLine("HELLO"); } Will this code output "HELLO", or does it need to be: string str = "HELLO"; if (str.Equals("HELLO") == true) { Console.WriteLine("HELLO"); } If there is anything else wrong with the above code segments, please point it out.

    Read the article

  • Close all HTML unclosed IMG tags

    - by George Johnston
    Is it possible to do a regex replace on all IMG tags that are unclosed? If so, how would I identify: <img src="..." alt="..."> ...as a potential canidate to be replaced? = <img src="..." alt="..."/> Update: We have hundreds of pages, and thousands of image tags, all must of which must be closed. I'm not stuck on RegEx -- any other method, aside from manually updating all IMG tags, would suffice.

    Read the article

  • Is this the best way to get the size of a Paper via CUPS?

    - by Lawrence Johnston
    I've got a CUPS job control file. I need to get the actual dimensions of the print that was made. This is the way I've figure out to do it: Get the paper name using the media attribute. (e.g. Letter) Get the printer uri from the printer-uri attribute. (e.g. ipp://localhost/printers/MyPrinter) Get the printer name by passing the printer uri to the IPP_GET_PRINTER_ATTRIBUTES operation and getting the printer-name attribute. (e.g. MyPrinter) Get the path to the PPD passing the printer name to the the cupsGetPPD method. Open the PPD passing the path to the PPD to the ppdOpenFile method. Get the paper size by passing the PPD and paper name to the ppdPageSize method. This will work, but it seems a bit roundabout. Is there a more efficient way of getting what I need?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >