hardware

Multiple keyboards and low-level hooks

我与影子孤独终老i 提交于 2019-12-28 05:29:06
问题 I have a system where I have multiple keyboards and really need to know which keyboard the key stroke is coming from. To explain the set up: I have a normal PC and USB keyboard I have an external VGA screen with some hard-keys The hard keys are mapped as a standard USB keyboard, sending a limited number of key-codes (F1, F2, Return, + and -) I have a low-level hook (in C# but actually calling upon Win32 functionality) which is able to deal with the input even when my application is not

Get a unique computer ID in Python on windows and linux

岁酱吖の 提交于 2019-12-27 21:05:04
问题 I'd like to get an id unique to a computer with Python on Windows and Linux. It could be the CPU ID, the motherboard serial, ... or anything else. I looked at several modules (pycpuid, psi, ...) without luck. Any idea on how to do that? 回答1: How about using the MAC address as unique id? The discussion here Obtain MAC Address from Devices using Python shows how to obtain the MAC address 回答2: There seems to be no direct "python" way of doing this. On modern PC hardware, there usually is an UUID

what is a store buffer?

╄→гoц情女王★ 提交于 2019-12-27 19:11:37
问题 can anyone explain what is load buffer and how it's different from invalidation queues. and also difference between store buffers and write combining buffers? The paper by Paul E Mckenny http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2010.07.23a.pdf explains very nicely about the store buffers and invalidation queues but unfortunately doesn't talk about write combining buffers 回答1: An invalidate queue is more like a store buffer, but it's part of the memory system, not the CPU.

what is a store buffer?

会有一股神秘感。 提交于 2019-12-27 19:11:09
问题 can anyone explain what is load buffer and how it's different from invalidation queues. and also difference between store buffers and write combining buffers? The paper by Paul E Mckenny http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2010.07.23a.pdf explains very nicely about the store buffers and invalidation queues but unfortunately doesn't talk about write combining buffers 回答1: An invalidate queue is more like a store buffer, but it's part of the memory system, not the CPU.

Java use JNA call dll error:Invalid memory access

落花浮王杯 提交于 2019-12-25 12:22:25
问题 I want to call dll to write/read from hardware.However, I get the error below: dll method: int NewKey(char *room,char *gate,char *stime,char *guestname,char *guestid, int overflag, int Breakfast, long *cardno,char * track1,char * track2); java method: int NewKey(String room, String gate,String time,String guestname,String guestid, int overflag, int Breakfast, NativeLongByReference cardno, String track1, String track2); The api document shows cardno as a out parameter and track1,track2 could

Java use JNA call dll error:Invalid memory access

时光总嘲笑我的痴心妄想 提交于 2019-12-25 12:22:12
问题 I want to call dll to write/read from hardware.However, I get the error below: dll method: int NewKey(char *room,char *gate,char *stime,char *guestname,char *guestid, int overflag, int Breakfast, long *cardno,char * track1,char * track2); java method: int NewKey(String room, String gate,String time,String guestname,String guestid, int overflag, int Breakfast, NativeLongByReference cardno, String track1, String track2); The api document shows cardno as a out parameter and track1,track2 could

How is /proc/io* populated?

六月ゝ 毕业季﹏ 提交于 2019-12-25 10:02:10
问题 So if I understand things correctly, cat /proc/iomem lists the memory addresses that are mapped to this and that device register and similarily for ioports . If you pick up some book on Linux device drivers, it will state something about iomem being populated by the driver calling request_region() or something like that. But how does the device driver know where the hardware register is located at from the get-go? For example, rtc0 seems to occupy 0070:0071 for most people - how does Linux

(When) Does hardware, especially the CPU(s), deliver wrong results?

℡╲_俬逩灬. 提交于 2019-12-25 04:39:13
问题 What I'm talking about is: Is it possible that under certain circumstances the CPU "buggs" and suddenly responses 1+1=2 ? In which parts of the computer can that happen (HDD, RAM, Mainboard)? What could be the causes? Bad quality? Overheating? Does that even happen? When yes, how frequently? If everything is okay with the CPU (not a single fault in production, good temperature), can that still happen sometimes? What would be the results of, let's say one to three wrong computations? This is

How can I retrieve a hard disk's unique ID using Java+JNI on Linux, Windows and Mac

久未见 提交于 2019-12-25 04:35:17
问题 How can I retrieve a hard disk's unique ID using Java+JNI on Linux, Windows and Mac? 回答1: You could use Java+JNA (https://github.com/twall/jna/), but then you'd have to figure out how to gather that information by using native libraries on each of the platforms you'd like to support. The benefit is that you wouldn't have to compile any C/C++ code for each of the platforms. If you decide to go with that option someone else might be able to tell you how to figure out the harddisk IDs on the

How to apply an effect on screen image in Windows on the fly?

痴心易碎 提交于 2019-12-25 01:29:42
问题 I'm developing a Windows application that needs to apply an effect on screen image. More specifically, I need to do the following: grab a screen image, apply a gaussian blur on it, and display it on the screen. Something similar to f.lux, only in my case the effect applied is different. Since I'm new in Windows development, I'd like to know what is the recommended way to do it? What libraries/frameworks should I use? Can you point to some code samples of similar applications? Thanks! 来源: