Technology

How to create Laravel project by using Valet

Step 1: Install environment
installation for Php 7.1
brew install homebrew/php/php71
or
installation for OS X install Php 7.1
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.1

reference:
https://php-osx.liip.ch/

installation for Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install homebrew/php/php71
Update Homebrew
brew update

Composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

install Valet

composer global require laravel/valet

install laravel installer
composer global require "laravel/installer"

Step 2: Add Path to Terminal
echo $PATH
for running valet & composer installation
export PATH=/usr/local/php5/bin:$PATH
export PATH=$PATH:$HOME/.composer/vendor/bin

Step 3: Build up project
valet install
Go to folder you want, we suggest use Code (~/ is user home directory)
create a folder code under “User/”
input cd ~/code in terminal
cd ~/code
tell the plugin that you want to use code as the working path so that app.dev runs the program.
valet park
create a laravel project, naming it as “app”
laravel new app
running “app”
ping app.dev
secure the local domains by using terminal
valet secure

How to Allow Apps from Anywhere in macOS Sierra 10.12 by using Terminal

Tips for install more app for mac os. If you wanna install an app for your macbook pro or mac mini desktop even macbook air from unknown developer, you have to get access for your macbook first. Apple makes it difficult to install unknown sources for security issue. The following Instructions shows you how to get access in your “System Preferences” > “Security & Private”.

Open app download from Anywhere

input this in Terminal
1: Command+space input “Terminal” or “terminal” in Spotlight search
2: input the following code in terminal
sudo spctl --master-disable

Reset to Default Security in macOS Sierra

sudo spctl --master-enable

Show/Hide Hidden Files the Long Way
The long way to show hidden Mac OS X files is as follows:
Show:
defaults write com.apple.finder AppleShowAllFiles YES
Hide:
defaults write com.apple.finder AppleShowAllFiles NO

Mobile Statistics in Hong Kong 2017 Mid

Hi marketers & advertisers, this is Luke again! I’m gonna share some useful marketing statistics for marketers to understand local marketing of mobile users in Hong Kong. For marketing perspective, we all need an overview of mobile users in Hong Kong especially the demographics. The following data is updated for 2017 mid-year that come from Hong Kong Government’s website including OFCA (Office of the Communications Authority) and CASD (Census and Statistics Department). This statistics helps analyst to estimate overall target audiences in hong kong.

Overview
Hong Kong Population Estimates: 7,389,500*
Male: 3,392,100 (45.9)
Female: 3,997,400 (54.1%)
Mobile subscribers : 17,368,286
Mobile subscriber penetration rate: 235.5%
2.5G and 3G/4G mobile subscribers: 16,014,208

Point:
1) Mobile subscriber penetration rate reflects that users subscribes 2.3 mobile devices in average.
2) There are more than 1 million devices still using slow network (under 2.5G, ~2 MBytes).

1) There are only 4 mobile network service operators in Hong Kong:
China Mobile Hong Kong Company Limited
Hong Kong Telecommunications (HKT) Limited
Hutchison Telephone Company Limited (“3”)
SmarTone Mobile Communications Limited
Links:
http://www.ofca.gov.hk/en/consumer_focus/education_corner/guide/advice_mps/choice/index.html

*Provisional figures

Reference

Office of the Communications Authority (“OFCA”)
http://www.ofca.gov.hk/en/media_focus/data_statistics/key_stat/

Census and Statistics Department
https://www.censtatd.gov.hk/hkstat/sub/so150.jsp
https://www.censtatd.gov.hk/hkstat/sub/sp150.jsp?tableID=001&ID=0&productType=8

Bootstrap 4 Beta 正式出爐

由Twitter推特的程式員開發前端工具Bootstrap4終於發佈Beta版本。Bootstrap是一套為網頁開發而訂製的前端框架,最初由 Mark Otto 和 Jacob Thornton 製作命名為Twitter Blueprint。由於前端開發人編寫的風格因人而異,而且每次加載重覆的文檔費神失事。這班前端工程師製作了一套共享文檔,各自利用其開發前端網頁,亦便利了後端工程師的工作。簡單來說,這一套框架讓工作人員共享一套文檔,包括CSS (Cascading Style Sheets), JS(JavaScript),Ajax等文件,用來開發、傳閱、展示和匯報。程式員要需要下載一次和按時更新文件,便可離線工作,大大減少重覆加載的所耗費的資源和時間。而且線上傳閱時,透過CDN(Content delivery network)方法,數行代碼便可執行網頁,無疑方便整個項目由開發到匯報的時間。

自2015年4月宣佈發開,屈指一算已經2個年頭。

以下是這次Beta版本的撮要

  • CSS方面,正式融合Sass,棄守Less
  • 新版Grid system更具彈性。
  • 放棄IE8 & IE9 的支援 (終於放棄治療!!)
  • JS方面,整個JS插件重寫!
  • 重寫簡介文件,網站Document使用了algolia的設計 (多無關痛癢的改動) 。

Top Programming Languages in 2017 & Most Popular programme Lang

What’up internet, here is several summary of most popular programming languages ranking in 2017. Those survey were made by website with reputation TIOBE, IEEE Spectrum & redmonk and so forth.

 

1.TIOBE Index for July 2017

Frequency: Monthly.

Why TIOBE?: TIOBE is based on the number of queries in popular search engines (Google, Bing, Yahoo, Wikipedia, Amazon, YouTube, and Baidu )

  1. Java
  2. C
  3. C++
  4. Python
  5. C#
  6. PHP
  7. Visual Basic .NET
  8. JavaScript
  9. Delphi/Object Pascal
  10. Go 2.363% +2.20%
  11. Perl
  12. Swift
  13. Ruby
  14. Assembly language
  15. R
  16. Visual Basic
  17. MATLAB
  18. Objective-C
  19. Scratch
  20. PL/SQL

2.IEEE Spectrum articles by STEPHEN CASS

  1. Python
  2. C
  3. Java
  4. C++
  5. C#
  6. R
  7. JavaScript
  8. PHP
  9. GO
  10. Swift

3. Redmonk Rankings:

Frequency: 6 months

Why Redmonk?
It is based on raw lines of code in GitHub and StackOverflow language tags.
RedMonk is an industry analyst firm focused on software developers and headquartered in Portland, Maine, USA. It was founded on the premise of the increasing influence of software developers in the technology industry.

  1. JavaScript
  2. Java
  3. Python
  4. PHP
  5. C#
  6. C++
  7. CSS
  8. Ruby
  9. C
  10. Objective-C
  11. Swift
  12. Shell
  13. Scala
  14. R
  15. Go
  16. Perl
  17. TypeScript
  18. PowerShell
  19. Haskell
  20. CoffeeScript
  21. Lua
  22. Matlab

4. usersnap’s Ranking

Usersnap is an Austrian web application company based in Linz, Austria. The company is best known for its visual Bug Tracking and Feedback Tool, which is employed by web developers, web designers, and customer care managers. Wikipedia

  1. JavaScript
  2. Java
  3. Python
  4. Elixir
  5. Rust
  6. Go
  7. TypeScript
  8. PHP
  9. Ruby on Rails
  10. C#
  11. Swift

Progressive Web App

Progressive Web App (PWA) is a term used to denote web apps that uses the latest web technologies. Progressive web apps are technically regular web pages (or websites) but can appear to the user like traditional applications or (native) mobile applications. This new application type attempts to combine features offered by most modern browsers with the benefits of mobile experience.

KPCB released its Internet Trends 2017 Code Conference 凱鵬華盈發表2017年互聯網趨勢報告

The biggest capital firm in US Kleiner Perkins Caufield & Byers, KPCB released a 355-pages annual Internet trends report for 2017 yesterday at Code Conference in California.

Link>>http://www.kpcb.com/internet-trends

曾投資亞馬遜、Twitter、Google、Netscape(網景)的美國頂尖風險投資公司KPCB, (凱鵬華盈)合伙人瑪麗.米克(Mary Meeker)在加州發表了一份長達355頁的《2017年互聯網趨勢報告》。分析包括網上互動廣告、遊戲、媒體、雲端等等在內的互聯網趨勢。2016年中國的遊戲市場已超越美國,此外智能手機銷售量和互聯網滲透率的增長正在放緩。

中國互聯網用戶數目:7億(上升12%)

互聯網每日在線時間:25億小時 (上升30%),
騰訊、阿里巴巴、百度今日頭條佔據了全國77%手機用戶在線時間,超過19億小時,主要為電子商務和遊戲。
共享經濟次數佔全球67%份額

美國Google、Facebook平分廣告江山

在美國,Google和Facebook共佔據85%市場廣告增幅。2016年本年網上廣告增幅達22%,過於去年2%。
原文網址:https://kknews.cc/tech/z3kn8mg.html

http://www.kpcb.com/internet-trends

去年報告:2016年互聯網趨勢報告
Last year report: 2016-internet-trends-report

http://www.kpcb.com/blog/2016-internet-trends-report

 

什麼是演算法(Algorithm)

讀CS朋友告訴我,計算機科學/資訊工程有三本必修的秘笈,一般人是不會碰到的,碰到都不會翻開,大概是易筋經、葵花寶典和九陰真經吧。
那是CLRS,CSAPP和SICP。CLRS即1990年出版的演算法導論Introduction to Algorithms;CSAPP即深入理解計算機系統,在2003年才出版Computer Systems: A Programmer’s Perspective;早於1979年出版的SICP(計算機程序的構造和解釋), Structure and Interpretation of Computer Programs在網上有詳細的免費版本,但CS同鞋都不會選擇,因為那是近四十年前的著作啦(https://mitpress.mit.edu/sicp/)

CLRS代表了四位演算法的泰斗,包括Thomas H. Cormen, Charles E. Leiserson, Ronald Rivest, Clifford Stein. CLRS由四人last name合併得來,1990年初出版叫CLR。

Thomas H. Cormen寫的Introduction to Algorithms,對於門外漢,是相當深的著作,需要一定的數學基礎。
建議看之前,看一下BBC製作的節目,”The secret rules of modern living:Algorithms”。那麼Algorithm究竟是什麼呢?
據Thomas Cormen所說,演算法是一個定義清楚明確的計算過程,它可以輸入一些數值,從而輸出一些結果,而這個計算的步驟,就是演算法。Thomas Cormen提出了三個重要概念,非常重要,第一個是這個計算過程的法則,必定有有限的,它不能無限運作。第2個是精確,“specification must provide a precise description”;第3個是「有效」Efficiency的。這個有機會再用例子說明。

另外要介紹一下麻省的MIT 6.006(Fall 2011)課程,那是2011年的課程,介紹了什麼是sorting,頂點之類的數學概念,非常有趣,我第一次看的時候,花了近一個小時加速去看,我在想,的究竟看了些什麼!!?然後花了非常長的時間才明白一點點,學習斜坡是非常陡峭的。

用Laravel認識前端與後端,極速煉成程序猿 part 2

這篇文章是為Laravel 5.4 From Scratch注腳的。上回提到Laravel的著名教學網站laracasts。他們現在已經推出了收費計劃,但筆者認為未有購買的必要。Laravel 5 Fundamentals系列已經足夠新手讀者學習一段。

因為現在Laravel 5 還在不斷推陳出新,所以Laravel 5 Fundamentals影片中的畫面會有些許不同,但整體上的操作十分穩定。Laracasts推出了新系列的教程:Laravel from scratch 2017但建議遇上任何問題,先看看舊版Laravel 5 Fundamentals,舊版的解譯比較細緻。

第1話Meet Composer是介紹Laravel安裝前期的需要軟體,包括Composer。
第2話Basic Routing and Views是解譯處理分頁的應用。
第3話Laravel Valet is Your Best Friend
仍然是安裝在電腦的路徑教學、如何運行伺服器,是該作者的使用習慣
第4話Database Setup and Sequel Pro
是使用mysql的方法和Mac版的數據處理的軟體Sequel Pro
第5話Pass Data to Your Views
第6話Working With the Query Builder

Back
Copy link
Add to
Email
Facebook
Whatsapp
Gmail
More
Save
Like
Cancel