32 bits version
$ wget https://get.popcorntime.sh/build/Popcorn-Time-0.3.10-Linux-32.tar.xz -O popcorntime.tar.xz64 bits version
| {-# LANGUAGE OverloadedStrings #-} | |
| module Main where | |
| import Network.Wai (pathInfo, Request, requestMethod, Response, responseLBS, ResponseReceived) | |
| import Network.Wai.Handler.Warp (run) | |
| import Network.HTTP.Types (status200, status401) | |
| -- note: type Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived | |
| application :: Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived |
Most of what's written in this article is deliberately biased and wrong. It is yet another in the stream of Scala-hating posts that people. I analyze the article below:
TIOBE index is a metric based on search engine ranking policies and can be intentionally or unintentionally gamed.
https://blog.timbunce.org/2009/05/17/tiobe-index-is-being-gamed/
On these rankings, Scala is quite high:
| // See this blog post for full explanation: | |
| // https://rebootjeff.github.io/blog/2015/12/11/example-refactoring-to-functional-js-combine-keyed-lists/ | |
| // Dependencies | |
| var _ = require('lodash'); | |
| var R = require('ramda'); | |
| // Example input | |
| var usersBySocialNetwork = { | |
| twitter: [ |
| var Chart = (function(window,d3) { | |
| var svg, data, x, y, xAxis, yAxis, dim, chartWrapper, line, path, margin = {}, width, height, locator; | |
| var breakPoint = 768; | |
| d3.csv('data.csv', init); //load data, then initialize chart | |
| //called once the data is loaded | |
| function init(csv) { |
| // Functional | |
| var log = function(tag,val) { console.log(tag, val); return val; } | |
| var isLightBackground = function(color) { | |
| // 765 - max distance | |
| log("color:",color); | |
| return log("result:", log("distance:", xcolor.distance(color, 'white')) < (765/2)); | |
| }; |
| /** | |
| * Primary application logic for our Functional Programming blog example | |
| * See related blog series at: http://www.datchley.name/tag/functional-programming/ | |
| * Version: 2.0 | |
| */ | |
| // A simple, resuable comparison for '>=' | |
| function greaterThanOrEqual(a, b) { | |
| return a >= b | |
| } |
| var request = require("request"), | |
| cheerio = require("cheerio"), | |
| url = "https://www.google.com/search?q=data+mining", | |
| corpus = {}, | |
| totalResults = 0, | |
| resultsDownloaded = 0; | |
| function callback () { | |
| resultsDownloaded++; |
| #!/usr/bin/env node | |
| var program = require('commander'); | |
| var request = require('request'); | |
| var chalk = require('chalk'); | |
| program | |
| .version('0.0.1') | |
| .usage('[options] <keywords>') | |
| .option('-o, --owner [name]', 'Filter by the repositories owner') |
| // Bouncing a user back to their last place after authentication with Express 3 | |
| // To accompany http://stackoverflow.com/a/12443844/1380669 | |
| // by therealplato | |
| var express = require('express'); | |
| var app = express(); | |
| require('http').createServer(app).listen(3000 | |
| , function(err){ | |
| console.log(err || "Listening on 3000"); | |
| }); |