scaling

Phonegap not scaling properly between iPad and iPhone

本小妞迷上赌 提交于 2019-12-23 12:38:01
问题 I developed an app for iPad using Phonegap 0.9.6. Seems to be working fine. The main element in the app is 768 px wide, so scaling has not been a problem one way or the other. Now I am experimenting with running the same thing on an iPhone. I have this meta tag at the top of my html in the 'head' section: <meta name="viewport" content="user-scalable=no, width=device-width"> It seems to work fine on the iPhone browser: I can point the browser to my locally-running server, the page gets scaled

Equal-height scaling cells in an html table

做~自己de王妃 提交于 2019-12-23 10:42:15
问题 I'm having some trouble with HTML tables when I make this design: The left-hand cell is a rowspan="2" cell, and the right two are using height="50%" attributes. Below is the expected behavior: +-------------+-----------------+ | | | | | Equal-height | | | cell #1 | | | | | Scaling- +-----------------+ | height cell | | | | Equal-height | | | cell #2 | | | | +-------------+-----------------+ What actually happens: +-------------+-----------------+ | | Equal-height | | | cell #1 | | +----------

Scaling in inverse FFT by cuFFT

こ雲淡風輕ζ 提交于 2019-12-23 10:25:57
问题 Whenever I'm plotting the values obtained by a programme using the cuFFT and comparing the results with that of Matlab, I'm getting the same shape of graphs and the values of maxima and minima are getting at the same points. However, the values resulting by the cuFFT are much greater than those resulting from Matlab. The Matlab code is fs = 1000; % sample freq D = [0:1:4]'; % pulse delay times t = 0 : 1/fs : 4000/fs; % signal evaluation time w = 0.5; % width of each pulse yp = pulstran(t,D,

Scaling in inverse FFT by cuFFT

元气小坏坏 提交于 2019-12-23 10:25:07
问题 Whenever I'm plotting the values obtained by a programme using the cuFFT and comparing the results with that of Matlab, I'm getting the same shape of graphs and the values of maxima and minima are getting at the same points. However, the values resulting by the cuFFT are much greater than those resulting from Matlab. The Matlab code is fs = 1000; % sample freq D = [0:1:4]'; % pulse delay times t = 0 : 1/fs : 4000/fs; % signal evaluation time w = 0.5; % width of each pulse yp = pulstran(t,D,

QLabel: Scaling Images for Zooming and Losing Picture Quality

北城余情 提交于 2019-12-23 07:08:27
问题 Hey so I have this function which works and scales the image nicely and will shrink and expand it given the correct shortcuts from the UI. However I am losing picture quality when I zoom back to the original scaled factor of the image. I have tried making 'orig' which is a global 'const QPixmap*'. 'orig' is defined when the image is loaded into the UI. I then set 'pixmap = orig' (seen below in the code) but this doesn't seem to work, and I'm not sure why. The idea is to make a copy of it

OpenGL ES Pixel Art - Scaling

血红的双手。 提交于 2019-12-23 02:50:31
问题 Im having trouble displaying pixel based art (think retro tiles and art) on OpenGL Es 1.1 on the iPhones. Tiles are represented using 8bytes (1 byte for each row) with each bit representing a pixel being set or not. For example a tile with the number 8: 0 0 0 0 0 0 0 0 -> 0 0 1 1 1 0 0 0 -> xxx 0 1 0 0 0 1 0 0 -> x x 0 1 0 0 0 1 0 0 -> x x 0 0 1 1 1 0 0 0 -> xxx 0 1 0 0 0 1 0 0 -> x x 0 1 0 0 0 1 0 0 -> x x 0 0 1 1 1 0 0 0 -> xxx Converting this to OpenGL on iPhone using glDrawArrays(GL

Scaling An Array (Matrix)

偶尔善良 提交于 2019-12-22 17:37:11
问题 The intention of this program is to create a larger array of bytes scaled up by a factor of 10 from the original array. For example, the 1 in [0][0] should be a 10x10 square of 1's in the new array. I provide the code and the output, which seems to work properly during population of the larger array, but then prints different values. I'm currently experimenting with just the rows in order to limit the number of variables I'm dealing with during testing. Can anyone think of a reason why this

Why do standardscaler and normalizer need different data input?

女生的网名这么多〃 提交于 2019-12-22 12:19:33
问题 I was trying the following code and found that StandardScaler(or MinMaxScaler) and Normalizer from sklearn handle data very differently. This issue makes the pipeline construction more difficult. I was wondering if this design discrepancy is intentional or not. from sklearn.preprocessing import StandardScaler, Normalizer, MinMaxScaler For Normalizer , the data is read "horizontally". Normalizer(norm = 'max').fit_transform([[ 1., 1., 2., 10], [ 2., 0., 0., 100], [ 0., -1., -1., 1000]]) #array(

Fixing the ios7 squished image in canvas, with rotation and scaling

匆匆过客 提交于 2019-12-22 10:27:46
问题 I am having problems with images being squished in iOS7 using canvas. I have found the following post which seems to be headed in the right direction: HTML5 Canvas drawImage ratio bug iOS However, I am beyond the simple case of drawing an image, I am also rotating and scaling the context (for thumbnails with EXIF orientation data) before drawing the image. The code runs, but there is no image data in my thumbnails. I'm guessing this has to do with the canvas rotation and scaling. However, I'm

How to detect font scaling mode used?

徘徊边缘 提交于 2019-12-21 19:54:54
问题 In the Windows 7 "Custom DPI Setting" window, there is a setting called "Use Windows XP style DPI scaling". Does anyone know how to detect if this setting is in use? 回答1: Not sure if either of these will give you what you want but might be useful: IsProcessDPIAware - Determines whether the current process is dots per inch (dpi) aware such that it adjusts the sizes of UI elements to compensate for the dpi setting. Writing High-DPI Win32 Applications - Using the code in the Getting System