Skip to content

Instantly share code, notes, and snippets.

View bobetocalo's full-sized avatar

Roberto Valle bobetocalo

View GitHub Profile
@bobetocalo
bobetocalo / datatypes.md
Last active August 29, 2015 14:05
Primitive C++ Built-in Types

C++ Data Types

C++ offer the programmer a rich assortment of built-in as well as user defined data types. Following table lists down seven basic C++ data types.

Type Keyword
Boolean bool
Character char
Integer int
Floating point float
@bobetocalo
bobetocalo / doxygen.md
Last active August 29, 2015 14:05
Doxywizard is a GUI front-end for configuring and running doxygen
@bobetocalo
bobetocalo / valgrind.md
Last active August 29, 2015 14:05
Profile C++ application with Callgrind and Memcheck

Profiling the application with Valgrind

Quick course in using tools for Valgrind. These tools will analyze your program's execution and tell you what parts are running slow. The results are accurate because of the way Valgrind works and help you spot problems such as lines of code that execute too much, hot spots, memory access problems, and even CPU cache misses.

[Callgrind documentation] (http://valgrind.org/docs/manual/cl-manual.html).

Callgrind is a tool in part of the Valgrind toolchain. It is running in Valgrind framework. The principle is not the same. When you use Callgrind to profile an application, your application is transformed in an intermediate language and then ran in a virtual processor emulated by valgrind. This has a huge run-time overhead, but the precision is really good and your profiling data is complete. An application running in Callgrind can be 10 to 50 times slower than normally.

valgrind --tool=callgrind ./HelloC++
kcachegrind
@bobetocalo
bobetocalo / avconv.md
Last active October 1, 2021 07:09
Downsample video to a lower resolution

Video and audio converter

Tutorial avconv.

Very fast video and audio converter that can also grab from a live audio/video source. It can also convert between arbitrary sample rates and resize video on the fly with a high quality polyphase filter.

Example

avconv -i input.mp4 -vf "transpose=1, scale=iw/2:-1" -r 30.30 -an output.mp4
@bobetocalo
bobetocalo / opencv.md
Last active September 25, 2020 18:55
Install OpenCV

Compile OpenCV

Documentation.

Required Packages

Installed via terminal apt-get or Synaptic Manager (Linux) and terminal brew by Homebrew Science (Mac OS X).

$ brew info opencv
opencv: stable 2.4.9, HEAD
@bobetocalo
bobetocalo / tutorial.md
Created July 25, 2014 12:30
¿Qué es Markdown?

Markdown is a lightweight and easy-to-use syntax for styling all forms of writing on the GitHub platform.

It's very easy to make some words bold and other words italic with Markdown. You can even link to Google!.

Sometimes you want bullet points:

  • Start a line with a star
  • Profit!

If you want to embed images, this is how you do it: