hardware

Creating a virtual monitor (the display device)

懵懂的女人 提交于 2019-12-03 16:01:06
I raised a question here but realized I was going the wrong direction. I need to create a virtual monitor (really just the space in memory) that is large enough to fit a website, that would normally span several screens. Is this possible in any language? I tried Java, but failed miserably so far. I don't expect this to be easy, any pointers would appreciated. I'd imagine the OS and the video cart would have to told in somehow that there's a third monitor. Use any Virtualization tool (VirtualBox, VMWare, etc). Create a Windows (XP/newer) virtual machine, and you can attach any number (well, at

Howto get hardware information in Linux using C++

♀尐吖头ヾ 提交于 2019-12-03 12:40:53
I need to get specifications of hard disk on both Win and *nix machines. I used <hdreg.h> on Linux like this: static struct hd_driveid hd; int device; if ((device = open("/dev/sda", O_RDONLY | O_NONBLOCK)) < 0) { cerr << "ERROR: Cannot open device /dev/sda \n"; exit(1); } if (!ioctl(device, HDIO_GET_IDENTITY, &hd)) { cout << hd.model << endl; cout << hd.serial_no << endl; cout << hd.heads << endl; } I need hd_driveid to tell me some more information about disk. I want to know: Number of partitions Specifications of each partition (format, label, flags, size, start point, number of tracks etc.)

What tools can I use to determine the hardware requirements of my application?

混江龙づ霸主 提交于 2019-12-03 12:37:43
For regular readers: The saga™ continues... My app runs fine on my development machine - which was purchased (5 years ago) as a fairly good gaming rig. As such, it's 64bit, has a 2.2GHz clock-speed and has 2GB of memory. The machines at work however, are standard Dell issue office computers and really struggle to even start my app, let alone run it. ( Explanation... I can imagine people screaming at me: "What on earth are you doing to require a spec like that?" Well, I'm doing a lot of real time image analysis and audio generation. So there. ) Our team has the budget to buy a dedicated laptop

Why INC and ADD 1 have different performances? [duplicate]

非 Y 不嫁゛ 提交于 2019-12-03 11:29:11
This question already has answers here : INC instruction vs ADD 1: Does it matter? (2 answers) I've read many times over the years that you should do XOR ax, ax because it is faster... or when programming in C use counter++ or counter+=1 because they would INC or ADD... Or that in the Netburst Pentium 4 the INC was slower than ADD 1 so the compiler had to be warned that your target was a Netburst so it would translate all var++ to ADD 1... My question is: Why INC and ADD have different performances? Why for example INC was claimed to be slower on Netburst while faster than ADD in other

Get manufacturer name in android device

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 09:47:46
I need to check that android device's manufacturer is dell or not. But I haven't dell device, so cant get actually name of manufacture of device(for dell). I'm using android.os.Build.MANUFACTURER; Does anyone know that what is the value returned for the above query in case of a dell device? Zimbabao Here is the wikipedia link about Android devices and MANUFACTURER strings. EDIT: That Wikipedia page has been deleted. Here is a PDF list from Google Play which lists all supported devices and their manufacturers. Try this: String deviceName = android.os.Build.MODEL; 来源: https://stackoverflow.com

What's the difference/relationship between AVR and Arduino?

送分小仙女□ 提交于 2019-12-03 09:46:39
I've been interested in hardware programming recently, but I have not started yet. I did some searching working, and have a vague idea: Arduino is a combination of both chip and breadboard. AVR is a single chip, and need to buy a breadboard to get started. Is that statement true or false? kersny AVR is just an integrated circuit microchip, made by Atmel. It looks something like this: Although they can be used by themselves, it takes a bit of hardware experience and some support components. The Arduino is an AVR processor running special code that lets you use the Arduino environment to program

Can I read the CPU performance counters from a user-mode program in Windows?

对着背影说爱祢 提交于 2019-12-03 09:40:52
问题 I would like to program and read the hardware performance counters offered on all recent x86 hardware. On Linux there are the various perf_events systems to do this (and the perf utility to do it from outside an unmodified program). Is there any such built-in facility in Windows? If no built-in facility exists, the second best would be another approach perhaps using third-party code, but that doesn't require me to get a driver signed. 回答1: Short answer No, there's no built-in facility in

What happens from the moment we press a key on the keyboard, until it appears in your word document [closed]

对着背影说爱祢 提交于 2019-12-03 09:17:22
问题 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 7 years ago . This question was in my job interview.. I just to see whether I gave all the details... 回答1: mechanical switch short-circuits pull up R1 resistor end to the ground a special multiplexor translates it into a message, to reduce the number of wires the message interpreted by a CPU embedded in the keyboard message

Can Intel PT (Processor Trace) be disabled/configured from within an OS?

假装没事ソ 提交于 2019-12-03 08:50:40
I have a number of questions about Intel PT (have been trying to decode the manual but is very difficult). My questions are: I am trying to find out if Intel PT can be disabled or reconfigured from within an OS, or, more generally, from within the system it is providing a trace of. Does Intel PT generate events on writes to specific registers - such as CR3, IDTR, etc Can Intel PT write values back to the system - i.e. can an external debugging machine actively perform writes to register, cache or memory? Any help is much appreciated, thankyou!! I'm also currently figuring out how to use Intel

Direct memory access DMA - how does it work?

假如想象 提交于 2019-12-03 07:14:24
问题 I read that if DMA is available, then processor can route long read or write requests of disk blocks to the DMA and concentrate on other work. But, DMA to memory data/control channel is busy during this transfer. What else can processor do during this time? 回答1: First of all, DMA (per se) is almost entirely obsolete. As originally defined, DMA controllers depended on the fact that the bus had separate lines to assert for memory read/write, and I/O read/write. The DMA controller took advantage