Skip to content

Instantly share code, notes, and snippets.

Avatar
😈
Some kill some steal some breaks your heart.

AntiMoron AntiMoron

😈
Some kill some steal some breaks your heart.
View GitHub Profile
@AntiMoron
AntiMoron / Test.cpp
Created Dec 7, 2016
腾讯LVB流推送SDK 测试样例
View Test.cpp
#include<iostream>
#include<string>
#include<exception>
#include<windows.h>
#include<avsdk/av_sdk.h>
using namespace tencent::av;
using namespace std;
#define ENABLE_CONSOLE
@AntiMoron
AntiMoron / Test.cpp
Created Dec 7, 2016
腾讯LVB流推送SDK 测试样例
View Test.cpp
#include<iostream>
#include<string>
#include<exception>
#include<windows.h>
#include<avsdk/av_sdk.h>
using namespace tencent::av;
using namespace std;
#define ENABLE_CONSOLE
@AntiMoron
AntiMoron / Test.cpp
Last active Dec 8, 2016
腾讯LVB流推送SDK 测试样例
View Test.cpp
#include<iostream>
#include<string>
#include<exception>
#include<windows.h>
#include<avsdk/av_sdk.h>
using namespace tencent::av;
using namespace std;
#define ENABLE_CONSOLE
@AntiMoron
AntiMoron / test.swift
Created Feb 27, 2017
Dictionary set value for keypath
View test.swift
//: Playground - noun: a place where people can play
import UIKit
var str = "Hello, playground"
func setDictionary( dict:inout [String: Any], value: Any, forKey: String) {
let keypaths = forKey.components(separatedBy: ".")
guard keypaths.count > 1 else {
@AntiMoron
AntiMoron / optimize
Created Feb 27, 2017
swift3 set value for keypath
View optimize
//: Playground - noun: a place where people can play
import UIKit
var str = "Hello, playground"
fileprivate func _setDictionary( dict:inout [String: Any], value: Any, forKeys: ArraySlice<String>) {
guard forKeys.count > 1 else {
dict[forKeys.first!] = value
View crash.swift
//: Playground - noun: a place where people can play
import UIKit
var str = "Hello, playground"
fileprivate func _setDictionary( dict:inout [String: Any], value: Any, forKeys: ArraySlice<String>) {
guard forKeys.count > 1 else {
print(forKeys)
@AntiMoron
AntiMoron / RPLiveRtmpView.h
Created Dec 11, 2017
TXLVB播放rtmp推流
View RPLiveRtmpView.h
#import <UIKit/UIKit.h>
@interface RPLiveRtmpView : UIView
// 播放视频地址
@property(nonatomic, strong) NSString* movieSource;
// 被添加的viewController
@property(nonatomic, weak) UIViewController* viewController;
// 播放url
-(BOOL)startRtmp;