Search Results

Search found 3366 results on 135 pages for 'deferred rendering'.

Page 30/135 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Dynamically Rendering in a Scrollable Area

    - by James
    What is the generic algorithm or process that is commonly used to dynamically render portions of a scrolling area? For example, in Google Maps, when the user scrolls past the bounds of the currently rendered area, a grey checkerboard pattern is displayed within the not-yet-rendered portions while the application loads and renders those areas. I'm looking specifically for the approach, or the mathematics, related to filling a graphics area in chunks based on what has just come into view. If possible, I'm looking for anything relevant to the GDI+ process of doing so.

    Read the article

  • Page not rendering until BackgroundWorker.RunWorkerAsync completes

    - by brainimus
    I have an aspx page that on a button click creates a BackgroundWorker and then calls the RunWorkerAsync method. In my aspx file I have set Async='true' but when I run the application and click the button it appears as though the page waits to refresh until the processing of the BackgroundWorker is done. How do I get control to return to the page (and have the page refresh) after the BackgroundWorker is created and started? BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += RunJob; worker.RunWorkerCompleted += JobCompleted; worker.RunWorkerAsync();

    Read the article

  • How to use string interpolation when rendering templates?

    - by Senthil
    I found this code in a Rails cookbook. class BlogController < ApplicationController def display_by_date year = params[:year] month = params[:month] day = params[:day] day ='0'+day if day && day.size == 1 @day = day if ( year && month && day ) render(:template => "blog/#{year}/#{month}/#{day}") elsif ( year ) render(:template => "blog/#{year}/list") end end end I'm not sure what to name the templates so the router can find them. Thanks for your help.

    Read the article

  • Rendering XHTML as MS Word Document - Headers

    - by Paul
    Hi, I generate an XHTML document and set the Mime type as "application/msword" so it opens in Word. To create a header I appear to have to reference an external file thus: <style> ... @page{mso-footnote-separator:url("**OUT_files/header.htm**") fs; mso-footnote-continuation-separator:url("OUT_files/header.htm") fcs; mso-endnote-separator:url("OUT_files/header.htm") es; mso-endnote-continuation-separator:url("OUT_files/header.htm") ecs;} @page Section1{ mso-header-margin:.5in; mso-header:url("OUT_files/header.htm") h1; } } ... </style> Does anyone know how to reference a div defined within the main XHTML document itself, without having to reference an external file? Thanks

    Read the article

  • calculate the rendering of a custom control

    - by Marc Jonkers
    In an xpage I would like to be able to decide which custom controls have to be rendered or loaded. I have a custom control named 1, another 2, 3 etc When a scoped variable has the value 1, custom control 1 should be displayed/rendered/loaded. A value of 2 , custom control 2 has to be displayed. etc I came up with following sollution : I calculate if that custom control has to be loaded or not depending on the value of the scoped variable. Since I have 8 of these custom controls on 1 page I was wondering ,since only 1 out of those 8 custom controls have to be rendered ,if there isn't a better way with less code to do the same job. Won't my sollution put a lot of load to my server ?

    Read the article

  • Type-aware rendering (and editing) of tabular data in pyqt4

    - by pihentagy
    I would like to have a very short / minimal example of how to create some tabular widget with different types of item in it. In the first round let's say I'd like to render [["Hello", 12, True], ["World", 13, False]] (Hello as string, 12 as number (right-align), True as a checkbox for eg.), but it would be nice to have Dates, Colors, and other type of info. Next round: editing (integer with spinbox, maybe sometimes a combobox is handy, but that may not work out of the box). There must be a simple solution, but I couldn't find...

    Read the article

  • Rendering a different controller and action while keeping errors

    - by DerNalia
    I have a form in one controller(A) that renders a partial from another controller(B), and stays on A's edit page during editing / updating etc. However... When the partial form form controller B has an error, the error doesn't show up on A's edit page right now, if there is an error, I am doing (in controller B's update method) redirect_to :controller => "A", :action => "edit" and then this is built in... but I don't know what to do with it... the error needs to be sent to controller A... but.. it doesn't format.xml { render :xml => @varFromB.errors, :status => :unprocessable_entity } thanks

    Read the article

  • Rendering maps from raw SVG data in Java

    - by Lunikon
    In an application of mine I have to display locations and great circle paths in a map which is rendered to PNG and then displayed on the web. For this I simply use a world map (NASA's Blue Marbel in fact) scaled to various "zoom levels" as base image and only display the a part of it matching the final image size and fitting all items to be displayed. Straight forward so far. Now I came across Wikipedia's awesome blank SVG maps which contain all the country codes for easy reference and I was wondering whether it was possible to use those to have more customized colors and to highliht countries etc. So I did a bit of googling and was looking for Java libraries which would enable me to load the blank SVG map to memory allows for easy reference/selection of certain paths do manipulations of coloring, stroke widths etc render to a buffered image as the background for the great-circle paths/nodes What I came across quite often was Batik, but it looks like a really heavy framework and I'm not quite sure whether it is what I'm looking for. I have recently played around with Raphaël a bit and I like the way it handles working with vector graphics in code. If the Java framework for my purpose would feature a similar interface, that would be a nice-to-have. Any recommendations what toolset would be approriate for my purposes?

    Read the article

  • JSF Rendering Issue (Page getting cached)

    - by Shamik
    I am facing a strange issue with JSF. I have developed one controller and bind it to request scope. I need to access one jsf page like http://localhost:8080/selectRule.jsf?type=A and on the same IE session I want to issue another request like http://localhost:8080/selectRule.jsf?type=B as we can see, only the type is changing here. This is why I have a ruleController bound to request scope, so that every request, creates the controller and pulls out the data depending upon type. I have a private HtmlSelectOneMenu choices item in the page. What I see is, somehow only once in the session the getChoices() is getting called. This is what I see For each url, one new ruleController object is getting created. Only first time getChoices() are called. In the subsequent time, if I change the URL in the web browser, the getChoices() method are not getting called though a new controller is getting created. Note: I am using JSF 1.1

    Read the article

  • Tool to measure Render time

    - by Noob
    Hi Folks, Is there a tool out there to measure the actual Render time of an element(s) on a page? I don't mean download time of the resources, but the actual time the browser took to render something. I know that this time would vary based on factors on the client machine, but would still be very handy in knowing what the rendering engine takes a while to load. I would imagine this should be a useful utility since web apps are becoming pretty client heavy now. Any thoughts?

    Read the article

  • Rendering of graphics different depending on position

    - by jedierikb
    When drawing parallel vertical lines with a fixed distance between them (1.75 pixels) with a non-integer x-value-offset to both lines, the lines are drawn differently based on the offset. In the picture below are two pairs of very close together vertical lines. As you can see, they look very different. This is frustrating, especially when animating the sprite. Any ideas how ensure that sprites-with-non-integer-positions' graphics will visually display the same? package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; public class tmpa extends Sprite { private var _sp1:Sprite; private var _sp2:Sprite; private var _num:Number; public function tmpa( ):void { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; _sp1 = new Sprite( ); drawButt( _sp1, 0 ); _sp1.x = 100; _sp1.y = 100; _num = 0; _sp2 = new Sprite( ); drawButt( _sp2, _num ); _sp2.x = 100; _sp2.y = 200; addChild( _sp1 ); addChild( _sp2 ); addEventListener( Event.ENTER_FRAME, efCb, false, 0, true ); } private function efCb( evt:Event ):void { _num += .1; if (_num > 400) { _num = 0; } drawButt( _sp2, _num ); } private function drawButt( sp:Sprite, offset:Number ):void { var px1:Number = 1 + offset; var px2:Number = 2.75 + offset; sp.graphics.clear( ); sp.graphics.lineStyle( 1, 0, 1, true ); sp.graphics.moveTo( px1, 1 ); sp.graphics.lineTo( px1, 100 ); sp.graphics.lineStyle( 1, 0, 1, true ); sp.graphics.moveTo( px2, 1 ); sp.graphics.lineTo( px2, 100 ); } } } edit from original post which thought the problem was tied to the x-position of the sprite.

    Read the article

  • rendering a new line in a string (\n) with drawRect

    - by Mrwolfy
    I am trying to render a string with a new line (line break \n), using drawRect. The code below renders the my string as a single line, with no line break, even though I am using the \n character. See the second to last line. UIFont *font = [UIFont fontWithName:@"HelveticaNeue-CondensedBlack" size:fontSize]; CGPoint point = CGPointMake(0,0); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0); CGContextSetRGBStrokeColor(context, 0.0, 0.0, 0.0, 1.0); CGContextSetLineWidth(context, 4.0); CGContextSetTextDrawingMode(context, kCGTextFillStroke); CGContextSaveGState(context); [@"test \n test" drawAtPoint:point withFont:font]; CGContextRestoreGState(context);

    Read the article

  • ASP.NET: Page HTML head rendering

    - by Fabian
    I've been trying to figure out the best way to custom render the <head> element of a pag to get rid of the extra line breaks which is caused by <head runat="server">, so its properly formatted. So far the only thing i've found which works is the following: protected override void Render(HtmlTextWriter writer) { StringWriter stringWriter = new StringWriter(); HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter); base.Render(htmlTextWriter); htmlTextWriter.Close(); string html = stringWriter.ToString(); string newHTML = html.Replace("\r\n\r\n<!DOCTYPE", "<!DOCTYPE") .Replace("\r\n<html", "<html") .Replace("<title>\r\n\t", "<title>") .Replace("\r\n</title>", "</title>") .Replace("</head>", "\n</head>"); writer.Write(newHTML); } I define my had tag like Now i have 2 questions: How does the above code affect the performance (so is this viable in an production environment)? Is there a better way to do this, for example a method which i can override to just custom render the <head>? Oh yeah ASP.NET MVC is not an option.

    Read the article

  • JTable cells not rendering shapes properly

    - by Andrew
    I'm trying to render my JTable cells with a subclassed JPanel and the cells should appear as coloured rectangles with a circle drawn on them. When the table displays initially everything looks OK but then when a dialog or something is displayed over the cells when it is removed the cells that have been covered do not rendered properly and the circles are broken up etc. I then have to move the scroll bar or extend the window to get them to redraw properly. The paintComponent method of the component I'm using to render the cells is below: protected void paintComponent(Graphics g) { setOpaque(true); super.paintComponent(g); Graphics2D g2d = (Graphics2D) g; GradientPaint gradientPaint = new GradientPaint(new Point2D.Double(0, 0), Color.WHITE, new Point2D.Double(0, getHeight()), paintRatingColour); g2d.setPaint(gradientPaint); g2d.fillRect(0, 0, getWidth(), getHeight()); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); Rectangle clipBounds = g2d.getClipBounds(); int x = new Double(clipBounds.getWidth()).intValue() - 15; int y = (new Double(clipBounds.getHeight()).intValue() / 2) - 6; if (level != null) { g2d.setColor(iconColour); g2d.drawOval(x, y, width, height); g2d.fillOval(x, y, width, height); } }

    Read the article

  • Caught AttributeError while rendering: 'str' object has no attribute '_meta'

    - by D_D
    def broadcast_display_and_form(request): if request.method == 'POST' : form = PostForm(request.POST) if form.is_valid(): post = form.cleaned_data['post'] obj = form.save(commit=False) obj.person = request.user obj.post = post obj.save() readers = User.objects.all() for x in readers: read_obj = BroadcastReader(person = x) read_obj.post = obj read_obj.save() return HttpResponseRedirect('/broadcast') else : form = PostForm() posts = BroadcastReader.objects.filter(person = request.user) return render_to_response('broadcast/index.html', { 'form' : form , 'posts' : posts ,} ) My template: {% extends "base.html" %} {% load comments %} {% block content %} <form action='.' method='POST'> {{ form.as_p }} <p> <input type="submit" value ="send it" /></input> </p> </form> {% get_comment_count for posts.post as comment_count %} {% render_comment_list for posts.post %} {% for x in posts %} <p> {{ x.post.person }} - {{ x.post.post }} </p> {% endfor %} {% endblock %}

    Read the article

  • how to tesselate bezier triangles?

    - by Cheery
    My concern are quadratic bezier triangles which I'm trying to tesselate for rendering them. I've managed to implement this by subdividing the triangle recursively like described in a wikipedia page. Though I'd like to get more precision to subdivision. The problem is that I'll either get too few subdivisions or too many because the amount of surfaces doubles on every iteration of that algorithm. In particular I would need an adaptive tesselation algorithm that allows me to define the amount of segments at the edges. I'm not sure whether I can get that though so I'd also like to hear about uniform tesselation techniques. Hardest trouble I have trouble with calculating normals for a point in bezier surface, which I'm not sure whether I need, but been trying to solve out.

    Read the article

  • Where does ASP.Net get its rendered IDs from?

    - by NeilD
    Hi, I've inherited a project with some nasty JavaScript that depends on hard coded object ids. i.e. There are lots of places where it does things like this var magazine = document.getElementById('repModuleDisplay__ctl3_chkCats_0'); When the page renders in my UAT environment, the HTML looks like this, and everything works OK. <input id="repModuleDisplay__ctl3_chkCats_0" type="checkbox" name="repModuleDisplay:_ctl3:chkCats:0" ... etc However, when I put it on my Production environment, the HTML is suddenly rending like this: <input id="repModuleDisplay_ctl03_chkCats_0" type="checkbox" name="repModuleDisplay$ctl03$chkCats$0" ... etc The difference in ids means that the JavaScript can't find the Element, and fails. In an ideal world, I'd scrap the buggy JavaScript and do it again properly, but for a quick fix, I'd like to know what is causing the difference in rendering between the two environments. Does anyone have any ideas? Thanks, Neil

    Read the article

  • Dynamicall Rendering in a Scrollable Area

    - by James
    What is the generic algorithm or process that is commonly used to dynamically render portions of a scrolling area? For example, in Google Maps, when the user scrolls past the bounds of the currently rendered area, a grey checkerboard pattern is displayed within the not-yet-rendered portions while the application loads and renders those areas. I'm looking specifically for the approach, or the mathematics, related to filling a graphics area in chunks based on what has just come into view. If possible, I'm looking for anything relevant to the GDI+ process of doing so.

    Read the article

  • Drupal rendering incomplete views

    - by Paul
    I got tapped to do some quick maintenance on a recently migrated Drupal site. I'm pretty new to Drupal, so hopefully the problem is something that more experienced guys will figure out quick. Behavior is as follows. The public content works fine as far as I can tell. When I go to login, the login form renders correctly, but when I post the form w/ my credentials, I get back a blank page (not a 404; looks like a 200 to the /user URL, but all the gets rendered is empty Head and body tags). If i refresh the page, I get the content of my profile view, but none of the site chrome or CSS. Note that this is not an issue on the site it was migrated from, so it seems like something wasn't copied over correctly. The site's not public, so I can't provide a URL, sorry!

    Read the article

  • Rendering a CGPDFPage into a UIImage

    - by James Antrobus
    I'm trying to render a CGPDFPage (selected from a CGPDFDocument) into a UIImage to display on a view. I have the following code in MonoTouch which gets me part way there. RectangleF PDFRectangle = new RectangleF(0, 0, UIScreen.MainScreen.Bounds.Width, UIScreen.MainScreen.Bounds.Height); public override void ViewDidLoad () { UIGraphics.BeginImageContext(new SizeF(PDFRectangle.Width, PDFRectangle.Height)); CGContext context = UIGraphics.GetCurrentContext(); context.SaveState(); CGPDFDocument pdfDoc = CGPDFDocument.FromFile("test.pdf"); CGPDFPage pdfPage = pdfDoc.GetPage(1); context.DrawPDFPage(pdfPage); UIImage testImage = UIGraphics.GetImageFromCurrentImageContext(); pdfDoc.Dispose(); context.RestoreState(); UIImageView imageView = new UIImageView(testImage); UIGraphics.EndImageContext(); View.AddSubview(imageView); } A section of the CGPDFPage is displayed but rotated back-to-front and upside down. My question is, how do I select the full pdf page and flip it round to display correctly. I have seen a few examples using ScaleCTM and TranslateCTM but couldn't seem to get them working. Any examples in ObjectiveC are fine, I'll take all the help I can get :) Thanks

    Read the article

  • Silverlight Not Rendering On Navigation

    - by Azmath
    I'm trying to create a site that requires login. Its entirely designed in silverlight. So my first page, home.xaml loads in mysite.aspx and it basically has a login page. AFter login, the user is redirected to another page user.aspx. in that page, i've embedded another silverlight control called nav.xaml. so now when user.aspx loads it is supposed to load a silverlight control. i've programmed app.xaml.vb such that it loads nav.xaml in the rootlayout when the page requesting is user.aspx. but for some reason its not working. my app.xaml.vb code: Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup If e.InitParams.ContainsKey("ReqPage") Then If e.InitParams("ReqPage") = "userpage" Then Me.RootVisual = New Nav() End If Else Me.RootVisual = New Home() End If End Sub in IE, half of the nav.xaml is rendered. but in firefox nothing is rendered. so wats going on exactly? pls help!

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >