hardware

Efficient way to implement LinkedIn like “How you are connected to” feature?

≯℡__Kan透↙ 提交于 2019-12-02 17:45:51
LinkedIn has this cool feature in which while visiting some user's profile, LinkedIn prompts how you are connecting to that user through the network. Assuming that the visitor and the profile owner are two nodes of a graph where the nodes represent users and edge represents friendship, a simple solution could be a bfs starting from both the nodes up to certain level and see if there are any intersections. The intersections would be the network link-nodes. Although this sounds neat, the problem is that in order to determine friends of each person, a separate DB query is needed. When the network

Why is number of bits always(?) a power of two?

不羁的心 提交于 2019-12-02 16:57:29
We have 8-bit, 16-bit, 32-bit and 64-bit hardware architectures and operating systems. But not, say, 42-bit or 69-bit ones. Why? Is it something fundamental that makes 2^n bits a better choice, or is just about compatibility with existing systems? (It's obviously convenient that a 64-bit register can hold two 32-bit pointers, or that a 32-bit data unit can hold 4 bytes.) sharptooth That's mostly a matter of tradition. It is not even always true. For example, floating-point units in processors (even contemporary ones) have 80-bits registers. And there's nothing that would force us to have 8-bit

Difference between nVidia Quadro and Geforce cards? [closed]

╄→гoц情女王★ 提交于 2019-12-02 16:08:58
I'm not a 3D or HPC guy, but I've been tasked with doing some research into those fields for a possible HPC application. Reading benchmarks, comparisons and specs between nVidia Quadro and Geforce cards, it seems that for similar generation cards: Quadro is 2x-3x the price of Geforce hardware wise, the differences are not that great in benchmarks (3ds Max, Maya and some others) Quadro cards are much better performing than Geforce ones Does anyone know what are the exact and precise technical differences that can cause such better performance? My speculation (and what can be generally read on

What's the difference between “COM”, “USB”, “Serial Port”? [closed]

允我心安 提交于 2019-12-02 15:53:19
I am confused about the these 3 concepts. My understanding is, Serial Port usually means RS-232 compatible port (RS = Recommended Standard). USB stands for Universal Serial Bus . So its name contains serial port, does it support RS-232? What does the Universal mean? And what does COM port mean? ADD 1 Some understanding from Hans' answer: To reduce effort, device manufacturers usually make their device can behave like a serial port device as well. This relies on the the fact that many OS and language libraries have already included serial port communication support. Though such support is no

How does cpu communicate with peripherals?

放肆的年华 提交于 2019-12-02 15:36:45
i assume cpu has direct access to motherboard's BIOS and RAM.(correct me if i'm wrong) But how does cpu communicate with other hardware like hdds, expansion cards, peripherals, other BIOSes etc.? I know about OS and its drivers, but they are software- they're in RAM. How does cpu communicate with all this hardware on hardware level? Isn't it limited to only motherboard's BIOS and RAM? In older architectures, peripherals were accessed via a separate mechanism to memory access with special I/O instructions. On x86, there were (and still are!) "in" and "out" instructions for transferring bytes

Can I write or modify data on an RFID tag? [closed]

六眼飞鱼酱① 提交于 2019-12-02 14:04:56
maybe my question would be lost in the forum, but has somebody work with RFID tags? I know I can read them, but can I write or modify the inside data? Does anyone know where can I find more about this? RFID Standards: 125 Khz ( low-frequency ) tags are write-once/read-many, and usually only contain a small ( permanent ) unique identification number. 13.56 Mhz ( high-frequency ) tags are usually read/write, they can typically store about 1 to 2 kilbytes of data in addition to their preset ( permanent ) unique ID number. 860-960 Mhz ( ultra-high-frequency ) tags are typically read/write and can

i want to make a web site which is able to control a hardware on a clients computer

谁说胖子不能爱 提交于 2019-12-02 10:37:14
running test on local host, the website coded with c#, is able to connect to the comm port and pass commands to the hardware just as done by hyperterminal software if this website is uploaded/hosted this will not work, as the server doesnot have this harware connected to the comm port needed. one way is to ask the hosting company to set up a special computer for me with the hardware drivers etc. not possible. defining hardware, the hardware is a remote control car. so what is the solution? You can create a Silverlight Out of Browser application which can run with elevated rights. Perhaps it is

Printing to Hard-Printer in java with 300dpi

十年热恋 提交于 2019-12-02 06:24:55
Okay, so i just started working on a program that is supossed to print out its graphics. Mine is almost identical to the copyrighted one at Oracle located here http://docs.oracle.com/javase/tutorial/2d/printing/examples/HelloWorldPrinter.java So basically I am a complete noob and have tried to figure out how to set my page to be 8.5x11in and 300dpi but to no avail :( I dont even have working code on this topic after all my failed attempts. I know it has something to do with Paper.setSize() and PrinterResolution But i cannot glean enough from the javadocs to understand these. Please help. EDIT:

How to get the volume GUID

馋奶兔 提交于 2019-12-02 03:39:42
问题 I am using win32 api with C++ . I would like to know how I can get the volume GUID using a "device path". My device looks like this: \\?\usb#vid_04f2&pid_0111#5&39fe81e&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed} Thanks. 回答1: This will be the device with device instance ID usb\VID_04f2&PID_0111\5&39fe81e&0&2 . That's probably a mass storage device aka disk. Now, the problem you have is that a mass storage device doesn't actually have a drive letter; it's the volume on that disk which has a

An application to check iPhone connection with USB

冷暖自知 提交于 2019-12-01 20:26:17
问题 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. 回答1: 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