- Download the installer from the page https://golang.org/dl/ and install the package.
Type go in terminal, to verify the installation.
- Create a Go workspace and set GO PATH
Type go in terminal, to verify the installation.
| # using 'benchmark-ips' gem | |
| # gem install benchmark-ips | |
| require 'benchmark/ips' | |
| require 'active_support/core_ext/string' | |
| properties = { text: '123' } | |
| n = 10_000_000 | |
| Benchmark.ips do |x| | |
| x.report('try') { n.times { properties[:text].try(:html_safe) } } |
| $("button").click(function() { | |
| $('html,body').animate({ | |
| scrollTop: $(".second").offset().top}, | |
| 'slow'); | |
| }); |
| var DefaultBuilder = require("truffle-default-builder"); | |
| module.exports = { | |
| build: new DefaultBuilder({ | |
| "index.html": "index.html", | |
| "app.js": [], | |
| "app.css": [], | |
| "images/": "" | |
| }), | |
| networks: { | |
| development: { |
| <!doctype html> | |
| <html class="no-js" lang=""> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge"> | |
| <title>Boilerplate</title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> |
| # -*- coding: utf-8 -*- | |
| import scrapy | |
| import os.path | |
| class DomainSpider(scrapy.Spider): | |
| name = "domain" | |
| allowed_domains = ["www.domain.com"] | |
| max_num_of_page = 2 | |
| link = 'http://www.domain.com' | |
| start_urls = [] |
| import scrapy | |
| import os.path | |
| class EmailSpider(scrapy.Spider): | |
| name = "test" | |
| allowed_domains = ["test.com"] | |
| start_urls = ['test.com/1', 'test.com/2'] | |
| # the spider will crawl according to the 'start_urls' available | |
| def parse(self, response): |