Your websites are all made up of inline and block elements. The Complete Web Developer Course tutorials show you how to use these elements, though this post talks about some of the differences between the types of element, and where you would use each type.
An element is defined in HTML tags. A paragraph is a HTML element that is opened with a
<p> tag, and closed by a
Emphasised text is defined by the
</em> tags surrounding the text to be emphasised (typically in italics).
<em> elements are text elements, there is one key difference between them.
Paragraph elements are block elements, whereas emphasis elements are inline elements.
In this post, I’ll be looking at three of the most common element types you’ll need to use, where to use them, plus a few bonus types.
While updating my iOS Developer Course to Xcode 7, I’ve found that when opening Xcode 6 apps in Xcode 7, even when going through the upgrader, I’m left with the error ‘linker command failed with exit code 1‘.
Fortunately, there is an easy fix. Just go to the project settings (click on the File Structure icon and then the app name, and then the Tests target), click Build Settings and then scroll down until you see Test Host (or type ‘host’ in the search box).
Then clear the contents of both the Debug and Release hosts, circled below. The app should then compile without any issues.
Hope that helps!
Continuing with the iOS8 and Swift tutorials I’m at a level where I can make practical use of some of the knowledge I’ve acquired from these iOS 8 and Swift video tutorials. Lecture 45 provides a task to create an app to display the times table of a number selected from a slider bar. The thing to remember about all programming is good practice to avoid any errors and to be able to interpret errors to create a solution. Sometimes, though it is just the logic that needs to be evaluated if something isn’t behaving as expected.
Building up to this we learn about tables in Swift and how to display items in a table from an array of items. Rob filled his array with members of his family and out put them to each row. I filled my array with the names of my siblings. Unfortunately, when the app ran the display wasn’t what I wanted. The intention was to have each name on each row.
Luckily, this was not too difficult to fix. With a lot of programming languages certain characters are reserved and needs to be escaped if it is intended to be included in a string but not with Swift.
My array declaration had the commas within double quotes. So Swift treated the contents as a single string item for one array element. A simple mistake but something to bear in mind.
Another novice mistake involves the error message “Array index out of range” which occurs when you try to refer to an array element which doesn’t exist. So if your array has nine elements (not counting 0!) and you refer to the tenth e.g. array then Swift won’t be happy with it.
Attention to detail is key. The less simple mistakes you make, the more time you save with debugging. – Tak
FTP is a venerable old method to upload your work to web servers. It stands for File Transfer Protocol, and nearly every web host in the world supports it.
In the Complete Web Developer Course, Rob has an FTP tutorial chapter that shows you one way of using FTP with the Firefox browser and the FireFTP add-on to easily update your site files.
Things don’t always go according to plan however. Here are five of the most common issues students have when connecting to their free Eco Web Hosting packages with FTP, and how to resolve them.
As coding gets more involved it is very important to get into good practice which will save you a lot of time from finding out what went wrong. I myself spent many hours going through code line by line with some basic school boy errors. In my last blog I wrote about how Swift as a forgiving language. This week I found there were a few things it was not so forgiving about.
In the third app Is it Prime a lot of the back end code is done in Playgrounds and most of my frustrations were from there.
Statement cannot begin with a closure expression
“Statement cannot begin with a closure expression”. What?! When I get a problem I do what most people do. I use Google! But putting this error message into Google wasn’t too helpful, there were many results but nothing very helpful.
The second most frustrating problem I had was “Prefix/postfix ‘=’ is reserved”, again I thought I could Google the answer, again Google came up short but this problem was quicker to fix.
In most programming languages such condition would be valid but in Swift having an exclamation mark at the end of a variable name means you want to unwrap it (telling Xcode the variable definitely has a valid value). So while I had “if number!=2 &&…” it should have been “if number !=2 &&…” all from missing a space! Such simple mistakes which causes such long delays.
In Rob’s iOS and Swift video tutorials he encourages you to pause the video, have a go and come back to see how his solution. So although he may take 7 or 8 minutes in a video lecture and you maybe spending an hour or 2. I can assure you that this is not out of the ordinary. And it is part if the learning process. And remember, if you get stuck the forums are available!
Keep coding! – Tak.