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
### 一些配置,看官方文档就可以了,填写包信息,schemes信息 等等 | |
### application | |
// 判断是否是通过LinkedME的UrlScheme唤起App | |
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { | |
if url.absoluteString.components(separatedBy: "click_id").count > 1 { | |
return LinkedME.getInstance().handleDeepLink(url); | |
} | |
return true | |
} |
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
// | |
// GDTApi.swift | |
// zaozuo-ios | |
// | |
// Created by wuchuanbo on 16/4/20. | |
// Copyright © 2016年 zaozuo. All rights reserved. | |
// | |
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
// 调用方法 didFinishLaunchingWithOptions中调用 | |
// 注册截屏事件通知: AppScreenshotDelegate(appDelegate: self).registObserver() | |
import Foundation | |
class AppScreenshotDelegate: NSObject { | |
weak var mAppDelegate: AppDelegate? | |
init(appDelegate: AppDelegate?) { | |
self.mAppDelegate = appDelegate | |
} |
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
#!/usr/bin/env python | |
#-*-coding:utf8-*- | |
""" | |
vesion2.0 | |
这个脚本的作用是通过输入某首歌页面的url,来实现这首歌的下载,保存到当前工作目录下。 | |
目前可以实现高音质音乐的下载,无须账号登陆。 | |
比如,When I'm Sixty-Four的页面的url是 http://www.xiami.com/song/1003908 | |
download_hq_music('http://www.xiami.com/song/1003908'),将会实现When I'm Sixty-Four的320k版本下载 |
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 AppKit | |
extension NSAttributedString { | |
class func hyperlinkFromString(aString: String, withURL url: NSURL) -> NSAttributedString { | |
let attrString = NSMutableAttributedString(string: aString) | |
let range = NSMakeRange(0, attrString.length) | |
attrString.beginEditing() | |
attrString.addAttribute(NSLinkAttributeName, value: url.absoluteString, range: range) | |
attrString.addAttribute(NSForegroundColorAttributeName, value: NSColor.blueColor(), range: range) |