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
| import java.util.function.Function; | |
| import java.util.stream.IntStream; | |
| public class FizzBuzz { | |
| public static void main(String[] args) { | |
| Function<Integer, Boolean> divisible3 = l -> l % 3 == 0; | |
| Function<Integer, Boolean> divisible5 = l -> l % 5 == 0; | |
| Function<Integer, String> outDivisibleFizz = i -> divisible3.apply(i) ? "Fizz" : ""; | |
| Function<Integer, String> outDivisibleBuzz = i -> divisible5.apply(i) ? "Buzz" : ""; | |
| IntStream.rangeClosed(1, 100).mapToObj(i -> { | |
| String out = ""; |
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
| import java.util.function.Function; | |
| import java.util.stream.IntStream; | |
| public class FizzBuzz { | |
| public static void main(String[] args) { | |
| Function<Integer, Boolean> divisible3 = l -> l % 3 == 0; | |
| Function<Integer, Boolean> divisible5 = l -> l % 5 == 0; | |
| Function<Integer, String> outDivisibleFizz = i -> divisible3.apply(i) ? "Fizz" : ""; | |
| Function<Integer, String> outDivisibleBuzz = i -> divisible5.apply(i) ? "Buzz" : ""; | |
| IntStream.rangeClosed(1, 100).mapToObj(i -> { | |
| return outDivisibleFizz.apply(i) + outDivisibleBuzz.apply(i) + ((!divisible3.apply(i) && !divisible5.apply(i)) ? i : ""); |
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
| WIFI:S:<SSID>;T:<WPA|WEP|>;P:<password>;; |
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
| import java.math.*; | |
| public class A { | |
| public static void main(String[]a) { | |
| System.out.print(a.length<1?1:f(new Long(a[0]))); | |
| } | |
| static BigInteger f(long n) { | |
| return n<1?BigInteger.ONE:BigInteger.valueOf(n).multiply(f(n-1)); | |
| } | |
| } |
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
| public class B { | |
| public static void main(String[]a) { | |
| double w=Math.sqrt(5); | |
| for(int i=1;i<51;)System.out.println(Math.round(Math.pow((1+w)/2,i++)/w)); | |
| } | |
| } |
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
| import java.time.LocalDate; | |
| public class C { | |
| public static void main(String[]a) { | |
| for(LocalDate d=LocalDate.of(2016,1,1).with(java.time.DayOfWeek.FRIDAY);d.getYear()<2017;d=d.plusDays(7))System.out.println(d); | |
| } | |
| } |
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
| [{"id":"2bea36d2.c3a802","type":"ui_tab","z":"f4b9d0bf.90fe58","name":"Home","icon":"dashboard","order":"1"},{"id":"a2ee8427.7e26b8","type":"mqtt-broker","z":"f4b9d0bf.90fe58","broker":"things.online","port":"1883","clientid":"node-red-evolux","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"6fa412ff.12821c","type":"debug","z":"f4b9d0bf.90fe58","name":"","active":true,"console":"false","complete":"false","x":843,"y":146,"wires":[]},{"id":"b8e48a88.979868","type":"mqtt | |
| in","z":"f4b9d0bf.90fe58","name":"Rotary Encoder | |
| Count","topic":"tinkerforge/bricklet/rotary_encoder/o3B/count","broker":"a2ee8427.7e26b8","x":135,"y":182.5,"wires":[["4905fab2.44ea64"]]},{"id":"4a01eaae.7cbe5c","type":"inject","z":"f4b9d0bf.90fe58","name":"Segment | |
| Display Start | |
| Counter","topic":"tinkerforge/bricklet/segment_display_4x7/pUj/start_counter/set","pay |
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
| https://help.github.com/articles/syncing-a-fork/ | |
| https://help.github.com/articles/configuring-a-remote-for-a-fork/ | |
| $ git remote -v | |
| origin https://github.com/jforge/brick-mqtt-proxy.git (fetch) | |
| origin https://github.com/jforge/brick-mqtt-proxy.git (push) | |
| $ git remote add upstream | |
| https://github.com/Tinkerforge/brick-mqtt-proxy.git | |
| $ git remote -v |
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
| [{"id":"2bea36d2.c3a802","type":"ui_tab","z":"f4b9d0bf.90fe58","name":"Home","icon":"dashboard","order":"1"},{"id":"a2ee8427.7e26b8","type":"mqtt-broker","z":"f4b9d0bf.90fe58","broker":"things.online","port":"1883","clientid":"node-red-evolux","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"6fa412ff.12821c","type":"debug","z":"f4b9d0bf.90fe58","name":"","active":true,"console":"false","complete":"false","x":843,"y":146,"wires":[]},{"id":"b8e48a88.979868","type":"mqtt in","z":"f4b9d0bf.90fe58","name":"Rotary Encoder Count","topic":"tinkerforge/bricklet/rotary_encoder/o3B/count","broker":"a2ee8427.7e26b8","x":135,"y":182.5,"wires":[["4905fab2.44ea64"]]},{"id":"f594419a.ad7a3","type":"ui_gauge","z":"f4b9d0bf.90fe58","tab":"2bea36d2.c3a802","name":"Gauge CO2","group":"Environmental","order":"1","format":"{{value}}","min":"400","ma |
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
| [{"id":"2bea36d2.c3a802","type":"ui_tab","z":"f4b9d0bf.90fe58","name":"Home","icon":"dashboard","order":"1"},{"id":"a2ee8427.7e26b8","type":"mqtt-broker","z":"f4b9d0bf.90fe58","broker":"things.online","port":"1883","clientid":"node-red-evolux","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"4a01eaae.7cbe5c","type":"inject","z":"f4b9d0bf.90fe58","name":"Segment Display Start Counter","topic":"tinkerforge/bricklet/segment_display_4x7/pUj/start_counter/set","payload":"{ \"value_from\": 0, \"value_to\": 500, \"increment\": 5, \"length\": 100}","payloadType":"json","repeat":"","crontab":"","once":true,"x":170,"y":140,"wires":[["91e22d3f.cf847"]]},{"id":"e85f4797.ab66c","type":"inject","z":"f4b9d0bf.90fe58","name":"Segment Display Reset","topic":"tinkerforge/bricklet/segment_display_4x7/pUj/segments/set","payload":"{ \"segments\": [ |