This file contains 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
Map<T, int> uniqCount<T>(List<T> list) { | |
return list.fold<Map<T, int>>({}, (prev, element) { | |
prev.update(element, (value) => value + 1, ifAbsent: () => 1); | |
return prev; | |
}); | |
} | |
void main() { | |
print(uniqCount([1, 1, 1, 2, 3, 4, 4, 5])); | |
} |
This file contains 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:intl/intl.dart'; | |
void main() { | |
print(DateFormat('yyyy-MM-dd').parseStrict('2022-07-27')); | |
print(DateFormat('yyyyMMdd').parseStrict('20220727')); | |
} |
This file contains 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
abstract class Abstract { | |
void foo(); | |
} | |
enum Categoly implements Abstract { | |
sample1, | |
sample2; | |
@override | |
foo() { print(this); } |
This file contains 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
diff --git a/app/javascript/mastodon/features/compose/components/poll_form.js b/app/javascript/mastodon/features/compose/components/poll_form.js | |
index 01df31d3a..afd0ca2d0 100644 | |
--- a/app/javascript/mastodon/features/compose/components/poll_form.js | |
+++ b/app/javascript/mastodon/features/compose/components/poll_form.js | |
@@ -153,7 +153,7 @@ class PollForm extends ImmutablePureComponent { | |
</ul> | |
<div className='poll__footer'> | |
- <button disabled={options.size >= 4} className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /></ | |
+ <button disabled={options.size >= 100} className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /> |
This file contains 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
platform: linux/arm | |
pipeline: | |
build: | |
image: arm32v7/busybox:latest | |
commands: | |
- uname -a |
This file contains 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
version: '2' | |
services: | |
drone-agent: | |
image: drone/agent:linux-arm | |
command: agent | |
restart: always | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
environment: |
This file contains 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
pipeline: | |
build: | |
image: aberrios85/drone-kitchen | |
commands: | |
- kitchen test | |
services: | |
docker: | |
image: plugins/docker | |
image: docker:1.12-dind |
This file contains 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
driver: | |
name: docker | |
socket: tcp://docker:2375 |
This file contains 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
pipeline: | |
build: | |
image: docker:latest | |
environment: | |
- DOCKER_HOST=tcp://docker:2375 | |
commands: | |
- docker info |
This file contains 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
services: | |
docker: | |
image: docker:stable-dind | |
privileged: true | |
command: [ "--storage-driver=vfs", "--tls=false" ] |
NewerOlder