A streaming programming mode may be implemented on user command in a phase change memory. The cover has a number of through holes corresponding to the passageways and is capable of slidably moveable relative to the base. Whether the device is performing a predetermined function to provide a first determination result and whether the object is in contact with the device based on the detection results to provide a second determination result are then determined. The collected portions are then combined to generate a stretched pulse whose width is proportional to the width of the base pulse. Finally, the system compensates for input signal noise in the received input signal using the updated threshold signal value. The optical blocking material of the masked area remains non-transparent to disable the optical device until a second application of energy at a retail location.