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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.14; | |
import {IERC20} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol"; | |
contract MyUsdtTransfer{ | |
mapping(string => uint) public orders; //orderNo => orderType | |
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
drop procedure if exists add_all_timestamp; | |
CREATE PROCEDURE add_all_timestamp() | |
BEGIN | |
DECLARE tableName varchar(30) default ''; | |
DECLARE allAddr varchar(40) default ''; | |
DECLARE tableSchemaName varchar(30) default 'test'; | |
DECLARE done INT DEFAULT 0; | |
DECLARE curl CURSOR FOR select table_name from information_schema.tables where table_schema=tableSchemaName; | |
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; | |
OPEN curl; |
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 | |
// var_dump(function_exists('admin_url')); | |
if (!function_exists('admin_url')) { | |
/** | |
* Get admin url. | |
* | |
* @param string $path | |
* @param mixed $parameters | |
* @param bool $secure | |
* |
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 | |
/** | |
* Redirect users to custom URL based on their role after login | |
* | |
* @param string $redirect | |
* @param object $user | |
* @return string | |
*/ | |
function wc_custom_user_redirect( $redirect, $user ) { | |
// Get the first of all the roles assigned to the user |
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 <opencv2/opencv.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <opencv2/imgproc/imgproc.hpp> | |
using namespace std; | |
using namespace cv; | |
#define WINDOW_WIDTH 600 //定义窗口大小的宏 | |
#define WINDOW_NAME1 "【绘制图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
#include <opencv2/opencv.hpp> | |
using namespace std; | |
using namespace cv; | |
#define WINDOW_NAME "【程序窗口】" | |
void on_MouseHandle(int event, int x, int y, int flags, void* param); | |
void DrawRectangle(cv::Mat& img,cv::Rect box); | |
void ShowHelpText(); |
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 <opencv2/opencv.hpp> | |
using namespace std; | |
using namespace cv; | |
int main() | |
{ | |
//打开视频文件 | |
VideoCapture capture(0); //"1.mp4" | |
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 <opencv2./opencv.hpp> | |
#include "opencv2/highgui/highgui.hpp" | |
using namespace std; | |
using namespace cv; | |
#define WINDOW_NAME "【线性混合示例】" //为窗口标题定义的宏 | |
const int g_nMaxAlphaValue = 100; //Alpha 值的最大值 | |
int g_nAlphaValueSlider; //滑动条对应的变量 |
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 | |
//php connection to mqtt server(rabbitmq) | |
//use https://packagist.org/packages/php-amqplib/php-amqplib | |
define('AMQP_DEBUG', true); | |
require_once __DIR__.'/vendor/autoload.php'; | |
use PhpAmqpLib\Connection\AMQPStreamConnection; | |
use PhpAmqpLib\Message\AMQPMessage; | |
$exchange = 'fanout2'; | |
$queue = 'test'; |
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 | |
function p($array){ | |
echo "<pre>"; | |
print_r($array); | |
echo "</pre>"; | |
} | |
$array = array(); | |
for($i = 0;$i < 5;$i++){ |
NewerOlder