In January, one of my website was hacked. The symptom was when I access the website, it only show a white screen in the browser. I didn’t pay much attention on that, just restore the whole website from a early backup. However, it was just the beginning of the nightmare. After one month, all my websites were hacked on the same share hosting. Now it becomes a serious problem. And two of my websites are already marked as “Malware code injection”. Then my cleaning hacked WordPress website journey is beginning.
Read more
XIB vs Storyboard, Which Shall I Choose in iOS Project
xib is the common way to build UI in Xcode. After Xcode 5.5, Apple introduced a new concept, storyboard. The purpose is to provide a better way to make UI simple and easy to manage. If you like, you can still use xib as your default UI editor.
When you are using xib, each UIViewController will bind with a xib. But in Storyboard, all your app screens are put together. You can use graphic interface to connect them with segues. Each way has its own pros and cons.
Read more
PayPal IPN SSL Connection Error Solution
As critical security issue on SSL 3.0, PayPal will shut down their integration protocol SSL 3.0 to ensure safer transactions. The SSL 3.0 security protocol has been used for 15 years and now it’s time to be replaced. After PayPal disable SSL 3.0 protocol, all old integrations will be affected. Instead of SSL 3.0 protocol, we can use new protocol Transport Layer Security (TLS).
Read more
iOS Timer Tutorial in Swift
Timer is a very common method to perform a schedule task within a period of time. We can execute the timer once or repeatedly. In this tutorial, I will show you how to use iOS timer in Swift. Once you finish this tutorial, you will understand how to create a iOS timer in Swift and execute a task after a certain time interval.
Read more
A Free HTML5 POPUP Window Widget
These days, I am working on HTML5 project. In the project, I need to popup a window with black background mask. When I click on the mask, the popup window will dismiss. This effect is quite simple but it may take time when we want to implement it again. So I put this HTML popup widget here. You can download this HTML5 widget for free.
Demo: Click Button to Popup Window with Black Background
In this demo, I will put an anchor link. When clicking on the link, a text field will popup. When clicking on the black background, the text field will dismiss.
<a onclick="popup()">Open</a>
Import the following javascript in the html:
<script src="simplePopup.js"></script> <script> var myDiv = null; function popup() { var popupEng = new simplePopup(); if(myDiv == null) { myDiv = document.createElement("div"); myDiv.style.zIndex = "3"; myDiv.style.position = "absolute"; myDiv.innerHTML = "Click Black Background to Dismiss!"; myDiv.style.backgroundColor = "#FFFFFF"; myDiv.style.paddingTop = "5px"; myDiv.style.paddingBottom = "5px"; myDiv.style.paddingLeft = "5px"; myDiv.style.paddingRight = "5px"; } myDiv.style.display = "block"; popupEng.popup(myDiv); } </script>
Try the demo: Click to open
Download HTML5 Popup Window Widget for Free
You can download this JS library for free.