rendering

yield if content, render something otherwise (Rails 3)

Hi, I've been away from Rails for a while now, so maybe I'm missing something simple. How can you accomplish this: <%= yield_or :sidebar do %> some default content <% end %> Or even: <%= yield_or_render :sidebar, 'path/to/default/sidebar' %> In the first case, I'm trying: def yield_or(content, &block) content_for?(content) ? ...

IE ignores padding when white-space: nowrap

Ok so I have a span with a background that is positioned in the left side, and a 20px padding-left to keep text from being rendered on top of the image... pretty standard. I also set white-space:nowrap on the span to stop the line from wrapping. The span is in a div about 200px wide. If the text in the span is long enough to exceed the...

Firefox issue: 100% body width stuck at 190px when resizing

Hi there! Ok, so, I have the following markup that opens in a pop-up window (the size is adjusted to 120px width and 300px height via Javascript): <body bgcolor="#000" topmargin="0" leftmargin="0" style="width:100%"> <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%"> <tr> <td align="center" height...

Force WPF to render a window while hidden?

I've noticed that when I make a change to the visual presentation of a window while the window is hidden, the changes are not immediately visible when the window is shown. Rather, the window appears briefly in the state it was in when it was last-visible, taking 0.5-1 seconds to display the updated form. This can be confusing and ugly a...

how to a display a bitmap in a editbox in android

Hi everyone, i have two bitmap images ..and i need to merge the bitmaps with precise positioning of one bitmap over other and get a resultant bitmap (which is combination of both) and the resultant bitmap is a font character and i want that bitmap to be displayed in a edit box where i am inputting text. is it possible. Please help. ...

Forcing ASP.NET WebForms to render __doPostback() scripts

One of our ASP.NET WebForms 3.5 pages just suddenly decided not to render the __doPostBack() javascript method, along with the supporting <hidden> fields, anymore. Everything else seems OK on the page - the only thing I changed was that I removed a postback handler on a SelectList control, and changed AutoPostback from True to False on ...

Render controller action from another controller

I think the code is more explicit option A class RedirectController < ApplicationController def index redirect_to :controller => 'posts', :action => 'show', :id => 1 # it works end end option B class RedirectController < ApplicationController def index render :controller => 'posts', :action => 'show', :id => 1 ...

Long process blocks waiting icon render in ExtJS

The feature I'm implementing is not a really required, so I won't include an extra library of threads just for that. But if someone knows a workaround I will appreciate it. So I have a grid of 256 rows and 3 columns; one those columns is a checkboxColumn (similar to the one used here). But that checkboxColumn plugin has being modified t...

Qt QPixmap::grabWidget on ActiveX widget

I have a Qt app which embeds a Flash Player ActiveX control. I put a button over the flashplayer and I need to set some parts of it transparent. Since the AX control is not part of the Qt rendering pipe, it's needed to fake the transparency. For this purpose I grab the contents of the AX control from under the button, and use it when ren...

C# Rendering 'player' sprite from differend class

Hello, i was wondering how could i display 'player' sprite from Player.cs class. So far everything was happening in Program.cs file, witch had 'device' for rendering. Now i want to do same but using different classes. Do i need to create device for each class to render stuff thats happening within them, or i need to somehow access the de...

walking through a building created in google sketchup

I am looking for a way to take a model of a building and allow people to walk through it like a video engine. We are also looking to run this on a viz wall, which requires OpenGL on Linux and be open source. But Something running on windows or closed source on Linux would be better than nothing. I have found Panda3D, but I am not sure...

Company logo partially visible. What could be wrong?

Hi, I was asked this question recently in an interview: Company logo appears partially on the new build of browser Eliminated Server down problem, not network issue Company Logo which is a JPG : maybe the image rendering broken What else could be wrong? I could not think of anything else. Please help. Can someone elaborate? Thanks...

PHP - LaTeX rendering

I am in the design stages of a new project which will take a data set and load it into a document, then render the document around a template. The rendered file could be a data set of CSV, a PDF marketing letter, an email, ... a lot of things. The data will not be math equations, I'm simply looking at an elegant way of connecting many da...

2 Chrome Table Rendering Defects: Inconsistent Rendering and table-layout: fixed;

First: This doesn't happen in Safari, and I cannot say it's WebKit. Second: Hit this link: http://nerdfiles.net/gdgs/chrome-table-rendering-defect.html Third: Control-refresh 30 or 40 times; you'll eventually see it. The table cells are "exposed" to highlight the problem. Fourth: CTRL+SHIFT+I, set the same problem table to "table-layout:...

C++/CLI or plain C++ with regards to graphics / rendering

I come from a .NET background and will be going into the field of rendering / graphics using OpenGL/DirectX. For this purpose C++ will be my language of choice to interact with these rendering frameworks. As I understand it Visual C++ allows native support for CLI which is an extension to C++ that allows the application to benefit from ...

Avoid rendering comments in HTML

Hi, I have a lot of comments in Rails views. How i can prevent rendering them ? ...

Drawing images with canvas is more efficient than let browser to render it?

It seems google images search is using canvas to draw images and original images are hidden from the beginning. Have anyone tested that? ...

Problem in M3G rendering in J2ME

I have made 3 planes and positioned them in a way that they make a corner of cube. (For some reasons I don't want to make a cube object). The 3 planes have 3 different Texture2Ds with different images. The strange problem is when I render the 3 objects and start rotating the camera, in some perspectives some parts of these 3 planes don't...

What is the best approach to render charts in WPF?

What is the best approach to render charts and then save them on a hard drive for further distribution using WPF? I found a number of ways to accomplish this by using the following types: DrawingVisual - creating a object of this type and then rendering graphics on its context; Shape - deriving from the Shape class and then overriding ...

WPF text rendering inconsistencies.

WPF 4.0 notoriously fixed the blurry text issue. Setting TextOptions.TextFormattingMode="Display" uses pixel hints to line up characters, which works really well to improve clarity. However, it does not work while the program is running as a Windows service in session 0; the text goes back to "Ideal" rendering, which at small sizes is c...