Richard Trump

iOS 11 Hello World Example

This article takes an iOS 11 application as an example to show developers how to create projects using Xcode 10. It also shows some functions of the iOS simulator and interface builder. 1. Create iOS Project. All the files for an iOS application are saved under a Xcode project. Project can help user to manage …

iOS 11 Hello World Example Read More »

iOS Autolayout Introduction

How did you set up UI layout in older iOS application development? Write a lot of coordinate calculation code? To ensure a perfect UI effect on both the 3.5-inch and 4.0-inch screens, you sometimes have to write different coordinate calculations for each screen? But now with iOS autolayout function, things change to better.

Python Immutable Objects

For mutable objects, such as a list, to operate on a list, the contents within the list will change, for example. >>> l = [‘f’, ‘e’, ‘d’] >>> l.sort() >>> ; [‘d’, ‘e’, ‘f’] What about immutable objects, like string. >>> str = ‘hello’ >>> str.replace(‘h’, ‘F’) ‘Fello’ >>> str ‘hello’ Even though the string …

Python Immutable Objects Read More »

Python Dict And Set Example

1. Python Dict Introduction. Python has a built-in dictionary: dict. It is also called map in other coding languages, using key-value storage, it has an extremely fast lookup speed. For example, suppose you want to find the corresponding score according to the student’s name. If you use list, you need two lists. names = [‘Tom’, …

Python Dict And Set Example Read More »

Python List And Tuple Example

1. Python List One of Python’s built-in data types is list. A list is an ordered collection of elements that can be added and removed at any time. Below is an example of python list. The variable employees is a list. You can use the len() function to get the number of list elements >>> …

Python List And Tuple Example Read More »