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
func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage!, editingInfo: [NSObject : AnyObject]!) { | |
// do something with selectedImage and originalImage | |
let timage = UIImageJPEGRepresentation(image, 1.0); | |
if image != nil { | |
//UIImageJPEGRepresentation(selectedImage, <#compressionQuality: CGFloat#>) | |
upload(.POST, "http://api.localhost/image", timage) | |
.progress { (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) in | |
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
package main | |
import ( | |
"github.com/goamz/goamz/aws" | |
"github.com/goamz/goamz/s3" | |
"log" | |
) | |
var ( | |
AccessKeyId, SecretAccessKey, Bucket string |
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
// swipe actions | |
override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? { | |
/*var superAction = UITableViewRowAction(style: UITableViewRowActionStyle.Default, title: "Contact:", handler: { (action: UITableViewRowAction!, indexPath: NSIndexPath!) -> Void in | |
let callMenu = UIAlertController(title: nil, message: "Contact using", preferredStyle: .ActionSheet) | |
let phoneAction = UIAlertAction(title: "Phone", style: UIAlertActionStyle.Default, handler: nil) | |
let messageAction = UIAlertAction(title: "Message", style: UIAlertActionStyle.Default, handler: nil) | |
let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: nil) | |
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
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"bytes" | |
"bufio" | |
"strings" | |
"time" |
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 UIKit | |
func imageFromContextOfSize(size:CGSize, closure:() -> ()) -> UIImage { | |
UIGraphicsBeginImageContextWithOptions(size, false, 0) | |
closure() | |
let result = UIGraphicsGetImageFromCurrentImageContext() | |
UIGraphicsEndImageContext() | |
return result |
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
var swipeRight = UISwipeGestureRecognizer(target: self, action: "respondToSwipeGesture:") | |
swipeRight.direction = UISwipeGestureRecognizerDirection.Right | |
self.view.addGestureRecognizer(swipeRight) | |
var swipeDown = UISwipeGestureRecognizer(target: self, action: "respondToSwipeGesture:") | |
swipeDown.direction = UISwipeGestureRecognizerDirection.Down | |
self.view.addGestureRecognizer(swipeDown) |
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
<?php | |
$config['sess_driver'] = 'redis'; | |
$config['sess_cookie_name'] = 'ci_session'; | |
$config['sess_expiration'] = 7200; | |
$config['sess_save_path'] = "127.0.0.1:6379"; | |
$config['sess_match_ip'] = FALSE; | |
$config['sess_time_to_update'] = 300; | |
$config['sess_regenerate_destroy'] = FALSE; |
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
<div class="scrollable-table"> | |
<table class="table table-striped table-header-rotated"> | |
<thead> | |
<tr> | |
<!-- First column header is not rotated --> | |
<th></th> | |
<!-- Following headers are rotated --> | |
<th class="rotate-45"><div><span>Column header 1</span></div></th> | |
<th class="rotate-45"><div><span>Column header 2</span></div></th> | |
<th class="rotate-45"><div><span>Column header 3</span></div></th> |
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
.table-header-rotated th.row-header{ | |
width: auto; | |
} | |
.table-header-rotated td{ | |
width: 40px; | |
border-top: 1px solid #dddddd; | |
border-left: 1px solid #dddddd; | |
border-right: 1px solid #dddddd; | |
vertical-align: middle; |
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
<?php | |
// get only id's | |
$steps_in_stage = array_map('intval', $array); |