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
[self.tabBar setSelectionIndicatorImage:[UIImage imageNamed:@"tab-bar_highlighted.png"]]; | |
[[UITabBarItem appearance] setTitleTextAttributes: | |
[NSDictionary dictionaryWithObjectsAndKeys: | |
RGB(187, 187, 187), UITextAttributeTextColor, | |
[UIFont systemFontOfSize:10], UITextAttributeFont, | |
nil] | |
forState:UIControlStateNormal]; | |
[[UITabBarItem appearance] setTitleTextAttributes: | |
[NSDictionary dictionaryWithObjectsAndKeys: | |
RGB(153, 210, 249), UITextAttributeTextColor, |
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 time | |
import datetime | |
now = datetime.datetime.now() | |
time.mktime(now.timetuple()) |
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
#--- | |
# iPIN - iPhone PNG Images Normalizer v1.0 | |
# Copyright (C) 2007 | |
# | |
# Author: | |
# Axel E. Brzostowski | |
# http://www.axelbrz.com.ar/ | |
# [email protected] | |
# | |
# References: |
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 os | |
import time | |
import datetime | |
command = 'snmpwalk -v3 -l NoAuthNoPriv -u cisco 192.168.1.1 "ifInOctets.10"' | |
r = os.popen(command).read() | |
last_octes = r.replace("\n", "").split(" ")[-1] | |
last_octes = int(last_octes) | |
per = 3 | |
while (True): |
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
let centerLocation = CLLocationCoordinate2D(latitude: 0, longitude: 66) | |
let styleURL = URL(string: "mapbox://styles/lloydsheng/cjdjzspzq5b4b2sobtqxeooll") | |
let camera = MGLMapCamera(lookingAtCenter: centerLocation, fromDistance: 100, pitch: 0, heading: 0) | |
let options = MGLMapSnapshotOptions(styleURL: styleURL, camera: camera, size: CGSize(width: 300, height: 300)) | |
let snapShooter = MGLMapSnapshotter(options: options) | |
snapShooter.start { (shooter, error) in | |
let image = shooter?.image; | |
print("\(image)") | |
} |
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
UIGraphicsBeginImageContextWithOptions(snapshotView.bounds.size, true, 0.0) | |
snapshotView.drawHierarchy(in: snapshotView.bounds, afterScreenUpdates: true) | |
let snapshotImage = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
print("\(snapshotImage.debugDescription)") |
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
- (MKMapRect)visibleMapRect { | |
MGLCoordinateBounds bounds = self.mapboxMapView.visibleCoordinateBounds; | |
MKMapPoint sw = MKMapPointForCoordinate(bounds.sw); | |
MKMapPoint ne = MKMapPointForCoordinate(bounds.ne); | |
double x = sw.x; | |
double y = ne.y; | |
double width = ne.x - sw.x; | |
double height = sw.y - ne.y; |
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 UIKit | |
import Mapbox | |
class CustomPointAnnotation : MGLPointAnnotation { | |
} | |
class IconAnnotationView: MGLAnnotationView { | |
var iconView = UIImageView(frame: CGRect(x: 0, y: 0, width: 60, height: 60)) | |
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
[ | |
[214.0,291.0], | |
[290.0,426.0], | |
[130.0,234.0], | |
[41.0,192.0], | |
[273.0,393.0], | |
[53.0,50.0], | |
[61.0,337.0], | |
[251.0,296.0], | |
[264.0,232.0], |
OlderNewer