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
| require "bunny" | |
| conn = Bunny.new(rabbitmq_config) | |
| conn.start | |
| channel = conn.create_chanel | |
| queue = channel.queue("queue.from.PC", exclusive: false, auto_delete: false) | |
| exchange = channel.fanout("exchange.name") |
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
| //=== webpack.common.js | |
| const path = require("path"); | |
| const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
| module.exports = { | |
| entry: "./client/index.js", | |
| module: { | |
| rules: [ | |
| { | |
| test: /\.(js|jsx)$/, |
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
| def find_unit(num, hash) | |
| unit = hash.select { |key, _value| key <= num } | |
| unit.keys.last | |
| end | |
| def num_to_words(num) | |
| numbers_to_name = { | |
| 1 => 'one', | |
| 2 => 'two', | |
| 3 => 'three', |
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
| +__rvm_make:0> make -j12 | |
| CC = gcc | |
| LD = ld | |
| LDSHARED = gcc -dynamiclib | |
| CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe | |
| XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT | |
| CPPFLAGS = -I/usr/local/Cellar/libyaml/0.2.1/include -I/usr/local/Cellar/libksba/1.3.5/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/[email protected]/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin18 -I./include -I. -I./enc/unicode/10.0.0 | |
| DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multi |
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 'package:bloc_counter/counter_provider.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:bloc_counter/counter_bloc.dart'; | |
| class Counter extends StatefulWidget { | |
| @override | |
| _CounterState createState() => _CounterState(); | |
| } | |
| class _CounterState extends State<Counter> { |
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 'package:bloc_counter/counter.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:bloc_counter/counter_bloc.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
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 'dart:async'; | |
| import 'package:bloc_counter/counter_provider.dart'; | |
| class CounterBloc { | |
| final counterController = StreamController(); // create a StreamController | |
| final CounterProvider provider = CounterProvider(); // create an instance of our CounterProvider | |
| Stream get getCount => counterController.stream; // create a getter for our stream |
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 'dart:async'; | |
| // import 'package:rxdart/rxdart.dart'; if you want to make use of PublishSubject, ReplaySubject or BehaviourSubject. | |
| // make sure you have rxdart: as a dependency in your pubspec.yaml file to use the above import | |
| class CounterBloc { | |
| final counterController = StreamController(); // create a StreamController or | |
| // final counterController = PublishSubject() or any other rxdart option; | |
| Stream get getCount => counterController.stream; // create a getter for our Stream | |
| // the rxdart stream controllers returns an Observable instead of a Stream |
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
| const dragStart = (event) => { | |
| event.dataTransfer.setData("text/plain", event.target.id); | |
| } | |
| const allowDrop = (event) => { | |
| event.preventDefault(); | |
| event.currentTarget.style.background = '#7f8082'; | |
| } | |
| const drop = (event) => { |
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
| .container { | |
| display: grid; | |
| grid-template-columns: auto auto auto auto; | |
| grid-column-gap: 1rem; | |
| grid-row-gap: 3rem; | |
| font-family: 'Titillium Web', sans-serif; | |
| } | |
| .droppable { | |
| width: 15rem; |
NewerOlder