Search Results

Search found 182 results on 8 pages for 'joakim tall'.

Page 3/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Possible to pass pygame data to memory map block?

    - by toozie21
    I am building a matrix out of addressable pixels and it will be run by a Pi (over the ethernet bus). The matrix will be 75 pixels wide and 20 pixels tall. As a side project, I thought it would be neat to run pong on it. I've seen some python based pong tutorials for Pi, but the problem is that they want to pass the data out to a screen via pygame.display function. I have access to pass pixel information using a memory map block, so is there anyway to do that with pygame instead of passing it out the video port? In case anyone is curious, this was the pong tutorial I was looking at: Pong Tutorial

    Read the article

  • In 3D camera math, calculate what Z depth is pixel unity for a given FOV

    - by badweasel
    I am working in iOS and OpenGL ES 2.0. Through trial and error I've figured out a frustum to where at a specific z depth pixels drawn are 1 to 1 with my source textures. So 1 pixel in my texture is 1 pixel on the screen. For 2d games this is good. Of course it means that I also factor in things like the size of the quad and the size of the texture. For example if my sprite is a quad 32x32 pixels. The quad size is 3.2 units wide and tall. And the texcoords are 32 / the size of the texture wide and tall. Then the frustum is: matrixFrustum(-(float)backingWidth/frustumScale,(float)backingWidth/frustumScale, -(float)backingHeight/frustumScale, (float)backingHeight/frustumScale, 40, 1000, mProjection); Where frustumScale is 800 for a retina screen. Then at a distance of 800 from camera the sprite is pixel for pixel the same as photoshop. For 3d games sometimes I still want to be able to do this. But depending on the scene I sometimes need the FOV to be different things. I'm looking for a way to figure out what Z depth will achieve this same pixel unity for a given FOV. For this my mProjection is set using: matrixPerspective(cameraFOV, near, far, (float)backingWidth / (float)backingHeight, mProjection); With testing I found that at an FOV of 45.0 a Z of 38.5 is very close to pixel unity. And at an FOV of 30.0 a Z of 59.5 is about right. But how can I calculate a value that is spot on? Here's my matrixPerspecitve code: void matrixPerspective(float angle, float near, float far, float aspect, mat4 m) { //float size = near * tanf(angle / 360.0 * M_PI); float size = near * tanf(degreesToRadians(angle) / 2.0); float left = -size, right = size, bottom = -size / aspect, top = size / aspect; // Unused values in perspective formula. m[1] = m[2] = m[3] = m[4] = 0; m[6] = m[7] = m[12] = m[13] = m[15] = 0; // Perspective formula. m[0] = 2 * near / (right - left); m[5] = 2 * near / (top - bottom); m[8] = (right + left) / (right - left); m[9] = (top + bottom) / (top - bottom); m[10] = -(far + near) / (far - near); m[11] = -1; m[14] = -(2 * far * near) / (far - near); } And my mView is set using: lookAtMatrix(cameraPos, camLookAt, camUpVector, mView); * UPDATE * I'm going to leave this here in case anyone has a different solution, can explain how they do it, or why this works. This is what I figured out. In my system I use a 10th scale unit to pixels on non-retina displays and a 20th scale on retina displays. The iPhone is 640 pixels wide on retina and 320 pixels wide on non-retina (obsolete). So if I want something to be the full screen width I divide by 20 to get the OpenGL unit width. Then divide that by 2 to get the left and right unit position. Something 32 units wide centered on the screen goes from -16 to +16. Believe it or not I have an excel spreadsheet do all this math for me and output all the vertex data for my sprite sheet. It's an arbitrary thing I made up to do .1 units = 1 non-retina pixel or 2 retina pixels. I could have made it .01 units = 2 pixels and someday I might switch to that. But for now it's the other. So the width of the screen in units is 32.0, and that means the left most pixel is at -16.0 and the right most is at 16.0. After messing a bit I figured out that if I take the [0] value of an identity modelViewProjection matrix and multiply it by 16 I get the depth required to get 1:1 pixels. I don't know why. I don't know if the 16 is related to the screen size or just a lucky guess. But I did a test where I placed a sprite at that calculated depth and varied the FOV through all the valid values and the object stays steady on screen with 1:1 pixels. So now I'm just calculating the unityDepth that way. If someone gives me a better answer I'll checkmark it.

    Read the article

  • How to access a String that is in JSON array format

    - by Sayem Ahmed
    I have an asp.net page which is returning a list of object as a json string to an ajax request. The string is as follows : [ {"Name":"Don","Age":23,"Description":"Tall man with no glasses"} ,{"Name":"Charlie","Age":24,"Description":"Short man with glasses"} ] I want to access each field individually, like the name of the person, his age, his description etc. How can I do that? I am using JQuery for client-side scripting.

    Read the article

  • Home screen widget size for large screen or hdpi?

    - by kknight
    From Android widget screen guidelines, http://developer.android.com/guide/practices/ui_guidelines/widget_design.html, we know that, home screen has 4*4 cells, and in portrait orientation, each cell is 80 pixels wide by 100 pixels tall. I think these are for baseline HVGA screen. How about for large screens and hdpi screens, do they still have 4*4 cells for widget and each cell in portrait orientation is still 80 pixels * 100 pixels? Thanks.

    Read the article

  • possible to have a background color transition from color A to color B without repeating a pixel sti

    - by Andrew Heath
    For things like menubars and headers, a background color is nice. But a background color that gracefully transitions from say Blue to White is even nicer. I know this can be done by making a 1-pixel wide, X-pixel tall image file containing the desired fade and repeating it across the div, but does CSS have native support to just define colors and be done with it? Can any other language handle this?

    Read the article

  • problem with setcookie

    - by Simon
    there is one think, i can't understand anyway:((( when i try to set cookie(it is on line 28 in login.php), browser returns me an error!!! Cannot modify header information - headers already sent by (output started at C:\xampp2\htdocs\video\index.php:9) in C:\xampp2\htdocs\video\login.php on line 28 but on line 9 in index php, i haven't any header!!! there is a tag!!! i cant understand it!!! can somebody tall me why it returns me such error?

    Read the article

  • can I have more than one route per action on select parameters?

    - by zsharp
    my action has two 3 parameters, but only two are called at a time. So I want to do this: People is the action, string Height, string searchHigh, sting searchLow /Groups/People/Tall/searchHigh and this /Groups/People/Short/searchLow i map both and the first route works, but the second gets appended to the first when go to the short tab.

    Read the article

  • Ruby Inserting Key, Value elements in Hash.

    - by kokogyi
    I want to add elements to my Hash lists, which can have more than one value. Here is my code. I don't know how I can solve it! class dictionary def initialize(publisher) @publisher=publisher @list=Hash.new() end def []=(key,value) @list << key unless @list.has_key?(key) @list[key] = value end end dic = Dictionary.new dic["tall"] = ["long", "word-2", "word-3"] p dic Many thanks in advance. regards, koko

    Read the article

  • function with array variable

    - by mtokoly
    How do I pass an array through a function, for example: $data = array( 'color' => 'red', 'height' => 'tall' ); something($data); function something($data) { if ($data['color'] == 'red') { // do something } } how can I get the function to recognize $data[color] and $data[height]?

    Read the article

  • jQuery plugin to wrap text around images + support IE6

    - by Alex
    This is a tall order, but is there a jQuery or Mootools (or other framework) plugin to wrap text around images and support IE6? I've tried the jQSlickWrap, but unless the browser supports HTML 5, you're out of luck. What's strange is that IE 6 supports the jQuery Background Canvas plugin, which uses the CANVAS object (via excanvas.js) just as this plugin does. Thanks.

    Read the article

  • How do I prevent ImageMagick convert from scaling images *up*?

    - by Kyle
    I'm using ImageMagick's convert tool to generate image thumbnails for a web application. I'm using notation like so: 600x600> The images are indeed scaled to 600px wide/tall (depending on the longer side) and proportions are properly maintained, however images less than 600px in either direction are scaled up — this behavior is not desired. Is there a way to prevent convert from scaling images up if the destination dimensions both exceed the original image size?

    Read the article

  • Use ImageMagick to place an image inside a larger canvas

    - by Mike
    Getting started with ImageMagic and trying to find a way to do this... If an image is less than 50 pixels tall or 50 pixels wide, I'd like to place it (un-scaled) in the horizontal/vertical center of a new 50x50 pixel canvas on top of a white background - and save that as the new image. Anyone know if this is possible with ImageMagick? Thanks!

    Read the article

  • Cork Board Solution to tack things up on top or to the side of a monitor

    - by Bela
    I'm trying to find some sort of physical product that would either go on the top or the side of an lcd monitor and give me space to tape/push-pin/post it note things for myself. In my head I am picturing an extra space above your monitor 6 inches tall that lets you tape/push pin things up in front of you. For random notes and things I want to keep track of, having them on the top/side of my monitor would keep the space on my desk itself clear, and they would be closer to my field of vision. Does something like this exist? Do I need to rig up something myself? EDIT This is the closest thing I can find so far http://www.unplggd.com/unplggd/diy-project/reverse-engineer-how-to-feel-up-your-monitor-048251

    Read the article

  • How can I set the PowerShell default window size in Windows 7?

    - by Nate
    In Windows 7, how can I set the default PowerShell window size? By default it comes up too tall for the netbook screen I am working with. I have tried the usual way of changing the size—by clicking in the upper-left corner and choosing “Properties”—but it tells me: Unable to modify the shortcut: . Check to make sure it has not been deleted or renamed. (yes, there is a dot in the middle of the error message) I also tried right-clicking on the PowerShell shortcut in the Start menu and changing properties there, however, the changes don’t seem to stick.

    Read the article

  • Real time mirroring between two sql server databases

    - by Matt Thrower
    Hi, I'm a c# programmer, not a DBA and I've had the (mis)fortune to be handed a database admin task. So please bear this in mind when answering this question. What I've been asked to do is to create a real time two-way mirror between two databases with a 10 Megabit connection between them. So when either changes it updates the other. This is not a standard data mirroring/failover task where one DB is the master and the other is a backup - both are live and each needs to instantly reflect changes made to the other. In my head this sounds like a tall order, one which may even be impossible - after all in a rapidly changing environment with lots of users this is going to be massively resource intensive and create locks and queues of jobs all over the place. Is it possible? If so, can anyone either give me some basic instructions and/or point me at some places to start my reading and research? Cheers, Matt

    Read the article

  • Using WDS to make a router act like a makeshift signal booster

    - by cornjuliox
    I've got a router that supports WDS, and I was wondering if I could use it to help extend the range of an existing wireless router? The PC I'm using right now is just barely within the signal range of a wireless router, and the signal is rather weak so I moved my wireless USB adapter away from the computer using a USB extension cord and used a pie tin + some packing tape + a stack of books and a tall wooden stand to make a sort of reflector dish. Sometime in the future I'd like other PCs to be able to connect wirelessly but with the way things are set up I can't move any farther from this spot or I lose the signal entirely. Can I use WDS to bridge the two networks together both to increase the range of the first network and allow computers connected to the 2nd router to share internet access?

    Read the article

  • Can I turn a 2D image into something like a ribbon without 3D Tools?

    - by Michael Stum
    I have a picture that's very long and not very tall. I want to create a graphic like the one below, but with my picture as the "texture". Can Photoshop do something like that? I'd like to avoid to spin up a 3D Program because then I need to render it, get the image out of it and into Photoshop. They seem to have added 3D Functionality into CS5, I just never looked at it. Obvious question after that: What would the backside look like? Are there other applications that can do something like that in a simple way?

    Read the article

  • DD-WRT: What firmware and what webserver will fit on my 8MB of flash?

    - by Jeshii
    Attempting to make a portable WiFi webserver with php support on an old WRT54GS (v1.0) with DD-WRT. I have 8MB of flash on there. I know, it's a tall order. I tried the combination of dd-wrt.v24-13064_VINT_openvpn_jffs_small.bin, optware, and lighttpd. Didn't have enough space. Now I'm going to try dd-wrt.v24-13064_VINT_mini.bin, but I'm only saving 300KB, and I don't think that is going to make the difference. Any other small http servers with php support? Heck, I didn't even got to the point where I could add php! Maybe a way to calculate the size and dependencies of packages from optware BEFORE trying to install is more what I'm looking for. Any ideas?

    Read the article

  • Encoding with FFmpeg using a FIFO

    - by Ashot Martirosyan
    Hello everyone. I'm trying to convert Flac audio file to AAC file using command line. So I wrote this ffmpeg -i input.flac temp.wav faac -q 120 -o output.m4a temp.wav It's working fine. Now I want to do the same using fifo, so I'm writing this mkfifo temp.wav ffmpeg -i input.flac temp.wav & faac -q 120 -o output.m4a temp.wav And it's freezing. So could you tall me what I'm doing wrong. Thanks a lot, and sorry for my English.

    Read the article

  • use correct-resolution background desktop image

    - by Rob Bos
    I have a desktop background image (a picture) in a half-dozen different resolutions, that I'd like to deploy to a disparate collection of computers with different monitors and video cards and whatnot. Laptops, netbooks, desktops, widescreen, and even a couple of "tall" screens. I have images to cover most of the cases. I would like Windows 7 to correctly pick the correct desktop background image via group policy. Now, the logon screen is already done. The OEMBackground method is rather clever, and lets you copy files of different resolutions to the machine, and the logon app will calculate the aspect ratio of the monitor and match it to a file as closely as possible. Is there any way to have that functionality on the desktop background as well?

    Read the article

  • dpkg behaving strangely?

    - by Tom Henderson
    When I use apt to get a package, I have been receiving the same error message. Here is an example trying to install wicd (which is already installed): Reading package lists... Building dependency tree... Reading state information... wicd is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 3 not fully installed or removed. After this operation, 0B of additional disk space will be used. Setting up tex-common (2.06) ... debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.) debconf: falling back to frontend: Readline Running mktexlsr. This may take some time... done. No packages found matching texlive-base. dpkg: error processing tex-common (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of texlive-binaries: texlive-binaries depends on tex-common (>= 2.00); however: Package tex-common is not configured yet. dpkg: error processing texlive-binaries (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of dvipng: dvipng depends on texlive-base-bin; however: Package texlive-base-bin is not installed. Package texlive-binaries which provides texlive-base-bin is not configured yet. dpkg: error processing dvipng (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: tex-common texlive-binaries dvipng E: Sub-process /usr/bin/dpkg returned an error code (1) I'm not sure if this is a problem with apt or with dpkg, but it certainly doesn't look good!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >