hardware

starting a microcontroller simulator/emulator

醉酒当歌 提交于 2019-11-30 15:51:48
I would like to create/start a simulator for the following microcontroller board: http://www.sparkfun.com/commerce/product_info.php?products_id=707# The firmware is written in assembly so I'm looking for some pointers on how one would go about simulating the inputs that the hardware would receive and then the simulator would respond to the outputs from the firmware. (which would also require running the firmware in the simulated environment). Any pointers on how to start? Thanks Chris Alex Fort Writing a whole emulator is going to be a real challenge. I've attempted to write an ARM emulator

How to beep using PC speaker?

江枫思渺然 提交于 2019-11-30 15:11:22
问题 I want to make a beep sound using PC speaker in C#. When using the following code: [DllImport("kernel32.dll", EntryPoint = "Beep", SetLastError = true, ExactSpelling = true)] public static extern bool Beep(uint frequency, uint duration); static void Main() { while (true) { Beep(1000, 500); Thread.Sleep(2000); } } instead of beeping through the PC speaker, it simply outputs a sound of a given frequency and duration to the default sound device (as a headset for example). The same thing happens

Programmatically get processor details from Mac OS X

青春壹個敷衍的年華 提交于 2019-11-30 15:11:12
问题 My application running on Mac OS X that needs to retrieve details about the machine it is running on to report for system information. One of the items I need is details about the processor(s) installed in the computer. My code currently works, but is far from an ideal solution, in fact I consider it a bad solution, but I have had no luck in finding a better one. The information I report currently and after some formatting looks like: Processor: Intel Core 2 Duo 2.1 GHz, Family 6 Model 23

What is actually a Queue family in Vulkan?

拜拜、爱过 提交于 2019-11-30 15:06:13
I am currently learning vulkan, right now I am just taking apart each command and inspecting the structures to try to understand what they mean. Right now I am analyzing QueueFamilies, for which I have the following code: vector<vk::QueueFamilyProperties> queue_families = device.getQueueFamilyProperties(); for(auto &q_family : queue_families) { cout << "Queue number: " + to_string(q_family.queueCount) << endl; cout << "Queue flags: " + to_string(q_family.queueFlags) << endl; } This produces this output: Queue number: 16 Queue flags: {Graphics | Compute | Transfer | SparseBinding} Queue number:

Execute automatic change connected displays in Windows 8

让人想犯罪 __ 提交于 2019-11-30 14:03:01
Short version How do I automate changing multiple display settings? NVIDIA, 3x monitors (2x DVI and 1x HDMI), GPU only supports 2 active monitors. Long version So I have a NVIDIA GeForce GTX 560 Ti which can run two displays simultaneously. It has two DVI connections and one HDMI . I often swap from using my two desktop monitors and connect only one of the desktop monitors plus my TV using HDMI . I would like to automate the change back and forward using a batch script or other program instead of using the windows control panel (Control Panel\All Control Panel Items\Display\Screen Resolution)

Programmatically get processor details from Mac OS X

倾然丶 夕夏残阳落幕 提交于 2019-11-30 13:39:54
My application running on Mac OS X that needs to retrieve details about the machine it is running on to report for system information. One of the items I need is details about the processor(s) installed in the computer. My code currently works, but is far from an ideal solution, in fact I consider it a bad solution, but I have had no luck in finding a better one. The information I report currently and after some formatting looks like: Processor: Intel Core 2 Duo 2.1 GHz, Family 6 Model 23 Stepping 6 All of the info I get is through command-line utilities called from a popen(). The readable

True (not pseudo) random number generators. What's out there? [closed]

匆匆过客 提交于 2019-11-30 13:21:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am looking for affordable solutions that generate true random numbers. I have found LavaRnd, which is a cryptographically sound random number generator. Does anybody has experience in this field and/or knows about other solutions? PS: IMHO the SO question True random number generator did not really cover this

Making use of sandy bridge's hardware true random number generator?

筅森魡賤 提交于 2019-11-30 13:07:06
I was wondering if there is a way to make use of the new hardware based true number generator found in intel's sandy bridge CPU? I read that intel's MKL (Math Kernel Library) exposes this functionality, but this requires the MKL suite and an intel complier, ending up pretty expensive. Is there another way to employ the hardware random number generator in my C++ code? For example a nice, header only library? Intel has posted a manual, library, and code examples for the rdrand instruction at http://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software

C# Creating a unique ID based on hardware ids [duplicate]

会有一股神秘感。 提交于 2019-11-30 12:48:51
问题 This question already has answers here : Is there really any way to uniquely identify any computer at all (4 answers) Closed 4 years ago . I am creating a license that is specific to a machine. The license is based on the following items: MAC Address CPU Serial Number Computer Volume Serial Number of drive0 I am assuming that if 2 of the 3 match, then my license is valid. So, the can get a new network card, and the license is still valid, etc. Is this a good approach or am I going to have

Failed to execute: 0x80070057, when decoding video via ffmpeg with dxva2

半腔热情 提交于 2019-11-30 12:12:26
I have successfully implemented a video player using ffmpeg. I am now trying to use hardware decoding but I'm facing a couple issues. I found a post that I followed as a starting point here: https://ffmpeg.org/pipermail/libav-user/2014-August/007323.html I have updated the code that setup the necessary stuff for the decoder. The updated code is available here: https://drive.google.com/file/d/0B5ufHdoDzA4ieVk5UVpxcDNzRHc/view?usp=sharing And this is how I'm using it to initialize the decoder: // Prepare the decoding context AVCodec *codec = nullptr; _codecContext = _avFormatContext->streams[