Posts

Showing posts from September, 2019

Algorithm Selection Lab

Background This lab is to help understanding software optimize. As technique developing, the contents a software can be represented are rich. We use more high quality images, audios and videos. High quality means more space need, less battery usage. The mission is to find the balance between them.
Example: Basic Sound Program aarchie server vol.h

#define SAMPLES 5000000

vol1.c

// Function to scale a sound sample using a volume_factor
// in the range of 0.00 to 1.00.
static inline int16_t scale_sample(int16_t sample, float volume_factor) {
        return (int16_t) (volume_factor * (float) sample);
}

int main() {

        // Allocate memory for large in and out arrays
        int16_t*        data;
        data = (int16_t*) calloc(SAMPLES, sizeof(int16_t));

        int             x;
        int             ttl = 0;

        // Seed the pseudo-random number generator
        srand(1);

        // Fill the array with random data
        for (x = 0; x < SAMPLES; x++) {
                data[x] = (rand()%…

Getting Ready for Hacktoberfest

My Hacktober Plan (may update later)Review Vue.jsWrite a mini program use uni-app (the mini program is about generating arithmetic problem randomly)Figure out if there is any issue or any feature should be improve during use it Three issue I may focus on https://github.com/dcloudio/uni-app/issues/829
https://github.com/dcloudio/uni-app/issues/820
https://github.com/dcloudio/uni-app/issues/812

these three issues are about image, video and css style can not show properly, I pick them as a start. They seems like easy to fixed :)

Hacktoberfest is introduced by my professor. The Open Source Development  bring me to a new world about learning and contributing.

First Contribute to Open Source

Image