Wei's Diary of Programming

Vue 学习笔记

Vue.js 介绍 Vue.js 也称为 Vue,读音类似 view。 Vue 有以下特点: 是一个构建用户界面的框架 是一个轻量级 MVVM(Model-View-ViewModel)框架,和 angular、react 类似 数据驱动 + 组件化的前端开发(核心思想) 通过简单的 API 实现响应式的数据绑定和组合的视图组件 更容易上手、小巧 参考:官网文档...

HTML & CSS design and build websites

Introduction This post is the note for book HTML & CSS design and build websites. Chapter 1: Structure HTML pages are text documents. HTML uses tags, which are characters that sit inside...

波多黎各六天五夜游

波多黎各 波多黎各自由邦是美国在加勒比海地区的一个自由邦(境外领土),首府为圣胡安。在西班牙语里波多黎各的意思是「富裕之港」,可惜事与愿违。 签证 波多黎各「自古以来」是美国领土不可分割的一部分,入境需要「美国签证」。这里没有从中国直飞的飞机,需要从美国本土进行转机才能到达。如果你持有美国的学生即 F1 签证,即使在已经过期的情况下,如果你仍在美国境内,也可以直接去波多黎各,因为从美国本土...

Few Tips while using Alamofire Library

What’s Alamofire? Alamofire is an HTTP networking library written in Swift. Alamofire can solve most HTTP problems while you are building Apple applications with Swift. It’s really super power...

How to convert integer into time format with Swift?

Question There is an integer represents duration time in seconds, I want to convert it into 4:34:54 and 4 Hours 34 Minutes 54 seconds format. Is there any way to solve this problem? Answer The fol...

How to shrink long text in label with Swift?

Question I want to show a long text in label, and it seems too long to fit. Is there any way to shrink those text into this label box? Answer One - Storyboard Change the label property Autoshrin...

HTTP Status Messages

What’s HTTP Status Messages? When a browser requests a service from a web server, and an error might occur. We call this error as HTTP Status Messages. This is a list of HTTP status messages. 1xx...

Using Switch statement in Swift?

What is Switch statement? According to Swift document, a switch statement is: A switch statement considers a value and compares it against several possible matching patterns. It then executes an...

Markdown Cheat Sheet

Cheat Sheet Markdown is a lightweight markup language with plain text formatting syntax, and it’s a good to write posts and articles in your blog. Just found some cheat sheets for learning. Very h...

How to define sub-cell under collectionView in Swift?

Question In a collectionView, there are many cells. I want to run different code under different cells, what should I do? Answer The answer below is using Swift 3. In collectionView, multiple cel...