Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

advertising

related pastes to tag 'encode'

2051145 - budi encode decode
preview unavailable
1994111 - php json encode with javascript : php javascript json function encode
  1. // PHP 4 >= 4.0.1, PHP 5
  2. public static function json_encode($array)
  3. {
  4.     return preg_replace_callback(
  5.         '/(?<=:)"function\((?:(?!}").)*}"/',
  6.         create_function('$string', "return str_replace('\\\\\"','\\\"',substr(\$string[0],1,-1));"),
  7.         json_encode($array)
  8.     );
  9.  
994262 - De/Encode - EcKstasy encode eckstasy decode
preview unavailable
994260 - Encoder Decoder Script - EcKsta encode eckstasy decode
preview unavailable
909682 - extract_audio.rb: mplayer ruby audio lame encode
  1. #!/usr/bin/env ruby
  2. #
  3. # Simple script to extract the audio part of a video
  4. # and encode it to mp3.
  5. # Depends on 'mplayer' and 'lame'
  6.  
  7. STDOUT.sync = true
  8.  
  9.  
856155 - extract_audio.rb: mplayer ruby audio lame encode
  1. #!/usr/bin/env ruby
  2.  
  3. STDOUT.sync = true
  4.  
  5. name = ARGV[0]
  6.  
  7. abort("usage: #{$0} filename") if name.nil?
  8. abort("a file name 'audiodump.wav' already exist") if File.exist? 'audiodump.wav'
  9.  
821255 - Python bencode/decode: bittorrent encode bencode
  1. def encode(arg):
  2.     ''' Given that we're converting between variable formats,
  3.         manual typechecking seems excusable here '''
  4.     return {
  5.         int : lambda x: 'i%ie' % x,
  6.         str : lambda x: '%i:%s' % (len(x), x),
  7.         list : lambda x: 'l%se' % ''.join(map(encode, arg)),
  8.         dict : lambda x: 'd%se' % ''.join(''.join(map(encode, i)) for i in arg.items())
  9.  
819134 - Python bencode/decode: bittorrent encode bencode
  1. def encode(arg):
  2.     ''' Given that we're converting between variable formats,
  3.         manual typechecking seems excusable here '''
  4.     return {
  5.         int : lambda x: 'i%ie' % x,
  6.         str : lambda x: '%i:%s' % (len(x), x),
  7.         list : lambda x: 'l%se' % ''.join(map(encode, arg)),
  8.         dict : lambda x: 'd%se' % ''.join(''.join(map(encode, i)) for i in arg.items())
  9.  
fantasy-obligation
fantasy-obligation