This is a simple autoupdating angular directive to show sparklines in html. Changes on data will auto reflect in GUI.
Requires angularjs and highcharts or highstock.
Usage in html
<span hc-sparkline="data"></span>
in controller
| #!/usr/bin/env instantfpc | |
| uses | |
| sysutils; | |
| var | |
| entrada: String; | |
| begin | |
| /* | |
| License: GNU GPLv2 | |
| Authors: Julián Perelli | |
| Organization: Sistemas Operativos Avanzados 2015 - UTN FRLP | |
| Compile with: gcc primos.c -o primos | |
| Run with: ./primos | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <errno.h> |
| /* | |
| License: GNU GPLv2 | |
| Authors: Julián Perelli | |
| with ideas from http://people.sc.fsu.edu/~jburkardt/c_src/mpi/mpi.html | |
| Organization: Sistemas Operativos Avanzados 2015 - UTN FRLP | |
| Compile with: mpicc primos_mpi.c -o primos_mpi | |
| Run with: mpirun -n 4 ./primos_mpi 100 | |
| */ | |
| #include "mpi.h" |
| // modified from https://gist.github.com/pjsvis/6210002 | |
| // Requires jQuery from http://jquery.com/ | |
| // and jQuerySparklines from http://omnipotent.net/jquery.sparkline | |
| // AngularJS directives for jquery sparkline | |
| angular.module('sparkline', []); | |
| angular.module('sparkline') | |
| .directive('jqSparkline', [function () { |
This is a simple autoupdating angular directive to show sparklines in html. Changes on data will auto reflect in GUI.
Requires angularjs and highcharts or highstock.
Usage in html
<span hc-sparkline="data"></span>
in controller
| #!/bin/sh | |
| if [ "$(id -u)" != "0" ]; then | |
| echo "You must run this script as root." | |
| exit 1 | |
| fi | |
| getaddr1 () { | |
| hostname -I | tr " " "\n" | grep 192.168.100; | |
| } |
| """ | |
| Some table has two Date fields: expiredate and SALexpiredate | |
| Both fields can be null | |
| when SALexpiredate is not null, overrides expiredate | |
| when ordering: | |
| if SALexpiredate is not null, that field needs to be used | |
| otherwise fallback to use expiredate | |
| """ | |
| from django.db.models import DateField, Case, When, F |