by Ossi Hanhinen, @ohanhi
with the support of Futurice 💚.
Licensed under CC BY 4.0.
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| */ | |
| 'use strict'; | |
| var React = require('react-native'); | |
| var fs = require('NativeModules').FileSystem; | |
| var { | |
| AppRegistry, |
| struct Drag { | |
| static var placeholderView: UIView! | |
| static var sourceIndexPath: NSIndexPath! | |
| } | |
| func handleLongPress(gesture: UILongPressGestureRecognizer) { | |
| let point = gesture.locationInView(tableView) | |
| let indexPath = tableView.indexPathForRowAtPoint(point) | |
| switch gesture.state { |
Hello software developers,
Please check your code to ensure you're not making one of the following mistakes related to cryptography.
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))| import Foundation | |
| // Controller that evokes its callback every minute | |
| class ClockController { | |
| private let minuteCallback: NSDate -> () | |
| init(minuteCallback: NSDate -> ()) { | |
| self.minuteCallback = minuteCallback | |
| callbackAndReschedule() | |
| } |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
Sharing code between the client and the server in a Universal Javascript application is a big gain. No more are the days of rewriting code for the server.
But moving from Javascript to Elm in the front end can feel like a move backwards. So much of the code we write is environment independent. And it would be great if we could leverage some of the front end logic on the backend.
| module Main exposing (..) | |
| {- | |
| ******************************************************************************** | |
| Copyright 2016 Zachary Kessin | |
| Released under the BSD3 licence | |
| Test your Code for better code quiality | |
| http://elm-test.com/?utm_source=gist&utm_content=template |
In your command-line run the following commands:
brew doctorbrew update