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
%% Usage: | |
%% upload_request(<<"site.com/api/upload">>, <<"path/to/file.png">>, <<"upload">>, <<"image/png">>, [], <<"some-token">>) | |
%% | |
%% Usage with RequestData: | |
%% Payload = [{upload_type, <<"user_picture">>}], | |
%% PayloadContent = jsx:encode(Payload), | |
%% RequestData = [ | |
%% {<<"payload">>, PayloadContent} | |
%% ] | |
%% upload_request(<<"site.com/api/upload">>, <<"path/to/file.png">>, <<"upload">>, <<"image/png">>, RequestData, <<"some-token">>) |
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 'package:flutter_webrtc/flutter_webrtc.dart'; | |
import 'package:vpl_frontend/calls/ws_messages.dart'; | |
import 'package:vpl_frontend/utils/api.dart'; | |
import 'call_manager_base.dart'; | |
class RtcConnection { | |
MediaStream _localStream; | |
RTCPeerConnection _peerConnection; | |
RTCVideoRenderer _localRenderer = RTCVideoRenderer(); |
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
-module (dt_util). | |
%%% | |
% datetime 工具箱 | |
%%% | |
-export ([milliseconds/0]). | |
-export ([utc_date/1]). | |
%% 得到现在在制时间毫秒 | |
milliseconds() -> |
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
%%%------------------------------------------------------------------- | |
%%% @author zhongwencool@gmail.com | |
%%% @doc 一个简单的分层时间轮实现:类似于3维数组实现时钟 | |
%%% 根据 http://www.embeddedlinux.org.cn/RTConforEmbSys/5107final/LiB0071.html 实现 | |
%%% 1.时钟原理说明: | |
%%% 1.1. 初始化一个三层时间轮:秒刻盘:0~59个SecList, 分刻盘:0~59个MinList, 时刻盘:0~12个HourList; | |
%%% 1.2. SecTick由外界推动,每跳一轮(60格),SecTick复位至0,同时MinTick跳1格; | |
%%% 1.3. 同理MinTick每跳一轮(60格),MinTick复位至0,同时HourTick跳1格; | |
%%% 1.4. 最高层:HourTick跳一轮(12格),HourTick复位至0,一个时间轮完整周期完成. | |
%%% 2.事件原理说明: |
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
#include <sys/types.h> | |
#include <sys/time.h> | |
#include <sys/queue.h> | |
#include <stdlib.h> | |
#include <err.h> | |
#include <event.h> | |
#include <evhttp.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <string.h> |
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
/** | |
* Copyright (c) 2005-2012 springside.org.cn | |
*/ | |
package com.rd.ifaes.common.util; | |
import com.rd.ifaes.common.exception.BussinessException; | |
import org.apache.commons.lang3.Validate; | |
import javax.crypto.SecretKeyFactory; | |
import javax.crypto.spec.PBEKeySpec; |
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
#!/usr/bin/env python3 | |
# encoding: utf-8 | |
import requests | |
import base64 | |
import hashlib | |
import os | |
from wxpy import * | |
from wxpy.api.chats.friend import Friend |
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
{ | |
# QQBot 的配置文件 | |
# 使用 qqbot -u somebody 启动程序时,依次加载: | |
# 根配置 -> 默认配置 -> 用户 somebody 的配置 -> 命令行参数配置 | |
# 使用 qqbot 启动程序时,依次加载: | |
# 根配置 -> 默认配置 -> 命令行参数配置 | |
# 用户 somebody 的配置 | |
"8187" : { | |
# QQBot-term (HTTP-API) 服务器端口号(该服务器监听 IP 为 127.0.0.1 ) |
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
<?php | |
/** | |
* @desc Advanced Message Queuing Protocol RPC Client | |
* | |
* @name RpcClient | |
* @copyright leeyi.net @ 2014-2020 | |
* @author leeyi <leeyisoft@icloud.com> | |
*/ | |
namespace app\lib\AMQP; |
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
<?php | |
/** | |
* Advanced Message Queuing Protocol 发送消息类 | |
* | |
* @copyright leeyi.net @ 2014-2020 | |
* @author leeyi <leeyisoft@icloud.com> | |
*/ | |
namespace app\lib\AMQP; |
NewerOlder