render

Best format for displaying rendered time on a webpage

Hello, I've started to add the time taken to render a page to the footer of our internal web applications. Currently it appears like this Rendered in 0.062 seconds Occasionally I get rendered times like this Rendered in 0.000 seconds Currently it's only meant to be a guide for users to judge whether a page is quick to load o...

API for server-side 3D rendering

I'm working on an application that needs to quickly render simple 3D scenes on the server, and then return them as a JPEG via HTTP. Basically, I want to be able to simply include a dynamic 3D scene in an HTML page, by doing something like: <img src="http://www.myserver.com/renderimage?scene=1&amp;x=123&amp;y=123&amp;z=123"&gt; My ques...

Best way to pretty print XML response in grails.

given this in a grails action: def xml = { rss(version: '2.0') { ... } } render(contentType: 'application/rss+xml', xml) i see this: <rss><channel><title></title><description></description><link></link><item></item></channel></rss> is there an easy way to pretty print the xml? something built into the render method,...

Is there a way to maintain ASP.NET ViewState in dynamically rendered HTML control?

I want to make custom control which has couple of <input type='checkbox' /> controls which I render in Render method. Is it possible to retain ViewState (e.g. checked or not) on these Controls? There is a way of doing this by using ASP.NET server CheckBox control, adding them in OnLoad event with this.Controls.Add(), and giving them s...

Rendering file with MIME Type in rails

Here's the code: render :file => @somedir + "/blah.xml" ...but the resulting MIME type is text/html when I check in FireBug. How do I specify a MIME type in this case? ...

How do I render a partial of a different format in Rails?

I'm trying to generate a JSON response that includes some HTML. Thus, I have /app/views/foo/bar.json.erb: { someKey: 'some value', someHTML: "<%= h render(:partial => '/foo/baz') -%>" } I want it to render /app/views/foo/_baz.html.erb, but it will only render /app/views/foo/_baz.json.erb. Passing :format => 'html' doesn't help. ...

Rails RESTful controller and rendering after custom action.

How can I render after executing an action in a restful controller instead of redirecting. I have a controller with standard actions, and I added a special action that adds data to the resource in question, via a form on the #show page (Think comments on a post). I am validating the input from the form and want to re-render the show act...

Capturing HTML generated from ASP.NET

How do I best capture the HTML (in my instance, for logging) rendered by an aspx-page? I dont want to have to write back to the page using Response.Write, since it messes up my site layout. Using the Response.OutputStream or Response.Output's stream results in an ArgumentException ({System.ArgumentException: Stream was not readable.) ...

Fluent interface for rendering HTML

Rendering HTML with the HtmlTextWriter isn't incredibly intuitive in my opinion, but if you're implementing web controls in web forms it's what you have to work with. I thought that it might be possible to create a fluent interface for this that reads a bit more like the HTML it outputs. I would like to know what people think of the synt...

Numbers of ways of Rendering in Qt

Hi Can anyone please tell me how many ways are there to render a screen in Qt.Like Show() , QDirectPainter etc... ...

Can you use an ASP.NET web control (ASCX) to render XML?

Off the top of my head, I don't see any reason why you couldn't structure an ASP.NET custom web control (ASCX file) to output only XML. If you avoid using controls in the System.Web.UI namespace, and just use XML tags and sub-controls, which also render only XML, you should end up with a perfectly valid XML document being rendered. Am ...

When I instantiate an ASP.NET usercontrol at runtime, why does it ignore the ASCX file?

I've created a regular ASP.NET user control, including the ascx file. For example: MyUserControl.ascx MyUserControl.ascx.cs Then I try to render the control manually, at runtime, using code similar to the following code: var testMyUserControl = new MyUserControl(); var textWriter = new HtmlTextWriter( new System.IO.Strin...

Pixel Drawing Algorithm

I need an example algorithm that will draw pixels one at a time on a grid based (x,y) system, and also color them based on an rbg value based on binary data that is provided in some form. I am looking for anything written in php or a php like language such as C, but that does not use any sort of library or graphics card api, as i am codi...

How to get the HTML output from a DataGrid?

Hi, I was wondering if there was a way to some how get the HTML output of a DataGrid. I want the raw HTML after the data has been bound to the grid. Is there some sort of overload for the render method I can use to accomplish this? Thanks. ...

Render FixedPage contents onto bitmap

I have the following code, taken from http://www.codeplex.com/XPS2Image/ ,which in turn was taken from some people discussing at at Microsoft development forums. int[] pages = new int[] { 0, 1, 2, 3, 4 }; XpsDocument xpsDoc = new XpsDocument(@"c:\tmp\sample.xps", System.IO.FileAccess.Read); FixedDocumentSequence docS...

ASP.NET MVC Equivalent to "override void Render" from ASP.NET WebForms

What is the ASP.NET MVC equivalent to "override void Render" from ASP.NET WebForms? Where are you opportunities to do some last-minute processing before the output is sent to the client? For example, I wouldn't use this in production code, but illustrates cleaning up the <title> and <head> markup for an entire site when placed in the ...

Render multiline text with Rails ?

Hi all, I'd like to render multiline text in Rails, the action looks like: def mutli_text render :text => 'Word1\nWord2' end and I'd expect the response to be : Word1 Word2 unfortunatly I get Word1\nWord2 Any help would be appreciated (The action must render a multiline response to get the autocomplete jquery plugin working) ...

Rendering a view on-the-fly

I'm developing an ASP.NET MVC application that will send the user a confirmation email. For the email itself, I'd like to create a view and then render that view and send it using the .NET mail objects. How can I do this using the MVC framework? ...

How to detect Render Mode of browser for current page?

I know that modern browsers generally have two render mode: standard mode and quirk mode. The browser detects the heading DocType. The question is how to detect render mode of current page at runtime. Is there any Firebug tool to do that? ...

Server Sided 3D rendering

My questions have to do with this very interesting article: http://www.techcrunch.com/2008/07/09/otoy-developing-server-side-3d-rendering-technology/ What they say: In this article it is claimed that this company can do amazing server sided 3D rendering all the while displaying the output in the browser using Flash, Ajax, Java or Active...