Blog

Apple Mac Keyboard Shortcuts and Symbols

Hi there,

How many times have you looked at the Apple menu or some instructions and wondered what the keyboard symbols mean?

I have been using Apple products for about 20 years now and still wonder what the little option symbol relates to on the keyboard.

Here is a quick-reference that hopefully will assist some people.

 

Symbol Key on Keyboard
  Command   (or Cmd)
Like the Control key on Windows/PC.
  Option   (like Alt on Windows/PC)
  Shift

How to create a react-navigation StackNavigator

In a web browser, you can link to different pages using an anchor (<a>) tag. When the user clicks on a link, the URL is pushed to the browser history stack. When the user presses the back button, the browser pops the item from the top of the history stack, so the active page is now the previously visited page. React Native doesn’t have a built-in idea of a global history stack like a web browser does — this is where React Navigation enters the story.

React Navigation’s StackNavigator provides a way for your app to transition between screens and manage navigation history. If your app uses only one StackNavigator then it is conceptually similar to how a web browser handles navigation state – your app pushes and pops items from the navigation stack as users interact with it, and this results in the user seeing different screens. A key difference between how this works in a web browser and in React Navigation is that React Navigation’s StackNavigator provides the gestures and animations that you would expect on Android and iOS when navigating between routes in the stack.

All we need to get started using React Navigation is a StackNavigator.

 

Creating a StackNavigator

StackNavigator is a function that returns a React component. It takes a route configuration object and, optionally, an options object (we omit this below, for now). Because the StackNavigator function returns a React component, we can export it directly from App.jsto be used as our App’s root component.

 

// In App.js in a new project 
import React from 'react'; 
import { View, Text } from 'react-native'; 
import { StackNavigator } from 'react-navigation'; 
class HomeScreen extends React.Component { 
  render() { 
    return ( 
      <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> 
        <Text>Home Screen</Text> 
      </View> 
    ); 
} } 

export default createStackNavigator({ 
  Home: { 
    screen: HomeScreen, 
  }, 
});

If you run this code, you will see a screen with an empty navigation bar and a grey content area containing your HomeScreen component. The styles you see for the navigation bar and the content area are the default configuration for a StackNavigator.

 

 

How to prepare a strong thesis conclusion and avoid arguments

Something to consider when preparing your next thesis.

We all know that there are those who just love to pick it to pieces, usually for no reason whatsoever, so here is a simple trick which will aid you in presenting a strong conclusion and ensuring you get your point across.

How to present a strong thesis conclusion - Andre DiCioccio
How to present a strong thesis conclusion – Andre DiCioccio

Apple Launches New 9.7-Inch iPad With Apple Pencil Support

Apple has today launched a brand new 9.7 inch iPad which also includes support for the Apple Pencil.

This great new iPad includes a A10 Fusion chip with 64-bit desktop-class architecture, which is 40 percent faster in CPU and 50 percent faster in graphics   compared to the previous generation 9.7-inch iPad.

Apple also has said that both front and rear cameras provide HD video recording for everything from document scanning to FaceTime calls.

Genetic Privacy – Too late to protect our future?

This is a thesis which I wrote back in 1999, towards my honours degree in Laws at Monash University.  With the recent Facebook Cambridge Analytica scandel, it is interesting to read how much privacy views have changed in 2018.

Monash University Library – Direct Link

 

ECMA Script Block Scoped Declarations

ECMA Script 6 has introduced the ability to use const and let instead of var to declare local variables.

The main benefit of this is that const and let are scoped to the block level (meaning their scope is confined to a blocked deliminated with curly brackets).

A further benefit of this new syntax is that any variables which are declared using the const keyword can only be assigned a value once and are effectively constants therefore.  If you attempt to assign a new value to one of these constants, the compiler will throw an error.  You should note of course that if you assign an object to a const, then the usual reference rules apply – meaning you can modify the contents of the object – just not the actual reference to the object itself.

USING const and let: 
const a = 1
let b = 'foo'

// Not allowed!
// a = 2

// Ok!
b = 'bar'

if (true) {
 const a = 3
}
How the output is compiled using Babel:
var a = 1;
var b = 'foo';

// Not allowed!
// a = 2

// Ok!
b = 'bar';

if (true) {
 var _a = 3;
}

This demonstrates how the Babel compiler tranforms the const declaration to a standard var declaration.  It is actually the Babel compiler which enforces the correct usage and block scoping, rather than the actual browser JavaScript engine.