Sunday, October 2, 2011

ADB doesn't recognize my Android Phone under Mac OS X 10.6.x

In numerous forums and even more in are posted unresolved questions regarding ADB's luck of device recognition under Mac OS X 10.6.x. After facing the same problem with my Nexus S I start experimenting.

I noticed that indeed ADB weren't listed my device with the ./adb devices command.

$ ./adb devices

Though, system was successfully listing my phone, as other services such as tethering and fastboot ( fastboot:Yes I tried Everything..!! ). Moreover, reinstalls and restarts of adb server was also a drop to space. So that made me curious regarding this as the same phone was working under Linux and Windows systems and also tethering was a succes under Mac OS X.

The answer was simple, the service of tethering that was running in my Mac was blocking ADB server to communicate with the device, so the listing was a failure. 

So in simple steps, before you plug-in your device for debugging purposes you should first unload the EasyTetherUSBEthernet service. You may achieve that by submitting this command to your terminal:

$ sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext

Then plug-in your device and then submit the known-unknow command, by first having changed your directory to the android-sdk/tools folder

$ ./adb devices

or just

$ adb devices

in case you have set the android-sdk to you environment profile. If you didn't then you should! Just under your Home directory locate the .bash_profile file and at the PATH variable add the android-sdk/tools directory.

Furthermore, in case you wish to reload the EasyTetherUSBEthernet service just submit this:

 $ sudo kextload /System/Library/Extensions/EasyTetherUSBEthernet.kext 

And in any case wanting to remove the EasyTetherUSBEthernet submit ( witch I don't Recommend)

$ sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext

$ sudo rm -rf /System/Library/Extensions/EasyTetherUSBEthernet.kext




That's all folks, I hope you enjoy it as much it helped you. :)

Thanks for reading it!


Saturday, September 10, 2011

Quantum computing with light

A switch that lets one photon alter the quantum state of another could point the way to both practical quantum computers and a quantum Internet.

 Larry Hardesty, MIT News Office - SOURCE

Quantum computers are largely theoretical devices that would exploit the weird properties of matter at extremely small scales to perform calculations, in some cases much more rapidly than conventional computers can. To date, the most promising approach to building quantum computers has been to use ions trapped in electric fields. Using photons instead would have many advantages, but it's notoriously difficult to get photons to interact: Two photons that collide in a vacuum simply pass through each other.


In Science, researchers at the Massachusetts Institute of Technology (MIT) and Harvard Universitydescribe an experiment that allows a single photon to control the quantum state of another photon. The result could have wide-ranging consequences for quantum computing and quantum communication, the quantum analog to conventional telecommunications.

A quantum particle has the odd property that it can be in "superposition," meaning it's in two different states at the same time: Fire a single photon at a barrier with two slits in it, for instance, and it will, in some sense, pass through both of them. Where the bits in an ordinary computer can represent either zero or one, a bit made from a qubit could thus represent both zero and one at the same time.

For this reason, a string of only 16 qubits could represent 64,000 different numbers simultaneously. It's because a quantum computer could, in principle, evaluate possible solutions to the same problem in parallel that quantum computing promises major increases in computational speed.

But one of the difficulties in building quantum computers is that superpositions of states can be very fragile: Any interaction with its environment can cause a subatomic particle to snap into just one of its possible states. Photons are much more resistant to outside influences than subatomic particles, but that also makes them harder to control; over the course of a computation, a quantum computer needs to repeatedly alter the states of qubits.

The MIT and Harvard researchers' new paper points toward a quantum computer that offers the best of both worlds: stability and control. Moreover, photons in superposition could carry information stored as qubits rather than as ordinary bits, opening the possibility of a quantum Internet.

Slowing light
Vladan Vuletic, the Lester Wolfe Professor of Physics at MIT; his student, Haruka Tanji-Suzuki, a member of the MIT-Harvard Center for Ultracold Atoms (CUA); Wenlan Chen, an MIT graduate student, and Renate Landig, a visiting student, both at CUA; and Jonathan Simon, a postdoc at Harvard, developed an optical switch that consists of a small cluster of cesium atoms suspended between two tiny mirrors in a vacuum cavity. "The only way to make two photons interact with one another is to use atoms as a mediator," Vuletic says. "The [first] photon changes the state of the atom, and therefore it modifies the atom’s interaction with the other photon."

When a photon enters the cavity, it begins bouncing back and forth between the mirrors, delaying its emission on the other side. If another photon has already struck the cesium atoms, then each pass through them delays this second photon even more. The delay induced by a single pass through the atoms would be imperceptible, but the mirror-lined cavity, Vuletic explains, "allows us to pass the photon many, many times through the atoms. In our case, it’s like passing the photon 40,000 times through the atoms."

When it emerges from the cavity, the second photon thus has two possible states—delayed or extra-delayed—depending on whether another photon has preceded it. With these two states, it could, in principle, represent a bit of information. And if the first photon was in some weird quantum state, where it can't be said to have struck the atoms or not, the second photon will be both extra-delayed and not extra-delayed at the same time. The cavity would thus serve as a quantum switch, the fundamental building block of a quantum computer.

Counting photons
Currently, the extra delay is not quite long enough that delayed and extra-delayed photons can be entirely distinguished, but if the researchers can increase its duration, the switch could have other uses as well. Many potential applications of quantum optics, such as quantum cryptography, quantum communication, and quantum-enhanced imaging, require photons that are emitted in definite numbers—usually one or two. But the most practical method of emitting small numbers of photons—a very weak laser—can promise only an average of one photon at a time: There might sometimes be two, or three, or none. The CUA researchers' switch could be tailored to separate photons into groups of one, two, or three and route them onto different paths.

Because the switch allows the state of one photon to determine that of another, it could also serve as an amplifier in a quantum Internet, increasing the strength of an optical signal without knocking the individual photons out of superposition. By the same token, it could serve as a probe that detects photons without knocking them out of superposition, improving the efficiency of quantum computation.


Tuesday, September 6, 2011

Why Golden Ratio Matter's Computer Science

Author: Evangelos Pappas –

Golden ratio is a mathematic constant that is often used to describe the perfect symmetry. This value is being implemented in a various ways and sciences. It is inspired by nature and so it creates the illusion of the beauty. Though it is scientific improved computer scientist has barely implement this ratio, and when its done it doesn’t follows exactly the symmetry as it should. As it follows this theory will be barely described as an implementation in a web application. At this point it should be mentioned that the pages that follows are not a tutorial rather than an article.


As a Scientist fetish I love mathematics. Maybe I'm not a Mathematician or a Physicist, though mathematics has found numerous applications in Computer Science. As mathematics are all around us as computer algorithms are also. Problems in every day life can be described in an algorithmic way resulting a more optimized way of achieving them.
Now what is the golden ratio and what does it have to do with all this science? The answer is simple. This number, which is represented by the Greek letter Phi (Φ), has inspire nature in many ways such as biology, mechanics and architecture. It basically represents the perfect symmetry in many ways. That symmetry results the beauty or as I like to call it “beauty Simplicity”, it achieves its beauty by simple generating symmetric descendants.
I have seen this number’s value applications variant from 1.61 to 1.63 though its accepted form is at ~1.618. Moreover, Golden ratio is usually messed with Fibonacci’s sequence. This sequence should be already known to most of you, though if you haven’t heard of this ( then you must be at the first year of B.Sc. of CS or a non-related-computer-scientist at all J ) then go to Wikipedia article which cover it pretty well.
 \frac{a+b}{a} = \frac{a}{b} \equiv \varphi\,.
Figure 1 This equation explains how the golden ratio is resulted by the generation of the new element which depends from its previous (from Wikipedia) 

Matters, Web
Web designing & developing maybe is one of the most fancy arcitectuall designing applications of Computer Science. Such applications that affect the most User’s Interaction and browsing. So the most critical part of these applications is the best architectuall design in order to be eye friendly and fast browsing.
I have been thinking and found that the best way to achieve somthing like that (a user & eye friendly enviroment) should mimic the nature. As nature is the most human friendly enviroment so computer applications should be.
Now, enough with the much talk! How this could be implemented. The answer is still simple. It is already implemented. Many web-site aproach this implementation at its most of its percentance without knowing it. Though there were no theory explaining it why does this happen. Watch this layout:

screen shot
Figure 2 a simple example of web page layout that follows the described theory

By viewing this schema, its obvious the size’s expansion of each element comparing it with their near elements. By assuming that the “title” element is being divided in two, the next element, the “logo” has expand its both width & height size by the Golden ration.
A great schema that describes my theory is being publish at Wikipedia :
Figure 3 a Shape representation of Fibonacci sequence. Shows aligned rectangles expanding their size according to the golden ratio 

Matters, edges
There is a trend in recent web developments that has expanded and inspires the web development community. I am referring to the edge rounding. A great example of what I am referring to is being described here:
As we, humans are used to like rounded things so in a Graphic environment in our computer we would like too. Imagining in the schema above ( figure 3 ) a string line that is drew from the corners of each rectangle then a snail shell like schema will be figured.
This new figure will follow the principles of the golden spiral or as most known as Logarithmic spiral
Figure 4 The golden Spiral
In web developing, in order to implement this in a block element we have to set its style. In order to keep the symmetry of our layout the “em” scalable unit will be used. “Em” unit generates the size of the described element according to the already set size of the inherited elements. So if we have set in our div a font size to 12px the 1em sets the size to the character to 12px.
The code that implements this rule to a block element follows:
    webkit-border-radius: 0.81em 1.61em 2.59em 4.17em; 
    -moz-border-radius: 0.81em 1.61em 2.59em 4.17em; 
    border-radius: 0.81em 1.61em 2.59em 4.17em; 

This theory should not be mentioned as radical rather than a notice to Computer Scientists. It does not prove something new or not even developed something really innovated. It just proposes a better statured layout that follows principles and theories of mathematics.
Thank you very much for your interest and reading :) .