This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
import 'dart:io'; | |
import 'dart:ui' as ui; | |
import 'package:flutter/material.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
void main() => runApp(MyApp()); | |
String FILENAME = 'timg.jpeg'; |
This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
lazy var accessoryToolbarWithDoneButton: UIToolbar = { | |
let toolbar = UIToolbar(frame: CGRect.zero) | |
//only needs to be flexible in the dimension(s) you want it to be | |
//https://stackoverflow.com/questions/31822504/how-can-i-increase-the-height-of-an-inputaccessoryview | |
toolbar.autoresizingMask = [.flexibleWidth, .flexibleHeight] | |
let leftSpace = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) | |
let doneButton = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(keyboardDoneButtonTapped(_:))) | |
toolbar.items = [leftSpace, doneButton] |
#!/bin/bash | |
# A bash script to create a time machine disk image suitable for | |
# backups with OS X 10.6 (Snow Leopard) | |
# This script probably only works for me, so try it at your own peril! | |
# Use, distribute, and modify as you see fit but leave this header intact. | |
# (R) sunkid - September 5, 2009 | |
# | |
# This will create a time machine ready disk image named with your | |
# computer's name with a maximum size of 600GB and copy it to | |
# /Volumes/backup. The image "file" (it's a directory, really) will |
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /usr/local/var/log/nginx/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
apply plugin: 'kotlin-kapt' | |
// ...(중략)... | |
dependencies { | |
// for async logic | |
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' | |
// Room | |
implementation "androidx.room:room-runtime:2.2.2" |
// | |
// UIViewController+Rotation.m | |
// Ulysses | |
// | |
// Created by Götz Fabian on 12.10.17. | |
// Copyright © 2017 Ulysses GmbH & Co. KG. All rights reserved. | |
// | |
#import "UIViewController+Rotation.h" |
To enable the rotation of a single view controller used to display the preview of Images/Videos. It is intuitive to allow user to rotate there device and screen changes accordingly, so it feels pleasant. But to achieve this, we need to enable the (almost) all Supported Device orientations.
Ex: `Portrait`, `LandscapeLeft`, `LandscapeRight`.
sudo apt-get install fonts-nanum