hardware

How does a segmentation fault work internally (kernel/hardware)?

这一生的挚爱 提交于 2019-11-30 12:04:56
问题 Broadly speaking, I am wondering how the kernel (or the CPU) knows that a process has tried to access a memory location for which it lacks permission, and how the mysterious piece of hardware called MMU helps in doing that. In particular: It seems to me that the MMU is agnostic towards the memory management model of the OS kernel (paging, memory zones, process adress spaces...) (I would presume that Linux and Windows pages are not exactly the same, for example. Correct me if I'm wrong). But

What hardware limits plotting speed in R?

无人久伴 提交于 2019-11-30 11:51:26
I would like to increase the speed of plotting, and I am happy with (and have lots of code requiring) the R graphics and ggplot packages - so I am only interested in knowing how I can configure my system to speed up plotting. Specifically: Is the speed of plotting in R limited by the processor, memory, graphics card? Are there particular hardware components or configurations would increase plotting speed? Update: Answers to questions in comments: specs: Ubuntu 11.04, intel Core Duo, 8GB ram, but I am more generally interested in wether the graphical computation or the graphical rendering is

How to write data to a graphics card without using BIOS?

☆樱花仙子☆ 提交于 2019-11-30 11:39:30
I want to make an (extremely simple) operating system. I am currently learning about graphics cards. This is what I know so far (please correct me if I am wrong): A graphics card has two modes: a text mode, and a graphics mode. You can write data to a graphics cards using BIOS (instead of accessing the graphics card directly). What I want to do is to write directly to the graphics card's video memory without using BIOS (because I want to understand how things work). So I have the following questions: How do I know what is the base address of the video memory of the graphics card, is this done

How to do TDD with hardware

前提是你 提交于 2019-11-30 11:06:28
问题 All the projects I work interface to a piece of hardware and this is often the main purpose of the software. Are there any effective ways I can apply TDD to the code that works with the hardware? Update: Sorry for not being clearer with my question. The hardware I use is a frame grabber that capture images from a camera. I then process these images, display them and save them to disk. I can simulate all the processing that takes place after the images are captured by using previously captured

Universal application

跟風遠走 提交于 2019-11-30 10:32:49
How to make universal app for iphone and ipad. How we detect the device whether it is for iPhone or iPad? in Xcode 3 select your target in Xcode, right-click and use the “Upgrade Current Target for iPad…” command. in Xcode 4 click on the project and go to the target. In Summary tab, change Device to Universal. I used UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad for detecting iPad. The easiest way would be using UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad and UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone . Personnally, I used this method in my appdelegate + (BOOL)isPad

Programming with hardware in python [closed]

别来无恙 提交于 2019-11-30 10:27:09
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I am starting to get a bit bored of programming little toys that I have been making recently, and I would love to starting programming

Update list of usb devices

牧云@^-^@ 提交于 2019-11-30 10:11:59
I want create module which update list of usb devices automatically (not only mass storage). Now it works very rude - it has additional thread, which after 1 second update list of devices. But maybe you know how to handle some plug event, which generate OS (for example windows XP and above) or another way how to simplify this process. Thank you for your time! MrGomez This question appears to be half design, half implementation. It seems you're most concerned about finding some way for Java USB services like jUSB to service hotplug events from the system, allowing you to have an event called

What's the coolest hack you've seen or done? [closed]

巧了我就是萌 提交于 2019-11-30 10:03:28
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . As programmers, we've all put together a really cool program or pieced together some hardware in an interesting way to solve a problem

How to read from Serial port in a webpage

China☆狼群 提交于 2019-11-30 08:45:33
问题 I want to design a webform that user should fill some fields. The value of one field should be read from Serial port (COM1) of client computer which a special hardware is connected to it and the user presses the Send to PC key of the hardware when filling the form. How i can listen to COM1 port in my webpage and get the value of COM1 and place it in the web form automatically? I heard that ActiveX controls can do this but it is compatible only with IE (right?). The other option is Java

What is the easiest way in C# to check if hard disk is SSD without writing any file on hard disk?

纵然是瞬间 提交于 2019-11-30 08:43:32
I need to check in C# if a hard disk is SSD (Solid-state drive), no seek penalty? I used: ManagementClass driveClass = new ManagementClass("Win32_DiskDrive"); ManagementObjectCollection drives = driveClass.GetInstances(); But its only gives Strings that contain SSD in the properties, I can't depend on that? I Need a direct way to check that? WMI will not be able to determine this easily. There is a solution here that's based on the same algorithm Windows 7 uses to determine if a disk is SSD (more on the algorithm here: Windows 7 Enhancements for Solid-State Drives , page 8 and also here: