$ brew update
$ brew install maven
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
[ | |
{ | |
"skadnetwork_id": "m8dbw4sv7c.skadnetwork", | |
"entity_name": "DATASEAT LTD", | |
"creation_date": "2020-08-21T00:00:00Z" | |
}, | |
{ | |
"skadnetwork_id": "f7s53z58qe.skadnetwork", | |
"entity_name": "Tencent", | |
"creation_date": "2021-03-23T04:00:27.892Z" |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
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
// Create CustomView.xib, set File's Owner to CustomView. | |
// Link the top level view in the XIB to the contentView outlet. | |
class CustomView : UIView { | |
@IBOutlet private var contentView:UIView? | |
// other outlets | |
override init(frame: CGRect) { // for using CustomView in code | |
super.init(frame: frame) | |
self.commonInit() |
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
// | |
// ConcurrentOperation.swift | |
// | |
// Created by Caleb Davenport on 7/7/14. | |
// | |
// Learn more at http://blog.calebd.me/swift-concurrent-operations | |
// | |
import Foundation |
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
/* | |
MKAnnotationView has one init listed in its documentation, initWithAnnotation:reuseIdentifier:, so let's override that. | |
But this causes a runtime exception: | |
fatal error: use of unimplemented initializer 'init(frame:)' for class 'PulsatingDotMarker' | |
*/ | |
class PulsatingDotMarker: MKAnnotationView { | |
let innerCircle: UIView |
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
// | |
// NSString+Distance.h | |
// | |
// Created by Alexander Johansson on 2011-11-27. | |
// Based on http://stackoverflow.com/q/5684973/590396 | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSString (Distance) |
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
// | |
// NSDate+Helper.swift | |
// | |
// Created by Anton Morozov on 27.07.16. | |
// Copyright © 2016 Anton Morozov. All rights reserved. | |
// | |
import Foundation | |
extension NSDate { |
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
// Obj-C | |
// GestureRecognizer | |
UITapGestureRecognizer *tapToSelect = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tappedToSelectRow:)]; | |
tapToSelect.delegate = self; | |
[self.pickerView addGestureRecognizer:tapToSelect]; | |
#pragma mark - Actions | |
- (IBAction)tappedToSelectRow:(UITapGestureRecognizer *)tapRecognizer | |
{ |
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 timeAgoSinceDate(date:NSDate, numericDates:Bool) -> String { | |
let calendar = NSCalendar.currentCalendar() | |
let unitFlags = NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitHour | NSCalendarUnit.CalendarUnitDay | NSCalendarUnit.CalendarUnitWeekOfYear | NSCalendarUnit.CalendarUnitMonth | NSCalendarUnit.CalendarUnitYear | NSCalendarUnit.CalendarUnitSecond | |
let now = NSDate() | |
let earliest = now.earlierDate(date) | |
let latest = (earliest == now) ? date : now | |
let components:NSDateComponents = calendar.components(unitFlags, fromDate: earliest, toDate: latest, options: nil) | |
if (components.year >= 2) { | |
return "\(components.year) years ago" |
NewerOlder