Advanced Division

API / CLI

JavaScript

Include this code to use Advanced Division in your website / JavaScript project:

<script src="https://cdn.jsdelivr.net/gh/ratajs/Advanced-Division-js@1.2/AdvDiv.min.js" type="text/javascript" integrity="sha384-V0RdxveNPPBfIo4374oMkSjSkDBFh29wOCfIATs+/0CetZk8Bsr9rVZYNF3hedi8" crossorigin="anonymous"></script>

Usage: advdiv(n1, n2[, r[, rstr1, [rstr2]]])

  • n1 – First number (numerator)
  • n2 – Second number (denominator)
  • minstr – String representing the minus sign (default "-")
  • decstr – String separating the decimal digits (default ".")
  • rstr1 – String to be inserted before recursion (default "[")
  • rstr2 – String to be inserted after recursion (default "]")
See the repository.

Python

Download the AdvDiv.py file and import it with:

import AdvDiv

Usage: AdvDiv.div(n1, n2[, minstr, [decstr[, rstr1, rstr2]]])

  • n1 – First number (numerator)
  • n2 – Second number (denominator)
  • minstr – String representing the minus sign (default "-")
  • decstr – String separating the decimal digits (default ".")
  • rstr1 – String to be inserted before recursion (default "[")
  • rstr2 – String to be inserted after recursion (default "]")
See the repository.

Dart

Download the AdvDiv.dart file and import it with:

import 'AdvDiv.dart';

Usage: advdiv(String n1, String n2[, String minstr[, String decstr[, String rstr1, String rstr2]]])

  • n1 – First number (numerator)
  • n2 – Second number (denominator)
  • minstr – String representing the minus sign (default "-")
  • decstr – String separating the decimal digits (default ".")
  • rstr1 – String to be inserted before recursion (default "[")
  • rstr2 – String to be inserted after recursion (default "]")
See the repository.

C

Download the AdvDiv.c file and import it.

Usage: char *advdiv(char *n1, char *n2, char minch, char decch, char rch1, char rch2)

  • n1 – First number (numerator)
  • n2 – Second number (denominator)
  • minch – Character representing the minus sign (default '-')
  • decch – Character separating the decimal digits (default '.')
  • rch1 – Character to be inserted before recursion (default '[')
  • rch2 – Character to be inserted after recursion (default ']')
An empty string is returned if an error occurs. The returned string is always allocated with malloc, don’t forget to free it.
See the repository.

CLI

You can use the C or Dart compiled binaries (from GitHub releases). It is also possible to use the Python script that way (e. g. python3 AdvDiv.py n1 n2). You can move the file to /bin/ or another directory specified in the PATH environment variable on Linux to use it anywhere.

Usage: advdiv n1 n2 [minstr [decstr [rstr1 [rstr2]]]]

  • n1 – First number (numerator)
  • n2 – Second number (denominator)
  • minstr – String (character) representing the minus sign (default "-")
  • decstr – String (character) separating the decimal digits (default ".")
  • rstr1 – String (character) to be inserted before recursion (default "[")
  • rstr2 – String (character) to be inserted after recursion (default "]" or "" when rstr1 is specified)

Only the first characters (8-bit) are used from the last four arguments when using the C binary.

GUI

Kirigami

Kirigami is a framework by KDE, which is based on Qt. This version looks best when used in a Qt‐based environment, like KDE Plasma or LXQt. It is available for Linux as a Flatpak bundle, a Deb package or an archive with an installation script.

Installation instructions for Linux (Flatpak):

  • Flatpak is a universal package distribution system for Linux, this method should work on most desktop Linux systems
  • Download the Advanced-Division-Kirigami-Linux.flatpak file
  • Open terminal (often can be done with Ctrl+Alt+T)
  • Navigate to the directory, where the downloaded file is, e. g. by entering cd ~/Downloads/ and pressing enter
  • Enter flatpak install Advanced-Division-Kirigami-Linux.flatpak and hit enter
  • If it doesn’t work, make sure you have Flathub repository enabled by entering flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo and trying the previous command again
  • You can uninstall the application with flatpak remove cz.ratajs.advdiv
Installation instructions for Linux (Deb package):
  • You can install the program with a deb package if you use Debian‐based OS, like Ubuntu, Pop!_OS, Linux Mint, elementary OS or KDE neon
  • Download the Advanced-Division-Kirigami-Linux.deb file
  • Enter sudo dpkg -i Advanced-Division-Kirigami-Linux.deb and hit enter
  • You can uninstall the package with sudo dpkg -r advdiv
Installation instructions for Linux (archive with installation script):
  • You can use this method if neither of the previous worked for you or you don’t have a Debian‐based OS and don’t want to use Flatpak, but there could be problems with KDE dependencies (if you use KDE apps or Plasma desktop, you will likely have all the required packages installed)
  • Download the Advanced-Division-Kirigami-Linux.tar.gz
  • Decompress the archive
  • Open terminal (often can be done with Ctrl+Alt+T)
  • Navigate to the decompressed folder, e. g. by entering cd ~/Downloads/AdvDiv-Kirigami and pressing enter
  • Enter chmod +x install.sh, hit enter and then ./install.sh and press enter again
  • Enter your root password if prompted
  • The app should be installed in a short time
  • To uninstall the app, run the uninstall.sh file the same way as install.sh
  • You can replace install.sh with install-noroot.sh and uninstall.sh with uninstall-noroot.sh to install / uninstall the app only for the current user (doesn’t require root priviliges)
See the repository.

screenshot

Flutter

Flutter is a cross‐platform framework by Google. This version Advanced Division is available for Android, Linux and Windows.

Installation instructions for Android:

  • Download the Advanced-Division-Flutter-Android.apk file to your Android device
  • Try opening the file, allow installing apps from this source if prompted, more info here
  • Once opened, click install
  • After the process ended, the app should be installed
  • You can uninstall it like other applications
Installation instructions for Linux (Flatpak):
  • Flatpak is a universal package distribution system for Linux, this method should work on most desktop Linux systems
  • Download the Advanced-Division-Flutter-Linux.flatpak file
  • Open terminal (often can be done with Ctrl+Alt+T)
  • Navigate to the directory, where the downloaded file is, e. g. by entering cd ~/Downloads/ and pressing enter
  • Enter flatpak install Advanced-Division-Flutter-Linux.flatpak and hit enter
  • If it doesn’t work, make sure you have Flathub repository enabled by entering flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo and trying the previous command again
  • You can uninstall the application with flatpak remove cz.ratajs.advdiv-flutter
Installation instructions for Linux (Deb package):
  • You can install the program with a deb package if you use Debian‐based OS, like Ubuntu, Pop!_OS, Linux Mint, elementary OS or KDE neon
  • Download the Advanced-Division-Flutter-Linux.deb file
  • Enter sudo dpkg -i Advanced-Division-Flutter-Linux.deb and hit enter
  • You can uninstall the package with sudo dpkg -r advdiv-flutter
Installation instructions for Linux (archive with installation script):
  • You can use this method if neither of the previous worked for you or you don’t have a Debian‐based OS and don’t want to use Flatpak, but there could be problems with KDE dependencies (if you use KDE apps or Plasma desktop, you will likely have all the required packages installed)
  • Download the Advanced-Division-Flutter-Linux.tar.gz
  • Decompress the archive
  • Open terminal (often can be done with Ctrl+Alt+T)
  • Navigate to the decompressed folder, e. g. by entering cd ~/Downloads/AdvDiv-Flutter and pressing enter
  • Enter chmod +x install.sh, hit enter and then ./install.sh and press enter again
  • Enter your root password if prompted
  • The app should be installed in a short time
  • To uninstall the app, run the uninstall.sh file the same way as install.sh
  • You can replace install.sh with install-noroot.sh and uninstall.sh with uninstall-noroot.sh to install / uninstall the app only for the current user (doesn’t require root priviliges)
Installation instructions for Windows:
  • Download the Advanced-Division-Flutter-Windows.exe file
  • Follow the instructions in the wizard
  • After finishing the wizard, the app should be installed
  • The uninstaller should be in the install directory
See the repository.

screenshot screenshot

Web

This version is meant to be opened in a browser. The file is available online here and the offline version is here for you to download.

screenshot

NW.js

This version is also web‐based, but runs outside any web browser, there are versions for both Linux and Windows.

Installation instructions for Linux:

  • Download the Advanced-Division-NWjs-Linux.tar.gz file
  • Decompress the archive
  • Open terminal (often can be done with Ctrl+Alt+T)
  • Navigate to the decompressed folder, e. g. by entering cd ~/Downloads/Advanced-Division and pressing enter
  • Enter chmod +x install.sh, hit enter and then ./install.sh and press enter again
  • Enter your root password if prompted
  • The app should be installed in a while (the speed depends on your internet connection)
  • The uninstaller should be in the install directory (/var/nw-apps/Advanced-Division/uninstall.sh), you can execute it like the install script.
Installation instructions for Windows:
  • Download the Advanced-Division-NWjs-Windows.exe file
  • Follow the instructions in the wizard
  • After finishing the wizard, the app should be installed
  • The uninstaller should be in the install directory