Skip to content

Instantly share code, notes, and snippets.

View vibhoraggarwal's full-sized avatar

Vibhor Aggarwal vibhoraggarwal

View GitHub Profile
@vibhoraggarwal
vibhoraggarwal / gist:b18c95e309927e9537cf90c7a085f118
Created January 27, 2023 11:38
python virtual environment creation
python3.7 -m venv venv3.7
@vibhoraggarwal
vibhoraggarwal / german-income-tax-return
Created July 25, 2022 14:44
tax return in germany step by step
1. Register on Elster
2. Download the form creation application from the link: https://www.elster.de/eportal/infoseite/download_elsterformular
TODO

## On Windows

Install cmake (v3.7 or higher required):

Go to the cmake download page

Download and install cmake 3.8.0

Vector Graphics

  1. SVG(Scaled Vector Graphics) could be made using inkscape or draw.io
  2. Generating *.pdf_tex file for the resepective svg file with the following command inkscape -D -z --file=image.svg --export-pdf=image.pdf --export-latex
  3. Use the following command in *.tex file to insert the image[Source: StackExchange]
\begin{figure}
    \centering
    \captionsetup{justification=centering}
 \def\svgwidth{\columnwidth}

Citing ISO standards in latex

@techreport{ISO13586,
type = {Standard},
key = {ISO 13586:2000(E)},
month = mar,
year = {2000},
title = {{Plastics -- Determination of fracture toughness -- Linear elastic fracture mechanics ({LEFM}) approach}},
volume = {2000},
address = {Geneva, CH},

Header files (.h) are designed to provide the information that will be needed in multiple files. Things like class declarations, function prototypes, and enumerations typically go in header files. In a word, "definitions".

Code files (.cpp) are designed to provide the implementation information that only needs to be known in one file. In general, function bodies, and internal variables that should/will never be accessed by other modules, are what belong in .cpp files. In a word, "implementations".

The simplest question to ask yourself to determine what belongs where is "if I change this, will I have to change code in other files to make things compile again?" If the answer is "yes" it probably belongs in the header file; if the answer is "no" it probably belongs in the code file.

Reference :

  1. https://stackoverflow.com/questions/1945846/what-should-go-into-an-h-file

Based on Robotology Blockfactory

Features

  1. Easily wrap their algorithms inside the provided software interfaces obtaining C++ classes that can be executed by generic engines
  2. The name of the plugin library generated from the C++ code will be stored in the S-function parameters field of the block mask. We provide a generic Level-2 MEX S-Function that reads this parameter and uses the library name to dynamically load the dynamic library that contains the block's code.
@vibhoraggarwal
vibhoraggarwal / gccdowngrade.md
Last active January 14, 2020 15:11
Install a previous version of gcc for Matlab in Ubuntu 18.04

Using the information from the answer in this link: We install the gcc-5.5.0 instead of 6.3.0 because of the fix mentioned here The fix was backported to gcc-6-branch in r249957 and to gcc-5-branch in r249958. So it's included in gcc-5.5.0 and will be included in gcc-6.5.0

tar xvzf gcc-5.5.0.tar.gz
cd gcc-5.5.0/
./contrib/download_prerequisites
@vibhoraggarwal
vibhoraggarwal / s-functions-LCT.md
Last active January 5, 2022 02:36
Implementation of S-function
  • The Legacy toolbox can generate, compile and link, and create a masked block for the specified S-function.
  • Legacy Code Tool helps users create S-functions automatically from supplied specifications expressed with MATLAB code

Essential commands

General commands

legacy_code('sfcn_cmex_generate', specs) generates an S-function source file as specified by the Legacy Code Tool data structure, specs.

legacy_code('compile', specs, compilerOptions) compiles and links the S-function generated by the Legacy Code Tool based on the data structure, specs, and compiler options that you might specify. The compiler options must be supported by the mex (MATLAB) function.

@vibhoraggarwal
vibhoraggarwal / hugo-tips.md
Last active February 18, 2023 03:22
Tips collected from various hugo sessions

Exporting pdfs from Markdown slides

For example if slide is running for example/index.md:

  • Change https://vibhoraggarwal.github.io/slides/example/#/ to https://vibhoraggarwal.github.io/slides/example/?print-pdf#/
  • Use CTRL+P

Updating the website

  • Download hugo-extended v0.84.4
  • Clone academic-kickstart from the forked repository using:
$ git clone https://github.com/vibhoraggarwal/academic-kickstart.git