hardware

How to get the temperature of motherboard of a PC (and other hardware statistics)?

青春壹個敷衍的年華 提交于 2019-12-01 19:42:23
does any one know how to get the current motherboard, processor or HD temperature statistics? In GNU/Linux, I know I could use something like hddtemp or sensord to get the info, and then parse it... but in Windows: How can I do this? And, Can it be done with with C# or Java or any other hight level programming language? Thanks! vadimus The problem with temperature and other monitoring sensors is that there is no common protocol on the hardware level, nor drivers allowing to retrieve that information with common API. Software like already mentioned SpeedFan and HWMonitor (from the makers of CPU

An application to check iPhone connection with USB

淺唱寂寞╮ 提交于 2019-12-01 19:39:16
I want to know if an iPhone is connected to USB programmatically. So far by googling i found http://developer.apple.com/programs/mfi/ . Do I really need this api to find out whether an iPhone is connected to USB device? I just want to make an iPhone app that prints out in console whether the iPhone is connected with USB or not. Thanks much. Thuggish Nuggets You might be able to use the solution from this question. The solution detects if the device's battery is currently being charged which, if connected to USB, most likely will be unless it is a 3rd party accessory in which case there's a

How is POPCNT implemented in hardware?

做~自己de王妃 提交于 2019-12-01 18:13:58
According to http://www.agner.org/optimize/instruction_tables.pdf , the POPCNT instruction (which returns the number of set bits in a 32-bit or 64-bit register) has a throughput of 1 instruction per clock cycle on modern Intel and AMD processors. This is much faster than any software implementation which needs multiple instructions ( How to count the number of set bits in a 32-bit integer? ). How is POPCNT implemented so efficiently in hardware? rcgldr There's a patent for combined popcnt, bit scan forward / reverse: US8214414 B2 - Combined set bit count and detector logic Abstract A merged

Migration from TFS 2010 to TFS 2012

天涯浪子 提交于 2019-12-01 17:59:24
I have been searching the web for a clean solution on how to migrate our 2010 tfs collections to our new tfs 2012 server, but no luck. May someone please assist with the steps or a good blog I could look at to achieve this process. The reason we want to do a MIGRATION and not an upgrade is because we got new hardware and would first like to trial TFS 2012 before we upgrade our live environment. Therefore we would like to import all our collection including the work items and build process templates. You can move a collection at a time using the detach option in 2010 and attach it back to 2012

Branch on ?: operator?

烈酒焚心 提交于 2019-12-01 16:19:25
For a typical modern compiler on modern hardware, will the ? : operator result in a branch that affects the instruction pipeline? In other words which is faster, calling both cases to avoid a possible branch: bool testVar = someValue(); // Used later. purge(white); purge(black); or picking the one actually needed to be purged and only doing it with an operator ?: : bool testVar = someValue(); purge(testVar ? white : black); I realize you have no idea how long purge() will take, but I'm just asking a general question here about whether I would ever want to call purge() twice to avoid a possible

How to specify the hardware your software needs?

喜夏-厌秋 提交于 2019-12-01 14:15:23
That is a problem I'm facing right now. I need to specify the hardware that will run my piece of software. The thing is: the project isn't finished yet, and I need it running in "real" conditions before I can go on, conditions which I cannot reproduce at home; what I can test at home barely scratches them. We don't have much money to spend (it's a research at college). Feels like a catch-22. How can one get a good approximation of what setup is needed without having the means to simulate accurate work conditions? If you need to test your setup on a machine with less specifications then your

Maximum number of threads CPU

拈花ヽ惹草 提交于 2019-12-01 13:21:39
What does this have to do with the threads of the processor? for example, an Intel i5 has four cores and four threads. How many threads can we use in our program? for example using std :: thread (STL) in C ++? is 8 threads a big or low number of threads for a program? It really depends. As a rule of thumb, limit the number of threads to something close to the number of cores (otherwise you might have too much context switchs ). You might use std::thread::hardware_concurrency() as a hint. Often, you organize your program with a thread pool . However, what really matters is the number of active

Maximum number of threads CPU

耗尽温柔 提交于 2019-12-01 12:16:27
问题 What does this have to do with the threads of the processor? for example, an Intel i5 has four cores and four threads. How many threads can we use in our program? for example using std :: thread (STL) in C ++? is 8 threads a big or low number of threads for a program? 回答1: It really depends. As a rule of thumb, limit the number of threads to something close to the number of cores (otherwise you might have too much context switchs). You might use std::thread::hardware_concurrency() as a hint.

Simulate Fn+F11 key press

喜欢而已 提交于 2019-12-01 11:56:41
Can you tell me how I can simulate key presses Fn + F11 on a laptop? Do I have to write a driver, or something like that? The platform is Windows XP Pro SP3. Programming Language is C/C++. The purpose is create a program that allow to change enable/disable via GUI some hardware device that can turned off/on only with this hotkey. The IDE is Visual Studio 2010 Won't work. The Fn - F11 key combo on laptops isn't handled by the OS; it's processed in Systems Management Mode - a BIOS feature, essentially. Ole Dittmann I recently had to simulate F5 press to cause a refresh in a web browser: INPUT

Simulate Fn+F11 key press

送分小仙女□ 提交于 2019-12-01 11:30:44
问题 Can you tell me how I can simulate key presses Fn + F11 on a laptop? Do I have to write a driver, or something like that? The platform is Windows XP Pro SP3. Programming Language is C/C++. The purpose is create a program that allow to change enable/disable via GUI some hardware device that can turned off/on only with this hotkey. The IDE is Visual Studio 2010 回答1: Won't work. The Fn - F11 key combo on laptops isn't handled by the OS; it's processed in Systems Management Mode - a BIOS feature,