(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| HashSet<String> set = new HashSet<String>() | |
| set.add("a") | |
| set.add("b") | |
| set.add("c") | |
| Collections.unmodifiableSet(set) | |
| 1+1 | |
| int x = 1+1 | |
| System.out.println(x) | |
| Thread.sleep(2000) | |
| /vars |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| <? | |
| ///////////////////// | |
| // slack2html | |
| // by @levelsio | |
| ///////////////////// | |
| // | |
| ///////////////////// | |
| // WHAT DOES THIS DO? | |
| ///////////////////// | |
| // |
| # MIT License | |
| # Copyright (c) 2016 Chandler Abraham | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
| """Script to download free O'Reilly ebooks.""" | |
| import asyncio | |
| import os | |
| import re | |
| import sys | |
| import aiohttp | |
| filename_matcher = re.compile(r'http://www.oreilly.com/(.*)/free/(.*).csp') | |
| session = None |
| # only start this service after the httpd user process has started | |
| #start on syno.network.ready | |
| start on runlevel 2 | |
| # stop the service gracefully if the runlevel changes to 'reboot' | |
| stop on runlevel [06] | |
| # run the scripts as the 'admin' user. Running as root (the default) is a bad idea. | |
| setuid admin |
This flow uses http nodes and web sockets nodes to serve up a simple web page with a chat application that colours messages depending on whether they are positive or negative according to the sentiment node.
Copy the flow, and import it from the clipboard using Node-RED on FRED.
Change the URL ws://fred.sensetecnic.com/public/guides/receive and ws://fred.sensetecnic.com/public/guides/publish, replacing guides with your FRED user name.
Change the same URL to get it working on a 'stock' Node-RED install, or check it out on the Node-RED flows library - flows.nodered.org.
| Choose archetype: | |
| 1: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-jsf-jpa (Archetype for web applications (JSF + JPA) using Demoiselle Framework) | |
| 2: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-minimal (Basic archetype for generic applications using Demoiselle Framework) | |
| 3: remote -> co.ntier:spring-mvc-archetype (An extremely simple Spring MVC archetype, configured with NO XML.) | |
| 4: remote -> com.agilejava.docbkx:docbkx-quickstart-archetype (-) | |
| 5: remote -> com.alibaba.citrus.sample:archetype-webx-quickstart (-) | |
| 6: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin.embed-simple-archetype (-) | |
| 7: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin7.embed-simple-archetype (-) | |
| 8: remote -> com.cedarsoft.open.archetype:multi (-) | |
| 9: remote -> com.cedarsoft.open.archetype:simple (-) |
| @SuppressWarnings("unchecked") | |
| protected T unproxy(T entity){ | |
| if (entity == null) { | |
| return null; | |
| } | |
| if (entity instanceof HibernateProxy) { | |
| try { | |
| Hibernate.initialize(entity); | |
| } catch (ObjectNotFoundException e) { |
| import Cocoa | |
| class Human:NSCopying | |
| { | |
| var name = ".." | |
| var spouse:Human? | |
| func copy() -> AnyObject! { |