Posts

Databases: SQL and NoSQL

Image
  By   McDonald, T.    | Date 20th of November 2020 What is a database? A database can be anything that stores collection of information and is often abbreviated to DB. A relational database stores information that is related in some way. For example, a shopping list is a relational database since it is a list of related information. Other examples include: Phone book. List of twitter users. Your families favourite foods. Now you have an idea of what a database is we can talk about where to store it. In the examples above, the phone book is a list of numbers and related information that can be stored in a book. The shopping list is stored on paper. We can also store these databases on a computer. Notably, the computer can be in your office or be a dedicated computer in a server room or even stored in a virtual machine in the cloud, which uses dedicated computers. Keeping it simple for now we can just think of a computer hosting the database. Now we have a place to store the d

Dynamic Tables in JavaScript

Image
  Problem I need a table that will expand and decrease in size as new items are added and or deleted. Restaurants Must be in JavaScript Solution HTML You will need to make a place holder in the html file using the table tags and give it an id <table id="myTable"></table> JavaScript Creating a button var btn = document.createElement("INPUT"); btn.setAttribute("type", "button"); btn.setAttribute("value", "x"); btn.setAttribute("onclick", "aFunction(this)"); Remember you will have to navigate using dot notation to where the aFunction(this) is if it is contained within an object or accessed by going through an object. Creating the table var table = document.getElementById("myTable"); var row = table.insertRow(-1); // -1 will add new rows to the bottom. var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); var cell3 = row.insertCell(2); var

Objects, Dot and Bracket notation in JavaScript

Image
By McDonald, T.   | Date 14th of August 2020 If you want to be a coder, you will need to know about objects and how to interact with them. Have you been watching teach yourself videos and reading teach yourself blogs? Are you feeling a little bit lost with the jargon? I will show you that the jargon around objects in JavaScript is not as confusing as it first sounds. What is an object? An object can be thought of as a thing that can be represented in the real world such as a car or a shop. The car has attributes sometimes called properties, for example colour or model, and protocols sometimes called methods such as peddles or stirring wheel. The attributes describe the characteristic of the car while the protocols are how to interact with the car. You can have many objects and they can all have a different state. First let’s look at the structure of the object. Object creation: objectName = {}; The above creates an empty object. objectName = { objProperty_1 : “va

How to find the best WI-FI for MacOS X Catalina

Image
If you have any of the following problems when browsing or trying to watch something via the internet, it could be interference from other Wi-Fi connections from say your neighbour. Symptoms Wi-Fi dropping out Difficulty watching a live stream Slow internet surfing  slow buffering on video  Open Wireless Diagnostics Hold down the option key and click on the Wi-Fi icon in the bar across the top. Now select the ‘Open Wireless Diagnostics’ option.  Ignore the window that pops up and go straight for the menu bar at the top > window then select scan from the drop-down menu. In the window, you will see a panel with some stats and the best channel for you. Make a note of the channel and close the wireless diagnostics tool. Open your HomeHub device’s webpage Open your browser and enter the address of your HomeHub or router (If you don’t know the address you can use the IP address. You find it by opening System Preferences > network then copy the IP address ne

Don't stand so close to me please!

Image
Right from the start of the coronavirus pandemic, we have seen many countries introducing social distancing measures and the UK, naturally, followed suit not long after. Ever since then, complaints from people saying some are not sticking to the rules have been numerous. In response, the supermarkets have limited the number of people in the shops and have asked people to respect the two-meter exclusion zone around others in the shop; however, not everyone is doing this. Consequently, the lack of cooperation from some members of the public has caused some others to feel anxious. Now there is a desire to speak out at people at the time of the indiscretion, but this is not a good idea. Speaking out at people that violate your two-meter personal space exposes them to risk of infection, it exposes you to risk of infection and may expose others to the same risk. Speaking out at people at the time of the indiscretion is not a good idea because it may put that person at risk from infe

3 great things to do during in lockdown

Image
By McDonald, T.   |  Date 1st of April 2020   We have been in lockdown in the UK for about 2 weeks. Some people have lost their jobs and many others have their jobs on hold until this is over. Since the UK Government has said this could go on for up to two years, I feel it would be a good idea to share interesting things to do to pass the time. 1.  Education sites Use the extra time you have on your hands to improve your knowledge of any subject that you like. There are many sites that offer free education. Here are a few: The Open University’s OpenLearn This is a great university and has many free short courses that can help you improve your knowledge in many different subjects.  Khan academy This is something special because it covers so much and is lots of fun to use and is great for all ages. I recommend the Maths and computing sections, but you will be able to find loads more including Physics, Chemistry and Biology. BBC Bitesize  This site is great for