Search Results

Search found 19796 results on 792 pages for 'bit twiddler'.

Page 285/792 | < Previous Page | 281 282 283 284 285 286 287 288 289 290 291 292  | Next Page >

  • Programming graphics and sound on PC - Total newbie questions, and lots of them!

    - by Russel
    Hello, This isn't exactly specifically a programming question (or is it?) but I was wondering: How are graphics and sound processed from code and output by the PC? My guess for graphics: There is some reserved memory space somewhere that holds exactly enough room for a frame of graphics output for your monitor. IE: 800 x 600, 24 bit color mode == 800x600x3 = ~1.4MB memory space Between each refresh, the program writes video data to this space. This action is completed before the monitor refresh. Assume a simple 2D game: the graphics data is stored in machine code as many bytes representing color values. Depending on what the program(s) being run instruct the PC, the processor reads the appropriate data and writes it to the memory space. When it is time for the monitor to refresh, it reads from each memory space byte-for-byte and activates hardware depending on those values for each color element of each pixel. All of this of course happens crazy-fast, and repeats x times a second, x being the monitor's refresh rate. I've simplified my own likely-incorrect explanation by avoiding talk of double buffering, etc Here are my questions: a) How close is the above guess (the three steps)? b) How could one incorporate graphics in pure C++ code? I assume the practical thing that everyone does is use a graphics library (SDL, OpenGL, etc), but, for example, how do these libraries accomplish what they do? Would manual inclusion of graphics in pure C++ code (say, a 2D spite) involve creating a two-dimensional array of bit values (or three dimensional to include multiple RGB values per pixel)? Is this how it would be done waaay back in the day? c) Also, continuing from above, do libraries such as SDL etc that use bitmaps actual just build the bitmap/etc files into machine code of the executable and use them as though they were build in the same matter mentioned in question b above? d) In my hypothetical step 3 above, is there any registers involved? Like, could you write some byte value to some register to output a single color of one byte on the screen? Or is it purely dedicated memory space (=RAM) + hardware interaction? e) Finally, how is all of this done for sound? (I have no idea :) )

    Read the article

  • Ruby library for manipulating existing PDF

    - by simonwh
    I'm searching for a library to edit already existing PDF's and add a watermark to each page, for example. Could also be blank every other page etc. There seem to be a few PDF libraries out there, but only very few of them can edit existing PDF's and I'm a bit lost on which way to go. Any recommendations? Thank you.

    Read the article

  • GLOBALS ARE BAAAAAAADDDD!!!!!

    - by Matt
    HOWEVER! would setting the $link to my database be one thing that I prolly should use a GLOBAL scope for? In my setting of (lots of functions)...it seems as though having only one variable that is on the global scope would be wise. I am currently using the functions to transfer it back and forth so that way I do not have it on global...but it is a bit of a hinder to my script. Please Advise, Thank you. Matt

    Read the article

  • Creating Directory on Server in ASP.NEt programatically

    - by Jayesh
    Hi, I want to programatically create a directory on the server using ASP.NET. I have done this using System.IO's Directory.CreateDirctory. however, the newly created folder is not accessible in the code. after searching a bit, I came to know that the newly create folder is not included the project and hence not accessible. Can anyone please help me out on this. Thank You

    Read the article

  • When to use a namespace or a struct?

    - by Justen
    I was just reading a little bit on them from http://www.cplusplus.com/doc/tutorial/namespaces/ and it seems like a struct is capable of the same things? Or even a class for that matter. Maybe someone here can better define what a namespace is, and how it differs from a struct/class?

    Read the article

  • How can I match string order between two documents in PERL?

    - by Randy
    Hi, I've a problem in making a PERL program for matching the words in two documents. Let's say there are documents A and B So I want to delete the words in document A that's not in the document B A: I eat pizza B: She go to the market and eat pizza result: eat pizza I use Perl for the system and the sentences in each document isn't in a big numbers so I think I won't use SQL And the program is a subproram for automatic essay grading for Indonesian Language (Bahasa) Thanx, Sorry if my question is a bit confusing. I'm really new to 'this world' :)

    Read the article

  • How do I get fine-grained undo in Vim

    - by MDCore
    I find Vim's undo to be a bit too coarse. E.g. if I type something like this: a // to go into edit mode to be or not to ve <esc> // to exit insert mode Oops! I made a typo. I want to start undoing so I press u, but then it clears the whole line. Is there a way to undo word-by-word or character-by-character?

    Read the article

  • Ruby or PHP or Php Framework?

    - by the_
    I am starting a website and am wondering if I should go with PHP, a php framework, or ruby on rails? I want to make a website fast, easiest and without a big learning curve. I already know a little bit of php and a little ruby on rails...But which would be best? OK so to clarify more on the topic of what my site will be, It's basically a Classified Ads website that needs to have a user login, ability to post classifieds, and categorizing, and basically anything else a classified website has.

    Read the article

  • Determining when scrolled to bottom of a page with Javascript

    - by chimerical
    I'm trying to determine when I've scrolled to the bottom of the page (without using any JS library), but so far, I'm a bit confused over which one of the following to use. The most promising one I've seen is window.scrollY, but even when scrolled to the bottom of the page, it never matches the value of window.innerHeight. What's the best way to do this? window.innerWidth window.innerHeight window.outerWidth window.outerHeight window.scrollX window.scrollY document.body.scrollWidth document.body.scrollHeight document.body.scrollTop document.body.scrollLeft document.body.offsetTop document.body.offsetLeft document.body.offsetWidth document.body.offsetHeight

    Read the article

  • Convert 64bit Binary to Long equivalent

    - by washtik
    How can we convert the following 64 bit binary into the long equivalent; 01111101 10100011 01001111 11111111 11111111 11111111 11111111 11000000 equals 7D A3 4F FF FF FF FF C0 HEX equals 9053167636875050944 << this is the value we want in a C# variable

    Read the article

  • Getting following exception javax.sound.sampled.LineUnavailableException: line with format ULAW 800

    - by angelina
    Dear All, I tried to play and get duration of a wave file using code below but got following exception.please resolve.I m using a wave file format. URL url = new URL("foo.wav"); Clip clip = AudioSystem.getClip(); AudioInputStream ais = AudioSystem.getAudioInputStream(url); clip.open(ais); System.out.println(clip.getMicrosecondLength()); **javax.sound.sampled.LineUnavailableException: line with format ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, not supported.**

    Read the article

  • Free iPhone weather API for the UK?

    - by user157733
    I am wanting to create a very simple weather app which only gives the current weather but in the UK. I have done a bit of searching but have yet to find a free API that I can use which works specifically for the UK. Does anyone have any experience of this or any suggestions?

    Read the article

  • Smooth scrolling and syntax highlighting in MacVim

    - by mitjak
    Is there any way to get MacVim to scroll more smoothly TextMate style? While I'm here, is there a syntax file I can edit to add syntax highlighting to files? I have Velocity .vhtml files which are largely regular HTML with a bit of VTL thrown in. If I could just add .vhtml as an extension to the HTML syntax highlighter that would already make things 10x better.

    Read the article

  • Problems with Joomla menus

    - by aarontb
    I added a new link (like I usually do) but now all but the HOME menu button DO NOT WORK...they send me to a page that says No input file specified. Can someone help me please...it's a bit of an EMERGENCY. Check it out at http://www.fishchummer.com Thanks guys, Aaron

    Read the article

  • Excel UDF calculation should return 'original' value

    - by LeChe
    Hi all, I've been struggling with a VBA problem for a while now and I'll try to explain it as thoroughly as possible. I have created a VSTO plugin with my own RTD implementation that I am calling from my Excel sheets. To avoid having to use the full-fledged RTD syntax in the cells, I have created a UDF that hides that API from the sheet. The RTD server I created can be enabled and disabled through a button in a custom Ribbon component. The behavior I want to achieve is as follows: If the server is disabled and a reference to my function is entered in a cell, I want the cell to display Disabled If the server is disabled, but the function had been entered in a cell when it was enabled (and the cell thus displays a value), I want the cell to keep displaying that value If the server is enabled, I want the cell to display Loading Sounds easy enough. Here is an example of the - non functional - code: Public Function RetrieveData(id as Long) Dim result as String // This returns either 'Disabled' or 'Loading' result = Application.Worksheet.Function.RTD("SERVERNAME", "", id) RetrieveData = result If(result = "Disabled") Then // Obviously, this recurses (and fails), so that's not an option If(Not IsEmpty(Application.Caller.Value2)) Then // So does this RetrieveData = Application.Caller.Value2 End If End If End Function The function will be called in thousands of cells, so storing the 'original' values in another data structure would be a major overhead and I would like to avoid it. Also, the RTD server does not know the values, since it also does not keep a history of it, more or less for the same reason. I was thinking that there might be some way to exit the function which would force it to not change the displayed value, but so far I have been unable to find anything like that. Any ideas on how to solve this are greatly appreciated! Thanks, Che EDIT: By popular demand, some additional info on why I want to do all this: As I said, the function will be called in thousands of cells and the RTD server needs to retrieve quite a bit of information. This can be quite hard on both network and CPU. To allow the user to decide for himself whether he wants this load on his machine, he or she can disable the updates from the server. In that case, he or she should still be able to calculate the sheets with the values currently in the fields, yet no updates are pushed into them. Once new data is required, the server can be enabled and the fields will be updated. Again, since we are talking about quite a bit of data here, I would rather not store it somewhere in the sheet. Plus, the data should be usable even if the workbook is closed and loaded again.

    Read the article

  • Error while compiling the Xcode project (IPhone)

    - by Sridhar
    Hello, I added ffmpeg iphone port into my library and I can able to use a few of its functions like avcodec_init(),.. without any errors. But when I include this function call "avcodec_register_all" Xcode is giving error after compilation The error message is : *--------------- ld: ldr 12-bit displacement out of range (4276 max +/-4096) in _CFRelease$stub in _CFRelease$stub from /Users/foxit/Documents/CameraTest/build/CameraTest.build/Debug-iphoneos/CameraTest.build/Objects-normal/armv6/CameraTest Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 *------------- Does anyone know whats wrong with this ? Regards, Raghu

    Read the article

  • Copying a field to another table in Access

    - by Jacques Tardie
    I'm a bit embarassed asking this here, but here goes: I've got two tables, which you can see here: http://img411.imageshack.us/img411/4562/query.jpg I need to copy the effortid from the one table into the other, making sure that the values still maintain the correction relationships. The primary key for each is a combination of loggerid & datetime. What's the best way to do this? Thanks in advance, and don't make fun :)

    Read the article

  • Facebook Connect Dialog Popup

    - by James
    Hello, When using the "Connect" facebook connect button, when I click it, it opens up a new popup window outside of the current window. This is quite annoying, how am I able to use the inline modal dialog that is found on most sites? I've attached a sample site to see if you can make anything out of it. http://bit.ly/c9Emi Thank you.

    Read the article

  • How to create an "endless" scrolling slideshow?

    - by Andrew
    I know a good bit of JS and I'm familiar with jQuery, and I'm trying to create an "endless" slideshow (like the one on http://thisismedium.com/), where the images scroll -- one right behind the other -- and when it reaches the end it loops. I don't really know how to start, so I was hoping someone could point me in the right direction. I created a slideshow before that automatically switched images and let you click Next and Previous, but I'm stuck here. =/.

    Read the article

  • Monitor Network Traffic Mac

    - by Tom Irving
    I'm wondering how to go about monitoring network traffic on my Mac. Like the way activity monitor does it, showing the bytes / packets in and out. I know it's a bit vague, but I'm unsure of the best place to start.

    Read the article

  • URI routing in codeigniter

    - by yaya3
    I have my CI site working well except the URL's are a bit ugly. What approach should I take to enable me to route what is displaying at: http://domain.com/content/index/6/Planning to the url: http://domain.com/Planning I'm confused about whether this should be be done in the routes file or in my .htaccess Thanks

    Read the article

< Previous Page | 281 282 283 284 285 286 287 288 289 290 291 292  | Next Page >