"The Picatinny rail (pronounced /Ã??pÃ?ÂªkÃ??tÃ?Âªni/ or /Ã??pÃ?ÂªkÃ??Ã??tÃ?Âªni/) or MIL-STD-1913 rail or STANAG 2324 rail or a "Tactical Rail" is a bracket used on some firearms in order to provide a standardized mounting platform. A similar system is the Weaver rail mount.
Its name comes from the Picatinny Arsenal in New Jersey, USA where it was originally tested and was used to distinguish it from other rail standards at the time. The rail comprises a series of ridges with a T-shaped cross-section interspersed with flat "spacing slots". Scopes are mounted either by sliding them on from one end or the other; by means of a weaver mount which is clamped to the rail with bolts, thumbscrews or levers; or onto the slots between the raised sections.
Recently, NATO nations have finalised plans for a new NATO Accessory Rail which is backwards-compatible with (and could replace) the Picatinny rail."
I'm guessing the Ka-Bar he's mounted on it turns and pops off the slot raised section in that picture. No use whatsoever for stabbing and slashing, let's be honest, but at a push I guess he could fire and then reach quickly for the knife for close combat.
That's all pie in the sky theory however and probably fails miserably when fine motor skills come in to play and you're trying to remove a knife from a barrel quickly enough to stab someone in the chest before you get your shotty taken from you. Better off just shooting them =P