Skip to content

Instantly share code, notes, and snippets.

View wanghuabing's full-sized avatar
🎯
Focusing

Allen Wang wanghuabing

🎯
Focusing
  • Hangzhou
View GitHub Profile
@wanghuabing
wanghuabing / CompressYUYV2JPEG.cpp
Created May 25, 2018 08:39 — forked from royshil/CompressYUYV2JPEG.cpp
Example of converting a YUYV buffer to JPEG using libJPEG
#include <iostream>
#include <fstream>
#include <vector>
#include <cstdint>
#include <memory>
#include <jpeglib.h>
using namespace std;
@branflake2267
branflake2267 / main.dart
Last active June 8, 2020 14:36
Flutter - Upgrading to Dart 2, JSON & Casting
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active April 8, 2024 01:15
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@royshil
royshil / CompressYUYV2JPEG.cpp
Created January 14, 2016 20:29
Example of converting a YUYV buffer to JPEG using libJPEG
#include <iostream>
#include <fstream>
#include <vector>
#include <cstdint>
#include <memory>
#include <jpeglib.h>
using namespace std;
package com.example.components;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.text.Html;
import android.view.View;