Other articles


  1. Mixed encoding content converter

    標題可能下的含糊不清,意義不明,且讓我娓娓道來

    昨天,我用youtube-dl從酷我音樂上載了林俊傑的江南下來。載下來的檔案是ape格式,我還是第一次看到,用VLC開一堆error,所以我就用mpv聽:

    $ mpv 江南-93157.ape
    Playing: 江南-93157.ape
     (+) Audio --aid=1 (ape)
    File tags:
     Artist: ÁÖ¿¡½Ü
     Album: ½­ÄÏ
     Genre: R&B
     Title: ½­ÄÏ
     Track: 2
    AO: [pulse] 44100Hz stereo 2ch s16 …
    read more
  2. Placement new

    For advanced C++ programmers, placement new is nothing special. It can initialize a pre-allocated memory block. However, placement new is more than what you think. It accpets an arbitrary number of arguments of arbitrary types.

    See the following code snippet:

    #include <iostream>
    #include <string>
    #include <vector>
    
    void* operator new(size_t …
    read more

social