原创 微信瀏覽器自帶的返回上一頁的停留位置

我們做過微信的應該都知道,微信自帶的返回上一頁,就是重新打開頁面。並不是返回歷史頁面。我們PC端的瀏覽器是返回歷史頁面。點擊返回頁面之後 上一個頁面的scrollTop還是之前沒有進入新頁面的位置。 解決辦法:利用sessionS

原创 Power of Two

Given an integer, write a function to determine if it is a power of two. class Solution { public: bool isPowerOfTwo

原创 Longest Palindromic Substring 最長迴文

Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, an

原创 Ugly Number

Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factor

原创 Implement Queue using Stacks

Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue.pop() -- Rem

原创 nginx與apache的區別

nginx 相對 apache 的優點: 輕量級,同樣起web 服務,比apache 佔用更少的內存及資源抗併發,nginx 處理請求是異步非阻塞的,而apache 則是阻塞型的,在高併發下nginx 能保持低資源低消耗高性能高度模塊化的