Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
- install Guzzle HTTP library :
composer require guzzlehttp/guzzle - [sign up to mailgun] (http://www.mailgun.com)
- Go to
Domainstab and click on domains - You will find the necessary data for
.envsetup- MAIL_DRIVER=mailgun
- MAIL_HOST=smtp.mailgun.org
- MAIL_PORT=587
- MAIL_USERNAME=[email protected]
- MAIL_PASSWORD=502fd951f7------------------------
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // sending to sender-client only | |
| socket.emit('message', "this is a test"); | |
| // sending to all clients, include sender | |
| io.emit('message', "this is a test"); | |
| // sending to all clients except sender | |
| socket.broadcast.emit('message', "this is a test"); | |
| // sending to all clients in 'game' room(channel) except sender |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Model:: | |
| /*Select*/ | |
| select('col1','col2') | |
| ->select(array('col1','col2')) | |
| ->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating')) | |
| ->addSelect('col3','col4') | |
| ->distinct() // distinct select | |
| /*From*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request = require("request"), | |
| cheerio = require("cheerio"), | |
| url = "https://www.google.com/search?q=data+mining", | |
| corpus = {}, | |
| totalResults = 0, | |
| resultsDownloaded = 0; | |
| function callback () { | |
| resultsDownloaded++; |
NewerOlder