C++ rant

Please consider the following standard C++ program.

#include <iostream>
using namespace std;
main(){
  cout << "Hello, World!";
  return 0;
}

What is wrong with this?

  1.  include statement: we are including a header or a piece of source code, why isn’t it called iostream.h?
  2. using namespace std: if standard, it could be omitted and considered standard because it has not been mentioned.
  3. main function: why there are no parameters in it
  4. return statement: do we assume the function has been defined as int….

Ideal version, in my opinion…. but opinions are subjective

#include <iostream.h>

int main(int argc, char *argv[], char *env[]){
  cout << "Hello, World!";
  return 0;
}

 

Hotspot detection

How to set-up hotspot.

Firefox URL: http://detectportal.firefox.com/success.txt

Google Chrome URL: connectivitycheck.gstatic.com/generate_204

Edge URL:

Internet Explorer URL:

Opera URL:

Chomium URL: chrome.google.com

Dolphin URL:

Observium disk full

If your graphs are showing with ‘graph error’ and your disk is almost full, please follow the instructions below.

Add extra disk to your VM or to your machine and type following commands with root privileges.

# display disk name
fdisk -l

# create partition
fdisk /dev/sdb

# type n enter enter enter enter w enter
# means new partition, default values accept, and write out changes

# extend physical volume group
vgs
vgextend observium-vg /dev/sdb1

# extend size in volume group and resize file system
lvextend -L +19G /dev/mapper/observium--vg-root
resize2fs /dev/mapper/observium--vg-root

# check everything is ok
df -k

# now regenerate graphs that were missing
cd /opt/observium
php discovery.php -h all
php poller.php -h all

Above assumes you are adding a second disk of 20 GB. sdb and +19G might need to change if your configuration is different.

Site moved

This site has moved, please update all your links from http://www.internetcontact.be/scm to http://scm.internetcontact.be.