ID Number Breakdown

ID Number Breakdown

The first six digits (YYMMDD) are based on your date of birth
23 January 1988 would be written as : 88 01 23

The next four digits (SSSS) are used to define your gender
females are assigned numbers in the range 0000-4999
males are assigned numbers in the range 5000-9999

The next digit (C) shows if you are an
SA citizen – 0 – or a permanent resident – 1

The next digit (A) was used until the late 1980s to indicate a person’s race. This has been eliminated and old ID numbers were reissued to remove this.

The last digit (Z) is a checksum digit – used to check that the number sequence is accurate using the Luhn algorithm.


Animated Labels Styling

.animated-label.active .animated-label-input input[data-input], .animated-label.active .animated-label-input input[data-input]:empty {
    color: initial;
}

.animated-label-input input[data-input], .animated-label-input input[data-input]:empty {
    color: transparent;
}

Limit User Role to their own posts in WordPress Admin

WPBeginner

function posts_for_current_author($query) {
    global $pagenow;
 
    if( 'edit.php' != $pagenow || !$query->is_admin )
        return $query;
 
    if( !current_user_can( 'edit_others_posts' ) ) {
        global $user_ID;
        $query->set('author', $user_ID );
    }
    return $query;
}
add_filter('pre_get_posts', 'posts_for_current_author');

The post title says it all…
Note: If you cut down admin privileges for user roles as well you can use the admin section for front end posting. Just remember you need to include admin styles differently when its for the admin section. You need a script for the functions.php file.

WordPress Child Theme Code

  • Create these files first
    • functions.php
    • style.css
    • style-mobile.css
    • script.js
for functions.php
<?php
  function my_theme_enqueue_styles() {
    $parent_style = '../Divi';
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );

    wp_enqueue_style( 'child-styles', get_stylesheet_directory_uri() . '/style.css');
    wp_enqueue_style( 'child-style-mobile', get_stylesheet_directory_uri() . '/style-mobile.css');

    wp_enqueue_script('child-scripts', get_template_directory_uri() . '/script.js' );
  }
add_action("wp_enqueue_scripts","my_theme_enqueue_styles");
?>

for script.js

jQuery(document).ready(function( $ ) {
  console.log('Ready!');
}

for style.css

/*
Theme Name: Divi Child
Description: A dev site
Author: Garth Baker
Template: Divi
*/

for style-mobile.css

@media only screen and (max-width:600px) {
  /*--------------------------------*/
}

Install Nemo File Manager on Ubuntu

Install Nemo File Manager On Ubuntu 17.04 Systems

Install Nemo on Ubuntu

To install Nemo in Ubuntu Systems, run the following command to add the Nemo WebUpd8 PPA:

sudo add-apt-repository ppa:webupd8team/nemo
sudo apt-get update
sudo apt-get install nemo nemo-fileroller

Please note that if you already have an older Nemo version installed, upgrade to the latest Nemo version, Run the following command to do so:

sudo apt-get update
sudo apt-get upgrade
killall nemo

Once installed, open the Nemo file manager from the Ubuntu Dash or menu. Please note that you won’t see Nemo icon, but if you search for “Nemo”, the “Files” option shows up. Click on it to open Nemo.

Adding a search filter to Outsystems

In the example below a local variable was created for orders WebScreen called “searchfilter” which was set as the Search inputs Variable.

There was an Orders Entity and a Customers Entity.

The text below is an aggregate filter checking for all the orders with customer names like the text input into the search box. Remember the “searchfilter” was set as a local variable for the Orders Entity.

Customer.Name like "%" + SearchFilter + "%"

Also because the Orders Entity and the Customers Entity were separate Entities a source was added for the Customers to link the tables so the customer Entity could be found.

The aggregate that had these setting was the “GetOrders” aggregate which was used in the Orders WebScreen preparation.