Here's a tip sheet I wrote up once, with the commands I actually use regularly: References vim documentation online advanced vim tips more useful tips and graphical cheat sheet General Nearly all commands can be preceded by a number for a repeat count. eg. 5dd delete 5 lines <Esc> gets you out of any mode and back to command mode Commands preceded by : are executed on the command line at the botto
Just installed El Capitan and can't install gem eventmachine 1.0.7. openssl is at 1.0.2a-1. Tried to use --with-ssl-dir but it seems ignored. Reported it to their github repo as well. Any suggestions are really appreciated. Thanks. $ ls /usr/local/Cellar/openssl/1.0.2a-1/include/openssl/ssl.h /usr/local/Cellar/openssl/1.0.2a-1/include/openssl/ssl.h $ gem install eventmachine -v '1.0.7' -- --with-s
In Swift how do you crop an image and put it in the center? I've cropped the image but want to put it in the center: ImgView.image = OrigImage var masklayer = CAShapeLayer() masklayer.frame = ImgView.frame masklayer.path = path.CGPath masklayer.fillColor = UIColor.whiteColor().CGColor masklayer.backgroundColor = UIColor.clearColor().CGColor ImgView.layer.mask = masklayer UIGraphicsBeginImageContex
I'm downloading images for my uitableview asynchronously using GCD, but there is a problem - when scrolling images flicker and change all the time. I tried setting image to nil with every cell, but it doesn't help much. When scrolling back up fast, all images are wrong. What can I do about that? Here is my method for cells: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexP
What is the DynamoDB equivalent of SELECT MAX(RANGE_KEY) FROM MYTABLE WHERE PRIMARYKEY = "value" The best I can come up with is from boto.dynamodb2.table import Table as awsTable tb = awsTable("MYTABLE") rs = list(tb.query_2(PRIMARYKEY__eq="value", reverse=True, limit=1)) MAXVALUE = rs[0][RANGE_KEY] Is there a better way to do this?
With the iOS SDK: I have a UIView with UITextFields that bring up a keyboard. I need it to be able to: Allow scrolling of the contents of the UIScrollView to see the other text fields once the keyboard is brought up Automatically "jump" (by scrolling up) or shortening I know that I need a UIScrollView. I've tried changing the class of my UIView to a UIScrollView, but I'm still unable to scroll the
I'm trying to work out an appropriate singleton model for usage in Swift. So far, I've been able to get a non-thread safe model working as: class var sharedInstance: TPScopeManager { get { struct Static { static var instance: TPScopeManager? = nil } if !Static.instance { Static.instance = TPScopeManager() } return Static.instance! } } Wrapping the singleton instance in the Static struct should all
I'm trying to create a button with rounded corners and a drop shadow. No matter how I switch up, the button will not display correctly. I've tried masksToBounds = false and masksToBounds = true, but either the corner radius works and the shadow does not or the shadow works and the corner radius doesn't clip the corners of the button. import UIKit import QuartzCore @IBDesignable class Button : UIBu
I have a string like this var str = "@text1 this is good @text1" Now replace text1 with another string, say t 1. I am able to replace the text, but i am not able to bold it. I want to bold the new string t 1, so that the final output will be: @t 1 this is good @t 1 How can I do it? All the examples I am seeing are in Objective-C, but I want to do it in Swift.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く