Questions tagged [rendering]

1

votes
3

answer
43

Views

Render multiple elements based on a number rather than mapping through an array

I'm familair with mapping through and array to render something for each number in an array. But what is an effective way to accomplish the same thing using a number. I've found myself in a situation where I have an integer representing number of pages and a component which takes the prop pageNumbe...
Barry Michael Doyle
1

votes
2

answer
163

Views

How to add item to json object ruby on rails?

I want to join items from 2 tables. There output: 'costs':[ { 'id':2, 'cost_name':'rent office', 'user_id':2, 'fix':true, 'amount':300300, 'created_at':'2018-11-05T18:36:19.108+06:00', 'updated_at':'2018-11-05T18:36:19.108+06:00' }, { 'id':3, 'cost_name':'new computer', 'user_id':2, 'fix':fals...
Arkhatinho
0

votes
0

answer
5

Views

How to render a component on each route with working functionality?

I'm trying to render a component that plays an mp3 on each route, and have the mp3 continue to play uninterrupted despite route changes. I'm not sure if this is possible, but i'd assume it is considering React creates single page sites. So far i've only gotten as far as getting the component to ren...
Alex4nder
1

votes
3

answer
79

Views

Conditional Rendering on Server Side

Background I am using next.js for server side rendering and react.js for client side. Goal Want to do conditional rendering on the basis of window size in server side. Like for 200px width render A component and for 400px width render B component. Problem In server side, we have no access to the win...
1

votes
1

answer
36

Views

Linear interpolation for vertices to achieve faceted appearance in Metal

I was trying to make an artistic look with Metal. The effect to achieve is to render a faceted teapot based on triangle primitives, instead of a smooth and mellow teapot. I am not sure how I can do this. I know I should tell Metal to calculate pixels inside a triangle as if the triangle is planar, i...
jackxujh
1

votes
2

answer
1.3k

Views

Problems about allocating openGL 3D texture size of 1G

I'm doing some work on Volume Rendering. I want to allocate a 3D luminance texture of 1024x1024x1024 uchar. Unfortunately it always fails. By adding glGetError() after glTexImage3D(...), I get the error code 1285, which means 'Out of memory'. However, my card is NV quadro 4800, whose memory size is...
rtrobin
1

votes
1

answer
310

Views

Integrate/ Inject React Component into Static(loaded) HTML

What i want is to be able to render HTML from react component, after a page has loaded without reloading it. I have a parent JSP loaded from a struts2 action, inside of which we are planning to integrate ReactJS as a roadmap to complete client-side UI. Here is the Child JSP. Sample JSX import React...
namasri aditya
1

votes
0

answer
38

Views

php optimize rendering upon webpage load

My php webpage contains hundreds if not thousands of buttons that can belong to up to 4-5 classes. I am generating all the buttons upon loading the page and then display them according to user interactions using simple js getElementsByClassName. The initial loading of the page is very fast (
CptHwK
1

votes
1

answer
54

Views

Whitespace instead Entry / Xamarin.Forms Android Emulator

there's a very special case in my Project with Xamarin.Forms (V2.5) Entry. I got a nested Grid with a button and two entries (also nested in a frame) in it. The button is bound to my VM and sets the visibility of these entries (if true, hide one and - over a converter - pop up the other). The text-p...
Marco
1

votes
1

answer
283

Views

Delay rendering UI until store loads in ExtJs

The store I want to load takes significant time in authentication and fetching the data (huge), and I need to select one field from store as default as per the condition. Since the store takes a lot of time (8-10s) and UI is rendered already, so setting the value appears out of nowhere, which is an...
Virag Swami
1

votes
1

answer
42

Views

Unity rendering

Hello so i want to ask a question i have a sniper and in most games wen you zoom with sniper the gun is gone but i and most people use 2 cameras 1 is for the world and the other is for only weapons so we have a layer weapon and wen i zoom in and lets say i disable the gunCamera (camera that only ren...
drugsandwich
1

votes
0

answer
130

Views

Node serverside rendering by parsing static bundle files

I am looking into server side rendering for a react/webpack web application. Then I was wondering.. Is it any simple way of processing the static files produced by webpack? So the server side renderer read the index.html file that contains the bundle, run the javascript in it so the react app is inj...
henit
1

votes
0

answer
63

Views

How to fix this Chrome rendering glitch with column-width + CSS toggle switches?

I made these nice toggle switches, but they're getting glitched when my columns wrapped. Is there some way to fix this or avoid the bug? .multicol-list { list-style: none; margin: 0; padding: 3px; column-width: 150px; column-gap: 10px; } .toggle-switch_switch--14qeA { position: relative; d...
mpen
1

votes
0

answer
184

Views

Angular4 NgFor select box with a large array

I'm working on a project in which I would like to populate a selectbox with all the cities of a certain country. The array I get from my db is about 2800 records long. When Angular renders this selectbox it takes pretty long although the data is ready for rendering very fast. Here is my html code: C...
Maarten De Weerdt
1

votes
0

answer
582

Views

jupyter notebook does not render LaTeX properly

I started using python with the jupyter notebook and I really like the markdown feature. The only problem (more esthetically) is that the printing is not like the standard LaTeX/Mathjax rendering. This is my first cell import sympy as sm import numpy as np This is my second cell (example code from d...
MrYouMath
1

votes
0

answer
38

Views

Padrino rendering json raises template not found

I am using Padrino and facing the next issue. I would like to render jsons, the controller is the following and then the error I always get. I call the end point with: curl -i -H 'Accept: application/json' http://localhost:3000/mymodels get :index, provides: [:html, :json] do @models = MyModel.all c...
Mark
1

votes
0

answer
59

Views

Bold text truncated with numberOfLines is too long

Working on a React Native project, I have run into an issue when using the numberOfLines prop on a Text component containing bold text. I have a component similar to this: {props.title} It seems that numberOfLines can only calculate how many characters there are room for with a normal font weight an...
Gitte Tang Jensen
1

votes
1

answer
803

Views

How to use Google Analytics function in Angular 5 (SSR with Universal)?

I'm trying to implement google analytics functionality to my Angular 5 site. But the instruction from this discussion: Angular 4+ using Google Analytics doesn't make sense because in my case the whole code executes on server-side and ga function just can't work properly (because it uses DOM elements...
Marat Khanbekov
1

votes
1

answer
465

Views

Redircting to an external Url in Angular SSR

In Angular 2+ only way to redirect to an external Url is to use the window.location.href = '...';. How to redirect to an external URL in Angular2 However this gives following error when Angular is running in SSR mode. ERROR ReferenceError: window is not defined Is there anyway I can avoid this erro...
Amitabh
1

votes
2

answer
151

Views

Todo List Sanitizing Input jQuery

I am working on a simple to do app. Everything works, except, if the user inputs an html element into the input, then it gets rendered as html. So, for instance if the input is h1 heading /h1 , I get the word 'heading' with default h1 styling. I have been googling for 2 hours now, and would really j...
InnaLei
1

votes
0

answer
231

Views

page source not coming for all components in angular universal

I have used angular universal for server side rendering. Few of the components are rendered correctly when I see page source of home page but few components shows only angular selectors and not the rendered html. This is happening only with home page. rest of the pages are working as expected.
Pijush Karmakar
1

votes
1

answer
233

Views

Use RGB texture as alpha values/Subpixel font rendering in OpenGL

Currently I'm using FreeType in subpixel mode and take the largest color of each pixel as alpha value, with the following fragment shader: uniform sampler2D Image; uniform vec4 Color; smooth in vec2 vVaryingTexCoord; out vec4 vFragColor; void main(void){ vec4 color = texture(Image, vVaryingTexCoord)...
weltensturm
1

votes
0

answer
38

Views

How do I rotate a 3D object relative to its orientation using quaternions?

As a learning experience, I'm trying to build a simple 3D game without any libraries. I've managed to figure out rendering (for the most part), and I've gotten 4D matrix transforms to work well enough. I'm having trouble rotating my player object relative to its own orientation; I want to build an a...
Peter N Wood
1

votes
1

answer
525

Views

Render blocking by jquery and bootstrap library

I have index.html file where I have Jquery library and bootstrap library for js being loaded in tag, they are reported as the reason for render blocking, where, jquery.min.js takes 932 ms and bootstrap.min.js takes 765 ms to load. Here, I decided to load the jquery and boostrap files after loading...
OM The Eternity
1

votes
1

answer
16

Views

Why we often only see Webkit css tags that are for Apple's and Safari web browser? Should we use other rendering engine tags too?

Since there are different rendering engines for different browsers, why we often only use Webkit CSS tags that are for Apple's and Safari web browser? Should we use other rendering engine tags too to make the web pages or emails look well across all major browsers? Such as Blink for Chrome, Gecko fo...
Muxiang
1

votes
0

answer
68

Views

Convert from Simple Ray Casting to X-Ray Rendering

I am referring to the code by Lebarba for Volume Rendering. What I am trying to do is the X-Ray Rendering rather than Ray casting. Here is the result for the Ray casting with the code RayCasting for(int i = 0; i < MAX_STEPS; i++) { //Get the voxel intensity value from the 3D texture. colorSample = s...
newcomer
1

votes
0

answer
590

Views

Server Side Rendering - ReactDOMServer.renderToString returns empty routes html (router 4)

I'm trying to render react application on server, but it seems that renderToString function doesn't render routes html only header and footer. By looking at the code of the page you can see only the header and footer that the server returned from App.js. But the code that is in the routes is not on...
Roman Fedchenko
1

votes
1

answer
211

Views

Sequentially importing .obj files becomes drastically slow very quickly

I have written a very straight-forward script that imports many obj files one-by-one and renders them. The imported meshes have ~10k to ~120k vertices. After rendering, I completely remove the imported mesh (along with its data blocks) before importing the next one. However, as the for loop proceeds...
Amir
1

votes
0

answer
144

Views

Volume rendering in vtk(python) using low data of grid

I would like to do volume rendering in vtk(python) using low data of grid and scalar values. The Data which I have is like below #{ # 'Field Quantity': 'p(x,y,z,f)' # 'Field Quantity Units': 'Pa' # 'Snapshot Quantity': 'Frequency' # 'Snapshot Value': 10000 # 'Snapshot Units': 'Hz' # 'Co...
박태영
1

votes
0

answer
174

Views

Angular 5 - using the same path for different modules

if you guys happened to be facebook users, you perhaps noticed the Url 'https://www.facebook.com' does not change when the user is logged in or out. I had the same problem in an application I'm building (using angular 5). Though there have been some suggested solutions for that: First is to use the...
Profess Physics
1

votes
1

answer
78

Views

GDI contents not rendered correctly using Direct2D GdiInteropRenderTarget

I'm trying to render some contents using both Gdi and Direct 2D on a compatible render target. I create the compatible target with D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE option and then I do as follows: m_pRenderTarget->BeginDraw(); m_pRenderTarget->SetTransform(D2D1::Matrix3x2F::Ident...
October Wen
1

votes
1

answer
57

Views

WPF TextFormattingOptions.Display changes the letter spacing

Based on this answer about issues with blurry texts in WPF, I tried to use TextOptions.TextFormattingMode = TextFormattingMode.Display, but it seems like it also changes the spacing between the letters: TextFormattingMode.Displayleads to the z and e characters being blended into another: while this...
Thomas Flinkow
1

votes
2

answer
1.4k

Views

Server-side rendering with Rendertron - Angular 5 without firebase

I am using rendertron as a solution for server side rendering, below is index.js file. How to execute index.js and where to execute. I have setup my own instance of redertron using docker on my server and my angular app build is within dist folder how to render complete html of my angular app using...
pm2530
1

votes
0

answer
28

Views

How can I get a 4k image of webpage render without a 4k monitor?

We've all been there - a webpage formats correctly and looks great, but when we print it or html2pdf it breaks all the formatting. You can take a screenshot but the DPI (~70) is far too low for print where you need ~300 DPI. So, is there a tool or a way to trick your computer/browser into rendering...
Austin Heerwagen
1

votes
0

answer
257

Views

Inject SSR React Components into CSR React application

I have quite interesting problem. I have a CSR React app. When the app is executed in browser, it makes an api call to the backed REST API. This API is returning SSR React Component. There are various reasons why this architecture exists. Rendering our SSR React Component is really expensive (so we...
Vladimir Gorej
1

votes
1

answer
1.2k

Views

How to implement angular server side rendering in laravel?

I created a single page application with angular 5. I use this application with laravel backend. In the laravel project I have an angular folder, this folder store all the angular files. I built the angular application outside the angular folder, in a public folder in the root laravel's project fold...
Anonymus_goat
1

votes
1

answer
61

Views

Is there a web link to Source Code of the Blender “patch” for Otoy Octane Renderer's version of Blender they bundle with their GPU rendering Plugin?

According to this link: https://home.otoy.com/render/octane-render/demo/ The demo they give must use the BLENDER version they give you which that page only has links for binaries it seems. But since Blender is GPL, there must be a link to the 'source code' somewhere, maybe hidden and harder to find?...
htfree
1

votes
0

answer
244

Views

React + MobX + Server-side rendering: How to restore state of components?

I'm using MobX. My App consists of many component-classes. I render it on the server, and now I want to restore (hydrate) it on the client. Is it possible to restore the state of all the components?
J. Snow
1

votes
1

answer
140

Views

vue-server-renderer – invalid expression when trying to interpolate template e.g. with title or meta data

When I try to compile the following server-side code with vue 2.5.13 node 9.9.0 I get an 'unexpected token' error. I don't know why that is. I am simply trying to do an extrapolation. Unfortunately I can not codepen, because this is server side code. But the example is bare bones, so it should be p...
LongHike
1

votes
0

answer
11

Views

Rendering Pixel Noise

I was reading code for Notch’s Level Generation app for his 2D version of minecraft (minicraft) and I was going to see if any of you guys understand or could illustrate how this code works? Its pixel based and I know I need to improve my bit manipulation skills lol. https://github.com/skeeto/Minic...
user9605701

View additional questions